@songtonyli/dsh-cli 0.1.36 → 0.1.37

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.
Files changed (63) hide show
  1. package/README.md +1 -1
  2. package/bin/dsh.mjs +1 -1
  3. package/node_modules/@deepseek-ai/dsh-client-ui-primitives/package.json +1 -1
  4. package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/lib/client.js +1 -1
  5. package/node_modules/@deepseek-ai/dsh-tui-app/README.i18n.yaml +2 -2
  6. package/node_modules/@deepseek-ai/dsh-tui-app/README.md +1 -1
  7. package/node_modules/@deepseek-ai/dsh-tui-app/README.zh.md +1 -1
  8. package/node_modules/@deepseek-ai/dsh-tui-app/lib/index.js +85 -33
  9. package/node_modules/@smithy/core/dist-cjs/submodules/cbor/index.js +22 -37
  10. package/node_modules/@smithy/core/dist-cjs/submodules/client/index.js +26 -4
  11. package/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js +49 -8
  12. package/node_modules/@smithy/core/dist-cjs/submodules/schema/index.js +12 -7
  13. package/node_modules/@smithy/core/dist-es/submodules/cbor/SmithyRpcV2CborProtocol.js +22 -22
  14. package/node_modules/@smithy/core/dist-es/submodules/cbor/parseCborBody.js +0 -15
  15. package/node_modules/@smithy/core/dist-es/submodules/client/index.js +1 -1
  16. package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/command.js +8 -1
  17. package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/exceptions.js +18 -3
  18. package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpProtocol.js +49 -8
  19. package/node_modules/@smithy/core/dist-es/submodules/schema/TypeRegistry.js +12 -7
  20. package/node_modules/@smithy/core/package.json +2 -2
  21. package/node_modules/@smithy/types/package.json +1 -1
  22. package/node_modules/undici/docs/docs/api/Agent.md +8 -8
  23. package/node_modules/undici/docs/docs/api/DiagnosticsChannel.md +9 -6
  24. package/node_modules/undici/docs/docs/api/Errors.md +25 -0
  25. package/node_modules/undici/docs/docs/api/Interceptors.md +4 -3
  26. package/node_modules/undici/docs/docs/api/Pool.md +5 -6
  27. package/node_modules/undici/lib/api/readable.js +1 -2
  28. package/node_modules/undici/lib/core/request.js +23 -2
  29. package/node_modules/undici/lib/core/util.js +0 -39
  30. package/node_modules/undici/lib/dispatcher/client-h1.js +11 -4
  31. package/node_modules/undici/lib/dispatcher/client-h2.js +52 -8
  32. package/node_modules/undici/lib/dispatcher/client.js +1 -1
  33. package/node_modules/undici/lib/dispatcher/dispatcher1-wrapper.js +3 -2
  34. package/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js +21 -6
  35. package/node_modules/undici/lib/dispatcher/pool-base.js +63 -2
  36. package/node_modules/undici/lib/dispatcher/pool.js +90 -7
  37. package/node_modules/undici/lib/dispatcher/proxy-agent.js +16 -3
  38. package/node_modules/undici/lib/handler/deduplication-handler.js +24 -11
  39. package/node_modules/undici/lib/handler/redirect-handler.js +5 -0
  40. package/node_modules/undici/lib/handler/retry-handler.js +72 -13
  41. package/node_modules/undici/lib/interceptor/cache.js +4 -1
  42. package/node_modules/undici/lib/interceptor/decompress.js +236 -69
  43. package/node_modules/undici/lib/web/cache/cache.js +17 -8
  44. package/node_modules/undici/lib/web/cache/cachestorage.js +11 -5
  45. package/node_modules/undici/lib/web/cookies/index.js +19 -7
  46. package/node_modules/undici/lib/web/cookies/util.js +3 -1
  47. package/node_modules/undici/lib/web/eventsource/eventsource.js +25 -1
  48. package/node_modules/undici/lib/web/fetch/body.js +22 -15
  49. package/node_modules/undici/lib/web/fetch/data-url.js +6 -6
  50. package/node_modules/undici/lib/web/fetch/formdata.js +30 -36
  51. package/node_modules/undici/lib/web/fetch/headers.js +34 -31
  52. package/node_modules/undici/lib/web/fetch/index.js +38 -14
  53. package/node_modules/undici/lib/web/fetch/request.js +74 -79
  54. package/node_modules/undici/lib/web/fetch/response.js +43 -44
  55. package/node_modules/undici/lib/web/fetch/util.js +7 -7
  56. package/node_modules/undici/lib/web/infra/index.js +16 -1
  57. package/node_modules/undici/lib/web/webidl/index.js +2 -14
  58. package/node_modules/undici/lib/web/websocket/events.js +43 -26
  59. package/node_modules/undici/lib/web/websocket/receiver.js +5 -0
  60. package/node_modules/undici/lib/web/websocket/stream/websocketerror.js +13 -10
  61. package/node_modules/undici/lib/web/websocket/websocket.js +44 -41
  62. package/node_modules/undici/package.json +1 -1
  63. package/package.json +4 -4
