@openclaw/mattermost 2026.9.3 → 2026.9.5

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 (532) hide show
  1. package/assets/activity.svg +40 -0
  2. package/assets/icon.png +0 -0
  3. package/dist/.setup/channel-plugin-api-CKz3b0dp.mjs +40 -0
  4. package/dist/.setup/channel-plugin-api-N-mnrhds.mjs +3 -0
  5. package/dist/{channel-plugin-runtime-C4u91PKh.js → .setup/channel-plugin-runtime-Ca4cZHq2.mjs} +15 -30
  6. package/dist/{channel.runtime-CGEfnc2y.js → .setup/channel.runtime-C074p7wv.mjs} +377 -115
  7. package/dist/{client-Dt7Q-j5B.js → .setup/client-Cx71KZ1x.mjs} +27 -15
  8. package/dist/{interactions-DF1FH27_.js → .setup/interactions-BG-CQbVD.mjs} +3 -3
  9. package/dist/{monitor-auth-C6RGYyn-.js → .setup/monitor-auth-DBoM2Bja.mjs} +16 -3
  10. package/dist/{normalize-R-ATEEHC.js → .setup/normalize-BQzx2u8S.mjs} +47 -7
  11. package/dist/.setup/secret-contract-api-Drab0Nqx.mjs +3 -0
  12. package/dist/{slash-state-BjBTvP7u.js → .setup/slash-state-CmyIYDIc.mjs} +59 -15
  13. package/dist/api.js +2 -2
  14. package/dist/channel-plugin-api.js +2 -39
  15. package/dist/channel-plugin-runtime.js +1 -1
  16. package/dist/doctor-contract-api.js +1 -1
  17. package/dist/gateway-auth-api.js +1 -1
  18. package/dist/policy-api.js +1 -1
  19. package/dist/runtime-api.js +1 -1
  20. package/dist/secret-contract-api.js +1 -1
  21. package/dist/setup-entry.js +3 -2
  22. package/dist/slash-route-api.js +1 -1
  23. package/node_modules/zod/README.md +27 -0
  24. package/node_modules/zod/compile.cjs +77 -0
  25. package/node_modules/zod/compile.d.cts +1 -0
  26. package/node_modules/zod/compile.d.ts +1 -0
  27. package/node_modules/zod/compile.js +52 -0
  28. package/node_modules/zod/index.cjs +2 -2
  29. package/node_modules/zod/index.d.cts +1 -2
  30. package/node_modules/zod/index.d.ts +1 -2
  31. package/node_modules/zod/index.js +5 -2
  32. package/node_modules/zod/package.json +13 -2
  33. package/node_modules/zod/src/compile.ts +56 -0
  34. package/node_modules/zod/src/index.ts +5 -2
  35. package/node_modules/zod/src/v3/ZodError.ts +22 -12
  36. package/node_modules/zod/src/v3/tests/error.test.ts +35 -0
  37. package/node_modules/zod/src/v3/tests/intersection.test.ts +18 -0
  38. package/node_modules/zod/src/v3/tests/language-server.test.ts +1 -2
  39. package/node_modules/zod/src/v3/tests/object.test.ts +3 -6
  40. package/node_modules/zod/src/v3/tests/readonly.test.ts +0 -80
  41. package/node_modules/zod/src/v3/tests/string.test.ts +6 -0
  42. package/node_modules/zod/src/v3/types.ts +5 -5
  43. package/node_modules/zod/src/v4/classic/checks.ts +1 -0
  44. package/node_modules/zod/src/v4/classic/compat.ts +26 -18
  45. package/node_modules/zod/src/v4/classic/deep-partial.ts +76 -0
  46. package/node_modules/zod/src/v4/classic/errors.ts +59 -44
  47. package/node_modules/zod/src/v4/classic/external.ts +12 -9
  48. package/node_modules/zod/src/v4/classic/from-json-schema.ts +140 -78
  49. package/node_modules/zod/src/v4/classic/in-out.ts +45 -0
  50. package/node_modules/zod/src/v4/classic/index.ts +2 -2
  51. package/node_modules/zod/src/v4/classic/iso.ts +2 -72
  52. package/node_modules/zod/src/v4/classic/parse.ts +10 -4
  53. package/node_modules/zod/src/v4/classic/schemas.ts +452 -262
  54. package/node_modules/zod/src/v4/classic/tests/apply.test.ts +27 -0
  55. package/node_modules/zod/src/v4/classic/tests/array.test.ts +2 -2
  56. package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +135 -0
  57. package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +30 -1
  58. package/node_modules/zod/src/v4/classic/tests/catch.test.ts +278 -0
  59. package/node_modules/zod/src/v4/classic/tests/codec-examples.test.ts +1 -2
  60. package/node_modules/zod/src/v4/classic/tests/codec.test.ts +2 -1
  61. package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +2 -2
  62. package/node_modules/zod/src/v4/classic/tests/credit-card.test.ts +76 -0
  63. package/node_modules/zod/src/v4/classic/tests/cyclic-data.test.ts +720 -0
  64. package/node_modules/zod/src/v4/classic/tests/date.test.ts +30 -0
  65. package/node_modules/zod/src/v4/classic/tests/datetime.test.ts +32 -18
  66. package/node_modules/zod/src/v4/classic/tests/deep-partial.test.ts +380 -0
  67. package/node_modules/zod/src/v4/classic/tests/default-locale.test.ts +32 -0
  68. package/node_modules/zod/src/v4/classic/tests/default.test.ts +46 -0
  69. package/node_modules/zod/src/v4/classic/tests/detached-methods.test.ts +31 -7
  70. package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +155 -13
  71. package/node_modules/zod/src/v4/classic/tests/enum.test.ts +11 -0
  72. package/node_modules/zod/src/v4/classic/tests/error-utils.test.ts +112 -2
  73. package/node_modules/zod/src/v4/classic/tests/error.test.ts +274 -6
  74. package/node_modules/zod/src/v4/classic/tests/from-json-schema.test.ts +425 -10
  75. package/node_modules/zod/src/v4/classic/tests/function.test.ts +31 -0
  76. package/node_modules/zod/src/v4/classic/tests/global-config.test.ts +2 -9
  77. package/node_modules/zod/src/v4/classic/tests/hash.test.ts +1 -2
  78. package/node_modules/zod/src/v4/classic/tests/in-out.test.ts +159 -0
  79. package/node_modules/zod/src/v4/classic/tests/index.test.ts +21 -2
  80. package/node_modules/zod/src/v4/classic/tests/instance-footprint.test.ts +281 -0
  81. package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +47 -0
  82. package/node_modules/zod/src/v4/classic/tests/intersection.test.ts +136 -0
  83. package/node_modules/zod/src/v4/classic/tests/issue-schema.test.ts +183 -0
  84. package/node_modules/zod/src/v4/classic/tests/jitless-allows-eval.test.ts +3 -10
  85. package/node_modules/zod/src/v4/classic/tests/lazy.test.ts +36 -1
  86. package/node_modules/zod/src/v4/classic/tests/literal.test.ts +12 -1
  87. package/node_modules/zod/src/v4/classic/tests/map.test.ts +12 -0
  88. package/node_modules/zod/src/v4/classic/tests/number.test.ts +46 -9
  89. package/node_modules/zod/src/v4/classic/tests/object.test.ts +245 -12
  90. package/node_modules/zod/src/v4/classic/tests/optin-ladder.test.ts +234 -0
  91. package/node_modules/zod/src/v4/classic/tests/optional.test.ts +49 -16
  92. package/node_modules/zod/src/v4/classic/tests/partial.test.ts +51 -4
  93. package/node_modules/zod/src/v4/classic/tests/preprocess-types.test.ts +20 -2
  94. package/node_modules/zod/src/v4/classic/tests/readonly.test.ts +0 -68
  95. package/node_modules/zod/src/v4/classic/tests/record.test.ts +186 -18
  96. package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +33 -2
  97. package/node_modules/zod/src/v4/classic/tests/redos.test.ts +68 -0
  98. package/node_modules/zod/src/v4/classic/tests/refine.test.ts +60 -0
  99. package/node_modules/zod/src/v4/classic/tests/set.test.ts +9 -0
  100. package/node_modules/zod/src/v4/classic/tests/string.test.ts +127 -5
  101. package/node_modules/zod/src/v4/classic/tests/stringbool.test.ts +18 -0
  102. package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +11 -2
  103. package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +1585 -173
  104. package/node_modules/zod/src/v4/classic/tests/tuple.test.ts +45 -30
  105. package/node_modules/zod/src/v4/classic/tests/union.test.ts +39 -2
  106. package/node_modules/zod/src/v4/classic/tests/validate.test.ts +76 -0
  107. package/node_modules/zod/src/v4/classic/tests/validations.test.ts +2 -2
  108. package/node_modules/zod/src/v4/core/api.ts +48 -12
  109. package/node_modules/zod/src/v4/core/checks.ts +57 -44
  110. package/node_modules/zod/src/v4/core/compile.ts +2188 -0
  111. package/node_modules/zod/src/v4/core/core.ts +98 -19
  112. package/node_modules/zod/src/v4/core/doc.ts +11 -7
  113. package/node_modules/zod/src/v4/core/errors.ts +115 -24
  114. package/node_modules/zod/src/v4/core/index.ts +3 -0
  115. package/node_modules/zod/src/v4/core/json-schema-generator.ts +6 -1
  116. package/node_modules/zod/src/v4/core/json-schema-processors.ts +257 -93
  117. package/node_modules/zod/src/v4/core/json-schema.ts +2 -1
  118. package/node_modules/zod/src/v4/core/memoizer.ts +284 -0
  119. package/node_modules/zod/src/v4/core/parse.ts +131 -38
  120. package/node_modules/zod/src/v4/core/regexes.ts +30 -13
  121. package/node_modules/zod/src/v4/core/registries.ts +2 -2
  122. package/node_modules/zod/src/v4/core/schemas.ts +759 -461
  123. package/node_modules/zod/src/v4/core/tests/compile-differential.test.ts +969 -0
  124. package/node_modules/zod/src/v4/core/tests/compile-global.test.ts +89 -0
  125. package/node_modules/zod/src/v4/core/tests/compile-off-by-default.test.ts +26 -0
  126. package/node_modules/zod/src/v4/core/tests/compile-stats.test.ts +34 -0
  127. package/node_modules/zod/src/v4/core/tests/compile.test.ts +1639 -0
  128. package/node_modules/zod/src/v4/core/tests/locales/el.test.ts +1 -2
  129. package/node_modules/zod/src/v4/core/tests/locales/es.test.ts +1 -2
  130. package/node_modules/zod/src/v4/core/tests/locales/fr.test.ts +3 -3
  131. package/node_modules/zod/src/v4/core/tests/locales/parity.test.ts +42 -0
  132. package/node_modules/zod/src/v4/core/tests/locales/tk.test.ts +69 -0
  133. package/node_modules/zod/src/v4/core/tests/treeshake.test.ts +51 -0
  134. package/node_modules/zod/src/v4/core/tests/url-no-canparse.test.ts +31 -0
  135. package/node_modules/zod/src/v4/core/to-json-schema.ts +275 -42
  136. package/node_modules/zod/src/v4/core/util.ts +268 -42
  137. package/node_modules/zod/src/v4/core/versions.ts +2 -2
  138. package/node_modules/zod/src/v4/core/visit.ts +193 -0
  139. package/node_modules/zod/src/v4/index.ts +3 -3
  140. package/node_modules/zod/src/v4/locales/ar.ts +3 -0
  141. package/node_modules/zod/src/v4/locales/az.ts +3 -0
  142. package/node_modules/zod/src/v4/locales/be.ts +10 -0
  143. package/node_modules/zod/src/v4/locales/bg.ts +3 -0
  144. package/node_modules/zod/src/v4/locales/bn.ts +121 -0
  145. package/node_modules/zod/src/v4/locales/ca.ts +3 -0
  146. package/node_modules/zod/src/v4/locales/ckb.ts +138 -0
  147. package/node_modules/zod/src/v4/locales/cs.ts +3 -0
  148. package/node_modules/zod/src/v4/locales/da.ts +5 -2
  149. package/node_modules/zod/src/v4/locales/de.ts +3 -0
  150. package/node_modules/zod/src/v4/locales/el.ts +1 -0
  151. package/node_modules/zod/src/v4/locales/en.ts +15 -4
  152. package/node_modules/zod/src/v4/locales/eo.ts +3 -0
  153. package/node_modules/zod/src/v4/locales/es.ts +2 -0
  154. package/node_modules/zod/src/v4/locales/fa.ts +3 -0
  155. package/node_modules/zod/src/v4/locales/fi.ts +3 -0
  156. package/node_modules/zod/src/v4/locales/fr-CA.ts +3 -0
  157. package/node_modules/zod/src/v4/locales/fr.ts +19 -14
  158. package/node_modules/zod/src/v4/locales/gu.ts +121 -0
  159. package/node_modules/zod/src/v4/locales/he.ts +6 -1
  160. package/node_modules/zod/src/v4/locales/hi.ts +124 -0
  161. package/node_modules/zod/src/v4/locales/hr.ts +2 -0
  162. package/node_modules/zod/src/v4/locales/hu.ts +3 -0
  163. package/node_modules/zod/src/v4/locales/hy.ts +9 -0
  164. package/node_modules/zod/src/v4/locales/id.ts +3 -0
  165. package/node_modules/zod/src/v4/locales/index.ts +10 -0
  166. package/node_modules/zod/src/v4/locales/is.ts +3 -0
  167. package/node_modules/zod/src/v4/locales/it.ts +3 -0
  168. package/node_modules/zod/src/v4/locales/ja.ts +3 -0
  169. package/node_modules/zod/src/v4/locales/ka.ts +3 -0
  170. package/node_modules/zod/src/v4/locales/km.ts +3 -0
  171. package/node_modules/zod/src/v4/locales/kn.ts +124 -0
  172. package/node_modules/zod/src/v4/locales/ko.ts +3 -0
  173. package/node_modules/zod/src/v4/locales/lt.ts +2 -0
  174. package/node_modules/zod/src/v4/locales/mk.ts +3 -0
  175. package/node_modules/zod/src/v4/locales/ms.ts +3 -0
  176. package/node_modules/zod/src/v4/locales/ne.ts +126 -0
  177. package/node_modules/zod/src/v4/locales/nl.ts +3 -0
  178. package/node_modules/zod/src/v4/locales/nn.ts +119 -0
  179. package/node_modules/zod/src/v4/locales/no.ts +5 -2
  180. package/node_modules/zod/src/v4/locales/ota.ts +3 -0
  181. package/node_modules/zod/src/v4/locales/pl.ts +3 -0
  182. package/node_modules/zod/src/v4/locales/ps.ts +3 -0
  183. package/node_modules/zod/src/v4/locales/pt-BR.ts +159 -0
  184. package/node_modules/zod/src/v4/locales/pt.ts +99 -58
  185. package/node_modules/zod/src/v4/locales/ro.ts +1 -0
  186. package/node_modules/zod/src/v4/locales/ru.ts +10 -0
  187. package/node_modules/zod/src/v4/locales/sk.ts +121 -0
  188. package/node_modules/zod/src/v4/locales/sl.ts +3 -0
  189. package/node_modules/zod/src/v4/locales/sv.ts +5 -2
  190. package/node_modules/zod/src/v4/locales/ta.ts +3 -0
  191. package/node_modules/zod/src/v4/locales/th.ts +3 -0
  192. package/node_modules/zod/src/v4/locales/tk.ts +111 -0
  193. package/node_modules/zod/src/v4/locales/tr.ts +3 -0
  194. package/node_modules/zod/src/v4/locales/uk.ts +3 -0
  195. package/node_modules/zod/src/v4/locales/ur.ts +3 -0
  196. package/node_modules/zod/src/v4/locales/uz.ts +1 -0
  197. package/node_modules/zod/src/v4/locales/vi.ts +3 -0
  198. package/node_modules/zod/src/v4/locales/yo.ts +3 -0
  199. package/node_modules/zod/src/v4/locales/zh-CN.ts +3 -0
  200. package/node_modules/zod/src/v4/locales/zh-TW.ts +3 -0
  201. package/node_modules/zod/src/v4/mini/checks.ts +1 -0
  202. package/node_modules/zod/src/v4/mini/deep-partial.ts +73 -0
  203. package/node_modules/zod/src/v4/mini/external.ts +10 -1
  204. package/node_modules/zod/src/v4/mini/in-out.ts +45 -0
  205. package/node_modules/zod/src/v4/mini/parse.ts +2 -0
  206. package/node_modules/zod/src/v4/mini/schemas.ts +135 -56
  207. package/node_modules/zod/src/v4/mini/tests/apply.test.ts +33 -0
  208. package/node_modules/zod/src/v4/mini/tests/assignability.test.ts +62 -1
  209. package/node_modules/zod/src/v4/mini/tests/checks.test.ts +14 -0
  210. package/node_modules/zod/src/v4/mini/tests/codec.test.ts +35 -1
  211. package/node_modules/zod/src/v4/mini/tests/cyclic-data.test.ts +84 -0
  212. package/node_modules/zod/src/v4/mini/tests/deep-partial.test.ts +54 -0
  213. package/node_modules/zod/src/v4/mini/tests/error.test.ts +23 -4
  214. package/node_modules/zod/src/v4/mini/tests/functions.test.ts +9 -0
  215. package/node_modules/zod/src/v4/mini/tests/index.test.ts +72 -5
  216. package/node_modules/zod/src/v4/mini/tests/number.test.ts +14 -0
  217. package/node_modules/zod/src/v4/mini/tests/object.test.ts +65 -0
  218. package/node_modules/zod/src/v4/mini/tests/string.test.ts +21 -0
  219. package/node_modules/zod/v3/ZodError.cjs +22 -12
  220. package/node_modules/zod/v3/ZodError.d.cts +1 -1
  221. package/node_modules/zod/v3/ZodError.d.ts +1 -1
  222. package/node_modules/zod/v3/ZodError.js +22 -12
  223. package/node_modules/zod/v3/types.cjs +7 -5
  224. package/node_modules/zod/v3/types.js +7 -5
  225. package/node_modules/zod/v4/classic/checks.cjs +2 -1
  226. package/node_modules/zod/v4/classic/checks.d.cts +1 -1
  227. package/node_modules/zod/v4/classic/checks.d.ts +1 -1
  228. package/node_modules/zod/v4/classic/checks.js +1 -1
  229. package/node_modules/zod/v4/classic/compat.d.cts +9 -11
  230. package/node_modules/zod/v4/classic/compat.d.ts +9 -11
  231. package/node_modules/zod/v4/classic/deep-partial.cjs +39 -0
  232. package/node_modules/zod/v4/classic/deep-partial.d.cts +14 -0
  233. package/node_modules/zod/v4/classic/deep-partial.d.ts +14 -0
  234. package/node_modules/zod/v4/classic/deep-partial.js +13 -0
  235. package/node_modules/zod/v4/classic/errors.cjs +43 -34
  236. package/node_modules/zod/v4/classic/errors.d.cts +3 -4
  237. package/node_modules/zod/v4/classic/errors.d.ts +3 -4
  238. package/node_modules/zod/v4/classic/errors.js +43 -34
  239. package/node_modules/zod/v4/classic/external.cjs +30 -27
  240. package/node_modules/zod/v4/classic/external.d.cts +5 -2
  241. package/node_modules/zod/v4/classic/external.d.ts +5 -2
  242. package/node_modules/zod/v4/classic/external.js +5 -8
  243. package/node_modules/zod/v4/classic/from-json-schema.cjs +136 -75
  244. package/node_modules/zod/v4/classic/from-json-schema.js +136 -75
  245. package/node_modules/zod/v4/classic/in-out.cjs +63 -0
  246. package/node_modules/zod/v4/classic/in-out.d.cts +8 -0
  247. package/node_modules/zod/v4/classic/in-out.d.ts +8 -0
  248. package/node_modules/zod/v4/classic/in-out.js +36 -0
  249. package/node_modules/zod/v4/classic/index.cjs +2 -2
  250. package/node_modules/zod/v4/classic/index.d.cts +1 -2
  251. package/node_modules/zod/v4/classic/index.d.ts +1 -2
  252. package/node_modules/zod/v4/classic/index.js +2 -2
  253. package/node_modules/zod/v4/classic/iso.cjs +11 -22
  254. package/node_modules/zod/v4/classic/iso.d.cts +2 -17
  255. package/node_modules/zod/v4/classic/iso.d.ts +2 -17
  256. package/node_modules/zod/v4/classic/iso.js +2 -17
  257. package/node_modules/zod/v4/classic/parse.cjs +4 -1
  258. package/node_modules/zod/v4/classic/parse.d.cts +17 -4
  259. package/node_modules/zod/v4/classic/parse.d.ts +17 -4
  260. package/node_modules/zod/v4/classic/parse.js +1 -0
  261. package/node_modules/zod/v4/classic/schemas.cjs +498 -398
  262. package/node_modules/zod/v4/classic/schemas.d.cts +53 -18
  263. package/node_modules/zod/v4/classic/schemas.d.ts +53 -18
  264. package/node_modules/zod/v4/classic/schemas.js +492 -396
  265. package/node_modules/zod/v4/core/api.cjs +23 -4
  266. package/node_modules/zod/v4/core/api.d.cts +13 -9
  267. package/node_modules/zod/v4/core/api.d.ts +13 -9
  268. package/node_modules/zod/v4/core/api.js +21 -4
  269. package/node_modules/zod/v4/core/checks.cjs +37 -31
  270. package/node_modules/zod/v4/core/checks.d.cts +13 -13
  271. package/node_modules/zod/v4/core/checks.d.ts +13 -13
  272. package/node_modules/zod/v4/core/checks.js +37 -31
  273. package/node_modules/zod/v4/core/compile.cjs +1813 -0
  274. package/node_modules/zod/v4/core/compile.d.cts +51 -0
  275. package/node_modules/zod/v4/core/compile.d.ts +51 -0
  276. package/node_modules/zod/v4/core/compile.js +1783 -0
  277. package/node_modules/zod/v4/core/core.cjs +81 -18
  278. package/node_modules/zod/v4/core/core.d.cts +16 -4
  279. package/node_modules/zod/v4/core/core.d.ts +16 -4
  280. package/node_modules/zod/v4/core/core.js +82 -19
  281. package/node_modules/zod/v4/core/doc.cjs +5 -7
  282. package/node_modules/zod/v4/core/doc.d.cts +3 -1
  283. package/node_modules/zod/v4/core/doc.d.ts +3 -1
  284. package/node_modules/zod/v4/core/doc.js +5 -7
  285. package/node_modules/zod/v4/core/errors.cjs +110 -25
  286. package/node_modules/zod/v4/core/errors.d.cts +4 -0
  287. package/node_modules/zod/v4/core/errors.d.ts +4 -0
  288. package/node_modules/zod/v4/core/errors.js +110 -25
  289. package/node_modules/zod/v4/core/index.cjs +5 -1
  290. package/node_modules/zod/v4/core/index.d.cts +3 -0
  291. package/node_modules/zod/v4/core/index.d.ts +3 -0
  292. package/node_modules/zod/v4/core/index.js +3 -0
  293. package/node_modules/zod/v4/core/json-schema-generator.cjs +4 -0
  294. package/node_modules/zod/v4/core/json-schema-generator.d.cts +2 -2
  295. package/node_modules/zod/v4/core/json-schema-generator.d.ts +2 -2
  296. package/node_modules/zod/v4/core/json-schema-generator.js +4 -0
  297. package/node_modules/zod/v4/core/json-schema-processors.cjs +264 -95
  298. package/node_modules/zod/v4/core/json-schema-processors.js +243 -97
  299. package/node_modules/zod/v4/core/json-schema.d.cts +2 -1
  300. package/node_modules/zod/v4/core/json-schema.d.ts +2 -1
  301. package/node_modules/zod/v4/core/memoizer.cjs +272 -0
  302. package/node_modules/zod/v4/core/memoizer.d.cts +15 -0
  303. package/node_modules/zod/v4/core/memoizer.d.ts +15 -0
  304. package/node_modules/zod/v4/core/memoizer.js +265 -0
  305. package/node_modules/zod/v4/core/parse.cjs +96 -34
  306. package/node_modules/zod/v4/core/parse.d.cts +14 -11
  307. package/node_modules/zod/v4/core/parse.d.ts +14 -11
  308. package/node_modules/zod/v4/core/parse.js +94 -33
  309. package/node_modules/zod/v4/core/regexes.cjs +27 -15
  310. package/node_modules/zod/v4/core/regexes.d.cts +2 -0
  311. package/node_modules/zod/v4/core/regexes.d.ts +2 -0
  312. package/node_modules/zod/v4/core/regexes.js +24 -13
  313. package/node_modules/zod/v4/core/registries.js +2 -2
  314. package/node_modules/zod/v4/core/schemas.cjs +537 -326
  315. package/node_modules/zod/v4/core/schemas.d.cts +100 -31
  316. package/node_modules/zod/v4/core/schemas.d.ts +100 -31
  317. package/node_modules/zod/v4/core/schemas.js +526 -325
  318. package/node_modules/zod/v4/core/to-json-schema.cjs +242 -39
  319. package/node_modules/zod/v4/core/to-json-schema.d.cts +42 -3
  320. package/node_modules/zod/v4/core/to-json-schema.d.ts +42 -3
  321. package/node_modules/zod/v4/core/to-json-schema.js +241 -39
  322. package/node_modules/zod/v4/core/util.cjs +212 -31
  323. package/node_modules/zod/v4/core/util.d.cts +58 -1
  324. package/node_modules/zod/v4/core/util.d.ts +58 -1
  325. package/node_modules/zod/v4/core/util.js +202 -30
  326. package/node_modules/zod/v4/core/versions.cjs +2 -2
  327. package/node_modules/zod/v4/core/versions.d.cts +1 -1
  328. package/node_modules/zod/v4/core/versions.d.ts +1 -1
  329. package/node_modules/zod/v4/core/versions.js +2 -2
  330. package/node_modules/zod/v4/core/visit.cjs +195 -0
  331. package/node_modules/zod/v4/core/visit.d.cts +30 -0
  332. package/node_modules/zod/v4/core/visit.d.ts +30 -0
  333. package/node_modules/zod/v4/core/visit.js +169 -0
  334. package/node_modules/zod/v4/index.cjs +15 -5
  335. package/node_modules/zod/v4/index.d.cts +2 -2
  336. package/node_modules/zod/v4/index.d.ts +2 -2
  337. package/node_modules/zod/v4/index.js +3 -2
  338. package/node_modules/zod/v4/locales/ar.cjs +3 -0
  339. package/node_modules/zod/v4/locales/ar.js +3 -0
  340. package/node_modules/zod/v4/locales/az.cjs +3 -0
  341. package/node_modules/zod/v4/locales/az.js +3 -0
  342. package/node_modules/zod/v4/locales/be.cjs +10 -0
  343. package/node_modules/zod/v4/locales/be.js +10 -0
  344. package/node_modules/zod/v4/locales/bg.cjs +3 -0
  345. package/node_modules/zod/v4/locales/bg.js +3 -0
  346. package/node_modules/zod/v4/locales/bn.cjs +138 -0
  347. package/node_modules/zod/v4/locales/bn.d.cts +5 -0
  348. package/node_modules/zod/v4/locales/bn.d.ts +4 -0
  349. package/node_modules/zod/v4/locales/bn.js +111 -0
  350. package/node_modules/zod/v4/locales/ca.cjs +3 -0
  351. package/node_modules/zod/v4/locales/ca.js +3 -0
  352. package/node_modules/zod/v4/locales/ckb.cjs +158 -0
  353. package/node_modules/zod/v4/locales/ckb.d.cts +5 -0
  354. package/node_modules/zod/v4/locales/ckb.d.ts +4 -0
  355. package/node_modules/zod/v4/locales/ckb.js +131 -0
  356. package/node_modules/zod/v4/locales/cs.cjs +3 -0
  357. package/node_modules/zod/v4/locales/cs.js +3 -0
  358. package/node_modules/zod/v4/locales/da.cjs +5 -2
  359. package/node_modules/zod/v4/locales/da.js +5 -2
  360. package/node_modules/zod/v4/locales/de.cjs +3 -0
  361. package/node_modules/zod/v4/locales/de.js +3 -0
  362. package/node_modules/zod/v4/locales/el.cjs +1 -0
  363. package/node_modules/zod/v4/locales/el.js +1 -0
  364. package/node_modules/zod/v4/locales/en.cjs +14 -4
  365. package/node_modules/zod/v4/locales/en.js +14 -4
  366. package/node_modules/zod/v4/locales/eo.cjs +3 -0
  367. package/node_modules/zod/v4/locales/eo.js +3 -0
  368. package/node_modules/zod/v4/locales/es.cjs +2 -0
  369. package/node_modules/zod/v4/locales/es.js +2 -0
  370. package/node_modules/zod/v4/locales/fa.cjs +3 -0
  371. package/node_modules/zod/v4/locales/fa.js +3 -0
  372. package/node_modules/zod/v4/locales/fi.cjs +3 -0
  373. package/node_modules/zod/v4/locales/fi.js +3 -0
  374. package/node_modules/zod/v4/locales/fr-CA.cjs +3 -0
  375. package/node_modules/zod/v4/locales/fr-CA.js +3 -0
  376. package/node_modules/zod/v4/locales/fr.cjs +16 -14
  377. package/node_modules/zod/v4/locales/fr.js +16 -14
  378. package/node_modules/zod/v4/locales/gu.cjs +138 -0
  379. package/node_modules/zod/v4/locales/gu.d.cts +5 -0
  380. package/node_modules/zod/v4/locales/gu.d.ts +4 -0
  381. package/node_modules/zod/v4/locales/gu.js +111 -0
  382. package/node_modules/zod/v4/locales/he.cjs +5 -0
  383. package/node_modules/zod/v4/locales/he.js +5 -0
  384. package/node_modules/zod/v4/locales/hi.cjs +136 -0
  385. package/node_modules/zod/v4/locales/hi.d.cts +5 -0
  386. package/node_modules/zod/v4/locales/hi.d.ts +4 -0
  387. package/node_modules/zod/v4/locales/hi.js +109 -0
  388. package/node_modules/zod/v4/locales/hr.cjs +2 -0
  389. package/node_modules/zod/v4/locales/hr.js +2 -0
  390. package/node_modules/zod/v4/locales/hu.cjs +3 -0
  391. package/node_modules/zod/v4/locales/hu.js +3 -0
  392. package/node_modules/zod/v4/locales/hy.cjs +9 -0
  393. package/node_modules/zod/v4/locales/hy.js +9 -0
  394. package/node_modules/zod/v4/locales/id.cjs +3 -0
  395. package/node_modules/zod/v4/locales/id.js +3 -0
  396. package/node_modules/zod/v4/locales/index.cjs +22 -2
  397. package/node_modules/zod/v4/locales/index.d.cts +10 -0
  398. package/node_modules/zod/v4/locales/index.d.ts +10 -0
  399. package/node_modules/zod/v4/locales/index.js +10 -0
  400. package/node_modules/zod/v4/locales/is.cjs +3 -0
  401. package/node_modules/zod/v4/locales/is.js +3 -0
  402. package/node_modules/zod/v4/locales/it.cjs +3 -0
  403. package/node_modules/zod/v4/locales/it.js +3 -0
  404. package/node_modules/zod/v4/locales/ja.cjs +3 -0
  405. package/node_modules/zod/v4/locales/ja.js +3 -0
  406. package/node_modules/zod/v4/locales/ka.cjs +3 -0
  407. package/node_modules/zod/v4/locales/ka.js +3 -0
  408. package/node_modules/zod/v4/locales/km.cjs +3 -0
  409. package/node_modules/zod/v4/locales/km.js +3 -0
  410. package/node_modules/zod/v4/locales/kn.cjs +141 -0
  411. package/node_modules/zod/v4/locales/kn.d.cts +5 -0
  412. package/node_modules/zod/v4/locales/kn.d.ts +4 -0
  413. package/node_modules/zod/v4/locales/kn.js +114 -0
  414. package/node_modules/zod/v4/locales/ko.cjs +3 -0
  415. package/node_modules/zod/v4/locales/ko.js +3 -0
  416. package/node_modules/zod/v4/locales/lt.cjs +2 -0
  417. package/node_modules/zod/v4/locales/lt.js +2 -0
  418. package/node_modules/zod/v4/locales/mk.cjs +3 -0
  419. package/node_modules/zod/v4/locales/mk.js +3 -0
  420. package/node_modules/zod/v4/locales/ms.cjs +3 -0
  421. package/node_modules/zod/v4/locales/ms.js +3 -0
  422. package/node_modules/zod/v4/locales/ne.cjs +136 -0
  423. package/node_modules/zod/v4/locales/ne.d.cts +5 -0
  424. package/node_modules/zod/v4/locales/ne.d.ts +4 -0
  425. package/node_modules/zod/v4/locales/ne.js +109 -0
  426. package/node_modules/zod/v4/locales/nl.cjs +3 -0
  427. package/node_modules/zod/v4/locales/nl.js +3 -0
  428. package/node_modules/zod/v4/locales/nn.cjs +138 -0
  429. package/node_modules/zod/v4/locales/nn.d.cts +5 -0
  430. package/node_modules/zod/v4/locales/nn.d.ts +4 -0
  431. package/node_modules/zod/v4/locales/nn.js +111 -0
  432. package/node_modules/zod/v4/locales/no.cjs +5 -2
  433. package/node_modules/zod/v4/locales/no.js +5 -2
  434. package/node_modules/zod/v4/locales/ota.cjs +3 -0
  435. package/node_modules/zod/v4/locales/ota.js +3 -0
  436. package/node_modules/zod/v4/locales/pl.cjs +3 -0
  437. package/node_modules/zod/v4/locales/pl.js +3 -0
  438. package/node_modules/zod/v4/locales/ps.cjs +3 -0
  439. package/node_modules/zod/v4/locales/ps.js +3 -0
  440. package/node_modules/zod/v4/locales/pt-BR.cjs +168 -0
  441. package/node_modules/zod/v4/locales/pt-BR.d.cts +5 -0
  442. package/node_modules/zod/v4/locales/pt-BR.d.ts +4 -0
  443. package/node_modules/zod/v4/locales/pt-BR.js +141 -0
  444. package/node_modules/zod/v4/locales/pt.cjs +87 -55
  445. package/node_modules/zod/v4/locales/pt.js +87 -55
  446. package/node_modules/zod/v4/locales/ro.cjs +1 -0
  447. package/node_modules/zod/v4/locales/ro.js +1 -0
  448. package/node_modules/zod/v4/locales/ru.cjs +10 -0
  449. package/node_modules/zod/v4/locales/ru.js +10 -0
  450. package/node_modules/zod/v4/locales/sk.cjs +141 -0
  451. package/node_modules/zod/v4/locales/sk.d.cts +5 -0
  452. package/node_modules/zod/v4/locales/sk.d.ts +4 -0
  453. package/node_modules/zod/v4/locales/sk.js +114 -0
  454. package/node_modules/zod/v4/locales/sl.cjs +3 -0
  455. package/node_modules/zod/v4/locales/sl.js +3 -0
  456. package/node_modules/zod/v4/locales/sv.cjs +5 -2
  457. package/node_modules/zod/v4/locales/sv.js +5 -2
  458. package/node_modules/zod/v4/locales/ta.cjs +3 -0
  459. package/node_modules/zod/v4/locales/ta.js +3 -0
  460. package/node_modules/zod/v4/locales/th.cjs +3 -0
  461. package/node_modules/zod/v4/locales/th.js +3 -0
  462. package/node_modules/zod/v4/locales/tk.cjs +132 -0
  463. package/node_modules/zod/v4/locales/tk.d.cts +5 -0
  464. package/node_modules/zod/v4/locales/tk.d.ts +4 -0
  465. package/node_modules/zod/v4/locales/tk.js +105 -0
  466. package/node_modules/zod/v4/locales/tr.cjs +3 -0
  467. package/node_modules/zod/v4/locales/tr.js +3 -0
  468. package/node_modules/zod/v4/locales/uk.cjs +3 -0
  469. package/node_modules/zod/v4/locales/uk.js +3 -0
  470. package/node_modules/zod/v4/locales/ur.cjs +3 -0
  471. package/node_modules/zod/v4/locales/ur.js +3 -0
  472. package/node_modules/zod/v4/locales/uz.cjs +1 -0
  473. package/node_modules/zod/v4/locales/uz.js +1 -0
  474. package/node_modules/zod/v4/locales/vi.cjs +3 -0
  475. package/node_modules/zod/v4/locales/vi.js +3 -0
  476. package/node_modules/zod/v4/locales/yo.cjs +3 -0
  477. package/node_modules/zod/v4/locales/yo.js +3 -0
  478. package/node_modules/zod/v4/locales/zh-CN.cjs +3 -0
  479. package/node_modules/zod/v4/locales/zh-CN.js +3 -0
  480. package/node_modules/zod/v4/locales/zh-TW.cjs +3 -0
  481. package/node_modules/zod/v4/locales/zh-TW.js +3 -0
  482. package/node_modules/zod/v4/mini/checks.cjs +2 -1
  483. package/node_modules/zod/v4/mini/checks.d.cts +1 -1
  484. package/node_modules/zod/v4/mini/checks.d.ts +1 -1
  485. package/node_modules/zod/v4/mini/checks.js +1 -1
  486. package/node_modules/zod/v4/mini/deep-partial.cjs +39 -0
  487. package/node_modules/zod/v4/mini/deep-partial.d.cts +14 -0
  488. package/node_modules/zod/v4/mini/deep-partial.d.ts +14 -0
  489. package/node_modules/zod/v4/mini/deep-partial.js +13 -0
  490. package/node_modules/zod/v4/mini/external.cjs +12 -1
  491. package/node_modules/zod/v4/mini/external.d.cts +5 -2
  492. package/node_modules/zod/v4/mini/external.d.ts +5 -2
  493. package/node_modules/zod/v4/mini/external.js +3 -1
  494. package/node_modules/zod/v4/mini/in-out.cjs +63 -0
  495. package/node_modules/zod/v4/mini/in-out.d.cts +8 -0
  496. package/node_modules/zod/v4/mini/in-out.d.ts +8 -0
  497. package/node_modules/zod/v4/mini/in-out.js +36 -0
  498. package/node_modules/zod/v4/mini/parse.cjs +3 -1
  499. package/node_modules/zod/v4/mini/parse.d.cts +1 -1
  500. package/node_modules/zod/v4/mini/parse.d.ts +1 -1
  501. package/node_modules/zod/v4/mini/parse.js +1 -1
  502. package/node_modules/zod/v4/mini/schemas.cjs +75 -47
  503. package/node_modules/zod/v4/mini/schemas.d.cts +43 -13
  504. package/node_modules/zod/v4/mini/schemas.d.ts +43 -13
  505. package/node_modules/zod/v4/mini/schemas.js +71 -45
  506. package/openclaw.plugin.json +16 -29
  507. package/package.json +8 -8
  508. package/node_modules/ws/LICENSE +0 -20
  509. package/node_modules/ws/README.md +0 -548
  510. package/node_modules/ws/browser.js +0 -8
  511. package/node_modules/ws/index.js +0 -22
  512. package/node_modules/ws/lib/buffer-util.js +0 -131
  513. package/node_modules/ws/lib/constants.js +0 -19
  514. package/node_modules/ws/lib/event-target.js +0 -292
  515. package/node_modules/ws/lib/extension.js +0 -203
  516. package/node_modules/ws/lib/limiter.js +0 -55
  517. package/node_modules/ws/lib/permessage-deflate.js +0 -530
  518. package/node_modules/ws/lib/receiver.js +0 -743
  519. package/node_modules/ws/lib/sender.js +0 -607
  520. package/node_modules/ws/lib/stream.js +0 -161
  521. package/node_modules/ws/lib/subprotocol.js +0 -62
  522. package/node_modules/ws/lib/validation.js +0 -152
  523. package/node_modules/ws/lib/websocket-server.js +0 -562
  524. package/node_modules/ws/lib/websocket.js +0 -1407
  525. package/node_modules/ws/package.json +0 -74
  526. package/node_modules/ws/wrapper.mjs +0 -21
  527. package/node_modules/zod/src/v4/core/config.ts +0 -15
  528. /package/dist/{doctor-contract-mvORF4f6.js → .setup/doctor-contract-mvORF4f6.mjs} +0 -0
  529. /package/dist/{gateway-auth-bypass-B93t91oq.js → .setup/gateway-auth-bypass-B93t91oq.mjs} +0 -0
  530. /package/dist/{ingress-identity-DNl4yQSc.js → .setup/ingress-identity-DNl4yQSc.mjs} +0 -0
  531. /package/dist/{runtime-CNB4YGqJ.js → .setup/runtime-CNB4YGqJ.mjs} +0 -0
  532. /package/dist/{secret-contract-qg3NXRlS.js → .setup/secret-contract-qg3NXRlS.mjs} +0 -0
