@psnext/slingcli 2.5.20260615-2 → 2.5.20260617-2

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 (195) hide show
  1. package/node_modules/@aws-sdk/core/dist-cjs/index.js +45 -50
  2. package/node_modules/@aws-sdk/core/dist-cjs/submodules/account-id-endpoint/index.js +2 -4
  3. package/node_modules/@aws-sdk/core/dist-cjs/submodules/client/index.browser.js +21 -22
  4. package/node_modules/@aws-sdk/core/dist-cjs/submodules/client/index.js +51 -51
  5. package/node_modules/@aws-sdk/core/dist-cjs/submodules/client/index.native.js +21 -22
  6. package/node_modules/@aws-sdk/core/dist-cjs/submodules/httpAuthSchemes/index.js +19 -21
  7. package/node_modules/@aws-sdk/core/dist-cjs/submodules/protocols/index.js +107 -109
  8. package/node_modules/@aws-sdk/core/dist-cjs/submodules/util/index.js +2 -4
  9. package/node_modules/@aws-sdk/core/package.json +8 -8
  10. package/node_modules/@aws-sdk/credential-provider-env/dist-cjs/index.js +4 -6
  11. package/node_modules/@aws-sdk/credential-provider-env/package.json +6 -6
  12. package/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/checkUrl.js +3 -7
  13. package/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/fromHttp.browser.js +12 -16
  14. package/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/fromHttp.js +16 -21
  15. package/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/requestHelpers.js +14 -18
  16. package/node_modules/@aws-sdk/credential-provider-http/dist-cjs/fromHttp/retry-wrapper.js +1 -5
  17. package/node_modules/@aws-sdk/credential-provider-http/dist-cjs/index.browser.js +2 -5
  18. package/node_modules/@aws-sdk/credential-provider-http/dist-cjs/index.js +2 -7
  19. package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-cjs/index.js +11 -13
  20. package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/package.json +7 -7
  21. package/node_modules/@aws-sdk/credential-provider-http/package.json +6 -6
  22. package/node_modules/@aws-sdk/credential-provider-ini/dist-cjs/index.js +47 -41
  23. package/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveProcessCredentials.js +8 -4
  24. package/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveWebIdentityCredentials.js +14 -10
  25. package/node_modules/@aws-sdk/credential-provider-ini/package.json +13 -13
  26. package/node_modules/@aws-sdk/credential-provider-login/dist-cjs/index.js +31 -33
  27. package/node_modules/@aws-sdk/credential-provider-login/package.json +7 -7
  28. package/node_modules/@aws-sdk/credential-provider-node/dist-cjs/index.js +16 -18
  29. package/node_modules/@aws-sdk/credential-provider-node/package.json +11 -11
  30. package/node_modules/@aws-sdk/credential-provider-process/dist-cjs/index.js +11 -13
  31. package/node_modules/@aws-sdk/credential-provider-process/package.json +6 -6
  32. package/node_modules/@aws-sdk/credential-provider-sso/dist-cjs/index.js +22 -24
  33. package/node_modules/@aws-sdk/credential-provider-sso/dist-cjs/loadSso-BGYXHf8s.js +3 -0
  34. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-cjs/index.js +26 -28
  35. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/package.json +7 -7
  36. package/node_modules/@aws-sdk/credential-provider-sso/package.json +8 -8
  37. package/node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/fromTokenFile.js +10 -14
  38. package/node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/fromWebToken.js +2 -6
  39. package/node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/index.js +3 -27
  40. package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +7 -7
  41. package/node_modules/@aws-sdk/eventstream-handler-node/dist-cjs/index.js +7 -9
  42. package/node_modules/@aws-sdk/eventstream-handler-node/package.json +5 -5
  43. package/node_modules/@aws-sdk/middleware-eventstream/dist-cjs/index.js +3 -5
  44. package/node_modules/@aws-sdk/middleware-eventstream/package.json +5 -5
  45. package/node_modules/@aws-sdk/middleware-websocket/dist-cjs/index.js +16 -18
  46. package/node_modules/@aws-sdk/middleware-websocket/package.json +6 -6
  47. package/node_modules/@aws-sdk/nested-clients/dist-cjs/index.js +0 -1
  48. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/index.js +82 -84
  49. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/index.js +158 -119
  50. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/index.js +80 -82
  51. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js +80 -82
  52. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js +99 -101
  53. package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/commands/CreateOAuth2TokenCommand.js +4 -1
  54. package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/endpoint/bdd.js +70 -35
  55. package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/endpoint/endpointResolver.js +1 -1
  56. package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/models/enums.js +3 -0
  57. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/endpoint/EndpointParameters.d.ts +1 -0
  58. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/models/enums.d.ts +12 -0
  59. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/endpoint/EndpointParameters.d.ts +1 -0
  60. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/models/enums.d.ts +3 -0
  61. package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-cjs/index.js +11 -13
  62. package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/package.json +7 -7
  63. package/node_modules/@aws-sdk/nested-clients/package.json +9 -8
  64. package/node_modules/@aws-sdk/signature-v4-multi-region/dist-cjs/index.js +4 -6
  65. package/node_modules/@aws-sdk/signature-v4-multi-region/package.json +5 -5
  66. package/node_modules/@aws-sdk/types/dist-cjs/index.js +7 -8
  67. package/node_modules/@aws-sdk/types/package.json +4 -4
  68. package/node_modules/@aws-sdk/util-locate-window/dist-cjs/index.js +0 -2
  69. package/node_modules/@aws-sdk/util-locate-window/package.json +4 -4
  70. package/node_modules/@aws-sdk/xml-builder/dist-cjs/index.js +2 -4
  71. package/node_modules/@aws-sdk/xml-builder/dist-cjs/xml-external/nodable_entities.js +4 -7
  72. package/node_modules/@aws-sdk/xml-builder/dist-cjs/xml-parser.browser.js +2 -5
  73. package/node_modules/@aws-sdk/xml-builder/dist-cjs/xml-parser.js +7 -10
  74. package/node_modules/@aws-sdk/xml-builder/package.json +4 -4
  75. package/node_modules/@earendil-works/pi-agent-core/package.json +2 -2
  76. package/node_modules/@earendil-works/pi-ai/dist/env-api-keys.js +21 -57
  77. package/node_modules/@earendil-works/pi-ai/dist/models.generated.js +277 -175
  78. package/node_modules/@earendil-works/pi-ai/dist/models.js +4 -1
  79. package/node_modules/@earendil-works/pi-ai/dist/providers/amazon-bedrock.js +52 -34
  80. package/node_modules/@earendil-works/pi-ai/dist/providers/anthropic.js +11 -9
  81. package/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.js +7 -4
  82. package/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare.js +4 -3
  83. package/node_modules/@earendil-works/pi-ai/dist/providers/google-vertex.js +15 -5
  84. package/node_modules/@earendil-works/pi-ai/dist/providers/google.js +2 -1
  85. package/node_modules/@earendil-works/pi-ai/dist/providers/openai-codex-responses.js +18 -17
  86. package/node_modules/@earendil-works/pi-ai/dist/providers/openai-completions.js +21 -8
  87. package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses-shared.js +2 -1
  88. package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses.js +8 -7
  89. package/node_modules/@earendil-works/pi-ai/dist/providers/simple-options.js +1 -0
  90. package/node_modules/@earendil-works/pi-ai/dist/stream.js +1 -1
  91. package/node_modules/@earendil-works/pi-ai/dist/utils/node-http-proxy.js +17 -22
  92. package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/anthropic.js +2 -1
  93. package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/openai-codex.js +3 -2
  94. package/node_modules/@earendil-works/pi-ai/dist/utils/provider-env.js +44 -0
  95. package/node_modules/@earendil-works/pi-ai/package.json +1 -1
  96. package/node_modules/@earendil-works/pi-coding-agent/dist/bun/restore-sandbox-env.js +4 -0
  97. package/node_modules/@earendil-works/pi-coding-agent/dist/cli/args.js +1 -1
  98. package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session.js +10 -7
  99. package/node_modules/@earendil-works/pi-coding-agent/dist/core/auth-storage.js +8 -1
  100. package/node_modules/@earendil-works/pi-coding-agent/dist/core/compaction/branch-summarization.js +2 -2
  101. package/node_modules/@earendil-works/pi-coding-agent/dist/core/compaction/compaction.js +10 -10
  102. package/node_modules/@earendil-works/pi-coding-agent/dist/core/export-html/vendor/marked.min.js +75 -3
  103. package/node_modules/@earendil-works/pi-coding-agent/dist/core/http-dispatcher.js +17 -1
  104. package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-registry.js +8 -4
  105. package/node_modules/@earendil-works/pi-coding-agent/dist/core/project-trust.js +1 -1
  106. package/node_modules/@earendil-works/pi-coding-agent/dist/core/provider-attribution.js +10 -0
  107. package/node_modules/@earendil-works/pi-coding-agent/dist/core/resolve-config-value.js +19 -19
  108. package/node_modules/@earendil-works/pi-coding-agent/dist/core/sdk.js +2 -0
  109. package/node_modules/@earendil-works/pi-coding-agent/dist/core/system-prompt.js +6 -6
  110. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/bash.js +4 -0
  111. package/node_modules/@earendil-works/pi-coding-agent/dist/main.js +17 -5
  112. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/footer.js +4 -0
  113. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/login-dialog.js +0 -1
  114. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/session-selector.js +0 -5
  115. package/node_modules/@earendil-works/pi-coding-agent/dist/package-manager-cli.js +6 -6
  116. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/child-process.js +23 -5
  117. package/node_modules/@earendil-works/pi-coding-agent/npm-shrinkwrap.json +17 -17
  118. package/node_modules/@earendil-works/pi-coding-agent/package.json +4 -4
  119. package/node_modules/@earendil-works/pi-tui/dist/components/editor.js +5 -1
  120. package/node_modules/@earendil-works/pi-tui/package.json +2 -2
  121. package/node_modules/@smithy/core/dist-cjs/index.js +13 -15
  122. package/node_modules/@smithy/core/dist-cjs/submodules/cbor/index.js +29 -31
  123. package/node_modules/@smithy/core/dist-cjs/submodules/checksum/index.browser.js +2 -4
  124. package/node_modules/@smithy/core/dist-cjs/submodules/checksum/index.js +7 -9
  125. package/node_modules/@smithy/core/dist-cjs/submodules/checksum/index.native.js +3 -5
  126. package/node_modules/@smithy/core/dist-cjs/submodules/client/index.js +22 -23
  127. package/node_modules/@smithy/core/dist-cjs/submodules/config/index.browser.js +10 -11
  128. package/node_modules/@smithy/core/dist-cjs/submodules/config/index.js +38 -39
  129. package/node_modules/@smithy/core/dist-cjs/submodules/config/index.native.js +10 -11
  130. package/node_modules/@smithy/core/dist-cjs/submodules/endpoints/index.browser.js +14 -17
  131. package/node_modules/@smithy/core/dist-cjs/submodules/endpoints/index.js +20 -23
  132. package/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.browser.js +9 -11
  133. package/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.js +11 -13
  134. package/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js +59 -60
  135. package/node_modules/@smithy/core/dist-cjs/submodules/retry/index.browser.js +23 -24
  136. package/node_modules/@smithy/core/dist-cjs/submodules/retry/index.js +25 -26
  137. package/node_modules/@smithy/core/dist-cjs/submodules/schema/index.js +5 -7
  138. package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.browser.js +4 -6
  139. package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.js +23 -25
  140. package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.native.js +4 -6
  141. package/node_modules/@smithy/core/dist-cjs/submodules/transport/index.js +2 -4
  142. package/node_modules/@smithy/core/dist-es/legacy-root-exports/middleware-http-auth-scheme/httpAuthSchemeMiddleware.js +1 -1
  143. package/node_modules/@smithy/core/dist-es/legacy-root-exports/middleware-http-signing/httpSigningMiddleware.js +1 -1
  144. package/node_modules/@smithy/core/dist-es/submodules/cbor/SmithyRpcV2CborProtocol.js +1 -1
  145. package/node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/endpointMiddleware.js +1 -1
  146. package/node_modules/@smithy/core/dist-types/submodules/schema/TypeRegistry.d.ts +1 -1
  147. package/node_modules/@smithy/core/package.json +7 -6
  148. package/node_modules/@smithy/credential-provider-imds/dist-cjs/index.js +23 -24
  149. package/node_modules/@smithy/credential-provider-imds/package.json +6 -6
  150. package/node_modules/@smithy/fetch-http-handler/dist-cjs/index.js +6 -8
  151. package/node_modules/@smithy/fetch-http-handler/package.json +7 -7
  152. package/node_modules/@smithy/signature-v4/dist-cjs/index.js +27 -29
  153. package/node_modules/@smithy/signature-v4/package.json +6 -6
  154. package/node_modules/@smithy/types/dist-cjs/index.js +23 -18
  155. package/node_modules/@smithy/types/package.json +4 -4
  156. package/node_modules/marked/README.md +13 -4
  157. package/node_modules/marked/bin/main.js +16 -14
  158. package/node_modules/marked/bin/marked.js +2 -1
  159. package/node_modules/marked/lib/marked.d.ts +157 -125
  160. package/node_modules/marked/lib/marked.esm.js +67 -2179
  161. package/node_modules/marked/lib/marked.esm.js.map +3 -3
  162. package/node_modules/marked/lib/marked.umd.js +67 -2201
  163. package/node_modules/marked/lib/marked.umd.js.map +3 -3
  164. package/node_modules/marked/man/marked.1 +4 -2
  165. package/node_modules/marked/man/marked.1.md +2 -1
  166. package/node_modules/marked/package.json +27 -35
  167. package/node_modules/undici/docs/docs/api/Client.md +3 -0
  168. package/node_modules/undici/docs/docs/api/Cookies.md +27 -0
  169. package/node_modules/undici/docs/docs/api/Socks5ProxyAgent.md +1 -0
  170. package/node_modules/undici/lib/core/socks5-client.js +14 -4
  171. package/node_modules/undici/lib/core/socks5-utils.js +18 -4
  172. package/node_modules/undici/lib/dispatcher/agent.js +1 -1
  173. package/node_modules/undici/lib/dispatcher/balanced-pool.js +1 -1
  174. package/node_modules/undici/lib/dispatcher/client-h1.js +69 -1
  175. package/node_modules/undici/lib/dispatcher/client.js +3 -2
  176. package/node_modules/undici/lib/dispatcher/dispatcher-base.js +19 -0
  177. package/node_modules/undici/lib/dispatcher/pool.js +1 -1
  178. package/node_modules/undici/lib/dispatcher/proxy-agent.js +2 -1
  179. package/node_modules/undici/lib/dispatcher/socks5-proxy-agent.js +45 -34
  180. package/node_modules/undici/lib/util/cache.js +8 -2
  181. package/node_modules/undici/lib/web/cookies/parse.js +17 -25
  182. package/node_modules/undici/lib/web/websocket/permessage-deflate.js +13 -31
  183. package/node_modules/undici/lib/web/websocket/receiver.js +80 -23
  184. package/node_modules/undici/lib/web/websocket/stream/websocketstream.js +8 -1
  185. package/node_modules/undici/lib/web/websocket/websocket.js +8 -1
  186. package/node_modules/undici/package.json +1 -1
  187. package/node_modules/undici/types/client.d.ts +16 -0
  188. package/package.json +6 -6
  189. package/slingshot/index.js +253 -253
  190. package/node_modules/@aws-sdk/credential-provider-sso/dist-cjs/loadSso-BKDNrsal.js +0 -8
  191. package/node_modules/marked/lib/marked.cjs +0 -2211
  192. package/node_modules/marked/lib/marked.cjs.map +0 -7
  193. package/node_modules/marked/lib/marked.d.cts +0 -728
  194. package/node_modules/marked/marked.min.js +0 -69
  195. /package/node_modules/marked/{LICENSE.md → LICENSE} +0 -0