@@ -28,6 +28,8 @@ const { channels } = require('../../core/diagnostics')
28
28
  const kRef = Symbol.for('nodejs.ref')
29
29
  const kUnref = Symbol.for('nodejs.unref')
30
30
 
31
+ let ping
32
+
31
33
  function getSocketAddress (socket) {
32
34
  if (typeof socket?.address === 'function') {
33
35
  return socket.address()
@@ -198,16 +200,14 @@ class WebSocket extends EventTarget {
198
200
  this.#binaryType = 'blob'
199
201
  }
200
202
 
203
+ // TODO: remove this
201
204
  [kRef] () {
202
- webidl.brandCheck(this, WebSocket)
203
-
204
205
  this.#refed = true
205
206
  this.#handler.socket?.ref?.()
206
207
  }
207
208
 
209
+ // TODO: remove this
208
210
  [kUnref] () {
209
- webidl.brandCheck(this, WebSocket)
210
-
211
211
  this.#refed = false
212
212
  this.#handler.socket?.unref?.()
213
213
  }
@@ -218,7 +218,7 @@ class WebSocket extends EventTarget {
218
218
  * @param {string|undefined} reason
219
219
  */
220
220
  close (code = undefined, reason = undefined) {
221
- webidl.brandCheck(this, WebSocket)
221
+ webidl.brandCheck(this, webidl.is.WebSocket)
222
222
 
223
223
  const prefix = 'WebSocket.close'
224
224
 
@@ -245,7 +245,7 @@ class WebSocket extends EventTarget {
245
245
  * @param {NodeJS.TypedArray|ArrayBuffer|Blob|string} data
246
246
  */
247
247
  send (data) {
248
- webidl.brandCheck(this, WebSocket)
248
+ webidl.brandCheck(this, webidl.is.WebSocket)
249
249
 
250
250
  const prefix = 'WebSocket.send'
251
251
  webidl.argumentLengthCheck(arguments, 1, prefix)
@@ -339,45 +339,45 @@ class WebSocket extends EventTarget {
339
339
  }
340
340
 
341
341
  get readyState () {
342
- webidl.brandCheck(this, WebSocket)
342
+ webidl.brandCheck(this, webidl.is.WebSocket)
343
343
 
344
344
  // The readyState getter steps are to return this's ready state.
345
345
  return this.#handler.readyState
346
346
  }
347
347
 
348
348
  get bufferedAmount () {
349
- webidl.brandCheck(this, WebSocket)
349
+ webidl.brandCheck(this, webidl.is.WebSocket)
350
350
 
351
351
  return this.#bufferedAmount
352
352
  }
353
353
 
354
354
  get url () {
355
- webidl.brandCheck(this, WebSocket)
355
+ webidl.brandCheck(this, webidl.is.WebSocket)
356
356
 
357
357
  // The url getter steps are to return this's url, serialized.
358
358
  return URLSerializer(this.#url)
359
359
  }
360
360
 
361
361
  get extensions () {
362
- webidl.brandCheck(this, WebSocket)
362
+ webidl.brandCheck(this, webidl.is.WebSocket)
363
363
 
364
364
  return this.#extensions
365
365
  }
366
366
 
367
367
  get protocol () {
368
- webidl.brandCheck(this, WebSocket)
368
+ webidl.brandCheck(this, webidl.is.WebSocket)
369
369
 
370
370
  return this.#protocol
371
371
  }
372
372
 
373
373
  get onopen () {
374
- webidl.brandCheck(this, WebSocket)
374
+ webidl.brandCheck(this, webidl.is.WebSocket)
375
375
 
376
376
  return this.#events.open
377
377
  }
378
378
 
379
379
  set onopen (fn) {
380
- webidl.brandCheck(this, WebSocket)
380
+ webidl.brandCheck(this, webidl.is.WebSocket)
381
381
 
382
382
  if (this.#events.open) {
383
383
  this.removeEventListener('open', this.#events.open)
@@ -394,13 +394,13 @@ class WebSocket extends EventTarget {
394
394
  }
395
395
 
396
396
  get onerror () {
397
- webidl.brandCheck(this, WebSocket)
397
+ webidl.brandCheck(this, webidl.is.WebSocket)
398
398
 
399
399
  return this.#events.error
400
400
  }
401
401
 
402
402
  set onerror (fn) {
403
- webidl.brandCheck(this, WebSocket)
403
+ webidl.brandCheck(this, webidl.is.WebSocket)
404
404
 
405
405
  if (this.#events.error) {
406
406
  this.removeEventListener('error', this.#events.error)
@@ -417,13 +417,13 @@ class WebSocket extends EventTarget {
417
417
  }
418
418
 
419
419
  get onclose () {
420
- webidl.brandCheck(this, WebSocket)
420
+ webidl.brandCheck(this, webidl.is.WebSocket)
421
421
 
422
422
  return this.#events.close
423
423
  }
424
424
 
425
425
  set onclose (fn) {
426
- webidl.brandCheck(this, WebSocket)
426
+ webidl.brandCheck(this, webidl.is.WebSocket)
427
427
 
428
428
  if (this.#events.close) {
429
429
  this.removeEventListener('close', this.#events.close)
@@ -440,13 +440,13 @@ class WebSocket extends EventTarget {
440
440
  }
441
441
 
442
442
  get onmessage () {
443
- webidl.brandCheck(this, WebSocket)
443
+ webidl.brandCheck(this, webidl.is.WebSocket)
444
444
 
445
445
  return this.#events.message
446
446
  }
447
447
 
448
448
  set onmessage (fn) {
449
- webidl.brandCheck(this, WebSocket)
449
+ webidl.brandCheck(this, webidl.is.WebSocket)
450
450
 
451
451
  if (this.#events.message) {
452
452
  this.removeEventListener('message', this.#events.message)
@@ -463,13 +463,13 @@ class WebSocket extends EventTarget {
463
463
  }
464
464
 
465
465
  get binaryType () {
466
- webidl.brandCheck(this, WebSocket)
466
+ webidl.brandCheck(this, webidl.is.WebSocket)
467
467
 
468
468
  return this.#binaryType
469
469
  }
470
470
 
471
471
  set binaryType (type) {
472
- webidl.brandCheck(this, WebSocket)
472
+ webidl.brandCheck(this, webidl.is.WebSocket)
473
473
 
474
474
  if (type !== 'blob' && type !== 'arraybuffer') {
475
475
  this.#binaryType = 'blob'
@@ -654,33 +654,36 @@ class WebSocket extends EventTarget {
654
654
  }
655
655
  }
656
656
 
657
- /**
658
- * @param {WebSocket} ws
659
- * @param {Buffer|undefined} buffer
660
- */
661
- static ping (ws, buffer) {
662
- if (Buffer.isBuffer(buffer)) {
663
- if (buffer.length > 125) {
664
- throw new TypeError('A PING frame cannot have a body larger than 125 bytes.')
657
+ static {
658
+ /**
659
+ * @param {WebSocket} ws
660
+ * @param {Buffer|undefined} buffer
661
+ */
662
+ ping = (ws, buffer) => {
663
+ if (Buffer.isBuffer(buffer)) {
664
+ if (buffer.length > 125) {
665
+ throw new TypeError('A PING frame cannot have a body larger than 125 bytes.')
666
+ }
667
+ } else if (buffer !== undefined) {
668
+ throw new TypeError('Expected buffer payload')
665
669
  }
666
- } else if (buffer !== undefined) {
667
- throw new TypeError('Expected buffer payload')
668
- }
669
670
 
670
- // An endpoint MAY send a Ping frame any time after the connection is
671
- // established and before the connection is closed.
672
- const readyState = ws.#handler.readyState
671
+ // An endpoint MAY send a Ping frame any time after the connection is
672
+ // established and before the connection is closed.
673
+ const readyState = ws.#handler.readyState
673
674
 
674
- if (isEstablished(readyState) && !isClosing(readyState) && !isClosed(readyState)) {
675
- const frame = new WebsocketFrameSend(buffer)
676
- ws.#handler.socket.write(frame.createFrame(opcodes.PING))
675
+ if (isEstablished(readyState) && !isClosing(readyState) && !isClosed(readyState)) {
676
+ const frame = new WebsocketFrameSend(buffer)
677
+ ws.#handler.socket.write(frame.createFrame(opcodes.PING))
678
+ }
679
+ }
680
+
681
+ webidl.is.WebSocket = (arg) => {
682
+ return arg != null && typeof arg === 'object' && #handler in arg
677
683
  }
678
684
  }
679
685
  }
680
686
 
681
- const { ping } = WebSocket
682
- Reflect.deleteProperty(WebSocket, 'ping')
683
-
684
687
  // https://websockets.spec.whatwg.org/#dom-websocket-connecting
685
688
  WebSocket.CONNECTING = WebSocket.prototype.CONNECTING = states.CONNECTING
686
689
  // https://websockets.spec.whatwg.org/#dom-websocket-open
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "undici",
3
- "version": "8.10.2",
3
+ "version": "8.11.0",
4
4
  "description": "An HTTP/1.1 client, written from scratch for Node.js",
5
5
  "homepage": "https://undici.nodejs.org",
6
6
  "bugs": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@songtonyli/dsh-cli",
3
- "version": "0.1.36",
3
+ "version": "0.1.37",
4
4
  "description": "The dsh terminal agent: an interactive TUI over the DeepSeek Harness, with its whole Node runtime bundled in one install.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -373,13 +373,13 @@
373
373
  "@shikijs/types": "4.4.3",
374
374
  "@shikijs/vscode-textmate": "10.0.2",
375
375
  "@sindresorhus/merge-streams": "4.0.0",
376
- "@smithy/core": "3.34.1",
376
+ "@smithy/core": "3.35.0",
377
377
  "@smithy/credential-provider-imds": "4.5.2",
378
378
  "@smithy/fetch-http-handler": "5.8.0",
379
379
  "@smithy/is-array-buffer": "2.2.0",
380
380
  "@smithy/node-http-handler": "4.7.3",
381
381
  "@smithy/signature-v4": "5.7.3",
382
- "@smithy/types": "4.18.0",
382
+ "@smithy/types": "4.19.0",
383
383
  "@smithy/util-buffer-from": "2.2.0",
384
384
  "@smithy/util-utf8": "2.3.0",
385
385
  "@stablelib/base64": "1.0.1",
@@ -533,7 +533,7 @@
533
533
  "tslib": "2.8.1",
534
534
  "turndown": "7.2.4",
535
535
  "typebox": "1.3.7",
536
- "undici": "8.10.2",
536
+ "undici": "8.11.0",
537
537
  "undici-types": "6.21.0",
538
538
  "unicode-properties": "1.4.1",
539
539
  "unicode-trie": "2.0.0",