@@ -1,19 +0,0 @@
1
- 'use strict';
2
-
3
- const BINARY_TYPES = ['nodebuffer', 'arraybuffer', 'fragments'];
4
- const hasBlob = typeof Blob !== 'undefined';
5
-
6
- if (hasBlob) BINARY_TYPES.push('blob');
7
-
8
- module.exports = {
9
- BINARY_TYPES,
10
- CLOSE_TIMEOUT: 30000,
11
- EMPTY_BUFFER: Buffer.alloc(0),
12
- GUID: '258EAFA5-E914-47DA-95CA-C5AB0DC85B11',
13
- hasBlob,
14
- kForOnEventAttribute: Symbol('kIsForOnEventAttribute'),
15
- kListener: Symbol('kListener'),
16
- kStatusCode: Symbol('status-code'),
17
- kWebSocket: Symbol('websocket'),
18
- NOOP: () => {}
19
- };
@@ -1,292 +0,0 @@
1
- 'use strict';
2
-
3
- const { kForOnEventAttribute, kListener } = require('./constants');
4
-
5
- const kCode = Symbol('kCode');
6
- const kData = Symbol('kData');
7
- const kError = Symbol('kError');
8
- const kMessage = Symbol('kMessage');
9
- const kReason = Symbol('kReason');
10
- const kTarget = Symbol('kTarget');
11
- const kType = Symbol('kType');
12
- const kWasClean = Symbol('kWasClean');
13
-
14
- /**
15
- * Class representing an event.
16
- */
17
- class Event {
18
- /**
19
- * Create a new `Event`.
20
- *
21
- * @param {String} type The name of the event
22
- * @throws {TypeError} If the `type` argument is not specified
23
- */
24
- constructor(type) {
25
- this[kTarget] = null;
26
- this[kType] = type;
27
- }
28
-
29
- /**
30
- * @type {*}
31
- */
32
- get target() {
33
- return this[kTarget];
34
- }
35
-
36
- /**
37
- * @type {String}
38
- */
39
- get type() {
40
- return this[kType];
41
- }
42
- }
43
-
44
- Object.defineProperty(Event.prototype, 'target', { enumerable: true });
45
- Object.defineProperty(Event.prototype, 'type', { enumerable: true });
46
-
47
- /**
48
- * Class representing a close event.
49
- *
50
- * @extends Event
51
- */
52
- class CloseEvent extends Event {
53
- /**
54
- * Create a new `CloseEvent`.
55
- *
56
- * @param {String} type The name of the event
57
- * @param {Object} [options] A dictionary object that allows for setting
58
- * attributes via object members of the same name
59
- * @param {Number} [options.code=0] The status code explaining why the
60
- * connection was closed
61
- * @param {String} [options.reason=''] A human-readable string explaining why
62
- * the connection was closed
63
- * @param {Boolean} [options.wasClean=false] Indicates whether or not the
64
- * connection was cleanly closed
65
- */
66
- constructor(type, options = {}) {
67
- super(type);
68
-
69
- this[kCode] = options.code === undefined ? 0 : options.code;
70
- this[kReason] = options.reason === undefined ? '' : options.reason;
71
- this[kWasClean] = options.wasClean === undefined ? false : options.wasClean;
72
- }
73
-
74
- /**
75
- * @type {Number}
76
- */
77
- get code() {
78
- return this[kCode];
79
- }
80
-
81
- /**
82
- * @type {String}
83
- */
84
- get reason() {
85
- return this[kReason];
86
- }
87
-
88
- /**
89
- * @type {Boolean}
90
- */
91
- get wasClean() {
92
- return this[kWasClean];
93
- }
94
- }
95
-
96
- Object.defineProperty(CloseEvent.prototype, 'code', { enumerable: true });
97
- Object.defineProperty(CloseEvent.prototype, 'reason', { enumerable: true });
98
- Object.defineProperty(CloseEvent.prototype, 'wasClean', { enumerable: true });
99
-
100
- /**
101
- * Class representing an error event.
102
- *
103
- * @extends Event
104
- */
105
- class ErrorEvent extends Event {
106
- /**
107
- * Create a new `ErrorEvent`.
108
- *
109
- * @param {String} type The name of the event
110
- * @param {Object} [options] A dictionary object that allows for setting
111
- * attributes via object members of the same name
112
- * @param {*} [options.error=null] The error that generated this event
113
- * @param {String} [options.message=''] The error message
114
- */
115
- constructor(type, options = {}) {
116
- super(type);
117
-
118
- this[kError] = options.error === undefined ? null : options.error;
119
- this[kMessage] = options.message === undefined ? '' : options.message;
120
- }
121
-
122
- /**
123
- * @type {*}
124
- */
125
- get error() {
126
- return this[kError];
127
- }
128
-
129
- /**
130
- * @type {String}
131
- */
132
- get message() {
133
- return this[kMessage];
134
- }
135
- }
136
-
137
- Object.defineProperty(ErrorEvent.prototype, 'error', { enumerable: true });
138
- Object.defineProperty(ErrorEvent.prototype, 'message', { enumerable: true });
139
-
140
- /**
141
- * Class representing a message event.
142
- *
143
- * @extends Event
144
- */
145
- class MessageEvent extends Event {
146
- /**
147
- * Create a new `MessageEvent`.
148
- *
149
- * @param {String} type The name of the event
150
- * @param {Object} [options] A dictionary object that allows for setting
151
- * attributes via object members of the same name
152
- * @param {*} [options.data=null] The message content
153
- */
154
- constructor(type, options = {}) {
155
- super(type);
156
-
157
- this[kData] = options.data === undefined ? null : options.data;
158
- }
159
-
160
- /**
161
- * @type {*}
162
- */
163
- get data() {
164
- return this[kData];
165
- }
166
- }
167
-
168
- Object.defineProperty(MessageEvent.prototype, 'data', { enumerable: true });
169
-
170
- /**
171
- * This provides methods for emulating the `EventTarget` interface. It's not
172
- * meant to be used directly.
173
- *
174
- * @mixin
175
- */
176
- const EventTarget = {
177
- /**
178
- * Register an event listener.
179
- *
180
- * @param {String} type A string representing the event type to listen for
181
- * @param {(Function|Object)} handler The listener to add
182
- * @param {Object} [options] An options object specifies characteristics about
183
- * the event listener
184
- * @param {Boolean} [options.once=false] A `Boolean` indicating that the
185
- * listener should be invoked at most once after being added. If `true`,
186
- * the listener would be automatically removed when invoked.
187
- * @public
188
- */
189
- addEventListener(type, handler, options = {}) {
190
- for (const listener of this.listeners(type)) {
191
- if (
192
- !options[kForOnEventAttribute] &&
193
- listener[kListener] === handler &&
194
- !listener[kForOnEventAttribute]
195
- ) {
196
- return;
197
- }
198
- }
199
-
200
- let wrapper;
201
-
202
- if (type === 'message') {
203
- wrapper = function onMessage(data, isBinary) {
204
- const event = new MessageEvent('message', {
205
- data: isBinary ? data : data.toString()
206
- });
207
-
208
- event[kTarget] = this;
209
- callListener(handler, this, event);
210
- };
211
- } else if (type === 'close') {
212
- wrapper = function onClose(code, message) {
213
- const event = new CloseEvent('close', {
214
- code,
215
- reason: message.toString(),
216
- wasClean: this._closeFrameReceived && this._closeFrameSent
217
- });
218
-
219
- event[kTarget] = this;
220
- callListener(handler, this, event);
221
- };
222
- } else if (type === 'error') {
223
- wrapper = function onError(error) {
224
- const event = new ErrorEvent('error', {
225
- error,
226
- message: error.message
227
- });
228
-
229
- event[kTarget] = this;
230
- callListener(handler, this, event);
231
- };
232
- } else if (type === 'open') {
233
- wrapper = function onOpen() {
234
- const event = new Event('open');
235
-
236
- event[kTarget] = this;
237
- callListener(handler, this, event);
238
- };
239
- } else {
240
- return;
241
- }
242
-
243
- wrapper[kForOnEventAttribute] = !!options[kForOnEventAttribute];
244
- wrapper[kListener] = handler;
245
-
246
- if (options.once) {
247
- this.once(type, wrapper);
248
- } else {
249
- this.on(type, wrapper);
250
- }
251
- },
252
-
253
- /**
254
- * Remove an event listener.
255
- *
256
- * @param {String} type A string representing the event type to remove
257
- * @param {(Function|Object)} handler The listener to remove
258
- * @public
259
- */
260
- removeEventListener(type, handler) {
261
- for (const listener of this.listeners(type)) {
262
- if (listener[kListener] === handler && !listener[kForOnEventAttribute]) {
263
- this.removeListener(type, listener);
264
- break;
265
- }
266
- }
267
- }
268
- };
269
-
270
- module.exports = {
271
- CloseEvent,
272
- ErrorEvent,
273
- Event,
274
- EventTarget,
275
- MessageEvent
276
- };
277
-
278
- /**
279
- * Call an event listener
280
- *
281
- * @param {(Function|Object)} listener The listener to call
282
- * @param {*} thisArg The value to use as `this`` when calling the listener
283
- * @param {Event} event The event to pass to the listener
284
- * @private
285
- */
286
- function callListener(listener, thisArg, event) {
287
- if (typeof listener === 'object' && listener.handleEvent) {
288
- listener.handleEvent.call(listener, event);
289
- } else {
290
- listener.call(thisArg, event);
291
- }
292
- }
@@ -1,203 +0,0 @@
1
- 'use strict';
2
-
3
- const { tokenChars } = require('./validation');
4
-
5
- /**
6
- * Adds an offer to the map of extension offers or a parameter to the map of
7
- * parameters.
8
- *
9
- * @param {Object} dest The map of extension offers or parameters
10
- * @param {String} name The extension or parameter name
11
- * @param {(Object|Boolean|String)} elem The extension parameters or the
12
- * parameter value
13
- * @private
14
- */
15
- function push(dest, name, elem) {
16
- if (dest[name] === undefined) dest[name] = [elem];
17
- else dest[name].push(elem);
18
- }
19
-
20
- /**
21
- * Parses the `Sec-WebSocket-Extensions` header into an object.
22
- *
23
- * @param {String} header The field value of the header
24
- * @return {Object} The parsed object
25
- * @public
26
- */
27
- function parse(header) {
28
- const offers = Object.create(null);
29
- let params = Object.create(null);
30
- let mustUnescape = false;
31
- let isEscaping = false;
32
- let inQuotes = false;
33
- let extensionName;
34
- let paramName;
35
- let start = -1;
36
- let code = -1;
37
- let end = -1;
38
- let i = 0;
39
-
40
- for (; i < header.length; i++) {
41
- code = header.charCodeAt(i);
42
-
43
- if (extensionName === undefined) {
44
- if (end === -1 && tokenChars[code] === 1) {
45
- if (start === -1) start = i;
46
- } else if (
47
- i !== 0 &&
48
- (code === 0x20 /* ' ' */ || code === 0x09) /* '\t' */
49
- ) {
50
- if (end === -1 && start !== -1) end = i;
51
- } else if (code === 0x3b /* ';' */ || code === 0x2c /* ',' */) {
52
- if (start === -1) {
53
- throw new SyntaxError(`Unexpected character at index ${i}`);
54
- }
55
-
56
- if (end === -1) end = i;
57
- const name = header.slice(start, end);
58
- if (code === 0x2c) {
59
- push(offers, name, params);
60
- params = Object.create(null);
61
- } else {
62
- extensionName = name;
63
- }
64
-
65
- start = end = -1;
66
- } else {
67
- throw new SyntaxError(`Unexpected character at index ${i}`);
68
- }
69
- } else if (paramName === undefined) {
70
- if (end === -1 && tokenChars[code] === 1) {
71
- if (start === -1) start = i;
72
- } else if (code === 0x20 || code === 0x09) {
73
- if (end === -1 && start !== -1) end = i;
74
- } else if (code === 0x3b || code === 0x2c) {
75
- if (start === -1) {
76
- throw new SyntaxError(`Unexpected character at index ${i}`);
77
- }
78
-
79
- if (end === -1) end = i;
80
- push(params, header.slice(start, end), true);
81
- if (code === 0x2c) {
82
- push(offers, extensionName, params);
83
- params = Object.create(null);
84
- extensionName = undefined;
85
- }
86
-
87
- start = end = -1;
88
- } else if (code === 0x3d /* '=' */ && start !== -1 && end === -1) {
89
- paramName = header.slice(start, i);
90
- start = end = -1;
91
- } else {
92
- throw new SyntaxError(`Unexpected character at index ${i}`);
93
- }
94
- } else {
95
- //
96
- // The value of a quoted-string after unescaping must conform to the
97
- // token ABNF, so only token characters are valid.
98
- // Ref: https://tools.ietf.org/html/rfc6455#section-9.1
99
- //
100
- if (isEscaping) {
101
- if (tokenChars[code] !== 1) {
102
- throw new SyntaxError(`Unexpected character at index ${i}`);
103
- }
104
- if (start === -1) start = i;
105
- else if (!mustUnescape) mustUnescape = true;
106
- isEscaping = false;
107
- } else if (inQuotes) {
108
- if (tokenChars[code] === 1) {
109
- if (start === -1) start = i;
110
- } else if (code === 0x22 /* '"' */ && start !== -1) {
111
- inQuotes = false;
112
- end = i;
113
- } else if (code === 0x5c /* '\' */) {
114
- isEscaping = true;
115
- } else {
116
- throw new SyntaxError(`Unexpected character at index ${i}`);
117
- }
118
- } else if (code === 0x22 && header.charCodeAt(i - 1) === 0x3d) {
119
- inQuotes = true;
120
- } else if (end === -1 && tokenChars[code] === 1) {
121
- if (start === -1) start = i;
122
- } else if (start !== -1 && (code === 0x20 || code === 0x09)) {
123
- if (end === -1) end = i;
124
- } else if (code === 0x3b || code === 0x2c) {
125
- if (start === -1) {
126
- throw new SyntaxError(`Unexpected character at index ${i}`);
127
- }
128
-
129
- if (end === -1) end = i;
130
- let value = header.slice(start, end);
131
- if (mustUnescape) {
132
- value = value.replace(/\\/g, '');
133
- mustUnescape = false;
134
- }
135
- push(params, paramName, value);
136
- if (code === 0x2c) {
137
- push(offers, extensionName, params);
138
- params = Object.create(null);
139
- extensionName = undefined;
140
- }
141
-
142
- paramName = undefined;
143
- start = end = -1;
144
- } else {
145
- throw new SyntaxError(`Unexpected character at index ${i}`);
146
- }
147
- }
148
- }
149
-
150
- if (start === -1 || inQuotes || code === 0x20 || code === 0x09) {
151
- throw new SyntaxError('Unexpected end of input');
152
- }
153
-
154
- if (end === -1) end = i;
155
- const token = header.slice(start, end);
156
- if (extensionName === undefined) {
157
- push(offers, token, params);
158
- } else {
159
- if (paramName === undefined) {
160
- push(params, token, true);
161
- } else if (mustUnescape) {
162
- push(params, paramName, token.replace(/\\/g, ''));
163
- } else {
164
- push(params, paramName, token);
165
- }
166
- push(offers, extensionName, params);
167
- }
168
-
169
- return offers;
170
- }
171
-
172
- /**
173
- * Builds the `Sec-WebSocket-Extensions` header field value.
174
- *
175
- * @param {Object} extensions The map of extensions and parameters to format
176
- * @return {String} A string representing the given object
177
- * @public
178
- */
179
- function format(extensions) {
180
- return Object.keys(extensions)
181
- .map((extension) => {
182
- let configurations = extensions[extension];
183
- if (!Array.isArray(configurations)) configurations = [configurations];
184
- return configurations
185
- .map((params) => {
186
- return [extension]
187
- .concat(
188
- Object.keys(params).map((k) => {
189
- let values = params[k];
190
- if (!Array.isArray(values)) values = [values];
191
- return values
192
- .map((v) => (v === true ? k : `${k}=${v}`))
193
- .join('; ');
194
- })
195
- )
196
- .join('; ');
197
- })
198
- .join(', ');
199
- })
200
- .join(', ');
201
- }
202
-
203
- module.exports = { format, parse };
@@ -1,55 +0,0 @@
1
- 'use strict';
2
-
3
- const kDone = Symbol('kDone');
4
- const kRun = Symbol('kRun');
5
-
6
- /**
7
- * A very simple job queue with adjustable concurrency. Adapted from
8
- * https://github.com/STRML/async-limiter
9
- */
10
- class Limiter {
11
- /**
12
- * Creates a new `Limiter`.
13
- *
14
- * @param {Number} [concurrency=Infinity] The maximum number of jobs allowed
15
- * to run concurrently
16
- */
17
- constructor(concurrency) {
18
- this[kDone] = () => {
19
- this.pending--;
20
- this[kRun]();
21
- };
22
- this.concurrency = concurrency || Infinity;
23
- this.jobs = [];
24
- this.pending = 0;
25
- }
26
-
27
- /**
28
- * Adds a job to the queue.
29
- *
30
- * @param {Function} job The job to run
31
- * @public
32
- */
33
- add(job) {
34
- this.jobs.push(job);
35
- this[kRun]();
36
- }
37
-
38
- /**
39
- * Removes a job from the queue and runs it if possible.
40
- *
41
- * @private
42
- */
43
- [kRun]() {
44
- if (this.pending === this.concurrency) return;
45
-
46
- if (this.jobs.length) {
47
- const job = this.jobs.shift();
48
-
49
- this.pending++;
50
- job(this[kDone]);
51
- }
52
- }
53
- }
54
-
55
- module.exports = Limiter;