@@ -1,4 +1,4 @@
1
- .TH "MARKED" "1" "May 2025" "15.0.11"
1
+ .TH "MARKED" "1" "June 2026" "18.0.4"
2
2
  .SH "NAME"
3
3
  \fBmarked\fR \- a javascript markdown parser
4
4
  .SH SYNOPSIS
@@ -104,7 +104,9 @@ marked\.parse('*foo*');
104
104
  Please report any bugs to https://github.com/markedjs/marked
105
105
  .SH LICENSE
106
106
  .P
107
- Copyright (c) 2011\-2014, Christopher Jeffrey (MIT License)\.
107
+ Copyright (c) 2018+, MarkedJS\. (MIT License)
108
+ .br
109
+ Copyright (c) 2011\-2018, Christopher Jeffrey\. (MIT License)
108
110
  .SH SEE ALSO
109
111
  .P
110
112
  markdown(1), nodejs(1)
@@ -85,7 +85,8 @@ Please report any bugs to <https://github.com/markedjs/marked>.
85
85
 
86
86
  ## LICENSE
87
87
 
88
- Copyright (c) 2011-2014, Christopher Jeffrey (MIT License).
88
+ Copyright (c) 2018+, MarkedJS. (MIT License)
89
+ Copyright (c) 2011-2018, Christopher Jeffrey. (MIT License)
89
90
 
