badmfck-api-server 4.1.41 → 4.1.43

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.
@@ -9,6 +9,7 @@ const path_1 = __importDefault(require("path"));
9
9
  const fs_1 = __importDefault(require("fs"));
10
10
  const __1 = require("../..");
11
11
  const crypto_1 = __importDefault(require("crypto"));
12
+ const undici_1 = require("undici");
12
13
  async function Deploy(opt) {
13
14
  if (typeof opt === "string") {
14
15
  if (!fs_1.default.existsSync(opt)) {
@@ -150,8 +151,13 @@ async function Deploy(opt) {
150
151
  formData.set("file", fileBlob, archiveName);
151
152
  console.log(`Deploying to ${opt.host} (archive: ${archiveName})`);
152
153
  const startedAt = Date.now();
154
+ const uploadAgent = new undici_1.Agent({
155
+ headersTimeout: 5 * 60 * 1000,
156
+ bodyTimeout: 5 * 60 * 1000,
157
+ });
153
158
  const uploadResponse = await __1.Http.post(opt.host, formData, {
154
159
  headers: { authorization: `Bearer ${authToken}` },
160
+ dispatcher: uploadAgent,
155
161
  timeoutMs: 5 * 60 * 1000,
156
162
  retry: { enabled: false },
157
163
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "badmfck-api-server",
3
- "version": "4.1.41",
3
+ "version": "4.1.43",
4
4
  "description": "Simple API http server based on express",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",