@openclaw/slack 2026.8.1 → 2026.8.33

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 (104) hide show
  1. package/dist/{account-inspect-CN2hBsim.js → .setup/account-inspect-B86OaUEt.mjs} +5 -5
  2. package/dist/{accounts-Dm_H77gH.js → .setup/accounts-C1FspRF-.mjs} +1 -1
  3. package/dist/{accounts.runtime-DRuEK6mL.js → .setup/accounts.runtime-BpWv-6-2.mjs} +1 -1
  4. package/dist/{action-runtime-044ldvNL.js → .setup/action-runtime-C_G4J1MV.mjs} +52 -42
  5. package/dist/.setup/action-runtime.runtime-DldZIYpL.mjs +2 -0
  6. package/dist/{actions-BI7JkfVm.js → .setup/actions-8uuOLGDR.mjs} +20 -14
  7. package/dist/{approval-handler.runtime-DYv0UIZS.js → .setup/approval-handler.runtime-Bj-Kl-Ak.mjs} +7 -6
  8. package/dist/{channel-1vIJOzPx.js → .setup/channel-Dmbj_FF6.mjs} +43 -35
  9. package/dist/{channel-type-DlFSKeIZ.js → .setup/channel-type-CncPqtvr.mjs} +4 -4
  10. package/dist/{channel.setup-ofDi3_Pu.js → .setup/channel.setup-CTV8N2nI.mjs} +25 -24
  11. package/dist/{config-schema-BVIMyiDN.js → .setup/config-schema-B9GwoRlE.mjs} +5 -3
  12. package/dist/{conversation-binding-route-DFVLUdYF.js → .setup/conversation-binding-route-shed4O6L.mjs} +2 -2
  13. package/dist/{directory-config-DqfQ42OV.js → .setup/directory-config-CW4ICy0y.mjs} +6 -5
  14. package/dist/{directory-live-BPaNHjmP.js → .setup/directory-live-C2hI1rq1.mjs} +4 -4
  15. package/dist/{doctor-contract-BAy7-EUQ.js → .setup/doctor-contract-CtMUqjvk.mjs} +6 -5
  16. package/dist/{group-policy-BdwszjYn.js → .setup/group-policy-9pMyFFRP.mjs} +72 -41
  17. package/dist/{message-tool-api-CJ0kjcg5.js → .setup/message-tool-api-CBtuGn2d.mjs} +3 -3
  18. package/dist/{monitor-Dq5Cmrvp.js → .setup/monitor-t4yqSbLZ.mjs} +4 -4
  19. package/dist/{outbound-adapter-DYaI8ThX.js → .setup/outbound-adapter-CIO-lnfQ.mjs} +6 -6
  20. package/dist/{pipeline.runtime-Bd22U0ga.js → .setup/pipeline.runtime-xjOJ8ltM.mjs} +239 -394
  21. package/dist/{plugin-routes-CLp4obpN.js → .setup/plugin-routes-C3X0eVaK.mjs} +1 -1
  22. package/dist/{policy-CtQVbde1.js → .setup/policy-CpLMTEad.mjs} +7 -5
  23. package/dist/{probe-0usmAb0i.js → .setup/probe-DnWN6oBa.mjs} +115 -114
  24. package/dist/{provider-CN_8hFv2.js → .setup/provider-1mRMBuV5.mjs} +75 -50
  25. package/dist/{relay-source-BNGpsdwV.js → .setup/relay-source-DiUZ6ltP.mjs} +6 -4
  26. package/dist/{replies-BSiRQOJ1.js → .setup/replies-Cpng2F6w.mjs} +13 -8
  27. package/dist/{resolve-channels-Czheznc8.js → .setup/resolve-channels-Dpv7OyKO.mjs} +6 -5
  28. package/dist/{resolve-users-BAOlNimr.js → .setup/resolve-users-DmyA3D_2.mjs} +6 -5
  29. package/dist/.setup/runtime-setter-api-CMFvhrAr.mjs +3 -0
  30. package/dist/{scopes-COSlmhnH.js → .setup/scopes-Dcgl9Nme.mjs} +1 -1
  31. package/dist/.setup/secret-contract-api-D9UfYujm.mjs +3 -0
  32. package/dist/{security-audit-B_yKr7MW.js → .setup/security-audit-tCbGyCfU.mjs} +1 -1
  33. package/dist/{send-DS9ICrBI.js → .setup/send-CBfhmYDj.mjs} +24 -16
  34. package/dist/{send.runtime-D_Bb6IuH.js → .setup/send.runtime-BTyALMiN.mjs} +1 -1
  35. package/dist/.setup/setup-plugin-api-B1Y-kMp_.mjs +3 -0
  36. package/dist/{setup-surface-BGnd2pSe.js → .setup/setup-surface-BcIT0kDT.mjs} +6 -6
  37. package/dist/{shared-D5B-5hBg.js → .setup/shared-DWQcLrb8.mjs} +9 -9
  38. package/dist/{slash-dispatch.runtime-CilDmI0c.js → .setup/slash-dispatch.runtime-D5WAai-5.mjs} +1 -1
  39. package/dist/{target-parsing-BnMD2ZqZ.js → .setup/target-parsing-PbxGDbr9.mjs} +11 -6
  40. package/dist/{targets-Cx5W_n3W.js → .setup/targets-BlQcnjPc.mjs} +1 -1
  41. package/dist/account-inspect-api.js +1 -1
  42. package/dist/api.js +17 -17
  43. package/dist/channel-config-api.js +1 -1
  44. package/dist/channel-plugin-api.js +1 -1
  45. package/dist/configured-state.js +1 -1
  46. package/dist/directory-contract-api.js +1 -1
  47. package/dist/doctor-contract-api.js +1 -1
  48. package/dist/http-routes-api.js +1 -1
  49. package/dist/index.js +1 -1
  50. package/dist/message-tool-api.js +1 -1
  51. package/dist/runtime-api.js +13 -13
  52. package/dist/runtime-setter-api.js +1 -1
  53. package/dist/secret-contract-api.js +1 -1
  54. package/dist/security-contract-api.js +1 -1
  55. package/dist/setup-entry.js +4 -3
  56. package/dist/setup-plugin-api.js +1 -1
  57. package/node_modules/@slack/bolt/node_modules/negotiator/lib/accept.js +54 -0
  58. package/node_modules/@slack/bolt/node_modules/negotiator/lib/charset.js +10 -34
  59. package/node_modules/@slack/bolt/node_modules/negotiator/lib/encoding.js +9 -30
  60. package/node_modules/@slack/bolt/node_modules/negotiator/lib/language.js +15 -36
  61. package/node_modules/@slack/bolt/node_modules/negotiator/lib/mediaType.js +16 -134
  62. package/node_modules/@slack/bolt/node_modules/negotiator/node_modules/content-type/LICENSE +22 -0
  63. package/node_modules/@slack/bolt/node_modules/negotiator/node_modules/content-type/README.md +71 -0
  64. package/node_modules/@slack/bolt/node_modules/negotiator/node_modules/content-type/dist/index.d.ts +46 -0
  65. package/node_modules/@slack/bolt/node_modules/negotiator/node_modules/content-type/dist/index.js +176 -0
  66. package/node_modules/@slack/bolt/node_modules/negotiator/node_modules/content-type/dist/index.js.map +1 -0
  67. package/node_modules/@slack/bolt/node_modules/negotiator/node_modules/content-type/package.json +52 -0
  68. package/node_modules/@slack/bolt/node_modules/negotiator/package.json +16 -10
  69. package/node_modules/@slack/bolt/node_modules/proxy-addr/HISTORY.md +60 -54
  70. package/node_modules/@slack/bolt/node_modules/proxy-addr/README.md +1 -1
  71. package/node_modules/@slack/bolt/node_modules/proxy-addr/index.js +32 -0
  72. package/node_modules/@slack/bolt/node_modules/proxy-addr/package.json +8 -4
  73. package/node_modules/typebox/build/format/email.mjs +1 -1
  74. package/node_modules/typebox/build/format/idna/idn-hostname.mjs +19 -1
  75. package/node_modules/typebox/package.json +1 -1
  76. package/node_modules/undici/lib/dispatcher/balanced-pool.js +4 -2
  77. package/node_modules/undici/lib/dispatcher/client-h1.js +12 -4
  78. package/node_modules/undici/lib/dispatcher/client-h2.js +70 -14
  79. package/node_modules/undici/lib/dispatcher/client.js +6 -2
  80. package/node_modules/undici/lib/handler/cache-handler.js +21 -5
  81. package/node_modules/undici/lib/handler/retry-handler.js +42 -7
  82. package/node_modules/undici/lib/interceptor/cache.js +20 -1
  83. package/node_modules/undici/lib/interceptor/decompress.js +146 -14
  84. package/node_modules/undici/lib/interceptor/dump.js +10 -23
  85. package/node_modules/undici/lib/web/eventsource/eventsource-stream.js +245 -150
  86. package/node_modules/undici/lib/web/websocket/connection.js +1 -1
  87. package/node_modules/undici/lib/web/websocket/permessage-deflate.js +5 -0
  88. package/node_modules/undici/lib/web/websocket/stream/websocketstream.js +8 -10
  89. package/node_modules/undici/package.json +1 -1
  90. package/node_modules/undici/types/interceptors.d.ts +2 -0
  91. package/package.json +6 -6
  92. package/dist/action-runtime.runtime-BL3KzX13.js +0 -2
  93. package/node_modules/@slack/bolt/node_modules/negotiator/HISTORY.md +0 -114
  94. /package/dist/{account-configured-sUohAxZr.js → .setup/account-configured-sUohAxZr.mjs} +0 -0
  95. /package/dist/{cursor-pages-eX7p8Wwt.js → .setup/cursor-pages-eX7p8Wwt.mjs} +0 -0
  96. /package/dist/{registry-bbjH7IHX.js → .setup/registry-bbjH7IHX.mjs} +0 -0
  97. /package/dist/{rolldown-runtime-8H4AJuhK.js → .setup/rolldown-runtime-8H4AJuhK.mjs} +0 -0
  98. /package/dist/{runtime-JSVZSWAj.js → .setup/runtime-JSVZSWAj.mjs} +0 -0
  99. /package/dist/{secret-contract-DxmvbxBF.js → .setup/secret-contract-DxmvbxBF.mjs} +0 -0
  100. /package/dist/{send-results-eeOu_HYm.js → .setup/send-results-eeOu_HYm.mjs} +0 -0
  101. /package/dist/{slash-commands.runtime-BTTMlmwy.js → .setup/slash-commands.runtime-BTTMlmwy.mjs} +0 -0
  102. /package/dist/{slash-skill-commands.runtime-CD1J2ODY.js → .setup/slash-skill-commands.runtime-CD1J2ODY.mjs} +0 -0
  103. /package/dist/{streaming-compat-B-e0mqM0.js → .setup/streaming-compat-B-e0mqM0.mjs} +0 -0
  104. /package/dist/{thread-ts-DUGhaYKq.js → .setup/thread-ts-DUGhaYKq.mjs} +0 -0
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "negotiator",
3
3
  "description": "HTTP content negotiation",