90
91
  ## SEE ALSO
91
92
 
@@ -2,9 +2,9 @@
2
2
  "name": "marked",
3
3
  "description": "A markdown parser built for speed",
4
4
  "author": "Christopher Jeffrey",
5
- "version": "15.0.12",
5
+ "version": "18.0.5",
6
6
  "type": "module",
7
- "main": "./lib/marked.cjs",
7
+ "main": "./lib/marked.esm.js",
8
8
  "module": "./lib/marked.esm.js",
9
9
  "browser": "./lib/marked.umd.js",
10
10
  "types": "./lib/marked.d.ts",
@@ -15,22 +15,14 @@
15
15
  "files": [
16
16
  "bin/",
17
17
  "lib/",
18
- "man/",
19
- "marked.min.js"
18
+ "man/"
20
19
  ],
21
20
  "exports": {
22
21
  ".": {
23
- "import": {
24
- "types": "./lib/marked.d.ts",
25
- "default": "./lib/marked.esm.js"
26
- },
27
- "default": {
28
- "types": "./lib/marked.d.cts",
29
- "default": "./lib/marked.cjs"
30
- }
22
+ "types": "./lib/marked.d.ts",
23
+ "default": "./lib/marked.esm.js"
31
24
  },
32
25
  "./bin/marked": "./bin/marked.js",
33
- "./marked.min.js": "./marked.min.js",
34
26
  "./package.json": "./package.json"
35
27
  },
