linkque-cli-v2 1.6.19 → 1.6.21

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "linkque-cli-v2",
3
- "version": "1.6.19",
3
+ "version": "1.6.21",
4
4
  "description": "Public Linkque CLI bundle for sandbox debugging",
5
5
  "bin": {
6
6
  "linkquejs": "linkquejs.js"
@@ -1324,7 +1324,7 @@ Content-Type: ${partContentType}\r
1324
1324
  * @returns A proxy agent
1325
1325
  */
1326
1326
  static async #getProxyAgent() {
1327
- this.#proxyAgent ||= (await import("./dist-TGBYXSBU.js")).HttpsProxyAgent;
1327
+ this.#proxyAgent ||= (await import("./dist-6U5W3RLM.js")).HttpsProxyAgent;
1328
1328
  return this.#proxyAgent;
1329
1329
  }
1330
1330
  static async #getFetch() {
@@ -11654,12 +11654,17 @@ var require_websocket = __commonJS({
11654
11654
  protocols = [protocols];
11655
11655
  }
11656
11656
  }
11657
- initAsClient(this, address, protocols, options);
11657
+ options = initAsClient(this, address, protocols, options);
11658
11658
  } else {
11659
- this._autoPong = options.autoPong;
11660
- this._closeTimeout = options.closeTimeout;
11661
11659
  this._isServer = true;
11662
11660
  }
11661
+ if (options.autoPong) {
11662
+ this._autoPong = true;
11663
+ this._autoPongComplete = () => autoPongComplete(this);
11664
+ this._pendingAutoPongs = 0;
11665
+ this._maxPendingAutoPongs = options.maxPendingAutoPongs | 0;
11666
+ }
11667
+ this._closeTimeout = options.closeTimeout;
11663
11668
  }
11664
11669
  /**
11665
11670
  * For historical reasons, the custom "nodebuffer" type is used by the default
@@ -12070,6 +12075,7 @@ var require_websocket = __commonJS({
12070
12075
  maxBufferedChunks: 256 * 1024,
12071
12076
  maxFragments: 16 * 1024,
12072
12077
  maxPayload: 100 * 1024 * 1024,
12078
+ maxPendingAutoPongs: 60,
12073
12079
  skipUTF8Validation: false,
12074
12080
  perMessageDeflate: true,
12075
12081
  followRedirects: false,
@@ -12085,8 +12091,6 @@ var require_websocket = __commonJS({
12085
12091
  path: void 0,
12086
12092
  port: void 0
12087
12093
  };
12088
- websocket._autoPong = opts.autoPong;
12089
- websocket._closeTimeout = opts.closeTimeout;
12090
12094
  if (!protocolVersions.includes(opts.protocolVersion)) {
12091
12095
  throw new RangeError(
12092
12096
  `Unsupported protocol version: ${opts.protocolVersion} (supported versions: ${protocolVersions.join(", ")})`
@@ -12329,6 +12333,7 @@ var require_websocket = __commonJS({
12329
12333
  } else {
12330
12334
  req.end();
12331
12335
  }
12336
+ return opts;
12332
12337
  }
12333
12338
  function emitErrorAndClose(websocket, err) {
12334
12339
  websocket._readyState = WebSocket2.CLOSING;
@@ -12417,9 +12422,19 @@ var require_websocket = __commonJS({
12417
12422
  }
12418
12423
  function receiverOnPing(data) {
12419
12424
  const websocket = this[kWebSocket];
12420
- if (websocket._autoPong) websocket.pong(data, !this._isServer, NOOP);
12425
+ if (websocket._autoPong && websocket.readyState === WebSocket2.OPEN) {
12426
+ if (websocket._maxPendingAutoPongs > 0 && websocket._pendingAutoPongs >= websocket._maxPendingAutoPongs) {
12427
+ websocket.terminate();
12428
+ } else {
12429
+ websocket._pendingAutoPongs++;
12430
+ websocket.pong(data, !this._isServer, websocket._autoPongComplete);
12431
+ }
12432
+ }
12421
12433
  websocket.emit("ping", data);
12422
12434
  }
12435
+ function autoPongComplete(websocket) {
12436
+ websocket._pendingAutoPongs--;
12437
+ }
12423
12438
  function receiverOnPong(data) {
12424
12439
  this[kWebSocket].emit("pong", data);
12425
12440
  }
@@ -12673,6 +12688,8 @@ var require_websocket_server = __commonJS({
12673
12688
  * fragments
12674
12689
  * @param {Number} [options.maxPayload=104857600] The maximum allowed message
12675
12690
  * size
12691
+ * @param {Number} [options.maxPendingAutoPongs=60] The maximum number of
12692
+ * pending automatic pongs
12676
12693
  * @param {Boolean} [options.noServer=false] Enable no server mode
12677
12694
  * @param {String} [options.path] Accept only connections matching this path
12678
12695
  * @param {(Boolean|Object)} [options.perMessageDeflate=false] Enable/disable
@@ -12695,6 +12712,7 @@ var require_websocket_server = __commonJS({
12695
12712
  maxBufferedChunks: 256 * 1024,
12696
12713
  maxFragments: 16 * 1024,
12697
12714
  maxPayload: 100 * 1024 * 1024,
12715
+ maxPendingAutoPongs: 60,
12698
12716
  skipUTF8Validation: false,
12699
12717
  perMessageDeflate: false,
12700
12718
  handleProtocols: null,