4
- "version": "1.0.0",
4
+ "version": "1.1.0",
5
5
  "contributors": [
6
6
  "Douglas Christopher Wilson <doug@somethingdoug.com>",
7
7
  "Federico Romero <federico.romero@outboxlabs.com>",
@@ -17,27 +17,33 @@
17
17
  "accept-charset"
18
18
  ],
19
19
  "repository": "jshttp/negotiator",
20
+ "funding": {
21
+ "type": "opencollective",
22
+ "url": "https://opencollective.com/express"
23
+ },
24
+ "dependencies": {
25
+ "content-type": "^2.1.0"
26
+ },
20
27
  "devDependencies": {
21
28
  "eslint": "7.32.0",
22
29
  "eslint-plugin-markdown": "2.2.1",
23
- "mocha": "9.1.3",
24
- "nyc": "15.1.0"
30
+ "mocha": "^11.7.0",
31
+ "nyc": "^17.1.0",
32
+ "vitest": "3.2.4"
25
33
  },
26
34
  "files": [
27
35
  "lib/",
28
- "HISTORY.md",
29
- "LICENSE",
30
- "index.js",
31
- "README.md"
36
+ "index.js"
32
37
  ],
33
38
  "engines": {
34
- "node": ">= 0.6"
39
+ "node": ">=18"
35
40
  },