36
28
  "publishConfig": {
@@ -56,30 +48,31 @@
56
48
  "html"
57
49
  ],
58
50
  "devDependencies": {
59
- "@arethetypeswrong/cli": "^0.18.1",
60
- "@markedjs/eslint-config": "^1.0.12",
61
- "@markedjs/testutils": "14.1.1-0",
51
+ "@arethetypeswrong/cli": "^0.18.3",
52
+ "@markedjs/eslint-config": "^1.0.14",
53
+ "@markedjs/testutils": "18.0.0-1",
62
54
  "@semantic-release/commit-analyzer": "^13.0.1",
63
55
  "@semantic-release/git": "^10.0.1",
64
- "@semantic-release/github": "^11.0.2",
65
- "@semantic-release/npm": "^12.0.1",
66
- "@semantic-release/release-notes-generator": "^14.0.3",
67
- "cheerio": "1.0.0",
56
+ "@semantic-release/github": "^12.0.8",
57
+ "@semantic-release/npm": "^13.1.5",
58
+ "@semantic-release/release-notes-generator": "^14.1.1",
59
+ "cheerio": "1.2.0",
68
60
  "commonmark": "0.31.2",
69
- "cross-env": "^7.0.3",
61
+ "cross-env": "^10.1.0",
70
62
  "dts-bundle-generator": "^9.5.1",
71
- "esbuild": "^0.25.3",
63
+ "esbuild": "^0.28.0",
72
64
  "esbuild-plugin-umd-wrapper": "^3.0.0",
73
- "eslint": "^9.27.0",
65
+ "eslint": "^10.4.1",
74
66
  "highlight.js": "^11.11.1",
75
- "markdown-it": "14.1.0",
76
- "marked-highlight": "^2.2.1",
77
- "marked-man": "^2.1.0",
67
+ "markdown-it": "14.2.0",
68
+ "marked-highlight": "^2.2.4",
69
+ "marked-man": "^2.1.1",
78
70
  "recheck": "^4.5.0",
79
- "semantic-release": "^24.2.4",
71
+ "rimraf": "^6.1.3",
72
+ "semantic-release": "^25.0.3",
80
73
  "titleize": "^4.0.0",
81
74
  "tslib": "^2.8.1",
82
- "typescript": "5.8.3"
75
+ "typescript": "6.0.3"
83
76
  },
