@wix/bex-utils 2.99.0 → 2.101.0

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.
@@ -3,6 +3,14 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [2.57.0](https://github.com/wix-private/cairo/compare/@wix/bex-bundled-mini-essentials@2.56.0...@wix/bex-bundled-mini-essentials@2.57.0) (2026-05-24)
7
+
8
+ **Note:** Version bump only for package @wix/bex-bundled-mini-essentials
9
+
10
+ # [2.56.0](https://github.com/wix-private/cairo/compare/@wix/bex-bundled-mini-essentials@2.55.0...@wix/bex-bundled-mini-essentials@2.56.0) (2026-05-17)
11
+
12
+ **Note:** Version bump only for package @wix/bex-bundled-mini-essentials
13
+
6
14
  # [2.55.0](https://github.com/wix-private/cairo/compare/@wix/bex-bundled-mini-essentials@2.54.0...@wix/bex-bundled-mini-essentials@2.55.0) (2026-05-17)
7
15
 
8
16
  **Note:** Version bump only for package @wix/bex-bundled-mini-essentials
@@ -2821,7 +2821,7 @@ var require_dist = __commonJS({
2821
2821
  // In order to properly update the socket pool, we need to call `getName()` on
2822
2822
  // the core `https.Agent` if it is a secureEndpoint.
2823
2823
  getName(options) {
2824
- const secureEndpoint = typeof options.secureEndpoint === "boolean" ? options.secureEndpoint : this.isSecureEndpoint(options);
2824
+ const secureEndpoint = this.isSecureEndpoint(options);
2825
2825
  if (secureEndpoint) {
2826
2826
  return https_1.Agent.prototype.getName.call(this, options);
2827
2827
  }
@@ -2837,7 +2837,11 @@ var require_dist = __commonJS({
2837
2837
  Promise.resolve().then(() => this.connect(req, connectOpts)).then((socket) => {
2838
2838
  this.decrementSockets(name, fakeSocket);
2839
2839
  if (socket instanceof http.Agent) {
2840
- return socket.addRequest(req, connectOpts);
2840
+ try {
2841
+ return socket.addRequest(req, connectOpts);
2842
+ } catch (err) {
2843
+ return cb(err);
2844
+ }
2841
2845
  }
2842
2846
  this[INTERNAL].currentSocket = socket;
2843
2847
  super.createSocket(req, options, cb);
@@ -3145,6 +3149,15 @@ var require_dist3 = __commonJS({
3145
3149
  var url_1 = require("url");
3146
3150
  var parse_proxy_response_1 = require_parse_proxy_response();
3147
3151
  var debug = (0, debug_1.default)("https-proxy-agent");
3152
+ var setServernameFromNonIpHost = (options) => {
3153
+ if (options.servername === void 0 && options.host && !net.isIP(options.host)) {
3154
+ return {
3155
+ ...options,
3156
+ servername: options.host
3157
+ };
3158
+ }
3159
+ return options;
3160
+ };
3148
3161
  var HttpsProxyAgent = class extends agent_base_1.Agent {
3149
3162
  constructor(proxy, opts) {
3150
3163
  super(opts);
@@ -3174,11 +3187,7 @@ var require_dist3 = __commonJS({
3174
3187
  let socket;
3175
3188
  if (proxy.protocol === "https:") {
3176
3189
  debug("Creating `tls.Socket`: %o", this.connectOpts);
3177
- const servername = this.connectOpts.servername || this.connectOpts.host;
3178
- socket = tls.connect({
3179
- ...this.connectOpts,
3180
- servername
3181
- });
3190
+ socket = tls.connect(setServernameFromNonIpHost(this.connectOpts));
3182
3191
  } else {
3183
3192
  debug("Creating `net.Socket`: %o", this.connectOpts);
3184
3193
  socket = net.connect(this.connectOpts);
@@ -3209,11 +3218,9 @@ var require_dist3 = __commonJS({
3209
3218
  req.once("socket", resume);
3210
3219
  if (opts.secureEndpoint) {
3211
3220
  debug("Upgrading socket connection to TLS");
3212
- const servername = opts.servername || opts.host;
3213
3221
  return tls.connect({
3214
- ...omit(opts, "host", "path", "port"),
3215
- socket,
3216
- servername
3222
+ ...omit(setServernameFromNonIpHost(opts), "host", "path", "port"),
3223
+ socket
3217
3224
  });
3218
3225
  }
3219
3226
  return socket;