@prisma/internals 7.10.0-dev.49 → 7.10.0-dev.58
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-J3WNMDEL.js → chunk-5P43324W.js} +8 -8
- package/dist/{chunk-HWUFWTLE.js → chunk-6DUJVBF7.js} +27 -27
- package/dist/{chunk-KAH2NIWC.js → chunk-74RGCSUJ.js} +5 -5
- package/dist/{chunk-N7LPTHU6.js → chunk-AD2DKMII.js} +4 -4
- package/dist/{chunk-I36VXZYC.js → chunk-HRNTJEMX.js} +8 -8
- package/dist/{chunk-Y2VS7LMC.js → chunk-IPVRPART.js} +5 -5
- package/dist/{chunk-QKQKSUQO.js → chunk-JFXHOFJA.js} +5 -5
- package/dist/{chunk-QPYCL56C.js → chunk-JLFNVBTN.js} +5 -5
- package/dist/{chunk-KHFL6SMD.js → chunk-MBFQWFUB.js} +7 -7
- package/dist/{chunk-T3IA3C4J.js → chunk-MLTMKT3L.js} +5 -5
- package/dist/{chunk-6S5MN3NA.js → chunk-QMNPESAP.js} +4 -4
- package/dist/{chunk-P2UQYFDU.js → chunk-R4FWYJP7.js} +5 -5
- package/dist/{chunk-2BXDHSSY.js → chunk-TPCPXGC5.js} +5 -5
- package/dist/{chunk-K6JDZUN2.js → chunk-VUGB2H7M.js} +15 -15
- package/dist/{chunk-NUKBOD54.js → chunk-WFMA7DI5.js} +26 -22
- package/dist/{chunk-WUGEO6RU.js → chunk-WOKQ6ZNV.js} +5 -5
- package/dist/cli/checkUnsupportedDataProxy.d.ts +5 -5
- package/dist/cli/checkUnsupportedDataProxy.js +17 -17
- package/dist/cli/completion-values.js +24 -24
- package/dist/cli/getSchema.js +7 -7
- package/dist/cli/hashes.js +4 -4
- package/dist/cli/schemaContext.js +18 -18
- package/dist/engine-commands/errorHelpers.js +4 -4
- package/dist/engine-commands/formatSchema.js +16 -16
- package/dist/engine-commands/getConfig.js +7 -7
- package/dist/engine-commands/getDmmf.js +8 -8
- package/dist/engine-commands/index.js +25 -25
- 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.d.ts +1 -0
- package/dist/get-generators/getGenerators.js +19 -19
- package/dist/index.js +65 -65
- package/dist/migrateTypes.d.ts +1 -1
- package/dist/utils/getVersionFromPackageJson.js +3 -3
- package/dist/utils/missingGeneratorMessage.d.ts +3 -3
- package/dist/utils/missingGeneratorMessage.js +4 -4
- package/dist/utils/validatePrismaConfigWithDatasource.d.ts +2 -2
- package/dist/utils/validatePrismaConfigWithDatasource.js +3 -3
- package/dist/wasm.js +5 -5
- package/package.json +12 -12
|
@@ -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_5P43324W_exports = {};
|
|
30
|
+
__export(chunk_5P43324W_exports, {
|
|
31
31
|
GetConfigError: () => GetConfigError,
|
|
32
32
|
getConfig: () => getConfig
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
34
|
+
module.exports = __toCommonJS(chunk_5P43324W_exports);
|
|
35
35
|
var import_chunk_6Z766KGR = require("./chunk-6Z766KGR.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_MLTMKT3L = require("./chunk-MLTMKT3L.js");
|
|
39
|
+
var import_chunk_JLFNVBTN = require("./chunk-JLFNVBTN.js");
|
|
40
40
|
var import_chunk_5DBOS77Y = require("./chunk-5DBOS77Y.js");
|
|
41
41
|
var import_chunk_YNDZCLVL = require("./chunk-YNDZCLVL.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_MLTMKT3L.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_JLFNVBTN.prismaSchemaWasm.debug_panic();
|
|
77
77
|
}
|
|
78
78
|
const params = JSON.stringify({ prismaSchema: options.datamodel });
|
|
79
|
-
return
|
|
79
|
+
return import_chunk_JLFNVBTN.prismaSchemaWasm.get_config(params);
|
|
80
80
|
},
|
|
81
81
|
(e) => ({
|
|
82
82
|
type: "wasm-error",
|
|
@@ -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_6DUJVBF7_exports = {};
|
|
30
|
+
__export(chunk_6DUJVBF7_exports, {
|
|
31
31
|
checkUnsupportedDataProxy: () => checkUnsupportedDataProxy,
|
|
32
32
|
forbiddenCmdWithDataProxyFlagMessage: () => forbiddenCmdWithDataProxyFlagMessage,
|
|
33
33
|
formatSchema: () => formatSchema,
|
|
@@ -40,22 +40,22 @@ __export(chunk_HWUFWTLE_exports, {
|
|
|
40
40
|
processSchemaResult: () => processSchemaResult,
|
|
41
41
|
skipIndex: () => skipIndex
|
|
42
42
|
});
|
|
43
|
-
module.exports = __toCommonJS(
|
|
43
|
+
module.exports = __toCommonJS(chunk_6DUJVBF7_exports);
|
|
44
44
|
var import_chunk_X77CS5RK = require("./chunk-X77CS5RK.js");
|
|
45
45
|
var import_chunk_DZ4QWHTB = require("./chunk-DZ4QWHTB.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_5FJ3MENK = require("./chunk-5FJ3MENK.js");
|
|
49
|
-
var
|
|
49
|
+
var import_chunk_WFMA7DI5 = require("./chunk-WFMA7DI5.js");
|
|
50
50
|
var import_chunk_GXW4NTU2 = require("./chunk-GXW4NTU2.js");
|
|
51
51
|
var import_chunk_BGMZPA2F = require("./chunk-BGMZPA2F.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_5P43324W = require("./chunk-5P43324W.js");
|
|
54
|
+
var import_chunk_R4FWYJP7 = require("./chunk-R4FWYJP7.js");
|
|
55
|
+
var import_chunk_WOKQ6ZNV = require("./chunk-WOKQ6ZNV.js");
|
|
56
|
+
var import_chunk_MBFQWFUB = require("./chunk-MBFQWFUB.js");
|
|
57
|
+
var import_chunk_TPCPXGC5 = require("./chunk-TPCPXGC5.js");
|
|
58
|
+
var import_chunk_JLFNVBTN = require("./chunk-JLFNVBTN.js");
|
|
59
59
|
var import_chunk_ZJWZK45Z = require("./chunk-ZJWZK45Z.js");
|
|
60
60
|
var import_chunk_2B26F5N3 = require("./chunk-2B26F5N3.js");
|
|
61
61
|
var import_chunk_YNDZCLVL = require("./chunk-YNDZCLVL.js");
|
|
@@ -76,7 +76,7 @@ var debug = (0, import_debug.default)("prisma:format");
|
|
|
76
76
|
async function formatSchema({ schemas }, inputFormattingOptions) {
|
|
77
77
|
if (process.env.FORCE_PANIC_PRISMA_SCHEMA) {
|
|
78
78
|
handleFormatPanic(() => {
|
|
79
|
-
|
|
79
|
+
import_chunk_JLFNVBTN.prismaSchemaWasm.debug_panic();
|
|
80
80
|
});
|
|
81
81
|
}
|
|
82
82
|
const defaultFormattingOptions = {
|
|
@@ -93,10 +93,10 @@ async function formatSchema({ schemas }, inputFormattingOptions) {
|
|
|
93
93
|
const { formattedMultipleSchemas, lintDiagnostics } = handleFormatPanic(() => {
|
|
94
94
|
const formattedMultipleSchemasRaw = formatWasm(JSON.stringify(schemas), documentFormattingParams);
|
|
95
95
|
const formattedMultipleSchemas2 = JSON.parse(formattedMultipleSchemasRaw);
|
|
96
|
-
const lintDiagnostics2 = (0,
|
|
96
|
+
const lintDiagnostics2 = (0, import_chunk_WOKQ6ZNV.lintSchema)({ schemas: formattedMultipleSchemas2 });
|
|
97
97
|
return { formattedMultipleSchemas: formattedMultipleSchemas2, lintDiagnostics: lintDiagnostics2 };
|
|
98
98
|
});
|
|
99
|
-
const lintWarnings = (0,
|
|
99
|
+
const lintWarnings = (0, import_chunk_WOKQ6ZNV.getLintWarningsAsText)(lintDiagnostics);
|
|
100
100
|
if (lintWarnings && import_chunk_ZJWZK45Z.logger_exports.should.warn()) {
|
|
101
101
|
console.warn(lintWarnings);
|
|
102
102
|
}
|
|
@@ -123,7 +123,7 @@ function handleFormatPanic(tryCb) {
|
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
125
|
function formatWasm(schema, documentFormattingParams) {
|
|
126
|
-
const formattedSchema =
|
|
126
|
+
const formattedSchema = import_chunk_JLFNVBTN.prismaSchemaWasm.format(schema, JSON.stringify(documentFormattingParams));
|
|
127
127
|
return formattedSchema;
|
|
128
128
|
}
|
|
129
129
|
async function loadSchemaContext({ schemaPath, printLoadMessage, allowNull, schemaPathArgumentName, cwd } = {
|
|
@@ -135,10 +135,10 @@ async function loadSchemaContext({ schemaPath, printLoadMessage, allowNull, sche
|
|
|
135
135
|
}) {
|
|
136
136
|
let schemaResult = null;
|
|
137
137
|
if (allowNull) {
|
|
138
|
-
schemaResult = await (0,
|
|
138
|
+
schemaResult = await (0, import_chunk_TPCPXGC5.getSchemaWithPathOptional)({ schemaPath, cwd, argumentName: schemaPathArgumentName });
|
|
139
139
|
if (!schemaResult) return null;
|
|
140
140
|
} else {
|
|
141
|
-
schemaResult = await (0,
|
|
141
|
+
schemaResult = await (0, import_chunk_TPCPXGC5.getSchemaWithPath)({ schemaPath, cwd, argumentName: schemaPathArgumentName });
|
|
142
142
|
}
|
|
143
143
|
return processSchemaResult({ schemaResult, printLoadMessage, cwd });
|
|
144
144
|
}
|
|
@@ -150,9 +150,9 @@ async function processSchemaResult({
|
|
|
150
150
|
const loadedFromPathForLogMessages = import_node_path.default.relative(cwd, schemaResult.schemaPath);
|
|
151
151
|
const schemaRootDir = schemaResult.schemaRootDir || cwd;
|
|
152
152
|
if (printLoadMessage) {
|
|
153
|
-
(0,
|
|
153
|
+
(0, import_chunk_TPCPXGC5.printSchemaLoadedMessage)(loadedFromPathForLogMessages);
|
|
154
154
|
}
|
|
155
|
-
const configFromPsl = await (0,
|
|
155
|
+
const configFromPsl = await (0, import_chunk_5P43324W.getConfig)({ datamodel: schemaResult.schemas });
|
|
156
156
|
const primaryDatasource = configFromPsl.datasources.at(0);
|
|
157
157
|
return {
|
|
158
158
|
schemaFiles: schemaResult.schemas,
|
|
@@ -206,12 +206,12 @@ async function getGenerators(options) {
|
|
|
206
206
|
throw new Error(import_chunk_BGMZPA2F.missingDatasource);
|
|
207
207
|
}
|
|
208
208
|
(0, import_chunk_5FJ3MENK.printConfigWarnings)(schemaContext.warnings);
|
|
209
|
-
const dmmf = await (0,
|
|
209
|
+
const dmmf = await (0, import_chunk_R4FWYJP7.getDMMF)({ datamodel: schemaContext.schemaFiles });
|
|
210
210
|
if (dmmf.datamodel.models.length === 0 && !allowNoModels) {
|
|
211
211
|
if (schemaContext.primaryDatasource.provider === "mongodb") {
|
|
212
|
-
throw new Error(
|
|
212
|
+
throw new Error((0, import_chunk_WFMA7DI5.missingModelMessageMongoDB)(options.cliCommand));
|
|
213
213
|
}
|
|
214
|
-
throw new Error(
|
|
214
|
+
throw new Error((0, import_chunk_WFMA7DI5.missingModelMessage)(options.cliCommand));
|
|
215
215
|
}
|
|
216
216
|
const generatorConfigs = filterGenerators(overrideGenerators || schemaContext.generators, generatorNames);
|
|
217
217
|
await validateGenerators(generatorConfigs);
|
|
@@ -254,7 +254,7 @@ You need to define \`output\` in the generator block in the schema file.`
|
|
|
254
254
|
fromEnvVar: null
|
|
255
255
|
};
|
|
256
256
|
}
|
|
257
|
-
const datamodel = (0,
|
|
257
|
+
const datamodel = (0, import_chunk_MBFQWFUB.mergeSchemas)({ schemas: schemaContext.schemaFiles });
|
|
258
258
|
const options2 = {
|
|
259
259
|
datamodel,
|
|
260
260
|
datasources: schemaContext.datasources,
|
|
@@ -422,17 +422,17 @@ function filterGenerators(generators, generatorNames) {
|
|
|
422
422
|
}
|
|
423
423
|
return filtered;
|
|
424
424
|
}
|
|
425
|
-
var forbiddenCmdWithDataProxyFlagMessage = (
|
|
426
|
-
Using an Accelerate URL is not supported for this CLI command ${(0, import_chunk_PG5FDKSF.green)(
|
|
427
|
-
Please use a direct connection to your database in \`
|
|
425
|
+
var forbiddenCmdWithDataProxyFlagMessage = (command) => `
|
|
426
|
+
Using an Accelerate URL is not supported for this CLI command ${(0, import_chunk_PG5FDKSF.green)(command)} yet.
|
|
427
|
+
Please use a direct connection to your database in \`prisma7.config.ts\`.
|
|
428
428
|
|
|
429
429
|
More information about this limitation: ${(0, import_chunk_I6WLABB2.link)("https://pris.ly/d/accelerate-limitations")}
|
|
430
430
|
`;
|
|
431
431
|
function checkUnsupportedDataProxy({
|
|
432
|
-
|
|
432
|
+
command,
|
|
433
433
|
validatedConfig
|
|
434
434
|
}) {
|
|
435
435
|
if (validatedConfig.datasource.url.startsWith("prisma://")) {
|
|
436
|
-
throw new Error(forbiddenCmdWithDataProxyFlagMessage(
|
|
436
|
+
throw new Error(forbiddenCmdWithDataProxyFlagMessage(command));
|
|
437
437
|
}
|
|
438
438
|
}
|
|
@@ -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_74RGCSUJ_exports = {};
|
|
30
|
+
__export(chunk_74RGCSUJ_exports, {
|
|
31
31
|
getCLIPathHash: () => getCLIPathHash,
|
|
32
32
|
getProjectHash: () => getProjectHash
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
35
|
-
var
|
|
34
|
+
module.exports = __toCommonJS(chunk_74RGCSUJ_exports);
|
|
35
|
+
var import_chunk_TPCPXGC5 = require("./chunk-TPCPXGC5.js");
|
|
36
36
|
var import_crypto = __toESM(require("crypto"));
|
|
37
37
|
async function getProjectHash(schemaPath) {
|
|
38
|
-
const projectPath = (await (0,
|
|
38
|
+
const projectPath = (await (0, import_chunk_TPCPXGC5.getSchemaWithPath)({ schemaPath }))?.schemaPath ?? process.cwd();
|
|
39
39
|
return import_crypto.default.createHash("sha256").update(projectPath).digest("hex").substring(0, 8);
|
|
40
40
|
}
|
|
41
41
|
function getCLIPathHash() {
|
|
@@ -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_AD2DKMII_exports = {};
|
|
20
|
+
__export(chunk_AD2DKMII_exports, {
|
|
21
21
|
require_package: () => require_package
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
23
|
+
module.exports = __toCommonJS(chunk_AD2DKMII_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.10.0-dev.
|
|
29
|
+
version: "7.10.0-dev.58",
|
|
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_HRNTJEMX_exports = {};
|
|
30
|
+
__export(chunk_HRNTJEMX_exports, {
|
|
31
31
|
ValidateError: () => ValidateError,
|
|
32
32
|
validate: () => validate
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
34
|
+
module.exports = __toCommonJS(chunk_HRNTJEMX_exports);
|
|
35
35
|
var import_chunk_6Z766KGR = require("./chunk-6Z766KGR.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_MLTMKT3L = require("./chunk-MLTMKT3L.js");
|
|
39
|
+
var import_chunk_JLFNVBTN = require("./chunk-JLFNVBTN.js");
|
|
40
40
|
var import_chunk_5DBOS77Y = require("./chunk-5DBOS77Y.js");
|
|
41
41
|
var import_chunk_YNDZCLVL = require("./chunk-YNDZCLVL.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_MLTMKT3L.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_JLFNVBTN.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_JLFNVBTN.prismaSchemaWasm.validate(params);
|
|
81
81
|
},
|
|
82
82
|
(e) => ({
|
|
83
83
|
type: "wasm-error",
|
|
@@ -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_IPVRPART_exports = {};
|
|
20
|
+
__export(chunk_IPVRPART_exports, {
|
|
21
21
|
version: () => version
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
24
|
-
var
|
|
25
|
-
var packageJson = (0,
|
|
23
|
+
module.exports = __toCommonJS(chunk_IPVRPART_exports);
|
|
24
|
+
var import_chunk_AD2DKMII = require("./chunk-AD2DKMII.js");
|
|
25
|
+
var packageJson = (0, import_chunk_AD2DKMII.require_package)();
|
|
26
26
|
var version = packageJson.version;
|
|
@@ -16,12 +16,12 @@ 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_JFXHOFJA_exports = {};
|
|
20
|
+
__export(chunk_JFXHOFJA_exports, {
|
|
21
21
|
ConfigValidationError: () => ConfigValidationError,
|
|
22
22
|
validatePrismaConfigWithDatasource: () => validatePrismaConfigWithDatasource
|
|
23
23
|
});
|
|
24
|
-
module.exports = __toCommonJS(
|
|
24
|
+
module.exports = __toCommonJS(chunk_JFXHOFJA_exports);
|
|
25
25
|
var import_chunk_ANU3HEGF = require("./chunk-ANU3HEGF.js");
|
|
26
26
|
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
|
27
27
|
var ConfigValidationError = class extends Error {
|
|
@@ -35,11 +35,11 @@ function isValidPrismaConfig(prismaConfig) {
|
|
|
35
35
|
}
|
|
36
36
|
function validatePrismaConfigWithDatasource({
|
|
37
37
|
config,
|
|
38
|
-
|
|
38
|
+
command
|
|
39
39
|
}) {
|
|
40
40
|
if (!isValidPrismaConfig(config)) {
|
|
41
41
|
throw new ConfigValidationError(
|
|
42
|
-
`The ${(0, import_chunk_PG5FDKSF.red)(`datasource.url`)} property is required in your Prisma config file when using ${(0, import_chunk_PG5FDKSF.green)(
|
|
42
|
+
`The ${(0, import_chunk_PG5FDKSF.red)(`datasource.url`)} property is required in your Prisma config file when using ${(0, import_chunk_PG5FDKSF.green)(command)}.`
|
|
43
43
|
);
|
|
44
44
|
}
|
|
45
45
|
return config;
|
|
@@ -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_JLFNVBTN_exports = {};
|
|
30
|
+
__export(chunk_JLFNVBTN_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_JLFNVBTN_exports);
|
|
37
|
+
var import_chunk_AD2DKMII = require("./chunk-AD2DKMII.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_AD2DKMII.require_package)();
|
|
50
50
|
var prismaSchemaWasmVersion = dependencies["@prisma/prisma-schema-wasm"];
|
|
51
51
|
var schemaEngineWasmVersion = dependencies["@prisma/schema-engine-wasm"];
|
|
@@ -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_MBFQWFUB_exports = {};
|
|
30
|
+
__export(chunk_MBFQWFUB_exports, {
|
|
31
31
|
MergeSchemasError: () => MergeSchemasError,
|
|
32
32
|
mergeSchemas: () => mergeSchemas
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
34
|
+
module.exports = __toCommonJS(chunk_MBFQWFUB_exports);
|
|
35
35
|
var import_chunk_6Z766KGR = require("./chunk-6Z766KGR.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_MLTMKT3L = require("./chunk-MLTMKT3L.js");
|
|
39
|
+
var import_chunk_JLFNVBTN = require("./chunk-JLFNVBTN.js");
|
|
40
40
|
var import_chunk_5DBOS77Y = require("./chunk-5DBOS77Y.js");
|
|
41
41
|
var import_chunk_YNDZCLVL = require("./chunk-YNDZCLVL.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_MLTMKT3L.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_JLFNVBTN.prismaSchemaWasm.merge_schemas(params);
|
|
76
76
|
},
|
|
77
77
|
(e) => ({
|
|
78
78
|
type: "wasm-error",
|
|
@@ -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_MLTMKT3L_exports = {};
|
|
20
|
+
__export(chunk_MLTMKT3L_exports, {
|
|
21
21
|
addVersionDetailsToErrorMessage: () => addVersionDetailsToErrorMessage
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
23
|
+
module.exports = __toCommonJS(chunk_MLTMKT3L_exports);
|
|
24
24
|
var import_chunk_QN6PSQY7 = require("./chunk-QN6PSQY7.js");
|
|
25
|
-
var
|
|
25
|
+
var import_chunk_IPVRPART = require("./chunk-IPVRPART.js");
|
|
26
26
|
function addVersionDetailsToErrorMessage(message) {
|
|
27
|
-
const rows = [["Prisma CLI Version",
|
|
27
|
+
const rows = [["Prisma CLI Version", import_chunk_IPVRPART.version]];
|
|
28
28
|
return `${message}
|
|
29
29
|
|
|
30
30
|
${(0, import_chunk_QN6PSQY7.formatTable)(rows)}`;
|
|
@@ -16,8 +16,8 @@ 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_QMNPESAP_exports = {};
|
|
20
|
+
__export(chunk_QMNPESAP_exports, {
|
|
21
21
|
completionApiKeyHint: () => completionApiKeyHint,
|
|
22
22
|
completionClientOutputPaths: () => completionClientOutputPaths,
|
|
23
23
|
completionCompositeTypeDepths: () => completionCompositeTypeDepths,
|
|
@@ -42,13 +42,13 @@ __export(chunk_6S5MN3NA_exports, {
|
|
|
42
42
|
completionStudioBrowsers: () => completionStudioBrowsers,
|
|
43
43
|
completionStudioPorts: () => completionStudioPorts
|
|
44
44
|
});
|
|
45
|
-
module.exports = __toCommonJS(
|
|
45
|
+
module.exports = __toCommonJS(chunk_QMNPESAP_exports);
|
|
46
46
|
var completionSchemaPaths = [
|
|
47
47
|
{ value: "prisma/schema.prisma", description: "Default schema path" },
|
|
48
48
|
{ value: "./schema.prisma", description: "Schema in project root" }
|
|
49
49
|
];
|
|
50
50
|
var completionConfigPaths = [
|
|
51
|
-
{ value: "
|
|
51
|
+
{ value: "prisma7.config.ts", description: "Default config path" }
|
|
52
52
|
];
|
|
53
53
|
var completionDatasourceUrls = [
|
|
54
54
|
{ value: "postgresql://", description: "PostgreSQL connection string" },
|
|
@@ -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_R4FWYJP7_exports = {};
|
|
30
|
+
__export(chunk_R4FWYJP7_exports, {
|
|
31
31
|
GetDmmfError: () => GetDmmfError,
|
|
32
32
|
externalToInternalDmmf: () => import_get_dmmf2.externalToInternalDmmf,
|
|
33
33
|
getDMMF: () => getDMMF,
|
|
34
34
|
getInternalDMMF: () => getInternalDMMF
|
|
35
35
|
});
|
|
36
|
-
module.exports = __toCommonJS(
|
|
36
|
+
module.exports = __toCommonJS(chunk_R4FWYJP7_exports);
|
|
37
37
|
var import_chunk_IL7PSY44 = require("./chunk-IL7PSY44.js");
|
|
38
38
|
var import_chunk_6Z766KGR = require("./chunk-6Z766KGR.js");
|
|
39
|
-
var
|
|
39
|
+
var import_chunk_MLTMKT3L = require("./chunk-MLTMKT3L.js");
|
|
40
40
|
var import_chunk_YNDZCLVL = require("./chunk-YNDZCLVL.js");
|
|
41
41
|
var import_chunk_LMVSIVKQ = require("./chunk-LMVSIVKQ.js");
|
|
42
42
|
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
|
@@ -59,7 +59,7 @@ ${detailsHeader} ${message}`;
|
|
|
59
59
|
}).exhaustive();
|
|
60
60
|
const errorMessageWithContext = `${constructedErrorMessage}
|
|
61
61
|
[Context: getDmmf]`;
|
|
62
|
-
super((0,
|
|
62
|
+
super((0, import_chunk_MLTMKT3L.addVersionDetailsToErrorMessage)(errorMessageWithContext));
|
|
63
63
|
this.name = "GetDmmfError";
|
|
64
64
|
}
|
|
65
65
|
};
|
|
@@ -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_TPCPXGC5_exports = {};
|
|
30
|
+
__export(chunk_TPCPXGC5_exports, {
|
|
31
31
|
createSchemaPathInput: () => createSchemaPathInput,
|
|
32
32
|
getCliProvidedSchemaFile: () => getCliProvidedSchemaFile,
|
|
33
33
|
getConfigProvidedSchemaFile: () => getConfigProvidedSchemaFile,
|
|
@@ -35,7 +35,7 @@ __export(chunk_2BXDHSSY_exports, {
|
|
|
35
35
|
getSchemaWithPathOptional: () => getSchemaWithPathOptional,
|
|
36
36
|
printSchemaLoadedMessage: () => printSchemaLoadedMessage
|
|
37
37
|
});
|
|
38
|
-
module.exports = __toCommonJS(
|
|
38
|
+
module.exports = __toCommonJS(chunk_TPCPXGC5_exports);
|
|
39
39
|
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
|
40
40
|
var import_debug = require("@prisma/debug");
|
|
41
41
|
var import_schema_files_loader = require("@prisma/schema-files-loader");
|
|
@@ -157,7 +157,7 @@ function renderDefaultLookupError(error, cwd) {
|
|
|
157
157
|
const parts = [
|
|
158
158
|
`Could not find Prisma Schema that is required for this command.`,
|
|
159
159
|
`You can either provide it with ${(0, import_chunk_PG5FDKSF.green)("`--schema`")} argument,`,
|
|
160
|
-
`set it in your Prisma Config file (e.g., ${(0, import_chunk_PG5FDKSF.green)("`
|
|
160
|
+
`set it in your Prisma Config file (e.g., ${(0, import_chunk_PG5FDKSF.green)("`prisma7.config.ts`")}),`,
|
|
161
161
|
`set it as ${(0, import_chunk_PG5FDKSF.green)("`prisma.schema`")} in your ${(0, import_chunk_PG5FDKSF.green)("package.json")},`,
|
|
162
162
|
`or put it into the default location (${(0, import_chunk_PG5FDKSF.green)("`./prisma/schema.prisma`")}, or ${(0, import_chunk_PG5FDKSF.green)("`./schema.prisma`")}.`,
|
|
163
163
|
"Checked following paths:\n"
|
|
@@ -190,7 +190,7 @@ async function getConfigProvidedSchemaFile(schemaPathFromConfig) {
|
|
|
190
190
|
const schemaResult = await readSchemaFromFileOrDirectory(schemaPathFromConfig);
|
|
191
191
|
if (!schemaResult.ok) {
|
|
192
192
|
throw new Error(
|
|
193
|
-
`Could not load schema from \`${schemaPathFromConfig}\` provided by
|
|
193
|
+
`Could not load schema from \`${schemaPathFromConfig}\` provided by the Prisma config file: ${renderLookupError(
|
|
194
194
|
schemaResult.error
|
|
195
195
|
)}`
|
|
196
196
|
);
|
|
@@ -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_VUGB2H7M_exports = {};
|
|
30
|
+
__export(chunk_VUGB2H7M_exports, {
|
|
31
31
|
checkUnsupportedDataProxy: () => checkUnsupportedDataProxy,
|
|
32
32
|
forbiddenCmdWithDataProxyFlagMessage: () => forbiddenCmdWithDataProxyFlagMessage,
|
|
33
33
|
formatSchema: () => formatSchema,
|
|
@@ -40,13 +40,13 @@ __export(chunk_K6JDZUN2_exports, {
|
|
|
40
40
|
processSchemaResult: () => processSchemaResult,
|
|
41
41
|
skipIndex: () => skipIndex
|
|
42
42
|
});
|
|
43
|
-
module.exports = __toCommonJS(
|
|
43
|
+
module.exports = __toCommonJS(chunk_VUGB2H7M_exports);
|
|
44
44
|
var import_chunk_X77CS5RK = require("./chunk-X77CS5RK.js");
|
|
45
45
|
var import_chunk_DZ4QWHTB = require("./chunk-DZ4QWHTB.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_5FJ3MENK = require("./chunk-5FJ3MENK.js");
|
|
49
|
-
var
|
|
49
|
+
var import_chunk_WFMA7DI5 = require("./chunk-WFMA7DI5.js");
|
|
50
50
|
var import_chunk_GXW4NTU2 = require("./chunk-GXW4NTU2.js");
|
|
51
51
|
var import_chunk_BGMZPA2F = require("./chunk-BGMZPA2F.js");
|
|
52
52
|
var import_chunk_I6WLABB2 = require("./chunk-I6WLABB2.js");
|
|
@@ -54,7 +54,7 @@ var import_chunk_3IMRWXIL = require("./chunk-3IMRWXIL.js");
|
|
|
54
54
|
var import_chunk_R47SFJ5Z = require("./chunk-R47SFJ5Z.js");
|
|
55
55
|
var import_chunk_QBNYSYZK = require("./chunk-QBNYSYZK.js");
|
|
56
56
|
var import_chunk_XAAVALN7 = require("./chunk-XAAVALN7.js");
|
|
57
|
-
var
|
|
57
|
+
var import_chunk_TPCPXGC5 = require("./chunk-TPCPXGC5.js");
|
|
58
58
|
var import_chunk_5BDP445D = require("./chunk-5BDP445D.js");
|
|
59
59
|
var import_chunk_ZJWZK45Z = require("./chunk-ZJWZK45Z.js");
|
|
60
60
|
var import_chunk_2B26F5N3 = require("./chunk-2B26F5N3.js");
|
|
@@ -135,10 +135,10 @@ async function loadSchemaContext({ schemaPath, printLoadMessage, allowNull, sche
|
|
|
135
135
|
}) {
|
|
136
136
|
let schemaResult = null;
|
|
137
137
|
if (allowNull) {
|
|
138
|
-
schemaResult = await (0,
|
|
138
|
+
schemaResult = await (0, import_chunk_TPCPXGC5.getSchemaWithPathOptional)({ schemaPath, cwd, argumentName: schemaPathArgumentName });
|
|
139
139
|
if (!schemaResult) return null;
|
|
140
140
|
} else {
|
|
141
|
-
schemaResult = await (0,
|
|
141
|
+
schemaResult = await (0, import_chunk_TPCPXGC5.getSchemaWithPath)({ schemaPath, cwd, argumentName: schemaPathArgumentName });
|
|
142
142
|
}
|
|
143
143
|
return processSchemaResult({ schemaResult, printLoadMessage, cwd });
|
|
144
144
|
}
|
|
@@ -150,7 +150,7 @@ async function processSchemaResult({
|
|
|
150
150
|
const loadedFromPathForLogMessages = import_node_path.default.relative(cwd, schemaResult.schemaPath);
|
|
151
151
|
const schemaRootDir = schemaResult.schemaRootDir || cwd;
|
|
152
152
|
if (printLoadMessage) {
|
|
153
|
-
(0,
|
|
153
|
+
(0, import_chunk_TPCPXGC5.printSchemaLoadedMessage)(loadedFromPathForLogMessages);
|
|
154
154
|
}
|
|
155
155
|
const configFromPsl = await (0, import_chunk_3IMRWXIL.getConfig)({ datamodel: schemaResult.schemas });
|
|
156
156
|
const primaryDatasource = configFromPsl.datasources.at(0);
|
|
@@ -209,9 +209,9 @@ async function getGenerators(options) {
|
|
|
209
209
|
const dmmf = await (0, import_chunk_R47SFJ5Z.getDMMF)({ datamodel: schemaContext.schemaFiles });
|
|
210
210
|
if (dmmf.datamodel.models.length === 0 && !allowNoModels) {
|
|
211
211
|
if (schemaContext.primaryDatasource.provider === "mongodb") {
|
|
212
|
-
throw new Error(
|
|
212
|
+
throw new Error((0, import_chunk_WFMA7DI5.missingModelMessageMongoDB)(options.cliCommand));
|
|
213
213
|
}
|
|
214
|
-
throw new Error(
|
|
214
|
+
throw new Error((0, import_chunk_WFMA7DI5.missingModelMessage)(options.cliCommand));
|
|
215
215
|
}
|
|
216
216
|
const generatorConfigs = filterGenerators(overrideGenerators || schemaContext.generators, generatorNames);
|
|
217
217
|
await validateGenerators(generatorConfigs);
|
|
@@ -422,17 +422,17 @@ function filterGenerators(generators, generatorNames) {
|
|
|
422
422
|
}
|
|
423
423
|
return filtered;
|
|
424
424
|
}
|
|
425
|
-
var forbiddenCmdWithDataProxyFlagMessage = (
|
|
426
|
-
Using an Accelerate URL is not supported for this CLI command ${(0, import_chunk_PG5FDKSF.green)(
|
|
427
|
-
Please use a direct connection to your database in \`
|
|
425
|
+
var forbiddenCmdWithDataProxyFlagMessage = (command) => `
|
|
426
|
+
Using an Accelerate URL is not supported for this CLI command ${(0, import_chunk_PG5FDKSF.green)(command)} yet.
|
|
427
|
+
Please use a direct connection to your database in \`prisma7.config.ts\`.
|
|
428
428
|
|
|
429
429
|
More information about this limitation: ${(0, import_chunk_I6WLABB2.link)("https://pris.ly/d/accelerate-limitations")}
|
|
430
430
|
`;
|
|
431
431
|
function checkUnsupportedDataProxy({
|
|
432
|
-
|
|
432
|
+
command,
|
|
433
433
|
validatedConfig
|
|
434
434
|
}) {
|
|
435
435
|
if (validatedConfig.datasource.url.startsWith("prisma://")) {
|
|
436
|
-
throw new Error(forbiddenCmdWithDataProxyFlagMessage(
|
|
436
|
+
throw new Error(forbiddenCmdWithDataProxyFlagMessage(command));
|
|
437
437
|
}
|
|
438
438
|
}
|