84
77
  "scripts": {
85
78
  "bench": "npm run build && node test/bench.js",
@@ -87,25 +80,24 @@
87
80
  "build:docs": "npm run build && node docs/build.js",
88
81
  "build:esbuild": "node esbuild.config.js",
89
82
  "build:man": "marked-man man/marked.1.md > man/marked.1",
90
- "build:reset": "git checkout upstream/master lib/marked.cjs lib/marked.umd.js lib/marked.esm.js marked.min.js",
91
- "build:types": "tsc && dts-bundle-generator --export-referenced-types --project tsconfig.json -o lib/marked.d.ts src/marked.ts && dts-bundle-generator --export-referenced-types --project tsconfig.json -o lib/marked.d.cts src/marked.ts",
83
+ "build:reset": "rimraf ./lib ./public",
84
+ "build:types": "tsc && dts-bundle-generator --export-referenced-types --project tsconfig.json -o lib/marked.d.ts src/marked.ts",
92
85
  "lint": "eslint --fix",
93
86
  "rules": "node test/rules.js",
94
- "test": "npm run build && npm run test:specs && npm run test:unit",
95
- "test:all": "npm test && npm run test:umd && npm run test:cjs && npm run test:types && npm run test:lint",
87
+ "test": "npm run build:reset && npm run build:docs && npm run test:specs && npm run test:unit && npm run test:umd && npm run test:cjs && npm run test:types && npm run test:lint",
96
88
  "test:cjs": "node test/cjs-test.cjs",
97
89
  "test:lint": "eslint",
98
90
  "test:only": "npm run build && npm run test:specs:only && npm run test:unit:only",
99
- "test:redos": "node test/recheck.js > vuln.js",
91
+ "test:redos": "node test/recheck.ts > vuln.js",
100
92
  "test:specs:only": "node --test --test-only --test-reporter=spec test/run-spec-tests.js",
101
93
  "test:specs": "node --test --test-reporter=spec test/run-spec-tests.js",
102
- "test:types": "tsc --project tsconfig-type-test.json && attw -P --exclude-entrypoints ./bin/marked ./marked.min.js",
94
+ "test:types": "tsc --project tsconfig-type-test.json && attw -P --entrypoints . --profile esm-only",
103
95
  "test:umd": "node test/umd-test.js",
104
96
  "test:unit:only": "node --test --test-only --test-reporter=spec test/unit/*.test.js",
105
97
  "test:unit": "node --test --test-reporter=spec test/unit/*.test.js",
106
98
  "test:update": "node test/update-specs.js"
107
99
  },
108
100
  "engines": {
109
- "node": ">= 18"
101
+ "node": ">= 20"
110
102
  }
111
103
  }
@@ -24,6 +24,9 @@ Returns: `Client`
24
24
  * **keepAliveTimeoutThreshold** `number | null` (optional) - Default: `2e3` - A number of milliseconds subtracted from server *keep-alive* hints when overriding `keepAliveTimeout` to account for timing inaccuracies caused by e.g. transport latency. Defaults to 2 seconds.
25
25
  * **maxHeaderSize** `number | null` (optional) - Default: `--max-http-header-size` or `16384` - The maximum length of request headers in bytes. Defaults to Node.js' --max-http-header-size or 16KiB.
26
26
  * **maxResponseSize** `number | null` (optional) - Default: `-1` - The maximum length of response body in bytes. Set to `-1` to disable.