36
41
  "scripts": {
42
+ "bench": "vitest bench",
37
43
  "lint": "eslint .",
38
- "test": "mocha --reporter spec --check-leaks --bail test/",
44
+ "test": "mocha --reporter spec --check-leaks test/",
39
45
  "test:debug": "mocha --reporter spec --check-leaks --inspect --inspect-brk test/",
40
- "test-ci": "nyc --reporter=lcov --reporter=text npm test",
46
+ "test-ci": "nyc --reporter=lcovonly --reporter=text npm test",
41
47
  "test-cov": "nyc --reporter=html --reporter=text npm test"
42
48
  }
43
49
  }
@@ -1,144 +1,150 @@
1
- 2.0.7 / 2021-05-31
2
- ==================
1
+ 2.0.8
2
+ =====
3
+
4
+ * Fix [CVE-2026-90711](https://www.cve.org/CVERecord?id=CVE-2026-90711) ([GHSA-jqcg-44mw-7w3h](https://github.com/jshttp/proxy-addr/security/advisories/GHSA-jqcg-44mw-7w3h))
5
+
6
+
7
+ 2.0.7
8
+ =====
3
9
 
4
10
  * deps: forwarded@0.2.0
5
11
  - Use `req.socket` over deprecated `req.connection`
6
12
 
7
- 2.0.6 / 2020-02-24
8
- ==================
13
+ 2.0.6
14
+ =====
9
15
 
10
16
  * deps: ipaddr.js@1.9.1
11
17
 
12
- 2.0.5 / 2019-04-16
13
- ==================
18
+ 2.0.5
19
+ =====
14
20
 
15
21
  * deps: ipaddr.js@1.9.0
16
22
 
17
- 2.0.4 / 2018-07-26
18
- ==================
23
+ 2.0.4
24
+ =====
19
25
 
20
26
  * deps: ipaddr.js@1.8.0
21
27
 
22
- 2.0.3 / 2018-02-19
23
- ==================
28
+ 2.0.3
29
+ =====
24
30
 
25
31
  * deps: ipaddr.js@1.6.0
26
32
 
27
- 2.0.2 / 2017-09-24
28
- ==================
33
+ 2.0.2
34
+ =====
29
35
 
30
36
  * deps: forwarded@~0.1.2
31
37
  - perf: improve header parsing
32
38
  - perf: reduce overhead when no `X-Forwarded-For` header
33
39
 
34
- 2.0.1 / 2017-09-10
35
- ==================
40
+ 2.0.1
41
+ =====
36
42
 
37
43
  * deps: forwarded@~0.1.1
38
44
  - Fix trimming leading / trailing OWS
39
45
  - perf: hoist regular expression
40
46
  * deps: ipaddr.js@1.5.2
41
47
 
42
- 2.0.0 / 2017-08-08
43
- ==================
48
+ 2.0.0
49
+ =====
44
50
 
45
51
  * Drop support for Node.js below 0.10
46
52
 
47
- 1.1.5 / 2017-07-25
48
- ==================
53
+ 1.1.5
54
+ =====
49
55
 
50
56
  * Fix array argument being altered
51
57
  * deps: ipaddr.js@1.4.0
52
58
 
53
- 1.1.4 / 2017-03-24
54
- ==================
59
+ 1.1.4
60
+ =====
55
61
 
56
62
  * deps: ipaddr.js@1.3.0
57
63
 
58
- 1.1.3 / 2017-01-14
59
- ==================
64
+ 1.1.3
65
+ =====
60
66
 
61
67
  * deps: ipaddr.js@1.2.0
62
68
 
63
- 1.1.2 / 2016-05-29
64
- ==================
69
+ 1.1.2
70
+ =====
65
71
 
66
72
  * deps: ipaddr.js@1.1.1
67
73
  - Fix IPv6-mapped IPv4 validation edge cases
68
74
 
69
- 1.1.1 / 2016-05-03
70
- ==================
75
+ 1.1.1
76
+ =====
71
77
 
72
78
  * Fix regression matching mixed versions against multiple subnets
73
79
 
74
- 1.1.0 / 2016-05-01
75
- ==================
80
+ 1.1.0
81
+ =====
76
82
 
77
83
  * Fix accepting various invalid netmasks
78
84
  - IPv4 netmasks must be contingous
79
85
  - IPv6 addresses cannot be used as a netmask
80
86
  * deps: ipaddr.js@1.1.0
81
87
 
82
- 1.0.10 / 2015-12-09
83
- ===================
88
+ 1.0.10
89
+ ======
84
90
 
85
91
  * deps: ipaddr.js@1.0.5
86
92
  - Fix regression in `isValid` with non-string arguments
87
93
 
88
- 1.0.9 / 2015-12-01
89
- ==================
94
+ 1.0.9
95
+ =====
90
96
 
91
97
  * deps: ipaddr.js@1.0.4
92
98
  - Fix accepting some invalid IPv6 addresses
93
99
  - Reject CIDRs with negative or overlong masks
94
100
  * perf: enable strict mode
95
101
 
96
- 1.0.8 / 2015-05-10
97
- ==================
102
+ 1.0.8
103
+ =====
98
104
 
99
105
  * deps: ipaddr.js@1.0.1
100
106
 
101
- 1.0.7 / 2015-03-16
102
- ==================
107
+ 1.0.7
108
+ =====
103
109
 
104
110
  * deps: ipaddr.js@0.1.9
105
111
  - Fix OOM on certain inputs to `isValid`
106
112
 
107
- 1.0.6 / 2015-02-01
108
- ==================
113
+ 1.0.6
114
+ =====
109
115
 
110
116
  * deps: ipaddr.js@0.1.8
111
117
 
112
- 1.0.5 / 2015-01-08
113
- ==================
118
+ 1.0.5
119
+ =====
114
120
 
115
121
  * deps: ipaddr.js@0.1.6
116
122
 
117
- 1.0.4 / 2014-11-23
118
- ==================
123
+ 1.0.4
124
+ =====
119
125
 
120
126
  * deps: ipaddr.js@0.1.5
121
127
  - Fix edge cases with `isValid`
122
128
 
123
- 1.0.3 / 2014-09-21
124
- ==================
129
+ 1.0.3
130
+ =====
125
131
 
126
132
  * Use `forwarded` npm module
127
133
 
128
- 1.0.2 / 2014-09-18
129
- ==================
134
+ 1.0.2
135
+ =====
130
136
 
131
137
  * Fix a global leak when multiple subnets are trusted
132
138
  * Support Node.js 0.6
133
139
  * deps: ipaddr.js@0.1.3
134
140
 
135
- 1.0.1 / 2014-06-03
136
- ==================
141
+ 1.0.1
142
+ =====
137
143
 
138
144
  * Fix links in npm package
139
145
 
140
- 1.0.0 / 2014-05-08
141
- ==================
146
+ 1.0.0
147
+ =====
142
148
 
143
149
  * Add `trust` argument to determine proxy trust on
144
150
  * Accepts custom function
@@ -150,12 +156,12 @@
150
156
  * Add `proxyaddr.compile` to pre-compile `trust` function
151
157
  to make subsequent calls faster
152
158
 
153
- 0.0.1 / 2014-05-04
154
- ==================
159
+ 0.0.1
160
+ =====
155
161
 
156
162
  * Fix bad npm publish
157
163
 
158
- 0.0.0 / 2014-05-04
159
- ==================
164
+ 0.0.0
165
+ =====
160
166
 
161
167
  * Initial release
@@ -37,7 +37,7 @@ proxyaddr(req, function (addr) { return addr === '127.0.0.1' })
37
37
  proxyaddr(req, function (addr, i) { return i < 1 })
38
38
  ```
39
39
 
40
- The `trust` arugment may also be a single IP address string or an
40
+ The `trust` argument may also be a single IP address string or an
41
41
  array of trusted addresses, as plain IP addresses, CIDR-formatted
42
42
  strings, or IP/netmask strings.
43
43
 
@@ -256,6 +256,13 @@ function trustMulti (subnets) {
256
256
  if (!isip(addr)) return false
257
257
 
258
258
  var ip = parseip(addr)
259
+
260
+ if (ip.kind() === 'ipv6' && ip.isIPv4MappedAddress()) {
261
+ // Canonicalize IPv4-mapped candidates to IPv4 so a mapped address
262
+ // cannot bypass the cross-family guard via the same-family path
263
+ ip = ip.toIPv4Address()
264
+ }
265
+
259
266
  var ipconv
260
267
  var kind = ip.kind()
261
268
 
@@ -272,6 +279,12 @@ function trustMulti (subnets) {
272
279
  continue
273
280
  }
274
281
 
282
+ if (subnetkind !== 'ipv4' && !(subnetrange >= 96 && subnetip.isIPv4MappedAddress())) {
283
+ // IPv6 subnet only spans IPv4 when it is a mapped subnet whose
284
+ // prefix covers the ::ffff: marker; otherwise it must not match IPv4
285
+ continue
286
+ }
287
+
275
288
  if (!ipconv) {
276
289
  // Convert IP to match subnet IP kind
277
290
  ipconv = subnetkind === 'ipv4'
@@ -280,6 +293,9 @@ function trustMulti (subnets) {
280
293
  }
281
294
 
282
295
  trusted = ipconv
296
+ } else if (kind === 'ipv6' && subnetip.isIPv4MappedAddress()) {
297
+ // A native IPv6 candidate cannot match an IPv4-mapped subnet
298
+ continue
283
299
  }
284
300
 
285
301
  if (trusted.match(subnetip, subnetrange)) {
@@ -308,6 +324,13 @@ function trustSingle (subnet) {
308
324
  if (!isip(addr)) return false
309
325
 
310
326
  var ip = parseip(addr)
327
+
328
+ if (ip.kind() === 'ipv6' && ip.isIPv4MappedAddress()) {
329
+ // Canonicalize IPv4-mapped candidates to IPv4 so a mapped address
330
+ // cannot bypass the cross-family guard via the same-family path
331
+ ip = ip.toIPv4Address()
332
+ }
333
+
311
334
  var kind = ip.kind()
312
335
 
313
336
  if (kind !== subnetkind) {
@@ -316,10 +339,19 @@ function trustSingle (subnet) {
316
339
  return false
317
340
  }
318
341
 
342
+ if (!subnetisipv4 && !(subnetrange >= 96 && subnetip.isIPv4MappedAddress())) {
343
+ // IPv6 subnet only spans IPv4 when it is a mapped subnet whose
344
+ // prefix covers the ::ffff: marker; otherwise it must not match IPv4
345
+ return false
346
+ }
347
+
319
348
  // Convert IP to match subnet IP kind
320
349
  ip = subnetisipv4
321
350
  ? ip.toIPv4Address()
322
351
  : ip.toIPv4MappedAddress()
352
+ } else if (kind === 'ipv6' && subnetip.isIPv4MappedAddress()) {
353
+ // A native IPv6 candidate cannot match an IPv4-mapped subnet
354
+ return false
323
355
  }
324
356
 
325
357
  return ip.match(subnetip, subnetrange)
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "proxy-addr",
3
3
  "description": "Determine address of proxied request",
4
- "version": "2.0.7",
4
+ "version": "2.0.8",
5
5
  "author": "Douglas Christopher Wilson <doug@somethingdoug.com>",
6
6
  "license": "MIT",
7
7
  "keywords": [
@@ -10,6 +10,10 @@
10
10
  "x-forwarded-for"
11
11
  ],
12
12
  "repository": "jshttp/proxy-addr",
13
+ "funding": {
14
+ "type": "opencollective",
15
+ "url": "https://opencollective.com/express"
16
+ },
13
17
  "dependencies": {
14
18
  "forwarded": "0.2.0",
15
19
  "ipaddr.js": "1.9.1"
@@ -17,11 +21,11 @@
17
21
  "devDependencies": {
18
22
  "benchmark": "2.1.4",
19
23
  "beautify-benchmark": "0.2.4",
20
- "deep-equal": "1.0.1",
24
+ "deep-equal": "1.1.2",
21
25
  "eslint": "7.26.0",
22
26
  "eslint-config-standard": "14.1.1",
23
- "eslint-plugin-import": "2.23.4",
24
- "eslint-plugin-markdown": "2.2.0",
27
+ "eslint-plugin-import": "2.32.0",
28
+ "eslint-plugin-markdown": "2.2.1",
25
29
  "eslint-plugin-node": "11.1.0",
26
30
  "eslint-plugin-promise": "4.3.1",
27
31
  "eslint-plugin-standard": "4.1.0",
@@ -1,4 +1,4 @@
1
- const Email = /^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[^"\\]|\\.)*")@(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*|\[(?:IPv6:[a-f0-9:]+|(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])(?:\.(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3})\])$/i;
1
+ const Email = /^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[^"\\]|\\[\x20-\x7e])*")@(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*|\[(?:IPv6:[a-f0-9:]+|(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])(?:\.(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3})\])$/i;
2
2
  /**
3
3
  * Returns true if the value is an Email
4
4
  * @specification https://datatracker.ietf.org/doc/html/rfc5322
@@ -1,6 +1,9 @@
1
1
  import * as FormatBidi from './format/bidi.mjs';
2
2
  import * as LabelUnicode from './label/unicode.mjs';
3
3
  import * as LabelPuny from './label/puny.mjs';
4
+ // ------------------------------------------------------------------
5
+ // IsLabel
6
+ // ------------------------------------------------------------------
4
7
  function IsValidLabelLength(value) {
5
8
  return value.length > 0 && value.length <= 63;
6
9
  }
@@ -8,9 +11,24 @@ function IsLabel(value) {
8
11
  return IsValidLabelLength(value) && (LabelPuny.IsPunyLabel(value) ||
9
12
  LabelUnicode.IsUnicodeLabel(value));
10
13
  }
14
+ // ------------------------------------------------------------------
15
+ // NormalizeHostname
16
+ //
17
+ // Normalizes a hostname for label validation. Normalizes for NFC
18
+ // such that equivalent codepoint sequences can be uniformly
19
+ // compared. It also removes codepoints that IDNA mapping ignores,
20
+ // and converts full stop variants to ASCII '.' so the hostname can
21
+ // be split into labels.
22
+ // ------------------------------------------------------------------
11
23
  function NormalizeHostname(value) {
12
- return value.normalize('NFC').replace(/[\u002E\u3002\uFF0E\uFF61]/g, '.');
24
+ return value
25
+ .normalize('NFC')
26
+ .replace(/[\u00ad\u034f\u180b-\u180d\u200b\ufe00-\ufe0f\u{e0100}-\u{e01ef}]/gu, '') // RE_IGNORED_MAPPING
27
+ .replace(/[\u002E\u3002\uFF0E\uFF61]/g, '.'); // RE_FULL_STOP_MAPPING
13
28
  }
29
+ // ------------------------------------------------------------------
30
+ // IsIdnHostname
31
+ // ------------------------------------------------------------------
14
32
  export function IsIdnHostname(value) {
15
33
  if (value.length === 0 || value.includes(' '))
16
34
  return false;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "typebox",
3
3
  "description": "Json Schema Type Builder with Static Type Resolution for TypeScript",
4
- "version": "1.3.16",
4
+ "version": "1.3.17",
5
5
  "keywords": [
6
6
  "typescript",
7
7
  "jsonschema"
@@ -49,14 +49,16 @@ function defaultFactory (origin, opts) {
49
49
  }
50
50
 
51
51
  class BalancedPool extends PoolBase {
52
- constructor (upstreams = [], { factory = defaultFactory, ...opts } = {}) {
52
+ constructor (upstreams = [], { factory = defaultFactory, connect, tls, ...opts } = {}) {
53
53
  if (typeof factory !== 'function') {
54
54
  throw new InvalidArgumentError('factory must be a function.')
55
55
  }
56
56
 
57
57
  super(opts)
58
58
 
59
- this[kOptions] = { ...util.deepClone(opts) }
59
+ if (connect && typeof connect !== 'function') connect = { ...connect }
60
+ if (tls && typeof tls !== 'function') tls = { ...tls }
61
+ this[kOptions] = { ...util.deepClone(opts), connect, tls }
60
62
  this[kOptions].interceptors = opts.interceptors
61
63
  ? { ...opts.interceptors }
62
64
  : undefined
@@ -1012,7 +1012,7 @@ function onSocketClose () {
1012
1012
 
1013
1013
  function clearIdleSocketValidation (socket) {
1014
1014
  if (socket[kIdleSocketValidationTimeout]) {
1015
- clearTimeout(socket[kIdleSocketValidationTimeout])
1015
+ clearImmediate(socket[kIdleSocketValidationTimeout])
1016
1016
  socket[kIdleSocketValidationTimeout] = null
1017
1017
  }
1018
1018
 
@@ -1021,15 +1021,23 @@ function clearIdleSocketValidation (socket) {
1021
1021
 
1022
1022
  function scheduleIdleSocketValidation (client, socket) {
1023
1023
  socket[kIdleSocketValidation] = 1
1024
- socket[kIdleSocketValidationTimeout] = setTimeout(() => {
1024
+ // Yield to the check phase (after poll) so unsolicited bytes / FIN / RST
1025
+ // already pending on this idle keep-alive socket are processed before the
1026
+ // next request is written (GHSA-35p6-xmwp-9g52).
1027
+ //
1028
+ // setTimeout(0) pays Node's ~1ms timer floor on every sequential reuse
1029
+ // (#5493). setImmediate avoids that, but an *unref'd* Immediate lets poll
1030
+ // block for ~500ms when the event loop is otherwise idle (#5600 / #5606).
1031
+ // A ref'd Immediate both keeps the pending request alive and makes poll
1032
+ // return immediately — the hybrid those issues asked for.
1033
+ socket[kIdleSocketValidationTimeout] = setImmediate(() => {
1025
1034
  socket[kIdleSocketValidationTimeout] = null
1026
1035
  socket[kIdleSocketValidation] = 2
1027
1036
 
1028
1037
  if (client[kSocket] === socket && !socket.destroyed) {
1029
1038
  client[kResume]()
1030
1039
  }
1031
- }, 0)
1032
- socket[kIdleSocketValidationTimeout].unref?.()
1040
+ })
1033
1041
  }
1034
1042
 
1035
1043
  /**