@prisma/internals 7.3.0-integration-prisma6-fix-cloudflare-engine.3 → 7.3.0-integration-engines-7-3-0-10-fix-fix-mapped-enum-issue-0b7e6564db7dc3dac7f9312aa84e9ed81d805521.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-EYVG6XQS.js → chunk-2BXDHSSY.js} +56 -68
- package/dist/{chunk-GMW36QQF.js → chunk-2GPDFPDR.js} +7 -7
- package/dist/{chunk-656EKQL7.js → chunk-334ZBKRR.js} +5 -5
- package/dist/{chunk-OPLMJ5WZ.js → chunk-3PNJ6ZQE.js} +58 -146
- package/dist/{chunk-LYFOJ5NK.js → chunk-3U4QB2G3.js} +4 -6
- package/dist/{chunk-5TXBB44O.js → chunk-4A2DO32A.js} +11 -11
- package/dist/{chunk-QPQF4VGD.js → chunk-4UM3NWZ3.js} +12 -12
- package/dist/{chunk-TQFONRJP.js → chunk-5BRXEOYH.js} +5 -5
- package/dist/{chunk-RS2R7COT.js → chunk-5I4ERIIY.js} +3 -9
- package/dist/{chunk-DGNPNS5E.js → chunk-5X46R434.js} +13 -13
- package/dist/{chunk-T2KHWQCJ.js → chunk-6ZQTRCHC.js} +12 -12
- package/dist/{chunk-W6J5YFD2.js → chunk-7IBWXVWK.js} +5 -5
- package/dist/{chunk-WFNB7VRA.js → chunk-ARC7TW3L.js} +4 -14
- package/dist/{chunk-QLOP3Z4E.js → chunk-AYPKO22A.js} +16 -38
- package/dist/{chunk-BVJP43JS.js → chunk-BXIKQUP5.js} +7 -7
- package/dist/{chunk-AX5N26KG.js → chunk-CQVWHHIJ.js} +11 -6
- package/dist/{chunk-FYZCPL2Z.js → chunk-DQWKFZPY.js} +4 -7
- package/dist/{chunk-7QC5VORA.js → chunk-DXWYZA7B.js} +3 -4
- package/dist/{chunk-WDPDHAFW.js → chunk-ECN6H47Y.js} +5 -5
- package/dist/{chunk-F2OZV76L.js → chunk-GH2WAX5Y.js} +7 -7
- package/dist/{chunk-4CGPN5SR.js → chunk-GJSFP4V4.js} +3 -9
- package/dist/{chunk-UOUZG6WG.js → chunk-IAKPRMGI.js} +5 -5
- package/dist/{chunk-THADADEM.js → chunk-JB7YT5XG.js} +7 -9
- package/dist/{chunk-4JCVHBYR.js → chunk-KAH2NIWC.js} +6 -6
- package/dist/{chunk-262R2PBW.js → chunk-KOBX6GKI.js} +5 -5
- package/dist/{chunk-5HT4F7QV.js → chunk-MOW746GL.js} +5 -5
- package/dist/{chunk-BCQZ6JQE.js → chunk-NBWRGVYR.js} +4 -6
- package/dist/{chunk-UQUWZJVN.js → chunk-NYNXYKR4.js} +7 -7
- package/dist/{chunk-UQQPN22O.js → chunk-OVRS2CD6.js} +16 -38
- package/dist/{chunk-Q2EPFAR2.js → chunk-P3F2U57W.js} +58 -146
- package/dist/{chunk-JMUOROWG.js → chunk-PRGRB27V.js} +5 -5
- package/dist/{chunk-75BIJ5PX.js → chunk-Q5XW7CMJ.js} +9 -9
- package/dist/{chunk-OAT7ZJED.js → chunk-Q75TMXCR.js} +7 -20
- package/dist/{chunk-ROGQXXQA.js → chunk-QDIUK75K.js} +8 -10
- package/dist/chunk-QKQKSUQO.js +46 -0
- package/dist/{chunk-FCYHZHVW.js → chunk-R3J2O23S.js} +4 -4
- package/dist/{chunk-OSHZ4P3G.js → chunk-SP2ETLT2.js} +5 -5
- package/dist/{chunk-E2QTLJH5.js → chunk-SZXZZWNK.js} +13 -13
- package/dist/{chunk-DFIP5FHB.js → chunk-T7XMJ6KH.js} +5 -5
- package/dist/{chunk-KH7FI42S.js → chunk-VPLQF2ZV.js} +11 -11
- package/dist/{chunk-TZJROXB3.js → chunk-WSZXPLJQ.js} +4 -4
- package/dist/{chunk-UHI6VYFX.js → chunk-YJVCIN4F.js} +16 -14
- package/dist/{chunk-JOIIWB3U.js → chunk-YV4IFLW4.js} +128 -129
- package/dist/{chunk-HFFWZTVM.js → chunk-YXCPS3WU.js} +5 -15
- package/dist/cli/checkUnsupportedDataProxy.d.ts +7 -9
- package/dist/cli/checkUnsupportedDataProxy.js +53 -65
- package/dist/cli/directoryConfig.d.ts +5 -2
- package/dist/cli/directoryConfig.js +2 -2
- package/dist/cli/getGeneratorSuccessMessage.js +2 -3
- package/dist/cli/getSchema.d.ts +28 -20
- package/dist/cli/getSchema.js +7 -5
- package/dist/cli/hashes.d.ts +2 -1
- package/dist/cli/hashes.js +4 -4
- package/dist/cli/schemaContext.d.ts +5 -22
- package/dist/cli/schemaContext.js +54 -65
- package/dist/cli/types.d.ts +1 -1
- package/dist/convertCredentials.js +4 -4
- package/dist/engine-commands/errorHelpers.js +4 -4
- package/dist/engine-commands/formatSchema.js +52 -64
- package/dist/engine-commands/getConfig.d.ts +1 -5
- package/dist/engine-commands/getConfig.js +10 -13
- package/dist/engine-commands/getDmmf.js +10 -10
- package/dist/engine-commands/getEngineVersion.js +5 -9
- package/dist/engine-commands/getEnginesInfo.d.ts +0 -1
- package/dist/engine-commands/getEnginesInfo.js +6 -9
- package/dist/engine-commands/index.d.ts +1 -1
- package/dist/engine-commands/index.js +62 -76
- package/dist/engine-commands/lintSchema.js +9 -9
- package/dist/engine-commands/mergeSchemas.js +10 -10
- package/dist/engine-commands/queryEngineCommons.js +6 -6
- package/dist/engine-commands/validate.js +10 -10
- package/dist/get-generators/getGenerators.d.ts +0 -2
- package/dist/get-generators/getGenerators.js +55 -67
- package/dist/get-generators/utils/binaryTypeToEngineType.js +2 -2
- package/dist/get-generators/utils/engineTypeToBinaryType.js +2 -2
- package/dist/get-generators/utils/getBinaryPathsByVersion.js +4 -4
- package/dist/getPackedPackage.js +3 -3
- package/dist/index.d.ts +5 -19
- package/dist/index.js +99 -125
- package/dist/resolveBinary.js +7 -7
- package/dist/schemaEngineCommands.js +8 -8
- package/dist/sendPanic.js +2 -3
- package/dist/types.d.ts +15 -0
- package/dist/utils/canPrompt.js +3 -3
- package/dist/utils/fs-functional.js +10 -10
- package/dist/utils/fs-utils.js +8 -8
- package/dist/utils/getVersionFromPackageJson.js +3 -3
- package/dist/utils/handlePanic.js +6 -7
- package/dist/utils/missingDatasource.js +2 -2
- package/dist/utils/missingGeneratorMessage.js +4 -4
- package/dist/utils/toSchemasContainer.d.ts +1 -1
- package/dist/utils/toSchemasContainer.js +3 -3
- package/dist/utils/validatePrismaConfigWithDatasource.d.ts +17 -0
- package/dist/utils/{handleEngineLoadingErrors.js → validatePrismaConfigWithDatasource.js} +7 -6
- package/dist/wasm.js +5 -5
- package/package.json +15 -17
- package/dist/chunk-3FP46GUV.js +0 -471
- package/dist/chunk-46ABODUM.js +0 -186
- package/dist/chunk-6TTRTZXU.js +0 -37
- package/dist/chunk-D4VDA2TZ.js +0 -66
- package/dist/chunk-DZYINYAA.js +0 -68
- package/dist/chunk-ERSH2BQA.js +0 -58
- package/dist/chunk-HO5HRHFZ.js +0 -30
- package/dist/chunk-HW5RCZSE.js +0 -1
- package/dist/chunk-KDHESRKE.js +0 -49
- package/dist/chunk-L6KOIJJ5.js +0 -125
- package/dist/chunk-PZMRR772.js +0 -41
- package/dist/chunk-RFB2U4GQ.js +0 -41
- package/dist/chunk-T2PM5TKT.js +0 -55
- package/dist/cli/checkUnsupportedSchemaEngineWasm.d.ts +0 -22
- package/dist/cli/checkUnsupportedSchemaEngineWasm.js +0 -135
- package/dist/client/getClientEngineType.d.ts +0 -7
- package/dist/client/getClientEngineType.js +0 -26
- package/dist/dotenvExpand.d.ts +0 -35
- package/dist/dotenvExpand.js +0 -25
- package/dist/tracing/types.d.ts +0 -54
- package/dist/tracing/types.js +0 -2
- package/dist/utils/__tests__/maskSchema.test.js +0 -23
- package/dist/utils/byline.d.ts +0 -4
- package/dist/utils/byline.js +0 -28
- package/dist/utils/cloudflareD1.d.ts +0 -5
- package/dist/utils/cloudflareD1.js +0 -27
- package/dist/utils/getEnvPaths.d.ts +0 -14
- package/dist/utils/getEnvPaths.js +0 -29
- package/dist/utils/getMigrateConfigDir.d.ts +0 -2
- package/dist/utils/getMigrateConfigDir.js +0 -25
- package/dist/utils/handleEngineLoadingErrors.d.ts +0 -8
- package/dist/utils/load.d.ts +0 -6
- package/dist/utils/load.js +0 -28
- package/dist/utils/loadEnvFile.d.ts +0 -10
- package/dist/utils/loadEnvFile.js +0 -30
- package/dist/utils/maskSchema.d.ts +0 -4
- package/dist/utils/maskSchema.js +0 -27
- package/dist/utils/serializeQueryEngineName.d.ts +0 -4
- package/dist/utils/serializeQueryEngineName.js +0 -25
- package/dist/utils/tryLoadEnvs.d.ts +0 -25
- package/dist/utils/tryLoadEnvs.js +0 -30
|
@@ -26,83 +26,58 @@ 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_P3F2U57W_exports = {};
|
|
30
|
+
__export(chunk_P3F2U57W_exports, {
|
|
31
31
|
checkUnsupportedDataProxy: () => checkUnsupportedDataProxy,
|
|
32
|
-
checkUnsupportedSchemaEngineWasm: () => checkUnsupportedSchemaEngineWasm,
|
|
33
|
-
forbiddenCmdFlagWithSchemaEngineWasm: () => forbiddenCmdFlagWithSchemaEngineWasm,
|
|
34
32
|
forbiddenCmdWithDataProxyFlagMessage: () => forbiddenCmdWithDataProxyFlagMessage,
|
|
35
33
|
formatSchema: () => formatSchema,
|
|
36
34
|
getBinaryTargetForCurrentPlatform: () => import_get_platform2.getBinaryTargetForCurrentPlatform,
|
|
37
35
|
getGenerator: () => getGenerator,
|
|
38
36
|
getGenerators: () => getGenerators,
|
|
39
|
-
|
|
37
|
+
getSchemaDatasourceProvider: () => getSchemaDatasourceProvider,
|
|
40
38
|
knownBinaryTargets: () => knownBinaryTargets,
|
|
41
39
|
loadSchemaContext: () => loadSchemaContext,
|
|
42
40
|
processSchemaResult: () => processSchemaResult,
|
|
43
41
|
skipIndex: () => skipIndex
|
|
44
42
|
});
|
|
45
|
-
module.exports = __toCommonJS(
|
|
43
|
+
module.exports = __toCommonJS(chunk_P3F2U57W_exports);
|
|
44
|
+
var import_chunk_X77CS5RK = require("./chunk-X77CS5RK.js");
|
|
45
|
+
var import_chunk_GH2WAX5Y = require("./chunk-GH2WAX5Y.js");
|
|
46
46
|
var import_chunk_X3P4J7WW = require("./chunk-X3P4J7WW.js");
|
|
47
47
|
var import_chunk_LRU47BGE = require("./chunk-LRU47BGE.js");
|
|
48
|
-
var import_chunk_X77CS5RK = require("./chunk-X77CS5RK.js");
|
|
49
|
-
var import_chunk_F2OZV76L = require("./chunk-F2OZV76L.js");
|
|
50
|
-
var import_chunk_RS2R7COT = require("./chunk-RS2R7COT.js");
|
|
51
48
|
var import_chunk_GXW4NTU2 = require("./chunk-GXW4NTU2.js");
|
|
52
49
|
var import_chunk_5FJ3MENK = require("./chunk-5FJ3MENK.js");
|
|
53
|
-
var
|
|
54
|
-
var
|
|
55
|
-
var import_chunk_46ABODUM = require("./chunk-46ABODUM.js");
|
|
50
|
+
var import_chunk_DXWYZA7B = require("./chunk-DXWYZA7B.js");
|
|
51
|
+
var import_chunk_CQVWHHIJ = require("./chunk-CQVWHHIJ.js");
|
|
56
52
|
var import_chunk_I6WLABB2 = require("./chunk-I6WLABB2.js");
|
|
57
53
|
var import_chunk_CRVLHWC5 = require("./chunk-CRVLHWC5.js");
|
|
58
|
-
var
|
|
59
|
-
var
|
|
60
|
-
var
|
|
61
|
-
var
|
|
62
|
-
var
|
|
63
|
-
var
|
|
64
|
-
var import_chunk_ZJWZK45Z = require("./chunk-ZJWZK45Z.js");
|
|
54
|
+
var import_chunk_334ZBKRR = require("./chunk-334ZBKRR.js");
|
|
55
|
+
var import_chunk_VPLQF2ZV = require("./chunk-VPLQF2ZV.js");
|
|
56
|
+
var import_chunk_OVRS2CD6 = require("./chunk-OVRS2CD6.js");
|
|
57
|
+
var import_chunk_6ZQTRCHC = require("./chunk-6ZQTRCHC.js");
|
|
58
|
+
var import_chunk_KOBX6GKI = require("./chunk-KOBX6GKI.js");
|
|
59
|
+
var import_chunk_2BXDHSSY = require("./chunk-2BXDHSSY.js");
|
|
65
60
|
var import_chunk_2B26F5N3 = require("./chunk-2B26F5N3.js");
|
|
66
61
|
var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
|
|
67
62
|
var import_chunk_LMVSIVKQ = require("./chunk-LMVSIVKQ.js");
|
|
68
63
|
var import_chunk_BPDMLM32 = require("./chunk-BPDMLM32.js");
|
|
69
64
|
var import_chunk_IOIAK7V7 = require("./chunk-IOIAK7V7.js");
|
|
65
|
+
var import_chunk_BXIKQUP5 = require("./chunk-BXIKQUP5.js");
|
|
66
|
+
var import_chunk_ZJWZK45Z = require("./chunk-ZJWZK45Z.js");
|
|
70
67
|
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
|
71
|
-
var import_chunk_BVJP43JS = require("./chunk-BVJP43JS.js");
|
|
72
68
|
var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
|
|
73
|
-
var
|
|
69
|
+
var import_node_path = __toESM(require("node:path"));
|
|
74
70
|
var import_debug = __toESM(require("@prisma/debug"));
|
|
75
71
|
var import_debug2 = __toESM(require("@prisma/debug"));
|
|
76
72
|
var import_engines = require("@prisma/engines");
|
|
77
73
|
var import_get_platform = require("@prisma/get-platform");
|
|
78
|
-
var
|
|
74
|
+
var import_path = __toESM(require("path"));
|
|
79
75
|
var import_get_platform2 = require("@prisma/get-platform");
|
|
80
|
-
var forbiddenCmdFlagWithSchemaEngineWasm = ({ cmd, flag }) => `
|
|
81
|
-
Passing the ${(0, import_chunk_PG5FDKSF.green)(`${flag}`)} flag to the ${(0, import_chunk_PG5FDKSF.green)(`prisma ${cmd}`)} command is not supported when
|
|
82
|
-
defining an ${(0, import_chunk_PG5FDKSF.green)(`adapter`)} in Prisma config file (e.g., ${(0, import_chunk_PG5FDKSF.green)(`\`prisma.config.ts\``)}).
|
|
83
|
-
|
|
84
|
-
More information about this limitation: ${(0, import_chunk_I6WLABB2.link)("https://pris.ly/d/schema-engine-limitations")}
|
|
85
|
-
`;
|
|
86
|
-
function checkUnsupportedSchemaEngineWasm({
|
|
87
|
-
cmd,
|
|
88
|
-
config,
|
|
89
|
-
args,
|
|
90
|
-
flags
|
|
91
|
-
}) {
|
|
92
|
-
if (config.engine !== "js") {
|
|
93
|
-
return;
|
|
94
|
-
}
|
|
95
|
-
for (const flag of flags) {
|
|
96
|
-
if (args[flag] !== void 0) {
|
|
97
|
-
throw new Error(forbiddenCmdFlagWithSchemaEngineWasm({ cmd, flag }));
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
76
|
var debug = (0, import_debug.default)("prisma:format");
|
|
102
77
|
async function formatSchema({ schemas }, inputFormattingOptions) {
|
|
103
78
|
if (process.env.FORCE_PANIC_PRISMA_SCHEMA) {
|
|
104
79
|
handleFormatPanic(() => {
|
|
105
|
-
|
|
80
|
+
import_chunk_KOBX6GKI.prismaSchemaWasm.debug_panic();
|
|
106
81
|
});
|
|
107
82
|
}
|
|
108
83
|
const defaultFormattingOptions = {
|
|
@@ -119,10 +94,10 @@ async function formatSchema({ schemas }, inputFormattingOptions) {
|
|
|
119
94
|
const { formattedMultipleSchemas, lintDiagnostics } = handleFormatPanic(() => {
|
|
120
95
|
const formattedMultipleSchemasRaw = formatWasm(JSON.stringify(schemas), documentFormattingParams);
|
|
121
96
|
const formattedMultipleSchemas2 = JSON.parse(formattedMultipleSchemasRaw);
|
|
122
|
-
const lintDiagnostics2 = (0,
|
|
97
|
+
const lintDiagnostics2 = (0, import_chunk_334ZBKRR.lintSchema)({ schemas: formattedMultipleSchemas2 });
|
|
123
98
|
return { formattedMultipleSchemas: formattedMultipleSchemas2, lintDiagnostics: lintDiagnostics2 };
|
|
124
99
|
});
|
|
125
|
-
const lintWarnings = (0,
|
|
100
|
+
const lintWarnings = (0, import_chunk_334ZBKRR.getLintWarningsAsText)(lintDiagnostics);
|
|
126
101
|
if (lintWarnings && import_chunk_ZJWZK45Z.logger_exports.should.warn()) {
|
|
127
102
|
console.warn(lintWarnings);
|
|
128
103
|
}
|
|
@@ -149,60 +124,37 @@ function handleFormatPanic(tryCb) {
|
|
|
149
124
|
}
|
|
150
125
|
}
|
|
151
126
|
function formatWasm(schema, documentFormattingParams) {
|
|
152
|
-
const formattedSchema =
|
|
127
|
+
const formattedSchema = import_chunk_KOBX6GKI.prismaSchemaWasm.format(schema, JSON.stringify(documentFormattingParams));
|
|
153
128
|
return formattedSchema;
|
|
154
129
|
}
|
|
155
|
-
async function loadSchemaContext({
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
schemaPathArgumentName = "--schema",
|
|
163
|
-
cwd = process.cwd()
|
|
164
|
-
} = {}) {
|
|
130
|
+
async function loadSchemaContext({ schemaPath, printLoadMessage, allowNull, schemaPathArgumentName, cwd } = {
|
|
131
|
+
schemaPath: { baseDir: process.cwd() },
|
|
132
|
+
printLoadMessage: true,
|
|
133
|
+
allowNull: false,
|
|
134
|
+
schemaPathArgumentName: "--schema",
|
|
135
|
+
cwd: process.cwd()
|
|
136
|
+
}) {
|
|
165
137
|
let schemaResult = null;
|
|
166
138
|
if (allowNull) {
|
|
167
|
-
schemaResult = await (0,
|
|
168
|
-
argumentName: schemaPathArgumentName,
|
|
169
|
-
cwd
|
|
170
|
-
});
|
|
139
|
+
schemaResult = await (0, import_chunk_2BXDHSSY.getSchemaWithPathOptional)({ schemaPath, cwd, argumentName: schemaPathArgumentName });
|
|
171
140
|
if (!schemaResult) return null;
|
|
172
141
|
} else {
|
|
173
|
-
schemaResult = await (0,
|
|
174
|
-
argumentName: schemaPathArgumentName,
|
|
175
|
-
cwd
|
|
176
|
-
});
|
|
142
|
+
schemaResult = await (0, import_chunk_2BXDHSSY.getSchemaWithPath)({ schemaPath, cwd, argumentName: schemaPathArgumentName });
|
|
177
143
|
}
|
|
178
|
-
return processSchemaResult({ schemaResult,
|
|
144
|
+
return processSchemaResult({ schemaResult, printLoadMessage, cwd });
|
|
179
145
|
}
|
|
180
146
|
async function processSchemaResult({
|
|
181
147
|
schemaResult,
|
|
182
|
-
schemaEngineConfig,
|
|
183
148
|
printLoadMessage = true,
|
|
184
|
-
ignoreEnvVarErrors = false,
|
|
185
149
|
cwd = process.cwd()
|
|
186
150
|
}) {
|
|
187
|
-
const loadedFromPathForLogMessages =
|
|
151
|
+
const loadedFromPathForLogMessages = import_node_path.default.relative(cwd, schemaResult.schemaPath);
|
|
188
152
|
const schemaRootDir = schemaResult.schemaRootDir || cwd;
|
|
189
153
|
if (printLoadMessage) {
|
|
190
|
-
(0,
|
|
154
|
+
(0, import_chunk_2BXDHSSY.printSchemaLoadedMessage)(loadedFromPathForLogMessages);
|
|
191
155
|
}
|
|
192
|
-
const configFromPsl = await (0,
|
|
193
|
-
const
|
|
194
|
-
const primaryDatasource = (0, import_chunk_XKZ6CBLA.z)(schemaEngineConfig).with({ engine: "classic" }, ({ datasource }) => {
|
|
195
|
-
const { url, directUrl, shadowDatabaseUrl } = datasource;
|
|
196
|
-
const primaryDatasource2 = {
|
|
197
|
-
...datasourceFromPsl,
|
|
198
|
-
url: { fromEnvVar: null, value: url },
|
|
199
|
-
directUrl: directUrl ? { fromEnvVar: null, value: directUrl } : void 0,
|
|
200
|
-
shadowDatabaseUrl: shadowDatabaseUrl ? { fromEnvVar: null, value: shadowDatabaseUrl } : void 0,
|
|
201
|
-
[Symbol.for("engine.classic")]: true
|
|
202
|
-
};
|
|
203
|
-
return primaryDatasource2;
|
|
204
|
-
}).otherwise(() => datasourceFromPsl);
|
|
205
|
-
const primaryDatasourceDirectory = getPrimaryDatasourceDirectory(datasourceFromPsl) || schemaRootDir;
|
|
156
|
+
const configFromPsl = await (0, import_chunk_OVRS2CD6.getConfig)({ datamodel: schemaResult.schemas });
|
|
157
|
+
const primaryDatasource = configFromPsl.datasources.at(0);
|
|
206
158
|
return {
|
|
207
159
|
schemaFiles: schemaResult.schemas,
|
|
208
160
|
schemaPath: schemaResult.schemaPath,
|
|
@@ -210,19 +162,17 @@ async function processSchemaResult({
|
|
|
210
162
|
datasources: configFromPsl.datasources,
|
|
211
163
|
generators: configFromPsl.generators,
|
|
212
164
|
primaryDatasource,
|
|
213
|
-
primaryDatasourceDirectory,
|
|
214
165
|
warnings: configFromPsl.warnings,
|
|
215
166
|
loadedFromPathForLogMessages
|
|
216
167
|
};
|
|
217
168
|
}
|
|
218
|
-
function
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
return import_path.default.dirname(datasourcePath);
|
|
169
|
+
function getSchemaDatasourceProvider(schemaContext) {
|
|
170
|
+
if (schemaContext.primaryDatasource === void 0) {
|
|
171
|
+
throw new Error("Schema must contain a datasource block");
|
|
222
172
|
}
|
|
223
|
-
return
|
|
173
|
+
return schemaContext.primaryDatasource.activeProvider;
|
|
224
174
|
}
|
|
225
|
-
var import_p_map = (0, import_chunk_4VNS5WPM.__toESM)((0,
|
|
175
|
+
var import_p_map = (0, import_chunk_4VNS5WPM.__toESM)((0, import_chunk_BXIKQUP5.require_p_map)());
|
|
226
176
|
var debug2 = (0, import_debug2.default)("prisma:getGenerators");
|
|
227
177
|
async function getGenerators(options) {
|
|
228
178
|
if (options.registry === void 0 && options.providerAliases !== void 0) {
|
|
@@ -246,29 +196,27 @@ async function getGenerators(options) {
|
|
|
246
196
|
skipDownload,
|
|
247
197
|
binaryPathsOverride,
|
|
248
198
|
generatorNames = [],
|
|
249
|
-
postinstall,
|
|
250
|
-
noEngine,
|
|
251
199
|
allowNoModels = true,
|
|
252
200
|
typedSql
|
|
253
201
|
} = options;
|
|
254
|
-
const schemaContext = !options.schemaContext && schemaPath ? await loadSchemaContext({
|
|
202
|
+
const schemaContext = !options.schemaContext && schemaPath ? await loadSchemaContext({ schemaPath: { cliProvidedPath: schemaPath } }) : options.schemaContext;
|
|
255
203
|
if (!schemaContext) {
|
|
256
204
|
throw new Error(`no schema provided for getGenerators`);
|
|
257
205
|
}
|
|
258
206
|
if (!schemaContext.primaryDatasource) {
|
|
259
|
-
throw new Error(
|
|
207
|
+
throw new Error(import_chunk_DXWYZA7B.missingDatasource);
|
|
260
208
|
}
|
|
261
209
|
(0, import_chunk_5FJ3MENK.printConfigWarnings)(schemaContext.warnings);
|
|
262
210
|
const previewFeatures = (0, import_chunk_CRVLHWC5.extractPreviewFeatures)(schemaContext.generators);
|
|
263
|
-
const dmmf = await (0,
|
|
211
|
+
const dmmf = await (0, import_chunk_6ZQTRCHC.getDMMF)({
|
|
264
212
|
datamodel: schemaContext.schemaFiles,
|
|
265
213
|
previewFeatures
|
|
266
214
|
});
|
|
267
215
|
if (dmmf.datamodel.models.length === 0 && !allowNoModels) {
|
|
268
216
|
if (schemaContext.primaryDatasource.provider === "mongodb") {
|
|
269
|
-
throw new Error(
|
|
217
|
+
throw new Error(import_chunk_CQVWHHIJ.missingModelMessageMongoDB);
|
|
270
218
|
}
|
|
271
|
-
throw new Error(
|
|
219
|
+
throw new Error(import_chunk_CQVWHHIJ.missingModelMessage);
|
|
272
220
|
}
|
|
273
221
|
const generatorConfigs = filterGenerators(overrideGenerators || schemaContext.generators, generatorNames);
|
|
274
222
|
await validateGenerators(generatorConfigs);
|
|
@@ -277,7 +225,7 @@ async function getGenerators(options) {
|
|
|
277
225
|
const generators = await (0, import_p_map.default)(
|
|
278
226
|
generatorConfigs,
|
|
279
227
|
async (generatorConfig, index) => {
|
|
280
|
-
const baseDir =
|
|
228
|
+
const baseDir = import_path.default.dirname(generatorConfig.sourceFilePath ?? schemaContext.schemaRootDir);
|
|
281
229
|
const providerValue = (0, import_chunk_IOIAK7V7.parseEnvValue)(generatorConfig.provider);
|
|
282
230
|
const generatorDefinition = registry[providerValue] ?? {
|
|
283
231
|
type: "rpc",
|
|
@@ -290,7 +238,7 @@ async function getGenerators(options) {
|
|
|
290
238
|
await generatorInstance.init();
|
|
291
239
|
if (generatorConfig.output) {
|
|
292
240
|
generatorConfig.output = {
|
|
293
|
-
value:
|
|
241
|
+
value: import_path.default.resolve(baseDir, (0, import_chunk_IOIAK7V7.parseEnvValue)(generatorConfig.output)),
|
|
294
242
|
fromEnvVar: null
|
|
295
243
|
};
|
|
296
244
|
generatorConfig.isCustomOutput = true;
|
|
@@ -311,8 +259,7 @@ You need to define \`output\` in the generator block in the schema file.`
|
|
|
311
259
|
fromEnvVar: null
|
|
312
260
|
};
|
|
313
261
|
}
|
|
314
|
-
const datamodel = (0,
|
|
315
|
-
const envPaths = await (0, import_chunk_46ABODUM.getEnvPaths)(schemaContext.schemaPath, { cwd: generatorConfig.output.value });
|
|
262
|
+
const datamodel = (0, import_chunk_VPLQF2ZV.mergeSchemas)({ schemas: schemaContext.schemaFiles });
|
|
316
263
|
const options2 = {
|
|
317
264
|
datamodel,
|
|
318
265
|
datasources: schemaContext.datasources,
|
|
@@ -323,10 +270,7 @@ You need to define \`output\` in the generator block in the schema file.`
|
|
|
323
270
|
// TODO:(schemaPath) can we get rid of schema path passing here?
|
|
324
271
|
version: version2 || import_engines.enginesVersion,
|
|
325
272
|
// this version makes no sense anymore and should be ignored
|
|
326
|
-
postinstall,
|
|
327
|
-
noEngine,
|
|
328
273
|
allowNoModels,
|
|
329
|
-
envPaths,
|
|
330
274
|
typedSql
|
|
331
275
|
};
|
|
332
276
|
generatorInstance.setOptions(options2);
|
|
@@ -370,18 +314,16 @@ generator gen {
|
|
|
370
314
|
}
|
|
371
315
|
const generatorBinaryTargets = g.options?.generator?.binaryTargets;
|
|
372
316
|
if (generatorBinaryTargets && generatorBinaryTargets.length > 0) {
|
|
373
|
-
for (const
|
|
374
|
-
if (!neededVersions[neededVersion].binaryTargets.find((object) => object.value ===
|
|
375
|
-
neededVersions[neededVersion].binaryTargets.push(
|
|
317
|
+
for (const binaryTarget of generatorBinaryTargets) {
|
|
318
|
+
if (!neededVersions[neededVersion].binaryTargets.find((object) => object.value === binaryTarget.value)) {
|
|
319
|
+
neededVersions[neededVersion].binaryTargets.push(binaryTarget);
|
|
376
320
|
}
|
|
377
321
|
}
|
|
378
322
|
}
|
|
379
323
|
}
|
|
380
324
|
}
|
|
381
|
-
const queryEngineBinaryType = (0, import_engines.getCliQueryEngineBinaryType)();
|
|
382
|
-
const queryEngineType = (0, import_chunk_RS2R7COT.binaryTypeToEngineType)(queryEngineBinaryType);
|
|
383
325
|
debug2("neededVersions", JSON.stringify(neededVersions, null, 2));
|
|
384
|
-
const { binaryPathsByVersion
|
|
326
|
+
const { binaryPathsByVersion } = await (0, import_chunk_GH2WAX5Y.getBinaryPathsByVersion)({
|
|
385
327
|
neededVersions,
|
|
386
328
|
// We're lazily computing the binary target here, to avoid printing the
|
|
387
329
|
// `Prisma failed to detect the libssl/openssl version to use` warning
|
|
@@ -402,17 +344,6 @@ generator gen {
|
|
|
402
344
|
const generatorBinaryPaths = (0, import_chunk_GXW4NTU2.pick)(binaryPaths ?? {}, generator.manifest.requiresEngines);
|
|
403
345
|
debug2({ generatorBinaryPaths });
|
|
404
346
|
generator.setBinaryPaths(generatorBinaryPaths);
|
|
405
|
-
if (engineVersion !== version2 && generator.options && generator.manifest.requiresEngines.includes(queryEngineType) && generatorBinaryPaths[queryEngineType] && generatorBinaryPaths[queryEngineType]?.[binaryTarget]) {
|
|
406
|
-
const customDmmf = await (0, import_chunk_T2KHWQCJ.getDMMF)({
|
|
407
|
-
datamodel: schemaContext.schemaFiles,
|
|
408
|
-
previewFeatures
|
|
409
|
-
});
|
|
410
|
-
const options2 = { ...generator.options, dmmf: customDmmf };
|
|
411
|
-
debug2("generator.manifest.prettyName", generator.manifest.prettyName);
|
|
412
|
-
debug2("options", options2);
|
|
413
|
-
debug2("options.generator.binaryTargets", options2.generator.binaryTargets);
|
|
414
|
-
generator.setOptions(options2);
|
|
415
|
-
}
|
|
416
347
|
}
|
|
417
348
|
}
|
|
418
349
|
return generators;
|
|
@@ -437,17 +368,6 @@ var oldToNewBinaryTargetsMapping = {
|
|
|
437
368
|
async function validateGenerators(generators) {
|
|
438
369
|
const binaryTarget = await (0, import_get_platform.getBinaryTargetForCurrentPlatform)();
|
|
439
370
|
for (const generator of generators) {
|
|
440
|
-
if (generator.config.platforms) {
|
|
441
|
-
throw new Error(
|
|
442
|
-
`The \`platforms\` field on the generator definition is deprecated. Please rename it to \`binaryTargets\`.`
|
|
443
|
-
);
|
|
444
|
-
}
|
|
445
|
-
if (generator.config.pinnedBinaryTargets) {
|
|
446
|
-
throw new Error(
|
|
447
|
-
`The \`pinnedBinaryTargets\` field on the generator definition is deprecated.
|
|
448
|
-
Please use the PRISMA_QUERY_ENGINE_BINARY env var instead to pin the binary target.`
|
|
449
|
-
);
|
|
450
|
-
}
|
|
451
371
|
if (generator.binaryTargets) {
|
|
452
372
|
const binaryTargets2 = generator.binaryTargets && generator.binaryTargets.length > 0 ? generator.binaryTargets : [{ fromEnvVar: null, value: "native" }];
|
|
453
373
|
const resolvedBinaryTargets = binaryTargets2.flatMap((object) => (0, import_chunk_IOIAK7V7.parseBinaryTargetsEnvValue)(object)).map((p) => p === "native" ? binaryTarget : p);
|
|
@@ -507,25 +427,17 @@ function filterGenerators(generators, generatorNames) {
|
|
|
507
427
|
}
|
|
508
428
|
return filtered;
|
|
509
429
|
}
|
|
510
|
-
var forbiddenCmdWithDataProxyFlagMessage = (
|
|
511
|
-
Using an Accelerate URL is not supported for this CLI command ${(0, import_chunk_PG5FDKSF.green)(`prisma ${
|
|
512
|
-
Please use a direct connection to your database
|
|
430
|
+
var forbiddenCmdWithDataProxyFlagMessage = (cmd) => `
|
|
431
|
+
Using an Accelerate URL is not supported for this CLI command ${(0, import_chunk_PG5FDKSF.green)(`prisma ${cmd}`)} yet.
|
|
432
|
+
Please use a direct connection to your database in \`prisma.config.ts\`.
|
|
513
433
|
|
|
514
434
|
More information about this limitation: ${(0, import_chunk_I6WLABB2.link)("https://pris.ly/d/accelerate-limitations")}
|
|
515
435
|
`;
|
|
516
436
|
function checkUnsupportedDataProxy({
|
|
517
437
|
cmd,
|
|
518
|
-
|
|
519
|
-
urls = []
|
|
438
|
+
validatedConfig
|
|
520
439
|
}) {
|
|
521
|
-
|
|
522
|
-
if (url2 && url2.includes("prisma://")) {
|
|
523
|
-
throw new Error(forbiddenCmdWithDataProxyFlagMessage(cmd));
|
|
524
|
-
}
|
|
525
|
-
}
|
|
526
|
-
if (!schemaContext?.primaryDatasource) return;
|
|
527
|
-
const url = (0, import_chunk_UQQPN22O.resolveUrl)((0, import_chunk_UQQPN22O.getEffectiveUrl)(schemaContext.primaryDatasource));
|
|
528
|
-
if (url?.startsWith("prisma://")) {
|
|
440
|
+
if (validatedConfig.datasource.url.startsWith("prisma://")) {
|
|
529
441
|
throw new Error(forbiddenCmdWithDataProxyFlagMessage(cmd));
|
|
530
442
|
}
|
|
531
443
|
}
|
|
@@ -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_PRGRB27V_exports = {};
|
|
20
|
+
__export(chunk_PRGRB27V_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_PRGRB27V_exports);
|
|
28
|
+
var import_chunk_T7XMJ6KH = require("./chunk-T7XMJ6KH.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_T7XMJ6KH.prismaSchemaWasm.lint(JSON.stringify(schemas));
|
|
33
33
|
const lintDiagnostics = JSON.parse(lintResult);
|
|
34
34
|
return lintDiagnostics;
|
|
35
35
|
}
|
|
@@ -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_Q5XW7CMJ_exports = {};
|
|
30
|
+
__export(chunk_Q5XW7CMJ_exports, {
|
|
31
31
|
createDirIfNotExists: () => createDirIfNotExists2,
|
|
32
32
|
fs_functional_exports: () => fs_functional_exports,
|
|
33
33
|
getFilesInDir: () => getFilesInDir2,
|
|
@@ -37,8 +37,8 @@ __export(chunk_75BIJ5PX_exports, {
|
|
|
37
37
|
removeFile: () => removeFile,
|
|
38
38
|
writeFile: () => writeFile2
|
|
39
39
|
});
|
|
40
|
-
module.exports = __toCommonJS(
|
|
41
|
-
var
|
|
40
|
+
module.exports = __toCommonJS(chunk_Q5XW7CMJ_exports);
|
|
41
|
+
var import_chunk_5BRXEOYH = require("./chunk-5BRXEOYH.js");
|
|
42
42
|
var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
|
|
43
43
|
var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
|
|
44
44
|
var import_promises = __toESM(require("fs/promises"));
|
|
@@ -3981,13 +3981,13 @@ var fs_functional_exports = {};
|
|
|
3981
3981
|
});
|
|
3982
3982
|
var import_function = (0, import_chunk_4VNS5WPM.__toESM)((0, import_chunk_R6QH57HZ.require_function)());
|
|
3983
3983
|
var TE = (0, import_chunk_4VNS5WPM.__toESM)(require_TaskEither());
|
|
3984
|
-
var createDirIfNotExists2 = (dir) => TE.tryCatch(() => (0,
|
|
3985
|
-
var writeFile2 = (params) => TE.tryCatch(() => (0,
|
|
3986
|
-
var removeEmptyDirs2 = (dir) => TE.tryCatch(() => (0,
|
|
3984
|
+
var createDirIfNotExists2 = (dir) => TE.tryCatch(() => (0, import_chunk_5BRXEOYH.createDirIfNotExists)(dir), createTaggedSystemError("fs-create-dir", { dir }));
|
|
3985
|
+
var writeFile2 = (params) => TE.tryCatch(() => (0, import_chunk_5BRXEOYH.writeFile)(params), createTaggedSystemError("fs-write-file", params));
|
|
3986
|
+
var removeEmptyDirs2 = (dir) => TE.tryCatch(() => (0, import_chunk_5BRXEOYH.removeEmptyDirs)(dir), createTaggedSystemError("fs-remove-empty-dirs", { dir }));
|
|
3987
3987
|
var removeDir = (dir) => (0, import_function.pipe)(TE.tryCatch(() => import_promises.default.rm(dir, { recursive: true }), createTaggedSystemError("fs-remove-dir", { dir })));
|
|
3988
3988
|
var removeFile = (filePath) => (0, import_function.pipe)(TE.tryCatch(() => import_promises.default.unlink(filePath), createTaggedSystemError("fs-remove-file", { filePath })));
|
|
3989
|
-
var getNestedFoldersInDir2 = (dir) => () => (0,
|
|
3990
|
-
var getFilesInDir2 = (dir, pattern = "**") => () => (0,
|
|
3989
|
+
var getNestedFoldersInDir2 = (dir) => () => (0, import_chunk_5BRXEOYH.getNestedFoldersInDir)(dir);
|
|
3990
|
+
var getFilesInDir2 = (dir, pattern = "**") => () => (0, import_chunk_5BRXEOYH.getFilesInDir)(dir, pattern);
|
|
3991
3991
|
function createTaggedSystemError(type, meta) {
|
|
3992
3992
|
return (e) => ({
|
|
3993
3993
|
type,
|
|
@@ -16,33 +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_Q75TMXCR_exports = {};
|
|
20
|
+
__export(chunk_Q75TMXCR_exports, {
|
|
21
21
|
getEngineVersion: () => getEngineVersion,
|
|
22
22
|
safeGetEngineVersion: () => safeGetEngineVersion
|
|
23
23
|
});
|
|
24
|
-
module.exports = __toCommonJS(
|
|
25
|
-
var import_chunk_6TTRTZXU = require("./chunk-6TTRTZXU.js");
|
|
24
|
+
module.exports = __toCommonJS(chunk_Q75TMXCR_exports);
|
|
26
25
|
var import_chunk_JOIHHXR6 = require("./chunk-JOIHHXR6.js");
|
|
27
|
-
var
|
|
26
|
+
var import_chunk_DQWKFZPY = require("./chunk-DQWKFZPY.js");
|
|
28
27
|
var import_chunk_5DBOS77Y = require("./chunk-5DBOS77Y.js");
|
|
29
|
-
var import_engines = require("@prisma/engines");
|
|
30
28
|
var import_fetch_engine = require("@prisma/fetch-engine");
|
|
31
|
-
var import_get_platform = require("@prisma/get-platform");
|
|
32
29
|
async function getEngineVersion(enginePath, binaryName) {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
enginePath = await (0, import_chunk_FYZCPL2Z.resolveBinary)(binaryName, enginePath);
|
|
37
|
-
const platformInfo = await (0, import_get_platform.getPlatformInfo)();
|
|
38
|
-
if (binaryName === import_fetch_engine.BinaryType.QueryEngineLibrary) {
|
|
39
|
-
(0, import_get_platform.assertNodeAPISupported)();
|
|
40
|
-
const QE = (0, import_chunk_6TTRTZXU.loadLibrary)(enginePath, platformInfo);
|
|
41
|
-
return `${import_fetch_engine.BinaryType.QueryEngineLibrary} ${QE.version().commit}`;
|
|
42
|
-
} else {
|
|
43
|
-
const { stdout } = await (0, import_chunk_JOIHHXR6.execa)(enginePath, ["--version"]);
|
|
44
|
-
return stdout;
|
|
45
|
-
}
|
|
30
|
+
enginePath = await (0, import_chunk_DQWKFZPY.resolveBinary)(binaryName ?? import_fetch_engine.BinaryType.SchemaEngineBinary, enginePath);
|
|
31
|
+
const { stdout } = await (0, import_chunk_JOIHHXR6.execa)(enginePath, ["--version"]);
|
|
32
|
+
return stdout;
|
|
46
33
|
}
|
|
47
34
|
function safeGetEngineVersion(enginePath, binaryName) {
|
|
48
35
|
return (0, import_chunk_5DBOS77Y.tryCatch2)(
|
|
@@ -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_QDIUK75K_exports = {};
|
|
20
|
+
__export(chunk_QDIUK75K_exports, {
|
|
21
21
|
require_package: () => require_package
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
23
|
+
module.exports = __toCommonJS(chunk_QDIUK75K_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.3.0-integration-
|
|
29
|
+
version: "7.3.0-integration-engines-7-3-0-10-fix-fix-mapped-enum-issue-0b7e6564db7dc3dac7f9312aa84e9ed81d805521.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",
|
|
@@ -48,7 +48,6 @@ var require_package = (0, import_chunk_4VNS5WPM.__commonJS)({
|
|
|
48
48
|
files: [
|
|
49
49
|
"README.md",
|
|
50
50
|
"dist",
|
|
51
|
-
"!**/libquery_engine*",
|
|
52
51
|
"!dist/get-generators/engines/*",
|
|
53
52
|
"scripts"
|
|
54
53
|
],
|
|
@@ -59,12 +58,11 @@ var require_package = (0, import_chunk_4VNS5WPM.__commonJS)({
|
|
|
59
58
|
"@swc/jest": "0.2.37",
|
|
60
59
|
"@types/babel__helper-validator-identifier": "7.15.2",
|
|
61
60
|
"@types/jest": "29.5.14",
|
|
62
|
-
"@types/node": "
|
|
61
|
+
"@types/node": "~20.19.24",
|
|
63
62
|
"@types/resolve": "1.20.6",
|
|
64
63
|
archiver: "6.0.2",
|
|
65
64
|
"checkpoint-client": "1.1.33",
|
|
66
65
|
"cli-truncate": "4.0.0",
|
|
67
|
-
dotenv: "16.5.0",
|
|
68
66
|
empathic: "2.0.0",
|
|
69
67
|
"escape-string-regexp": "5.0.0",
|
|
70
68
|
execa: "8.0.1",
|
|
@@ -109,14 +107,14 @@ var require_package = (0, import_chunk_4VNS5WPM.__commonJS)({
|
|
|
109
107
|
"@prisma/generator": "workspace:*",
|
|
110
108
|
"@prisma/generator-helper": "workspace:*",
|
|
111
109
|
"@prisma/get-platform": "workspace:*",
|
|
112
|
-
"@prisma/prisma-schema-wasm": "7.
|
|
113
|
-
"@prisma/schema-engine-wasm": "7.
|
|
110
|
+
"@prisma/prisma-schema-wasm": "7.3.0-10.fix-fix-mapped-enum-issue-0b7e6564db7dc3dac7f9312aa84e9ed81d805521",
|
|
111
|
+
"@prisma/schema-engine-wasm": "7.3.0-10.fix-fix-mapped-enum-issue-0b7e6564db7dc3dac7f9312aa84e9ed81d805521",
|
|
114
112
|
"@prisma/schema-files-loader": "workspace:*",
|
|
115
113
|
arg: "5.0.2",
|
|
116
114
|
prompts: "2.4.2"
|
|
117
115
|
},
|
|
118
116
|
peerDependencies: {
|
|
119
|
-
typescript: ">=5.
|
|
117
|
+
typescript: ">=5.4.0"
|
|
120
118
|
},
|
|
121
119
|
peerDependenciesMeta: {
|
|
122
120
|
typescript: {
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var chunk_QKQKSUQO_exports = {};
|
|
20
|
+
__export(chunk_QKQKSUQO_exports, {
|
|
21
|
+
ConfigValidationError: () => ConfigValidationError,
|
|
22
|
+
validatePrismaConfigWithDatasource: () => validatePrismaConfigWithDatasource
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(chunk_QKQKSUQO_exports);
|
|
25
|
+
var import_chunk_ANU3HEGF = require("./chunk-ANU3HEGF.js");
|
|
26
|
+
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
|
27
|
+
var ConfigValidationError = class extends Error {
|
|
28
|
+
constructor(message) {
|
|
29
|
+
super(message);
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
(0, import_chunk_ANU3HEGF.setClassName)(ConfigValidationError, "ConfigValidationError");
|
|
33
|
+
function isValidPrismaConfig(prismaConfig) {
|
|
34
|
+
return prismaConfig.datasource !== void 0 && typeof prismaConfig.datasource.url === "string";
|
|
35
|
+
}
|
|
36
|
+
function validatePrismaConfigWithDatasource({
|
|
37
|
+
config,
|
|
38
|
+
cmd
|
|
39
|
+
}) {
|
|
40
|
+
if (!isValidPrismaConfig(config)) {
|
|
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)(`prisma ${cmd}`)}.`
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
return config;
|
|
46
|
+
}
|
|
@@ -26,13 +26,13 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var
|
|
30
|
-
__export(
|
|
29
|
+
var chunk_R3J2O23S_exports = {};
|
|
30
|
+
__export(chunk_R3J2O23S_exports, {
|
|
31
31
|
canPrompt: () => canPrompt
|
|
32
32
|
});
|
|
33
|
-
module.exports = __toCommonJS(
|
|
34
|
-
var import_chunk_H4NI2RIK = require("./chunk-H4NI2RIK.js");
|
|
33
|
+
module.exports = __toCommonJS(chunk_R3J2O23S_exports);
|
|
35
34
|
var import_chunk_ICFLO5JW = require("./chunk-ICFLO5JW.js");
|
|
35
|
+
var import_chunk_H4NI2RIK = require("./chunk-H4NI2RIK.js");
|
|
36
36
|
var import_prompts = __toESM(require("prompts"));
|
|
37
37
|
var canPrompt = () => {
|
|
38
38
|
const injectedCount = import_prompts.default._injected?.length;
|
|
@@ -16,21 +16,21 @@ 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_SP2ETLT2_exports = {};
|
|
20
|
+
__export(chunk_SP2ETLT2_exports, {
|
|
21
21
|
toSchemasContainer: () => toSchemasContainer,
|
|
22
22
|
toSchemasWithConfigDir: () => toSchemasWithConfigDir
|
|
23
23
|
});
|
|
24
|
-
module.exports = __toCommonJS(
|
|
24
|
+
module.exports = __toCommonJS(chunk_SP2ETLT2_exports);
|
|
25
25
|
function toSchemasContainer(schemas) {
|
|
26
26
|
return {
|
|
27
27
|
files: multipleSchemasToSchemaContainers(schemas)
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
|
-
function toSchemasWithConfigDir(schemaContext) {
|
|
30
|
+
function toSchemasWithConfigDir(schemaContext, configDir) {
|
|
31
31
|
return {
|
|
32
32
|
files: multipleSchemasToSchemaContainers(schemaContext.schemaFiles),
|
|
33
|
-
configDir
|
|
33
|
+
configDir
|
|
34
34
|
};
|
|
35
35
|
}
|
|
36
36
|
function multipleSchemasToSchemaContainers(schemas) {
|