@prisma/internals 6.3.0-integration-simpler-typeinfo-query.1 → 6.3.0-integration-studio-ux-refinements.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-H3T4L34H.js → chunk-25RJ7YTB.js} +88 -83
- package/dist/{chunk-67KWF6KB.js → chunk-2AWSOG4B.js} +5 -5
- package/dist/{chunk-S4LINK5Y.js → chunk-2XRDQCIA.js} +5 -5
- package/dist/{chunk-KNNIRRTO.js → chunk-33LHUSHN.js} +5 -5
- package/dist/{chunk-HMGEWJDY.js → chunk-3BND5XB4.js} +232 -47
- package/dist/{chunk-2DXAGCPS.js → chunk-3DMEILBC.js} +11 -11
- package/dist/{chunk-5I4BOTBV.js → chunk-5MCWLJSR.js} +3 -9
- package/dist/{chunk-KROMVQBD.js → chunk-74T6W4CU.js} +10 -10
- package/dist/{chunk-IABMG3F4.js → chunk-77IC3DNO.js} +5 -5
- package/dist/chunk-BONFK27U.js +47 -0
- package/dist/{chunk-WMIBAVWZ.js → chunk-C47SCASR.js} +5 -5
- package/dist/{chunk-IAEMHQAC.js → chunk-CXEMRKV4.js} +8 -8
- package/dist/{chunk-J3JE5NVO.js → chunk-CZDIXJEO.js} +56 -32
- package/dist/{chunk-UR3LUZY3.js → chunk-DNQ6ZL6Z.js} +17 -17
- package/dist/{chunk-V2VWODV3.js → chunk-EKBX4J6O.js} +5 -5
- package/dist/{chunk-COFXY6NH.js → chunk-EMTIYECY.js} +14 -41
- package/dist/{chunk-KPVPQQGU.js → chunk-F3MDG3CD.js} +5 -5
- package/dist/{chunk-CKVVVLEH.js → chunk-GH5ML3FF.js} +9 -9
- package/dist/{chunk-VJQK3LHU.js → chunk-H32RDGWV.js} +74 -185
- package/dist/{chunk-WYTN2XGW.js → chunk-JAVGNR6X.js} +5 -5
- package/dist/{chunk-4NFLAUKD.js → chunk-KQOJB3ZW.js} +70 -70
- package/dist/{chunk-44JHENE6.js → chunk-KQRYQKRL.js} +14 -41
- package/dist/{chunk-OHBFHT5Q.js → chunk-LBFL6E3O.js} +15 -15
- package/dist/{chunk-3U2ANLD3.js → chunk-MGZOEY6N.js} +6 -6
- package/dist/{chunk-JBUUTZQL.js → chunk-MH22WJ5K.js} +15 -15
- package/dist/{chunk-J4MA2JIK.js → chunk-N6K7M2HZ.js} +5 -5
- package/dist/chunk-PPCNLYSB.js +47 -0
- package/dist/{chunk-XLYQ6PQW.js → chunk-QTXYAZFX.js} +17 -17
- package/dist/{chunk-DFG3425X.js → chunk-RDX5FNEL.js} +16 -16
- package/dist/{chunk-FTS2IEWX.js → chunk-S57RMXZW.js} +5 -5
- package/dist/{chunk-5R7AZFMV.js → chunk-TDQX3EMO.js} +5 -5
- package/dist/{chunk-5UJZARUY.js → chunk-UEISJS4J.js} +17 -17
- package/dist/{chunk-OSOXVAZB.js → chunk-UPIULDLZ.js} +11 -11
- package/dist/{chunk-LXIE6UJ2.js → chunk-UWNBJSNG.js} +79 -961
- package/dist/{chunk-WCRKL55L.js → chunk-V2ZF7ETH.js} +7 -7
- package/dist/{chunk-YDZVEVUG.js → chunk-VRT7T6MF.js} +73 -73
- package/dist/{chunk-B44XJG7K.js → chunk-XPHFVLP7.js} +5 -5
- package/dist/{chunk-MUJIYA44.js → chunk-YBCHFR5N.js} +5 -5
- package/dist/{chunk-2WJPHJ2I.js → chunk-YU7EBOUS.js} +5 -5
- package/dist/{chunk-VFU3I6P6.js → chunk-ZEUHO2ZU.js} +16 -16
- package/dist/{chunk-ZA3RMW2P.js → chunk-ZKAW5JSN.js} +5 -8
- package/dist/cli/checkUnsupportedDataProxy.js +41 -40
- package/dist/cli/getSchema.js +46 -45
- package/dist/cli/getTypescriptVersion.d.ts +1 -0
- package/dist/cli/getTypescriptVersion.js +25 -0
- package/dist/cli/hashes.js +41 -40
- package/dist/engine-commands/errorHelpers.js +4 -4
- package/dist/engine-commands/formatSchema.js +40 -39
- package/dist/engine-commands/getConfig.js +13 -13
- package/dist/engine-commands/getDmmf.js +10 -10
- package/dist/engine-commands/getEngineVersion.js +8 -8
- package/dist/engine-commands/getEnginesMetaInfo.js +10 -10
- package/dist/engine-commands/index.js +51 -50
- package/dist/engine-commands/lintSchema.js +8 -8
- package/dist/engine-commands/mergeSchemas.js +10 -10
- package/dist/engine-commands/queryEngineCommons.js +7 -7
- package/dist/engine-commands/relativizePathInPSLError.js +2 -2
- package/dist/engine-commands/validate.js +10 -10
- package/dist/errorReporting.js +6 -6
- package/dist/get-generators/generatorResolvers/generatorResolvers.js +40 -39
- package/dist/get-generators/generatorResolvers/prisma-client-js/auto-installation/getPackageCmd.js +3 -3
- package/dist/get-generators/generatorResolvers/prisma-client-js/auto-installation/runPackageCmd.js +4 -4
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/checkTypeScriptVersion.js +40 -39
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/isYarnUsed.js +3 -3
- package/dist/get-generators/generatorResolvers/prisma-client-js/prismaClientResolver.js +41 -40
- package/dist/get-generators/getGenerators.js +43 -42
- package/dist/get-generators/utils/getBinaryPathsByVersion.js +3 -3
- package/dist/getPackedPackage.js +2 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.js +90 -88
- package/dist/{multipart-parser-LCETWFPE.js → multipart-parser-32AROPTR.js} +9 -6
- package/dist/resolveBinary.js +7 -7
- package/dist/schemaEngineCommands.js +8 -8
- package/dist/sendPanic.js +40 -39
- package/dist/tracing/types.d.ts +26 -16
- package/dist/typescript-AILDXN3I.js +205230 -0
- package/dist/typescript-WN4QH2CP.js +205192 -0
- package/dist/utils/cloudflareD1.js +3 -3
- package/dist/utils/getCommandWithExecutor.js +3 -3
- package/dist/utils/getEnvPaths.js +40 -39
- package/dist/utils/getGitHubIssueUrl.js +4 -4
- package/dist/utils/getVersionFromPackageJson.js +3 -3
- package/dist/utils/handleEngineLoadingErrors.js +3 -3
- package/dist/utils/handlePanic.js +40 -39
- package/dist/utils/isCurrentBinInstalledGlobally.d.ts +1 -1
- package/dist/utils/isCurrentBinInstalledGlobally.js +2 -2
- package/dist/utils/load.js +4 -4
- package/dist/utils/loadEnvFile.js +40 -39
- package/dist/utils/tryLoadEnvs.js +5 -5
- package/dist/wasm.js +4 -4
- package/package.json +13 -13
- package/dist/chunk-4RWCRJYD.js +0 -166
- package/dist/chunk-D4MCOTL5.js +0 -122
- package/dist/chunk-FPHZVRV4.js +0 -110
- package/dist/chunk-G7LL2H2O.js +0 -54
- package/dist/chunk-JMZHUHCC.js +0 -177
- package/dist/chunk-RQPDQSHK.js +0 -1429
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/checkYarnVersion.d.ts +0 -9
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/checkYarnVersion.js +0 -132
@@ -26,29 +26,29 @@ 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_KQOJB3ZW_exports = {};
|
30
|
+
__export(chunk_KQOJB3ZW_exports, {
|
31
31
|
ErrorKind: () => ErrorKind,
|
32
32
|
createErrorReport: () => createErrorReport,
|
33
33
|
makeErrorReportCompleted: () => makeErrorReportCompleted,
|
34
34
|
uploadZip: () => uploadZip
|
35
35
|
});
|
36
|
-
module.exports = __toCommonJS(
|
37
|
-
var
|
36
|
+
module.exports = __toCommonJS(chunk_KQOJB3ZW_exports);
|
37
|
+
var import_chunk_V2ZF7ETH = require("./chunk-V2ZF7ETH.js");
|
38
38
|
var import_fetch_engine = require("@prisma/fetch-engine");
|
39
|
-
var
|
40
|
-
var
|
41
|
-
var
|
42
|
-
var
|
43
|
-
var
|
44
|
-
var
|
45
|
-
var
|
46
|
-
var
|
47
|
-
var
|
48
|
-
var
|
49
|
-
var
|
50
|
-
var
|
51
|
-
var
|
39
|
+
var import_node_http = __toESM(require("node:http"));
|
40
|
+
var import_node_https = __toESM(require("node:https"));
|
41
|
+
var import_node_zlib = __toESM(require("node:zlib"));
|
42
|
+
var import_node_stream = __toESM(require("node:stream"));
|
43
|
+
var import_node_buffer = require("node:buffer");
|
44
|
+
var import_node_stream2 = __toESM(require("node:stream"));
|
45
|
+
var import_node_util = require("node:util");
|
46
|
+
var import_node_buffer2 = require("node:buffer");
|
47
|
+
var import_node_util2 = require("node:util");
|
48
|
+
var import_node_http2 = __toESM(require("node:http"));
|
49
|
+
var import_node_url = require("node:url");
|
50
|
+
var import_node_util3 = require("node:util");
|
51
|
+
var import_node_net = require("node:net");
|
52
52
|
function dataUriToBuffer(uri) {
|
53
53
|
if (!/^data:/i.test(uri)) {
|
54
54
|
throw new TypeError('`uri` does not appear to be a Data URI (must begin with "data:")');
|
@@ -133,7 +133,7 @@ var isSameProtocol = (destination, original) => {
|
|
133
133
|
const dest = new URL(destination).protocol;
|
134
134
|
return orig === dest;
|
135
135
|
};
|
136
|
-
var pipeline = (0,
|
136
|
+
var pipeline = (0, import_node_util.promisify)(import_node_stream2.default.pipeline);
|
137
137
|
var INTERNALS = Symbol("Body internals");
|
138
138
|
var Body = class {
|
139
139
|
constructor(body, {
|
@@ -143,25 +143,25 @@ var Body = class {
|
|
143
143
|
if (body === null) {
|
144
144
|
body = null;
|
145
145
|
} else if (isURLSearchParameters(body)) {
|
146
|
-
body =
|
146
|
+
body = import_node_buffer2.Buffer.from(body.toString());
|
147
147
|
} else if (isBlob(body)) {
|
148
|
-
} else if (
|
149
|
-
} else if (
|
150
|
-
body =
|
148
|
+
} else if (import_node_buffer2.Buffer.isBuffer(body)) {
|
149
|
+
} else if (import_node_util.types.isAnyArrayBuffer(body)) {
|
150
|
+
body = import_node_buffer2.Buffer.from(body);
|
151
151
|
} else if (ArrayBuffer.isView(body)) {
|
152
|
-
body =
|
153
|
-
} else if (body instanceof
|
154
|
-
} else if (body instanceof
|
155
|
-
body = (0,
|
152
|
+
body = import_node_buffer2.Buffer.from(body.buffer, body.byteOffset, body.byteLength);
|
153
|
+
} else if (body instanceof import_node_stream2.default) {
|
154
|
+
} else if (body instanceof import_chunk_V2ZF7ETH.FormData) {
|
155
|
+
body = (0, import_chunk_V2ZF7ETH.formDataToBlob)(body);
|
156
156
|
boundary = body.type.split("=")[1];
|
157
157
|
} else {
|
158
|
-
body =
|
158
|
+
body = import_node_buffer2.Buffer.from(String(body));
|
159
159
|
}
|
160
160
|
let stream = body;
|
161
|
-
if (
|
162
|
-
stream =
|
161
|
+
if (import_node_buffer2.Buffer.isBuffer(body)) {
|
162
|
+
stream = import_node_stream2.default.Readable.from(body);
|
163
163
|
} else if (isBlob(body)) {
|
164
|
-
stream =
|
164
|
+
stream = import_node_stream2.default.Readable.from(body.stream());
|
165
165
|
}
|
166
166
|
this[INTERNALS] = {
|
167
167
|
body,
|
@@ -171,7 +171,7 @@ var Body = class {
|
|
171
171
|
error: null
|
172
172
|
};
|
173
173
|
this.size = size;
|
174
|
-
if (body instanceof
|
174
|
+
if (body instanceof import_node_stream2.default) {
|
175
175
|
body.on("error", (error_) => {
|
176
176
|
const error = error_ instanceof FetchBaseError ? error_ : new FetchError(`Invalid response body while trying to fetch ${this.url}: ${error_.message}`, "system", error_);
|
177
177
|
this[INTERNALS].error = error;
|
@@ -196,14 +196,14 @@ var Body = class {
|
|
196
196
|
async formData() {
|
197
197
|
const ct = this.headers.get("content-type");
|
198
198
|
if (ct.startsWith("application/x-www-form-urlencoded")) {
|
199
|
-
const formData = new
|
199
|
+
const formData = new import_chunk_V2ZF7ETH.FormData();
|
200
200
|
const parameters = new URLSearchParams(await this.text());
|
201
201
|
for (const [name, value] of parameters) {
|
202
202
|
formData.append(name, value);
|
203
203
|
}
|
204
204
|
return formData;
|
205
205
|
}
|
206
|
-
const { toFormData } = await import("./multipart-parser-
|
206
|
+
const { toFormData } = await import("./multipart-parser-32AROPTR.js");
|
207
207
|
return toFormData(this.body, ct);
|
208
208
|
}
|
209
209
|
/**
|
@@ -214,7 +214,7 @@ var Body = class {
|
|
214
214
|
async blob() {
|
215
215
|
const ct = this.headers && this.headers.get("content-type") || this[INTERNALS].body && this[INTERNALS].body.type || "";
|
216
216
|
const buf = await this.arrayBuffer();
|
217
|
-
return new
|
217
|
+
return new import_chunk_V2ZF7ETH.fetch_blob_default([buf], {
|
218
218
|
type: ct
|
219
219
|
});
|
220
220
|
}
|
@@ -245,7 +245,7 @@ var Body = class {
|
|
245
245
|
return consumeBody(this);
|
246
246
|
}
|
247
247
|
};
|
248
|
-
Body.prototype.buffer = (0,
|
248
|
+
Body.prototype.buffer = (0, import_node_util.deprecate)(Body.prototype.buffer, "Please use 'response.arrayBuffer()' instead of 'response.buffer()'", "node-fetch#buffer");
|
249
249
|
Object.defineProperties(Body.prototype, {
|
250
250
|
body: { enumerable: true },
|
251
251
|
bodyUsed: { enumerable: true },
|
@@ -253,7 +253,7 @@ Object.defineProperties(Body.prototype, {
|
|
253
253
|
blob: { enumerable: true },
|
254
254
|
json: { enumerable: true },
|
255
255
|
text: { enumerable: true },
|
256
|
-
data: { get: (0,
|
256
|
+
data: { get: (0, import_node_util.deprecate)(
|
257
257
|
() => {
|
258
258
|
},
|
259
259
|
"data doesn't exist, use json(), text(), arrayBuffer(), or body instead",
|
@@ -270,10 +270,10 @@ async function consumeBody(data) {
|
|
270
270
|
}
|
271
271
|
const { body } = data;
|
272
272
|
if (body === null) {
|
273
|
-
return
|
273
|
+
return import_node_buffer2.Buffer.alloc(0);
|
274
274
|
}
|
275
|
-
if (!(body instanceof
|
276
|
-
return
|
275
|
+
if (!(body instanceof import_node_stream2.default)) {
|
276
|
+
return import_node_buffer2.Buffer.alloc(0);
|
277
277
|
}
|
278
278
|
const accum = [];
|
279
279
|
let accumBytes = 0;
|
@@ -294,9 +294,9 @@ async function consumeBody(data) {
|
|
294
294
|
if (body.readableEnded === true || body._readableState.ended === true) {
|
295
295
|
try {
|
296
296
|
if (accum.every((c) => typeof c === "string")) {
|
297
|
-
return
|
297
|
+
return import_node_buffer2.Buffer.from(accum.join(""));
|
298
298
|
}
|
299
|
-
return
|
299
|
+
return import_node_buffer2.Buffer.concat(accum, accumBytes);
|
300
300
|
} catch (error) {
|
301
301
|
throw new FetchError(`Could not create Buffer from response body for ${data.url}: ${error.message}`, "system", error);
|
302
302
|
}
|
@@ -311,9 +311,9 @@ var clone = (instance, highWaterMark) => {
|
|
311
311
|
if (instance.bodyUsed) {
|
312
312
|
throw new Error("cannot clone body after it is used");
|
313
313
|
}
|
314
|
-
if (body instanceof
|
315
|
-
p1 = new
|
316
|
-
p2 = new
|
314
|
+
if (body instanceof import_node_stream2.default && typeof body.getBoundary !== "function") {
|
315
|
+
p1 = new import_node_stream2.PassThrough({ highWaterMark });
|
316
|
+
p2 = new import_node_stream2.PassThrough({ highWaterMark });
|
317
317
|
body.pipe(p1);
|
318
318
|
body.pipe(p2);
|
319
319
|
instance[INTERNALS].stream = p1;
|
@@ -321,7 +321,7 @@ var clone = (instance, highWaterMark) => {
|
|
321
321
|
}
|
322
322
|
return body;
|
323
323
|
};
|
324
|
-
var getNonSpecFormDataBoundary = (0,
|
324
|
+
var getNonSpecFormDataBoundary = (0, import_node_util.deprecate)(
|
325
325
|
(body) => body.getBoundary(),
|
326
326
|
"form-data doesn't follow the spec and requires special treatment. Use alternative package",
|
327
327
|
"https://github.com/node-fetch/node-fetch/issues/1167"
|
@@ -339,16 +339,16 @@ var extractContentType = (body, request2) => {
|
|
339
339
|
if (isBlob(body)) {
|
340
340
|
return body.type || null;
|
341
341
|
}
|
342
|
-
if (
|
342
|
+
if (import_node_buffer2.Buffer.isBuffer(body) || import_node_util.types.isAnyArrayBuffer(body) || ArrayBuffer.isView(body)) {
|
343
343
|
return null;
|
344
344
|
}
|
345
|
-
if (body instanceof
|
345
|
+
if (body instanceof import_chunk_V2ZF7ETH.FormData) {
|
346
346
|
return `multipart/form-data; boundary=${request2[INTERNALS].boundary}`;
|
347
347
|
}
|
348
348
|
if (body && typeof body.getBoundary === "function") {
|
349
349
|
return `multipart/form-data;boundary=${getNonSpecFormDataBoundary(body)}`;
|
350
350
|
}
|
351
|
-
if (body instanceof
|
351
|
+
if (body instanceof import_node_stream2.default) {
|
352
352
|
return null;
|
353
353
|
}
|
354
354
|
return "text/plain;charset=UTF-8";
|
@@ -361,7 +361,7 @@ var getTotalBytes = (request2) => {
|
|
361
361
|
if (isBlob(body)) {
|
362
362
|
return body.size;
|
363
363
|
}
|
364
|
-
if (
|
364
|
+
if (import_node_buffer2.Buffer.isBuffer(body)) {
|
365
365
|
return body.length;
|
366
366
|
}
|
367
367
|
if (body && typeof body.getLengthSync === "function") {
|
@@ -376,14 +376,14 @@ var writeToStream = async (dest, { body }) => {
|
|
376
376
|
await pipeline(body, dest);
|
377
377
|
}
|
378
378
|
};
|
379
|
-
var validateHeaderName = typeof
|
379
|
+
var validateHeaderName = typeof import_node_http2.default.validateHeaderName === "function" ? import_node_http2.default.validateHeaderName : (name) => {
|
380
380
|
if (!/^[\^`\-\w!#$%&'*+.|~]+$/.test(name)) {
|
381
381
|
const error = new TypeError(`Header name must be a valid HTTP token [${name}]`);
|
382
382
|
Object.defineProperty(error, "code", { value: "ERR_INVALID_HTTP_TOKEN" });
|
383
383
|
throw error;
|
384
384
|
}
|
385
385
|
};
|
386
|
-
var validateHeaderValue = typeof
|
386
|
+
var validateHeaderValue = typeof import_node_http2.default.validateHeaderValue === "function" ? import_node_http2.default.validateHeaderValue : (name, value) => {
|
387
387
|
if (/[^\t\u0020-\u007E\u0080-\u00FF]/.test(value)) {
|
388
388
|
const error = new TypeError(`Invalid character in header content ["${name}"]`);
|
389
389
|
Object.defineProperty(error, "code", { value: "ERR_INVALID_CHAR" });
|
@@ -405,7 +405,7 @@ var Headers = class _Headers extends URLSearchParams {
|
|
405
405
|
result.push(...values.map((value) => [name, value]));
|
406
406
|
}
|
407
407
|
} else if (init == null) {
|
408
|
-
} else if (typeof init === "object" && !
|
408
|
+
} else if (typeof init === "object" && !import_node_util2.types.isBoxedPrimitive(init)) {
|
409
409
|
const method = init[Symbol.iterator];
|
410
410
|
if (method == null) {
|
411
411
|
result.push(...Object.entries(init));
|
@@ -414,7 +414,7 @@ var Headers = class _Headers extends URLSearchParams {
|
|
414
414
|
throw new TypeError("Header pairs must be iterable");
|
415
415
|
}
|
416
416
|
result = [...init].map((pair) => {
|
417
|
-
if (typeof pair !== "object" ||
|
417
|
+
if (typeof pair !== "object" || import_node_util2.types.isBoxedPrimitive(pair)) {
|
418
418
|
throw new TypeError("Each header pair must be an iterable object");
|
419
419
|
}
|
420
420
|
return [...pair];
|
@@ -726,7 +726,7 @@ function isOriginPotentiallyTrustworthy(url) {
|
|
726
726
|
return true;
|
727
727
|
}
|
728
728
|
const hostIp = url.host.replace(/(^\[)|(]$)/g, "");
|
729
|
-
const hostIPVersion = (0,
|
729
|
+
const hostIPVersion = (0, import_node_net.isIP)(hostIp);
|
730
730
|
if (hostIPVersion === 4 && /^127\./.test(hostIp)) {
|
731
731
|
return true;
|
732
732
|
}
|
@@ -827,7 +827,7 @@ var INTERNALS3 = Symbol("Request internals");
|
|
827
827
|
var isRequest = (object) => {
|
828
828
|
return typeof object === "object" && typeof object[INTERNALS3] === "object";
|
829
829
|
};
|
830
|
-
var doBadDataWarn = (0,
|
830
|
+
var doBadDataWarn = (0, import_node_util3.deprecate)(
|
831
831
|
() => {
|
832
832
|
},
|
833
833
|
".data is not a valid RequestInit property, use .body instead",
|
@@ -904,7 +904,7 @@ var Request = class _Request extends Body {
|
|
904
904
|
}
|
905
905
|
/** @returns {string} */
|
906
906
|
get url() {
|
907
|
-
return (0,
|
907
|
+
return (0, import_node_url.format)(this[INTERNALS3].parsedURL);
|
908
908
|
}
|
909
909
|
/** @returns {Headers} */
|
910
910
|
get headers() {
|
@@ -1033,13 +1033,13 @@ async function fetch(url, options_) {
|
|
1033
1033
|
resolve(response2);
|
1034
1034
|
return;
|
1035
1035
|
}
|
1036
|
-
const send = (parsedURL.protocol === "https:" ?
|
1036
|
+
const send = (parsedURL.protocol === "https:" ? import_node_https.default : import_node_http.default).request;
|
1037
1037
|
const { signal } = request2;
|
1038
1038
|
let response = null;
|
1039
1039
|
const abort = () => {
|
1040
1040
|
const error = new AbortError("The operation was aborted.");
|
1041
1041
|
reject(error);
|
1042
|
-
if (request2.body && request2.body instanceof
|
1042
|
+
if (request2.body && request2.body instanceof import_node_stream.default.Readable) {
|
1043
1043
|
request2.body.destroy(error);
|
1044
1044
|
}
|
1045
1045
|
if (!response || !response.body) {
|
@@ -1138,7 +1138,7 @@ async function fetch(url, options_) {
|
|
1138
1138
|
requestOptions.headers.delete(name);
|
1139
1139
|
}
|
1140
1140
|
}
|
1141
|
-
if (response_.statusCode !== 303 && request2.body && options_.body instanceof
|
1141
|
+
if (response_.statusCode !== 303 && request2.body && options_.body instanceof import_node_stream.default.Readable) {
|
1142
1142
|
reject(new FetchError("Cannot follow redirect with body being a readable stream", "unsupported-redirect"));
|
1143
1143
|
finalize();
|
1144
1144
|
return;
|
@@ -1165,7 +1165,7 @@ async function fetch(url, options_) {
|
|
1165
1165
|
signal.removeEventListener("abort", abortAndFinalize);
|
1166
1166
|
});
|
1167
1167
|
}
|
1168
|
-
let body = (0,
|
1168
|
+
let body = (0, import_node_stream.pipeline)(response_, new import_node_stream.PassThrough(), (error) => {
|
1169
1169
|
if (error) {
|
1170
1170
|
reject(error);
|
1171
1171
|
}
|
@@ -1189,11 +1189,11 @@ async function fetch(url, options_) {
|
|
1189
1189
|
return;
|
1190
1190
|
}
|
1191
1191
|
const zlibOptions = {
|
1192
|
-
flush:
|
1193
|
-
finishFlush:
|
1192
|
+
flush: import_node_zlib.default.Z_SYNC_FLUSH,
|
1193
|
+
finishFlush: import_node_zlib.default.Z_SYNC_FLUSH
|
1194
1194
|
};
|
1195
1195
|
if (codings === "gzip" || codings === "x-gzip") {
|
1196
|
-
body = (0,
|
1196
|
+
body = (0, import_node_stream.pipeline)(body, import_node_zlib.default.createGunzip(zlibOptions), (error) => {
|
1197
1197
|
if (error) {
|
1198
1198
|
reject(error);
|
1199
1199
|
}
|
@@ -1203,20 +1203,20 @@ async function fetch(url, options_) {
|
|
1203
1203
|
return;
|
1204
1204
|
}
|
1205
1205
|
if (codings === "deflate" || codings === "x-deflate") {
|
1206
|
-
const raw = (0,
|
1206
|
+
const raw = (0, import_node_stream.pipeline)(response_, new import_node_stream.PassThrough(), (error) => {
|
1207
1207
|
if (error) {
|
1208
1208
|
reject(error);
|
1209
1209
|
}
|
1210
1210
|
});
|
1211
1211
|
raw.once("data", (chunk) => {
|
1212
1212
|
if ((chunk[0] & 15) === 8) {
|
1213
|
-
body = (0,
|
1213
|
+
body = (0, import_node_stream.pipeline)(body, import_node_zlib.default.createInflate(), (error) => {
|
1214
1214
|
if (error) {
|
1215
1215
|
reject(error);
|
1216
1216
|
}
|
1217
1217
|
});
|
1218
1218
|
} else {
|
1219
|
-
body = (0,
|
1219
|
+
body = (0, import_node_stream.pipeline)(body, import_node_zlib.default.createInflateRaw(), (error) => {
|
1220
1220
|
if (error) {
|
1221
1221
|
reject(error);
|
1222
1222
|
}
|
@@ -1234,7 +1234,7 @@ async function fetch(url, options_) {
|
|
1234
1234
|
return;
|
1235
1235
|
}
|
1236
1236
|
if (codings === "br") {
|
1237
|
-
body = (0,
|
1237
|
+
body = (0, import_node_stream.pipeline)(body, import_node_zlib.default.createBrotliDecompress(), (error) => {
|
1238
1238
|
if (error) {
|
1239
1239
|
reject(error);
|
1240
1240
|
}
|
@@ -1250,7 +1250,7 @@ async function fetch(url, options_) {
|
|
1250
1250
|
});
|
1251
1251
|
}
|
1252
1252
|
function fixResponseChunkedTransferBadEnding(request2, errorCallback) {
|
1253
|
-
const LAST_CHUNK =
|
1253
|
+
const LAST_CHUNK = import_node_buffer.Buffer.from("0\r\n\r\n");
|
1254
1254
|
let isChunkedTransfer = false;
|
1255
1255
|
let properLastChunkReceived = false;
|
1256
1256
|
let previousChunk;
|
@@ -1267,9 +1267,9 @@ function fixResponseChunkedTransferBadEnding(request2, errorCallback) {
|
|
1267
1267
|
}
|
1268
1268
|
};
|
1269
1269
|
const onData = (buf) => {
|
1270
|
-
properLastChunkReceived =
|
1270
|
+
properLastChunkReceived = import_node_buffer.Buffer.compare(buf.slice(-5), LAST_CHUNK) === 0;
|
1271
1271
|
if (!properLastChunkReceived && previousChunk) {
|
1272
|
-
properLastChunkReceived =
|
1272
|
+
properLastChunkReceived = import_node_buffer.Buffer.compare(previousChunk.slice(-3), LAST_CHUNK.slice(0, 3)) === 0 && import_node_buffer.Buffer.compare(buf.slice(-2), LAST_CHUNK.slice(3)) === 0;
|
1273
1273
|
}
|
1274
1274
|
previousChunk = buf;
|
1275
1275
|
};
|
@@ -26,18 +26,18 @@ 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_KQRYQKRL_exports = {};
|
30
|
+
__export(chunk_KQRYQKRL_exports, {
|
31
31
|
GetDmmfError: () => GetDmmfError,
|
32
32
|
getDMMF: () => getDMMF
|
33
33
|
});
|
34
|
-
module.exports = __toCommonJS(
|
34
|
+
module.exports = __toCommonJS(chunk_KQRYQKRL_exports);
|
35
35
|
var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
|
36
|
-
var
|
37
|
-
var
|
36
|
+
var import_chunk_CXEMRKV4 = require("./chunk-CXEMRKV4.js");
|
37
|
+
var import_chunk_2AWSOG4B = require("./chunk-2AWSOG4B.js");
|
38
38
|
var import_chunk_PFLLVWZX = require("./chunk-PFLLVWZX.js");
|
39
|
-
var
|
40
|
-
var
|
39
|
+
var import_chunk_25RJ7YTB = require("./chunk-25RJ7YTB.js");
|
40
|
+
var import_chunk_YBCHFR5N = require("./chunk-YBCHFR5N.js");
|
41
41
|
var import_chunk_A4QWQE3W = require("./chunk-A4QWQE3W.js");
|
42
42
|
var import_chunk_7MD6344A = require("./chunk-7MD6344A.js");
|
43
43
|
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
@@ -48,7 +48,7 @@ var import_function = (0, import_chunk_WWAWV7DQ.__toESM)((0, import_chunk_PFLLVW
|
|
48
48
|
var debug = (0, import_debug.default)("prisma:getDMMF");
|
49
49
|
var GetDmmfError = class extends Error {
|
50
50
|
constructor(params) {
|
51
|
-
const constructedErrorMessage = (0,
|
51
|
+
const constructedErrorMessage = (0, import_chunk_25RJ7YTB.z)(params).with({ _tag: "parsed" }, ({ errorCode, message, reason }) => {
|
52
52
|
const errorCodeMessage = errorCode ? `Error code: ${errorCode}` : "";
|
53
53
|
return `${reason}
|
54
54
|
${errorCodeMessage}
|
@@ -60,13 +60,12 @@ ${detailsHeader} ${message}`;
|
|
60
60
|
}).exhaustive();
|
61
61
|
const errorMessageWithContext = `${constructedErrorMessage}
|
62
62
|
[Context: getDmmf]`;
|
63
|
-
super((0,
|
63
|
+
super((0, import_chunk_2AWSOG4B.addVersionDetailsToErrorMessage)(errorMessageWithContext));
|
64
64
|
this.name = "GetDmmfError";
|
65
65
|
}
|
66
66
|
};
|
67
67
|
async function getDMMF(options) {
|
68
|
-
|
69
|
-
const debugErrorType = (0, import_chunk_IAEMHQAC.createDebugErrorType)(debug, "getDmmfWasm");
|
68
|
+
const debugErrorType = (0, import_chunk_CXEMRKV4.createDebugErrorType)(debug, "getDmmfWasm");
|
70
69
|
debug(`Using getDmmf Wasm`);
|
71
70
|
const dmmfPipeline = (0, import_function.pipe)(
|
72
71
|
(0, import_chunk_7MD6344A.tryCatch2)(
|
@@ -91,13 +90,13 @@ async function getDMMF(options) {
|
|
91
90
|
() => {
|
92
91
|
if (process.env.FORCE_PANIC_QUERY_ENGINE_GET_DMMF) {
|
93
92
|
debug("Triggering a Rust panic...");
|
94
|
-
|
93
|
+
import_chunk_YBCHFR5N.prismaSchemaWasm.debug_panic();
|
95
94
|
}
|
96
95
|
const params = JSON.stringify({
|
97
96
|
prismaSchema: datamodel,
|
98
97
|
noColor: Boolean(process.env.NO_COLOR)
|
99
98
|
});
|
100
|
-
const data =
|
99
|
+
const data = import_chunk_YBCHFR5N.prismaSchemaWasm.get_dmmf(params);
|
101
100
|
return data;
|
102
101
|
},
|
103
102
|
(e) => ({
|
@@ -130,7 +129,7 @@ async function getDMMF(options) {
|
|
130
129
|
const { right: data } = dmmfEither;
|
131
130
|
return Promise.resolve(data);
|
132
131
|
}
|
133
|
-
const error = (0,
|
132
|
+
const error = (0, import_chunk_25RJ7YTB.z)(dmmfEither.left).with({ type: "read-datamodel-path" }, (e) => {
|
134
133
|
debugErrorType(e);
|
135
134
|
return new GetDmmfError({
|
136
135
|
_tag: "unparsed",
|
@@ -158,36 +157,10 @@ Datamodel path: "${e.datamodelPath}"`,
|
|
158
157
|
return panic;
|
159
158
|
}
|
160
159
|
const errorOutput = e.error.message;
|
161
|
-
return new GetDmmfError((0,
|
160
|
+
return new GetDmmfError((0, import_chunk_CXEMRKV4.parseQueryEngineError)({ errorOutput, reason: e.reason }));
|
162
161
|
}).with({ type: "parse-json" }, (e) => {
|
163
162
|
debugErrorType(e);
|
164
163
|
return new GetDmmfError({ _tag: "unparsed", message: e.error.message, reason: e.reason });
|
165
164
|
}).exhaustive();
|
166
165
|
throw error;
|
167
166
|
}
|
168
|
-
function warnOnDeprecatedFeatureFlag(previewFeatures) {
|
169
|
-
const getMessage = (flag) => `${(0, import_chunk_PG5FDKSF.blue)((0, import_chunk_PG5FDKSF.bold)("info"))} The preview flag "${flag}" is not needed anymore, please remove it from your schema.prisma`;
|
170
|
-
const removedFeatureFlagMap = {
|
171
|
-
insensitiveFilters: getMessage("insensitiveFilters"),
|
172
|
-
atomicNumberOperations: getMessage("atomicNumberOperations"),
|
173
|
-
connectOrCreate: getMessage("connectOrCreate"),
|
174
|
-
transaction: getMessage("transaction"),
|
175
|
-
nApi: getMessage("nApi"),
|
176
|
-
transactionApi: getMessage("transactionApi"),
|
177
|
-
uncheckedScalarInputs: getMessage("uncheckedScalarInputs"),
|
178
|
-
nativeTypes: getMessage("nativeTypes"),
|
179
|
-
createMany: getMessage("createMany"),
|
180
|
-
groupBy: getMessage("groupBy"),
|
181
|
-
referentialActions: getMessage("referentialActions"),
|
182
|
-
microsoftSqlServer: getMessage("microsoftSqlServer"),
|
183
|
-
selectRelationCount: getMessage("selectRelationCount"),
|
184
|
-
orderByRelation: getMessage("orderByRelation"),
|
185
|
-
orderByAggregateGroup: getMessage("orderByAggregateGroup")
|
186
|
-
};
|
187
|
-
previewFeatures?.forEach((f) => {
|
188
|
-
const removedMessage = removedFeatureFlagMap[f];
|
189
|
-
if (removedMessage && !process.env.PRISMA_HIDE_PREVIEW_FLAG_WARNINGS) {
|
190
|
-
console.warn(removedMessage);
|
191
|
-
}
|
192
|
-
});
|
193
|
-
}
|
@@ -26,19 +26,19 @@ 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_LBFL6E3O_exports = {};
|
30
|
+
__export(chunk_LBFL6E3O_exports, {
|
31
31
|
MergeSchemasError: () => MergeSchemasError,
|
32
32
|
mergeSchemas: () => mergeSchemas
|
33
33
|
});
|
34
|
-
module.exports = __toCommonJS(
|
34
|
+
module.exports = __toCommonJS(chunk_LBFL6E3O_exports);
|
35
35
|
var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
|
36
|
-
var
|
37
|
-
var
|
38
|
-
var
|
36
|
+
var import_chunk_CXEMRKV4 = require("./chunk-CXEMRKV4.js");
|
37
|
+
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
38
|
+
var import_chunk_2AWSOG4B = require("./chunk-2AWSOG4B.js");
|
39
39
|
var import_chunk_PFLLVWZX = require("./chunk-PFLLVWZX.js");
|
40
|
-
var
|
41
|
-
var
|
40
|
+
var import_chunk_25RJ7YTB = require("./chunk-25RJ7YTB.js");
|
41
|
+
var import_chunk_YBCHFR5N = require("./chunk-YBCHFR5N.js");
|
42
42
|
var import_chunk_A4QWQE3W = require("./chunk-A4QWQE3W.js");
|
43
43
|
var import_chunk_7MD6344A = require("./chunk-7MD6344A.js");
|
44
44
|
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
@@ -48,11 +48,11 @@ var import_function = (0, import_chunk_WWAWV7DQ.__toESM)((0, import_chunk_PFLLVW
|
|
48
48
|
var debug = (0, import_debug.default)("prisma:mergeSchemas");
|
49
49
|
var MergeSchemasError = class extends Error {
|
50
50
|
constructor(params) {
|
51
|
-
const constructedErrorMessage = (0,
|
51
|
+
const constructedErrorMessage = (0, import_chunk_25RJ7YTB.z)(params).with({ _tag: "parsed" }, ({ errorCode, message, reason }) => {
|
52
52
|
const errorCodeMessage = errorCode ? `Error code: ${errorCode}` : "";
|
53
53
|
return `${reason}
|
54
54
|
${errorCodeMessage}
|
55
|
-
${(0,
|
55
|
+
${(0, import_chunk_C47SCASR.relativizePathInPSLError)(message)}`;
|
56
56
|
}).with({ _tag: "unparsed" }, ({ message, reason }) => {
|
57
57
|
const detailsHeader = (0, import_chunk_PG5FDKSF.red)((0, import_chunk_PG5FDKSF.bold)("Details:"));
|
58
58
|
return `${reason}
|
@@ -60,12 +60,12 @@ ${detailsHeader} ${message}`;
|
|
60
60
|
}).exhaustive();
|
61
61
|
const errorMessageWithContext = `${constructedErrorMessage}
|
62
62
|
[Context: mergeSchemas]`;
|
63
|
-
super((0,
|
63
|
+
super((0, import_chunk_2AWSOG4B.addVersionDetailsToErrorMessage)(errorMessageWithContext));
|
64
64
|
this.name = "MergeSchemasError";
|
65
65
|
}
|
66
66
|
};
|
67
67
|
function mergeSchemas(options) {
|
68
|
-
const debugErrorType = (0,
|
68
|
+
const debugErrorType = (0, import_chunk_CXEMRKV4.createDebugErrorType)(debug, "mergeSchemasWasm");
|
69
69
|
debug(`Using mergeSchemas Wasm`);
|
70
70
|
const mergeSchemasEither = (0, import_function.pipe)(
|
71
71
|
(0, import_chunk_7MD6344A.tryCatch)(
|
@@ -73,7 +73,7 @@ function mergeSchemas(options) {
|
|
73
73
|
const params = JSON.stringify({
|
74
74
|
schema: options.schemas
|
75
75
|
});
|
76
|
-
return
|
76
|
+
return import_chunk_YBCHFR5N.prismaSchemaWasm.merge_schemas(params);
|
77
77
|
},
|
78
78
|
(e) => ({
|
79
79
|
type: "wasm-error",
|
@@ -85,7 +85,7 @@ function mergeSchemas(options) {
|
|
85
85
|
if ((0, import_chunk_7MD6344A.isRight)(mergeSchemasEither)) {
|
86
86
|
return mergeSchemasEither.right;
|
87
87
|
}
|
88
|
-
const error = (0,
|
88
|
+
const error = (0, import_chunk_25RJ7YTB.z)(mergeSchemasEither.left).with({ type: "wasm-error" }, (e) => {
|
89
89
|
debugErrorType(e);
|
90
90
|
console.error("");
|
91
91
|
if ((0, import_chunk_A4QWQE3W.isWasmPanic)(e.error)) {
|
@@ -108,7 +108,7 @@ function mergeSchemas(options) {
|
|
108
108
|
return panic;
|
109
109
|
}
|
110
110
|
const errorOutput = e.error.message;
|
111
|
-
return new MergeSchemasError((0,
|
111
|
+
return new MergeSchemasError((0, import_chunk_CXEMRKV4.parseQueryEngineError)({ errorOutput, reason: e.reason }));
|
112
112
|
}).exhaustive();
|
113
113
|
throw error;
|
114
114
|
}
|
@@ -16,13 +16,13 @@ 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_MGZOEY6N_exports = {};
|
20
|
+
__export(chunk_MGZOEY6N_exports, {
|
21
21
|
getPackageCmd: () => getPackageCmd
|
22
22
|
});
|
23
|
-
module.exports = __toCommonJS(
|
24
|
-
var
|
23
|
+
module.exports = __toCommonJS(chunk_MGZOEY6N_exports);
|
24
|
+
var import_chunk_VRT7T6MF = require("./chunk-VRT7T6MF.js");
|
25
25
|
async function getPackageCmd(cwd, cmd, ...args) {
|
26
|
-
const agent = await (0,
|
27
|
-
return (0,
|
26
|
+
const agent = await (0, import_chunk_VRT7T6MF.detect)({ autoInstall: false, cwd, programmatic: true });
|
27
|
+
return (0, import_chunk_VRT7T6MF.getCommand)(agent ?? "npm", cmd, args);
|
28
28
|
}
|