@prisma/fetch-engine 6.3.0-integration-engines-6-3-0-6-integration-5-22-0-with-simplified-typeinfo-c7d99d9db5129d8b35986b8518c7f10bc8580e03.2 → 6.3.0-integration-simpler-typeinfo-query.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-IFOGMTJY.js → chunk-43CHHWJS.js} +22 -22
- package/dist/{chunk-FKKOTNO6.js → chunk-74KKSUUB.js} +8 -8
- package/dist/{chunk-G7EM4XDM.js → chunk-BBSR4B7O.js} +40 -40
- package/dist/chunk-FQ2BOR66.js +2457 -0
- package/dist/{chunk-OFSFRIEP.js → chunk-KDPLGCY6.js} +8 -8
- package/dist/{chunk-BBQM2DBF.js → chunk-QLWYUM7O.js} +84 -84
- package/dist/chunk-QSTZGX47.js +70 -0
- package/dist/{chunk-ZAFWMCVK.js → chunk-RGVHWUUH.js} +3 -13
- package/dist/chunk-VPECQVLG.js +8153 -0
- package/dist/{chunk-TIRVZJHP.js → chunk-VTJS2JJN.js} +7 -7
- package/dist/{chunk-224FWTOK.js → chunk-XOHJAYLM.js} +21 -21
- package/dist/cleanupCache.js +4 -4
- package/dist/download.js +13 -13
- package/dist/downloadZip.js +6 -6
- package/dist/getProxyAgent.js +2 -2
- package/dist/index.js +16 -16
- package/dist/{multipart-parser-ITART6UP.js → multipart-parser-47FFAP42.js} +6 -9
- package/dist/utils.js +5 -5
- package/package.json +6 -6
@@ -26,16 +26,16 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
26
26
|
mod
|
27
27
|
));
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
29
|
-
var
|
30
|
-
__export(
|
29
|
+
var chunk_KDPLGCY6_exports = {};
|
30
|
+
__export(chunk_KDPLGCY6_exports, {
|
31
31
|
getProxyAgent: () => getProxyAgent
|
32
32
|
});
|
33
|
-
module.exports = __toCommonJS(
|
33
|
+
module.exports = __toCommonJS(chunk_KDPLGCY6_exports);
|
34
34
|
var import_chunk_AH6QHEOA = require("./chunk-AH6QHEOA.js");
|
35
35
|
var import_debug = __toESM(require("@prisma/debug"));
|
36
36
|
var import_url = __toESM(require("url"));
|
37
37
|
var require_ms = (0, import_chunk_AH6QHEOA.__commonJS)({
|
38
|
-
"../../node_modules/.pnpm/ms@2.1.
|
38
|
+
"../../node_modules/.pnpm/ms@2.1.2/node_modules/ms/index.js"(exports, module2) {
|
39
39
|
"use strict";
|
40
40
|
var s = 1e3;
|
41
41
|
var m = s * 60;
|
@@ -150,7 +150,7 @@ var require_ms = (0, import_chunk_AH6QHEOA.__commonJS)({
|
|
150
150
|
}
|
151
151
|
});
|
152
152
|
var require_common = (0, import_chunk_AH6QHEOA.__commonJS)({
|
153
|
-
"../../node_modules/.pnpm/debug@4.3.
|
153
|
+
"../../node_modules/.pnpm/debug@4.3.6/node_modules/debug/src/common.js"(exports, module2) {
|
154
154
|
"use strict";
|
155
155
|
function setup(env) {
|
156
156
|
createDebug.debug = createDebug;
|
@@ -312,7 +312,7 @@ var require_common = (0, import_chunk_AH6QHEOA.__commonJS)({
|
|
312
312
|
}
|
313
313
|
});
|
314
314
|
var require_browser = (0, import_chunk_AH6QHEOA.__commonJS)({
|
315
|
-
"../../node_modules/.pnpm/debug@4.3.
|
315
|
+
"../../node_modules/.pnpm/debug@4.3.6/node_modules/debug/src/browser.js"(exports, module2) {
|
316
316
|
"use strict";
|
317
317
|
exports.formatArgs = formatArgs;
|
318
318
|
exports.save = save;
|
@@ -604,7 +604,7 @@ var require_supports_color = (0, import_chunk_AH6QHEOA.__commonJS)({
|
|
604
604
|
}
|
605
605
|
});
|
606
606
|
var require_node = (0, import_chunk_AH6QHEOA.__commonJS)({
|
607
|
-
"../../node_modules/.pnpm/debug@4.3.
|
607
|
+
"../../node_modules/.pnpm/debug@4.3.6/node_modules/debug/src/node.js"(exports, module2) {
|
608
608
|
"use strict";
|
609
609
|
var tty = (0, import_chunk_AH6QHEOA.__require)("tty");
|
610
610
|
var util = (0, import_chunk_AH6QHEOA.__require)("util");
|
@@ -777,7 +777,7 @@ var require_node = (0, import_chunk_AH6QHEOA.__commonJS)({
|
|
777
777
|
}
|
778
778
|
});
|
779
779
|
var require_src = (0, import_chunk_AH6QHEOA.__commonJS)({
|
780
|
-
"../../node_modules/.pnpm/debug@4.3.
|
780
|
+
"../../node_modules/.pnpm/debug@4.3.6/node_modules/debug/src/index.js"(exports, module2) {
|
781
781
|
"use strict";
|
782
782
|
if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) {
|
783
783
|
module2.exports = require_browser();
|
@@ -26,36 +26,36 @@ 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_QLWYUM7O_exports = {};
|
30
|
+
__export(chunk_QLWYUM7O_exports, {
|
31
31
|
downloadZip: () => downloadZip,
|
32
32
|
require_is_stream: () => require_is_stream,
|
33
33
|
require_temp_dir: () => require_temp_dir
|
34
34
|
});
|
35
|
-
module.exports = __toCommonJS(
|
36
|
-
var
|
37
|
-
var
|
38
|
-
var
|
39
|
-
var
|
35
|
+
module.exports = __toCommonJS(chunk_QLWYUM7O_exports);
|
36
|
+
var import_chunk_VTJS2JJN = require("./chunk-VTJS2JJN.js");
|
37
|
+
var import_chunk_RGVHWUUH = require("./chunk-RGVHWUUH.js");
|
38
|
+
var import_chunk_FQ2BOR66 = require("./chunk-FQ2BOR66.js");
|
39
|
+
var import_chunk_KDPLGCY6 = require("./chunk-KDPLGCY6.js");
|
40
40
|
var import_chunk_AH6QHEOA = require("./chunk-AH6QHEOA.js");
|
41
41
|
var import_debug = __toESM(require("@prisma/debug"));
|
42
42
|
var import_fs = __toESM(require("fs"));
|
43
|
-
var
|
44
|
-
var
|
45
|
-
var import_node_zlib = __toESM(require("node:zlib"));
|
46
|
-
var import_node_stream = __toESM(require("node:stream"));
|
47
|
-
var import_node_buffer = require("node:buffer");
|
48
|
-
var import_node_stream2 = __toESM(require("node:stream"));
|
49
|
-
var import_node_util = require("node:util");
|
50
|
-
var import_node_buffer2 = require("node:buffer");
|
51
|
-
var import_node_util2 = require("node:util");
|
52
|
-
var import_node_http2 = __toESM(require("node:http"));
|
53
|
-
var import_node_url = require("node:url");
|
54
|
-
var import_node_util3 = require("node:util");
|
55
|
-
var import_node_net = require("node:net");
|
56
|
-
var import_path = __toESM(require("path"));
|
57
|
-
var import_util = require("util");
|
43
|
+
var import_http = __toESM(require("http"));
|
44
|
+
var import_https = __toESM(require("https"));
|
58
45
|
var import_zlib = __toESM(require("zlib"));
|
46
|
+
var import_stream = __toESM(require("stream"));
|
47
|
+
var import_buffer = require("buffer");
|
48
|
+
var import_stream2 = __toESM(require("stream"));
|
49
|
+
var import_util = require("util");
|
50
|
+
var import_buffer2 = require("buffer");
|
51
|
+
var import_util2 = require("util");
|
52
|
+
var import_http2 = __toESM(require("http"));
|
53
|
+
var import_url = require("url");
|
54
|
+
var import_util3 = require("util");
|
55
|
+
var import_net = require("net");
|
56
|
+
var import_path = __toESM(require("path"));
|
57
|
+
var import_util4 = require("util");
|
58
|
+
var import_zlib2 = __toESM(require("zlib"));
|
59
59
|
var require_is_stream = (0, import_chunk_AH6QHEOA.__commonJS)({
|
60
60
|
"../../node_modules/.pnpm/is-stream@2.0.1/node_modules/is-stream/index.js"(exports, module2) {
|
61
61
|
"use strict";
|
@@ -6594,11 +6594,11 @@ var require_del = (0, import_chunk_AH6QHEOA.__commonJS)({
|
|
6594
6594
|
var globby = require_globby();
|
6595
6595
|
var isGlob = require_is_glob();
|
6596
6596
|
var slash = require_slash();
|
6597
|
-
var gracefulFs = (0,
|
6597
|
+
var gracefulFs = (0, import_chunk_FQ2BOR66.require_graceful_fs)();
|
6598
6598
|
var isPathCwd = require_is_path_cwd();
|
6599
6599
|
var isPathInside = require_is_path_inside();
|
6600
|
-
var rimraf2 = (0,
|
6601
|
-
var pMap = (0,
|
6600
|
+
var rimraf2 = (0, import_chunk_RGVHWUUH.require_rimraf)();
|
6601
|
+
var pMap = (0, import_chunk_RGVHWUUH.require_p_map)();
|
6602
6602
|
var rimrafP = promisify3(rimraf2);
|
6603
6603
|
var rimrafOptions = {
|
6604
6604
|
glob: false,
|
@@ -6844,7 +6844,7 @@ var isSameProtocol = (destination, original) => {
|
|
6844
6844
|
const dest = new URL(destination).protocol;
|
6845
6845
|
return orig === dest;
|
6846
6846
|
};
|
6847
|
-
var pipeline = (0,
|
6847
|
+
var pipeline = (0, import_util.promisify)(import_stream2.default.pipeline);
|
6848
6848
|
var INTERNALS = Symbol("Body internals");
|
6849
6849
|
var Body = class {
|
6850
6850
|
constructor(body, {
|
@@ -6854,25 +6854,25 @@ var Body = class {
|
|
6854
6854
|
if (body === null) {
|
6855
6855
|
body = null;
|
6856
6856
|
} else if (isURLSearchParameters(body)) {
|
6857
|
-
body =
|
6857
|
+
body = import_buffer2.Buffer.from(body.toString());
|
6858
6858
|
} else if (isBlob(body)) {
|
6859
|
-
} else if (
|
6860
|
-
} else if (
|
6861
|
-
body =
|
6859
|
+
} else if (import_buffer2.Buffer.isBuffer(body)) {
|
6860
|
+
} else if (import_util.types.isAnyArrayBuffer(body)) {
|
6861
|
+
body = import_buffer2.Buffer.from(body);
|
6862
6862
|
} else if (ArrayBuffer.isView(body)) {
|
6863
|
-
body =
|
6864
|
-
} else if (body instanceof
|
6865
|
-
} else if (body instanceof
|
6866
|
-
body = (0,
|
6863
|
+
body = import_buffer2.Buffer.from(body.buffer, body.byteOffset, body.byteLength);
|
6864
|
+
} else if (body instanceof import_stream2.default) {
|
6865
|
+
} else if (body instanceof import_chunk_VTJS2JJN.FormData) {
|
6866
|
+
body = (0, import_chunk_VTJS2JJN.formDataToBlob)(body);
|
6867
6867
|
boundary = body.type.split("=")[1];
|
6868
6868
|
} else {
|
6869
|
-
body =
|
6869
|
+
body = import_buffer2.Buffer.from(String(body));
|
6870
6870
|
}
|
6871
6871
|
let stream = body;
|
6872
|
-
if (
|
6873
|
-
stream =
|
6872
|
+
if (import_buffer2.Buffer.isBuffer(body)) {
|
6873
|
+
stream = import_stream2.default.Readable.from(body);
|
6874
6874
|
} else if (isBlob(body)) {
|
6875
|
-
stream =
|
6875
|
+
stream = import_stream2.default.Readable.from(body.stream());
|
6876
6876
|
}
|
6877
6877
|
this[INTERNALS] = {
|
6878
6878
|
body,
|
@@ -6882,7 +6882,7 @@ var Body = class {
|
|
6882
6882
|
error: null
|
6883
6883
|
};
|
6884
6884
|
this.size = size;
|
6885
|
-
if (body instanceof
|
6885
|
+
if (body instanceof import_stream2.default) {
|
6886
6886
|
body.on("error", (error_) => {
|
6887
6887
|
const error = error_ instanceof FetchBaseError ? error_ : new FetchError(`Invalid response body while trying to fetch ${this.url}: ${error_.message}`, "system", error_);
|
6888
6888
|
this[INTERNALS].error = error;
|
@@ -6907,14 +6907,14 @@ var Body = class {
|
|
6907
6907
|
async formData() {
|
6908
6908
|
const ct = this.headers.get("content-type");
|
6909
6909
|
if (ct.startsWith("application/x-www-form-urlencoded")) {
|
6910
|
-
const formData = new
|
6910
|
+
const formData = new import_chunk_VTJS2JJN.FormData();
|
6911
6911
|
const parameters = new URLSearchParams(await this.text());
|
6912
6912
|
for (const [name, value] of parameters) {
|
6913
6913
|
formData.append(name, value);
|
6914
6914
|
}
|
6915
6915
|
return formData;
|
6916
6916
|
}
|
6917
|
-
const { toFormData } = await import("./multipart-parser-
|
6917
|
+
const { toFormData } = await import("./multipart-parser-47FFAP42.js");
|
6918
6918
|
return toFormData(this.body, ct);
|
6919
6919
|
}
|
6920
6920
|
/**
|
@@ -6925,7 +6925,7 @@ var Body = class {
|
|
6925
6925
|
async blob() {
|
6926
6926
|
const ct = this.headers && this.headers.get("content-type") || this[INTERNALS].body && this[INTERNALS].body.type || "";
|
6927
6927
|
const buf = await this.arrayBuffer();
|
6928
|
-
return new
|
6928
|
+
return new import_chunk_VTJS2JJN.fetch_blob_default([buf], {
|
6929
6929
|
type: ct
|
6930
6930
|
});
|
6931
6931
|
}
|
@@ -6956,7 +6956,7 @@ var Body = class {
|
|
6956
6956
|
return consumeBody(this);
|
6957
6957
|
}
|
6958
6958
|
};
|
6959
|
-
Body.prototype.buffer = (0,
|
6959
|
+
Body.prototype.buffer = (0, import_util.deprecate)(Body.prototype.buffer, "Please use 'response.arrayBuffer()' instead of 'response.buffer()'", "node-fetch#buffer");
|
6960
6960
|
Object.defineProperties(Body.prototype, {
|
6961
6961
|
body: { enumerable: true },
|
6962
6962
|
bodyUsed: { enumerable: true },
|
@@ -6964,7 +6964,7 @@ Object.defineProperties(Body.prototype, {
|
|
6964
6964
|
blob: { enumerable: true },
|
6965
6965
|
json: { enumerable: true },
|
6966
6966
|
text: { enumerable: true },
|
6967
|
-
data: { get: (0,
|
6967
|
+
data: { get: (0, import_util.deprecate)(
|
6968
6968
|
() => {
|
6969
6969
|
},
|
6970
6970
|
"data doesn't exist, use json(), text(), arrayBuffer(), or body instead",
|
@@ -6981,10 +6981,10 @@ async function consumeBody(data) {
|
|
6981
6981
|
}
|
6982
6982
|
const { body } = data;
|
6983
6983
|
if (body === null) {
|
6984
|
-
return
|
6984
|
+
return import_buffer2.Buffer.alloc(0);
|
6985
6985
|
}
|
6986
|
-
if (!(body instanceof
|
6987
|
-
return
|
6986
|
+
if (!(body instanceof import_stream2.default)) {
|
6987
|
+
return import_buffer2.Buffer.alloc(0);
|
6988
6988
|
}
|
6989
6989
|
const accum = [];
|
6990
6990
|
let accumBytes = 0;
|
@@ -7005,9 +7005,9 @@ async function consumeBody(data) {
|
|
7005
7005
|
if (body.readableEnded === true || body._readableState.ended === true) {
|
7006
7006
|
try {
|
7007
7007
|
if (accum.every((c) => typeof c === "string")) {
|
7008
|
-
return
|
7008
|
+
return import_buffer2.Buffer.from(accum.join(""));
|
7009
7009
|
}
|
7010
|
-
return
|
7010
|
+
return import_buffer2.Buffer.concat(accum, accumBytes);
|
7011
7011
|
} catch (error) {
|
7012
7012
|
throw new FetchError(`Could not create Buffer from response body for ${data.url}: ${error.message}`, "system", error);
|
7013
7013
|
}
|
@@ -7022,9 +7022,9 @@ var clone = (instance, highWaterMark) => {
|
|
7022
7022
|
if (instance.bodyUsed) {
|
7023
7023
|
throw new Error("cannot clone body after it is used");
|
7024
7024
|
}
|
7025
|
-
if (body instanceof
|
7026
|
-
p1 = new
|
7027
|
-
p2 = new
|
7025
|
+
if (body instanceof import_stream2.default && typeof body.getBoundary !== "function") {
|
7026
|
+
p1 = new import_stream2.PassThrough({ highWaterMark });
|
7027
|
+
p2 = new import_stream2.PassThrough({ highWaterMark });
|
7028
7028
|
body.pipe(p1);
|
7029
7029
|
body.pipe(p2);
|
7030
7030
|
instance[INTERNALS].stream = p1;
|
@@ -7032,7 +7032,7 @@ var clone = (instance, highWaterMark) => {
|
|
7032
7032
|
}
|
7033
7033
|
return body;
|
7034
7034
|
};
|
7035
|
-
var getNonSpecFormDataBoundary = (0,
|
7035
|
+
var getNonSpecFormDataBoundary = (0, import_util.deprecate)(
|
7036
7036
|
(body) => body.getBoundary(),
|
7037
7037
|
"form-data doesn't follow the spec and requires special treatment. Use alternative package",
|
7038
7038
|
"https://github.com/node-fetch/node-fetch/issues/1167"
|
@@ -7050,16 +7050,16 @@ var extractContentType = (body, request) => {
|
|
7050
7050
|
if (isBlob(body)) {
|
7051
7051
|
return body.type || null;
|
7052
7052
|
}
|
7053
|
-
if (
|
7053
|
+
if (import_buffer2.Buffer.isBuffer(body) || import_util.types.isAnyArrayBuffer(body) || ArrayBuffer.isView(body)) {
|
7054
7054
|
return null;
|
7055
7055
|
}
|
7056
|
-
if (body instanceof
|
7056
|
+
if (body instanceof import_chunk_VTJS2JJN.FormData) {
|
7057
7057
|
return `multipart/form-data; boundary=${request[INTERNALS].boundary}`;
|
7058
7058
|
}
|
7059
7059
|
if (body && typeof body.getBoundary === "function") {
|
7060
7060
|
return `multipart/form-data;boundary=${getNonSpecFormDataBoundary(body)}`;
|
7061
7061
|
}
|
7062
|
-
if (body instanceof
|
7062
|
+
if (body instanceof import_stream2.default) {
|
7063
7063
|
return null;
|
7064
7064
|
}
|
7065
7065
|
return "text/plain;charset=UTF-8";
|
@@ -7072,7 +7072,7 @@ var getTotalBytes = (request) => {
|
|
7072
7072
|
if (isBlob(body)) {
|
7073
7073
|
return body.size;
|
7074
7074
|
}
|
7075
|
-
if (
|
7075
|
+
if (import_buffer2.Buffer.isBuffer(body)) {
|
7076
7076
|
return body.length;
|
7077
7077
|
}
|
7078
7078
|
if (body && typeof body.getLengthSync === "function") {
|
@@ -7087,14 +7087,14 @@ var writeToStream = async (dest, { body }) => {
|
|
7087
7087
|
await pipeline(body, dest);
|
7088
7088
|
}
|
7089
7089
|
};
|
7090
|
-
var validateHeaderName = typeof
|
7090
|
+
var validateHeaderName = typeof import_http2.default.validateHeaderName === "function" ? import_http2.default.validateHeaderName : (name) => {
|
7091
7091
|
if (!/^[\^`\-\w!#$%&'*+.|~]+$/.test(name)) {
|
7092
7092
|
const error = new TypeError(`Header name must be a valid HTTP token [${name}]`);
|
7093
7093
|
Object.defineProperty(error, "code", { value: "ERR_INVALID_HTTP_TOKEN" });
|
7094
7094
|
throw error;
|
7095
7095
|
}
|
7096
7096
|
};
|
7097
|
-
var validateHeaderValue = typeof
|
7097
|
+
var validateHeaderValue = typeof import_http2.default.validateHeaderValue === "function" ? import_http2.default.validateHeaderValue : (name, value) => {
|
7098
7098
|
if (/[^\t\u0020-\u007E\u0080-\u00FF]/.test(value)) {
|
7099
7099
|
const error = new TypeError(`Invalid character in header content ["${name}"]`);
|
7100
7100
|
Object.defineProperty(error, "code", { value: "ERR_INVALID_CHAR" });
|
@@ -7116,7 +7116,7 @@ var Headers = class _Headers extends URLSearchParams {
|
|
7116
7116
|
result.push(...values.map((value) => [name, value]));
|
7117
7117
|
}
|
7118
7118
|
} else if (init == null) {
|
7119
|
-
} else if (typeof init === "object" && !
|
7119
|
+
} else if (typeof init === "object" && !import_util2.types.isBoxedPrimitive(init)) {
|
7120
7120
|
const method = init[Symbol.iterator];
|
7121
7121
|
if (method == null) {
|
7122
7122
|
result.push(...Object.entries(init));
|
@@ -7125,7 +7125,7 @@ var Headers = class _Headers extends URLSearchParams {
|
|
7125
7125
|
throw new TypeError("Header pairs must be iterable");
|
7126
7126
|
}
|
7127
7127
|
result = [...init].map((pair) => {
|
7128
|
-
if (typeof pair !== "object" ||
|
7128
|
+
if (typeof pair !== "object" || import_util2.types.isBoxedPrimitive(pair)) {
|
7129
7129
|
throw new TypeError("Each header pair must be an iterable object");
|
7130
7130
|
}
|
7131
7131
|
return [...pair];
|
@@ -7437,7 +7437,7 @@ function isOriginPotentiallyTrustworthy(url) {
|
|
7437
7437
|
return true;
|
7438
7438
|
}
|
7439
7439
|
const hostIp = url.host.replace(/(^\[)|(]$)/g, "");
|
7440
|
-
const hostIPVersion = (0,
|
7440
|
+
const hostIPVersion = (0, import_net.isIP)(hostIp);
|
7441
7441
|
if (hostIPVersion === 4 && /^127\./.test(hostIp)) {
|
7442
7442
|
return true;
|
7443
7443
|
}
|
@@ -7538,7 +7538,7 @@ var INTERNALS3 = Symbol("Request internals");
|
|
7538
7538
|
var isRequest = (object) => {
|
7539
7539
|
return typeof object === "object" && typeof object[INTERNALS3] === "object";
|
7540
7540
|
};
|
7541
|
-
var doBadDataWarn = (0,
|
7541
|
+
var doBadDataWarn = (0, import_util3.deprecate)(
|
7542
7542
|
() => {
|
7543
7543
|
},
|
7544
7544
|
".data is not a valid RequestInit property, use .body instead",
|
@@ -7615,7 +7615,7 @@ var Request = class _Request extends Body {
|
|
7615
7615
|
}
|
7616
7616
|
/** @returns {string} */
|
7617
7617
|
get url() {
|
7618
|
-
return (0,
|
7618
|
+
return (0, import_url.format)(this[INTERNALS3].parsedURL);
|
7619
7619
|
}
|
7620
7620
|
/** @returns {Headers} */
|
7621
7621
|
get headers() {
|
@@ -7744,13 +7744,13 @@ async function fetch(url, options_) {
|
|
7744
7744
|
resolve(response2);
|
7745
7745
|
return;
|
7746
7746
|
}
|
7747
|
-
const send = (parsedURL.protocol === "https:" ?
|
7747
|
+
const send = (parsedURL.protocol === "https:" ? import_https.default : import_http.default).request;
|
7748
7748
|
const { signal } = request;
|
7749
7749
|
let response = null;
|
7750
7750
|
const abort = () => {
|
7751
7751
|
const error = new AbortError("The operation was aborted.");
|
7752
7752
|
reject(error);
|
7753
|
-
if (request.body && request.body instanceof
|
7753
|
+
if (request.body && request.body instanceof import_stream.default.Readable) {
|
7754
7754
|
request.body.destroy(error);
|
7755
7755
|
}
|
7756
7756
|
if (!response || !response.body) {
|
@@ -7849,7 +7849,7 @@ async function fetch(url, options_) {
|
|
7849
7849
|
requestOptions.headers.delete(name);
|
7850
7850
|
}
|
7851
7851
|
}
|
7852
|
-
if (response_.statusCode !== 303 && request.body && options_.body instanceof
|
7852
|
+
if (response_.statusCode !== 303 && request.body && options_.body instanceof import_stream.default.Readable) {
|
7853
7853
|
reject(new FetchError("Cannot follow redirect with body being a readable stream", "unsupported-redirect"));
|
7854
7854
|
finalize();
|
7855
7855
|
return;
|
@@ -7876,7 +7876,7 @@ async function fetch(url, options_) {
|
|
7876
7876
|
signal.removeEventListener("abort", abortAndFinalize);
|
7877
7877
|
});
|
7878
7878
|
}
|
7879
|
-
let body = (0,
|
7879
|
+
let body = (0, import_stream.pipeline)(response_, new import_stream.PassThrough(), (error) => {
|
7880
7880
|
if (error) {
|
7881
7881
|
reject(error);
|
7882
7882
|
}
|
@@ -7900,11 +7900,11 @@ async function fetch(url, options_) {
|
|
7900
7900
|
return;
|
7901
7901
|
}
|
7902
7902
|
const zlibOptions = {
|
7903
|
-
flush:
|
7904
|
-
finishFlush:
|
7903
|
+
flush: import_zlib.default.Z_SYNC_FLUSH,
|
7904
|
+
finishFlush: import_zlib.default.Z_SYNC_FLUSH
|
7905
7905
|
};
|
7906
7906
|
if (codings === "gzip" || codings === "x-gzip") {
|
7907
|
-
body = (0,
|
7907
|
+
body = (0, import_stream.pipeline)(body, import_zlib.default.createGunzip(zlibOptions), (error) => {
|
7908
7908
|
if (error) {
|
7909
7909
|
reject(error);
|
7910
7910
|
}
|
@@ -7914,20 +7914,20 @@ async function fetch(url, options_) {
|
|
7914
7914
|
return;
|
7915
7915
|
}
|
7916
7916
|
if (codings === "deflate" || codings === "x-deflate") {
|
7917
|
-
const raw = (0,
|
7917
|
+
const raw = (0, import_stream.pipeline)(response_, new import_stream.PassThrough(), (error) => {
|
7918
7918
|
if (error) {
|
7919
7919
|
reject(error);
|
7920
7920
|
}
|
7921
7921
|
});
|
7922
7922
|
raw.once("data", (chunk) => {
|
7923
7923
|
if ((chunk[0] & 15) === 8) {
|
7924
|
-
body = (0,
|
7924
|
+
body = (0, import_stream.pipeline)(body, import_zlib.default.createInflate(), (error) => {
|
7925
7925
|
if (error) {
|
7926
7926
|
reject(error);
|
7927
7927
|
}
|
7928
7928
|
});
|
7929
7929
|
} else {
|
7930
|
-
body = (0,
|
7930
|
+
body = (0, import_stream.pipeline)(body, import_zlib.default.createInflateRaw(), (error) => {
|
7931
7931
|
if (error) {
|
7932
7932
|
reject(error);
|
7933
7933
|
}
|
@@ -7945,7 +7945,7 @@ async function fetch(url, options_) {
|
|
7945
7945
|
return;
|
7946
7946
|
}
|
7947
7947
|
if (codings === "br") {
|
7948
|
-
body = (0,
|
7948
|
+
body = (0, import_stream.pipeline)(body, import_zlib.default.createBrotliDecompress(), (error) => {
|
7949
7949
|
if (error) {
|
7950
7950
|
reject(error);
|
7951
7951
|
}
|
@@ -7961,7 +7961,7 @@ async function fetch(url, options_) {
|
|
7961
7961
|
});
|
7962
7962
|
}
|
7963
7963
|
function fixResponseChunkedTransferBadEnding(request, errorCallback) {
|
7964
|
-
const LAST_CHUNK =
|
7964
|
+
const LAST_CHUNK = import_buffer.Buffer.from("0\r\n\r\n");
|
7965
7965
|
let isChunkedTransfer = false;
|
7966
7966
|
let properLastChunkReceived = false;
|
7967
7967
|
let previousChunk;
|
@@ -7978,9 +7978,9 @@ function fixResponseChunkedTransferBadEnding(request, errorCallback) {
|
|
7978
7978
|
}
|
7979
7979
|
};
|
7980
7980
|
const onData = (buf) => {
|
7981
|
-
properLastChunkReceived =
|
7981
|
+
properLastChunkReceived = import_buffer.Buffer.compare(buf.slice(-5), LAST_CHUNK) === 0;
|
7982
7982
|
if (!properLastChunkReceived && previousChunk) {
|
7983
|
-
properLastChunkReceived =
|
7983
|
+
properLastChunkReceived = import_buffer.Buffer.compare(previousChunk.slice(-3), LAST_CHUNK.slice(0, 3)) === 0 && import_buffer.Buffer.compare(buf.slice(-2), LAST_CHUNK.slice(3)) === 0;
|
7984
7984
|
}
|
7985
7985
|
previousChunk = buf;
|
7986
7986
|
};
|
@@ -7993,15 +7993,15 @@ function fixResponseChunkedTransferBadEnding(request, errorCallback) {
|
|
7993
7993
|
});
|
7994
7994
|
}
|
7995
7995
|
var import_p_retry = (0, import_chunk_AH6QHEOA.__toESM)(require_p_retry());
|
7996
|
-
var import_rimraf = (0, import_chunk_AH6QHEOA.__toESM)((0,
|
7996
|
+
var import_rimraf = (0, import_chunk_AH6QHEOA.__toESM)((0, import_chunk_RGVHWUUH.require_rimraf)());
|
7997
7997
|
var import_tempy = (0, import_chunk_AH6QHEOA.__toESM)(require_tempy());
|
7998
7998
|
var debug = (0, import_debug.default)("prisma:fetch-engine:downloadZip");
|
7999
|
-
var del = (0,
|
7999
|
+
var del = (0, import_util4.promisify)(import_rimraf.default);
|
8000
8000
|
async function fetchChecksum(url) {
|
8001
8001
|
try {
|
8002
8002
|
const checksumUrl = `${url}.sha256`;
|
8003
8003
|
const response = await fetch(checksumUrl, {
|
8004
|
-
agent: (0,
|
8004
|
+
agent: (0, import_chunk_KDPLGCY6.getProxyAgent)(url)
|
8005
8005
|
});
|
8006
8006
|
if (!response.ok) {
|
8007
8007
|
let errorMessage = `Failed to fetch sha256 checksum at ${checksumUrl} - ${response.status} ${response.statusText}`;
|
@@ -8047,7 +8047,7 @@ async function downloadZip(url, target, progressCb) {
|
|
8047
8047
|
async () => {
|
8048
8048
|
const response = await fetch(url, {
|
8049
8049
|
compress: false,
|
8050
|
-
agent: (0,
|
8050
|
+
agent: (0, import_chunk_KDPLGCY6.getProxyAgent)(url)
|
8051
8051
|
});
|
8052
8052
|
if (!response.ok) {
|
8053
8053
|
throw new Error(`Failed to fetch the engine file at ${url} - ${response.status} ${response.statusText}`);
|
@@ -8066,7 +8066,7 @@ async function downloadZip(url, target, progressCb) {
|
|
8066
8066
|
progressCb(bytesRead / size);
|
8067
8067
|
}
|
8068
8068
|
});
|
8069
|
-
const gunzip =
|
8069
|
+
const gunzip = import_zlib2.default.createGunzip();
|
8070
8070
|
gunzip.on("error", reject);
|
8071
8071
|
const zipStream = response.body.pipe(gunzip);
|
8072
8072
|
const zippedHashPromise = import_hasha.default.fromStream(response.body, {
|
@@ -8094,7 +8094,7 @@ async function downloadZip(url, target, progressCb) {
|
|
8094
8094
|
onFailedAttempt: (err) => debug("An error occurred while downloading the engine file", err)
|
8095
8095
|
}
|
8096
8096
|
);
|
8097
|
-
await (0,
|
8097
|
+
await (0, import_chunk_FQ2BOR66.overwriteFile)(partial, target);
|
8098
8098
|
try {
|
8099
8099
|
await del(partial);
|
8100
8100
|
await del(tmpDir);
|
@@ -0,0 +1,70 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __create = Object.create;
|
3
|
+
var __defProp = Object.defineProperty;
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
8
|
+
var __export = (target, all) => {
|
9
|
+
for (var name in all)
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
11
|
+
};
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
14
|
+
for (let key of __getOwnPropNames(from))
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
17
|
+
}
|
18
|
+
return to;
|
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
|
+
));
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
29
|
+
var chunk_QSTZGX47_exports = {};
|
30
|
+
__export(chunk_QSTZGX47_exports, {
|
31
|
+
cleanupCache: () => cleanupCache
|
32
|
+
});
|
33
|
+
module.exports = __toCommonJS(chunk_QSTZGX47_exports);
|
34
|
+
var import_chunk_RGVHWUUH = require("./chunk-RGVHWUUH.js");
|
35
|
+
var import_chunk_FQ2BOR66 = require("./chunk-FQ2BOR66.js");
|
36
|
+
var import_chunk_AH6QHEOA = require("./chunk-AH6QHEOA.js");
|
37
|
+
var import_debug = __toESM(require("@prisma/debug"));
|
38
|
+
var import_fs = __toESM(require("fs"));
|
39
|
+
var import_path = __toESM(require("path"));
|
40
|
+
var import_util = require("util");
|
41
|
+
var import_p_map = (0, import_chunk_AH6QHEOA.__toESM)((0, import_chunk_RGVHWUUH.require_p_map)());
|
42
|
+
var import_rimraf = (0, import_chunk_AH6QHEOA.__toESM)((0, import_chunk_RGVHWUUH.require_rimraf)());
|
43
|
+
var debug = (0, import_debug.default)("cleanupCache");
|
44
|
+
var del = (0, import_util.promisify)(import_rimraf.default);
|
45
|
+
async function cleanupCache(n = 5) {
|
46
|
+
try {
|
47
|
+
const rootCacheDir = await (0, import_chunk_FQ2BOR66.getRootCacheDir)();
|
48
|
+
if (!rootCacheDir) {
|
49
|
+
debug("no rootCacheDir found");
|
50
|
+
return;
|
51
|
+
}
|
52
|
+
const channel = "master";
|
53
|
+
const cacheDir = import_path.default.join(rootCacheDir, channel);
|
54
|
+
const dirs = await import_fs.default.promises.readdir(cacheDir);
|
55
|
+
const dirsWithMeta = await Promise.all(
|
56
|
+
dirs.map(async (dirName) => {
|
57
|
+
const dir = import_path.default.join(cacheDir, dirName);
|
58
|
+
const statResult = await import_fs.default.promises.stat(dir);
|
59
|
+
return {
|
60
|
+
dir,
|
61
|
+
created: statResult.birthtime
|
62
|
+
};
|
63
|
+
})
|
64
|
+
);
|
65
|
+
dirsWithMeta.sort((a, b) => a.created < b.created ? 1 : -1);
|
66
|
+
const dirsToRemove = dirsWithMeta.slice(n);
|
67
|
+
await (0, import_p_map.default)(dirsToRemove, (dir) => del(dir.dir), { concurrency: 20 });
|
68
|
+
} catch (e) {
|
69
|
+
}
|
70
|
+
}
|
@@ -16,12 +16,12 @@ var __copyProps = (to, from, except, desc) => {
|
|
16
16
|
return to;
|
17
17
|
};
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
19
|
-
var
|
20
|
-
__export(
|
19
|
+
var chunk_RGVHWUUH_exports = {};
|
20
|
+
__export(chunk_RGVHWUUH_exports, {
|
21
21
|
require_p_map: () => require_p_map,
|
22
22
|
require_rimraf: () => require_rimraf
|
23
23
|
});
|
24
|
-
module.exports = __toCommonJS(
|
24
|
+
module.exports = __toCommonJS(chunk_RGVHWUUH_exports);
|
25
25
|
var import_chunk_AH6QHEOA = require("./chunk-AH6QHEOA.js");
|
26
26
|
var require_indent_string = (0, import_chunk_AH6QHEOA.__commonJS)({
|
27
27
|
"../../node_modules/.pnpm/indent-string@4.0.0/node_modules/indent-string/index.js"(exports, module2) {
|
@@ -903,7 +903,6 @@ var require_minimatch = (0, import_chunk_AH6QHEOA.__commonJS)({
|
|
903
903
|
continue;
|
904
904
|
}
|
905
905
|
switch (c) {
|
906
|
-
/* istanbul ignore next */
|
907
906
|
case "/": {
|
908
907
|
return false;
|
909
908
|
}
|
@@ -911,8 +910,6 @@ var require_minimatch = (0, import_chunk_AH6QHEOA.__commonJS)({
|
|
911
910
|
clearStateChar();
|
912
911
|
escaping = true;
|
913
912
|
continue;
|
914
|
-
// the various stateChar values
|
915
|
-
// for the "extglob" stuff.
|
916
913
|
case "?":
|
917
914
|
case "*":
|
918
915
|
case "+":
|
@@ -973,7 +970,6 @@ var require_minimatch = (0, import_chunk_AH6QHEOA.__commonJS)({
|
|
973
970
|
clearStateChar();
|
974
971
|
re += "|";
|
975
972
|
continue;
|
976
|
-
// these are mostly the same in regexp and glob
|
977
973
|
case "[":
|
978
974
|
clearStateChar();
|
979
975
|
if (inClass) {
|
@@ -1559,7 +1555,6 @@ var require_sync = (0, import_chunk_AH6QHEOA.__commonJS)({
|
|
1559
1555
|
}
|
1560
1556
|
var prefix;
|
1561
1557
|
switch (n) {
|
1562
|
-
// if not, then this is rather simple
|
1563
1558
|
case pattern.length:
|
1564
1559
|
this._processSimple(pattern.join("/"), index);
|
1565
1560
|
return;
|
@@ -1721,7 +1716,6 @@ var require_sync = (0, import_chunk_AH6QHEOA.__commonJS)({
|
|
1721
1716
|
GlobSync.prototype._readdirError = function(f, er) {
|
1722
1717
|
switch (er.code) {
|
1723
1718
|
case "ENOTSUP":
|
1724
|
-
// https://github.com/isaacs/node-glob/issues/205
|
1725
1719
|
case "ENOTDIR":
|
1726
1720
|
var abs = this._makeAbs(f);
|
1727
1721
|
this.cache[abs] = "FILE";
|
@@ -1733,7 +1727,6 @@ var require_sync = (0, import_chunk_AH6QHEOA.__commonJS)({
|
|
1733
1727
|
}
|
1734
1728
|
break;
|
1735
1729
|
case "ENOENT":
|
1736
|
-
// not terribly unusual
|
1737
1730
|
case "ELOOP":
|
1738
1731
|
case "ENAMETOOLONG":
|
1739
1732
|
case "UNKNOWN":
|
@@ -2177,7 +2170,6 @@ var require_glob = (0, import_chunk_AH6QHEOA.__commonJS)({
|
|
2177
2170
|
}
|
2178
2171
|
var prefix;
|
2179
2172
|
switch (n) {
|
2180
|
-
// if not, then this is rather simple
|
2181
2173
|
case pattern.length:
|
2182
2174
|
this._processSimple(pattern.join("/"), index, cb);
|
2183
2175
|
return;
|
@@ -2367,7 +2359,6 @@ var require_glob = (0, import_chunk_AH6QHEOA.__commonJS)({
|
|
2367
2359
|
return;
|
2368
2360
|
switch (er.code) {
|
2369
2361
|
case "ENOTSUP":
|
2370
|
-
// https://github.com/isaacs/node-glob/issues/205
|
2371
2362
|
case "ENOTDIR":
|
2372
2363
|
var abs = this._makeAbs(f);
|
2373
2364
|
this.cache[abs] = "FILE";
|
@@ -2380,7 +2371,6 @@ var require_glob = (0, import_chunk_AH6QHEOA.__commonJS)({
|
|
2380
2371
|
}
|
2381
2372
|
break;
|
2382
2373
|
case "ENOENT":
|
2383
|
-
// not terribly unusual
|
2384
2374
|
case "ELOOP":
|
2385
2375
|
case "ENAMETOOLONG":
|
2386
2376
|
case "UNKNOWN":
|