@prisma/fetch-engine 6.5.0-dev.24 → 6.5.0-dev.26
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.
@@ -26,8 +26,8 @@ var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create(__g
|
|
26
26
|
mod
|
27
27
|
));
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
29
|
-
var
|
30
|
-
__export(
|
29
|
+
var chunk_H2FNOWPJ_exports = {};
|
30
|
+
__export(chunk_H2FNOWPJ_exports, {
|
31
31
|
download: () => download,
|
32
32
|
getBinaryName: () => getBinaryName,
|
33
33
|
getVersion: () => getVersion,
|
@@ -35,7 +35,7 @@ __export(chunk_6DYCUSYI_exports, {
|
|
35
35
|
plusX: () => plusX,
|
36
36
|
vercelPkgPathRegex: () => vercelPkgPathRegex
|
37
37
|
});
|
38
|
-
module.exports = __toCommonJS(
|
38
|
+
module.exports = __toCommonJS(chunk_H2FNOWPJ_exports);
|
39
39
|
var import_chunk_4LX3XBNY = require("./chunk-4LX3XBNY.js");
|
40
40
|
var import_chunk_MX3HXAU2 = require("./chunk-MX3HXAU2.js");
|
41
41
|
var import_chunk_FKKOTNO6 = require("./chunk-FKKOTNO6.js");
|
@@ -1932,85 +1932,11 @@ var require_execa = (0, import_chunk_AH6QHEOA.__commonJS)({
|
|
1932
1932
|
};
|
1933
1933
|
}
|
1934
1934
|
});
|
1935
|
-
var require_p_map = (0, import_chunk_AH6QHEOA.__commonJS)({
|
1936
|
-
"../../node_modules/.pnpm/p-map@2.1.0/node_modules/p-map/index.js"(exports, module2) {
|
1937
|
-
"use strict";
|
1938
|
-
var pMap = (iterable, mapper, options2) => new Promise((resolve, reject) => {
|
1939
|
-
options2 = Object.assign({
|
1940
|
-
concurrency: Infinity
|
1941
|
-
}, options2);
|
1942
|
-
if (typeof mapper !== "function") {
|
1943
|
-
throw new TypeError("Mapper function is required");
|
1944
|
-
}
|
1945
|
-
const { concurrency } = options2;
|
1946
|
-
if (!(typeof concurrency === "number" && concurrency >= 1)) {
|
1947
|
-
throw new TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${concurrency}\` (${typeof concurrency})`);
|
1948
|
-
}
|
1949
|
-
const ret = [];
|
1950
|
-
const iterator = iterable[Symbol.iterator]();
|
1951
|
-
let isRejected = false;
|
1952
|
-
let isIterableDone = false;
|
1953
|
-
let resolvingCount = 0;
|
1954
|
-
let currentIndex = 0;
|
1955
|
-
const next = () => {
|
1956
|
-
if (isRejected) {
|
1957
|
-
return;
|
1958
|
-
}
|
1959
|
-
const nextItem = iterator.next();
|
1960
|
-
const i = currentIndex;
|
1961
|
-
currentIndex++;
|
1962
|
-
if (nextItem.done) {
|
1963
|
-
isIterableDone = true;
|
1964
|
-
if (resolvingCount === 0) {
|
1965
|
-
resolve(ret);
|
1966
|
-
}
|
1967
|
-
return;
|
1968
|
-
}
|
1969
|
-
resolvingCount++;
|
1970
|
-
Promise.resolve(nextItem.value).then((element) => mapper(element, i)).then(
|
1971
|
-
(value) => {
|
1972
|
-
ret[i] = value;
|
1973
|
-
resolvingCount--;
|
1974
|
-
next();
|
1975
|
-
},
|
1976
|
-
(error) => {
|
1977
|
-
isRejected = true;
|
1978
|
-
reject(error);
|
1979
|
-
}
|
1980
|
-
);
|
1981
|
-
};
|
1982
|
-
for (let i = 0; i < concurrency; i++) {
|
1983
|
-
next();
|
1984
|
-
if (isIterableDone) {
|
1985
|
-
break;
|
1986
|
-
}
|
1987
|
-
}
|
1988
|
-
});
|
1989
|
-
module2.exports = pMap;
|
1990
|
-
module2.exports.default = pMap;
|
1991
|
-
}
|
1992
|
-
});
|
1993
|
-
var require_p_filter = (0, import_chunk_AH6QHEOA.__commonJS)({
|
1994
|
-
"../../node_modules/.pnpm/p-filter@2.1.0/node_modules/p-filter/index.js"(exports, module2) {
|
1995
|
-
"use strict";
|
1996
|
-
var pMap = require_p_map();
|
1997
|
-
var pFilter2 = async (iterable, filterer, options2) => {
|
1998
|
-
const values = await pMap(
|
1999
|
-
iterable,
|
2000
|
-
(element, index) => Promise.all([filterer(element, index), element]),
|
2001
|
-
options2
|
2002
|
-
);
|
2003
|
-
return values.filter((value) => Boolean(value[0])).map((value) => value[1]);
|
2004
|
-
};
|
2005
|
-
module2.exports = pFilter2;
|
2006
|
-
module2.exports.default = pFilter2;
|
2007
|
-
}
|
2008
|
-
});
|
2009
1935
|
var require_package = (0, import_chunk_AH6QHEOA.__commonJS)({
|
2010
1936
|
"package.json"(exports, module2) {
|
2011
1937
|
module2.exports = {
|
2012
1938
|
name: "@prisma/fetch-engine",
|
2013
|
-
version: "6.5.0-dev.
|
1939
|
+
version: "6.5.0-dev.26",
|
2014
1940
|
description: "This package is intended for Prisma's internal use",
|
2015
1941
|
main: "dist/index.js",
|
2016
1942
|
types: "dist/index.d.ts",
|
@@ -2040,7 +1966,7 @@ var require_package = (0, import_chunk_AH6QHEOA.__commonJS)({
|
|
2040
1966
|
jest: "29.7.0",
|
2041
1967
|
kleur: "4.1.5",
|
2042
1968
|
"node-fetch": "3.3.2",
|
2043
|
-
"p-filter": "
|
1969
|
+
"p-filter": "4.1.0",
|
2044
1970
|
"p-map": "4.0.0",
|
2045
1971
|
"p-retry": "4.6.2",
|
2046
1972
|
progress: "2.0.3",
|
@@ -2072,7 +1998,135 @@ var require_package = (0, import_chunk_AH6QHEOA.__commonJS)({
|
|
2072
1998
|
});
|
2073
1999
|
var import_execa = (0, import_chunk_AH6QHEOA.__toESM)(require_execa());
|
2074
2000
|
var import_fs_extra = (0, import_chunk_AH6QHEOA.__toESM)((0, import_chunk_G7EM4XDM.require_lib)());
|
2075
|
-
|
2001
|
+
async function pMap(iterable, mapper, {
|
2002
|
+
concurrency = Number.POSITIVE_INFINITY,
|
2003
|
+
stopOnError = true,
|
2004
|
+
signal
|
2005
|
+
} = {}) {
|
2006
|
+
return new Promise((resolve_, reject_) => {
|
2007
|
+
if (iterable[Symbol.iterator] === void 0 && iterable[Symbol.asyncIterator] === void 0) {
|
2008
|
+
throw new TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof iterable})`);
|
2009
|
+
}
|
2010
|
+
if (typeof mapper !== "function") {
|
2011
|
+
throw new TypeError("Mapper function is required");
|
2012
|
+
}
|
2013
|
+
if (!(Number.isSafeInteger(concurrency) && concurrency >= 1 || concurrency === Number.POSITIVE_INFINITY)) {
|
2014
|
+
throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${concurrency}\` (${typeof concurrency})`);
|
2015
|
+
}
|
2016
|
+
const result = [];
|
2017
|
+
const errors = [];
|
2018
|
+
const skippedIndexesMap = /* @__PURE__ */ new Map();
|
2019
|
+
let isRejected = false;
|
2020
|
+
let isResolved = false;
|
2021
|
+
let isIterableDone = false;
|
2022
|
+
let resolvingCount = 0;
|
2023
|
+
let currentIndex = 0;
|
2024
|
+
const iterator = iterable[Symbol.iterator] === void 0 ? iterable[Symbol.asyncIterator]() : iterable[Symbol.iterator]();
|
2025
|
+
const signalListener = () => {
|
2026
|
+
reject(signal.reason);
|
2027
|
+
};
|
2028
|
+
const cleanup = () => {
|
2029
|
+
signal?.removeEventListener("abort", signalListener);
|
2030
|
+
};
|
2031
|
+
const resolve = (value) => {
|
2032
|
+
resolve_(value);
|
2033
|
+
cleanup();
|
2034
|
+
};
|
2035
|
+
const reject = (reason) => {
|
2036
|
+
isRejected = true;
|
2037
|
+
isResolved = true;
|
2038
|
+
reject_(reason);
|
2039
|
+
cleanup();
|
2040
|
+
};
|
2041
|
+
if (signal) {
|
2042
|
+
if (signal.aborted) {
|
2043
|
+
reject(signal.reason);
|
2044
|
+
}
|
2045
|
+
signal.addEventListener("abort", signalListener, { once: true });
|
2046
|
+
}
|
2047
|
+
const next = async () => {
|
2048
|
+
if (isResolved) {
|
2049
|
+
return;
|
2050
|
+
}
|
2051
|
+
const nextItem = await iterator.next();
|
2052
|
+
const index = currentIndex;
|
2053
|
+
currentIndex++;
|
2054
|
+
if (nextItem.done) {
|
2055
|
+
isIterableDone = true;
|
2056
|
+
if (resolvingCount === 0 && !isResolved) {
|
2057
|
+
if (!stopOnError && errors.length > 0) {
|
2058
|
+
reject(new AggregateError(errors));
|
2059
|
+
return;
|
2060
|
+
}
|
2061
|
+
isResolved = true;
|
2062
|
+
if (skippedIndexesMap.size === 0) {
|
2063
|
+
resolve(result);
|
2064
|
+
return;
|
2065
|
+
}
|
2066
|
+
const pureResult = [];
|
2067
|
+
for (const [index2, value] of result.entries()) {
|
2068
|
+
if (skippedIndexesMap.get(index2) === pMapSkip) {
|
2069
|
+
continue;
|
2070
|
+
}
|
2071
|
+
pureResult.push(value);
|
2072
|
+
}
|
2073
|
+
resolve(pureResult);
|
2074
|
+
}
|
2075
|
+
return;
|
2076
|
+
}
|
2077
|
+
resolvingCount++;
|
2078
|
+
(async () => {
|
2079
|
+
try {
|
2080
|
+
const element = await nextItem.value;
|
2081
|
+
if (isResolved) {
|
2082
|
+
return;
|
2083
|
+
}
|
2084
|
+
const value = await mapper(element, index);
|
2085
|
+
if (value === pMapSkip) {
|
2086
|
+
skippedIndexesMap.set(index, value);
|
2087
|
+
}
|
2088
|
+
result[index] = value;
|
2089
|
+
resolvingCount--;
|
2090
|
+
await next();
|
2091
|
+
} catch (error) {
|
2092
|
+
if (stopOnError) {
|
2093
|
+
reject(error);
|
2094
|
+
} else {
|
2095
|
+
errors.push(error);
|
2096
|
+
resolvingCount--;
|
2097
|
+
try {
|
2098
|
+
await next();
|
2099
|
+
} catch (error2) {
|
2100
|
+
reject(error2);
|
2101
|
+
}
|
2102
|
+
}
|
2103
|
+
}
|
2104
|
+
})();
|
2105
|
+
};
|
2106
|
+
(async () => {
|
2107
|
+
for (let index = 0; index < concurrency; index++) {
|
2108
|
+
try {
|
2109
|
+
await next();
|
2110
|
+
} catch (error) {
|
2111
|
+
reject(error);
|
2112
|
+
break;
|
2113
|
+
}
|
2114
|
+
if (isIterableDone || isRejected) {
|
2115
|
+
break;
|
2116
|
+
}
|
2117
|
+
}
|
2118
|
+
})();
|
2119
|
+
});
|
2120
|
+
}
|
2121
|
+
var pMapSkip = Symbol("skip");
|
2122
|
+
async function pFilter(iterable, filterer, options2) {
|
2123
|
+
const values = await pMap(
|
2124
|
+
iterable,
|
2125
|
+
(element, index) => Promise.all([filterer(element, index), element]),
|
2126
|
+
options2
|
2127
|
+
);
|
2128
|
+
return values.filter((value) => Boolean(value[0])).map((value) => value[1]);
|
2129
|
+
}
|
2076
2130
|
var import_temp_dir = (0, import_chunk_AH6QHEOA.__toESM)((0, import_chunk_4EZ7ALS2.require_temp_dir)());
|
2077
2131
|
var { enginesOverride } = require_package();
|
2078
2132
|
var debug = (0, import_debug.default)("prisma:fetch-engine:download");
|
@@ -2129,7 +2183,7 @@ async function download(options) {
|
|
2129
2183
|
if (opts.printVersion) {
|
2130
2184
|
console.log(`version: ${opts.version}`);
|
2131
2185
|
}
|
2132
|
-
const binariesToDownload = await (
|
2186
|
+
const binariesToDownload = await pFilter(binaryJobs, async (job) => {
|
2133
2187
|
const needsToBeDownloaded = await binaryNeedsToBeDownloaded(job, binaryTarget, opts.version);
|
2134
2188
|
const isSupported = import_get_platform.binaryTargets.includes(job.binaryTarget);
|
2135
2189
|
const shouldDownload = isSupported && !job.envVarPath && // this is for custom binaries
|
@@ -26,8 +26,8 @@ var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create(__g
|
|
26
26
|
mod
|
27
27
|
));
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
29
|
-
var
|
30
|
-
__export(
|
29
|
+
var chunk_Y6JXVPQ2_exports = {};
|
30
|
+
__export(chunk_Y6JXVPQ2_exports, {
|
31
31
|
download: () => download,
|
32
32
|
getBinaryName: () => getBinaryName,
|
33
33
|
getVersion: () => getVersion,
|
@@ -35,7 +35,7 @@ __export(chunk_YCAYZLTK_exports, {
|
|
35
35
|
plusX: () => plusX,
|
36
36
|
vercelPkgPathRegex: () => vercelPkgPathRegex
|
37
37
|
});
|
38
|
-
module.exports = __toCommonJS(
|
38
|
+
module.exports = __toCommonJS(chunk_Y6JXVPQ2_exports);
|
39
39
|
var import_chunk_4LX3XBNY = require("./chunk-4LX3XBNY.js");
|
40
40
|
var import_chunk_MX3HXAU2 = require("./chunk-MX3HXAU2.js");
|
41
41
|
var import_chunk_FKKOTNO6 = require("./chunk-FKKOTNO6.js");
|
@@ -1932,80 +1932,6 @@ var require_execa = (0, import_chunk_AH6QHEOA.__commonJS)({
|
|
1932
1932
|
};
|
1933
1933
|
}
|
1934
1934
|
});
|
1935
|
-
var require_p_map = (0, import_chunk_AH6QHEOA.__commonJS)({
|
1936
|
-
"../../node_modules/.pnpm/p-map@2.1.0/node_modules/p-map/index.js"(exports, module2) {
|
1937
|
-
"use strict";
|
1938
|
-
var pMap = (iterable, mapper, options2) => new Promise((resolve, reject) => {
|
1939
|
-
options2 = Object.assign({
|
1940
|
-
concurrency: Infinity
|
1941
|
-
}, options2);
|
1942
|
-
if (typeof mapper !== "function") {
|
1943
|
-
throw new TypeError("Mapper function is required");
|
1944
|
-
}
|
1945
|
-
const { concurrency } = options2;
|
1946
|
-
if (!(typeof concurrency === "number" && concurrency >= 1)) {
|
1947
|
-
throw new TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${concurrency}\` (${typeof concurrency})`);
|
1948
|
-
}
|
1949
|
-
const ret = [];
|
1950
|
-
const iterator = iterable[Symbol.iterator]();
|
1951
|
-
let isRejected = false;
|
1952
|
-
let isIterableDone = false;
|
1953
|
-
let resolvingCount = 0;
|
1954
|
-
let currentIndex = 0;
|
1955
|
-
const next = () => {
|
1956
|
-
if (isRejected) {
|
1957
|
-
return;
|
1958
|
-
}
|
1959
|
-
const nextItem = iterator.next();
|
1960
|
-
const i = currentIndex;
|
1961
|
-
currentIndex++;
|
1962
|
-
if (nextItem.done) {
|
1963
|
-
isIterableDone = true;
|
1964
|
-
if (resolvingCount === 0) {
|
1965
|
-
resolve(ret);
|
1966
|
-
}
|
1967
|
-
return;
|
1968
|
-
}
|
1969
|
-
resolvingCount++;
|
1970
|
-
Promise.resolve(nextItem.value).then((element) => mapper(element, i)).then(
|
1971
|
-
(value) => {
|
1972
|
-
ret[i] = value;
|
1973
|
-
resolvingCount--;
|
1974
|
-
next();
|
1975
|
-
},
|
1976
|
-
(error) => {
|
1977
|
-
isRejected = true;
|
1978
|
-
reject(error);
|
1979
|
-
}
|
1980
|
-
);
|
1981
|
-
};
|
1982
|
-
for (let i = 0; i < concurrency; i++) {
|
1983
|
-
next();
|
1984
|
-
if (isIterableDone) {
|
1985
|
-
break;
|
1986
|
-
}
|
1987
|
-
}
|
1988
|
-
});
|
1989
|
-
module2.exports = pMap;
|
1990
|
-
module2.exports.default = pMap;
|
1991
|
-
}
|
1992
|
-
});
|
1993
|
-
var require_p_filter = (0, import_chunk_AH6QHEOA.__commonJS)({
|
1994
|
-
"../../node_modules/.pnpm/p-filter@2.1.0/node_modules/p-filter/index.js"(exports, module2) {
|
1995
|
-
"use strict";
|
1996
|
-
var pMap = require_p_map();
|
1997
|
-
var pFilter2 = async (iterable, filterer, options2) => {
|
1998
|
-
const values = await pMap(
|
1999
|
-
iterable,
|
2000
|
-
(element, index) => Promise.all([filterer(element, index), element]),
|
2001
|
-
options2
|
2002
|
-
);
|
2003
|
-
return values.filter((value) => Boolean(value[0])).map((value) => value[1]);
|
2004
|
-
};
|
2005
|
-
module2.exports = pFilter2;
|
2006
|
-
module2.exports.default = pFilter2;
|
2007
|
-
}
|
2008
|
-
});
|
2009
1935
|
var require_package = (0, import_chunk_AH6QHEOA.__commonJS)({
|
2010
1936
|
"package.json"(exports, module2) {
|
2011
1937
|
module2.exports = {
|
@@ -2040,7 +1966,7 @@ var require_package = (0, import_chunk_AH6QHEOA.__commonJS)({
|
|
2040
1966
|
jest: "29.7.0",
|
2041
1967
|
kleur: "4.1.5",
|
2042
1968
|
"node-fetch": "3.3.2",
|
2043
|
-
"p-filter": "
|
1969
|
+
"p-filter": "4.1.0",
|
2044
1970
|
"p-map": "4.0.0",
|
2045
1971
|
"p-retry": "4.6.2",
|
2046
1972
|
progress: "2.0.3",
|
@@ -2072,7 +1998,135 @@ var require_package = (0, import_chunk_AH6QHEOA.__commonJS)({
|
|
2072
1998
|
});
|
2073
1999
|
var import_execa = (0, import_chunk_AH6QHEOA.__toESM)(require_execa());
|
2074
2000
|
var import_fs_extra = (0, import_chunk_AH6QHEOA.__toESM)((0, import_chunk_G7EM4XDM.require_lib)());
|
2075
|
-
|
2001
|
+
async function pMap(iterable, mapper, {
|
2002
|
+
concurrency = Number.POSITIVE_INFINITY,
|
2003
|
+
stopOnError = true,
|
2004
|
+
signal
|
2005
|
+
} = {}) {
|
2006
|
+
return new Promise((resolve_, reject_) => {
|
2007
|
+
if (iterable[Symbol.iterator] === void 0 && iterable[Symbol.asyncIterator] === void 0) {
|
2008
|
+
throw new TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof iterable})`);
|
2009
|
+
}
|
2010
|
+
if (typeof mapper !== "function") {
|
2011
|
+
throw new TypeError("Mapper function is required");
|
2012
|
+
}
|
2013
|
+
if (!(Number.isSafeInteger(concurrency) && concurrency >= 1 || concurrency === Number.POSITIVE_INFINITY)) {
|
2014
|
+
throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${concurrency}\` (${typeof concurrency})`);
|
2015
|
+
}
|
2016
|
+
const result = [];
|
2017
|
+
const errors = [];
|
2018
|
+
const skippedIndexesMap = /* @__PURE__ */ new Map();
|
2019
|
+
let isRejected = false;
|
2020
|
+
let isResolved = false;
|
2021
|
+
let isIterableDone = false;
|
2022
|
+
let resolvingCount = 0;
|
2023
|
+
let currentIndex = 0;
|
2024
|
+
const iterator = iterable[Symbol.iterator] === void 0 ? iterable[Symbol.asyncIterator]() : iterable[Symbol.iterator]();
|
2025
|
+
const signalListener = () => {
|
2026
|
+
reject(signal.reason);
|
2027
|
+
};
|
2028
|
+
const cleanup = () => {
|
2029
|
+
signal?.removeEventListener("abort", signalListener);
|
2030
|
+
};
|
2031
|
+
const resolve = (value) => {
|
2032
|
+
resolve_(value);
|
2033
|
+
cleanup();
|
2034
|
+
};
|
2035
|
+
const reject = (reason) => {
|
2036
|
+
isRejected = true;
|
2037
|
+
isResolved = true;
|
2038
|
+
reject_(reason);
|
2039
|
+
cleanup();
|
2040
|
+
};
|
2041
|
+
if (signal) {
|
2042
|
+
if (signal.aborted) {
|
2043
|
+
reject(signal.reason);
|
2044
|
+
}
|
2045
|
+
signal.addEventListener("abort", signalListener, { once: true });
|
2046
|
+
}
|
2047
|
+
const next = async () => {
|
2048
|
+
if (isResolved) {
|
2049
|
+
return;
|
2050
|
+
}
|
2051
|
+
const nextItem = await iterator.next();
|
2052
|
+
const index = currentIndex;
|
2053
|
+
currentIndex++;
|
2054
|
+
if (nextItem.done) {
|
2055
|
+
isIterableDone = true;
|
2056
|
+
if (resolvingCount === 0 && !isResolved) {
|
2057
|
+
if (!stopOnError && errors.length > 0) {
|
2058
|
+
reject(new AggregateError(errors));
|
2059
|
+
return;
|
2060
|
+
}
|
2061
|
+
isResolved = true;
|
2062
|
+
if (skippedIndexesMap.size === 0) {
|
2063
|
+
resolve(result);
|
2064
|
+
return;
|
2065
|
+
}
|
2066
|
+
const pureResult = [];
|
2067
|
+
for (const [index2, value] of result.entries()) {
|
2068
|
+
if (skippedIndexesMap.get(index2) === pMapSkip) {
|
2069
|
+
continue;
|
2070
|
+
}
|
2071
|
+
pureResult.push(value);
|
2072
|
+
}
|
2073
|
+
resolve(pureResult);
|
2074
|
+
}
|
2075
|
+
return;
|
2076
|
+
}
|
2077
|
+
resolvingCount++;
|
2078
|
+
(async () => {
|
2079
|
+
try {
|
2080
|
+
const element = await nextItem.value;
|
2081
|
+
if (isResolved) {
|
2082
|
+
return;
|
2083
|
+
}
|
2084
|
+
const value = await mapper(element, index);
|
2085
|
+
if (value === pMapSkip) {
|
2086
|
+
skippedIndexesMap.set(index, value);
|
2087
|
+
}
|
2088
|
+
result[index] = value;
|
2089
|
+
resolvingCount--;
|
2090
|
+
await next();
|
2091
|
+
} catch (error) {
|
2092
|
+
if (stopOnError) {
|
2093
|
+
reject(error);
|
2094
|
+
} else {
|
2095
|
+
errors.push(error);
|
2096
|
+
resolvingCount--;
|
2097
|
+
try {
|
2098
|
+
await next();
|
2099
|
+
} catch (error2) {
|
2100
|
+
reject(error2);
|
2101
|
+
}
|
2102
|
+
}
|
2103
|
+
}
|
2104
|
+
})();
|
2105
|
+
};
|
2106
|
+
(async () => {
|
2107
|
+
for (let index = 0; index < concurrency; index++) {
|
2108
|
+
try {
|
2109
|
+
await next();
|
2110
|
+
} catch (error) {
|
2111
|
+
reject(error);
|
2112
|
+
break;
|
2113
|
+
}
|
2114
|
+
if (isIterableDone || isRejected) {
|
2115
|
+
break;
|
2116
|
+
}
|
2117
|
+
}
|
2118
|
+
})();
|
2119
|
+
});
|
2120
|
+
}
|
2121
|
+
var pMapSkip = Symbol("skip");
|
2122
|
+
async function pFilter(iterable, filterer, options2) {
|
2123
|
+
const values = await pMap(
|
2124
|
+
iterable,
|
2125
|
+
(element, index) => Promise.all([filterer(element, index), element]),
|
2126
|
+
options2
|
2127
|
+
);
|
2128
|
+
return values.filter((value) => Boolean(value[0])).map((value) => value[1]);
|
2129
|
+
}
|
2076
2130
|
var import_temp_dir = (0, import_chunk_AH6QHEOA.__toESM)((0, import_chunk_4EZ7ALS2.require_temp_dir)());
|
2077
2131
|
var { enginesOverride } = require_package();
|
2078
2132
|
var debug = (0, import_debug.default)("prisma:fetch-engine:download");
|
@@ -2129,7 +2183,7 @@ async function download(options) {
|
|
2129
2183
|
if (opts.printVersion) {
|
2130
2184
|
console.log(`version: ${opts.version}`);
|
2131
2185
|
}
|
2132
|
-
const binariesToDownload = await (
|
2186
|
+
const binariesToDownload = await pFilter(binaryJobs, async (job) => {
|
2133
2187
|
const needsToBeDownloaded = await binaryNeedsToBeDownloaded(job, binaryTarget, opts.version);
|
2134
2188
|
const isSupported = import_get_platform.binaryTargets.includes(job.binaryTarget);
|
2135
2189
|
const shouldDownload = isSupported && !job.envVarPath && // this is for custom binaries
|
package/dist/download.js
CHANGED
@@ -18,15 +18,15 @@ 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_H2FNOWPJ.download,
|
22
|
+
getBinaryName: () => import_chunk_H2FNOWPJ.getBinaryName,
|
23
|
+
getVersion: () => import_chunk_H2FNOWPJ.getVersion,
|
24
|
+
maybeCopyToTmp: () => import_chunk_H2FNOWPJ.maybeCopyToTmp,
|
25
|
+
plusX: () => import_chunk_H2FNOWPJ.plusX,
|
26
|
+
vercelPkgPathRegex: () => import_chunk_H2FNOWPJ.vercelPkgPathRegex
|
27
27
|
});
|
28
28
|
module.exports = __toCommonJS(download_exports);
|
29
|
-
var
|
29
|
+
var import_chunk_H2FNOWPJ = require("./chunk-H2FNOWPJ.js");
|
30
30
|
var import_chunk_4LX3XBNY = require("./chunk-4LX3XBNY.js");
|
31
31
|
var import_chunk_MX3HXAU2 = require("./chunk-MX3HXAU2.js");
|
32
32
|
var import_chunk_FKKOTNO6 = require("./chunk-FKKOTNO6.js");
|
package/dist/index.js
CHANGED
@@ -21,20 +21,20 @@ __export(index_exports, {
|
|
21
21
|
BinaryType: () => import_chunk_X37PZICB.BinaryType,
|
22
22
|
allEngineEnvVarsSet: () => import_chunk_PXQVM7NP.allEngineEnvVarsSet,
|
23
23
|
deprecatedEnvVarMap: () => import_chunk_PXQVM7NP.deprecatedEnvVarMap,
|
24
|
-
download: () =>
|
24
|
+
download: () => import_chunk_H2FNOWPJ.download,
|
25
25
|
engineEnvVarMap: () => import_chunk_PXQVM7NP.engineEnvVarMap,
|
26
26
|
getBinaryEnvVarPath: () => import_chunk_PXQVM7NP.getBinaryEnvVarPath,
|
27
|
-
getBinaryName: () =>
|
27
|
+
getBinaryName: () => import_chunk_H2FNOWPJ.getBinaryName,
|
28
28
|
getCacheDir: () => import_chunk_G7EM4XDM.getCacheDir,
|
29
29
|
getProxyAgent: () => import_chunk_ZSBPBV34.getProxyAgent,
|
30
|
-
getVersion: () =>
|
31
|
-
maybeCopyToTmp: () =>
|
30
|
+
getVersion: () => import_chunk_H2FNOWPJ.getVersion,
|
31
|
+
maybeCopyToTmp: () => import_chunk_H2FNOWPJ.maybeCopyToTmp,
|
32
32
|
overwriteFile: () => import_chunk_G7EM4XDM.overwriteFile,
|
33
|
-
plusX: () =>
|
34
|
-
vercelPkgPathRegex: () =>
|
33
|
+
plusX: () => import_chunk_H2FNOWPJ.plusX,
|
34
|
+
vercelPkgPathRegex: () => import_chunk_H2FNOWPJ.vercelPkgPathRegex
|
35
35
|
});
|
36
36
|
module.exports = __toCommonJS(index_exports);
|
37
|
-
var
|
37
|
+
var import_chunk_H2FNOWPJ = require("./chunk-H2FNOWPJ.js");
|
38
38
|
var import_chunk_4LX3XBNY = require("./chunk-4LX3XBNY.js");
|
39
39
|
var import_chunk_MX3HXAU2 = require("./chunk-MX3HXAU2.js");
|
40
40
|
var import_chunk_FKKOTNO6 = require("./chunk-FKKOTNO6.js");
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@prisma/fetch-engine",
|
3
|
-
"version": "6.5.0-dev.
|
3
|
+
"version": "6.5.0-dev.26",
|
4
4
|
"description": "This package is intended for Prisma's internal use",
|
5
5
|
"main": "dist/index.js",
|
6
6
|
"types": "dist/index.d.ts",
|
@@ -30,7 +30,7 @@
|
|
30
30
|
"jest": "29.7.0",
|
31
31
|
"kleur": "4.1.5",
|
32
32
|
"node-fetch": "3.3.2",
|
33
|
-
"p-filter": "
|
33
|
+
"p-filter": "4.1.0",
|
34
34
|
"p-map": "4.0.0",
|
35
35
|
"p-retry": "4.6.2",
|
36
36
|
"progress": "2.0.3",
|
@@ -43,8 +43,8 @@
|
|
43
43
|
},
|
44
44
|
"dependencies": {
|
45
45
|
"@prisma/engines-version": "6.4.0-29.a9055b89e58b4b5bfb59600785423b1db3d0e75d",
|
46
|
-
"@prisma/debug": "6.5.0-dev.
|
47
|
-
"@prisma/get-platform": "6.5.0-dev.
|
46
|
+
"@prisma/debug": "6.5.0-dev.26",
|
47
|
+
"@prisma/get-platform": "6.5.0-dev.26"
|
48
48
|
},
|
49
49
|
"files": [
|
50
50
|
"README.md",
|