@prisma/internals 6.6.0-dev.87 → 6.6.0-dev.89
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-PGWWIFB5.js → chunk-5FNXF4NQ.js} +7 -7
- package/dist/{chunk-KFUDUQDJ.js → chunk-73COFT7A.js} +5 -5
- package/dist/{chunk-AZV6HVKA.js → chunk-7QC5VORA.js} +5 -5
- package/dist/{chunk-XLTQGAI2.js → chunk-AX5N26KG.js} +6 -6
- package/dist/{chunk-2ZQ3EIFP.js → chunk-AXYQWZXV.js} +8 -8
- package/dist/{chunk-7IVVITJ4.js → chunk-BAJOXNL3.js} +8 -8
- package/dist/{chunk-GN564DM5.js → chunk-FFJGOJXV.js} +5 -5
- package/dist/{chunk-KM4DBT3Q.js → chunk-FRNDDXVT.js} +25 -25
- package/dist/{chunk-PKUJNUQP.js → chunk-HTYEU5FC.js} +5 -5
- package/dist/{chunk-HAGJ64PM.js → chunk-I6WLABB2.js} +158 -83
- package/dist/{chunk-BKPPMNV3.js → chunk-IRTBJKYB.js} +5 -5
- package/dist/{chunk-HIXGTIDR.js → chunk-LKR4OOFJ.js} +5 -5
- package/dist/{chunk-CLTELV3Y.js → chunk-N6H26BQE.js} +5 -5
- package/dist/{chunk-R5ST7KPY.js → chunk-NYVGEUNR.js} +25 -25
- package/dist/{chunk-BWCZJO3J.js → chunk-O3X5PEOU.js} +8 -8
- package/dist/{chunk-7QOOXY6F.js → chunk-OESCEI3R.js} +8 -8
- package/dist/{chunk-GQDD4SEU.js → chunk-OQ27GQAK.js} +5 -5
- package/dist/{chunk-BZHB4FYD.js → chunk-P2DQFS3G.js} +8 -8
- package/dist/{chunk-43EZSZMB.js → chunk-Q4DQV7QD.js} +5 -5
- package/dist/{chunk-YEKB3CIU.js → chunk-TWSSYOC7.js} +4 -4
- package/dist/{chunk-DJBBHZ23.js → chunk-XF3D7LPL.js} +5 -5
- package/dist/{chunk-2QTAK7KO.js → chunk-XR4RJTDM.js} +5 -5
- package/dist/{chunk-NGX7QQSC.js → chunk-Y4AIQAU4.js} +8 -8
- package/dist/{chunk-67VG7QKN.js → chunk-YKMFYZPB.js} +7 -7
- package/dist/cli/checkUnsupportedDataProxy.js +16 -16
- package/dist/cli/getSchema.js +19 -19
- package/dist/cli/hashes.js +16 -16
- package/dist/cli/schemaContext.js +16 -16
- package/dist/engine-commands/errorHelpers.js +4 -4
- package/dist/engine-commands/formatSchema.js +15 -15
- package/dist/engine-commands/getConfig.js +10 -10
- package/dist/engine-commands/getDmmf.js +7 -7
- package/dist/engine-commands/index.js +24 -24
- package/dist/engine-commands/lintSchema.js +8 -8
- package/dist/engine-commands/mergeSchemas.js +7 -7
- package/dist/engine-commands/validate.js +7 -7
- package/dist/get-generators/getGenerators.js +18 -18
- package/dist/index.js +45 -45
- package/dist/utils/getEnvPaths.js +15 -15
- package/dist/utils/getVersionFromPackageJson.js +3 -3
- package/dist/utils/handlePanic.js +3 -3
- package/dist/utils/link.js +2 -2
- package/dist/utils/loadEnvFile.js +15 -15
- package/dist/utils/missingDatasource.js +3 -3
- package/dist/utils/missingGeneratorMessage.js +5 -5
- package/dist/wasm.js +4 -4
- package/package.json +11 -11
@@ -1,7 +1,9 @@
|
|
1
1
|
"use strict";
|
2
|
+
var __create = Object.create;
|
2
3
|
var __defProp = Object.defineProperty;
|
3
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
4
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
5
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
6
8
|
var __export = (target, all) => {
|
7
9
|
for (var name in all)
|
@@ -15,14 +17,23 @@ var __copyProps = (to, from, except, desc) => {
|
|
15
17
|
}
|
16
18
|
return to;
|
17
19
|
};
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
26
|
+
mod
|
27
|
+
));
|
18
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
19
|
-
var
|
20
|
-
__export(
|
21
|
-
link: () =>
|
29
|
+
var chunk_I6WLABB2_exports = {};
|
30
|
+
__export(chunk_I6WLABB2_exports, {
|
31
|
+
link: () => link2
|
22
32
|
});
|
23
|
-
module.exports = __toCommonJS(
|
33
|
+
module.exports = __toCommonJS(chunk_I6WLABB2_exports);
|
24
34
|
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
25
35
|
var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
|
36
|
+
var import_node_process = __toESM(require("node:process"));
|
26
37
|
var require_has_flag = (0, import_chunk_4VNS5WPM.__commonJS)({
|
27
38
|
"../../node_modules/.pnpm/has-flag@4.0.0/node_modules/has-flag/index.js"(exports, module2) {
|
28
39
|
"use strict";
|
@@ -135,13 +146,13 @@ var require_supports_color = (0, import_chunk_4VNS5WPM.__commonJS)({
|
|
135
146
|
}
|
136
147
|
});
|
137
148
|
var require_supports_hyperlinks = (0, import_chunk_4VNS5WPM.__commonJS)({
|
138
|
-
"../../node_modules/.pnpm/supports-hyperlinks@2.
|
149
|
+
"../../node_modules/.pnpm/supports-hyperlinks@3.2.0/node_modules/supports-hyperlinks/index.js"(exports, module2) {
|
139
150
|
"use strict";
|
140
151
|
var supportsColor = require_supports_color();
|
141
152
|
var hasFlag = require_has_flag();
|
142
153
|
function parseVersion(versionString) {
|
143
154
|
if (/^\d{3,4}$/.test(versionString)) {
|
144
|
-
const m = /(\d{1,2})(\d{2})/.exec(versionString);
|
155
|
+
const m = /(\d{1,2})(\d{2})/.exec(versionString) || [];
|
145
156
|
return {
|
146
157
|
major: 0,
|
147
158
|
minor: parseInt(m[1], 10),
|
@@ -156,9 +167,18 @@ var require_supports_hyperlinks = (0, import_chunk_4VNS5WPM.__commonJS)({
|
|
156
167
|
};
|
157
168
|
}
|
158
169
|
function supportsHyperlink(stream) {
|
159
|
-
const {
|
160
|
-
|
161
|
-
|
170
|
+
const {
|
171
|
+
CI,
|
172
|
+
FORCE_HYPERLINK,
|
173
|
+
NETLIFY,
|
174
|
+
TEAMCITY_VERSION,
|
175
|
+
TERM_PROGRAM,
|
176
|
+
TERM_PROGRAM_VERSION,
|
177
|
+
VTE_VERSION,
|
178
|
+
TERM
|
179
|
+
} = process.env;
|
180
|
+
if (FORCE_HYPERLINK) {
|
181
|
+
return !(FORCE_HYPERLINK.length > 0 && parseInt(FORCE_HYPERLINK, 10) === 0);
|
162
182
|
}
|
163
183
|
if (hasFlag("no-hyperlink") || hasFlag("no-hyperlinks") || hasFlag("hyperlink=false") || hasFlag("hyperlink=never")) {
|
164
184
|
return false;
|
@@ -166,7 +186,7 @@ var require_supports_hyperlinks = (0, import_chunk_4VNS5WPM.__commonJS)({
|
|
166
186
|
if (hasFlag("hyperlink=true") || hasFlag("hyperlink=always")) {
|
167
187
|
return true;
|
168
188
|
}
|
169
|
-
if (
|
189
|
+
if (NETLIFY) {
|
170
190
|
return true;
|
171
191
|
}
|
172
192
|
if (!supportsColor.supportsColor(stream)) {
|
@@ -175,18 +195,21 @@ var require_supports_hyperlinks = (0, import_chunk_4VNS5WPM.__commonJS)({
|
|
175
195
|
if (stream && !stream.isTTY) {
|
176
196
|
return false;
|
177
197
|
}
|
198
|
+
if ("WT_SESSION" in process.env) {
|
199
|
+
return true;
|
200
|
+
}
|
178
201
|
if (process.platform === "win32") {
|
179
202
|
return false;
|
180
203
|
}
|
181
|
-
if (
|
204
|
+
if (CI) {
|
182
205
|
return false;
|
183
206
|
}
|
184
|
-
if (
|
207
|
+
if (TEAMCITY_VERSION) {
|
185
208
|
return false;
|
186
209
|
}
|
187
|
-
if (
|
188
|
-
const version = parseVersion(
|
189
|
-
switch (
|
210
|
+
if (TERM_PROGRAM) {
|
211
|
+
const version = parseVersion(TERM_PROGRAM_VERSION || "");
|
212
|
+
switch (TERM_PROGRAM) {
|
190
213
|
case "iTerm.app":
|
191
214
|
if (version.major === 3) {
|
192
215
|
return version.minor >= 1;
|
@@ -196,15 +219,21 @@ var require_supports_hyperlinks = (0, import_chunk_4VNS5WPM.__commonJS)({
|
|
196
219
|
return version.major >= 20200620;
|
197
220
|
case "vscode":
|
198
221
|
return version.major > 1 || version.major === 1 && version.minor >= 72;
|
222
|
+
case "ghostty":
|
223
|
+
return true;
|
199
224
|
}
|
200
225
|
}
|
201
|
-
if (
|
202
|
-
if (
|
226
|
+
if (VTE_VERSION) {
|
227
|
+
if (VTE_VERSION === "0.50.0") {
|
203
228
|
return false;
|
204
229
|
}
|
205
|
-
const version = parseVersion(
|
230
|
+
const version = parseVersion(VTE_VERSION);
|
206
231
|
return version.major > 0 || version.minor >= 50;
|
207
232
|
}
|
233
|
+
switch (TERM) {
|
234
|
+
case "alacritty":
|
235
|
+
return true;
|
236
|
+
}
|
208
237
|
return false;
|
209
238
|
}
|
210
239
|
module2.exports = {
|
@@ -214,22 +243,75 @@ var require_supports_hyperlinks = (0, import_chunk_4VNS5WPM.__commonJS)({
|
|
214
243
|
};
|
215
244
|
}
|
216
245
|
});
|
246
|
+
var base_exports = {};
|
247
|
+
(0, import_chunk_4VNS5WPM.__export)(base_exports, {
|
248
|
+
beep: () => beep,
|
249
|
+
clearScreen: () => clearScreen,
|
250
|
+
clearTerminal: () => clearTerminal,
|
251
|
+
cursorBackward: () => cursorBackward,
|
252
|
+
cursorDown: () => cursorDown,
|
253
|
+
cursorForward: () => cursorForward,
|
254
|
+
cursorGetPosition: () => cursorGetPosition,
|
255
|
+
cursorHide: () => cursorHide,
|
256
|
+
cursorLeft: () => cursorLeft,
|
257
|
+
cursorMove: () => cursorMove,
|
258
|
+
cursorNextLine: () => cursorNextLine,
|
259
|
+
cursorPrevLine: () => cursorPrevLine,
|
260
|
+
cursorRestorePosition: () => cursorRestorePosition,
|
261
|
+
cursorSavePosition: () => cursorSavePosition,
|
262
|
+
cursorShow: () => cursorShow,
|
263
|
+
cursorTo: () => cursorTo,
|
264
|
+
cursorUp: () => cursorUp,
|
265
|
+
enterAlternativeScreen: () => enterAlternativeScreen,
|
266
|
+
eraseDown: () => eraseDown,
|
267
|
+
eraseEndLine: () => eraseEndLine,
|
268
|
+
eraseLine: () => eraseLine,
|
269
|
+
eraseLines: () => eraseLines,
|
270
|
+
eraseScreen: () => eraseScreen,
|
271
|
+
eraseStartLine: () => eraseStartLine,
|
272
|
+
eraseUp: () => eraseUp,
|
273
|
+
exitAlternativeScreen: () => exitAlternativeScreen,
|
274
|
+
iTerm: () => iTerm,
|
275
|
+
image: () => image,
|
276
|
+
link: () => link,
|
277
|
+
scrollDown: () => scrollDown,
|
278
|
+
scrollUp: () => scrollUp
|
279
|
+
});
|
280
|
+
var isBrowser = globalThis.window?.document !== void 0;
|
281
|
+
var isNode = globalThis.process?.versions?.node !== void 0;
|
282
|
+
var isBun = globalThis.process?.versions?.bun !== void 0;
|
283
|
+
var isDeno = globalThis.Deno?.version?.deno !== void 0;
|
284
|
+
var isElectron = globalThis.process?.versions?.electron !== void 0;
|
285
|
+
var isJsDom = globalThis.navigator?.userAgent?.includes("jsdom") === true;
|
286
|
+
var isWebWorker = typeof WorkerGlobalScope !== "undefined" && globalThis instanceof WorkerGlobalScope;
|
287
|
+
var isDedicatedWorker = typeof DedicatedWorkerGlobalScope !== "undefined" && globalThis instanceof DedicatedWorkerGlobalScope;
|
288
|
+
var isSharedWorker = typeof SharedWorkerGlobalScope !== "undefined" && globalThis instanceof SharedWorkerGlobalScope;
|
289
|
+
var isServiceWorker = typeof ServiceWorkerGlobalScope !== "undefined" && globalThis instanceof ServiceWorkerGlobalScope;
|
290
|
+
var platform = globalThis.navigator?.userAgentData?.platform;
|
291
|
+
var isMacOs = platform === "macOS" || globalThis.navigator?.platform === "MacIntel" || globalThis.navigator?.userAgent?.includes(" Mac ") === true || globalThis.process?.platform === "darwin";
|
292
|
+
var isWindows = platform === "Windows" || globalThis.navigator?.platform === "Win32" || globalThis.process?.platform === "win32";
|
293
|
+
var isLinux = platform === "Linux" || globalThis.navigator?.platform?.startsWith("Linux") === true || globalThis.navigator?.userAgent?.includes(" Linux ") === true || globalThis.process?.platform === "linux";
|
294
|
+
var isIos = platform === "iOS" || globalThis.navigator?.platform === "MacIntel" && globalThis.navigator?.maxTouchPoints > 1 || /iPad|iPhone|iPod/.test(globalThis.navigator?.platform);
|
295
|
+
var isAndroid = platform === "Android" || globalThis.navigator?.platform === "Android" || globalThis.navigator?.userAgent?.includes(" Android ") === true || globalThis.process?.platform === "android";
|
217
296
|
var ESC = "\x1B[";
|
218
297
|
var OSC = "\x1B]";
|
219
298
|
var BEL = "\x07";
|
220
299
|
var SEP = ";";
|
221
|
-
var isTerminalApp =
|
222
|
-
var
|
223
|
-
|
300
|
+
var isTerminalApp = !isBrowser && import_node_process.default.env.TERM_PROGRAM === "Apple_Terminal";
|
301
|
+
var isWindows2 = !isBrowser && import_node_process.default.platform === "win32";
|
302
|
+
var cwdFunction = isBrowser ? () => {
|
303
|
+
throw new Error("`process.cwd()` only works in Node.js, not the browser.");
|
304
|
+
} : import_node_process.default.cwd;
|
305
|
+
var cursorTo = (x, y) => {
|
224
306
|
if (typeof x !== "number") {
|
225
307
|
throw new TypeError("The `x` argument is required");
|
226
308
|
}
|
227
309
|
if (typeof y !== "number") {
|
228
310
|
return ESC + (x + 1) + "G";
|
229
311
|
}
|
230
|
-
return ESC + (y + 1) +
|
312
|
+
return ESC + (y + 1) + SEP + (x + 1) + "H";
|
231
313
|
};
|
232
|
-
|
314
|
+
var cursorMove = (x, y) => {
|
233
315
|
if (typeof x !== "number") {
|
234
316
|
throw new TypeError("The `x` argument is required");
|
235
317
|
}
|
@@ -246,62 +328,56 @@ ansiEscapes.cursorMove = (x, y) => {
|
|
246
328
|
}
|
247
329
|
return returnValue;
|
248
330
|
};
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
331
|
+
var cursorUp = (count = 1) => ESC + count + "A";
|
332
|
+
var cursorDown = (count = 1) => ESC + count + "B";
|
333
|
+
var cursorForward = (count = 1) => ESC + count + "C";
|
334
|
+
var cursorBackward = (count = 1) => ESC + count + "D";
|
335
|
+
var cursorLeft = ESC + "G";
|
336
|
+
var cursorSavePosition = isTerminalApp ? "\x1B7" : ESC + "s";
|
337
|
+
var cursorRestorePosition = isTerminalApp ? "\x1B8" : ESC + "u";
|
338
|
+
var cursorGetPosition = ESC + "6n";
|
339
|
+
var cursorNextLine = ESC + "E";
|
340
|
+
var cursorPrevLine = ESC + "F";
|
341
|
+
var cursorHide = ESC + "?25l";
|
342
|
+
var cursorShow = ESC + "?25h";
|
343
|
+
var eraseLines = (count) => {
|
262
344
|
let clear = "";
|
263
345
|
for (let i = 0; i < count; i++) {
|
264
|
-
clear +=
|
346
|
+
clear += eraseLine + (i < count - 1 ? cursorUp() : "");
|
265
347
|
}
|
266
348
|
if (count) {
|
267
|
-
clear +=
|
349
|
+
clear += cursorLeft;
|
268
350
|
}
|
269
351
|
return clear;
|
270
352
|
};
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
SEP,
|
300
|
-
SEP,
|
301
|
-
BEL
|
302
|
-
].join("");
|
303
|
-
};
|
304
|
-
ansiEscapes.image = (buffer, options = {}) => {
|
353
|
+
var eraseEndLine = ESC + "K";
|
354
|
+
var eraseStartLine = ESC + "1K";
|
355
|
+
var eraseLine = ESC + "2K";
|
356
|
+
var eraseDown = ESC + "J";
|
357
|
+
var eraseUp = ESC + "1J";
|
358
|
+
var eraseScreen = ESC + "2J";
|
359
|
+
var scrollUp = ESC + "S";
|
360
|
+
var scrollDown = ESC + "T";
|
361
|
+
var clearScreen = "\x1Bc";
|
362
|
+
var clearTerminal = isWindows2 ? `${eraseScreen}${ESC}0f` : `${eraseScreen}${ESC}3J${ESC}H`;
|
363
|
+
var enterAlternativeScreen = ESC + "?1049h";
|
364
|
+
var exitAlternativeScreen = ESC + "?1049l";
|
365
|
+
var beep = BEL;
|
366
|
+
var link = (text, url) => [
|
367
|
+
OSC,
|
368
|
+
"8",
|
369
|
+
SEP,
|
370
|
+
SEP,
|
371
|
+
url,
|
372
|
+
BEL,
|
373
|
+
text,
|
374
|
+
OSC,
|
375
|
+
"8",
|
376
|
+
SEP,
|
377
|
+
SEP,
|
378
|
+
BEL
|
379
|
+
].join("");
|
380
|
+
var image = (data, options = {}) => {
|
305
381
|
let returnValue = `${OSC}1337;File=inline=1`;
|
306
382
|
if (options.width) {
|
307
383
|
returnValue += `;width=${options.width}`;
|
@@ -312,18 +388,18 @@ ansiEscapes.image = (buffer, options = {}) => {
|
|
312
388
|
if (options.preserveAspectRatio === false) {
|
313
389
|
returnValue += ";preserveAspectRatio=0";
|
314
390
|
}
|
315
|
-
return returnValue + ":" +
|
391
|
+
return returnValue + ":" + Buffer.from(data).toString("base64") + BEL;
|
316
392
|
};
|
317
|
-
|
318
|
-
setCwd: (cwd =
|
319
|
-
annotation
|
393
|
+
var iTerm = {
|
394
|
+
setCwd: (cwd = cwdFunction()) => `${OSC}50;CurrentDir=${cwd}${BEL}`,
|
395
|
+
annotation(message, options = {}) {
|
320
396
|
let returnValue = `${OSC}1337;`;
|
321
|
-
const hasX =
|
322
|
-
const hasY =
|
323
|
-
if ((hasX || hasY) && !(hasX && hasY &&
|
397
|
+
const hasX = options.x !== void 0;
|
398
|
+
const hasY = options.y !== void 0;
|
399
|
+
if ((hasX || hasY) && !(hasX && hasY && options.length !== void 0)) {
|
324
400
|
throw new Error("`x`, `y` and `length` must be defined when `x` or `y` is defined");
|
325
401
|
}
|
326
|
-
message = message.
|
402
|
+
message = message.replaceAll("|", "");
|
327
403
|
returnValue += options.isHidden ? "AddHiddenAnnotation=" : "AddAnnotation=";
|
328
404
|
if (options.length > 0) {
|
329
405
|
returnValue += (hasX ? [message, options.length, options.x, options.y] : [options.length, message]).join("|");
|
@@ -333,7 +409,6 @@ ansiEscapes.iTerm = {
|
|
333
409
|
return returnValue + BEL;
|
334
410
|
}
|
335
411
|
};
|
336
|
-
var ansi_escapes_default = ansiEscapes;
|
337
412
|
var import_supports_hyperlinks = (0, import_chunk_4VNS5WPM.__toESM)(require_supports_hyperlinks(), 1);
|
338
413
|
function terminalLink(text, url, { target = "stdout", ...options } = {}) {
|
339
414
|
if (!import_supports_hyperlinks.default[target]) {
|
@@ -342,12 +417,12 @@ function terminalLink(text, url, { target = "stdout", ...options } = {}) {
|
|
342
417
|
}
|
343
418
|
return typeof options.fallback === "function" ? options.fallback(text, url) : `${text} (\u200B${url}\u200B)`;
|
344
419
|
}
|
345
|
-
return
|
420
|
+
return base_exports.link(text, url);
|
346
421
|
}
|
347
422
|
terminalLink.isSupported = import_supports_hyperlinks.default.stdout;
|
348
423
|
terminalLink.stderr = (text, url, options = {}) => terminalLink(text, url, { target: "stderr", ...options });
|
349
424
|
terminalLink.stderr.isSupported = import_supports_hyperlinks.default.stderr;
|
350
|
-
function
|
425
|
+
function link2(url) {
|
351
426
|
return terminalLink(url, url, {
|
352
427
|
fallback: (url2) => (0, import_chunk_PG5FDKSF.underline)(url2)
|
353
428
|
});
|
@@ -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_IRTBJKYB_exports = {};
|
20
|
+
__export(chunk_IRTBJKYB_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_IRTBJKYB_exports);
|
28
|
+
var import_chunk_XF3D7LPL = require("./chunk-XF3D7LPL.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_XF3D7LPL.prismaSchemaWasm.lint(JSON.stringify(schemas));
|
33
33
|
const lintDiagnostics = JSON.parse(lintResult);
|
34
34
|
return lintDiagnostics;
|
35
35
|
}
|
@@ -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_LKR4OOFJ_exports = {};
|
20
|
+
__export(chunk_LKR4OOFJ_exports, {
|
21
21
|
addVersionDetailsToErrorMessage: () => addVersionDetailsToErrorMessage
|
22
22
|
});
|
23
|
-
module.exports = __toCommonJS(
|
24
|
-
var
|
23
|
+
module.exports = __toCommonJS(chunk_LKR4OOFJ_exports);
|
24
|
+
var import_chunk_N6H26BQE = require("./chunk-N6H26BQE.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_N6H26BQE.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_N6H26BQE_exports = {};
|
20
|
+
__export(chunk_N6H26BQE_exports, {
|
21
21
|
version: () => version
|
22
22
|
});
|
23
|
-
module.exports = __toCommonJS(
|
24
|
-
var
|
25
|
-
var packageJson = (0,
|
23
|
+
module.exports = __toCommonJS(chunk_N6H26BQE_exports);
|
24
|
+
var import_chunk_TWSSYOC7 = require("./chunk-TWSSYOC7.js");
|
25
|
+
var packageJson = (0, import_chunk_TWSSYOC7.require_package)();
|
26
26
|
var version = packageJson.version;
|
@@ -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_NYVGEUNR_exports = {};
|
30
|
+
__export(chunk_NYVGEUNR_exports, {
|
31
31
|
checkUnsupportedDataProxy: () => checkUnsupportedDataProxy,
|
32
32
|
forbiddenCmdWithDataProxyFlagMessage: () => forbiddenCmdWithDataProxyFlagMessage,
|
33
33
|
formatSchema: () => formatSchema,
|
@@ -49,7 +49,7 @@ __export(chunk_R5ST7KPY_exports, {
|
|
49
49
|
processSchemaResult: () => processSchemaResult,
|
50
50
|
skipIndex: () => skipIndex
|
51
51
|
});
|
52
|
-
module.exports = __toCommonJS(
|
52
|
+
module.exports = __toCommonJS(chunk_NYVGEUNR_exports);
|
53
53
|
var import_chunk_X77CS5RK = require("./chunk-X77CS5RK.js");
|
54
54
|
var import_chunk_EPXBOIA5 = require("./chunk-EPXBOIA5.js");
|
55
55
|
var import_chunk_RS2R7COT = require("./chunk-RS2R7COT.js");
|
@@ -57,16 +57,16 @@ var import_chunk_X3P4J7WW = require("./chunk-X3P4J7WW.js");
|
|
57
57
|
var import_chunk_LRU47BGE = require("./chunk-LRU47BGE.js");
|
58
58
|
var import_chunk_5FJ3MENK = require("./chunk-5FJ3MENK.js");
|
59
59
|
var import_chunk_UTJGRVMG = require("./chunk-UTJGRVMG.js");
|
60
|
-
var
|
60
|
+
var import_chunk_AX5N26KG = require("./chunk-AX5N26KG.js");
|
61
61
|
var import_chunk_5V36RLCO = require("./chunk-5V36RLCO.js");
|
62
|
-
var
|
63
|
-
var
|
62
|
+
var import_chunk_7QC5VORA = require("./chunk-7QC5VORA.js");
|
63
|
+
var import_chunk_I6WLABB2 = require("./chunk-I6WLABB2.js");
|
64
64
|
var import_chunk_CRVLHWC5 = require("./chunk-CRVLHWC5.js");
|
65
|
-
var
|
66
|
-
var
|
67
|
-
var
|
68
|
-
var
|
69
|
-
var
|
65
|
+
var import_chunk_BAJOXNL3 = require("./chunk-BAJOXNL3.js");
|
66
|
+
var import_chunk_FFJGOJXV = require("./chunk-FFJGOJXV.js");
|
67
|
+
var import_chunk_5FNXF4NQ = require("./chunk-5FNXF4NQ.js");
|
68
|
+
var import_chunk_P2DQFS3G = require("./chunk-P2DQFS3G.js");
|
69
|
+
var import_chunk_OQ27GQAK = require("./chunk-OQ27GQAK.js");
|
70
70
|
var import_chunk_2B26F5N3 = require("./chunk-2B26F5N3.js");
|
71
71
|
var import_chunk_M3GBKLGE = require("./chunk-M3GBKLGE.js");
|
72
72
|
var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
|
@@ -104,7 +104,7 @@ var debug = (0, import_debug2.default)("prisma:format");
|
|
104
104
|
async function formatSchema({ schemas }, inputFormattingOptions) {
|
105
105
|
if (process.env.FORCE_PANIC_PRISMA_SCHEMA) {
|
106
106
|
handleFormatPanic(() => {
|
107
|
-
|
107
|
+
import_chunk_OQ27GQAK.prismaSchemaWasm.debug_panic();
|
108
108
|
});
|
109
109
|
}
|
110
110
|
const defaultFormattingOptions = {
|
@@ -121,10 +121,10 @@ async function formatSchema({ schemas }, inputFormattingOptions) {
|
|
121
121
|
const { formattedMultipleSchemas, lintDiagnostics } = handleFormatPanic(() => {
|
122
122
|
const formattedMultipleSchemasRaw = formatWasm(JSON.stringify(schemas), documentFormattingParams);
|
123
123
|
const formattedMultipleSchemas2 = JSON.parse(formattedMultipleSchemasRaw);
|
124
|
-
const lintDiagnostics2 = (0,
|
124
|
+
const lintDiagnostics2 = (0, import_chunk_FFJGOJXV.lintSchema)({ schemas: formattedMultipleSchemas2 });
|
125
125
|
return { formattedMultipleSchemas: formattedMultipleSchemas2, lintDiagnostics: lintDiagnostics2 };
|
126
126
|
});
|
127
|
-
const lintWarnings = (0,
|
127
|
+
const lintWarnings = (0, import_chunk_FFJGOJXV.getLintWarningsAsText)(lintDiagnostics);
|
128
128
|
if (lintWarnings && import_chunk_ZJWZK45Z.logger_exports.should.warn()) {
|
129
129
|
console.warn(lintWarnings);
|
130
130
|
}
|
@@ -151,7 +151,7 @@ function handleFormatPanic(tryCb) {
|
|
151
151
|
}
|
152
152
|
}
|
153
153
|
function formatWasm(schema, documentFormattingParams) {
|
154
|
-
const formattedSchema =
|
154
|
+
const formattedSchema = import_chunk_OQ27GQAK.prismaSchemaWasm.format(schema, JSON.stringify(documentFormattingParams));
|
155
155
|
return formattedSchema;
|
156
156
|
}
|
157
157
|
var readFile = (0, import_util.promisify)(import_fs.default.readFile);
|
@@ -195,7 +195,7 @@ async function readSchemaFromDirectory(schemaPath2) {
|
|
195
195
|
}
|
196
196
|
const files = await (0, import_schema_files_loader.loadSchemaFiles)(schemaPath2);
|
197
197
|
debug2("Loading config");
|
198
|
-
const config = await (0,
|
198
|
+
const config = await (0, import_chunk_P2DQFS3G.getConfig)({
|
199
199
|
datamodel: files,
|
200
200
|
ignoreEnvVarErrors: true
|
201
201
|
});
|
@@ -405,7 +405,7 @@ async function processSchemaResult({
|
|
405
405
|
if (printLoadMessage) {
|
406
406
|
printSchemaLoadedMessage(loadedFromPathForLogMessages);
|
407
407
|
}
|
408
|
-
const configFromPsl = await (0,
|
408
|
+
const configFromPsl = await (0, import_chunk_P2DQFS3G.getConfig)({ datamodel: schemaResult.schemas, ignoreEnvVarErrors });
|
409
409
|
const primaryDatasource = configFromPsl.datasources.at(0);
|
410
410
|
const schemaRootDir = schemaResult.schemaRootDir || cwd;
|
411
411
|
return {
|
@@ -479,19 +479,19 @@ async function getGenerators(options) {
|
|
479
479
|
}
|
480
480
|
}
|
481
481
|
if (!schemaContext.primaryDatasource) {
|
482
|
-
throw new Error(
|
482
|
+
throw new Error(import_chunk_7QC5VORA.missingDatasource);
|
483
483
|
}
|
484
484
|
(0, import_chunk_5FJ3MENK.printConfigWarnings)(schemaContext.warnings);
|
485
485
|
const previewFeatures = (0, import_chunk_CRVLHWC5.extractPreviewFeatures)(schemaContext.generators);
|
486
|
-
const dmmf = await (0,
|
486
|
+
const dmmf = await (0, import_chunk_BAJOXNL3.getDMMF)({
|
487
487
|
datamodel: schemaContext.schemaFiles,
|
488
488
|
previewFeatures
|
489
489
|
});
|
490
490
|
if (dmmf.datamodel.models.length === 0 && !allowNoModels) {
|
491
491
|
if (schemaContext.primaryDatasource.provider === "mongodb") {
|
492
|
-
throw new Error(
|
492
|
+
throw new Error(import_chunk_AX5N26KG.missingModelMessageMongoDB);
|
493
493
|
}
|
494
|
-
throw new Error(
|
494
|
+
throw new Error(import_chunk_AX5N26KG.missingModelMessage);
|
495
495
|
}
|
496
496
|
const generatorConfigs = filterGenerators(overrideGenerators || schemaContext.generators, generatorNames);
|
497
497
|
await validateGenerators(generatorConfigs);
|
@@ -534,7 +534,7 @@ You need to define \`output\` in the generator block in the schema file.`
|
|
534
534
|
fromEnvVar: null
|
535
535
|
};
|
536
536
|
}
|
537
|
-
const datamodel = (0,
|
537
|
+
const datamodel = (0, import_chunk_5FNXF4NQ.mergeSchemas)({ schemas: schemaContext.schemaFiles });
|
538
538
|
const envPaths = await getEnvPaths(schemaContext.schemaPath, { cwd: generatorConfig.output.value });
|
539
539
|
const options2 = {
|
540
540
|
datamodel,
|
@@ -618,7 +618,7 @@ generator gen {
|
|
618
618
|
debug3({ generatorBinaryPaths });
|
619
619
|
generator.setBinaryPaths(generatorBinaryPaths);
|
620
620
|
if (engineVersion !== version && generator.options && generator.manifest.requiresEngines.includes(queryEngineType) && generatorBinaryPaths[queryEngineType] && generatorBinaryPaths[queryEngineType]?.[binaryTarget]) {
|
621
|
-
const customDmmf = await (0,
|
621
|
+
const customDmmf = await (0, import_chunk_BAJOXNL3.getDMMF)({
|
622
622
|
datamodel: schemaContext.schemaFiles,
|
623
623
|
previewFeatures
|
624
624
|
});
|
@@ -880,7 +880,7 @@ var forbiddenCmdWithDataProxyFlagMessage = (command) => `
|
|
880
880
|
Using an Accelerate URL is not supported for this CLI command ${(0, import_chunk_PG5FDKSF.green)(`prisma ${command}`)} yet.
|
881
881
|
Please use a direct connection to your database via the datasource \`directUrl\` setting.
|
882
882
|
|
883
|
-
More information about this limitation: ${(0,
|
883
|
+
More information about this limitation: ${(0, import_chunk_I6WLABB2.link)("https://pris.ly/d/accelerate-limitations")}
|
884
884
|
`;
|
885
885
|
function checkUnsupportedDataProxy({
|
886
886
|
cmd,
|
@@ -893,7 +893,7 @@ function checkUnsupportedDataProxy({
|
|
893
893
|
}
|
894
894
|
}
|
895
895
|
if (!schemaContext2?.primaryDatasource) return;
|
896
|
-
const url = (0,
|
896
|
+
const url = (0, import_chunk_P2DQFS3G.resolveUrl)((0, import_chunk_P2DQFS3G.getEffectiveUrl)(schemaContext2.primaryDatasource));
|
897
897
|
if (url?.startsWith("prisma://")) {
|
898
898
|
throw new Error(forbiddenCmdWithDataProxyFlagMessage(cmd));
|
899
899
|
}
|
@@ -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_O3X5PEOU_exports = {};
|
30
|
+
__export(chunk_O3X5PEOU_exports, {
|
31
31
|
ValidateError: () => ValidateError,
|
32
32
|
validate: () => validate
|
33
33
|
});
|
34
|
-
module.exports = __toCommonJS(
|
34
|
+
module.exports = __toCommonJS(chunk_O3X5PEOU_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_LKR4OOFJ = require("./chunk-LKR4OOFJ.js");
|
39
|
+
var import_chunk_XF3D7LPL = require("./chunk-XF3D7LPL.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_LKR4OOFJ.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_XF3D7LPL.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_XF3D7LPL.prismaSchemaWasm.validate(params);
|
81
81
|
},
|
82
82
|
(e) => ({
|
83
83
|
type: "wasm-error",
|