27
+ * **webSocket** `WebSocketOptions` (optional) - WebSocket-specific configuration options.
28
+ * **maxFragments** `number` (optional) - Default: `131072` - Maximum number of fragments in a message. Set to 0 to disable the limit.
29
+ * **maxPayloadSize** `number` (optional) - Default: `134217728` (128 MB) - Maximum allowed payload size in bytes for WebSocket messages. Applied to uncompressed messages, compressed frame payloads, and decompressed (permessage-deflate) messages. Set to 0 to disable the limit.
27
30
  * **pipelining** `number | null` (optional) - Default: `1` - The amount of concurrent requests to be sent over the single TCP/TLS connection according to [RFC7230](https://tools.ietf.org/html/rfc7230#section-6.3.2). Carefully consider your workload and environment before enabling concurrent requests as pipelining may reduce performance if used incorrectly. Pipelining is sensitive to network stack settings as well as head of line blocking caused by e.g. long running requests. Set to `0` to disable keep-alive connections.
28
31
  * **connect** `ConnectOptions | Function | null` (optional) - Default: `null`.
29
32
  * **strictContentLength** `Boolean` (optional) - Default: `true` - Whether to treat request content length mismatches as errors. If true, an error is thrown when the request content-length header doesn't match the length of the request body. **Security Warning:** Disabling this option can expose your application to HTTP Request Smuggling attacks, where mismatched content-length headers cause servers and proxies to interpret request boundaries differently. This can lead to cache poisoning, credential hijacking, and bypassing security controls. Only disable this in controlled environments where you fully trust the request source.
@@ -80,6 +80,33 @@ Arguments:
80
80
 
81
81
  Returns: `Cookie[]`
82
82
 
83
+ ## `parseCookie(cookie)`
84
+
85
+ Parses a single `Set-Cookie` header value into a `Cookie` object.
86
+
87
+ ```js
88
+ import { parseCookie } from 'undici'
89
+
90
+ console.log(parseCookie('undici=getSetCookies; Secure; SameSite=Lax'))
91
+ // {
92
+ // name: 'undici',
93
+ // value: 'getSetCookies',
94
+ // secure: true,
95
+ // sameSite: 'Lax'
96
+ // }
97
+ ```
98
+
99
+ Notes:
100
+
101
+ * The cookie value is returned as it appears in the header. Percent-encoded sequences such as `%20` or `%0D%0A` are **not** decoded.
102
+ * `sameSite` is only set for exact case-insensitive matches of `Strict`, `Lax`, or `None`.
103
+
104
+ Arguments:
105
+
106
+ * **cookie** `string`
107
+
108
+ Returns: `Cookie | null`
109
+
83
110
  ## `setCookie(headers, cookie)`
84
111
 
85
112
  Appends a cookie to the `Set-Cookie` header.
@@ -22,6 +22,7 @@ Extends: [`PoolOptions`](/docs/docs/api/Pool.md#parameter-pooloptions)
22
22
  * **password** `string` (optional) - SOCKS5 proxy password for authentication. Can also be provided in the proxy URL.
23
23
  * **connect** `Function` (optional) - Custom connector function for the proxy connection.
24
24
  * **proxyTls** `BuildOptions` (optional) - TLS options for the proxy connection (when using SOCKS5 over TLS).
25
+ * **requestTls** `BuildOptions` (optional) - TLS options applied to the HTTPS connection to the target server through the SOCKS5 tunnel. Use this to configure `ca`, `cert`, `key`, `rejectUnauthorized`, `servername`, etc. for the target HTTPS endpoint.
25
26
 
26
27
  Examples:
27
28
 
@@ -52,6 +52,7 @@ const STATES = {
52
52
  INITIAL: 'initial',
53
53
  HANDSHAKING: 'handshaking',
54
54
  AUTHENTICATING: 'authenticating',
55
+ AUTHENTICATED: 'authenticated',
55
56
  CONNECTING: 'connecting',
56
57
  CONNECTED: 'connected',
57
58
  ERROR: 'error',
@@ -143,6 +144,11 @@ class Socks5Client extends EventEmitter {
143
144
  }
144
145
  }
145
146
 
147
+ markAuthenticated () {
148
+ this.state = STATES.AUTHENTICATED
149
+ this.emit('authenticated')
150
+ }
151
+
146
152
  /**
147
153
  * Start the SOCKS5 handshake
148
154
  */
@@ -193,7 +199,7 @@ class Socks5Client extends EventEmitter {
193
199
  debug('server selected auth method', method)
194
200
 
195
201
  if (method === AUTH_METHODS.NO_AUTH) {
196
- this.emit('authenticated')
202
+ this.markAuthenticated()
197
203
  } else if (method === AUTH_METHODS.USERNAME_PASSWORD) {
198
204
  this.state = STATES.AUTHENTICATING
199
205
  this.sendAuthRequest()
@@ -258,7 +264,7 @@ class Socks5Client extends EventEmitter {
258
264
 
259
265
  this.buffer = this.buffer.subarray(2)
260
266
  debug('authentication successful')
261
- this.emit('authenticated')
267
+ this.markAuthenticated()
262
268
  }
263
269
 
264
270
  /**
@@ -267,8 +273,12 @@ class Socks5Client extends EventEmitter {
267
273
  * @param {number} port - Target port
268
274
  */
269
275
  connect (address, port) {
270
- if (this.state === STATES.CONNECTED) {
271
- throw new InvalidArgumentError('Already connected')
276
+ if (this.state === STATES.CONNECTING || this.state === STATES.CONNECTED) {
277
+ throw new InvalidArgumentError('Connection already in progress')
278
+ }
279
+
280
+ if (this.state !== STATES.AUTHENTICATED) {
281
+ throw new InvalidArgumentError('Client must be authenticated before CONNECT')
272
282
  }
273
283
 
274
284
  debug('connecting to', address, port)
@@ -46,12 +46,26 @@ function parseAddress (address) {
46
46
  */
47
47
  function parseIPv6 (address) {
48
48
  const buffer = Buffer.alloc(16)
49
+ let normalizedAddress = address
50
+
51
+ // Expand an embedded IPv4 tail into the last two IPv6 groups.
52
+ if (address.includes('.')) {
53
+ const lastColonIndex = address.lastIndexOf(':')
54
+ const ipv4Part = address.slice(lastColonIndex + 1)
55
+
56
+ if (net.isIPv4(ipv4Part)) {
57
+ const octets = ipv4Part.split('.').map(Number)
58
+ const high = ((octets[0] << 8) | octets[1]).toString(16)
59
+ const low = ((octets[2] << 8) | octets[3]).toString(16)
60
+ normalizedAddress = `${address.slice(0, lastColonIndex)}:${high}:${low}`
61
+ }
62
+ }
49
63
 
50
64
  // Handle compressed notation (::)
51
- const doubleColonIndex = address.indexOf('::')
65
+ const doubleColonIndex = normalizedAddress.indexOf('::')
52
66
  if (doubleColonIndex !== -1) {
53
- const before = address.slice(0, doubleColonIndex)
54
- const after = address.slice(doubleColonIndex + 2)
67
+ const before = normalizedAddress.slice(0, doubleColonIndex)
68
+ const after = normalizedAddress.slice(doubleColonIndex + 2)
55
69
  const beforeParts = before === '' ? [] : before.split(':')
56
70
  const afterParts = after === '' ? [] : after.split(':')
57
71
 
@@ -66,7 +80,7 @@ function parseIPv6 (address) {
66
80
  bufferIndex += 2
67
81
  }
68
82
  } else {
69
- const parts = address.split(':')
83
+ const parts = normalizedAddress.split(':')
70
84
  for (let i = 0; i < parts.length; i++) {
71
85
  buffer.writeUInt16BE(parseInt(parts[i], 16), i * 2)
72
86
  }
@@ -35,7 +35,7 @@ class Agent extends DispatcherBase {
35
35
  throw new InvalidArgumentError('maxOrigins must be a number greater than 0')
36
36
  }
37
37
 
38
- super()
38
+ super(options)
39
39
 
40
40
  if (connect && typeof connect !== 'function') {
41
41
  connect = { ...connect }
@@ -54,7 +54,7 @@ class BalancedPool extends PoolBase {
54
54
  throw new InvalidArgumentError('factory must be a function.')
55
55
  }
56
56
 
57
- super()
57
+ super(opts)
58
58
 
59
59
  this[kOptions] = { ...util.deepClone(opts) }
60
60
  this[kOptions].interceptors = opts.interceptors
@@ -57,6 +57,9 @@ const constants = require('../llhttp/constants.js')
57
57
  const EMPTY_BUF = Buffer.alloc(0)
58
58
  const FastBuffer = Buffer[Symbol.species]
59
59
  const removeAllListeners = util.removeAllListeners
60
+ const kIdleSocketValidation = Symbol('kIdleSocketValidation')
61
+ const kIdleSocketValidationTimeout = Symbol('kIdleSocketValidationTimeout')
62
+ const kSocketUsed = Symbol('kSocketUsed')
60
63
 
61
64
  let extractBody
62
65
 
@@ -440,6 +443,11 @@ class Parser {
440
443
  return -1
441
444
  }
442
445
 
446
+ if (client[kRunning] === 0) {
447
+ util.destroy(socket, new SocketError('bad response', util.getSocketInfo(socket)))
448
+ return -1
449
+ }
450
+
443
451
  const request = client[kQueue][client[kRunningIdx]]
444
452
  if (!request) {
445
453
  return -1
@@ -568,6 +576,11 @@ class Parser {
568
576
  return -1
569
577
  }
570
578
 
579
+ if (client[kRunning] === 0) {
580
+ util.destroy(socket, new SocketError('bad response', util.getSocketInfo(socket)))
581
+ return -1
582
+ }
583
+
571
584
  const request = client[kQueue][client[kRunningIdx]]
572
585
 
573
586
  if (!request) {
@@ -746,6 +759,7 @@ class Parser {
746
759
  request.onComplete(headers)
747
760
 
748
761
  client[kQueue][client[kRunningIdx]++] = null
762
+ socket[kSocketUsed] = client[kPending] === 0
749
763
 
750
764
  if (socket[kWriting]) {
751
765
  assert(client[kRunning] === 0)
@@ -822,6 +836,9 @@ function connectH1 (client, socket) {
822
836
  socket[kWriting] = false
823
837
  socket[kReset] = false
824
838
  socket[kBlocking] = false
839
+ socket[kIdleSocketValidation] = 0
840
+ socket[kIdleSocketValidationTimeout] = null
841
+ socket[kSocketUsed] = false
825
842
  socket[kParser] = new Parser(client, socket, llhttpInstance)
826
843
 
827
844
  util.addListener(socket, 'error', onHttpSocketError)
@@ -864,7 +881,7 @@ function connectH1 (client, socket) {
864
881
  * @returns {boolean}
865
882
  */
866
883
  busy (request) {
867
- if (socket[kWriting] || socket[kReset] || socket[kBlocking]) {
884
+ if (socket[kWriting] || socket[kReset] || socket[kBlocking] || socket[kIdleSocketValidation] === 1) {
868
885
  return true
869
886
  }
870
887
 
@@ -944,6 +961,8 @@ function onHttpSocketEnd () {
944
961
  function onHttpSocketClose () {
945
962
  const parser = this[kParser]
946
963
 
964
+ clearIdleSocketValidation(this)
965
+
947
966
  if (parser) {
948
967
  if (!this[kError] && parser.statusCode && !parser.shouldKeepAlive) {
949
968
  this[kError] = parser.finish() || this[kError]
@@ -990,6 +1009,28 @@ function onSocketClose () {
990
1009
  this[kClosed] = true
991
1010
  }
992
1011
 
1012
+ function clearIdleSocketValidation (socket) {
1013
+ if (socket[kIdleSocketValidationTimeout]) {
1014
+ clearTimeout(socket[kIdleSocketValidationTimeout])
1015
+ socket[kIdleSocketValidationTimeout] = null
1016
+ }
1017
+
1018
+ socket[kIdleSocketValidation] = 0
1019
+ }
1020
+
1021
+ function scheduleIdleSocketValidation (client, socket) {
1022
+ socket[kIdleSocketValidation] = 1
1023
+ socket[kIdleSocketValidationTimeout] = setTimeout(() => {
1024
+ socket[kIdleSocketValidationTimeout] = null
1025
+ socket[kIdleSocketValidation] = 2
1026
+
1027
+ if (client[kSocket] === socket && !socket.destroyed) {
1028
+ client[kResume]()
1029
+ }
1030
+ }, 0)
1031
+ socket[kIdleSocketValidationTimeout].unref?.()
1032
+ }
1033
+
993
1034
  /**
994
1035
  * @param {import('./client.js')} client
995
1036
  */
@@ -1007,6 +1048,32 @@ function resumeH1 (client) {
1007
1048
  socket[kNoRef] = false
1008
1049
  }
1009
1050
 
1051
+ if (client[kRunning] === 0 && client[kPending] > 0 && socket[kSocketUsed]) {
1052
+ if (socket[kIdleSocketValidation] === 0) {
1053
+ scheduleIdleSocketValidation(client, socket)
1054
+ socket[kParser].readMore()
1055
+ if (socket.destroyed) {
1056
+ return
1057
+ }
1058
+ return
1059
+ }
1060
+
1061
+ if (socket[kIdleSocketValidation] === 1) {
1062
+ socket[kParser].readMore()
1063
+ if (socket.destroyed) {
1064
+ return
1065
+ }
1066
+ return
1067
+ }
1068
+ }
1069
+
1070
+ if (client[kRunning] === 0) {
1071
+ socket[kParser].readMore()
1072
+ if (socket.destroyed) {
1073
+ return
1074
+ }
1075
+ }
1076
+
1010
1077
  if (client[kSize] === 0) {
1011
1078
  if (socket[kParser].timeoutType !== TIMEOUT_KEEP_ALIVE) {
1012
1079
  socket[kParser].setTimeout(client[kKeepAliveTimeoutValue], TIMEOUT_KEEP_ALIVE)
@@ -1105,6 +1172,7 @@ function writeH1 (client, request) {
1105
1172
  }
1106
1173
 
1107
1174
  const socket = client[kSocket]
1175
+ clearIdleSocketValidation(socket)
1108
1176
 
1109
1177
  /**
1110
1178
  * @param {Error} [err]
@@ -114,7 +114,8 @@ class Client extends DispatcherBase {
114
114
  useH2c,
115
115
  initialWindowSize,
116
116
  connectionWindowSize,
117
- pingInterval
117
+ pingInterval,
118
+ webSocket
118
119
  } = {}) {
119
120
  if (keepAlive !== undefined) {
120
121
  throw new InvalidArgumentError('unsupported keepAlive, use pipelining=0 instead')
@@ -222,7 +223,7 @@ class Client extends DispatcherBase {
222
223
  throw new InvalidArgumentError('pingInterval must be a positive integer, greater or equal to 0')
223
224
  }
224
225
 
225
- super()
226
+ super({ webSocket })
226
227
 
227
228
  if (typeof connect !== 'function') {
228
229
  connect = buildConnector({
@@ -11,6 +11,7 @@ const { kDestroy, kClose, kClosed, kDestroyed, kDispatch } = require('../core/sy
11
11
 
12
12
  const kOnDestroyed = Symbol('onDestroyed')
13
13
  const kOnClosed = Symbol('onClosed')
14
+ const kWebSocketOptions = Symbol('webSocketOptions')
14
15
 
15
16
  class DispatcherBase extends Dispatcher {
16
17
  /** @type {boolean} */
@@ -25,6 +26,24 @@ class DispatcherBase extends Dispatcher {
25
26
  /** @type {Array<Function>|null} */
26
27
  [kOnClosed] = null
27
28
 
29
+ /**
30
+ * @param {import('../../types/dispatcher').DispatcherOptions} [opts]
31
+ */
32
+ constructor (opts) {
33
+ super()
34
+ this[kWebSocketOptions] = opts?.webSocket ?? {}
35
+ }
36
+
37
+ /**
38
+ * @returns {import('../../types/dispatcher').WebSocketOptions}
39
+ */
40
+ get webSocketOptions () {
41
+ return {
42
+ maxFragments: this[kWebSocketOptions].maxFragments ?? 131072,
43
+ maxPayloadSize: this[kWebSocketOptions].maxPayloadSize ?? 128 * 1024 * 1024 // 128 MB default
44
+ }
45
+ }
46
+
28
47
  /** @returns {boolean} */
29
48
  get destroyed () {
30
49
  return this[kDestroyed]
@@ -63,7 +63,7 @@ class Pool extends PoolBase {
63
63
  })
64
64
  }
65
65
 
66
- super()
66
+ super(options)
67
67
 
68
68
  this[kConnections] = connections || null
69
69
  this[kUrl] = util.parseOrigin(origin)
@@ -142,7 +142,8 @@ class ProxyAgent extends DispatcherBase {
142
142
  factory: agentFactory,
143
143
  username: opts.username || username,
144
144
  password: opts.password || password,
145
- proxyTls: opts.proxyTls
145
+ proxyTls: opts.proxyTls,
146
+ requestTls: opts.requestTls
146
147
  })
147
148
  }
148
149