@prisma/fetch-engine 6.20.0-integration-next.3 → 6.20.0-integration-merge-release-workflows.2
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/BinaryType.d.ts +2 -0
- package/dist/BinaryType.js +2 -2
- package/dist/{chunk-4CBSYQEY.js → chunk-3VVCXIQ5.js} +5 -5
- package/dist/{chunk-UZIIO3VK.js → chunk-CY52DY2B.js} +820 -83
- package/dist/{chunk-VGMB4WXF.js → chunk-LONQL55G.js} +15 -8
- package/dist/{chunk-XNR2KDTK.js → chunk-QFA3XBMW.js} +11 -3
- package/dist/{chunk-BYDIRBHB.js → chunk-RXM4EBGR.js} +213 -687
- package/dist/{chunk-CNO6T77T.js → chunk-VAPNG6TS.js} +238 -69
- package/dist/{chunk-GQZPGRKF.js → chunk-VCBTN2LA.js} +43 -29
- package/dist/{chunk-UGYSLLOS.js → chunk-WU2TVCL4.js} +44 -30
- package/dist/{chunk-66KG5WKV.js → chunk-X37PZICB.js} +5 -3
- package/dist/cleanupCache.js +4 -3
- package/dist/download.d.ts +1 -1
- package/dist/download.js +14 -14
- package/dist/downloadZip.js +6 -5
- package/dist/env.d.ts +2 -0
- package/dist/env.js +6 -6
- package/dist/getProxyAgent.js +2 -2
- package/dist/index.js +22 -22
- package/dist/{multipart-parser-AOASR4DL.js → multipart-parser-ASKQAOL4.js} +6 -6
- package/dist/utils.js +6 -5
- package/package.json +5 -5
|
@@ -26,11 +26,11 @@ 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_VAPNG6TS_exports = {};
|
|
30
|
+
__export(chunk_VAPNG6TS_exports, {
|
|
31
31
|
getProxyAgent: () => getProxyAgent
|
|
32
32
|
});
|
|
33
|
-
module.exports = __toCommonJS(
|
|
33
|
+
module.exports = __toCommonJS(chunk_VAPNG6TS_exports);
|
|
34
34
|
var import_chunk_QGM4M3NI = require("./chunk-QGM4M3NI.js");
|
|
35
35
|
var import_debug = __toESM(require("@prisma/debug"));
|
|
36
36
|
var require_ms = (0, import_chunk_QGM4M3NI.__commonJS)({
|
|
@@ -149,7 +149,7 @@ var require_ms = (0, import_chunk_QGM4M3NI.__commonJS)({
|
|
|
149
149
|
}
|
|
150
150
|
});
|
|
151
151
|
var require_common = (0, import_chunk_QGM4M3NI.__commonJS)({
|
|
152
|
-
"../../node_modules/.pnpm/debug@4.4.
|
|
152
|
+
"../../node_modules/.pnpm/debug@4.4.0/node_modules/debug/src/common.js"(exports, module2) {
|
|
153
153
|
"use strict";
|
|
154
154
|
function setup(env) {
|
|
155
155
|
createDebug.debug = createDebug;
|
|
@@ -251,7 +251,7 @@ var require_common = (0, import_chunk_QGM4M3NI.__commonJS)({
|
|
|
251
251
|
createDebug.namespaces = namespaces;
|
|
252
252
|
createDebug.names = [];
|
|
253
253
|
createDebug.skips = [];
|
|
254
|
-
const split = (typeof namespaces === "string" ? namespaces : "").trim().replace(
|
|
254
|
+
const split = (typeof namespaces === "string" ? namespaces : "").trim().replace(" ", ",").split(",").filter(Boolean);
|
|
255
255
|
for (const ns of split) {
|
|
256
256
|
if (ns[0] === "-") {
|
|
257
257
|
createDebug.skips.push(ns.slice(1));
|
|
@@ -325,7 +325,7 @@ var require_common = (0, import_chunk_QGM4M3NI.__commonJS)({
|
|
|
325
325
|
}
|
|
326
326
|
});
|
|
327
327
|
var require_browser = (0, import_chunk_QGM4M3NI.__commonJS)({
|
|
328
|
-
"../../node_modules/.pnpm/debug@4.4.
|
|
328
|
+
"../../node_modules/.pnpm/debug@4.4.0/node_modules/debug/src/browser.js"(exports, module2) {
|
|
329
329
|
"use strict";
|
|
330
330
|
exports.formatArgs = formatArgs;
|
|
331
331
|
exports.save = save;
|
|
@@ -468,7 +468,7 @@ var require_browser = (0, import_chunk_QGM4M3NI.__commonJS)({
|
|
|
468
468
|
function load() {
|
|
469
469
|
let r;
|
|
470
470
|
try {
|
|
471
|
-
r = exports.storage.getItem("debug")
|
|
471
|
+
r = exports.storage.getItem("debug");
|
|
472
472
|
} catch (error) {
|
|
473
473
|
}
|
|
474
474
|
if (!r && typeof process !== "undefined" && "env" in process) {
|
|
@@ -617,7 +617,7 @@ var require_supports_color = (0, import_chunk_QGM4M3NI.__commonJS)({
|
|
|
617
617
|
}
|
|
618
618
|
});
|
|
619
619
|
var require_node = (0, import_chunk_QGM4M3NI.__commonJS)({
|
|
620
|
-
"../../node_modules/.pnpm/debug@4.4.
|
|
620
|
+
"../../node_modules/.pnpm/debug@4.4.0/node_modules/debug/src/node.js"(exports, module2) {
|
|
621
621
|
"use strict";
|
|
622
622
|
var tty = (0, import_chunk_QGM4M3NI.__require)("tty");
|
|
623
623
|
var util = (0, import_chunk_QGM4M3NI.__require)("util");
|
|
@@ -790,7 +790,7 @@ var require_node = (0, import_chunk_QGM4M3NI.__commonJS)({
|
|
|
790
790
|
}
|
|
791
791
|
});
|
|
792
792
|
var require_src = (0, import_chunk_QGM4M3NI.__commonJS)({
|
|
793
|
-
"../../node_modules/.pnpm/debug@4.4.
|
|
793
|
+
"../../node_modules/.pnpm/debug@4.4.0/node_modules/debug/src/index.js"(exports, module2) {
|
|
794
794
|
"use strict";
|
|
795
795
|
if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) {
|
|
796
796
|
module2.exports = require_browser();
|
|
@@ -800,7 +800,7 @@ var require_src = (0, import_chunk_QGM4M3NI.__commonJS)({
|
|
|
800
800
|
}
|
|
801
801
|
});
|
|
802
802
|
var require_helpers = (0, import_chunk_QGM4M3NI.__commonJS)({
|
|
803
|
-
"../../node_modules/.pnpm/agent-base@7.1.
|
|
803
|
+
"../../node_modules/.pnpm/agent-base@7.1.0/node_modules/agent-base/dist/helpers.js"(exports) {
|
|
804
804
|
"use strict";
|
|
805
805
|
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
806
806
|
if (k2 === void 0) k2 = k;
|
|
@@ -868,7 +868,7 @@ var require_helpers = (0, import_chunk_QGM4M3NI.__commonJS)({
|
|
|
868
868
|
}
|
|
869
869
|
});
|
|
870
870
|
var require_dist = (0, import_chunk_QGM4M3NI.__commonJS)({
|
|
871
|
-
"../../node_modules/.pnpm/agent-base@7.1.
|
|
871
|
+
"../../node_modules/.pnpm/agent-base@7.1.0/node_modules/agent-base/dist/index.js"(exports) {
|
|
872
872
|
"use strict";
|
|
873
873
|
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
874
874
|
if (k2 === void 0) k2 = k;
|
|
@@ -902,9 +902,7 @@ var require_dist = (0, import_chunk_QGM4M3NI.__commonJS)({
|
|
|
902
902
|
};
|
|
903
903
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
904
904
|
exports.Agent = void 0;
|
|
905
|
-
var net = __importStar((0, import_chunk_QGM4M3NI.__require)("net"));
|
|
906
905
|
var http = __importStar((0, import_chunk_QGM4M3NI.__require)("http"));
|
|
907
|
-
var https_1 = (0, import_chunk_QGM4M3NI.__require)("https");
|
|
908
906
|
__exportStar(require_helpers(), exports);
|
|
909
907
|
var INTERNAL = Symbol("AgentBaseInternalState");
|
|
910
908
|
var Agent = class extends http.Agent {
|
|
@@ -929,69 +927,18 @@ var require_dist = (0, import_chunk_QGM4M3NI.__commonJS)({
|
|
|
929
927
|
return false;
|
|
930
928
|
return stack.split("\n").some((l) => l.indexOf("(https.js:") !== -1 || l.indexOf("node:https:") !== -1);
|
|
931
929
|
}
|
|
932
|
-
// In order to support async signatures in `connect()` and Node's native
|
|
933
|
-
// connection pooling in `http.Agent`, the array of sockets for each origin
|
|
934
|
-
// has to be updated synchronously. This is so the length of the array is
|
|
935
|
-
// accurate when `addRequest()` is next called. We achieve this by creating a
|
|
936
|
-
// fake socket and adding it to `sockets[origin]` and incrementing
|
|
937
|
-
// `totalSocketCount`.
|
|
938
|
-
incrementSockets(name) {
|
|
939
|
-
if (this.maxSockets === Infinity && this.maxTotalSockets === Infinity) {
|
|
940
|
-
return null;
|
|
941
|
-
}
|
|
942
|
-
if (!this.sockets[name]) {
|
|
943
|
-
this.sockets[name] = [];
|
|
944
|
-
}
|
|
945
|
-
const fakeSocket = new net.Socket({ writable: false });
|
|
946
|
-
this.sockets[name].push(fakeSocket);
|
|
947
|
-
this.totalSocketCount++;
|
|
948
|
-
return fakeSocket;
|
|
949
|
-
}
|
|
950
|
-
decrementSockets(name, socket) {
|
|
951
|
-
if (!this.sockets[name] || socket === null) {
|
|
952
|
-
return;
|
|
953
|
-
}
|
|
954
|
-
const sockets = this.sockets[name];
|
|
955
|
-
const index = sockets.indexOf(socket);
|
|
956
|
-
if (index !== -1) {
|
|
957
|
-
sockets.splice(index, 1);
|
|
958
|
-
this.totalSocketCount--;
|
|
959
|
-
if (sockets.length === 0) {
|
|
960
|
-
delete this.sockets[name];
|
|
961
|
-
}
|
|
962
|
-
}
|
|
963
|
-
}
|
|
964
|
-
// In order to properly update the socket pool, we need to call `getName()` on
|
|
965
|
-
// the core `https.Agent` if it is a secureEndpoint.
|
|
966
|
-
getName(options) {
|
|
967
|
-
const secureEndpoint = this.isSecureEndpoint(options);
|
|
968
|
-
if (secureEndpoint) {
|
|
969
|
-
return https_1.Agent.prototype.getName.call(this, options);
|
|
970
|
-
}
|
|
971
|
-
return super.getName(options);
|
|
972
|
-
}
|
|
973
930
|
createSocket(req, options, cb) {
|
|
974
931
|
const connectOpts = {
|
|
975
932
|
...options,
|
|
976
933
|
secureEndpoint: this.isSecureEndpoint(options)
|
|
977
934
|
};
|
|
978
|
-
const name = this.getName(connectOpts);
|
|
979
|
-
const fakeSocket = this.incrementSockets(name);
|
|
980
935
|
Promise.resolve().then(() => this.connect(req, connectOpts)).then((socket) => {
|
|
981
|
-
this.decrementSockets(name, fakeSocket);
|
|
982
936
|
if (socket instanceof http.Agent) {
|
|
983
|
-
|
|
984
|
-
return socket.addRequest(req, connectOpts);
|
|
985
|
-
} catch (err) {
|
|
986
|
-
return cb(err);
|
|
987
|
-
}
|
|
937
|
+
return socket.addRequest(req, connectOpts);
|
|
988
938
|
}
|
|
989
939
|
this[INTERNAL].currentSocket = socket;
|
|
990
940
|
super.createSocket(req, options, cb);
|
|
991
|
-
},
|
|
992
|
-
this.decrementSockets(name, fakeSocket);
|
|
993
|
-
cb(err);
|
|
994
|
-
});
|
|
941
|
+
}, cb);
|
|
995
942
|
}
|
|
996
943
|
createConnection() {
|
|
997
944
|
const socket = this[INTERNAL].currentSocket;
|
|
@@ -1149,6 +1096,228 @@ var require_dist2 = (0, import_chunk_QGM4M3NI.__commonJS)({
|
|
|
1149
1096
|
}
|
|
1150
1097
|
}
|
|
1151
1098
|
});
|
|
1099
|
+
var require_helpers2 = (0, import_chunk_QGM4M3NI.__commonJS)({
|
|
1100
|
+
"../../node_modules/.pnpm/agent-base@7.1.3/node_modules/agent-base/dist/helpers.js"(exports) {
|
|
1101
|
+
"use strict";
|
|
1102
|
+
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
1103
|
+
if (k2 === void 0) k2 = k;
|
|
1104
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
1105
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
1106
|
+
desc = { enumerable: true, get: function() {
|
|
1107
|
+
return m[k];
|
|
1108
|
+
} };
|
|
1109
|
+
}
|
|
1110
|
+
Object.defineProperty(o, k2, desc);
|
|
1111
|
+
} : function(o, m, k, k2) {
|
|
1112
|
+
if (k2 === void 0) k2 = k;
|
|
1113
|
+
o[k2] = m[k];
|
|
1114
|
+
});
|
|
1115
|
+
var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? function(o, v) {
|
|
1116
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
1117
|
+
} : function(o, v) {
|
|
1118
|
+
o["default"] = v;
|
|
1119
|
+
});
|
|
1120
|
+
var __importStar = exports && exports.__importStar || function(mod) {
|
|
1121
|
+
if (mod && mod.__esModule) return mod;
|
|
1122
|
+
var result = {};
|
|
1123
|
+
if (mod != null) {
|
|
1124
|
+
for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
1125
|
+
}
|
|
1126
|
+
__setModuleDefault(result, mod);
|
|
1127
|
+
return result;
|
|
1128
|
+
};
|
|
1129
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1130
|
+
exports.req = exports.json = exports.toBuffer = void 0;
|
|
1131
|
+
var http = __importStar((0, import_chunk_QGM4M3NI.__require)("http"));
|
|
1132
|
+
var https = __importStar((0, import_chunk_QGM4M3NI.__require)("https"));
|
|
1133
|
+
async function toBuffer(stream) {
|
|
1134
|
+
let length = 0;
|
|
1135
|
+
const chunks = [];
|
|
1136
|
+
for await (const chunk of stream) {
|
|
1137
|
+
length += chunk.length;
|
|
1138
|
+
chunks.push(chunk);
|
|
1139
|
+
}
|
|
1140
|
+
return Buffer.concat(chunks, length);
|
|
1141
|
+
}
|
|
1142
|
+
exports.toBuffer = toBuffer;
|
|
1143
|
+
async function json(stream) {
|
|
1144
|
+
const buf = await toBuffer(stream);
|
|
1145
|
+
const str = buf.toString("utf8");
|
|
1146
|
+
try {
|
|
1147
|
+
return JSON.parse(str);
|
|
1148
|
+
} catch (_err) {
|
|
1149
|
+
const err = _err;
|
|
1150
|
+
err.message += ` (input: ${str})`;
|
|
1151
|
+
throw err;
|
|
1152
|
+
}
|
|
1153
|
+
}
|
|
1154
|
+
exports.json = json;
|
|
1155
|
+
function req(url, opts = {}) {
|
|
1156
|
+
const href = typeof url === "string" ? url : url.href;
|
|
1157
|
+
const req2 = (href.startsWith("https:") ? https : http).request(url, opts);
|
|
1158
|
+
const promise = new Promise((resolve, reject) => {
|
|
1159
|
+
req2.once("response", resolve).once("error", reject).end();
|
|
1160
|
+
});
|
|
1161
|
+
req2.then = promise.then.bind(promise);
|
|
1162
|
+
return req2;
|
|
1163
|
+
}
|
|
1164
|
+
exports.req = req;
|
|
1165
|
+
}
|
|
1166
|
+
});
|
|
1167
|
+
var require_dist3 = (0, import_chunk_QGM4M3NI.__commonJS)({
|
|
1168
|
+
"../../node_modules/.pnpm/agent-base@7.1.3/node_modules/agent-base/dist/index.js"(exports) {
|
|
1169
|
+
"use strict";
|
|
1170
|
+
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
1171
|
+
if (k2 === void 0) k2 = k;
|
|
1172
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
1173
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
1174
|
+
desc = { enumerable: true, get: function() {
|
|
1175
|
+
return m[k];
|
|
1176
|
+
} };
|
|
1177
|
+
}
|
|
1178
|
+
Object.defineProperty(o, k2, desc);
|
|
1179
|
+
} : function(o, m, k, k2) {
|
|
1180
|
+
if (k2 === void 0) k2 = k;
|
|
1181
|
+
o[k2] = m[k];
|
|
1182
|
+
});
|
|
1183
|
+
var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? function(o, v) {
|
|
1184
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
1185
|
+
} : function(o, v) {
|
|
1186
|
+
o["default"] = v;
|
|
1187
|
+
});
|
|
1188
|
+
var __importStar = exports && exports.__importStar || function(mod) {
|
|
1189
|
+
if (mod && mod.__esModule) return mod;
|
|
1190
|
+
var result = {};
|
|
1191
|
+
if (mod != null) {
|
|
1192
|
+
for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
1193
|
+
}
|
|
1194
|
+
__setModuleDefault(result, mod);
|
|
1195
|
+
return result;
|
|
1196
|
+
};
|
|
1197
|
+
var __exportStar = exports && exports.__exportStar || function(m, exports2) {
|
|
1198
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports2, p)) __createBinding(exports2, m, p);
|
|
1199
|
+
};
|
|
1200
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1201
|
+
exports.Agent = void 0;
|
|
1202
|
+
var net = __importStar((0, import_chunk_QGM4M3NI.__require)("net"));
|
|
1203
|
+
var http = __importStar((0, import_chunk_QGM4M3NI.__require)("http"));
|
|
1204
|
+
var https_1 = (0, import_chunk_QGM4M3NI.__require)("https");
|
|
1205
|
+
__exportStar(require_helpers2(), exports);
|
|
1206
|
+
var INTERNAL = Symbol("AgentBaseInternalState");
|
|
1207
|
+
var Agent = class extends http.Agent {
|
|
1208
|
+
constructor(opts) {
|
|
1209
|
+
super(opts);
|
|
1210
|
+
this[INTERNAL] = {};
|
|
1211
|
+
}
|
|
1212
|
+
/**
|
|
1213
|
+
* Determine whether this is an `http` or `https` request.
|
|
1214
|
+
*/
|
|
1215
|
+
isSecureEndpoint(options) {
|
|
1216
|
+
if (options) {
|
|
1217
|
+
if (typeof options.secureEndpoint === "boolean") {
|
|
1218
|
+
return options.secureEndpoint;
|
|
1219
|
+
}
|
|
1220
|
+
if (typeof options.protocol === "string") {
|
|
1221
|
+
return options.protocol === "https:";
|
|
1222
|
+
}
|
|
1223
|
+
}
|
|
1224
|
+
const { stack } = new Error();
|
|
1225
|
+
if (typeof stack !== "string")
|
|
1226
|
+
return false;
|
|
1227
|
+
return stack.split("\n").some((l) => l.indexOf("(https.js:") !== -1 || l.indexOf("node:https:") !== -1);
|
|
1228
|
+
}
|
|
1229
|
+
// In order to support async signatures in `connect()` and Node's native
|
|
1230
|
+
// connection pooling in `http.Agent`, the array of sockets for each origin
|
|
1231
|
+
// has to be updated synchronously. This is so the length of the array is
|
|
1232
|
+
// accurate when `addRequest()` is next called. We achieve this by creating a
|
|
1233
|
+
// fake socket and adding it to `sockets[origin]` and incrementing
|
|
1234
|
+
// `totalSocketCount`.
|
|
1235
|
+
incrementSockets(name) {
|
|
1236
|
+
if (this.maxSockets === Infinity && this.maxTotalSockets === Infinity) {
|
|
1237
|
+
return null;
|
|
1238
|
+
}
|
|
1239
|
+
if (!this.sockets[name]) {
|
|
1240
|
+
this.sockets[name] = [];
|
|
1241
|
+
}
|
|
1242
|
+
const fakeSocket = new net.Socket({ writable: false });
|
|
1243
|
+
this.sockets[name].push(fakeSocket);
|
|
1244
|
+
this.totalSocketCount++;
|
|
1245
|
+
return fakeSocket;
|
|
1246
|
+
}
|
|
1247
|
+
decrementSockets(name, socket) {
|
|
1248
|
+
if (!this.sockets[name] || socket === null) {
|
|
1249
|
+
return;
|
|
1250
|
+
}
|
|
1251
|
+
const sockets = this.sockets[name];
|
|
1252
|
+
const index = sockets.indexOf(socket);
|
|
1253
|
+
if (index !== -1) {
|
|
1254
|
+
sockets.splice(index, 1);
|
|
1255
|
+
this.totalSocketCount--;
|
|
1256
|
+
if (sockets.length === 0) {
|
|
1257
|
+
delete this.sockets[name];
|
|
1258
|
+
}
|
|
1259
|
+
}
|
|
1260
|
+
}
|
|
1261
|
+
// In order to properly update the socket pool, we need to call `getName()` on
|
|
1262
|
+
// the core `https.Agent` if it is a secureEndpoint.
|
|
1263
|
+
getName(options) {
|
|
1264
|
+
const secureEndpoint = typeof options.secureEndpoint === "boolean" ? options.secureEndpoint : this.isSecureEndpoint(options);
|
|
1265
|
+
if (secureEndpoint) {
|
|
1266
|
+
return https_1.Agent.prototype.getName.call(this, options);
|
|
1267
|
+
}
|
|
1268
|
+
return super.getName(options);
|
|
1269
|
+
}
|
|
1270
|
+
createSocket(req, options, cb) {
|
|
1271
|
+
const connectOpts = {
|
|
1272
|
+
...options,
|
|
1273
|
+
secureEndpoint: this.isSecureEndpoint(options)
|
|
1274
|
+
};
|
|
1275
|
+
const name = this.getName(connectOpts);
|
|
1276
|
+
const fakeSocket = this.incrementSockets(name);
|
|
1277
|
+
Promise.resolve().then(() => this.connect(req, connectOpts)).then((socket) => {
|
|
1278
|
+
this.decrementSockets(name, fakeSocket);
|
|
1279
|
+
if (socket instanceof http.Agent) {
|
|
1280
|
+
try {
|
|
1281
|
+
return socket.addRequest(req, connectOpts);
|
|
1282
|
+
} catch (err) {
|
|
1283
|
+
return cb(err);
|
|
1284
|
+
}
|
|
1285
|
+
}
|
|
1286
|
+
this[INTERNAL].currentSocket = socket;
|
|
1287
|
+
super.createSocket(req, options, cb);
|
|
1288
|
+
}, (err) => {
|
|
1289
|
+
this.decrementSockets(name, fakeSocket);
|
|
1290
|
+
cb(err);
|
|
1291
|
+
});
|
|
1292
|
+
}
|
|
1293
|
+
createConnection() {
|
|
1294
|
+
const socket = this[INTERNAL].currentSocket;
|
|
1295
|
+
this[INTERNAL].currentSocket = void 0;
|
|
1296
|
+
if (!socket) {
|
|
1297
|
+
throw new Error("No socket was returned in the `connect()` function");
|
|
1298
|
+
}
|
|
1299
|
+
return socket;
|
|
1300
|
+
}
|
|
1301
|
+
get defaultPort() {
|
|
1302
|
+
return this[INTERNAL].defaultPort ?? (this.protocol === "https:" ? 443 : 80);
|
|
1303
|
+
}
|
|
1304
|
+
set defaultPort(v) {
|
|
1305
|
+
if (this[INTERNAL]) {
|
|
1306
|
+
this[INTERNAL].defaultPort = v;
|
|
1307
|
+
}
|
|
1308
|
+
}
|
|
1309
|
+
get protocol() {
|
|
1310
|
+
return this[INTERNAL].protocol ?? (this.isSecureEndpoint() ? "https:" : "http:");
|
|
1311
|
+
}
|
|
1312
|
+
set protocol(v) {
|
|
1313
|
+
if (this[INTERNAL]) {
|
|
1314
|
+
this[INTERNAL].protocol = v;
|
|
1315
|
+
}
|
|
1316
|
+
}
|
|
1317
|
+
};
|
|
1318
|
+
exports.Agent = Agent;
|
|
1319
|
+
}
|
|
1320
|
+
});
|
|
1152
1321
|
var require_parse_proxy_response = (0, import_chunk_QGM4M3NI.__commonJS)({
|
|
1153
1322
|
"../../node_modules/.pnpm/https-proxy-agent@7.0.6/node_modules/https-proxy-agent/dist/parse-proxy-response.js"(exports) {
|
|
1154
1323
|
"use strict";
|
|
@@ -1243,7 +1412,7 @@ var require_parse_proxy_response = (0, import_chunk_QGM4M3NI.__commonJS)({
|
|
|
1243
1412
|
exports.parseProxyResponse = parseProxyResponse;
|
|
1244
1413
|
}
|
|
1245
1414
|
});
|
|
1246
|
-
var
|
|
1415
|
+
var require_dist4 = (0, import_chunk_QGM4M3NI.__commonJS)({
|
|
1247
1416
|
"../../node_modules/.pnpm/https-proxy-agent@7.0.6/node_modules/https-proxy-agent/dist/index.js"(exports) {
|
|
1248
1417
|
"use strict";
|
|
1249
1418
|
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
@@ -1282,7 +1451,7 @@ var require_dist3 = (0, import_chunk_QGM4M3NI.__commonJS)({
|
|
|
1282
1451
|
var tls = __importStar((0, import_chunk_QGM4M3NI.__require)("tls"));
|
|
1283
1452
|
var assert_1 = __importDefault((0, import_chunk_QGM4M3NI.__require)("assert"));
|
|
1284
1453
|
var debug_1 = __importDefault(require_src());
|
|
1285
|
-
var agent_base_1 =
|
|
1454
|
+
var agent_base_1 = require_dist3();
|
|
1286
1455
|
var url_1 = (0, import_chunk_QGM4M3NI.__require)("url");
|
|
1287
1456
|
var parse_proxy_response_1 = require_parse_proxy_response();
|
|
1288
1457
|
var debug2 = (0, debug_1.default)("https-proxy-agent");
|
|
@@ -1392,7 +1561,7 @@ var require_dist3 = (0, import_chunk_QGM4M3NI.__commonJS)({
|
|
|
1392
1561
|
}
|
|
1393
1562
|
});
|
|
1394
1563
|
var import_http_proxy_agent = (0, import_chunk_QGM4M3NI.__toESM)(require_dist2());
|
|
1395
|
-
var import_https_proxy_agent = (0, import_chunk_QGM4M3NI.__toESM)(
|
|
1564
|
+
var import_https_proxy_agent = (0, import_chunk_QGM4M3NI.__toESM)(require_dist4());
|
|
1396
1565
|
var debug = (0, import_debug.default)("prisma:fetch-engine:getProxyAgent");
|
|
1397
1566
|
function formatHostname(hostname) {
|
|
1398
1567
|
return hostname.replace(/^\.*/, ".").toLowerCase();
|
|
@@ -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_VCBTN2LA_exports = {};
|
|
30
|
+
__export(chunk_VCBTN2LA_exports, {
|
|
31
31
|
download: () => download,
|
|
32
32
|
getBinaryName: () => getBinaryName,
|
|
33
33
|
getVersion: () => getVersion,
|
|
@@ -35,13 +35,13 @@ __export(chunk_GQZPGRKF_exports, {
|
|
|
35
35
|
plusX: () => plusX,
|
|
36
36
|
vercelPkgPathRegex: () => vercelPkgPathRegex
|
|
37
37
|
});
|
|
38
|
-
module.exports = __toCommonJS(
|
|
38
|
+
module.exports = __toCommonJS(chunk_VCBTN2LA_exports);
|
|
39
39
|
var import_chunk_MWVY55RY = require("./chunk-MWVY55RY.js");
|
|
40
40
|
var import_chunk_7JLQJWOR = require("./chunk-7JLQJWOR.js");
|
|
41
|
-
var
|
|
42
|
-
var
|
|
43
|
-
var
|
|
44
|
-
var
|
|
41
|
+
var import_chunk_3VVCXIQ5 = require("./chunk-3VVCXIQ5.js");
|
|
42
|
+
var import_chunk_CY52DY2B = require("./chunk-CY52DY2B.js");
|
|
43
|
+
var import_chunk_LONQL55G = require("./chunk-LONQL55G.js");
|
|
44
|
+
var import_chunk_QFA3XBMW = require("./chunk-QFA3XBMW.js");
|
|
45
45
|
var import_chunk_FKGWOTGU = require("./chunk-FKGWOTGU.js");
|
|
46
46
|
var import_chunk_QGM4M3NI = require("./chunk-QGM4M3NI.js");
|
|
47
47
|
var import_node_fs = __toESM(require("node:fs"));
|
|
@@ -600,7 +600,7 @@ var require_package = (0, import_chunk_QGM4M3NI.__commonJS)({
|
|
|
600
600
|
bugs: "https://github.com/prisma/prisma/issues",
|
|
601
601
|
enginesOverride: {},
|
|
602
602
|
devDependencies: {
|
|
603
|
-
"@types/node": "
|
|
603
|
+
"@types/node": "18.19.76",
|
|
604
604
|
"@types/progress": "2.0.7",
|
|
605
605
|
del: "6.1.1",
|
|
606
606
|
execa: "8.0.1",
|
|
@@ -622,7 +622,7 @@ var require_package = (0, import_chunk_QGM4M3NI.__commonJS)({
|
|
|
622
622
|
},
|
|
623
623
|
dependencies: {
|
|
624
624
|
"@prisma/debug": "workspace:*",
|
|
625
|
-
"@prisma/engines-version": "6.19.0-
|
|
625
|
+
"@prisma/engines-version": "6.19.0-26.2ba551f319ab1df4bc874a89965d8b3641056773",
|
|
626
626
|
"@prisma/get-platform": "workspace:*"
|
|
627
627
|
},
|
|
628
628
|
scripts: {
|
|
@@ -2140,7 +2140,7 @@ function create$(options) {
|
|
|
2140
2140
|
return $2;
|
|
2141
2141
|
}
|
|
2142
2142
|
var $ = create$();
|
|
2143
|
-
var import_fs_extra = (0, import_chunk_QGM4M3NI.__toESM)((0,
|
|
2143
|
+
var import_fs_extra = (0, import_chunk_QGM4M3NI.__toESM)((0, import_chunk_LONQL55G.require_lib)());
|
|
2144
2144
|
async function pMap(iterable, mapper, {
|
|
2145
2145
|
concurrency = Number.POSITIVE_INFINITY,
|
|
2146
2146
|
stopOnError = true,
|
|
@@ -2270,7 +2270,7 @@ async function pFilter(iterable, filterer, options) {
|
|
|
2270
2270
|
);
|
|
2271
2271
|
return values.filter((value) => Boolean(value[0])).map((value) => value[1]);
|
|
2272
2272
|
}
|
|
2273
|
-
var import_temp_dir = (0, import_chunk_QGM4M3NI.__toESM)((0,
|
|
2273
|
+
var import_temp_dir = (0, import_chunk_QGM4M3NI.__toESM)((0, import_chunk_CY52DY2B.require_temp_dir)());
|
|
2274
2274
|
var { enginesOverride } = require_package();
|
|
2275
2275
|
var debug = (0, import_debug.default)("prisma:fetch-engine:download");
|
|
2276
2276
|
var exists = (0, import_node_util.promisify)(import_node_fs.default.exists);
|
|
@@ -2285,16 +2285,18 @@ async function download(options) {
|
|
|
2285
2285
|
options.skipCacheIntegrityCheck = true;
|
|
2286
2286
|
}
|
|
2287
2287
|
const { binaryTarget, ...os2 } = await (0, import_get_platform.getPlatformInfo)();
|
|
2288
|
-
if (os2.targetDistro && ["nixos"].includes(os2.targetDistro) && !(0,
|
|
2288
|
+
if (os2.targetDistro && ["nixos"].includes(os2.targetDistro) && !(0, import_chunk_QFA3XBMW.allEngineEnvVarsSet)(Object.keys(options.binaries))) {
|
|
2289
2289
|
console.error(
|
|
2290
|
-
`${(0,
|
|
2290
|
+
`${(0, import_chunk_QFA3XBMW.yellow)("Warning")} Precompiled engine files are not available for ${os2.targetDistro}, please provide the paths via environment variables, see https://pris.ly/d/custom-engines`
|
|
2291
2291
|
);
|
|
2292
2292
|
} else if (["freebsd11", "freebsd12", "freebsd13", "freebsd14", "freebsd15", "openbsd", "netbsd"].includes(binaryTarget)) {
|
|
2293
2293
|
console.error(
|
|
2294
|
-
`${(0,
|
|
2294
|
+
`${(0, import_chunk_QFA3XBMW.yellow)(
|
|
2295
2295
|
"Warning"
|
|
2296
2296
|
)} Precompiled engine files are not available for ${binaryTarget}. Read more about building your own engines at https://pris.ly/d/build-engines`
|
|
2297
2297
|
);
|
|
2298
|
+
} else if ("libquery-engine" in options.binaries) {
|
|
2299
|
+
(0, import_get_platform.assertNodeAPISupported)();
|
|
2298
2300
|
}
|
|
2299
2301
|
const opts = {
|
|
2300
2302
|
...options,
|
|
@@ -2312,7 +2314,7 @@ async function download(options) {
|
|
|
2312
2314
|
binaryTarget: binaryTarget2,
|
|
2313
2315
|
fileName,
|
|
2314
2316
|
targetFilePath,
|
|
2315
|
-
envVarPath: (0,
|
|
2317
|
+
envVarPath: (0, import_chunk_QFA3XBMW.getBinaryEnvVarPath)(binaryName)?.path,
|
|
2316
2318
|
skipCacheIntegrityCheck: !!opts.skipCacheIntegrityCheck
|
|
2317
2319
|
};
|
|
2318
2320
|
})
|
|
@@ -2335,7 +2337,7 @@ async function download(options) {
|
|
|
2335
2337
|
return shouldDownload;
|
|
2336
2338
|
});
|
|
2337
2339
|
if (binariesToDownload.length > 0) {
|
|
2338
|
-
const cleanupPromise = (0,
|
|
2340
|
+
const cleanupPromise = (0, import_chunk_3VVCXIQ5.cleanupCache)();
|
|
2339
2341
|
let finishBar;
|
|
2340
2342
|
let setProgress;
|
|
2341
2343
|
if (opts.showProgress) {
|
|
@@ -2344,7 +2346,7 @@ async function download(options) {
|
|
|
2344
2346
|
setProgress = collectiveBar.setProgress;
|
|
2345
2347
|
}
|
|
2346
2348
|
const promises = binariesToDownload.map((job) => {
|
|
2347
|
-
const downloadUrl = (0,
|
|
2349
|
+
const downloadUrl = (0, import_chunk_LONQL55G.getDownloadUrl)({
|
|
2348
2350
|
channel: "all_commits",
|
|
2349
2351
|
version: opts.version,
|
|
2350
2352
|
binaryTarget: job.binaryTarget,
|
|
@@ -2378,7 +2380,10 @@ async function download(options) {
|
|
|
2378
2380
|
return binaryPaths;
|
|
2379
2381
|
}
|
|
2380
2382
|
function getCollectiveBar(options) {
|
|
2381
|
-
const
|
|
2383
|
+
const hasNodeAPI = "libquery-engine" in options.binaries;
|
|
2384
|
+
const bar = (0, import_chunk_MWVY55RY.getBar)(
|
|
2385
|
+
`Downloading Prisma engines${hasNodeAPI ? " for Node-API" : ""} for ${options.binaryTargets?.map((p) => (0, import_chunk_QFA3XBMW.bold)(p)).join(" and ")}`
|
|
2386
|
+
);
|
|
2382
2387
|
const progressMap = {};
|
|
2383
2388
|
const numDownloads = Object.values(options.binaries).length * Object.values(options?.binaryTargets ?? []).length;
|
|
2384
2389
|
const setProgress = (sourcePath) => (progress) => {
|
|
@@ -2422,7 +2427,7 @@ async function binaryNeedsToBeDownloaded(job, nativePlatform, version) {
|
|
|
2422
2427
|
});
|
|
2423
2428
|
if (cachedFile) {
|
|
2424
2429
|
if (job.skipCacheIntegrityCheck === true) {
|
|
2425
|
-
await (0,
|
|
2430
|
+
await (0, import_chunk_LONQL55G.overwriteFile)(cachedFile, job.targetFilePath);
|
|
2426
2431
|
return false;
|
|
2427
2432
|
}
|
|
2428
2433
|
const sha256FilePath = cachedFile + ".sha256";
|
|
@@ -2433,12 +2438,12 @@ async function binaryNeedsToBeDownloaded(job, nativePlatform, version) {
|
|
|
2433
2438
|
if (!targetExists) {
|
|
2434
2439
|
debug(`copying ${cachedFile} to ${job.targetFilePath}`);
|
|
2435
2440
|
await import_node_fs.default.promises.utimes(cachedFile, /* @__PURE__ */ new Date(), /* @__PURE__ */ new Date());
|
|
2436
|
-
await (0,
|
|
2441
|
+
await (0, import_chunk_LONQL55G.overwriteFile)(cachedFile, job.targetFilePath);
|
|
2437
2442
|
}
|
|
2438
2443
|
const targetSha256 = await (0, import_chunk_FKGWOTGU.getHash)(job.targetFilePath);
|
|
2439
2444
|
if (sha256File !== targetSha256) {
|
|
2440
2445
|
debug(`overwriting ${job.targetFilePath} with ${cachedFile} as hashes do not match`);
|
|
2441
|
-
await (0,
|
|
2446
|
+
await (0, import_chunk_LONQL55G.overwriteFile)(cachedFile, job.targetFilePath);
|
|
2442
2447
|
}
|
|
2443
2448
|
return false;
|
|
2444
2449
|
} else {
|
|
@@ -2453,7 +2458,7 @@ async function binaryNeedsToBeDownloaded(job, nativePlatform, version) {
|
|
|
2453
2458
|
}
|
|
2454
2459
|
if (cachedFile) {
|
|
2455
2460
|
debug(`copying ${cachedFile} to ${job.targetFilePath}`);
|
|
2456
|
-
await (0,
|
|
2461
|
+
await (0, import_chunk_LONQL55G.overwriteFile)(cachedFile, job.targetFilePath);
|
|
2457
2462
|
return false;
|
|
2458
2463
|
}
|
|
2459
2464
|
return true;
|
|
@@ -2474,15 +2479,24 @@ async function binaryNeedsToBeDownloaded(job, nativePlatform, version) {
|
|
|
2474
2479
|
}
|
|
2475
2480
|
return false;
|
|
2476
2481
|
}
|
|
2477
|
-
async function getVersion(enginePath,
|
|
2482
|
+
async function getVersion(enginePath, binaryName) {
|
|
2478
2483
|
try {
|
|
2479
|
-
|
|
2480
|
-
|
|
2484
|
+
if (binaryName === "libquery-engine") {
|
|
2485
|
+
(0, import_get_platform.assertNodeAPISupported)();
|
|
2486
|
+
const commitHash = (0, import_chunk_QGM4M3NI.__require)(enginePath).version().commit;
|
|
2487
|
+
return `${"libquery-engine"} ${commitHash}`;
|
|
2488
|
+
} else {
|
|
2489
|
+
const result = await execa(enginePath, ["--version"]);
|
|
2490
|
+
return result.stdout;
|
|
2491
|
+
}
|
|
2481
2492
|
} catch {
|
|
2482
2493
|
}
|
|
2483
2494
|
return void 0;
|
|
2484
2495
|
}
|
|
2485
2496
|
function getBinaryName(binaryName, binaryTarget) {
|
|
2497
|
+
if (binaryName === "libquery-engine") {
|
|
2498
|
+
return `${(0, import_get_platform.getNodeAPIName)(binaryTarget, "fs")}`;
|
|
2499
|
+
}
|
|
2486
2500
|
const extension = binaryTarget === "windows" ? ".exe" : "";
|
|
2487
2501
|
return `${binaryName}-${binaryTarget}${extension}`;
|
|
2488
2502
|
}
|
|
@@ -2491,7 +2505,7 @@ async function getCachedBinaryPath({
|
|
|
2491
2505
|
binaryTarget,
|
|
2492
2506
|
binaryName
|
|
2493
2507
|
}) {
|
|
2494
|
-
const cacheDir = await (0,
|
|
2508
|
+
const cacheDir = await (0, import_chunk_LONQL55G.getCacheDir)(channel, version, binaryTarget);
|
|
2495
2509
|
if (!cacheDir) {
|
|
2496
2510
|
return null;
|
|
2497
2511
|
}
|
|
@@ -2524,7 +2538,7 @@ async function downloadBinary(options) {
|
|
|
2524
2538
|
if (progressCb) {
|
|
2525
2539
|
progressCb(0);
|
|
2526
2540
|
}
|
|
2527
|
-
const { sha256, zippedSha256 } = await (0,
|
|
2541
|
+
const { sha256, zippedSha256 } = await (0, import_chunk_CY52DY2B.downloadZip)(downloadUrl, targetFilePath, progressCb);
|
|
2528
2542
|
if (progressCb) {
|
|
2529
2543
|
progressCb(1);
|
|
2530
2544
|
}
|
|
@@ -2532,7 +2546,7 @@ async function downloadBinary(options) {
|
|
|
2532
2546
|
await saveFileToCache(options, version, sha256, zippedSha256);
|
|
2533
2547
|
}
|
|
2534
2548
|
async function saveFileToCache(job, version, sha256, zippedSha256) {
|
|
2535
|
-
const cacheDir = await (0,
|
|
2549
|
+
const cacheDir = await (0, import_chunk_LONQL55G.getCacheDir)(channel, version, job.binaryTarget);
|
|
2536
2550
|
if (!cacheDir) {
|
|
2537
2551
|
return;
|
|
2538
2552
|
}
|
|
@@ -2540,7 +2554,7 @@ async function saveFileToCache(job, version, sha256, zippedSha256) {
|
|
|
2540
2554
|
const cachedSha256Path = import_node_path.default.join(cacheDir, job.binaryName + ".sha256");
|
|
2541
2555
|
const cachedSha256ZippedPath = import_node_path.default.join(cacheDir, job.binaryName + ".gz.sha256");
|
|
2542
2556
|
try {
|
|
2543
|
-
await (0,
|
|
2557
|
+
await (0, import_chunk_LONQL55G.overwriteFile)(job.targetFilePath, cachedTargetPath);
|
|
2544
2558
|
if (sha256 != null) {
|
|
2545
2559
|
await import_node_fs.default.promises.writeFile(cachedSha256Path, sha256);
|
|
2546
2560
|
}
|