@volter/tabnode 0.5.10 → 0.5.11

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.
@@ -17621,10 +17621,17 @@ var implementation$1 = function bind2(that) {
17621
17621
  var implementation = implementation$1;
17622
17622
  var functionBind = Function.prototype.bind || implementation;
17623
17623
  var functionCall = Function.prototype.call;
17624
- var functionApply = Function.prototype.apply;
17624
+ var functionApply;
17625
+ var hasRequiredFunctionApply;
17626
+ function requireFunctionApply() {
17627
+ if (hasRequiredFunctionApply) return functionApply;
17628
+ hasRequiredFunctionApply = 1;
17629
+ functionApply = Function.prototype.apply;
17630
+ return functionApply;
17631
+ }
17625
17632
  var reflectApply = typeof Reflect !== "undefined" && Reflect && Reflect.apply;
17626
17633
  var bind$2 = functionBind;
17627
- var $apply$1 = functionApply;
17634
+ var $apply$1 = requireFunctionApply();
17628
17635
  var $call$2 = functionCall;
17629
17636
  var $reflectApply = reflectApply;
17630
17637
  var actualApply = $reflectApply || bind$2.call($call$2, $apply$1);
@@ -17744,7 +17751,7 @@ var hasSymbols = requireHasSymbols()();
17744
17751
  var getProto = requireGetProto();
17745
17752
  var $ObjectGPO = requireObject_getPrototypeOf();
17746
17753
  var $ReflectGPO = requireReflect_getPrototypeOf();
17747
- var $apply = functionApply;
17754
+ var $apply = requireFunctionApply();
17748
17755
  var $call = functionCall;
17749
17756
  var needsEval = {};
17750
17757
  var TypedArray = typeof Uint8Array === "undefined" || !getProto ? undefined$1 : getProto(Uint8Array);
@@ -18385,7 +18392,7 @@ function requireApplyBind() {
18385
18392
  if (hasRequiredApplyBind) return applyBind;
18386
18393
  hasRequiredApplyBind = 1;
18387
18394
  var bind3 = functionBind;
18388
- var $apply2 = functionApply;
18395
+ var $apply2 = requireFunctionApply();
18389
18396
  var actualApply$1 = actualApply;
18390
18397
  applyBind = function applyBind2() {
18391
18398
  return actualApply$1(bind3, $apply2, arguments);
package/dist/index.mjs CHANGED
@@ -35728,7 +35728,7 @@ class WorkerRuntime {
35728
35728
  this.worker = new Worker(
35729
35729
  new URL(
35730
35730
  /* @vite-ignore */
35731
- "/assets/runtime-worker-CQv8H3sj.js",
35731
+ "/assets/runtime-worker-C5pP4aT7.js",
35732
35732
  import.meta.url
35733
35733
  ),
35734
35734
  { type: "module" }
@@ -35962,7 +35962,7 @@ function installHttpClientTransport(factory, transportOptions = {}) {
35962
35962
  }
35963
35963
  try {
35964
35964
  if (options.socketPath || options.localAddress || options.localPort || options.lookup || options.family) throw unsupported("custom socket routing");
35965
- if (tlsOptions.some((key) => options[key] !== void 0) || options.rejectUnauthorized === false || options.servername !== void 0 && options.servername !== host2) throw unsupported("custom TLS options");
35965
+ if (protocol === "https:" && (tlsOptions.some((key) => options[key] !== void 0) || options.rejectUnauthorized === false || options.servername !== void 0 && options.servername !== host2)) throw unsupported("custom TLS options");
35966
35966
  const authority = new URL(`${protocol}//${host2.includes(":") && !host2.startsWith("[") ? `[${host2}]` : host2}:${options.port ?? (protocol === "https:" ? 443 : 80)}`);
35967
35967
  return connection(authority, factory(), require2);
35968
35968
  } catch (cause) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@volter/tabnode",
3
- "version": "0.5.10",
3
+ "version": "0.5.11",
4
4
  "description": "Node's own library, in a browser tab.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -61,8 +61,9 @@ export function installHttpClientTransport(factory: HttpClientTransportFactory,
61
61
  }
62
62
  try {
63
63
  if (options.socketPath || options.localAddress || options.localPort || options.lookup || options.family) throw unsupported('custom socket routing');
64
- if (tlsOptions.some(key => options[key] !== undefined) || options.rejectUnauthorized === false
65
- || (options.servername !== undefined && options.servername !== host)) throw unsupported('custom TLS options');
64
+ // Node's Agent names a servername for plain HTTP too ('' for an IP); TLS options are an https question.
65
+ if (protocol === 'https:' && (tlsOptions.some(key => options[key] !== undefined) || options.rejectUnauthorized === false
66
+ || (options.servername !== undefined && options.servername !== host))) throw unsupported('custom TLS options');
66
67
  const authority = new URL(`${protocol}//${host.includes(':') && !host.startsWith('[') ? `[${host}]` : host}:${options.port ?? (protocol === 'https:' ? 443 : 80)}`);
67
68
  return connection(authority, factory(), require);
68
69
  } catch (cause) {