bdy 1.22.85-master → 1.22.86-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.85-master",
4
+ "version": "1.22.86-dev",
5
5
  "type": "commonjs",
6
6
  "license": "MIT",
7
7
  "homepage": "https://buddy.works/docs/cli",
@@ -139,10 +139,10 @@ class AgentSocketClient extends events_1.default {
139
139
  forceBase64: true,
140
140
  transports: ['websocket'],
141
141
  reconnection: false,
142
- rejectUnauthorized: !(0, utils_1.isLocalHost)(host),
142
+ rejectUnauthorized: !(0, utils_1.canSkipSslVerify)(host),
143
143
  // @ts-ignore
144
144
  agent: new https_1.Agent({
145
- rejectUnauthorized: !(0, utils_1.isLocalHost)(host),
145
+ rejectUnauthorized: !(0, utils_1.canSkipSslVerify)(host),
146
146
  }),
147
147
  maxHttpBufferSize: 3e6,
148
148
  extraHeaders: {
@@ -26,7 +26,7 @@ class ApiClient {
26
26
  this.clientToken = clientToken;
27
27
  this.client = new undici_1.Pool(baseUrl, {
28
28
  connect: {
29
- rejectUnauthorized: !(0, utils_1.isLocalHost)(baseUrl.hostname),
29
+ rejectUnauthorized: !(0, utils_1.canSkipSslVerify)(baseUrl.hostname),
30
30
  },
31
31
  });
32
32
  }
@@ -26,7 +26,7 @@ const makeRequest = async (host, path, body, method = 'POST', respAsJson = true,
26
26
  headers: body ? { 'Content-Type': 'application/json' } : undefined,
27
27
  method,
28
28
  signal: c.signal,
29
- dispatcher: (0, utils_1.isLocalHost)(host) ? output_1.default.getUndiciUnauthorizedAgent() : undefined,
29
+ dispatcher: (0, utils_1.canSkipSslVerify)(host) ? output_1.default.getUndiciUnauthorizedAgent() : undefined,
30
30
  });
31
31
  if (respAsJson)
32
32
  data = await response.json();
@@ -165,7 +165,7 @@ class TunnelHttpAuth {
165
165
  const { Pool: UndiciPool } = require('undici');
166
166
  this.clients[host] = new UndiciPool(host, {
167
167
  connect: {
168
- rejectUnauthorized: !(0, utils_1.isLocalHost)(host),
168
+ rejectUnauthorized: !(0, utils_1.canSkipSslVerify)(host),
169
169
  },
170
170
  });
171
171
  }
@@ -48,7 +48,7 @@ exports.openApiPrepareUrl = openApiPrepareUrl;
48
48
  exports.getOpenApiEndpointByApiBaseUrl = getOpenApiEndpointByApiBaseUrl;
49
49
  exports.isValidDomain = isValidDomain;
50
50
  exports.isInSandbox = isInSandbox;
51
- exports.isLocalHost = isLocalHost;
51
+ exports.canSkipSslVerify = canSkipSslVerify;
52
52
  exports.isValidSubdomain = isValidSubdomain;
53
53
  exports.isValidEmail = isValidEmail;
54
54
  exports.isValidName = isValidName;
@@ -716,9 +716,10 @@ function isInSandbox() {
716
716
  }
717
717
  // Verify TLS certs for real hosts; only local/IP dev hosts (self-signed)
718
718
  // may skip verification. Accepts a full URL or a bare hostname.
719
- function isLocalHost(host) {
719
+ function canSkipSslVerify(host) {
720
720
  return (/^(https?:\/\/)?\d+\.\d+\.\d+\.\d+/.test(host) ||
721
721
  /\.local\.io/.test(host) ||
722
+ /\.e2e\.com/.test(host) ||
722
723
  /\.tsd\.com/.test(host));
723
724
  }
724
725
  function isValidSubdomain(prompt) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bdy",
3
3
  "preferGlobal": false,
4
- "version": "1.22.85-master",
4
+ "version": "1.22.86-dev",
5
5
  "type": "commonjs",
6
6
  "license": "MIT",
7
7
  "homepage": "https://buddy.works/docs/cli",