bdy 1.22.12-dev → 1.22.13-dev

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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bdy",
3
3
  "preferGlobal": false,
4
- "version": "1.22.12-dev",
4
+ "version": "1.22.13-dev",
5
5
  "type": "commonjs",
6
6
  "license": "MIT",
7
7
  "scripts": {
@@ -25,6 +25,7 @@ class ApiClient {
25
25
  this.clientSecret = clientSecret;
26
26
  this.clientToken = clientToken;
27
27
  this.client = new undici_1.Pool(baseUrl, {
28
+ keepAliveTimeout: 10,
28
29
  connect: {
29
30
  rejectUnauthorized: false,
30
31
  },
@@ -404,13 +404,6 @@ class Output {
404
404
  terminal.fullscreen(false);
405
405
  terminal.hideCursor(false);
406
406
  terminal.grabInput(false);
407
- try {
408
- const { getGlobalDispatcher } = require('undici');
409
- getGlobalDispatcher().close();
410
- }
411
- catch {
412
- // undici not available
413
- }
414
407
  }
415
408
  static exitError(err) {
416
409
  this.clearTerminal();
@@ -27,7 +27,7 @@ const makeRequest = async (port, path, body) => {
27
27
  logger_1.default.debug(body);
28
28
  const response = await fetch(`http://localhost:${port}${path}`, {
29
29
  body: body ? JSON.stringify(body) : null,
30
- headers: { 'Content-Type': 'application/json' },
30
+ headers: { 'Content-Type': 'application/json', 'Connection': 'close' },
31
31
  method: 'POST',
32
32
  signal: c.signal,
33
33
  });
@@ -12,6 +12,7 @@ const utils_1 = require("../../utils");
12
12
  const texts_1 = require("../../texts");
13
13
  const TIMEOUT = 120000;
14
14
  const dispatcher = new undici_1.Agent({
15
+ keepAliveTimeout: 10,
15
16
  connect: {
16
17
  rejectUnauthorized: false,
17
18
  },
@@ -462,6 +462,7 @@ const getLatestVersion = async () => {
462
462
  }, 10000);
463
463
  const response = await fetch(`https://es.buddy.works/bdy/${env}/latest`, {
464
464
  method: 'GET',
465
+ headers: { 'Connection': 'close' },
465
466
  signal: c.signal,
466
467
  });
467
468
  if (response.status === 200) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bdy",
3
3
  "preferGlobal": false,
4
- "version": "1.22.12-dev",
4
+ "version": "1.22.13-dev",
5
5
  "type": "commonjs",
6
6
  "license": "MIT",
7
7
  "scripts": {