@prisma/fetch-engine 6.17.0-dev.2 → 6.17.0-dev.3
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-NA32AGOU.js → chunk-BPSZDGRL.js} +78 -21
- package/dist/{chunk-4GLRZ2GS.js → chunk-CAMEZM54.js} +12 -12
- package/dist/chunk-FSAAZH62.js +190 -0
- package/dist/{chunk-YNVJNBET.js → chunk-PHU6QDY6.js} +9 -10
- package/dist/{chunk-LUEZKII4.js → chunk-UYEM6UQM.js} +10 -11
- package/dist/cleanupCache.js +3 -3
- package/dist/download.js +10 -10
- package/dist/downloadZip.js +3 -3
- package/dist/index.js +10 -10
- package/package.json +3 -4
- package/dist/chunk-SVP4SRAT.js +0 -7471
@@ -26,23 +26,25 @@ 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_BPSZDGRL_exports = {};
|
30
|
+
__export(chunk_BPSZDGRL_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(
|
35
|
+
module.exports = __toCommonJS(chunk_BPSZDGRL_exports);
|
36
36
|
var import_chunk_RXM4EBGR = require("./chunk-RXM4EBGR.js");
|
37
|
-
var
|
37
|
+
var import_chunk_FSAAZH62 = require("./chunk-FSAAZH62.js");
|
38
38
|
var import_chunk_YJOPKU47 = require("./chunk-YJOPKU47.js");
|
39
39
|
var import_chunk_VAPNG6TS = require("./chunk-VAPNG6TS.js");
|
40
40
|
var import_chunk_QGM4M3NI = require("./chunk-QGM4M3NI.js");
|
41
|
+
var import_node_fs = __toESM(require("node:fs"));
|
42
|
+
var import_node_path = __toESM(require("node:path"));
|
43
|
+
var import_node_zlib = __toESM(require("node:zlib"));
|
41
44
|
var import_debug = __toESM(require("@prisma/debug"));
|
42
|
-
var import_fs = __toESM(require("fs"));
|
43
45
|
var import_node_http = __toESM(require("node:http"));
|
44
46
|
var import_node_https = __toESM(require("node:https"));
|
45
|
-
var
|
47
|
+
var import_node_zlib2 = __toESM(require("node:zlib"));
|
46
48
|
var import_node_stream = __toESM(require("node:stream"));
|
47
49
|
var import_node_buffer = require("node:buffer");
|
48
50
|
var import_node_stream2 = __toESM(require("node:stream"));
|
@@ -53,8 +55,6 @@ var import_node_http2 = __toESM(require("node:http"));
|
|
53
55
|
var import_node_url = require("node:url");
|
54
56
|
var import_node_util3 = require("node:util");
|
55
57
|
var import_node_net = require("node:net");
|
56
|
-
var import_path = __toESM(require("path"));
|
57
|
-
var import_zlib = __toESM(require("zlib"));
|
58
58
|
var require_is_stream = (0, import_chunk_QGM4M3NI.__commonJS)({
|
59
59
|
"../../node_modules/.pnpm/is-stream@2.0.1/node_modules/is-stream/index.js"(exports, module2) {
|
60
60
|
"use strict";
|
@@ -7680,11 +7680,67 @@ var require_concat_map = (0, import_chunk_QGM4M3NI.__commonJS)({
|
|
7680
7680
|
};
|
7681
7681
|
}
|
7682
7682
|
});
|
7683
|
+
var require_balanced_match = (0, import_chunk_QGM4M3NI.__commonJS)({
|
7684
|
+
"../../node_modules/.pnpm/balanced-match@1.0.2/node_modules/balanced-match/index.js"(exports, module2) {
|
7685
|
+
"use strict";
|
7686
|
+
module2.exports = balanced;
|
7687
|
+
function balanced(a, b, str) {
|
7688
|
+
if (a instanceof RegExp) a = maybeMatch(a, str);
|
7689
|
+
if (b instanceof RegExp) b = maybeMatch(b, str);
|
7690
|
+
var r = range(a, b, str);
|
7691
|
+
return r && {
|
7692
|
+
start: r[0],
|
7693
|
+
end: r[1],
|
7694
|
+
pre: str.slice(0, r[0]),
|
7695
|
+
body: str.slice(r[0] + a.length, r[1]),
|
7696
|
+
post: str.slice(r[1] + b.length)
|
7697
|
+
};
|
7698
|
+
}
|
7699
|
+
function maybeMatch(reg, str) {
|
7700
|
+
var m = str.match(reg);
|
7701
|
+
return m ? m[0] : null;
|
7702
|
+
}
|
7703
|
+
balanced.range = range;
|
7704
|
+
function range(a, b, str) {
|
7705
|
+
var begs, beg, left, right, result;
|
7706
|
+
var ai = str.indexOf(a);
|
7707
|
+
var bi = str.indexOf(b, ai + 1);
|
7708
|
+
var i = ai;
|
7709
|
+
if (ai >= 0 && bi > 0) {
|
7710
|
+
if (a === b) {
|
7711
|
+
return [ai, bi];
|
7712
|
+
}
|
7713
|
+
begs = [];
|
7714
|
+
left = str.length;
|
7715
|
+
while (i >= 0 && !result) {
|
7716
|
+
if (i == ai) {
|
7717
|
+
begs.push(i);
|
7718
|
+
ai = str.indexOf(a, i + 1);
|
7719
|
+
} else if (begs.length == 1) {
|
7720
|
+
result = [begs.pop(), bi];
|
7721
|
+
} else {
|
7722
|
+
beg = begs.pop();
|
7723
|
+
if (beg < left) {
|
7724
|
+
left = beg;
|
7725
|
+
right = bi;
|
7726
|
+
}
|
7727
|
+
bi = str.indexOf(b, i + 1);
|
7728
|
+
}
|
7729
|
+
i = ai < bi && ai >= 0 ? ai : bi;
|
7730
|
+
}
|
7731
|
+
if (begs.length) {
|
7732
|
+
result = [left, right];
|
7733
|
+
}
|
7734
|
+
}
|
7735
|
+
return result;
|
7736
|
+
}
|
7737
|
+
}
|
7738
|
+
});
|
7683
7739
|
var require_brace_expansion = (0, import_chunk_QGM4M3NI.__commonJS)({
|
7684
7740
|
"../../node_modules/.pnpm/brace-expansion@1.1.11/node_modules/brace-expansion/index.js"(exports, module2) {
|
7685
7741
|
"use strict";
|
7686
7742
|
var concatMap = require_concat_map();
|
7687
|
-
var balanced =
|
7743
|
+
var balanced = require_balanced_match();
|
7688
7744
|
module2.exports = expandTop;
|
7689
7745
|
var escSlash = "\0SLASH" + Math.random() + "\0";
|
7690
7746
|
var escOpen = "\0OPEN" + Math.random() + "\0";
|
@@ -9967,7 +10023,7 @@ var require_del = (0, import_chunk_QGM4M3NI.__commonJS)({
|
|
9967
10023
|
var isPathCwd = require_is_path_cwd();
|
9968
10024
|
var isPathInside = require_is_path_inside();
|
9969
10025
|
var rimraf2 = require_rimraf();
|
9970
|
-
var pMap = (0,
|
10026
|
+
var pMap = (0, import_chunk_FSAAZH62.require_p_map)();
|
9971
10027
|
var rimrafP = promisify2(rimraf2);
|
9972
10028
|
var rimrafOptions = {
|
9973
10029
|
glob: false,
|
@@ -11269,11 +11325,11 @@ async function fetch(url, options_) {
|
|
11269
11325
|
return;
|
11270
11326
|
}
|
11271
11327
|
const zlibOptions = {
|
11272
|
-
flush:
|
11273
|
-
finishFlush:
|
11328
|
+
flush: import_node_zlib2.default.Z_SYNC_FLUSH,
|
11329
|
+
finishFlush: import_node_zlib2.default.Z_SYNC_FLUSH
|
11274
11330
|
};
|
11275
11331
|
if (codings === "gzip" || codings === "x-gzip") {
|
11276
|
-
body = (0, import_node_stream.pipeline)(body,
|
11332
|
+
body = (0, import_node_stream.pipeline)(body, import_node_zlib2.default.createGunzip(zlibOptions), (error) => {
|
11277
11333
|
if (error) {
|
11278
11334
|
reject(error);
|
11279
11335
|
}
|
@@ -11290,13 +11346,13 @@ async function fetch(url, options_) {
|
|
11290
11346
|
});
|
11291
11347
|
raw.once("data", (chunk) => {
|
11292
11348
|
if ((chunk[0] & 15) === 8) {
|
11293
|
-
body = (0, import_node_stream.pipeline)(body,
|
11349
|
+
body = (0, import_node_stream.pipeline)(body, import_node_zlib2.default.createInflate(), (error) => {
|
11294
11350
|
if (error) {
|
11295
11351
|
reject(error);
|
11296
11352
|
}
|
11297
11353
|
});
|
11298
11354
|
} else {
|
11299
|
-
body = (0, import_node_stream.pipeline)(body,
|
11355
|
+
body = (0, import_node_stream.pipeline)(body, import_node_zlib2.default.createInflateRaw(), (error) => {
|
11300
11356
|
if (error) {
|
11301
11357
|
reject(error);
|
11302
11358
|
}
|
@@ -11314,7 +11370,7 @@ async function fetch(url, options_) {
|
|
11314
11370
|
return;
|
11315
11371
|
}
|
11316
11372
|
if (codings === "br") {
|
11317
|
-
body = (0, import_node_stream.pipeline)(body,
|
11373
|
+
body = (0, import_node_stream.pipeline)(body, import_node_zlib2.default.createBrotliDecompress(), (error) => {
|
11318
11374
|
if (error) {
|
11319
11375
|
reject(error);
|
11320
11376
|
}
|
@@ -11364,6 +11420,7 @@ function fixResponseChunkedTransferBadEnding(request, errorCallback) {
|
|
11364
11420
|
var import_p_retry = (0, import_chunk_QGM4M3NI.__toESM)(require_p_retry());
|
11365
11421
|
var import_tempy = (0, import_chunk_QGM4M3NI.__toESM)(require_tempy());
|
11366
11422
|
var debug = (0, import_debug.default)("prisma:fetch-engine:downloadZip");
|
11423
|
+
var rimraf = (path2) => import_node_fs.default.promises.rm(path2, { force: true, recursive: true });
|
11367
11424
|
async function fetchChecksum(url) {
|
11368
11425
|
try {
|
11369
11426
|
const checksumUrl = `${url}.sha256`;
|
@@ -11399,7 +11456,7 @@ Error: ${error}`
|
|
11399
11456
|
}
|
11400
11457
|
async function downloadZip(url, target, progressCb) {
|
11401
11458
|
const tmpDir = import_tempy.default.directory();
|
11402
|
-
const partial =
|
11459
|
+
const partial = import_node_path.default.join(tmpDir, "partial");
|
11403
11460
|
const RETRIES_COUNT = 2;
|
11404
11461
|
const [zippedSha256, sha256] = await (0, import_p_retry.default)(
|
11405
11462
|
async () => {
|
@@ -11421,7 +11478,7 @@ async function downloadZip(url, target, progressCb) {
|
|
11421
11478
|
}
|
11422
11479
|
const lastModified = response.headers.get("last-modified");
|
11423
11480
|
const size = parseFloat(response.headers.get("content-length"));
|
11424
|
-
const ws =
|
11481
|
+
const ws = import_node_fs.default.createWriteStream(partial);
|
11425
11482
|
return await new Promise(async (resolve, reject) => {
|
11426
11483
|
let bytesRead = 0;
|
11427
11484
|
if (response.body === null) {
|
@@ -11433,7 +11490,7 @@ async function downloadZip(url, target, progressCb) {
|
|
11433
11490
|
progressCb(bytesRead / size);
|
11434
11491
|
}
|
11435
11492
|
});
|
11436
|
-
const gunzip =
|
11493
|
+
const gunzip = import_node_zlib.default.createGunzip();
|
11437
11494
|
gunzip.on("error", reject);
|
11438
11495
|
const zipStream = response.body.pipe(gunzip);
|
11439
11496
|
const zippedHashPromise = import_hasha.default.fromStream(response.body, {
|
@@ -11463,8 +11520,8 @@ async function downloadZip(url, target, progressCb) {
|
|
11463
11520
|
);
|
11464
11521
|
await (0, import_chunk_YJOPKU47.overwriteFile)(partial, target);
|
11465
11522
|
try {
|
11466
|
-
await
|
11467
|
-
await
|
11523
|
+
await rimraf(partial);
|
11524
|
+
await rimraf(tmpDir);
|
11468
11525
|
} catch (e) {
|
11469
11526
|
debug(e);
|
11470
11527
|
}
|
@@ -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_CAMEZM54_exports = {};
|
30
|
+
__export(chunk_CAMEZM54_exports, {
|
31
31
|
cleanupCache: () => cleanupCache
|
32
32
|
});
|
33
|
-
module.exports = __toCommonJS(
|
34
|
-
var
|
33
|
+
module.exports = __toCommonJS(chunk_CAMEZM54_exports);
|
34
|
+
var import_chunk_FSAAZH62 = require("./chunk-FSAAZH62.js");
|
35
35
|
var import_chunk_YJOPKU47 = require("./chunk-YJOPKU47.js");
|
36
36
|
var import_chunk_QGM4M3NI = require("./chunk-QGM4M3NI.js");
|
37
|
+
var import_node_fs = __toESM(require("node:fs"));
|
38
|
+
var import_node_path = __toESM(require("node:path"));
|
37
39
|
var import_debug = __toESM(require("@prisma/debug"));
|
38
|
-
var
|
39
|
-
var import_path = __toESM(require("path"));
|
40
|
-
var import_p_map = (0, import_chunk_QGM4M3NI.__toESM)((0, import_chunk_SVP4SRAT.require_p_map)());
|
40
|
+
var import_p_map = (0, import_chunk_QGM4M3NI.__toESM)((0, import_chunk_FSAAZH62.require_p_map)());
|
41
41
|
var debug = (0, import_debug.default)("cleanupCache");
|
42
42
|
async function cleanupCache(n = 5) {
|
43
43
|
try {
|
@@ -47,12 +47,12 @@ async function cleanupCache(n = 5) {
|
|
47
47
|
return;
|
48
48
|
}
|
49
49
|
const channel = "master";
|
50
|
-
const cacheDir =
|
51
|
-
const dirs = await
|
50
|
+
const cacheDir = import_node_path.default.join(rootCacheDir, channel);
|
51
|
+
const dirs = await import_node_fs.default.promises.readdir(cacheDir);
|
52
52
|
const dirsWithMeta = await Promise.all(
|
53
53
|
dirs.map(async (dirName) => {
|
54
|
-
const dir =
|
55
|
-
const statResult = await
|
54
|
+
const dir = import_node_path.default.join(cacheDir, dirName);
|
55
|
+
const statResult = await import_node_fs.default.promises.stat(dir);
|
56
56
|
return {
|
57
57
|
dir,
|
58
58
|
created: statResult.birthtime
|
@@ -61,7 +61,7 @@ async function cleanupCache(n = 5) {
|
|
61
61
|
);
|
62
62
|
dirsWithMeta.sort((a, b) => a.created < b.created ? 1 : -1);
|
63
63
|
const dirsToRemove = dirsWithMeta.slice(n);
|
64
|
-
await (0, import_p_map.default)(dirsToRemove, (dir) =>
|
64
|
+
await (0, import_p_map.default)(dirsToRemove, (dir) => import_node_fs.default.promises.rm(dir.dir, { force: true, recursive: true }), { concurrency: 20 });
|
65
65
|
} catch (e) {
|
66
66
|
}
|
67
67
|
}
|
@@ -0,0 +1,190 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __defProp = Object.defineProperty;
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
6
|
+
var __export = (target, all) => {
|
7
|
+
for (var name in all)
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
9
|
+
};
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
12
|
+
for (let key of __getOwnPropNames(from))
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
15
|
+
}
|
16
|
+
return to;
|
17
|
+
};
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
19
|
+
var chunk_FSAAZH62_exports = {};
|
20
|
+
__export(chunk_FSAAZH62_exports, {
|
21
|
+
require_p_map: () => require_p_map
|
22
|
+
});
|
23
|
+
module.exports = __toCommonJS(chunk_FSAAZH62_exports);
|
24
|
+
var import_chunk_QGM4M3NI = require("./chunk-QGM4M3NI.js");
|
25
|
+
var require_indent_string = (0, import_chunk_QGM4M3NI.__commonJS)({
|
26
|
+
"../../node_modules/.pnpm/indent-string@4.0.0/node_modules/indent-string/index.js"(exports, module2) {
|
27
|
+
"use strict";
|
28
|
+
module2.exports = (string, count = 1, options) => {
|
29
|
+
options = {
|
30
|
+
indent: " ",
|
31
|
+
includeEmptyLines: false,
|
32
|
+
...options
|
33
|
+
};
|
34
|
+
if (typeof string !== "string") {
|
35
|
+
throw new TypeError(
|
36
|
+
`Expected \`input\` to be a \`string\`, got \`${typeof string}\``
|
37
|
+
);
|
38
|
+
}
|
39
|
+
if (typeof count !== "number") {
|
40
|
+
throw new TypeError(
|
41
|
+
`Expected \`count\` to be a \`number\`, got \`${typeof count}\``
|
42
|
+
);
|
43
|
+
}
|
44
|
+
if (typeof options.indent !== "string") {
|
45
|
+
throw new TypeError(
|
46
|
+
`Expected \`options.indent\` to be a \`string\`, got \`${typeof options.indent}\``
|
47
|
+
);
|
48
|
+
}
|
49
|
+
if (count === 0) {
|
50
|
+
return string;
|
51
|
+
}
|
52
|
+
const regex = options.includeEmptyLines ? /^/gm : /^(?!\s*$)/gm;
|
53
|
+
return string.replace(regex, options.indent.repeat(count));
|
54
|
+
};
|
55
|
+
}
|
56
|
+
});
|
57
|
+
var require_clean_stack = (0, import_chunk_QGM4M3NI.__commonJS)({
|
58
|
+
"../../node_modules/.pnpm/clean-stack@2.2.0/node_modules/clean-stack/index.js"(exports, module2) {
|
59
|
+
"use strict";
|
60
|
+
var os = (0, import_chunk_QGM4M3NI.__require)("os");
|
61
|
+
var extractPathRegex = /\s+at.*(?:\(|\s)(.*)\)?/;
|
62
|
+
var pathRegex = /^(?:(?:(?:node|(?:internal\/[\w/]*|.*node_modules\/(?:babel-polyfill|pirates)\/.*)?\w+)\.js:\d+:\d+)|native)/;
|
63
|
+
var homeDir = typeof os.homedir === "undefined" ? "" : os.homedir();
|
64
|
+
module2.exports = (stack, options) => {
|
65
|
+
options = Object.assign({ pretty: false }, options);
|
66
|
+
return stack.replace(/\\/g, "/").split("\n").filter((line) => {
|
67
|
+
const pathMatches = line.match(extractPathRegex);
|
68
|
+
if (pathMatches === null || !pathMatches[1]) {
|
69
|
+
return true;
|
70
|
+
}
|
71
|
+
const match = pathMatches[1];
|
72
|
+
if (match.includes(".app/Contents/Resources/electron.asar") || match.includes(".app/Contents/Resources/default_app.asar")) {
|
73
|
+
return false;
|
74
|
+
}
|
75
|
+
return !pathRegex.test(match);
|
76
|
+
}).filter((line) => line.trim() !== "").map((line) => {
|
77
|
+
if (options.pretty) {
|
78
|
+
return line.replace(extractPathRegex, (m, p1) => m.replace(p1, p1.replace(homeDir, "~")));
|
79
|
+
}
|
80
|
+
return line;
|
81
|
+
}).join("\n");
|
82
|
+
};
|
83
|
+
}
|
84
|
+
});
|
85
|
+
var require_aggregate_error = (0, import_chunk_QGM4M3NI.__commonJS)({
|
86
|
+
"../../node_modules/.pnpm/aggregate-error@3.1.0/node_modules/aggregate-error/index.js"(exports, module2) {
|
87
|
+
"use strict";
|
88
|
+
var indentString = require_indent_string();
|
89
|
+
var cleanStack = require_clean_stack();
|
90
|
+
var cleanInternalStack = (stack) => stack.replace(/\s+at .*aggregate-error\/index.js:\d+:\d+\)?/g, "");
|
91
|
+
var AggregateError = class extends Error {
|
92
|
+
constructor(errors) {
|
93
|
+
if (!Array.isArray(errors)) {
|
94
|
+
throw new TypeError(`Expected input to be an Array, got ${typeof errors}`);
|
95
|
+
}
|
96
|
+
errors = [...errors].map((error) => {
|
97
|
+
if (error instanceof Error) {
|
98
|
+
return error;
|
99
|
+
}
|
100
|
+
if (error !== null && typeof error === "object") {
|
101
|
+
return Object.assign(new Error(error.message), error);
|
102
|
+
}
|
103
|
+
return new Error(error);
|
104
|
+
});
|
105
|
+
let message = errors.map((error) => {
|
106
|
+
return typeof error.stack === "string" ? cleanInternalStack(cleanStack(error.stack)) : String(error);
|
107
|
+
}).join("\n");
|
108
|
+
message = "\n" + indentString(message, 4);
|
109
|
+
super(message);
|
110
|
+
this.name = "AggregateError";
|
111
|
+
Object.defineProperty(this, "_errors", { value: errors });
|
112
|
+
}
|
113
|
+
*[Symbol.iterator]() {
|
114
|
+
for (const error of this._errors) {
|
115
|
+
yield error;
|
116
|
+
}
|
117
|
+
}
|
118
|
+
};
|
119
|
+
module2.exports = AggregateError;
|
120
|
+
}
|
121
|
+
});
|
122
|
+
var require_p_map = (0, import_chunk_QGM4M3NI.__commonJS)({
|
123
|
+
"../../node_modules/.pnpm/p-map@4.0.0/node_modules/p-map/index.js"(exports, module2) {
|
124
|
+
"use strict";
|
125
|
+
var AggregateError = require_aggregate_error();
|
126
|
+
module2.exports = async (iterable, mapper, {
|
127
|
+
concurrency = Infinity,
|
128
|
+
stopOnError = true
|
129
|
+
} = {}) => {
|
130
|
+
return new Promise((resolve, reject) => {
|
131
|
+
if (typeof mapper !== "function") {
|
132
|
+
throw new TypeError("Mapper function is required");
|
133
|
+
}
|
134
|
+
if (!((Number.isSafeInteger(concurrency) || concurrency === Infinity) && concurrency >= 1)) {
|
135
|
+
throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${concurrency}\` (${typeof concurrency})`);
|
136
|
+
}
|
137
|
+
const result = [];
|
138
|
+
const errors = [];
|
139
|
+
const iterator = iterable[Symbol.iterator]();
|
140
|
+
let isRejected = false;
|
141
|
+
let isIterableDone = false;
|
142
|
+
let resolvingCount = 0;
|
143
|
+
let currentIndex = 0;
|
144
|
+
const next = () => {
|
145
|
+
if (isRejected) {
|
146
|
+
return;
|
147
|
+
}
|
148
|
+
const nextItem = iterator.next();
|
149
|
+
const index = currentIndex;
|
150
|
+
currentIndex++;
|
151
|
+
if (nextItem.done) {
|
152
|
+
isIterableDone = true;
|
153
|
+
if (resolvingCount === 0) {
|
154
|
+
if (!stopOnError && errors.length !== 0) {
|
155
|
+
reject(new AggregateError(errors));
|
156
|
+
} else {
|
157
|
+
resolve(result);
|
158
|
+
}
|
159
|
+
}
|
160
|
+
return;
|
161
|
+
}
|
162
|
+
resolvingCount++;
|
163
|
+
(async () => {
|
164
|
+
try {
|
165
|
+
const element = await nextItem.value;
|
166
|
+
result[index] = await mapper(element, index);
|
167
|
+
resolvingCount--;
|
168
|
+
next();
|
169
|
+
} catch (error) {
|
170
|
+
if (stopOnError) {
|
171
|
+
isRejected = true;
|
172
|
+
reject(error);
|
173
|
+
} else {
|
174
|
+
errors.push(error);
|
175
|
+
resolvingCount--;
|
176
|
+
next();
|
177
|
+
}
|
178
|
+
}
|
179
|
+
})();
|
180
|
+
};
|
181
|
+
for (let i = 0; i < concurrency; i++) {
|
182
|
+
next();
|
183
|
+
if (isIterableDone) {
|
184
|
+
break;
|
185
|
+
}
|
186
|
+
}
|
187
|
+
});
|
188
|
+
};
|
189
|
+
}
|
190
|
+
});
|
@@ -26,8 +26,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
26
26
|
mod
|
27
27
|
));
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
29
|
-
var
|
30
|
-
__export(
|
29
|
+
var chunk_PHU6QDY6_exports = {};
|
30
|
+
__export(chunk_PHU6QDY6_exports, {
|
31
31
|
download: () => download,
|
32
32
|
getBinaryName: () => getBinaryName,
|
33
33
|
getVersion: () => getVersion,
|
@@ -35,11 +35,11 @@ __export(chunk_YNVJNBET_exports, {
|
|
35
35
|
plusX: () => plusX,
|
36
36
|
vercelPkgPathRegex: () => vercelPkgPathRegex
|
37
37
|
});
|
38
|
-
module.exports = __toCommonJS(
|
38
|
+
module.exports = __toCommonJS(chunk_PHU6QDY6_exports);
|
39
39
|
var import_chunk_MWVY55RY = require("./chunk-MWVY55RY.js");
|
40
40
|
var import_chunk_MX3HXAU2 = require("./chunk-MX3HXAU2.js");
|
41
|
-
var
|
42
|
-
var
|
41
|
+
var import_chunk_CAMEZM54 = require("./chunk-CAMEZM54.js");
|
42
|
+
var import_chunk_BPSZDGRL = require("./chunk-BPSZDGRL.js");
|
43
43
|
var import_chunk_YJOPKU47 = require("./chunk-YJOPKU47.js");
|
44
44
|
var import_chunk_PXQVM7NP = require("./chunk-PXQVM7NP.js");
|
45
45
|
var import_chunk_CWGQAQ3T = require("./chunk-CWGQAQ3T.js");
|
@@ -1552,7 +1552,7 @@ var require_merge_stream = (0, import_chunk_QGM4M3NI.__commonJS)({
|
|
1552
1552
|
var require_stream = (0, import_chunk_QGM4M3NI.__commonJS)({
|
1553
1553
|
"../../node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/stream.js"(exports, module2) {
|
1554
1554
|
"use strict";
|
1555
|
-
var isStream = (0,
|
1555
|
+
var isStream = (0, import_chunk_BPSZDGRL.require_is_stream)();
|
1556
1556
|
var getStream = require_get_stream();
|
1557
1557
|
var mergeStream = require_merge_stream();
|
1558
1558
|
var handleInput = (spawned, input) => {
|
@@ -1970,7 +1970,6 @@ var require_package = (0, import_chunk_QGM4M3NI.__commonJS)({
|
|
1970
1970
|
"p-map": "4.0.0",
|
1971
1971
|
"p-retry": "4.6.2",
|
1972
1972
|
progress: "2.0.3",
|
1973
|
-
rimraf: "6.0.1",
|
1974
1973
|
"temp-dir": "2.0.0",
|
1975
1974
|
tempy: "1.0.1",
|
1976
1975
|
"timeout-signal": "2.0.0",
|
@@ -2126,7 +2125,7 @@ async function pFilter(iterable, filterer, options) {
|
|
2126
2125
|
);
|
2127
2126
|
return values.filter((value) => Boolean(value[0])).map((value) => value[1]);
|
2128
2127
|
}
|
2129
|
-
var import_temp_dir = (0, import_chunk_QGM4M3NI.__toESM)((0,
|
2128
|
+
var import_temp_dir = (0, import_chunk_QGM4M3NI.__toESM)((0, import_chunk_BPSZDGRL.require_temp_dir)());
|
2130
2129
|
var { enginesOverride } = require_package();
|
2131
2130
|
var debug = (0, import_debug.default)("prisma:fetch-engine:download");
|
2132
2131
|
var exists = (0, import_util.promisify)(import_fs.default.exists);
|
@@ -2193,7 +2192,7 @@ async function download(options) {
|
|
2193
2192
|
return shouldDownload;
|
2194
2193
|
});
|
2195
2194
|
if (binariesToDownload.length > 0) {
|
2196
|
-
const cleanupPromise = (0,
|
2195
|
+
const cleanupPromise = (0, import_chunk_CAMEZM54.cleanupCache)();
|
2197
2196
|
let finishBar;
|
2198
2197
|
let setProgress;
|
2199
2198
|
if (opts.showProgress) {
|
@@ -2394,7 +2393,7 @@ async function downloadBinary(options) {
|
|
2394
2393
|
if (progressCb) {
|
2395
2394
|
progressCb(0);
|
2396
2395
|
}
|
2397
|
-
const { sha256, zippedSha256 } = await (0,
|
2396
|
+
const { sha256, zippedSha256 } = await (0, import_chunk_BPSZDGRL.downloadZip)(downloadUrl, targetFilePath, progressCb);
|
2398
2397
|
if (progressCb) {
|
2399
2398
|
progressCb(1);
|
2400
2399
|
}
|
@@ -26,8 +26,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
26
26
|
mod
|
27
27
|
));
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
29
|
-
var
|
30
|
-
__export(
|
29
|
+
var chunk_UYEM6UQM_exports = {};
|
30
|
+
__export(chunk_UYEM6UQM_exports, {
|
31
31
|
download: () => download,
|
32
32
|
getBinaryName: () => getBinaryName,
|
33
33
|
getVersion: () => getVersion,
|
@@ -35,11 +35,11 @@ __export(chunk_LUEZKII4_exports, {
|
|
35
35
|
plusX: () => plusX,
|
36
36
|
vercelPkgPathRegex: () => vercelPkgPathRegex
|
37
37
|
});
|
38
|
-
module.exports = __toCommonJS(
|
38
|
+
module.exports = __toCommonJS(chunk_UYEM6UQM_exports);
|
39
39
|
var import_chunk_MWVY55RY = require("./chunk-MWVY55RY.js");
|
40
40
|
var import_chunk_MX3HXAU2 = require("./chunk-MX3HXAU2.js");
|
41
|
-
var
|
42
|
-
var
|
41
|
+
var import_chunk_CAMEZM54 = require("./chunk-CAMEZM54.js");
|
42
|
+
var import_chunk_BPSZDGRL = require("./chunk-BPSZDGRL.js");
|
43
43
|
var import_chunk_YJOPKU47 = require("./chunk-YJOPKU47.js");
|
44
44
|
var import_chunk_PXQVM7NP = require("./chunk-PXQVM7NP.js");
|
45
45
|
var import_chunk_CWGQAQ3T = require("./chunk-CWGQAQ3T.js");
|
@@ -1552,7 +1552,7 @@ var require_merge_stream = (0, import_chunk_QGM4M3NI.__commonJS)({
|
|
1552
1552
|
var require_stream = (0, import_chunk_QGM4M3NI.__commonJS)({
|
1553
1553
|
"../../node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/stream.js"(exports, module2) {
|
1554
1554
|
"use strict";
|
1555
|
-
var isStream = (0,
|
1555
|
+
var isStream = (0, import_chunk_BPSZDGRL.require_is_stream)();
|
1556
1556
|
var getStream = require_get_stream();
|
1557
1557
|
var mergeStream = require_merge_stream();
|
1558
1558
|
var handleInput = (spawned, input) => {
|
@@ -1936,7 +1936,7 @@ var require_package = (0, import_chunk_QGM4M3NI.__commonJS)({
|
|
1936
1936
|
"package.json"(exports, module2) {
|
1937
1937
|
module2.exports = {
|
1938
1938
|
name: "@prisma/fetch-engine",
|
1939
|
-
version: "6.17.0-dev.
|
1939
|
+
version: "6.17.0-dev.3",
|
1940
1940
|
description: "This package is intended for Prisma's internal use",
|
1941
1941
|
main: "dist/index.js",
|
1942
1942
|
types: "dist/index.d.ts",
|
@@ -1970,7 +1970,6 @@ var require_package = (0, import_chunk_QGM4M3NI.__commonJS)({
|
|
1970
1970
|
"p-map": "4.0.0",
|
1971
1971
|
"p-retry": "4.6.2",
|
1972
1972
|
progress: "2.0.3",
|
1973
|
-
rimraf: "6.0.1",
|
1974
1973
|
"temp-dir": "2.0.0",
|
1975
1974
|
tempy: "1.0.1",
|
1976
1975
|
"timeout-signal": "2.0.0",
|
@@ -2126,7 +2125,7 @@ async function pFilter(iterable, filterer, options) {
|
|
2126
2125
|
);
|
2127
2126
|
return values.filter((value) => Boolean(value[0])).map((value) => value[1]);
|
2128
2127
|
}
|
2129
|
-
var import_temp_dir = (0, import_chunk_QGM4M3NI.__toESM)((0,
|
2128
|
+
var import_temp_dir = (0, import_chunk_QGM4M3NI.__toESM)((0, import_chunk_BPSZDGRL.require_temp_dir)());
|
2130
2129
|
var { enginesOverride } = require_package();
|
2131
2130
|
var debug = (0, import_debug.default)("prisma:fetch-engine:download");
|
2132
2131
|
var exists = (0, import_util.promisify)(import_fs.default.exists);
|
@@ -2193,7 +2192,7 @@ async function download(options) {
|
|
2193
2192
|
return shouldDownload;
|
2194
2193
|
});
|
2195
2194
|
if (binariesToDownload.length > 0) {
|
2196
|
-
const cleanupPromise = (0,
|
2195
|
+
const cleanupPromise = (0, import_chunk_CAMEZM54.cleanupCache)();
|
2197
2196
|
let finishBar;
|
2198
2197
|
let setProgress;
|
2199
2198
|
if (opts.showProgress) {
|
@@ -2394,7 +2393,7 @@ async function downloadBinary(options) {
|
|
2394
2393
|
if (progressCb) {
|
2395
2394
|
progressCb(0);
|
2396
2395
|
}
|
2397
|
-
const { sha256, zippedSha256 } = await (0,
|
2396
|
+
const { sha256, zippedSha256 } = await (0, import_chunk_BPSZDGRL.downloadZip)(downloadUrl, targetFilePath, progressCb);
|
2398
2397
|
if (progressCb) {
|
2399
2398
|
progressCb(1);
|
2400
2399
|
}
|
package/dist/cleanupCache.js
CHANGED
@@ -18,11 +18,11 @@ var __copyProps = (to, from, except, desc) => {
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
19
19
|
var cleanupCache_exports = {};
|
20
20
|
__export(cleanupCache_exports, {
|
21
|
-
cleanupCache: () =>
|
21
|
+
cleanupCache: () => import_chunk_CAMEZM54.cleanupCache
|
22
22
|
});
|
23
23
|
module.exports = __toCommonJS(cleanupCache_exports);
|
24
|
-
var
|
25
|
-
var
|
24
|
+
var import_chunk_CAMEZM54 = require("./chunk-CAMEZM54.js");
|
25
|
+
var import_chunk_FSAAZH62 = require("./chunk-FSAAZH62.js");
|
26
26
|
var import_chunk_YJOPKU47 = require("./chunk-YJOPKU47.js");
|
27
27
|
var import_chunk_X37PZICB = require("./chunk-X37PZICB.js");
|
28
28
|
var import_chunk_QGM4M3NI = require("./chunk-QGM4M3NI.js");
|
package/dist/download.js
CHANGED
@@ -18,21 +18,21 @@ var __copyProps = (to, from, except, desc) => {
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
19
19
|
var download_exports = {};
|
20
20
|
__export(download_exports, {
|
21
|
-
download: () =>
|
22
|
-
getBinaryName: () =>
|
23
|
-
getVersion: () =>
|
24
|
-
maybeCopyToTmp: () =>
|
25
|
-
plusX: () =>
|
26
|
-
vercelPkgPathRegex: () =>
|
21
|
+
download: () => import_chunk_UYEM6UQM.download,
|
22
|
+
getBinaryName: () => import_chunk_UYEM6UQM.getBinaryName,
|
23
|
+
getVersion: () => import_chunk_UYEM6UQM.getVersion,
|
24
|
+
maybeCopyToTmp: () => import_chunk_UYEM6UQM.maybeCopyToTmp,
|
25
|
+
plusX: () => import_chunk_UYEM6UQM.plusX,
|
26
|
+
vercelPkgPathRegex: () => import_chunk_UYEM6UQM.vercelPkgPathRegex
|
27
27
|
});
|
28
28
|
module.exports = __toCommonJS(download_exports);
|
29
|
-
var
|
29
|
+
var import_chunk_UYEM6UQM = require("./chunk-UYEM6UQM.js");
|
30
30
|
var import_chunk_MWVY55RY = require("./chunk-MWVY55RY.js");
|
31
31
|
var import_chunk_MX3HXAU2 = require("./chunk-MX3HXAU2.js");
|
32
|
-
var
|
33
|
-
var
|
32
|
+
var import_chunk_CAMEZM54 = require("./chunk-CAMEZM54.js");
|
33
|
+
var import_chunk_BPSZDGRL = require("./chunk-BPSZDGRL.js");
|
34
34
|
var import_chunk_RXM4EBGR = require("./chunk-RXM4EBGR.js");
|
35
|
-
var
|
35
|
+
var import_chunk_FSAAZH62 = require("./chunk-FSAAZH62.js");
|
36
36
|
var import_chunk_YJOPKU47 = require("./chunk-YJOPKU47.js");
|
37
37
|
var import_chunk_PXQVM7NP = require("./chunk-PXQVM7NP.js");
|
38
38
|
var import_chunk_X37PZICB = require("./chunk-X37PZICB.js");
|
package/dist/downloadZip.js
CHANGED
@@ -18,12 +18,12 @@ var __copyProps = (to, from, except, desc) => {
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
19
19
|
var downloadZip_exports = {};
|
20
20
|
__export(downloadZip_exports, {
|
21
|
-
downloadZip: () =>
|
21
|
+
downloadZip: () => import_chunk_BPSZDGRL.downloadZip
|
22
22
|
});
|
23
23
|
module.exports = __toCommonJS(downloadZip_exports);
|
24
|
-
var
|
24
|
+
var import_chunk_BPSZDGRL = require("./chunk-BPSZDGRL.js");
|
25
25
|
var import_chunk_RXM4EBGR = require("./chunk-RXM4EBGR.js");
|
26
|
-
var
|
26
|
+
var import_chunk_FSAAZH62 = require("./chunk-FSAAZH62.js");
|
27
27
|
var import_chunk_YJOPKU47 = require("./chunk-YJOPKU47.js");
|
28
28
|
var import_chunk_X37PZICB = require("./chunk-X37PZICB.js");
|
29
29
|
var import_chunk_VAPNG6TS = require("./chunk-VAPNG6TS.js");
|