alepha 0.22.0 → 0.24.0

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 (869) hide show
  1. package/assets/swagger-ui/swagger-ui-bundle.js +1 -1
  2. package/assets/swagger-ui/swagger-ui-standalone-preset.js +1 -1
  3. package/dist/api/audits/index.browser.js +49 -52
  4. package/dist/api/audits/index.browser.js.map +1 -1
  5. package/dist/api/audits/index.d.ts +629 -565
  6. package/dist/api/audits/index.d.ts.map +1 -1
  7. package/dist/api/audits/index.js +206 -98
  8. package/dist/api/audits/index.js.map +1 -1
  9. package/dist/api/files/index.browser.js +44 -44
  10. package/dist/api/files/index.browser.js.map +1 -1
  11. package/dist/api/files/index.d.ts +292 -293
  12. package/dist/api/files/index.d.ts.map +1 -1
  13. package/dist/api/files/index.js +61 -64
  14. package/dist/api/files/index.js.map +1 -1
  15. package/dist/api/jobs/index.browser.js +61 -59
  16. package/dist/api/jobs/index.browser.js.map +1 -1
  17. package/dist/api/jobs/index.d.ts +546 -347
  18. package/dist/api/jobs/index.d.ts.map +1 -1
  19. package/dist/api/jobs/index.js +165 -86
  20. package/dist/api/jobs/index.js.map +1 -1
  21. package/dist/api/keys/index.d.ts +242 -230
  22. package/dist/api/keys/index.d.ts.map +1 -1
  23. package/dist/api/keys/index.js +63 -66
  24. package/dist/api/keys/index.js.map +1 -1
  25. package/dist/api/notifications/index.browser.js +40 -38
  26. package/dist/api/notifications/index.browser.js.map +1 -1
  27. package/dist/api/notifications/index.d.ts +339 -209
  28. package/dist/api/notifications/index.d.ts.map +1 -1
  29. package/dist/api/notifications/index.js +108 -60
  30. package/dist/api/notifications/index.js.map +1 -1
  31. package/dist/api/oauth/index.d.ts +190 -78
  32. package/dist/api/oauth/index.d.ts.map +1 -1
  33. package/dist/api/oauth/index.js +290 -68
  34. package/dist/api/oauth/index.js.map +1 -1
  35. package/dist/api/organizations/index.browser.js +14 -14
  36. package/dist/api/organizations/index.browser.js.map +1 -1
  37. package/dist/api/organizations/index.d.ts +158 -134
  38. package/dist/api/organizations/index.d.ts.map +1 -1
  39. package/dist/api/organizations/index.js +18 -18
  40. package/dist/api/organizations/index.js.map +1 -1
  41. package/dist/api/parameters/index.browser.js +74 -53
  42. package/dist/api/parameters/index.browser.js.map +1 -1
  43. package/dist/api/parameters/index.d.ts +607 -513
  44. package/dist/api/parameters/index.d.ts.map +1 -1
  45. package/dist/api/parameters/index.js +205 -127
  46. package/dist/api/parameters/index.js.map +1 -1
  47. package/dist/api/payments/index.d.ts +652 -449
  48. package/dist/api/payments/index.d.ts.map +1 -1
  49. package/dist/api/payments/index.js +159 -93
  50. package/dist/api/payments/index.js.map +1 -1
  51. package/dist/api/subscriptions/index.d.ts +1032 -762
  52. package/dist/api/subscriptions/index.d.ts.map +1 -1
  53. package/dist/api/subscriptions/index.js +166 -185
  54. package/dist/api/subscriptions/index.js.map +1 -1
  55. package/dist/api/users/index.browser.js +48 -71
  56. package/dist/api/users/index.browser.js.map +1 -1
  57. package/dist/api/users/index.d.ts +1297 -1109
  58. package/dist/api/users/index.d.ts.map +1 -1
  59. package/dist/api/users/index.js +454 -369
  60. package/dist/api/users/index.js.map +1 -1
  61. package/dist/api/verifications/index.browser.js +17 -17
  62. package/dist/api/verifications/index.browser.js.map +1 -1
  63. package/dist/api/verifications/index.d.ts +169 -157
  64. package/dist/api/verifications/index.d.ts.map +1 -1
  65. package/dist/api/verifications/index.js +47 -95
  66. package/dist/api/verifications/index.js.map +1 -1
  67. package/dist/background/index.d.ts +0 -1
  68. package/dist/background/index.d.ts.map +1 -1
  69. package/dist/background/index.js.map +1 -1
  70. package/dist/background/index.workerd.js.map +1 -1
  71. package/dist/batch/index.d.ts +0 -1
  72. package/dist/batch/index.d.ts.map +1 -1
  73. package/dist/batch/index.js.map +1 -1
  74. package/dist/bin/index.js +1 -1
  75. package/dist/bin/index.js.map +1 -1
  76. package/dist/bucket/index.d.ts +27 -32
  77. package/dist/bucket/index.d.ts.map +1 -1
  78. package/dist/bucket/index.js +56 -26
  79. package/dist/bucket/index.js.map +1 -1
  80. package/dist/bucket/index.workerd.js +52 -24
  81. package/dist/bucket/index.workerd.js.map +1 -1
  82. package/dist/cache/core/index.d.ts +4 -6
  83. package/dist/cache/core/index.d.ts.map +1 -1
  84. package/dist/cache/core/index.js +4 -10
  85. package/dist/cache/core/index.js.map +1 -1
  86. package/dist/cache/core/index.workerd.js +4 -10
  87. package/dist/cache/core/index.workerd.js.map +1 -1
  88. package/dist/cache/database/index.d.ts +22 -23
  89. package/dist/cache/database/index.d.ts.map +1 -1
  90. package/dist/cache/database/index.js +11 -20
  91. package/dist/cache/database/index.js.map +1 -1
  92. package/dist/cache/redis/index.d.ts +3 -4
  93. package/dist/cache/redis/index.d.ts.map +1 -1
  94. package/dist/cache/redis/index.js +2 -2
  95. package/dist/cache/redis/index.js.map +1 -1
  96. package/dist/captcha/index.d.ts.map +1 -1
  97. package/dist/captcha/index.js +4 -4
  98. package/dist/captcha/index.js.map +1 -1
  99. package/dist/cli/config/index.d.ts +0 -1
  100. package/dist/cli/config/index.d.ts.map +1 -1
  101. package/dist/cli/core/index.d.ts +244 -475
  102. package/dist/cli/core/index.d.ts.map +1 -1
  103. package/dist/cli/core/index.js +308 -383
  104. package/dist/cli/core/index.js.map +1 -1
  105. package/dist/cli/devtools/index.d.ts +3 -9
  106. package/dist/cli/devtools/index.d.ts.map +1 -1
  107. package/dist/cli/devtools/index.js +3 -3
  108. package/dist/cli/devtools/index.js.map +1 -1
  109. package/dist/cli/i18n/index.d.ts +20 -39
  110. package/dist/cli/i18n/index.d.ts.map +1 -1
  111. package/dist/cli/i18n/index.js +51 -17
  112. package/dist/cli/i18n/index.js.map +1 -1
  113. package/dist/cli/platform/index.d.ts +89 -82
  114. package/dist/cli/platform/index.d.ts.map +1 -1
  115. package/dist/cli/platform/index.js +27 -33
  116. package/dist/cli/platform/index.js.map +1 -1
  117. package/dist/cli/platform-lib/index.d.ts +383 -410
  118. package/dist/cli/platform-lib/index.d.ts.map +1 -1
  119. package/dist/cli/platform-lib/index.js +300 -258
  120. package/dist/cli/platform-lib/index.js.map +1 -1
  121. package/dist/cli/vendor/index.d.ts +17 -41
  122. package/dist/cli/vendor/index.d.ts.map +1 -1
  123. package/dist/cli/vendor/index.js +10 -13
  124. package/dist/cli/vendor/index.js.map +1 -1
  125. package/dist/command/index.d.ts +82 -194
  126. package/dist/command/index.d.ts.map +1 -1
  127. package/dist/command/index.js +160 -563
  128. package/dist/command/index.js.map +1 -1
  129. package/dist/core/index.browser.js +845 -859
  130. package/dist/core/index.browser.js.map +1 -1
  131. package/dist/core/index.d.ts +787 -527
  132. package/dist/core/index.d.ts.map +1 -1
  133. package/dist/core/index.js +845 -859
  134. package/dist/core/index.js.map +1 -1
  135. package/dist/core/index.native.js +845 -859
  136. package/dist/core/index.native.js.map +1 -1
  137. package/dist/core/index.workerd.js +845 -859
  138. package/dist/core/index.workerd.js.map +1 -1
  139. package/dist/crypto/index.browser.js +1 -1
  140. package/dist/crypto/index.browser.js.map +1 -1
  141. package/dist/crypto/index.d.ts +3 -4
  142. package/dist/crypto/index.d.ts.map +1 -1
  143. package/dist/crypto/index.js +6 -3
  144. package/dist/crypto/index.js.map +1 -1
  145. package/dist/datetime/index.d.ts +12 -2
  146. package/dist/datetime/index.d.ts.map +1 -1
  147. package/dist/datetime/index.js +6 -1
  148. package/dist/datetime/index.js.map +1 -1
  149. package/dist/email/brevo/index.d.ts +0 -1
  150. package/dist/email/brevo/index.d.ts.map +1 -1
  151. package/dist/email/brevo/index.js +4 -4
  152. package/dist/email/brevo/index.js.map +1 -1
  153. package/dist/email/cloudflare/index.d.ts +0 -1
  154. package/dist/email/cloudflare/index.d.ts.map +1 -1
  155. package/dist/email/cloudflare/index.js +2 -2
  156. package/dist/email/cloudflare/index.js.map +1 -1
  157. package/dist/email/core/index.d.ts +15 -7
  158. package/dist/email/core/index.d.ts.map +1 -1
  159. package/dist/email/core/index.js +14 -5
  160. package/dist/email/core/index.js.map +1 -1
  161. package/dist/email/core/index.workerd.js +5 -1
  162. package/dist/email/core/index.workerd.js.map +1 -1
  163. package/dist/email/smtp/index.d.ts +8 -9
  164. package/dist/email/smtp/index.d.ts.map +1 -1
  165. package/dist/email/smtp/index.js +702 -479
  166. package/dist/email/smtp/index.js.map +1 -1
  167. package/dist/fake/index.d.ts +1580 -1238
  168. package/dist/fake/index.d.ts.map +1 -1
  169. package/dist/fake/index.js +11728 -32131
  170. package/dist/fake/index.js.map +1 -1
  171. package/dist/lock/core/index.d.ts +13 -9
  172. package/dist/lock/core/index.d.ts.map +1 -1
  173. package/dist/lock/core/index.js +5 -5
  174. package/dist/lock/core/index.js.map +1 -1
  175. package/dist/lock/redis/index.d.ts +0 -1
  176. package/dist/lock/redis/index.d.ts.map +1 -1
  177. package/dist/lock/redis/index.js.map +1 -1
  178. package/dist/logger/index.d.ts +81 -69
  179. package/dist/logger/index.d.ts.map +1 -1
  180. package/dist/logger/index.js +123 -56
  181. package/dist/logger/index.js.map +1 -1
  182. package/dist/mcp/index.d.ts +36 -90
  183. package/dist/mcp/index.d.ts.map +1 -1
  184. package/dist/mcp/index.js +65 -70
  185. package/dist/mcp/index.js.map +1 -1
  186. package/dist/orm/core/index.browser.js +54 -40
  187. package/dist/orm/core/index.browser.js.map +1 -1
  188. package/dist/orm/core/index.bun.js +140 -106
  189. package/dist/orm/core/index.bun.js.map +1 -1
  190. package/dist/orm/core/index.d.ts +145 -150
  191. package/dist/orm/core/index.d.ts.map +1 -1
  192. package/dist/orm/core/index.js +144 -109
  193. package/dist/orm/core/index.js.map +1 -1
  194. package/dist/orm/postgres/index.bun.js +64 -54
  195. package/dist/orm/postgres/index.bun.js.map +1 -1
  196. package/dist/orm/postgres/index.d.ts +36 -76
  197. package/dist/orm/postgres/index.d.ts.map +1 -1
  198. package/dist/orm/postgres/index.js +67 -57
  199. package/dist/orm/postgres/index.js.map +1 -1
  200. package/dist/queue/core/index.d.ts +62 -75
  201. package/dist/queue/core/index.d.ts.map +1 -1
  202. package/dist/queue/core/index.js +48 -71
  203. package/dist/queue/core/index.js.map +1 -1
  204. package/dist/queue/core/index.workerd.js +48 -71
  205. package/dist/queue/core/index.workerd.js.map +1 -1
  206. package/dist/queue/redis/index.d.ts +3 -4
  207. package/dist/queue/redis/index.d.ts.map +1 -1
  208. package/dist/queue/redis/index.js +2 -2
  209. package/dist/queue/redis/index.js.map +1 -1
  210. package/dist/react/auth/index.browser.js.map +1 -1
  211. package/dist/react/auth/index.d.ts +7 -4
  212. package/dist/react/auth/index.d.ts.map +1 -1
  213. package/dist/react/auth/index.js.map +1 -1
  214. package/dist/react/core/index.d.ts +87 -5
  215. package/dist/react/core/index.d.ts.map +1 -1
  216. package/dist/react/core/index.js +170 -23
  217. package/dist/react/core/index.js.map +1 -1
  218. package/dist/react/form/index.d.ts +4 -6
  219. package/dist/react/form/index.d.ts.map +1 -1
  220. package/dist/react/form/index.js +107 -71
  221. package/dist/react/form/index.js.map +1 -1
  222. package/dist/react/head/index.browser.js.map +1 -1
  223. package/dist/react/head/index.d.ts +0 -1
  224. package/dist/react/head/index.d.ts.map +1 -1
  225. package/dist/react/head/index.js.map +1 -1
  226. package/dist/react/i18n/index.d.ts +47 -5
  227. package/dist/react/i18n/index.d.ts.map +1 -1
  228. package/dist/react/i18n/index.js +116 -12
  229. package/dist/react/i18n/index.js.map +1 -1
  230. package/dist/react/intro/index.d.ts +1 -4
  231. package/dist/react/intro/index.d.ts.map +1 -1
  232. package/dist/react/intro/index.js.map +1 -1
  233. package/dist/react/router/index.browser.js +188 -29
  234. package/dist/react/router/index.browser.js.map +1 -1
  235. package/dist/react/router/index.d.ts +480 -372
  236. package/dist/react/router/index.d.ts.map +1 -1
  237. package/dist/react/router/index.js +261 -47
  238. package/dist/react/router/index.js.map +1 -1
  239. package/dist/react/sitemap/index.browser.js +35 -0
  240. package/dist/react/sitemap/index.browser.js.map +1 -0
  241. package/dist/react/sitemap/index.d.ts +91 -0
  242. package/dist/react/sitemap/index.d.ts.map +1 -0
  243. package/dist/react/sitemap/index.js +131 -0
  244. package/dist/react/sitemap/index.js.map +1 -0
  245. package/dist/react/testing/index.d.ts +4 -5
  246. package/dist/react/testing/index.d.ts.map +1 -1
  247. package/dist/react/testing/index.js +41 -15
  248. package/dist/react/testing/index.js.map +1 -1
  249. package/dist/react/testing/{chunk-BpyX8vjI.js → rolldown-runtime-Bl3dcgcQ.js} +1 -1
  250. package/dist/react/ui/index.d.ts +35 -34
  251. package/dist/react/ui/index.d.ts.map +1 -1
  252. package/dist/react/ui/index.js +12 -17
  253. package/dist/react/ui/index.js.map +1 -1
  254. package/dist/redis/index.bun.js +5 -5
  255. package/dist/redis/index.bun.js.map +1 -1
  256. package/dist/redis/index.d.ts +6 -7
  257. package/dist/redis/index.d.ts.map +1 -1
  258. package/dist/redis/index.js +6 -6
  259. package/dist/redis/index.js.map +1 -1
  260. package/dist/retry/index.d.ts +0 -1
  261. package/dist/retry/index.d.ts.map +1 -1
  262. package/dist/retry/index.js.map +1 -1
  263. package/dist/router/index.d.ts.map +1 -1
  264. package/dist/router/index.js.map +1 -1
  265. package/dist/scheduler/index.d.ts +4 -12
  266. package/dist/scheduler/index.d.ts.map +1 -1
  267. package/dist/scheduler/index.js +9 -4
  268. package/dist/scheduler/index.js.map +1 -1
  269. package/dist/scheduler/index.workerd.js +9 -4
  270. package/dist/scheduler/index.workerd.js.map +1 -1
  271. package/dist/security/index.browser.js +30 -28
  272. package/dist/security/index.browser.js.map +1 -1
  273. package/dist/security/index.d.ts +113 -44
  274. package/dist/security/index.d.ts.map +1 -1
  275. package/dist/security/index.js +452 -37
  276. package/dist/security/index.js.map +1 -1
  277. package/dist/server/auth/index.browser.js +19 -19
  278. package/dist/server/auth/index.browser.js.map +1 -1
  279. package/dist/server/auth/index.d.ts +215 -187
  280. package/dist/server/auth/index.d.ts.map +1 -1
  281. package/dist/server/auth/index.js +1145 -86
  282. package/dist/server/auth/index.js.map +1 -1
  283. package/dist/server/cookies/index.browser.js +103 -5
  284. package/dist/server/cookies/index.browser.js.map +1 -1
  285. package/dist/server/cookies/index.d.ts +86 -4
  286. package/dist/server/cookies/index.d.ts.map +1 -1
  287. package/dist/server/cookies/index.js +121 -8
  288. package/dist/server/cookies/index.js.map +1 -1
  289. package/dist/server/core/index.browser.js +22 -27
  290. package/dist/server/core/index.browser.js.map +1 -1
  291. package/dist/server/core/index.d.ts +134 -85
  292. package/dist/server/core/index.d.ts.map +1 -1
  293. package/dist/server/core/index.js +130 -118
  294. package/dist/server/core/index.js.map +1 -1
  295. package/dist/server/cors/index.d.ts +9 -10
  296. package/dist/server/cors/index.d.ts.map +1 -1
  297. package/dist/server/cors/index.js +14 -26
  298. package/dist/server/cors/index.js.map +1 -1
  299. package/dist/server/etag/index.d.ts +2 -3
  300. package/dist/server/etag/index.d.ts.map +1 -1
  301. package/dist/server/etag/index.js.map +1 -1
  302. package/dist/server/health/index.d.ts +18 -19
  303. package/dist/server/health/index.d.ts.map +1 -1
  304. package/dist/server/health/index.js +6 -6
  305. package/dist/server/health/index.js.map +1 -1
  306. package/dist/server/links/index.browser.js +15 -18
  307. package/dist/server/links/index.browser.js.map +1 -1
  308. package/dist/server/links/index.d.ts +66 -67
  309. package/dist/server/links/index.d.ts.map +1 -1
  310. package/dist/server/links/index.js +29 -32
  311. package/dist/server/links/index.js.map +1 -1
  312. package/dist/server/metrics/index.d.ts +0 -1
  313. package/dist/server/metrics/index.d.ts.map +1 -1
  314. package/dist/server/metrics/index.js +10 -3
  315. package/dist/server/metrics/index.js.map +1 -1
  316. package/dist/server/proxy/index.d.ts +0 -1
  317. package/dist/server/proxy/index.d.ts.map +1 -1
  318. package/dist/server/proxy/index.js.map +1 -1
  319. package/dist/server/rate-limit/index.d.ts +8 -9
  320. package/dist/server/rate-limit/index.d.ts.map +1 -1
  321. package/dist/server/rate-limit/index.js +6 -12
  322. package/dist/server/rate-limit/index.js.map +1 -1
  323. package/dist/server/static/index.d.ts +0 -1
  324. package/dist/server/static/index.d.ts.map +1 -1
  325. package/dist/server/static/index.js.map +1 -1
  326. package/dist/server/swagger/index.d.ts +4 -4
  327. package/dist/server/swagger/index.d.ts.map +1 -1
  328. package/dist/server/swagger/index.js +37 -25
  329. package/dist/server/swagger/index.js.map +1 -1
  330. package/dist/sms/index.d.ts +0 -1
  331. package/dist/sms/index.d.ts.map +1 -1
  332. package/dist/sms/index.js.map +1 -1
  333. package/dist/system/index.browser.js.map +1 -1
  334. package/dist/system/index.d.ts +0 -1
  335. package/dist/system/index.d.ts.map +1 -1
  336. package/dist/system/index.js +2 -1
  337. package/dist/system/index.js.map +1 -1
  338. package/dist/system/index.workerd.js.map +1 -1
  339. package/dist/topic/core/index.d.ts +19 -20
  340. package/dist/topic/core/index.d.ts.map +1 -1
  341. package/dist/topic/core/index.js +8 -8
  342. package/dist/topic/core/index.js.map +1 -1
  343. package/dist/topic/redis/index.d.ts +3 -4
  344. package/dist/topic/redis/index.d.ts.map +1 -1
  345. package/dist/topic/redis/index.js +2 -2
  346. package/dist/topic/redis/index.js.map +1 -1
  347. package/package.json +36 -36
  348. package/src/api/audits/__tests__/AuditJobs.spec.ts +83 -0
  349. package/src/api/audits/__tests__/AuditService.spec.ts +139 -1
  350. package/src/api/audits/controllers/AdminAuditController.ts +41 -41
  351. package/src/api/audits/entities/audits.ts +22 -22
  352. package/src/api/audits/index.ts +6 -1
  353. package/src/api/audits/jobs/AuditJobs.ts +29 -0
  354. package/src/api/audits/parameters/AuditParameters.ts +51 -0
  355. package/src/api/audits/primitives/$audit.ts +24 -0
  356. package/src/api/audits/schemas/auditQuerySchema.ts +13 -13
  357. package/src/api/audits/schemas/createAuditSchema.ts +18 -18
  358. package/src/api/audits/services/AuditService.ts +79 -7
  359. package/src/api/files/__tests__/FileController.spec.ts +5 -5
  360. package/src/api/files/__tests__/FileJobs.spec.ts +6 -0
  361. package/src/api/files/controllers/FileController.ts +25 -25
  362. package/src/api/files/entities/files.ts +15 -15
  363. package/src/api/files/schemas/fileCreatorSummarySchema.ts +7 -7
  364. package/src/api/files/schemas/fileQuerySchema.ts +9 -9
  365. package/src/api/files/schemas/fileResourceSchema.ts +7 -9
  366. package/src/api/files/schemas/storageStatsSchema.ts +13 -13
  367. package/src/api/jobs/__tests__/$job-hardening.spec.ts +289 -0
  368. package/src/api/jobs/__tests__/$job.spec.ts +18 -18
  369. package/src/api/jobs/controllers/AdminJobController.ts +8 -8
  370. package/src/api/jobs/entities/jobExecutionEntity.ts +29 -19
  371. package/src/api/jobs/providers/JobProvider.ts +128 -12
  372. package/src/api/jobs/providers/JobQueueProvider.ts +2 -2
  373. package/src/api/jobs/schemas/jobConfigAtom.ts +22 -22
  374. package/src/api/jobs/schemas/jobExecutionQuerySchema.ts +6 -6
  375. package/src/api/jobs/schemas/jobExecutionResourceSchema.ts +11 -15
  376. package/src/api/jobs/schemas/jobRegistrationSchema.ts +20 -19
  377. package/src/api/jobs/schemas/triggerJobSchema.ts +3 -3
  378. package/src/api/jobs/services/JobService.ts +6 -6
  379. package/src/api/keys/__tests__/ApiKeyService.spec.ts +2 -2
  380. package/src/api/keys/controllers/AdminApiKeyController.ts +10 -10
  381. package/src/api/keys/entities/apiKeyEntity.ts +15 -15
  382. package/src/api/keys/schemas/adminApiKeyQuerySchema.ts +4 -4
  383. package/src/api/keys/schemas/adminApiKeyResourceSchema.ts +15 -15
  384. package/src/api/keys/schemas/createApiKeyBodySchema.ts +5 -5
  385. package/src/api/keys/schemas/createApiKeyResponseSchema.ts +9 -9
  386. package/src/api/keys/schemas/listApiKeyResponseSchema.ts +13 -13
  387. package/src/api/keys/schemas/revokeApiKeyParamsSchema.ts +3 -3
  388. package/src/api/keys/schemas/revokeApiKeyResponseSchema.ts +3 -3
  389. package/src/api/notifications/__tests__/AlephaApiNotifications.spec.ts +2 -2
  390. package/src/api/notifications/controllers/AdminNotificationController.ts +38 -14
  391. package/src/api/notifications/jobs/NotificationJobs.ts +7 -6
  392. package/src/api/notifications/primitives/$notification.ts +43 -4
  393. package/src/api/notifications/schemas/notificationContactPreferencesSchema.ts +4 -4
  394. package/src/api/notifications/schemas/notificationContactSchema.ts +7 -7
  395. package/src/api/notifications/schemas/notificationDetailResourceSchema.ts +9 -11
  396. package/src/api/notifications/schemas/notificationPayloadSchema.ts +11 -9
  397. package/src/api/notifications/schemas/notificationQuerySchema.ts +6 -6
  398. package/src/api/notifications/schemas/notificationResourceSchema.ts +14 -14
  399. package/src/api/notifications/services/NotificationSenderService.ts +38 -2
  400. package/src/api/oauth/__tests__/OAuthClientService.spec.ts +42 -0
  401. package/src/api/oauth/__tests__/OAuthController.spec.ts +128 -0
  402. package/src/api/oauth/controllers/OAuthController.ts +132 -12
  403. package/src/api/oauth/entities/oauthClientEntity.ts +29 -12
  404. package/src/api/oauth/helpers/oauthMetadata.ts +1 -0
  405. package/src/api/oauth/helpers/oidcMetadata.ts +19 -0
  406. package/src/api/oauth/index.ts +1 -0
  407. package/src/api/oauth/schemas/authorizeDecisionBodySchema.ts +12 -11
  408. package/src/api/oauth/schemas/authorizeQuerySchema.ts +12 -10
  409. package/src/api/oauth/schemas/registerClientBodySchema.ts +10 -11
  410. package/src/api/oauth/schemas/tokenRequestBodySchema.ts +9 -8
  411. package/src/api/oauth/services/OAuthClientService.ts +228 -15
  412. package/src/api/organizations/controllers/AdminOrganizationController.ts +8 -8
  413. package/src/api/organizations/entities/organizations.ts +6 -6
  414. package/src/api/organizations/schemas/createOrganizationSchema.ts +5 -5
  415. package/src/api/organizations/schemas/organizationQuerySchema.ts +4 -4
  416. package/src/api/organizations/schemas/updateOrganizationSchema.ts +1 -2
  417. package/src/api/parameters/__tests__/$parameter.spec.ts +229 -50
  418. package/src/api/parameters/controllers/AdminParameterController.ts +9 -12
  419. package/src/api/parameters/entities/parameters.ts +29 -16
  420. package/src/api/parameters/primitives/$parameter.ts +3 -3
  421. package/src/api/parameters/schemas/activateParameterBodySchema.ts +4 -4
  422. package/src/api/parameters/schemas/createParameterVersionBodySchema.ts +15 -15
  423. package/src/api/parameters/schemas/parameterCreatorSummarySchema.ts +7 -7
  424. package/src/api/parameters/schemas/parameterCurrentResponseSchema.ts +7 -7
  425. package/src/api/parameters/schemas/parameterHistoryResponseSchema.ts +3 -3
  426. package/src/api/parameters/schemas/parameterNameParamSchema.ts +2 -3
  427. package/src/api/parameters/schemas/parameterNamesResponseSchema.ts +3 -3
  428. package/src/api/parameters/schemas/parameterResponseSchema.ts +3 -3
  429. package/src/api/parameters/schemas/parameterStatusSchema.ts +2 -2
  430. package/src/api/parameters/schemas/parameterTreeNodeSchema.ts +6 -6
  431. package/src/api/parameters/schemas/parameterVersionParamSchema.ts +5 -6
  432. package/src/api/parameters/schemas/parameterVersionResponseSchema.ts +3 -3
  433. package/src/api/parameters/schemas/rollbackParameterBodySchema.ts +6 -9
  434. package/src/api/parameters/services/ParameterProvider.ts +152 -65
  435. package/src/api/payments/controllers/AdminPaymentController.ts +7 -7
  436. package/src/api/payments/controllers/MockCheckoutController.ts +79 -28
  437. package/src/api/payments/controllers/PaymentController.ts +4 -4
  438. package/src/api/payments/entities/paymentIntents.ts +11 -11
  439. package/src/api/payments/entities/paymentMethods.ts +11 -11
  440. package/src/api/payments/entities/refunds.ts +9 -9
  441. package/src/api/payments/providers/PaymentProvider.ts +18 -0
  442. package/src/api/payments/schemas/intentSchemas.ts +25 -25
  443. package/src/api/payments/schemas/paymentMethodSchemas.ts +3 -3
  444. package/src/api/payments/services/PaymentService.ts +60 -3
  445. package/src/api/subscriptions/__tests__/SubscriptionService.spec.ts +14 -0
  446. package/src/api/subscriptions/controllers/AdminSubscriptionController.ts +11 -11
  447. package/src/api/subscriptions/controllers/SubscriptionController.ts +5 -4
  448. package/src/api/subscriptions/entities/subscriptionEvents.ts +15 -15
  449. package/src/api/subscriptions/entities/subscriptions.ts +22 -22
  450. package/src/api/subscriptions/notifications/SubscriptionNotifications.ts +22 -22
  451. package/src/api/subscriptions/schemas/cancelSubscriptionSchema.ts +4 -4
  452. package/src/api/subscriptions/schemas/changePlanSchema.ts +5 -5
  453. package/src/api/subscriptions/schemas/createSubscriptionSchema.ts +14 -7
  454. package/src/api/subscriptions/schemas/entitlementsSchema.ts +10 -10
  455. package/src/api/subscriptions/schemas/mrrSchema.ts +9 -9
  456. package/src/api/subscriptions/schemas/planDefinitionSchema.ts +21 -21
  457. package/src/api/subscriptions/schemas/planResourceSchema.ts +19 -19
  458. package/src/api/subscriptions/schemas/subscriptionQuerySchema.ts +8 -8
  459. package/src/api/subscriptions/schemas/subscriptionSettingsSchema.ts +7 -7
  460. package/src/api/subscriptions/schemas/subscriptionStatsSchema.ts +17 -17
  461. package/src/api/subscriptions/services/SubscriptionConfig.ts +2 -2
  462. package/src/api/users/__tests__/ApiKeys-integration.spec.ts +11 -11
  463. package/src/api/users/atoms/realmAuthSettingsAtom.ts +111 -119
  464. package/src/api/users/controllers/AdminIdentityController.ts +29 -19
  465. package/src/api/users/controllers/AdminSessionController.ts +37 -27
  466. package/src/api/users/controllers/AdminUserController.ts +75 -53
  467. package/src/api/users/controllers/MySessionController.ts +125 -0
  468. package/src/api/users/controllers/RealmController.ts +9 -9
  469. package/src/api/users/controllers/UserController.ts +55 -55
  470. package/src/api/users/entities/identities.ts +8 -8
  471. package/src/api/users/entities/sessions.ts +17 -17
  472. package/src/api/users/entities/users.ts +17 -17
  473. package/src/api/users/index.ts +3 -0
  474. package/src/api/users/notifications/UserNotifications.ts +76 -24
  475. package/src/api/users/primitives/$realm.ts +12 -0
  476. package/src/api/users/schemas/completePasswordResetRequestSchema.ts +8 -12
  477. package/src/api/users/schemas/completeRegistrationRequestSchema.ts +17 -20
  478. package/src/api/users/schemas/createUserSchema.ts +2 -2
  479. package/src/api/users/schemas/identityQuerySchema.ts +4 -4
  480. package/src/api/users/schemas/identityResourceSchema.ts +3 -2
  481. package/src/api/users/schemas/loginSchema.ts +4 -4
  482. package/src/api/users/schemas/passwordResetIntentResponseSchema.ts +6 -8
  483. package/src/api/users/schemas/realmConfigSchema.ts +10 -10
  484. package/src/api/users/schemas/registerQuerySchema.ts +6 -6
  485. package/src/api/users/schemas/registerRequestSchema.ts +21 -43
  486. package/src/api/users/schemas/registerResponseSchema.ts +2 -2
  487. package/src/api/users/schemas/registerSchema.ts +13 -31
  488. package/src/api/users/schemas/registrationIntentResponseSchema.ts +19 -23
  489. package/src/api/users/schemas/resetPasswordSchema.ts +10 -17
  490. package/src/api/users/schemas/sessionQuerySchema.ts +3 -3
  491. package/src/api/users/schemas/sessionResourceSchema.ts +25 -25
  492. package/src/api/users/schemas/updateUserSchema.ts +3 -4
  493. package/src/api/users/schemas/userQuerySchema.ts +7 -7
  494. package/src/api/users/services/RegistrationService.ts +25 -11
  495. package/src/api/users/services/UserService.ts +12 -6
  496. package/src/api/verifications/__tests__/CodeVerification.spec.ts +63 -101
  497. package/src/api/verifications/__tests__/LinkVerification.spec.ts +23 -92
  498. package/src/api/verifications/controllers/VerificationController.ts +13 -27
  499. package/src/api/verifications/entities/verifications.ts +13 -14
  500. package/src/api/verifications/schemas/requestVerificationCodeResponseSchema.ts +17 -14
  501. package/src/api/verifications/schemas/validateVerificationCodeResponseSchema.ts +9 -10
  502. package/src/api/verifications/schemas/verificationSettingsSchema.ts +65 -66
  503. package/src/api/verifications/schemas/verificationTypeEnumSchema.ts +2 -2
  504. package/src/api/verifications/services/VerificationService.ts +12 -0
  505. package/src/background/__tests__/BackgroundTaskProvider.spec.ts +36 -0
  506. package/src/batch/__tests__/$batch.spec.ts +22 -22
  507. package/src/batch/__tests__/startup-buffering.spec.ts +9 -9
  508. package/src/bin/index.ts +1 -1
  509. package/src/bucket/__tests__/TenantScopedBucket.spec.ts +60 -0
  510. package/src/bucket/providers/LocalFileStorageProvider.ts +14 -6
  511. package/src/bucket/providers/MemoryFileStorageProvider.ts +18 -7
  512. package/src/bucket/providers/R2FileStorageProvider.ts +14 -6
  513. package/src/bucket/providers/S3FileStorageProvider.ts +31 -15
  514. package/src/cache/core/primitives/$cache.ts +7 -10
  515. package/src/cache/database/entities/cacheEntries.ts +16 -27
  516. package/src/cache/database/providers/DatabaseCacheProvider.ts +15 -13
  517. package/src/cache/redis/providers/RedisCacheProvider.ts +6 -6
  518. package/src/captcha/providers/TurnstileCaptchaProvider.ts +4 -4
  519. package/src/cli/core/__tests__/BuildCloudflareTask.spec.ts +178 -0
  520. package/src/cli/core/__tests__/BuildDockerTask.spec.ts +0 -2
  521. package/src/cli/core/__tests__/DbCommand.spec.ts +108 -0
  522. package/src/cli/core/atoms/appEntryOptions.ts +5 -5
  523. package/src/cli/core/atoms/buildOptions.ts +76 -88
  524. package/src/cli/core/atoms/changelogOptions.ts +3 -3
  525. package/src/cli/core/atoms/devOptions.ts +3 -3
  526. package/src/cli/core/commands/build.ts +36 -49
  527. package/src/cli/core/commands/db.ts +171 -83
  528. package/src/cli/core/commands/dev.ts +8 -8
  529. package/src/cli/core/commands/gen/changelog.ts +12 -14
  530. package/src/cli/core/commands/gen/env.ts +6 -6
  531. package/src/cli/core/commands/gen/openapi.ts +6 -6
  532. package/src/cli/core/commands/init.ts +28 -33
  533. package/src/cli/core/commands/pack.ts +10 -10
  534. package/src/cli/core/commands/root.ts +7 -8
  535. package/src/cli/core/commands/test.ts +17 -20
  536. package/src/cli/core/index.ts +0 -3
  537. package/src/cli/core/tasks/BuildCloudflareTask.ts +138 -245
  538. package/src/cli/core/tasks/BuildPrerenderTask.ts +44 -7
  539. package/src/cli/core/templates/apiHelloResponseSchemaTs.ts +4 -4
  540. package/src/cli/devtools/atoms/devtoolsOptions.ts +6 -6
  541. package/src/cli/i18n/__tests__/I18nCheckService.spec.ts +48 -0
  542. package/src/cli/i18n/atoms/i18nOptions.ts +8 -8
  543. package/src/cli/i18n/services/I18nCheckService.ts +65 -11
  544. package/src/cli/platform/commands/SecretsCommand.ts +24 -25
  545. package/src/cli/platform/commands/platform.ts +40 -46
  546. package/src/cli/platform/index.ts +1 -1
  547. package/src/cli/platform-lib/__tests__/CloudflareAdapter.spec.ts +0 -4
  548. package/src/cli/platform-lib/__tests__/PlatformInspector.spec.ts +10 -3
  549. package/src/cli/platform-lib/__tests__/VercelAdapter.spec.ts +0 -2
  550. package/src/cli/platform-lib/adapters/CloudflareAdapter.ts +141 -50
  551. package/src/cli/platform-lib/adapters/VercelAdapter.ts +6 -11
  552. package/src/cli/platform-lib/atoms/platformOptions.ts +46 -25
  553. package/src/cli/platform-lib/schemas/cloudflare.ts +87 -87
  554. package/src/cli/platform-lib/schemas/platform.ts +51 -51
  555. package/src/cli/platform-lib/schemas/vercel.ts +28 -28
  556. package/src/cli/platform-lib/services/CloudflareApi.ts +5 -5
  557. package/src/cli/platform-lib/services/VercelApi.ts +4 -4
  558. package/src/cli/platform-lib/services/VercelCli.ts +6 -15
  559. package/src/cli/platform-lib/services/WranglerApi.ts +6 -15
  560. package/src/cli/vendor/atoms/vendorOptions.ts +9 -9
  561. package/src/cli/vendor/commands/VendorCommand.ts +11 -12
  562. package/src/command/__tests__/$command.spec.ts +82 -83
  563. package/src/command/__tests__/Asker.spec.ts +6 -13
  564. package/src/command/__tests__/CliProvider.spec.ts +136 -149
  565. package/src/command/__tests__/Runner.spec.ts +86 -110
  566. package/src/command/helpers/Asker.ts +23 -58
  567. package/src/command/helpers/Runner.ts +34 -110
  568. package/src/command/index.ts +4 -9
  569. package/src/command/primitives/$command.ts +10 -10
  570. package/src/command/providers/CliProvider.ts +183 -161
  571. package/src/core/Alepha.ts +62 -13
  572. package/src/core/__tests__/$atom.spec.ts +52 -3
  573. package/src/core/__tests__/$computed.spec.ts +129 -0
  574. package/src/core/__tests__/$env.spec.ts +13 -13
  575. package/src/core/__tests__/$inject.spec.ts +4 -4
  576. package/src/core/__tests__/$module.spec.ts +1 -1
  577. package/src/core/__tests__/Alepha-graph.spec.ts +1 -1
  578. package/src/core/__tests__/Alepha-parseEnv.spec.ts +32 -32
  579. package/src/core/__tests__/Alepha-start.spec.ts +3 -3
  580. package/src/core/__tests__/CodecManager.spec.ts +113 -94
  581. package/src/core/__tests__/KeylessJsonSchemaCodec.spec.ts +138 -138
  582. package/src/core/__tests__/SchemaValidator.spec.ts +43 -44
  583. package/src/core/__tests__/StateManager.persist.browser.spec.ts +87 -0
  584. package/src/core/__tests__/StateManager.spec.ts +423 -0
  585. package/src/core/__tests__/TypeBox-usecases.spec.ts +8 -8
  586. package/src/core/__tests__/TypeProvider.spec.ts +314 -309
  587. package/src/core/__tests__/dump.spec.ts +6 -6
  588. package/src/core/__tests__/pagination.spec.ts +4 -4
  589. package/src/core/__tests__/scoped-after-start.spec.ts +43 -0
  590. package/src/core/errors/TypeBoxError.ts +10 -4
  591. package/src/core/helpers/FileLike.ts +5 -5
  592. package/src/core/helpers/coerceStrings.ts +70 -0
  593. package/src/core/helpers/jsonSchemaToZod.ts +112 -0
  594. package/src/core/index.shared.ts +4 -1
  595. package/src/core/primitives/$atom.ts +95 -27
  596. package/src/core/primitives/$computed.ts +148 -0
  597. package/src/core/primitives/$env.ts +5 -5
  598. package/src/core/primitives/$state.ts +1 -1
  599. package/src/core/providers/AlsProvider.ts +26 -0
  600. package/src/core/providers/CodecManager.ts +1 -2
  601. package/src/core/providers/JsonSchemaCodec.ts +1 -2
  602. package/src/core/providers/KeylessJsonSchemaCodec.ts +82 -57
  603. package/src/core/providers/SchemaValidator.ts +48 -158
  604. package/src/core/providers/StateManager.ts +383 -9
  605. package/src/core/providers/TypeProvider.ts +80 -734
  606. package/src/core/providers/ZodProvider.ts +380 -0
  607. package/src/core/providers/zodAugment.ts +69 -0
  608. package/src/core/schemas/pageQuerySchema.ts +19 -21
  609. package/src/core/schemas/pageSchema.ts +47 -57
  610. package/src/crypto/__tests__/SecretProvider.spec.ts +31 -0
  611. package/src/crypto/providers/SecretProvider.ts +16 -10
  612. package/src/datetime/primitives/$throttle.ts +6 -1
  613. package/src/email/brevo/providers/BrevoEmailProvider.ts +4 -4
  614. package/src/email/cloudflare/providers/CloudflareEmailProvider.ts +6 -6
  615. package/src/email/core/index.ts +7 -2
  616. package/src/email/core/primitives/$email.ts +5 -1
  617. package/src/email/core/providers/LocalEmailProvider.ts +5 -5
  618. package/src/email/smtp/providers/NodemailerEmailProvider.ts +41 -52
  619. package/src/fake/__tests__/FakeProvider.spec.ts +110 -110
  620. package/src/fake/__tests__/keyName.example.ts +21 -21
  621. package/src/fake/__tests__/keyName.spec.ts +41 -41
  622. package/src/fake/__tests__/module.example.ts +8 -8
  623. package/src/fake/providers/FakeProvider.ts +122 -121
  624. package/src/lock/core/__tests__/lock-mutual-exclusion.spec.ts +44 -0
  625. package/src/lock/core/index.ts +1 -0
  626. package/src/lock/core/primitives/$lock.ts +13 -6
  627. package/src/logger/__tests__/CliFormatterProvider.spec.ts +76 -0
  628. package/src/logger/__tests__/Logger.spec.ts +49 -0
  629. package/src/logger/index.ts +25 -18
  630. package/src/logger/providers/CliFormatterProvider.ts +75 -0
  631. package/src/logger/schemas/logEntrySchema.ts +10 -10
  632. package/src/logger/services/Logger.ts +18 -0
  633. package/src/mcp/__tests__/$prompt.spec.ts +21 -23
  634. package/src/mcp/__tests__/$tool.spec.ts +22 -22
  635. package/src/mcp/__tests__/McpServerProvider.spec.ts +82 -11
  636. package/src/mcp/__tests__/StreamableHttpMcpTransport.spec.ts +2 -2
  637. package/src/mcp/__tests__/integration.spec.ts +33 -33
  638. package/src/mcp/primitives/$prompt.ts +11 -9
  639. package/src/mcp/primitives/$tool.ts +27 -86
  640. package/src/mcp/providers/McpServerProvider.ts +55 -0
  641. package/src/mcp/transports/StreamableHttpMcpTransport.ts +7 -7
  642. package/src/orm/__tests__/$repository-tests.ts +133 -27
  643. package/src/orm/__tests__/$repository.spec.ts +23 -0
  644. package/src/orm/__tests__/$transactional-tests.ts +4 -4
  645. package/src/orm/__tests__/ModelBuilder-tests.ts +28 -28
  646. package/src/orm/__tests__/ModelBuilder.spec.ts +124 -106
  647. package/src/orm/__tests__/QueryManager.spec.ts +5 -5
  648. package/src/orm/__tests__/delete-returning-tests.ts +11 -11
  649. package/src/orm/__tests__/deletedAt-tests.ts +3 -3
  650. package/src/orm/__tests__/enums.spec.ts +29 -25
  651. package/src/orm/__tests__/execute-tests.ts +8 -8
  652. package/src/orm/__tests__/fixtures/bigEntitySchema.ts +48 -48
  653. package/src/orm/__tests__/fixtures/userEntitySchema.ts +6 -6
  654. package/src/orm/__tests__/joins-tests.ts +30 -30
  655. package/src/orm/__tests__/organization-tests.ts +105 -3
  656. package/src/orm/__tests__/organization.spec.ts +46 -0
  657. package/src/orm/__tests__/orm-errors.spec.ts +10 -10
  658. package/src/orm/__tests__/orm-next-tests.ts +29 -29
  659. package/src/orm/__tests__/orm-showcase-tests.ts +9 -9
  660. package/src/orm/__tests__/primaryKey.spec.ts +4 -4
  661. package/src/orm/__tests__/query-date-encoding-tests.ts +17 -17
  662. package/src/orm/__tests__/ref-auto-onDelete.spec.ts +14 -14
  663. package/src/orm/__tests__/references.spec.ts +7 -7
  664. package/src/orm/__tests__/security.spec.ts +17 -17
  665. package/src/orm/__tests__/string-operators-tests.ts +5 -5
  666. package/src/orm/__tests__/timestamps-tests.ts +14 -14
  667. package/src/orm/__tests__/validation-tests.ts +5 -5
  668. package/src/orm/core/__tests__/BunSqliteProvider.bun.spec.ts +8 -8
  669. package/src/orm/core/constants/PG_SYMBOLS.ts +13 -1
  670. package/src/orm/core/entities/alephaSequences.ts +8 -8
  671. package/src/orm/core/helpers/pgAttr.ts +4 -4
  672. package/src/orm/core/primitives/$entity.ts +10 -6
  673. package/src/orm/core/providers/DatabaseTypeProvider.ts +46 -53
  674. package/src/orm/core/providers/drivers/BunSqliteProvider.ts +8 -8
  675. package/src/orm/core/providers/drivers/CloudflareD1Provider.ts +3 -5
  676. package/src/orm/core/providers/drivers/NodeSqliteProvider.ts +8 -8
  677. package/src/orm/core/schemas/databaseEnvSchema.ts +4 -4
  678. package/src/orm/core/schemas/insertSchema.ts +14 -18
  679. package/src/orm/core/schemas/legacyIdSchema.ts +2 -2
  680. package/src/orm/core/schemas/updateSchema.ts +10 -16
  681. package/src/orm/core/services/PgRelationManager.ts +2 -2
  682. package/src/orm/core/services/QueryManager.ts +13 -2
  683. package/src/orm/core/services/Repository.ts +88 -33
  684. package/src/orm/core/services/SqliteModelBuilder.ts +38 -45
  685. package/src/orm/postgres/__tests__/BunPostgresProvider.bun.spec.ts +4 -4
  686. package/src/orm/postgres/providers/CloudflareHyperdriveProvider.ts +4 -6
  687. package/src/orm/postgres/schemas/postgresEnvSchema.ts +6 -6
  688. package/src/orm/postgres/services/PostgresModelBuilder.ts +127 -114
  689. package/src/queue/core/__tests__/$consumer.spec.ts +4 -4
  690. package/src/queue/core/__tests__/WorkerProvider.spec.ts +4 -4
  691. package/src/queue/core/__tests__/shared.ts +6 -6
  692. package/src/queue/core/primitives/$consumer.ts +5 -5
  693. package/src/queue/core/primitives/$queue.ts +44 -61
  694. package/src/queue/core/providers/CloudflareQueueProvider.ts +6 -0
  695. package/src/queue/core/providers/WorkerProvider.ts +17 -14
  696. package/src/queue/redis/providers/RedisQueueProvider.ts +3 -3
  697. package/src/react/core/__tests__/ErrorBoundary.browser.spec.tsx +92 -0
  698. package/src/react/core/__tests__/Router.spec.tsx +4 -4
  699. package/src/react/core/__tests__/useComputed.browser.spec.tsx +192 -0
  700. package/src/react/core/__tests__/useQuery.browser.spec.tsx +48 -0
  701. package/src/react/core/__tests__/useSelector.browser.spec.tsx +105 -0
  702. package/src/react/core/__tests__/useStore.browser.spec.tsx +113 -0
  703. package/src/react/core/components/ErrorBoundary.tsx +42 -0
  704. package/src/react/core/hooks/useAction.ts +56 -19
  705. package/src/react/core/hooks/useComputed.ts +91 -0
  706. package/src/react/core/hooks/useSelector.ts +67 -0
  707. package/src/react/core/hooks/useStore.ts +36 -17
  708. package/src/react/core/index.ts +3 -0
  709. package/src/react/core/utils/shallowEqual.ts +36 -0
  710. package/src/react/form/__tests__/FormModel-submit-loading.spec.ts +71 -0
  711. package/src/react/form/__tests__/form-submitting-reactive.browser.spec.tsx +96 -0
  712. package/src/react/form/__tests__/useForm.browser.spec.tsx +54 -54
  713. package/src/react/form/errors/FormValidationError.ts +0 -2
  714. package/src/react/form/hooks/useForm.ts +19 -4
  715. package/src/react/form/hooks/useFormQuerySync.ts +0 -0
  716. package/src/react/form/services/FormModel.ts +124 -86
  717. package/src/react/form/services/parseField.ts +66 -27
  718. package/src/react/i18n/__tests__/I18nProvider.spec.ts +89 -0
  719. package/src/react/i18n/__tests__/Localize.spec.tsx +1 -1
  720. package/src/react/i18n/__tests__/locale-routing.spec.ts +107 -0
  721. package/src/react/i18n/providers/I18nProvider.ts +173 -14
  722. package/src/react/router/__tests__/$page.browser.spec.tsx +19 -19
  723. package/src/react/router/__tests__/$page.spec.tsx +21 -21
  724. package/src/react/router/__tests__/ReactBrowserProvider.browser.spec.ts +87 -1
  725. package/src/react/router/__tests__/RouterLocaleProvider.spec.ts +127 -0
  726. package/src/react/router/atoms/ssrManifestAtom.ts +16 -16
  727. package/src/react/router/components/NestedView.tsx +11 -3
  728. package/src/react/router/hooks/useQueryParams.ts +1 -1
  729. package/src/react/router/index.browser.ts +4 -0
  730. package/src/react/router/index.shared.ts +1 -0
  731. package/src/react/router/index.ts +9 -0
  732. package/src/react/router/primitives/$page.ts +2 -2
  733. package/src/react/router/providers/ReactBrowserProvider.ts +64 -13
  734. package/src/react/router/providers/ReactBrowserRouterProvider.ts +15 -1
  735. package/src/react/router/providers/ReactPageProvider.ts +38 -13
  736. package/src/react/router/providers/ReactServerProvider.ts +105 -16
  737. package/src/react/router/providers/RootComponentsProvider.ts +13 -0
  738. package/src/react/router/providers/RouterLocaleProvider.ts +125 -0
  739. package/src/react/router/providers/__tests__/RootComponentsProvider.spec.ts +15 -0
  740. package/src/react/router/providers/__tests__/rootComponents.ssr.browser.spec.tsx +67 -0
  741. package/src/react/sitemap/__tests__/$sitemap.spec.ts +131 -0
  742. package/src/react/sitemap/index.browser.ts +21 -0
  743. package/src/react/sitemap/index.ts +25 -0
  744. package/src/react/sitemap/primitives/$sitemap.browser.ts +26 -0
  745. package/src/react/sitemap/primitives/$sitemap.ts +196 -0
  746. package/src/react/ui/atoms/uiAtom.ts +6 -6
  747. package/src/react/ui/atoms/uiThemeListAtom.ts +7 -7
  748. package/src/react/ui/hooks/useColorMode.ts +11 -4
  749. package/src/react/ui/services/SchemaControl.ts +4 -4
  750. package/src/redis/providers/BunRedisProvider.ts +19 -11
  751. package/src/redis/providers/NodeRedisProvider.ts +3 -3
  752. package/src/scheduler/primitives/$scheduler.ts +21 -8
  753. package/src/security/__tests__/assertRealmScope.spec.ts +29 -0
  754. package/src/security/atoms/currentTenantAtom.ts +6 -6
  755. package/src/security/atoms/currentUserAtom.ts +2 -2
  756. package/src/security/primitives/$issuer.ts +24 -2
  757. package/src/security/providers/JwtProvider.ts +100 -0
  758. package/src/security/providers/SecurityProvider.ts +43 -2
  759. package/src/security/schemas/permissionSchema.ts +19 -19
  760. package/src/security/schemas/roleSchema.ts +22 -28
  761. package/src/security/schemas/userAccountInfoSchema.ts +47 -37
  762. package/src/server/auth/__tests__/appleClientSecret.spec.ts +34 -0
  763. package/src/server/auth/__tests__/federationRedirectReplay.spec.ts +44 -0
  764. package/src/server/auth/helpers/appleClientSecret.ts +24 -0
  765. package/src/server/auth/helpers/jtiReplayGuard.ts +41 -0
  766. package/src/server/auth/helpers/safeRedirectPath.ts +19 -0
  767. package/src/server/auth/index.ts +1 -0
  768. package/src/server/auth/primitives/$auth.ts +6 -6
  769. package/src/server/auth/primitives/$authApple.ts +10 -10
  770. package/src/server/auth/primitives/$authFacebook.ts +10 -10
  771. package/src/server/auth/primitives/$authFranceConnect.ts +10 -10
  772. package/src/server/auth/primitives/$authGithub.ts +10 -10
  773. package/src/server/auth/primitives/$authGoogle.ts +10 -10
  774. package/src/server/auth/primitives/$authMicrosoft.ts +14 -14
  775. package/src/server/auth/providers/ServerAuthProvider.ts +67 -52
  776. package/src/server/auth/schemas/authenticationProviderSchema.ts +9 -12
  777. package/src/server/auth/schemas/tokenResponseSchema.ts +2 -2
  778. package/src/server/auth/schemas/tokensSchema.ts +16 -16
  779. package/src/server/auth/schemas/userinfoResponseSchema.ts +3 -3
  780. package/src/server/cookies/__tests__/AtomCookieBinding.spec.ts +80 -0
  781. package/src/server/cookies/__tests__/AtomCookiePersistence.browser.spec.ts +169 -0
  782. package/src/server/cookies/__tests__/AtomCookiePersistence.spec.ts +294 -0
  783. package/src/server/cookies/__tests__/ServerCookiesProvider.spec.ts +82 -12
  784. package/src/server/cookies/index.browser.ts +4 -1
  785. package/src/server/cookies/index.ts +8 -1
  786. package/src/server/cookies/primitives/$cookie.browser.ts +1 -1
  787. package/src/server/cookies/primitives/$cookie.ts +16 -0
  788. package/src/server/cookies/providers/AtomCookiePersistence.browser.ts +133 -0
  789. package/src/server/cookies/providers/AtomCookiePersistence.ts +148 -0
  790. package/src/server/cookies/providers/ServerCookiesProvider.ts +32 -4
  791. package/src/server/cookies/services/CookieParser.ts +6 -1
  792. package/src/server/core/__tests__/$action.spec.ts +13 -13
  793. package/src/server/core/__tests__/$middleware.spec.ts +10 -10
  794. package/src/server/core/__tests__/$route.spec.ts +9 -9
  795. package/src/server/core/__tests__/$sse.spec.ts +26 -26
  796. package/src/server/core/__tests__/BunHttpServerProvider.bun.spec.ts +6 -6
  797. package/src/server/core/__tests__/HttpClient.spec.ts +2 -2
  798. package/src/server/core/__tests__/NodeHttpServerProvider.spec.ts +15 -3
  799. package/src/server/core/__tests__/ServerBodyParserProvider.spec.ts +14 -14
  800. package/src/server/core/__tests__/ServerMultipartProvider.spec.ts +33 -33
  801. package/src/server/core/__tests__/ServerRouterProvider-errorHandler.spec.ts +5 -1
  802. package/src/server/core/__tests__/ServerRouterProvider-getRoutes.spec.ts +25 -25
  803. package/src/server/core/__tests__/ServerRouterProvider-serializationError.spec.ts +9 -5
  804. package/src/server/core/__tests__/ServerRouterProvider-validationError.spec.ts +56 -24
  805. package/src/server/core/errors/ValidationError.ts +6 -3
  806. package/src/server/core/helpers/isMultipart.ts +2 -1
  807. package/src/server/core/index.ts +5 -2
  808. package/src/server/core/interfaces/ServerRequest.ts +14 -14
  809. package/src/server/core/primitives/$action.ts +26 -36
  810. package/src/server/core/primitives/$route.ts +27 -0
  811. package/src/server/core/primitives/$sse.ts +3 -3
  812. package/src/server/core/providers/BunHttpServerProvider.ts +8 -9
  813. package/src/server/core/providers/NodeHttpServerProvider.ts +8 -9
  814. package/src/server/core/providers/ServerBodyParserProvider.ts +20 -12
  815. package/src/server/core/providers/ServerCompressProvider.ts +9 -10
  816. package/src/server/core/providers/ServerHelmetProvider.ts +26 -27
  817. package/src/server/core/providers/ServerMultipartProvider.ts +19 -19
  818. package/src/server/core/providers/ServerRouterProvider.ts +44 -15
  819. package/src/server/core/schemas/errorSchema.ts +20 -25
  820. package/src/server/core/schemas/okSchema.ts +9 -14
  821. package/src/server/core/services/HttpClient.ts +13 -1
  822. package/src/server/core/services/ServerRequestParser.ts +6 -6
  823. package/src/server/cors/providers/ServerCorsProvider.ts +26 -28
  824. package/src/server/health/schemas/healthSchema.ts +6 -6
  825. package/src/server/links/__tests__/$remote.spec.ts +3 -3
  826. package/src/server/links/__tests__/BatchEndpoint.spec.ts +9 -9
  827. package/src/server/links/__tests__/LinkProvider.spec.ts +9 -9
  828. package/src/server/links/__tests__/ServerLinksProvider.spec.ts +23 -23
  829. package/src/server/links/__tests__/fixtures/CrudApp.ts +21 -21
  830. package/src/server/links/atoms/apiLinksAtom.ts +2 -2
  831. package/src/server/links/atoms/linkOptionsAtom.ts +6 -6
  832. package/src/server/links/primitives/$remote.ts +3 -3
  833. package/src/server/links/providers/LinkProvider.ts +3 -3
  834. package/src/server/links/providers/ServerLinksProvider.ts +20 -20
  835. package/src/server/links/schemas/apiLinksResponseSchema.ts +23 -23
  836. package/src/server/proxy/__tests__/$proxy.spec.ts +9 -9
  837. package/src/server/proxy/providers/ServerProxyProvider.ts +5 -0
  838. package/src/server/rate-limit/providers/ServerRateLimitProvider.ts +18 -20
  839. package/src/server/swagger/__tests__/$swagger.spec.ts +91 -94
  840. package/src/server/swagger/__tests__/ui.spec.ts +3 -3
  841. package/src/server/swagger/providers/ServerSwaggerProvider.ts +66 -43
  842. package/src/system/__tests__/NodeShellProvider.spec.ts +46 -0
  843. package/src/system/providers/NodeShellProvider.ts +4 -1
  844. package/src/topic/core/__tests__/$subscriber.spec.ts +4 -4
  845. package/src/topic/core/__tests__/shared.ts +8 -8
  846. package/src/topic/core/primitives/$subscriber.ts +5 -5
  847. package/src/topic/core/primitives/$topic.ts +14 -14
  848. package/src/topic/redis/providers/RedisTopicProvider.ts +3 -3
  849. package/dist/container/core/index.d.ts +0 -236
  850. package/dist/container/core/index.d.ts.map +0 -1
  851. package/dist/container/core/index.js +0 -231
  852. package/dist/container/core/index.js.map +0 -1
  853. package/dist/container/core/index.workerd.js +0 -192
  854. package/dist/container/core/index.workerd.js.map +0 -1
  855. package/src/cli/core/tasks/BuildSitemapTask.ts +0 -130
  856. package/src/command/helpers/PrettyAsker.ts +0 -256
  857. package/src/command/helpers/PrettyPrint.ts +0 -332
  858. package/src/container/core/__tests__/$container.spec.ts +0 -83
  859. package/src/container/core/index.ts +0 -50
  860. package/src/container/core/index.workerd.ts +0 -53
  861. package/src/container/core/interfaces/ContainerOptions.ts +0 -69
  862. package/src/container/core/primitives/$container.ts +0 -100
  863. package/src/container/core/providers/CloudflareContainerProvider.ts +0 -70
  864. package/src/container/core/providers/ContainerProvider.ts +0 -92
  865. package/src/container/core/providers/MockContainerProvider.ts +0 -62
  866. package/src/container/core/providers/NodeContainerProvider.ts +0 -53
  867. package/src/core/__tests__/jsonSchemaToTypeBox.spec.ts +0 -771
  868. package/src/core/helpers/jsonSchemaToTypeBox.ts +0 -359
  869. /package/dist/orm/core/{chunk-B4FMCO8f.js → rolldown-runtime-B4FMCO8f.js} +0 -0
@@ -1,5 +1,5 @@
1
1
  import { createRequire } from "node:module";
2
- import { $atom, $env, $hook, $module, $state, t } from "alepha";
2
+ import { $atom, $env, $hook, $module, $state, z } from "alepha";
3
3
  import { AlephaEmail, EmailError, EmailProvider } from "alepha/email";
4
4
  import { $logger } from "alepha/logger";
5
5
  //#region \0rolldown/runtime.js
@@ -24,11 +24,377 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
24
24
  value: mod,
25
25
  enumerable: true
26
26
  }) : target, mod));
27
- var __require = /* @__PURE__ */ createRequire(import.meta.url);
27
+ var __require = /* #__PURE__ */ (() => createRequire(import.meta.url))();
28
+ //#endregion
29
+ //#region ../../../../node_modules/nodemailer/lib/punycode/index.js
30
+ var require_punycode = /* @__PURE__ */ __commonJSMin(((exports, module) => {
31
+ /** Highest positive signed 32-bit float value */
32
+ const maxInt = 2147483647;
33
+ /** Bootstring parameters */
34
+ const base = 36;
35
+ const tMin = 1;
36
+ const tMax = 26;
37
+ const skew = 38;
38
+ const damp = 700;
39
+ const initialBias = 72;
40
+ const initialN = 128;
41
+ const delimiter = "-";
42
+ /** Regular expressions */
43
+ const regexPunycode = /^xn--/;
44
+ const regexNonASCII = /[^\0-\x7F]/;
45
+ const regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g;
46
+ /** Error messages */
47
+ const errors = {
48
+ overflow: "Overflow: input needs wider integers to process",
49
+ "not-basic": "Illegal input >= 0x80 (not a basic code point)",
50
+ "invalid-input": "Invalid input"
51
+ };
52
+ /** Convenience shortcuts */
53
+ const baseMinusTMin = base - tMin;
54
+ const floor = Math.floor;
55
+ const stringFromCharCode = String.fromCharCode;
56
+ /**
57
+ * A generic error utility function.
58
+ * @private
59
+ * @param {String} type The error type.
60
+ * @returns {Error} Throws a `RangeError` with the applicable error message.
61
+ */
62
+ function error(type) {
63
+ throw new RangeError(errors[type]);
64
+ }
65
+ /**
66
+ * A generic `Array#map` utility function.
67
+ * @private
68
+ * @param {Array} array The array to iterate over.
69
+ * @param {Function} callback The function that gets called for every array
70
+ * item.
71
+ * @returns {Array} A new array of values returned by the callback function.
72
+ */
73
+ function map(array, callback) {
74
+ const result = [];
75
+ let length = array.length;
76
+ while (length--) result[length] = callback(array[length]);
77
+ return result;
78
+ }
79
+ /**
80
+ * A simple `Array#map`-like wrapper to work with domain name strings or email
81
+ * addresses.
82
+ * @private
83
+ * @param {String} domain The domain name or email address.
84
+ * @param {Function} callback The function that gets called for every
85
+ * character.
86
+ * @returns {String} A new string of characters returned by the callback
87
+ * function.
88
+ */
89
+ function mapDomain(domain, callback) {
90
+ const parts = domain.split("@");
91
+ let result = "";
92
+ if (parts.length > 1) {
93
+ result = parts[0] + "@";
94
+ domain = parts[1];
95
+ }
96
+ domain = domain.replace(regexSeparators, ".");
97
+ const encoded = map(domain.split("."), callback).join(".");
98
+ return result + encoded;
99
+ }
100
+ /**
101
+ * Creates an array containing the numeric code points of each Unicode
102
+ * character in the string. While JavaScript uses UCS-2 internally,
103
+ * this function will convert a pair of surrogate halves (each of which
104
+ * UCS-2 exposes as separate characters) into a single code point,
105
+ * matching UTF-16.
106
+ * @see `punycode.ucs2.encode`
107
+ * @see <https://mathiasbynens.be/notes/javascript-encoding>
108
+ * @memberOf punycode.ucs2
109
+ * @name decode
110
+ * @param {String} string The Unicode input string (UCS-2).
111
+ * @returns {Array} The new array of code points.
112
+ */
113
+ function ucs2decode(string) {
114
+ const output = [];
115
+ let counter = 0;
116
+ const length = string.length;
117
+ while (counter < length) {
118
+ const value = string.charCodeAt(counter++);
119
+ if (value >= 55296 && value <= 56319 && counter < length) {
120
+ const extra = string.charCodeAt(counter++);
121
+ if ((extra & 64512) == 56320) output.push(((value & 1023) << 10) + (extra & 1023) + 65536);
122
+ else {
123
+ output.push(value);
124
+ counter--;
125
+ }
126
+ } else output.push(value);
127
+ }
128
+ return output;
129
+ }
130
+ /**
131
+ * Creates a string based on an array of numeric code points.
132
+ * @see `punycode.ucs2.decode`
133
+ * @memberOf punycode.ucs2
134
+ * @name encode
135
+ * @param {Array} codePoints The array of numeric code points.
136
+ * @returns {String} The new Unicode string (UCS-2).
137
+ */
138
+ const ucs2encode = (codePoints) => String.fromCodePoint(...codePoints);
139
+ /**
140
+ * Converts a basic code point into a digit/integer.
141
+ * @see `digitToBasic()`
142
+ * @private
143
+ * @param {Number} codePoint The basic numeric code point value.
144
+ * @returns {Number} The numeric value of a basic code point (for use in
145
+ * representing integers) in the range `0` to `base - 1`, or `base` if
146
+ * the code point does not represent a value.
147
+ */
148
+ const basicToDigit = function(codePoint) {
149
+ if (codePoint >= 48 && codePoint < 58) return 26 + (codePoint - 48);
150
+ if (codePoint >= 65 && codePoint < 91) return codePoint - 65;
151
+ if (codePoint >= 97 && codePoint < 123) return codePoint - 97;
152
+ return base;
153
+ };
154
+ /**
155
+ * Converts a digit/integer into a basic code point.
156
+ * @see `basicToDigit()`
157
+ * @private
158
+ * @param {Number} digit The numeric value of a basic code point.
159
+ * @returns {Number} The basic code point whose value (when used for
160
+ * representing integers) is `digit`, which needs to be in the range
161
+ * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is
162
+ * used; else, the lowercase form is used. The behavior is undefined
163
+ * if `flag` is non-zero and `digit` has no uppercase form.
164
+ */
165
+ const digitToBasic = function(digit, flag) {
166
+ return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);
167
+ };
168
+ /**
169
+ * Bias adaptation function as per section 3.4 of RFC 3492.
170
+ * https://tools.ietf.org/html/rfc3492#section-3.4
171
+ * @private
172
+ */
173
+ const adapt = function(delta, numPoints, firstTime) {
174
+ let k = 0;
175
+ delta = firstTime ? floor(delta / damp) : delta >> 1;
176
+ delta += floor(delta / numPoints);
177
+ for (; delta > 455; k += base) delta = floor(delta / baseMinusTMin);
178
+ return floor(k + 36 * delta / (delta + skew));
179
+ };
180
+ /**
181
+ * Converts a Punycode string of ASCII-only symbols to a string of Unicode
182
+ * symbols.
183
+ * @memberOf punycode
184
+ * @param {String} input The Punycode string of ASCII-only symbols.
185
+ * @returns {String} The resulting string of Unicode symbols.
186
+ */
187
+ const decode = function(input) {
188
+ const output = [];
189
+ const inputLength = input.length;
190
+ let i = 0;
191
+ let n = initialN;
192
+ let bias = initialBias;
193
+ let basic = input.lastIndexOf(delimiter);
194
+ if (basic < 0) basic = 0;
195
+ for (let j = 0; j < basic; ++j) {
196
+ if (input.charCodeAt(j) >= 128) error("not-basic");
197
+ output.push(input.charCodeAt(j));
198
+ }
199
+ for (let index = basic > 0 ? basic + 1 : 0; index < inputLength;) {
200
+ const oldi = i;
201
+ for (let w = 1, k = base;; k += base) {
202
+ if (index >= inputLength) error("invalid-input");
203
+ const digit = basicToDigit(input.charCodeAt(index++));
204
+ if (digit >= base) error("invalid-input");
205
+ if (digit > floor((maxInt - i) / w)) error("overflow");
206
+ i += digit * w;
207
+ const t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias;
208
+ if (digit < t) break;
209
+ const baseMinusT = base - t;
210
+ if (w > floor(maxInt / baseMinusT)) error("overflow");
211
+ w *= baseMinusT;
212
+ }
213
+ const out = output.length + 1;
214
+ bias = adapt(i - oldi, out, oldi == 0);
215
+ if (floor(i / out) > maxInt - n) error("overflow");
216
+ n += floor(i / out);
217
+ i %= out;
218
+ output.splice(i++, 0, n);
219
+ }
220
+ return String.fromCodePoint(...output);
221
+ };
222
+ /**
223
+ * Converts a string of Unicode symbols (e.g. a domain name label) to a
224
+ * Punycode string of ASCII-only symbols.
225
+ * @memberOf punycode
226
+ * @param {String} input The string of Unicode symbols.
227
+ * @returns {String} The resulting Punycode string of ASCII-only symbols.
228
+ */
229
+ const encode = function(input) {
230
+ const output = [];
231
+ input = ucs2decode(input);
232
+ const inputLength = input.length;
233
+ let n = initialN;
234
+ let delta = 0;
235
+ let bias = initialBias;
236
+ for (const currentValue of input) if (currentValue < 128) output.push(stringFromCharCode(currentValue));
237
+ const basicLength = output.length;
238
+ let handledCPCount = basicLength;
239
+ if (basicLength) output.push(delimiter);
240
+ while (handledCPCount < inputLength) {
241
+ let m = maxInt;
242
+ for (const currentValue of input) if (currentValue >= n && currentValue < m) m = currentValue;
243
+ const handledCPCountPlusOne = handledCPCount + 1;
244
+ if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) error("overflow");
245
+ delta += (m - n) * handledCPCountPlusOne;
246
+ n = m;
247
+ for (const currentValue of input) {
248
+ if (currentValue < n && ++delta > maxInt) error("overflow");
249
+ if (currentValue === n) {
250
+ let q = delta;
251
+ for (let k = base;; k += base) {
252
+ const t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias;
253
+ if (q < t) break;
254
+ const qMinusT = q - t;
255
+ const baseMinusT = base - t;
256
+ output.push(stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0)));
257
+ q = floor(qMinusT / baseMinusT);
258
+ }
259
+ output.push(stringFromCharCode(digitToBasic(q, 0)));
260
+ bias = adapt(delta, handledCPCountPlusOne, handledCPCount === basicLength);
261
+ delta = 0;
262
+ ++handledCPCount;
263
+ }
264
+ }
265
+ ++delta;
266
+ ++n;
267
+ }
268
+ return output.join("");
269
+ };
270
+ /**
271
+ * Converts a Punycode string representing a domain name or an email address
272
+ * to Unicode. Only the Punycoded parts of the input will be converted, i.e.
273
+ * it doesn't matter if you call it on a string that has already been
274
+ * converted to Unicode.
275
+ * @memberOf punycode
276
+ * @param {String} input The Punycoded domain name or email address to
277
+ * convert to Unicode.
278
+ * @returns {String} The Unicode representation of the given Punycode
279
+ * string.
280
+ */
281
+ const toUnicode = function(input) {
282
+ return mapDomain(input, function(string) {
283
+ return regexPunycode.test(string) ? decode(string.slice(4).toLowerCase()) : string;
284
+ });
285
+ };
286
+ /**
287
+ * Converts a Unicode string representing a domain name or an email address to
288
+ * Punycode. Only the non-ASCII parts of the domain name will be converted,
289
+ * i.e. it doesn't matter if you call it with a domain that's already in
290
+ * ASCII.
291
+ * @memberOf punycode
292
+ * @param {String} input The domain name or email address to convert, as a
293
+ * Unicode string.
294
+ * @returns {String} The Punycode representation of the given domain name or
295
+ * email address.
296
+ */
297
+ const toASCII = function(input) {
298
+ return mapDomain(input, function(string) {
299
+ return regexNonASCII.test(string) ? "xn--" + encode(string) : string;
300
+ });
301
+ };
302
+ module.exports = {
303
+ /**
304
+ * A string representing the current Punycode.js version number.
305
+ * @memberOf punycode
306
+ * @type String
307
+ */
308
+ version: "2.3.1",
309
+ /**
310
+ * An object of methods to convert from JavaScript's internal character
311
+ * representation (UCS-2) to Unicode code points, and back.
312
+ * @see <https://mathiasbynens.be/notes/javascript-encoding>
313
+ * @memberOf punycode
314
+ * @type Object
315
+ */
316
+ ucs2: {
317
+ decode: ucs2decode,
318
+ encode: ucs2encode
319
+ },
320
+ decode,
321
+ encode,
322
+ toASCII,
323
+ toUnicode
324
+ };
325
+ }));
326
+ //#endregion
327
+ //#region ../../../../node_modules/nodemailer/lib/shared/url.js
328
+ var require_url = /* @__PURE__ */ __commonJSMin(((exports, module) => {
329
+ const urllib = __require("url");
330
+ const punycode = require_punycode();
331
+ const URLImpl = typeof URL !== "undefined" && URL || urllib.URL;
332
+ const SLASHLESS_AUTHORITY = /^([a-zA-Z][a-zA-Z0-9+.-]*:)(?!\/\/)(.+)$/;
333
+ function safeDecode(str) {
334
+ try {
335
+ return decodeURIComponent(str);
336
+ } catch (_err) {
337
+ return str;
338
+ }
339
+ }
340
+ function normalizeHostname(raw) {
341
+ let hostname = raw || "";
342
+ if (!hostname) return "";
343
+ if (hostname.charAt(0) === "[" && hostname.charAt(hostname.length - 1) === "]") return hostname.slice(1, -1);
344
+ return punycode.toASCII(safeDecode(hostname));
345
+ }
346
+ module.exports.parse = (input, parseQueryString) => {
347
+ input = input || "";
348
+ if (!URLImpl) return urllib.parse(input, parseQueryString);
349
+ const slashless = SLASHLESS_AUTHORITY.exec(input);
350
+ const normalized = slashless ? slashless[1] + "//" + slashless[2] : input;
351
+ let u;
352
+ try {
353
+ u = new URLImpl(normalized);
354
+ } catch (_err) {
355
+ return urllib.parse(input, parseQueryString);
356
+ }
357
+ const hostname = normalizeHostname(u.hostname);
358
+ const port = u.port || null;
359
+ const pathname = u.pathname || null;
360
+ const search = u.search || null;
361
+ let auth = null;
362
+ if (u.username || u.password) auth = safeDecode(u.username) + (u.password ? ":" + safeDecode(u.password) : "");
363
+ let query;
364
+ if (parseQueryString) {
365
+ query = Object.create(null);
366
+ u.searchParams.forEach((value, key) => {
367
+ if (Object.prototype.hasOwnProperty.call(query, key)) if (Array.isArray(query[key])) query[key].push(value);
368
+ else query[key] = [query[key], value];
369
+ else query[key] = value;
370
+ });
371
+ } else query = search ? search.slice(1) : null;
372
+ return {
373
+ protocol: u.protocol || null,
374
+ host: u.host || null,
375
+ hostname,
376
+ port,
377
+ pathname,
378
+ search,
379
+ path: (pathname || "") + (search || "") || null,
380
+ href: u.href,
381
+ auth,
382
+ query
383
+ };
384
+ };
385
+ module.exports.resolve = (from, to) => {
386
+ if (!URLImpl) return urllib.resolve(from, to);
387
+ try {
388
+ return new URLImpl(to, from).href;
389
+ } catch (_err) {
390
+ return urllib.resolve(from, to);
391
+ }
392
+ };
393
+ }));
28
394
  //#endregion
29
395
  //#region ../../../../node_modules/nodemailer/lib/fetch/cookies.js
30
396
  var require_cookies = /* @__PURE__ */ __commonJSMin(((exports, module) => {
31
- const urllib$4 = __require("url");
397
+ const urllib = require_url();
32
398
  const SESSION_TIMEOUT = 1800;
33
399
  /**
34
400
  * Creates a biskviit cookie jar for managing cookie values in memory
@@ -48,7 +414,7 @@ var require_cookies = /* @__PURE__ */ __commonJSMin(((exports, module) => {
48
414
  * @param {String} url Current URL
49
415
  */
50
416
  set(cookieStr, url) {
51
- const urlparts = urllib$4.parse(url || "");
417
+ const urlparts = urllib.parse(url || "");
52
418
  const cookie = this.parse(cookieStr);
53
419
  let domain;
54
420
  if (cookie.domain) {
@@ -138,7 +504,7 @@ var require_cookies = /* @__PURE__ */ __commonJSMin(((exports, module) => {
138
504
  * @returns {Boolean} true if cookie is valid for specifiec URL
139
505
  */
140
506
  match(cookie, url) {
141
- const urlparts = urllib$4.parse(url || "");
507
+ const urlparts = urllib.parse(url || "");
142
508
  if (urlparts.hostname !== cookie.domain && (cookie.domain.charAt(0) !== "." || ("." + urlparts.hostname).substr(-cookie.domain.length) !== cookie.domain)) return false;
143
509
  if (this.getPath(urlparts.pathname).substr(0, cookie.path.length) !== cookie.path) return false;
144
510
  if (cookie.secure && urlparts.protocol !== "https:") return false;
@@ -203,7 +569,7 @@ var require_cookies = /* @__PURE__ */ __commonJSMin(((exports, module) => {
203
569
  var require_package = /* @__PURE__ */ __commonJSMin(((exports, module) => {
204
570
  module.exports = {
205
571
  "name": "nodemailer",
206
- "version": "8.0.10",
572
+ "version": "9.0.3",
207
573
  "description": "Easy as cake e-mail sending from your Node.js applications",
208
574
  "main": "lib/nodemailer.js",
209
575
  "scripts": {
@@ -226,19 +592,19 @@ var require_package = /* @__PURE__ */ __commonJSMin(((exports, module) => {
226
592
  "bugs": { "url": "https://github.com/nodemailer/nodemailer/issues" },
227
593
  "homepage": "https://nodemailer.com/",
228
594
  "devDependencies": {
229
- "@aws-sdk/client-sesv2": "3.1037.0",
595
+ "@aws-sdk/client-sesv2": "3.1068.0",
230
596
  "bunyan": "1.8.15",
231
597
  "c8": "11.0.0",
232
- "eslint": "10.2.1",
598
+ "eslint": "10.5.0",
233
599
  "eslint-config-prettier": "10.1.8",
234
- "globals": "17.5.0",
600
+ "globals": "17.6.0",
235
601
  "libbase64": "1.3.0",
236
602
  "libmime": "5.3.8",
237
603
  "libqp": "2.1.1",
238
- "prettier": "3.8.3",
604
+ "prettier": "3.8.4",
239
605
  "proxy": "1.0.2",
240
606
  "proxy-test-server": "1.0.0",
241
- "smtp-server": "3.18.4"
607
+ "smtp-server": "3.19.0"
242
608
  },
243
609
  "engines": { "node": ">=6.0.0" }
244
610
  };
@@ -290,7 +656,7 @@ var require_errors = /* @__PURE__ */ __commonJSMin(((exports, module) => {
290
656
  var require_fetch = /* @__PURE__ */ __commonJSMin(((exports, module) => {
291
657
  const http = __require("http");
292
658
  const https = __require("https");
293
- const urllib$3 = __require("url");
659
+ const urllib = require_url();
294
660
  const zlib = __require("zlib");
295
661
  const { PassThrough: PassThrough$3 } = __require("stream");
296
662
  const Cookies = require_cookies();
@@ -315,7 +681,7 @@ var require_fetch = /* @__PURE__ */ __commonJSMin(((exports, module) => {
315
681
  options.cookie = false;
316
682
  }
317
683
  const fetchRes = options.fetchRes;
318
- const parsed = urllib$3.parse(url);
684
+ const parsed = urllib.parse(url);
319
685
  let method = (options.method || "").toString().trim().toUpperCase() || "GET";
320
686
  let finished = false;
321
687
  let cookies;
@@ -371,7 +737,7 @@ var require_fetch = /* @__PURE__ */ __commonJSMin(((exports, module) => {
371
737
  path: parsed.path,
372
738
  port: parsed.port ? parsed.port : parsed.protocol === "https:" ? 443 : 80,
373
739
  headers,
374
- rejectUnauthorized: false,
740
+ rejectUnauthorized: true,
375
741
  agent: false
376
742
  };
377
743
  if (options.tls) Object.assign(reqOptions, options.tls);
@@ -434,7 +800,21 @@ var require_fetch = /* @__PURE__ */ __commonJSMin(((exports, module) => {
434
800
  }
435
801
  options.method = "GET";
436
802
  options.body = false;
437
- return nmfetch(urllib$3.resolve(url, res.headers.location), options);
803
+ const redirectUrl = urllib.resolve(url, res.headers.location);
804
+ const redirectParsed = urllib.parse(redirectUrl);
805
+ const crossHost = redirectParsed.hostname !== parsed.hostname;
806
+ const downgrade = parsed.protocol === "https:" && redirectParsed.protocol === "http:";
807
+ if (options.headers && (crossHost || downgrade)) {
808
+ const sensitive = [
809
+ "authorization",
810
+ "cookie",
811
+ "proxy-authorization"
812
+ ];
813
+ Object.keys(options.headers).forEach((key) => {
814
+ if (sensitive.includes(key.toLowerCase())) delete options.headers[key];
815
+ });
816
+ }
817
+ return nmfetch(redirectUrl, options);
438
818
  }
439
819
  fetchRes.statusCode = res.statusCode;
440
820
  fetchRes.headers = res.headers;
@@ -486,7 +866,7 @@ var require_fetch = /* @__PURE__ */ __commonJSMin(((exports, module) => {
486
866
  //#endregion
487
867
  //#region ../../../../node_modules/nodemailer/lib/shared/index.js
488
868
  var require_shared = /* @__PURE__ */ __commonJSMin(((exports, module) => {
489
- const urllib$2 = __require("url");
869
+ const urllib = require_url();
490
870
  const util$1 = __require("util");
491
871
  const fs$2 = __require("fs");
492
872
  const nmfetch = require_fetch();
@@ -545,10 +925,13 @@ var require_shared = /* @__PURE__ */ __commonJSMin(((exports, module) => {
545
925
  module.exports.resolveHostname = (options, callback) => {
546
926
  options = options || {};
547
927
  if (!options.host && options.servername) options.host = options.servername;
548
- if (!options.host || net$3.isIP(options.host)) return callback(null, formatDNSValue({
549
- addresses: [options.host],
550
- servername: options.servername || false
551
- }, { cached: false }));
928
+ if (!options.host || net$3.isIP(options.host)) {
929
+ const value = {
930
+ addresses: [options.host],
931
+ servername: options.servername || false
932
+ };
933
+ return callback(null, formatDNSValue(value, { cached: false }));
934
+ }
552
935
  let cached;
553
936
  if (dnsCache.has(options.host)) {
554
937
  cached = dnsCache.get(options.host);
@@ -650,7 +1033,7 @@ var require_shared = /* @__PURE__ */ __commonJSMin(((exports, module) => {
650
1033
  module.exports.parseConnectionUrl = (str) => {
651
1034
  str = str || "";
652
1035
  const options = {};
653
- const url = urllib$2.parse(str, true);
1036
+ const url = urllib.parse(str, true);
654
1037
  switch (url.protocol) {
655
1038
  case "smtp:":
656
1039
  options.secure = false;
@@ -825,6 +1208,10 @@ var require_shared = /* @__PURE__ */ __commonJSMin(((exports, module) => {
825
1208
  if (!callback) promise = new Promise((resolve, reject) => {
826
1209
  callback = module.exports.callbackPromise(resolve, reject);
827
1210
  });
1211
+ resolveContentValue(data, key, options, callback);
1212
+ return promise;
1213
+ };
1214
+ function resolveContentValue(data, key, options, callback) {
828
1215
  let content = data && data[key] && data[key].content || data[key];
829
1216
  const encoding = (typeof data[key] === "object" && data[key].encoding || "utf8").toString().toLowerCase().replace(/[-_\s]/g, "");
830
1217
  if (!content) return callback(null, content);
@@ -841,11 +1228,13 @@ var require_shared = /* @__PURE__ */ __commonJSMin(((exports, module) => {
841
1228
  err.code = errors.EURLACCESS;
842
1229
  callback(err);
843
1230
  });
844
- return resolveStream(nmfetch(content.path || content.href), callback);
1231
+ return resolveStream(nmfetch(content.path || content.href, {
1232
+ headers: content.httpHeaders,
1233
+ tls: content.tls
1234
+ }), callback);
845
1235
  } else if (/^data:/i.test(content.path || content.href)) {
846
1236
  const parsedDataUri = module.exports.parseDataURI(content.path || content.href);
847
- if (!parsedDataUri || !parsedDataUri.data) return callback(null, Buffer.from(0));
848
- return callback(null, parsedDataUri.data);
1237
+ return callback(null, parsedDataUri && parsedDataUri.data ? parsedDataUri.data : Buffer.alloc(0));
849
1238
  } else if (content.path) {
850
1239
  if (options.disableFileAccess) return setImmediate(() => {
851
1240
  const err = /* @__PURE__ */ new Error("File access rejected for " + content.path);
@@ -861,8 +1250,7 @@ var require_shared = /* @__PURE__ */ __commonJSMin(((exports, module) => {
861
1250
  "ascii"
862
1251
  ].includes(encoding)) content = Buffer.from(data[key].content, encoding);
863
1252
  setImmediate(() => callback(null, content));
864
- return promise;
865
- };
1253
+ }
866
1254
  /**
867
1255
  * Copies properties from source objects to target objects
868
1256
  */
@@ -961,7 +1349,7 @@ var require_mime_types = /* @__PURE__ */ __commonJSMin(((exports, module) => {
961
1349
  const path$1 = __require("path");
962
1350
  const defaultMimeType = "application/octet-stream";
963
1351
  const defaultExtension = "bin";
964
- const mimeTypes = new Map([
1352
+ const mimeTypes = /* @__PURE__ */ new Map([
965
1353
  ["application/acad", "dwg"],
966
1354
  ["application/applixware", "aw"],
967
1355
  ["application/arj", "arj"],
@@ -2223,7 +2611,7 @@ var require_mime_types = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2223
2611
  ["xgl/drawing", "xgz"],
2224
2612
  ["xgl/movie", "xmz"]
2225
2613
  ]);
2226
- const extensions = new Map([
2614
+ const extensions = /* @__PURE__ */ new Map([
2227
2615
  ["123", "application/vnd.lotus-1-2-3"],
2228
2616
  ["323", "text/h323"],
2229
2617
  ["*", "application/octet-stream"],
@@ -3380,395 +3768,97 @@ var require_mime_types = /* @__PURE__ */ __commonJSMin(((exports, module) => {
3380
3768
  "application/vnd.ms-excel",
3381
3769
  "application/x-excel"
3382
3770
  ]],
3383
- ["xlm", [
3384
- "application/vnd.ms-excel",
3385
- "application/excel",
3386
- "application/x-excel"
3387
- ]],
3388
- ["xls", [
3389
- "application/vnd.ms-excel",
3390
- "application/excel",
3391
- "application/x-msexcel",
3392
- "application/x-excel"
3393
- ]],
3394
- ["xlsb", "application/vnd.ms-excel.sheet.binary.macroenabled.12"],
3395
- ["xlsm", "application/vnd.ms-excel.sheet.macroenabled.12"],
3396
- ["xlsx", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],
3397
- ["xlt", [
3771
+ ["xlm", [
3398
3772
  "application/vnd.ms-excel",
3399
3773
  "application/excel",
3400
3774
  "application/x-excel"
3401
3775
  ]],
3402
- ["xltm", "application/vnd.ms-excel.template.macroenabled.12"],
3403
- ["xltx", "application/vnd.openxmlformats-officedocument.spreadsheetml.template"],
3404
- ["xlv", ["application/excel", "application/x-excel"]],
3405
- ["xlw", [
3776
+ ["xls", [
3406
3777
  "application/vnd.ms-excel",
3407
3778
  "application/excel",
3408
3779
  "application/x-msexcel",
3409
3780
  "application/x-excel"
3410
3781
  ]],
3411
- ["xm", "audio/xm"],
3412
- ["xml", [
3413
- "application/xml",
3414
- "text/xml",
3415
- "application/atom+xml",
3416
- "application/rss+xml"
3417
- ]],
3418
- ["xmz", "xgl/movie"],
3419
- ["xo", "application/vnd.olpc-sugar"],
3420
- ["xof", "x-world/x-vrml"],
3421
- ["xop", "application/xop+xml"],
3422
- ["xpi", "application/x-xpinstall"],
3423
- ["xpix", "application/x-vnd.ls-xpix"],
3424
- ["xpm", ["image/xpm", "image/x-xpixmap"]],
3425
- ["xpr", "application/vnd.is-xpr"],
3426
- ["xps", "application/vnd.ms-xpsdocument"],
3427
- ["xpw", "application/vnd.intercon.formnet"],
3428
- ["xslt", "application/xslt+xml"],
3429
- ["xsm", "application/vnd.syncml+xml"],
3430
- ["xspf", "application/xspf+xml"],
3431
- ["xsr", "video/x-amt-showrun"],
3432
- ["xul", "application/vnd.mozilla.xul+xml"],
3433
- ["xwd", ["image/x-xwd", "image/x-xwindowdump"]],
3434
- ["xyz", ["chemical/x-xyz", "chemical/x-pdb"]],
3435
- ["yang", "application/yang"],
3436
- ["yin", "application/yin+xml"],
3437
- ["z", ["application/x-compressed", "application/x-compress"]],
3438
- ["zaz", "application/vnd.zzazz.deck+xml"],
3439
- ["zip", [
3440
- "application/zip",
3441
- "multipart/x-zip",
3442
- "application/x-zip-compressed",
3443
- "application/x-compressed"
3444
- ]],
3445
- ["zir", "application/vnd.zul"],
3446
- ["zmm", "application/vnd.handheld-entertainment+xml"],
3447
- ["zoo", "application/octet-stream"],
3448
- ["zsh", "text/x-script.zsh"]
3449
- ]);
3450
- module.exports = {
3451
- detectMimeType(filename) {
3452
- if (!filename) return defaultMimeType;
3453
- const parsed = path$1.parse(filename);
3454
- const extension = (parsed.ext.substr(1) || parsed.name || "").split("?").shift().trim().toLowerCase();
3455
- const value = extensions.has(extension) ? extensions.get(extension) : defaultMimeType;
3456
- if (Array.isArray(value)) return value[0];
3457
- return value;
3458
- },
3459
- detectExtension(mimeType) {
3460
- if (!mimeType) return defaultExtension;
3461
- const parts = (mimeType || "").toLowerCase().trim().split("/");
3462
- const rootType = parts.shift().trim();
3463
- const subType = parts.join("/").trim();
3464
- if (mimeTypes.has(rootType + "/" + subType)) {
3465
- const value = mimeTypes.get(rootType + "/" + subType);
3466
- if (Array.isArray(value)) return value[0];
3467
- return value;
3468
- }
3469
- switch (rootType) {
3470
- case "text": return "txt";
3471
- default: return "bin";
3472
- }
3473
- }
3474
- };
3475
- }));
3476
- //#endregion
3477
- //#region ../../../../node_modules/nodemailer/lib/punycode/index.js
3478
- var require_punycode = /* @__PURE__ */ __commonJSMin(((exports, module) => {
3479
- /** Highest positive signed 32-bit float value */
3480
- const maxInt = 2147483647;
3481
- /** Bootstring parameters */
3482
- const base = 36;
3483
- const tMin = 1;
3484
- const tMax = 26;
3485
- const skew = 38;
3486
- const damp = 700;
3487
- const initialBias = 72;
3488
- const initialN = 128;
3489
- const delimiter = "-";
3490
- /** Regular expressions */
3491
- const regexPunycode = /^xn--/;
3492
- const regexNonASCII = /[^\0-\x7F]/;
3493
- const regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g;
3494
- /** Error messages */
3495
- const errors = {
3496
- overflow: "Overflow: input needs wider integers to process",
3497
- "not-basic": "Illegal input >= 0x80 (not a basic code point)",
3498
- "invalid-input": "Invalid input"
3499
- };
3500
- /** Convenience shortcuts */
3501
- const baseMinusTMin = base - tMin;
3502
- const floor = Math.floor;
3503
- const stringFromCharCode = String.fromCharCode;
3504
- /**
3505
- * A generic error utility function.
3506
- * @private
3507
- * @param {String} type The error type.
3508
- * @returns {Error} Throws a `RangeError` with the applicable error message.
3509
- */
3510
- function error(type) {
3511
- throw new RangeError(errors[type]);
3512
- }
3513
- /**
3514
- * A generic `Array#map` utility function.
3515
- * @private
3516
- * @param {Array} array The array to iterate over.
3517
- * @param {Function} callback The function that gets called for every array
3518
- * item.
3519
- * @returns {Array} A new array of values returned by the callback function.
3520
- */
3521
- function map(array, callback) {
3522
- const result = [];
3523
- let length = array.length;
3524
- while (length--) result[length] = callback(array[length]);
3525
- return result;
3526
- }
3527
- /**
3528
- * A simple `Array#map`-like wrapper to work with domain name strings or email
3529
- * addresses.
3530
- * @private
3531
- * @param {String} domain The domain name or email address.
3532
- * @param {Function} callback The function that gets called for every
3533
- * character.
3534
- * @returns {String} A new string of characters returned by the callback
3535
- * function.
3536
- */
3537
- function mapDomain(domain, callback) {
3538
- const parts = domain.split("@");
3539
- let result = "";
3540
- if (parts.length > 1) {
3541
- result = parts[0] + "@";
3542
- domain = parts[1];
3543
- }
3544
- domain = domain.replace(regexSeparators, ".");
3545
- const encoded = map(domain.split("."), callback).join(".");
3546
- return result + encoded;
3547
- }
3548
- /**
3549
- * Creates an array containing the numeric code points of each Unicode
3550
- * character in the string. While JavaScript uses UCS-2 internally,
3551
- * this function will convert a pair of surrogate halves (each of which
3552
- * UCS-2 exposes as separate characters) into a single code point,
3553
- * matching UTF-16.
3554
- * @see `punycode.ucs2.encode`
3555
- * @see <https://mathiasbynens.be/notes/javascript-encoding>
3556
- * @memberOf punycode.ucs2
3557
- * @name decode
3558
- * @param {String} string The Unicode input string (UCS-2).
3559
- * @returns {Array} The new array of code points.
3560
- */
3561
- function ucs2decode(string) {
3562
- const output = [];
3563
- let counter = 0;
3564
- const length = string.length;
3565
- while (counter < length) {
3566
- const value = string.charCodeAt(counter++);
3567
- if (value >= 55296 && value <= 56319 && counter < length) {
3568
- const extra = string.charCodeAt(counter++);
3569
- if ((extra & 64512) == 56320) output.push(((value & 1023) << 10) + (extra & 1023) + 65536);
3570
- else {
3571
- output.push(value);
3572
- counter--;
3573
- }
3574
- } else output.push(value);
3575
- }
3576
- return output;
3577
- }
3578
- /**
3579
- * Creates a string based on an array of numeric code points.
3580
- * @see `punycode.ucs2.decode`
3581
- * @memberOf punycode.ucs2
3582
- * @name encode
3583
- * @param {Array} codePoints The array of numeric code points.
3584
- * @returns {String} The new Unicode string (UCS-2).
3585
- */
3586
- const ucs2encode = (codePoints) => String.fromCodePoint(...codePoints);
3587
- /**
3588
- * Converts a basic code point into a digit/integer.
3589
- * @see `digitToBasic()`
3590
- * @private
3591
- * @param {Number} codePoint The basic numeric code point value.
3592
- * @returns {Number} The numeric value of a basic code point (for use in
3593
- * representing integers) in the range `0` to `base - 1`, or `base` if
3594
- * the code point does not represent a value.
3595
- */
3596
- const basicToDigit = function(codePoint) {
3597
- if (codePoint >= 48 && codePoint < 58) return 26 + (codePoint - 48);
3598
- if (codePoint >= 65 && codePoint < 91) return codePoint - 65;
3599
- if (codePoint >= 97 && codePoint < 123) return codePoint - 97;
3600
- return base;
3601
- };
3602
- /**
3603
- * Converts a digit/integer into a basic code point.
3604
- * @see `basicToDigit()`
3605
- * @private
3606
- * @param {Number} digit The numeric value of a basic code point.
3607
- * @returns {Number} The basic code point whose value (when used for
3608
- * representing integers) is `digit`, which needs to be in the range
3609
- * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is
3610
- * used; else, the lowercase form is used. The behavior is undefined
3611
- * if `flag` is non-zero and `digit` has no uppercase form.
3612
- */
3613
- const digitToBasic = function(digit, flag) {
3614
- return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);
3615
- };
3616
- /**
3617
- * Bias adaptation function as per section 3.4 of RFC 3492.
3618
- * https://tools.ietf.org/html/rfc3492#section-3.4
3619
- * @private
3620
- */
3621
- const adapt = function(delta, numPoints, firstTime) {
3622
- let k = 0;
3623
- delta = firstTime ? floor(delta / damp) : delta >> 1;
3624
- delta += floor(delta / numPoints);
3625
- for (; delta > 455; k += base) delta = floor(delta / baseMinusTMin);
3626
- return floor(k + 36 * delta / (delta + skew));
3627
- };
3628
- /**
3629
- * Converts a Punycode string of ASCII-only symbols to a string of Unicode
3630
- * symbols.
3631
- * @memberOf punycode
3632
- * @param {String} input The Punycode string of ASCII-only symbols.
3633
- * @returns {String} The resulting string of Unicode symbols.
3634
- */
3635
- const decode = function(input) {
3636
- const output = [];
3637
- const inputLength = input.length;
3638
- let i = 0;
3639
- let n = initialN;
3640
- let bias = initialBias;
3641
- let basic = input.lastIndexOf(delimiter);
3642
- if (basic < 0) basic = 0;
3643
- for (let j = 0; j < basic; ++j) {
3644
- if (input.charCodeAt(j) >= 128) error("not-basic");
3645
- output.push(input.charCodeAt(j));
3646
- }
3647
- for (let index = basic > 0 ? basic + 1 : 0; index < inputLength;) {
3648
- const oldi = i;
3649
- for (let w = 1, k = base;; k += base) {
3650
- if (index >= inputLength) error("invalid-input");
3651
- const digit = basicToDigit(input.charCodeAt(index++));
3652
- if (digit >= base) error("invalid-input");
3653
- if (digit > floor((maxInt - i) / w)) error("overflow");
3654
- i += digit * w;
3655
- const t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias;
3656
- if (digit < t) break;
3657
- const baseMinusT = base - t;
3658
- if (w > floor(maxInt / baseMinusT)) error("overflow");
3659
- w *= baseMinusT;
3782
+ ["xlsb", "application/vnd.ms-excel.sheet.binary.macroenabled.12"],
3783
+ ["xlsm", "application/vnd.ms-excel.sheet.macroenabled.12"],
3784
+ ["xlsx", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],
3785
+ ["xlt", [
3786
+ "application/vnd.ms-excel",
3787
+ "application/excel",
3788
+ "application/x-excel"
3789
+ ]],
3790
+ ["xltm", "application/vnd.ms-excel.template.macroenabled.12"],
3791
+ ["xltx", "application/vnd.openxmlformats-officedocument.spreadsheetml.template"],
3792
+ ["xlv", ["application/excel", "application/x-excel"]],
3793
+ ["xlw", [
3794
+ "application/vnd.ms-excel",
3795
+ "application/excel",
3796
+ "application/x-msexcel",
3797
+ "application/x-excel"
3798
+ ]],
3799
+ ["xm", "audio/xm"],
3800
+ ["xml", [
3801
+ "application/xml",
3802
+ "text/xml",
3803
+ "application/atom+xml",
3804
+ "application/rss+xml"
3805
+ ]],
3806
+ ["xmz", "xgl/movie"],
3807
+ ["xo", "application/vnd.olpc-sugar"],
3808
+ ["xof", "x-world/x-vrml"],
3809
+ ["xop", "application/xop+xml"],
3810
+ ["xpi", "application/x-xpinstall"],
3811
+ ["xpix", "application/x-vnd.ls-xpix"],
3812
+ ["xpm", ["image/xpm", "image/x-xpixmap"]],
3813
+ ["xpr", "application/vnd.is-xpr"],
3814
+ ["xps", "application/vnd.ms-xpsdocument"],
3815
+ ["xpw", "application/vnd.intercon.formnet"],
3816
+ ["xslt", "application/xslt+xml"],
3817
+ ["xsm", "application/vnd.syncml+xml"],
3818
+ ["xspf", "application/xspf+xml"],
3819
+ ["xsr", "video/x-amt-showrun"],
3820
+ ["xul", "application/vnd.mozilla.xul+xml"],
3821
+ ["xwd", ["image/x-xwd", "image/x-xwindowdump"]],
3822
+ ["xyz", ["chemical/x-xyz", "chemical/x-pdb"]],
3823
+ ["yang", "application/yang"],
3824
+ ["yin", "application/yin+xml"],
3825
+ ["z", ["application/x-compressed", "application/x-compress"]],
3826
+ ["zaz", "application/vnd.zzazz.deck+xml"],
3827
+ ["zip", [
3828
+ "application/zip",
3829
+ "multipart/x-zip",
3830
+ "application/x-zip-compressed",
3831
+ "application/x-compressed"
3832
+ ]],
3833
+ ["zir", "application/vnd.zul"],
3834
+ ["zmm", "application/vnd.handheld-entertainment+xml"],
3835
+ ["zoo", "application/octet-stream"],
3836
+ ["zsh", "text/x-script.zsh"]
3837
+ ]);
3838
+ module.exports = {
3839
+ detectMimeType(filename) {
3840
+ if (!filename) return defaultMimeType;
3841
+ const parsed = path$1.parse(filename);
3842
+ const extension = (parsed.ext.substr(1) || parsed.name || "").split("?").shift().trim().toLowerCase();
3843
+ const value = extensions.has(extension) ? extensions.get(extension) : defaultMimeType;
3844
+ if (Array.isArray(value)) return value[0];
3845
+ return value;
3846
+ },
3847
+ detectExtension(mimeType) {
3848
+ if (!mimeType) return defaultExtension;
3849
+ const parts = mimeType.toLowerCase().trim().split("/");
3850
+ const rootType = parts.shift().trim();
3851
+ const subType = parts.join("/").trim();
3852
+ if (mimeTypes.has(rootType + "/" + subType)) {
3853
+ const value = mimeTypes.get(rootType + "/" + subType);
3854
+ if (Array.isArray(value)) return value[0];
3855
+ return value;
3660
3856
  }
3661
- const out = output.length + 1;
3662
- bias = adapt(i - oldi, out, oldi == 0);
3663
- if (floor(i / out) > maxInt - n) error("overflow");
3664
- n += floor(i / out);
3665
- i %= out;
3666
- output.splice(i++, 0, n);
3667
- }
3668
- return String.fromCodePoint(...output);
3669
- };
3670
- /**
3671
- * Converts a string of Unicode symbols (e.g. a domain name label) to a
3672
- * Punycode string of ASCII-only symbols.
3673
- * @memberOf punycode
3674
- * @param {String} input The string of Unicode symbols.
3675
- * @returns {String} The resulting Punycode string of ASCII-only symbols.
3676
- */
3677
- const encode = function(input) {
3678
- const output = [];
3679
- input = ucs2decode(input);
3680
- const inputLength = input.length;
3681
- let n = initialN;
3682
- let delta = 0;
3683
- let bias = initialBias;
3684
- for (const currentValue of input) if (currentValue < 128) output.push(stringFromCharCode(currentValue));
3685
- const basicLength = output.length;
3686
- let handledCPCount = basicLength;
3687
- if (basicLength) output.push(delimiter);
3688
- while (handledCPCount < inputLength) {
3689
- let m = maxInt;
3690
- for (const currentValue of input) if (currentValue >= n && currentValue < m) m = currentValue;
3691
- const handledCPCountPlusOne = handledCPCount + 1;
3692
- if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) error("overflow");
3693
- delta += (m - n) * handledCPCountPlusOne;
3694
- n = m;
3695
- for (const currentValue of input) {
3696
- if (currentValue < n && ++delta > maxInt) error("overflow");
3697
- if (currentValue === n) {
3698
- let q = delta;
3699
- for (let k = base;; k += base) {
3700
- const t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias;
3701
- if (q < t) break;
3702
- const qMinusT = q - t;
3703
- const baseMinusT = base - t;
3704
- output.push(stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0)));
3705
- q = floor(qMinusT / baseMinusT);
3706
- }
3707
- output.push(stringFromCharCode(digitToBasic(q, 0)));
3708
- bias = adapt(delta, handledCPCountPlusOne, handledCPCount === basicLength);
3709
- delta = 0;
3710
- ++handledCPCount;
3711
- }
3857
+ switch (rootType) {
3858
+ case "text": return "txt";
3859
+ default: return "bin";
3712
3860
  }
3713
- ++delta;
3714
- ++n;
3715
3861
  }
3716
- return output.join("");
3717
- };
3718
- /**
3719
- * Converts a Punycode string representing a domain name or an email address
3720
- * to Unicode. Only the Punycoded parts of the input will be converted, i.e.
3721
- * it doesn't matter if you call it on a string that has already been
3722
- * converted to Unicode.
3723
- * @memberOf punycode
3724
- * @param {String} input The Punycoded domain name or email address to
3725
- * convert to Unicode.
3726
- * @returns {String} The Unicode representation of the given Punycode
3727
- * string.
3728
- */
3729
- const toUnicode = function(input) {
3730
- return mapDomain(input, function(string) {
3731
- return regexPunycode.test(string) ? decode(string.slice(4).toLowerCase()) : string;
3732
- });
3733
- };
3734
- /**
3735
- * Converts a Unicode string representing a domain name or an email address to
3736
- * Punycode. Only the non-ASCII parts of the domain name will be converted,
3737
- * i.e. it doesn't matter if you call it with a domain that's already in
3738
- * ASCII.
3739
- * @memberOf punycode
3740
- * @param {String} input The domain name or email address to convert, as a
3741
- * Unicode string.
3742
- * @returns {String} The Punycode representation of the given domain name or
3743
- * email address.
3744
- */
3745
- const toASCII = function(input) {
3746
- return mapDomain(input, function(string) {
3747
- return regexNonASCII.test(string) ? "xn--" + encode(string) : string;
3748
- });
3749
- };
3750
- module.exports = {
3751
- /**
3752
- * A string representing the current Punycode.js version number.
3753
- * @memberOf punycode
3754
- * @type String
3755
- */
3756
- version: "2.3.1",
3757
- /**
3758
- * An object of methods to convert from JavaScript's internal character
3759
- * representation (UCS-2) to Unicode code points, and back.
3760
- * @see <https://mathiasbynens.be/notes/javascript-encoding>
3761
- * @memberOf punycode
3762
- * @type Object
3763
- */
3764
- ucs2: {
3765
- decode: ucs2decode,
3766
- encode: ucs2encode
3767
- },
3768
- decode,
3769
- encode,
3770
- toASCII,
3771
- toUnicode
3772
3862
  };
3773
3863
  }));
3774
3864
  //#endregion
@@ -4544,6 +4634,7 @@ var require_addressparser = /* @__PURE__ */ __commonJSMin(((exports, module) =>
4544
4634
  this.operatorExpecting = "";
4545
4635
  this.node = null;
4546
4636
  this.escaped = false;
4637
+ this.inDomainLiteral = false;
4547
4638
  this.list = [];
4548
4639
  /**
4549
4640
  * Operator tokens and which tokens are expected to end the sequence
@@ -4581,6 +4672,10 @@ var require_addressparser = /* @__PURE__ */ __commonJSMin(((exports, module) =>
4581
4672
  * @param {String} chr Character from the address field
4582
4673
  */
4583
4674
  checkChar(chr, nextChr) {
4675
+ if (!this.escaped && !this.operatorExpecting) {
4676
+ if (!this.inDomainLiteral && chr === "[") this.inDomainLiteral = true;
4677
+ else if (this.inDomainLiteral && (chr === "]" || chr === "," || chr === ";")) this.inDomainLiteral = false;
4678
+ }
4584
4679
  if (this.escaped) {} else if (chr === this.operatorExpecting) {
4585
4680
  this.node = {
4586
4681
  type: "operator",
@@ -4599,7 +4694,7 @@ var require_addressparser = /* @__PURE__ */ __commonJSMin(((exports, module) =>
4599
4694
  this.operatorExpecting = "";
4600
4695
  this.escaped = false;
4601
4696
  return;
4602
- } else if (!this.operatorExpecting && chr in this.operators) {
4697
+ } else if (!this.operatorExpecting && !this.inDomainLiteral && chr in this.operators) {
4603
4698
  this.node = {
4604
4699
  type: "operator",
4605
4700
  value: chr
@@ -5513,7 +5608,10 @@ var require_mime_node = /* @__PURE__ */ __commonJSMin(((exports, module) => {
5513
5608
  });
5514
5609
  return contentStream;
5515
5610
  }
5516
- return nmfetch(content.href, { headers: content.httpHeaders });
5611
+ return nmfetch(content.href, {
5612
+ headers: content.httpHeaders,
5613
+ tls: content.tls
5614
+ });
5517
5615
  }
5518
5616
  contentStream = new PassThrough$2();
5519
5617
  setImmediate(() => {
@@ -5741,7 +5839,11 @@ var require_mail_composer = /* @__PURE__ */ __commonJSMin(((exports, module) =>
5741
5839
  this._useRelated = !!(this._htmlNode && this._attachments.related.length);
5742
5840
  this._useAlternative = this._alternatives.length > 1;
5743
5841
  this._useMixed = this._attachments.attached.length > 1 || this._alternatives.length && this._attachments.attached.length === 1;
5744
- if (this.mail.raw) this.message = new MimeNode("message/rfc822", { newline: this.mail.newline }).setRaw(this.mail.raw);
5842
+ if (this.mail.raw) this.message = new MimeNode("message/rfc822", {
5843
+ newline: this.mail.newline,
5844
+ disableUrlAccess: this.mail.disableUrlAccess,
5845
+ disableFileAccess: this.mail.disableFileAccess
5846
+ }).setRaw(this.mail.raw);
5745
5847
  else if (this._useMixed) this.message = this._createMixed();
5746
5848
  else if (this._useAlternative) this.message = this._createAlternative();
5747
5849
  else if (this._useRelated) this.message = this._createRelated();
@@ -5777,7 +5879,7 @@ var require_mail_composer = /* @__PURE__ */ __commonJSMin(((exports, module) =>
5777
5879
  * @returns {Object} An object of arrays (`related` and `attached`)
5778
5880
  */
5779
5881
  getAttachments(findRelated) {
5780
- let icalEvent, eventObject;
5882
+ let eventObject;
5781
5883
  const attachments = [].concat(this.mail.attachments || []).map((attachment, i) => {
5782
5884
  if (/^data:/i.test(attachment.path || attachment.href)) attachment = this._processDataUrl(attachment);
5783
5885
  const contentType = attachment.contentType || mimeFuncs.detectMimeType(attachment.filename || attachment.path || attachment.href || "bin");
@@ -5807,7 +5909,8 @@ var require_mail_composer = /* @__PURE__ */ __commonJSMin(((exports, module) =>
5807
5909
  else if (attachment.path) data.content = { path: attachment.path };
5808
5910
  else if (attachment.href) data.content = {
5809
5911
  href: attachment.href,
5810
- httpHeaders: attachment.httpHeaders
5912
+ httpHeaders: attachment.httpHeaders,
5913
+ tls: attachment.tls
5811
5914
  };
5812
5915
  else data.content = attachment.content || "";
5813
5916
  if (attachment.encoding) data.encoding = attachment.encoding;
@@ -5815,9 +5918,7 @@ var require_mail_composer = /* @__PURE__ */ __commonJSMin(((exports, module) =>
5815
5918
  return data;
5816
5919
  });
5817
5920
  if (this.mail.icalEvent) {
5818
- if (typeof this.mail.icalEvent === "object" && (this.mail.icalEvent.content || this.mail.icalEvent.path || this.mail.icalEvent.href || this.mail.icalEvent.raw)) icalEvent = this.mail.icalEvent;
5819
- else icalEvent = { content: this.mail.icalEvent };
5820
- eventObject = Object.assign({}, icalEvent);
5921
+ eventObject = Object.assign({}, this._getIcalEvent());
5821
5922
  eventObject.contentType = "application/ics";
5822
5923
  if (!eventObject.headers) eventObject.headers = {};
5823
5924
  eventObject.filename = eventObject.filename || "invite.ics";
@@ -5834,13 +5935,49 @@ var require_mail_composer = /* @__PURE__ */ __commonJSMin(((exports, module) =>
5834
5935
  };
5835
5936
  }
5836
5937
  /**
5938
+ * Returns the icalEvent value with `path`/`href`/data uri input normalized into
5939
+ * a `content` entry, the same way as for regular attachments. The same event is
5940
+ * included twice (as a text/calendar alternative and as an application/ics
5941
+ * attachment), so the shared content object is marked to be resolved just once
5942
+ * and the buffered result is reused by the second node.
5943
+ *
5944
+ * @returns {Object} Normalized icalEvent data
5945
+ */
5946
+ _getIcalEvent() {
5947
+ if (!this._icalEvent) {
5948
+ let icalEvent;
5949
+ if (typeof this.mail.icalEvent === "object" && (this.mail.icalEvent.content || this.mail.icalEvent.path || this.mail.icalEvent.href || this.mail.icalEvent.raw)) icalEvent = Object.assign({}, this.mail.icalEvent);
5950
+ else icalEvent = { content: this.mail.icalEvent };
5951
+ if (/^data:/i.test(icalEvent.path || icalEvent.href)) icalEvent = this._processDataUrl(icalEvent);
5952
+ if (/^https?:\/\//i.test(icalEvent.path)) {
5953
+ icalEvent.href = icalEvent.path;
5954
+ icalEvent.path = void 0;
5955
+ }
5956
+ if (!icalEvent.raw) {
5957
+ if (icalEvent.path) {
5958
+ icalEvent.content = { path: icalEvent.path };
5959
+ icalEvent.path = void 0;
5960
+ } else if (icalEvent.href) {
5961
+ icalEvent.content = {
5962
+ href: icalEvent.href,
5963
+ httpHeaders: icalEvent.httpHeaders
5964
+ };
5965
+ icalEvent.href = void 0;
5966
+ }
5967
+ }
5968
+ if (icalEvent.content && typeof icalEvent.content === "object") icalEvent.content._resolve = true;
5969
+ this._icalEvent = icalEvent;
5970
+ }
5971
+ return this._icalEvent;
5972
+ }
5973
+ /**
5837
5974
  * List alternatives. Resulting objects can be used as input for MimeNode nodes
5838
5975
  *
5839
5976
  * @returns {Array} An array of alternative elements. Includes the `text` and `html` values as well
5840
5977
  */
5841
5978
  getAlternatives() {
5842
5979
  const alternatives = [];
5843
- let text, html, watchHtml, amp, icalEvent, eventObject;
5980
+ let text, html, watchHtml, amp, eventObject;
5844
5981
  if (this.mail.text) {
5845
5982
  if (typeof this.mail.text === "object" && (this.mail.text.content || this.mail.text.path || this.mail.text.href || this.mail.text.raw)) text = this.mail.text;
5846
5983
  else text = { content: this.mail.text };
@@ -5857,10 +5994,7 @@ var require_mail_composer = /* @__PURE__ */ __commonJSMin(((exports, module) =>
5857
5994
  amp.contentType = "text/x-amp-html; charset=utf-8";
5858
5995
  }
5859
5996
  if (this.mail.icalEvent) {
5860
- if (typeof this.mail.icalEvent === "object" && (this.mail.icalEvent.content || this.mail.icalEvent.path || this.mail.icalEvent.href || this.mail.icalEvent.raw)) icalEvent = this.mail.icalEvent;
5861
- else icalEvent = { content: this.mail.icalEvent };
5862
- eventObject = Object.assign({}, icalEvent);
5863
- if (eventObject.content && typeof eventObject.content === "object") eventObject.content._resolve = true;
5997
+ eventObject = Object.assign({}, this._getIcalEvent());
5864
5998
  eventObject.filename = false;
5865
5999
  eventObject.contentType = "text/calendar; charset=utf-8; method=" + (eventObject.method || "PUBLISH").toString().trim().toUpperCase();
5866
6000
  if (!eventObject.headers) eventObject.headers = {};
@@ -6182,7 +6316,7 @@ var require_relaxed_body = /* @__PURE__ */ __commonJSMin(((exports, module) => {
6182
6316
  options = options || {};
6183
6317
  this.chunkBuffer = [];
6184
6318
  this.chunkBufferLen = 0;
6185
- this.bodyHash = crypto$5.createHash(options.hashAlgo || "sha1");
6319
+ this.bodyHash = crypto$5.createHash(options.hashAlgo || "sha256");
6186
6320
  this.remainder = "";
6187
6321
  this.byteLength = 0;
6188
6322
  this.debug = options.debug;
@@ -6506,8 +6640,9 @@ var require_http_proxy_client = /* @__PURE__ */ __commonJSMin(((exports, module)
6506
6640
  */
6507
6641
  const net$2 = __require("net");
6508
6642
  const tls$1 = __require("tls");
6509
- const urllib$1 = __require("url");
6643
+ const urllib = require_url();
6510
6644
  const errors = require_errors();
6645
+ const MAX_RESPONSE_HEADER_BYTES = 64 * 1024;
6511
6646
  /**
6512
6647
  * Establishes proxied connection to destinationPort
6513
6648
  *
@@ -6518,17 +6653,29 @@ var require_http_proxy_client = /* @__PURE__ */ __commonJSMin(((exports, module)
6518
6653
  * @param {String} proxyUrl proxy configuration, etg "http://proxy.host:3128/"
6519
6654
  * @param {Number} destinationPort Port to open in destination host
6520
6655
  * @param {String} destinationHost Destination hostname
6656
+ * @param {Object} [tlsOptions] Optional TLS options for an HTTPS proxy (e.g. { rejectUnauthorized: false })
6521
6657
  * @param {Function} callback Callback to run with the rocket object once connection is established
6522
6658
  */
6523
- function httpProxyClient(proxyUrl, destinationPort, destinationHost, callback) {
6524
- const proxy = urllib$1.parse(proxyUrl);
6525
- const options = {
6659
+ function httpProxyClient(proxyUrl, destinationPort, destinationHost, tlsOptions, callback) {
6660
+ if (typeof tlsOptions === "function") {
6661
+ callback = tlsOptions;
6662
+ tlsOptions = {};
6663
+ }
6664
+ tlsOptions = tlsOptions || {};
6665
+ destinationPort = Number(destinationPort) || 0;
6666
+ if (!destinationPort || /[\r\n]/.test(destinationHost)) {
6667
+ const err = /* @__PURE__ */ new Error("Invalid proxy destination");
6668
+ err.code = errors.EPROXY;
6669
+ return setImmediate(() => callback(err));
6670
+ }
6671
+ const proxy = urllib.parse(proxyUrl);
6672
+ const connectOptions = {
6526
6673
  host: proxy.hostname,
6527
6674
  port: Number(proxy.port) ? Number(proxy.port) : proxy.protocol === "https:" ? 443 : 80
6528
6675
  };
6529
6676
  let connect;
6530
6677
  if (proxy.protocol === "https:") {
6531
- options.rejectUnauthorized = false;
6678
+ connectOptions.rejectUnauthorized = tlsOptions.rejectUnauthorized !== false;
6532
6679
  connect = tls$1.connect.bind(tls$1);
6533
6680
  } else connect = net$2.connect.bind(net$2);
6534
6681
  let socket;
@@ -6546,7 +6693,7 @@ var require_http_proxy_client = /* @__PURE__ */ __commonJSMin(((exports, module)
6546
6693
  err.code = "ETIMEDOUT";
6547
6694
  tempSocketErr(err);
6548
6695
  };
6549
- socket = connect(options, () => {
6696
+ socket = connect(connectOptions, () => {
6550
6697
  if (finished) return;
6551
6698
  const reqHeaders = {
6552
6699
  Host: destinationHost + ":" + destinationPort,
@@ -6580,6 +6727,12 @@ var require_http_proxy_client = /* @__PURE__ */ __commonJSMin(((exports, module)
6580
6727
  socket.setTimeout(0);
6581
6728
  return callback(null, socket);
6582
6729
  }
6730
+ if (headers.length > MAX_RESPONSE_HEADER_BYTES) {
6731
+ socket.removeListener("data", onSocketData);
6732
+ const err = /* @__PURE__ */ new Error("Proxy response headers too large");
6733
+ err.code = errors.EPROXY;
6734
+ return tempSocketErr(err);
6735
+ }
6583
6736
  };
6584
6737
  socket.on("data", onSocketData);
6585
6738
  });
@@ -6781,7 +6934,7 @@ var require_mail_message = /* @__PURE__ */ __commonJSMin(((exports, module) => {
6781
6934
  let comment = (value.comment || "").toString().replace(/\r?\n|\r/g, " ");
6782
6935
  if (mimeFuncs.isPlainText(comment)) comment = "\"" + comment + "\"";
6783
6936
  else comment = mimeFuncs.encodeWord(comment);
6784
- return (value.comment ? comment + " " : "") + this._formatListUrl(value.url).replace(/^<[^:]+\/{,2}/, "");
6937
+ return (value.comment ? comment + " " : "") + this._formatListUrl(value.url).replace(/^<[^:]+:\/{0,2}/, "<");
6785
6938
  }
6786
6939
  let comment = (value.comment || "").toString().replace(/\r?\n|\r/g, " ");
6787
6940
  if (!mimeFuncs.isPlainText(comment)) comment = mimeFuncs.encodeWord(comment);
@@ -6812,7 +6965,7 @@ var require_mailer = /* @__PURE__ */ __commonJSMin(((exports, module) => {
6812
6965
  const httpProxyClient = require_http_proxy_client();
6813
6966
  const errors = require_errors();
6814
6967
  const util = __require("util");
6815
- const urllib = __require("url");
6968
+ const urllib = require_url();
6816
6969
  const packageData = require_package();
6817
6970
  const MailMessage = require_mail_message();
6818
6971
  const net$1 = __require("net");
@@ -7001,7 +7154,7 @@ var require_mailer = /* @__PURE__ */ __commonJSMin(((exports, module) => {
7001
7154
  switch (protocol) {
7002
7155
  case "http":
7003
7156
  case "https":
7004
- httpProxyClient(proxy.href, options.port, options.host, (err, socket) => {
7157
+ httpProxyClient(proxy.href, options.port, options.host, this.options.tls || {}, (err, socket) => {
7005
7158
  if (err) return callback(err);
7006
7159
  return callback(null, { connection: socket });
7007
7160
  });
@@ -7215,9 +7368,9 @@ var require_smtp_connection = /* @__PURE__ */ __commonJSMin(((exports, module) =
7215
7368
  * * **requireTLS** - forces the client to use STARTTLS
7216
7369
  * * **name** - the name of the client server
7217
7370
  * * **localAddress** - outbound address to bind to (see: http://nodejs.org/api/net.html#net_net_connect_options_connectionlistener)
7218
- * * **greetingTimeout** - Time to wait in ms until greeting message is received from the server (defaults to 10000)
7219
- * * **connectionTimeout** - how many milliseconds to wait for the connection to establish
7220
- * * **socketTimeout** - Time of inactivity until the connection is closed (defaults to 1 hour)
7371
+ * * **greetingTimeout** - Time to wait in ms until greeting message is received from the server (defaults to 30 seconds)
7372
+ * * **connectionTimeout** - how many milliseconds to wait for the connection to establish (defaults to 2 minutes)
7373
+ * * **socketTimeout** - Time of inactivity until the connection is closed (defaults to 10 minutes)
7221
7374
  * * **dnsTimeout** - Time to wait in ms for the DNS requests to be resolved (defaults to 30 seconds)
7222
7375
  * * **lmtp** - if true, uses LMTP instead of SMTP protocol
7223
7376
  * * **logger** - bunyan compatible logger interface
@@ -7403,6 +7556,13 @@ var require_smtp_connection = /* @__PURE__ */ __commonJSMin(((exports, module) =
7403
7556
  try {
7404
7557
  this._socket.connect(this.port, this.host, () => {
7405
7558
  this._socket.setKeepAlive(true);
7559
+ if (this.secureConnection && !this.alreadySecured) return this._upgradeConnection((err) => {
7560
+ if (err) {
7561
+ this._onError(/* @__PURE__ */ new Error("Error initiating TLS - " + (err.message || err)), "ETLS", false, "CONN");
7562
+ return;
7563
+ }
7564
+ this._onConnect();
7565
+ });
7406
7566
  this._onConnect();
7407
7567
  });
7408
7568
  this._setupConnectionHandlers();
@@ -7449,6 +7609,7 @@ var require_smtp_connection = /* @__PURE__ */ __commonJSMin(((exports, module) =
7449
7609
  * @param {Boolean} secure Whether to use TLS
7450
7610
  */
7451
7611
  _connectToHost(opts, secure) {
7612
+ if (this._destroyed || this._closing) return;
7452
7613
  this._connectionAttemptId++;
7453
7614
  const currentAttemptId = this._connectionAttemptId;
7454
7615
  const connectFn = secure ? tls.connect : net.connect;
@@ -7494,6 +7655,7 @@ var require_smtp_connection = /* @__PURE__ */ __commonJSMin(((exports, module) =
7494
7655
  if (this._socket) {
7495
7656
  try {
7496
7657
  this._socket.removeListener("error", this._onConnectionSocketError);
7658
+ this._socket.on("error", TEARDOWN_NOOP);
7497
7659
  this._socket.destroy();
7498
7660
  } catch (_E) {}
7499
7661
  this._socket = null;
@@ -7692,6 +7854,8 @@ var require_smtp_connection = /* @__PURE__ */ __commonJSMin(((exports, module) =
7692
7854
  * @param {Function} callback Callback to return once connection is reset
7693
7855
  */
7694
7856
  reset(callback) {
7857
+ const isDestroyedMessage = this._isDestroyedMessage("reset");
7858
+ if (isDestroyedMessage) return callback(this._formatError(isDestroyedMessage, "ECONNECTION", false, "API"));
7695
7859
  this._sendCommand("RSET");
7696
7860
  this._responseActions.push((str) => {
7697
7861
  if (str.charAt(0) !== "2") return callback(this._formatError("Could not reset session state. response=" + str, "EPROTOCOL", str, "RSET"));
@@ -7724,6 +7888,7 @@ var require_smtp_connection = /* @__PURE__ */ __commonJSMin(((exports, module) =
7724
7888
  this._socket.removeListener("close", this._onSocketClose);
7725
7889
  this._socket.removeListener("end", this._onSocketEnd);
7726
7890
  this._socket.removeListener("error", this._onConnectionSocketError);
7891
+ this._socket.removeListener("error", this._onSocketError);
7727
7892
  this._socket.on("error", this._onSocketError);
7728
7893
  this._socket.on("data", this._onSocketData);
7729
7894
  this._socket.once("close", this._onSocketClose);
@@ -7744,7 +7909,7 @@ var require_smtp_connection = /* @__PURE__ */ __commonJSMin(((exports, module) =
7744
7909
  */
7745
7910
  _onData(chunk) {
7746
7911
  if (this._destroyed || !chunk || !chunk.length) return;
7747
- let data = (chunk || "").toString("binary");
7912
+ let data = chunk.toString("binary");
7748
7913
  let lines = (this._remainder + data).split(/\r?\n/);
7749
7914
  let lastline;
7750
7915
  this._remainder = lines.pop();
@@ -7838,6 +8003,7 @@ var require_smtp_connection = /* @__PURE__ */ __commonJSMin(((exports, module) =
7838
8003
  _destroy() {
7839
8004
  if (this._destroyed) return;
7840
8005
  this._destroyed = true;
8006
+ this.destroyed = true;
7841
8007
  this.emit("end");
7842
8008
  }
7843
8009
  /**
@@ -7847,6 +8013,8 @@ var require_smtp_connection = /* @__PURE__ */ __commonJSMin(((exports, module) =
7847
8013
  * has been secured
7848
8014
  */
7849
8015
  _upgradeConnection(callback) {
8016
+ this._remainder = "";
8017
+ this._responseQueue = [];
7850
8018
  this._socket.removeListener("data", this._onSocketData);
7851
8019
  this._socket.removeListener("timeout", this._onSocketTimeout);
7852
8020
  const socketPlain = this._socket;
@@ -7859,6 +8027,7 @@ var require_smtp_connection = /* @__PURE__ */ __commonJSMin(((exports, module) =
7859
8027
  socketPlain.removeListener("close", this._onSocketClose);
7860
8028
  socketPlain.removeListener("end", this._onSocketEnd);
7861
8029
  socketPlain.removeListener("error", this._onSocketError);
8030
+ socketPlain.removeListener("error", this._onConnectionSocketError);
7862
8031
  };
7863
8032
  this.upgrading = true;
7864
8033
  try {
@@ -7882,15 +8051,20 @@ var require_smtp_connection = /* @__PURE__ */ __commonJSMin(((exports, module) =
7882
8051
  }
7883
8052
  /**
7884
8053
  * Processes queued responses from the server
7885
- *
7886
- * @param {Boolean} force If true, ignores _processing flag
7887
8054
  */
7888
8055
  _processResponse() {
7889
8056
  if (!this._responseQueue.length) return false;
7890
- let str = this.lastServerResponse = decodeServerResponse((this._responseQueue.shift() || "").toString());
7891
- if (/^\d+-/.test(str.split("\n").pop())) return;
8057
+ const raw = (this._responseQueue.shift() || "").toString();
8058
+ if (!raw.trim()) {
8059
+ setImmediate(() => this._processResponse());
8060
+ return;
8061
+ }
8062
+ let str = this.lastServerResponse = decodeServerResponse(raw);
8063
+ if (/^\d+-/.test(str.split("\n").pop())) {
8064
+ this._responseQueue.unshift(raw);
8065
+ return;
8066
+ }
7892
8067
  if (this.options.debug || this.options.transactionLog) this.logger.debug({ tnx: "server" }, str.replace(/\r?\n$/, ""));
7893
- if (!str.trim()) setImmediate(() => this._processResponse());
7894
8068
  const action = this._responseActions.shift();
7895
8069
  if (typeof action === "function") {
7896
8070
  action.call(this, str);
@@ -7940,6 +8114,10 @@ var require_smtp_connection = /* @__PURE__ */ __commonJSMin(((exports, module) =
7940
8114
  } catch (err) {
7941
8115
  return callback(this._formatError("Invalid DSN " + err.message, "EENVELOPE", false, "API"));
7942
8116
  }
8117
+ if (this._envelope.requireTLSExtensionEnabled) {
8118
+ if (!this.secure) return callback(this._formatError("REQUIRETLS can only be used over TLS connections (RFC 8689)", "EREQUIRETLS", false, "MAIL FROM"));
8119
+ if (!this._supportedExtensions.includes("REQUIRETLS")) return callback(this._formatError("Server does not support REQUIRETLS extension (RFC 8689)", "EREQUIRETLS", false, "MAIL FROM"));
8120
+ }
7943
8121
  this._responseActions.push((str) => {
7944
8122
  this._actionMAIL(str, callback);
7945
8123
  });
@@ -7959,11 +8137,7 @@ var require_smtp_connection = /* @__PURE__ */ __commonJSMin(((exports, module) =
7959
8137
  if (this._envelope.dsn.ret) args.push("RET=" + shared.encodeXText(this._envelope.dsn.ret));
7960
8138
  if (this._envelope.dsn.envid) args.push("ENVID=" + shared.encodeXText(this._envelope.dsn.envid));
7961
8139
  }
7962
- if (this._envelope.requireTLSExtensionEnabled) {
7963
- if (!this.secure) return callback(this._formatError("REQUIRETLS can only be used over TLS connections (RFC 8689)", "EREQUIRETLS", false, "MAIL FROM"));
7964
- if (!this._supportedExtensions.includes("REQUIRETLS")) return callback(this._formatError("Server does not support REQUIRETLS extension (RFC 8689)", "EREQUIRETLS", false, "MAIL FROM"));
7965
- args.push("REQUIRETLS");
7966
- }
8140
+ if (this._envelope.requireTLSExtensionEnabled) args.push("REQUIRETLS");
7967
8141
  this._sendCommand("MAIL FROM:<" + this._envelope.from + ">" + (args.length ? " " + args.join(" ") : ""));
7968
8142
  }
7969
8143
  _setDsnEnvelope(params) {
@@ -9963,8 +10137,11 @@ var require_smtp_transport = /* @__PURE__ */ __commonJSMin(((exports, module) =>
9963
10137
  return setImmediate(() => callback(null, false));
9964
10138
  }
9965
10139
  getAuth(authOpts) {
9966
- if (!authOpts) return this.auth;
9967
- const authData = Object.assign({}, this.options.auth && typeof this.options.auth === "object" ? this.options.auth : {}, authOpts && typeof authOpts === "object" ? authOpts : {});
10140
+ if (!authOpts) {
10141
+ if (this.auth && this.auth.oauth2 && this.mailer) this.auth.oauth2.provisionCallback = this.mailer.get("oauth2_provision_cb") || this.auth.oauth2.provisionCallback;
10142
+ return this.auth;
10143
+ }
10144
+ const authData = Object.assign({}, this.options.auth && typeof this.options.auth === "object" ? this.options.auth : {}, typeof authOpts === "object" ? authOpts : {});
9968
10145
  if (Object.keys(authData).length === 0) return false;
9969
10146
  switch ((authData.type || "").toString().toUpperCase()) {
9970
10147
  case "OAUTH2": {
@@ -10188,6 +10365,8 @@ var require_sendmail_transport = /* @__PURE__ */ __commonJSMin(((exports, module
10188
10365
  const packageData = require_package();
10189
10366
  const shared = require_shared();
10190
10367
  const errors = require_errors();
10368
+ const LeWindows = require_le_windows();
10369
+ const LeUnix = require_le_unix();
10191
10370
  /**
10192
10371
  * Generates a Transport object for Sendmail
10193
10372
  *
@@ -10215,6 +10394,12 @@ var require_sendmail_transport = /* @__PURE__ */ __commonJSMin(((exports, module
10215
10394
  if (options.path) this.path = options.path;
10216
10395
  if (Array.isArray(options.args)) this.args = options.args;
10217
10396
  }
10397
+ this.winbreak = [
10398
+ "win",
10399
+ "windows",
10400
+ "dos",
10401
+ "\r\n"
10402
+ ].includes((options.newline || "").toString().toLowerCase());
10218
10403
  }
10219
10404
  /**
10220
10405
  * <p>Compiles a mailcomposer message and forwards it to handler that sends it.</p>
@@ -10292,7 +10477,12 @@ var require_sendmail_transport = /* @__PURE__ */ __commonJSMin(((exports, module
10292
10477
  messageId
10293
10478
  }, "Sending message %s to <%s>", messageId, recipients.join(", "));
10294
10479
  const sourceStream = mail.message.createReadStream();
10295
- sourceStream.once("error", (err) => {
10480
+ let stream = sourceStream;
10481
+ if (this.options.newline) {
10482
+ stream = sourceStream.pipe(this.winbreak ? new LeWindows() : new LeUnix());
10483
+ sourceStream.once("error", (err) => stream.emit("error", err));
10484
+ }
10485
+ stream.once("error", (err) => {
10296
10486
  this.logger.error({
10297
10487
  err,
10298
10488
  tnx: "stdin",
@@ -10301,7 +10491,7 @@ var require_sendmail_transport = /* @__PURE__ */ __commonJSMin(((exports, module
10301
10491
  sendmail.kill("SIGINT");
10302
10492
  callback(err);
10303
10493
  });
10304
- sourceStream.pipe(sendmail.stdin);
10494
+ stream.pipe(sendmail.stdin);
10305
10495
  } else {
10306
10496
  const err = /* @__PURE__ */ new Error("sendmail was not found");
10307
10497
  err.code = errors.ESENDMAIL;
@@ -10316,6 +10506,8 @@ var require_sendmail_transport = /* @__PURE__ */ __commonJSMin(((exports, module
10316
10506
  var require_stream_transport = /* @__PURE__ */ __commonJSMin(((exports, module) => {
10317
10507
  const packageData = require_package();
10318
10508
  const shared = require_shared();
10509
+ const LeWindows = require_le_windows();
10510
+ const LeUnix = require_le_unix();
10319
10511
  /**
10320
10512
  * Generates a Transport object for streaming
10321
10513
  *
@@ -10361,6 +10553,11 @@ var require_stream_transport = /* @__PURE__ */ __commonJSMin(((exports, module)
10361
10553
  let stream;
10362
10554
  try {
10363
10555
  stream = mail.message.createReadStream();
10556
+ if (this.options.newline) {
10557
+ const sourceStream = stream;
10558
+ stream = sourceStream.pipe(this.winbreak ? new LeWindows() : new LeUnix());
10559
+ sourceStream.once("error", (err) => stream.emit("error", err));
10560
+ }
10364
10561
  } catch (E) {
10365
10562
  this.logger.error({
10366
10563
  err: E,
@@ -10474,9 +10671,19 @@ var require_ses_transport = /* @__PURE__ */ __commonJSMin(((exports, module) =>
10474
10671
  const EventEmitter = __require("events");
10475
10672
  const packageData = require_package();
10476
10673
  const shared = require_shared();
10674
+ const errors = require_errors();
10477
10675
  const LeWindows = require_le_windows();
10478
10676
  const MimeNode = require_mime_node();
10479
10677
  /**
10678
+ * Tags AWS SDK rejections that carry no `code` property (SDK v3 errors only
10679
+ * have a `name`) with the generic SES transport error code, keeping the
10680
+ * original error object intact
10681
+ */
10682
+ function tagSesError(err) {
10683
+ if (err && typeof err === "object" && !err.code) err.code = errors.ESES;
10684
+ return err;
10685
+ }
10686
+ /**
10480
10687
  * Generates a Transport object for AWS SES
10481
10688
  *
10482
10689
  * @constructor
@@ -10493,7 +10700,7 @@ var require_ses_transport = /* @__PURE__ */ __commonJSMin(((exports, module) =>
10493
10700
  this.logger = shared.getLogger(this.options, { component: this.options.component || "ses-transport" });
10494
10701
  }
10495
10702
  getRegion(cb) {
10496
- if (this.ses.sesClient.config && typeof this.ses.sesClient.config.region === "function") return this.ses.sesClient.config.region().then((region) => cb(null, region)).catch((err) => cb(err));
10703
+ if (this.ses.sesClient.config && typeof this.ses.sesClient.config.region === "function") return this.ses.sesClient.config.region().then((region) => cb(null, region), (err) => cb(err));
10497
10704
  return cb(null, false);
10498
10705
  }
10499
10706
  /**
@@ -10551,10 +10758,22 @@ var require_ses_transport = /* @__PURE__ */ __commonJSMin(((exports, module) =>
10551
10758
  }, mail.data.ses || {});
10552
10759
  this.getRegion((err, region) => {
10553
10760
  if (err || !region) region = "us-east-1";
10554
- const command = new this.ses.SendEmailCommand(sesMessage);
10555
- this.ses.sesClient.send(command).then((data) => {
10761
+ let sendPromise;
10762
+ try {
10763
+ const command = new this.ses.SendEmailCommand(sesMessage);
10764
+ sendPromise = this.ses.sesClient.send(command);
10765
+ } catch (err) {
10766
+ tagSesError(err);
10767
+ this.logger.error({
10768
+ err,
10769
+ tnx: "send"
10770
+ }, "Send error for %s: %s", messageId, err.message);
10771
+ setImmediate(() => callback(err));
10772
+ return;
10773
+ }
10774
+ sendPromise.then((data) => {
10556
10775
  if (region === "us-east-1") region = "email";
10557
- callback(null, {
10776
+ const info = {
10558
10777
  envelope: {
10559
10778
  from: envelope.from,
10560
10779
  to: envelope.to
@@ -10562,13 +10781,15 @@ var require_ses_transport = /* @__PURE__ */ __commonJSMin(((exports, module) =>
10562
10781
  messageId: "<" + data.MessageId + (!/@/.test(data.MessageId) ? "@" + region + ".amazonses.com" : "") + ">",
10563
10782
  response: data.MessageId,
10564
10783
  raw
10565
- });
10784
+ };
10785
+ setImmediate(() => callback(null, info));
10566
10786
  }).catch((err) => {
10787
+ tagSesError(err);
10567
10788
  this.logger.error({
10568
10789
  err,
10569
10790
  tnx: "send"
10570
10791
  }, "Send error for %s: %s", messageId, err.message);
10571
- callback(err);
10792
+ setImmediate(() => callback(err));
10572
10793
  });
10573
10794
  });
10574
10795
  }));
@@ -10584,7 +10805,7 @@ var require_ses_transport = /* @__PURE__ */ __commonJSMin(((exports, module) =>
10584
10805
  callback = shared.callbackPromise(resolve, reject);
10585
10806
  });
10586
10807
  const cb = (err) => {
10587
- if (err && !["InvalidParameterValue", "MessageRejected"].includes(err.code || err.Code || err.name)) return callback(err);
10808
+ if (err && !["InvalidParameterValue", "MessageRejected"].includes(err.code || err.Code || err.name)) return callback(tagSesError(err));
10588
10809
  return callback(null, true);
10589
10810
  };
10590
10811
  const sesMessage = {
@@ -10592,10 +10813,16 @@ var require_ses_transport = /* @__PURE__ */ __commonJSMin(((exports, module) =>
10592
10813
  FromEmailAddress: "invalid@invalid",
10593
10814
  Destination: { ToAddresses: ["invalid@invalid"] }
10594
10815
  };
10595
- this.getRegion((err, region) => {
10596
- if (err || !region) region = "us-east-1";
10597
- const command = new this.ses.SendEmailCommand(sesMessage);
10598
- this.ses.sesClient.send(command).then((data) => cb(null, data)).catch((err) => cb(err));
10816
+ this.getRegion(() => {
10817
+ let sendPromise;
10818
+ try {
10819
+ const command = new this.ses.SendEmailCommand(sesMessage);
10820
+ sendPromise = this.ses.sesClient.send(command);
10821
+ } catch (err) {
10822
+ setImmediate(() => cb(err));
10823
+ return;
10824
+ }
10825
+ sendPromise.then(() => setImmediate(() => cb(null))).catch((err) => setImmediate(() => cb(err)));
10599
10826
  });
10600
10827
  return promise;
10601
10828
  }
@@ -10703,11 +10930,13 @@ var import_nodemailer = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin((
10703
10930
  module.exports.getTestMessageUrl = function(info) {
10704
10931
  if (!info || !info.response) return false;
10705
10932
  const infoProps = /* @__PURE__ */ new Map();
10706
- info.response.replace(/\[([^\]]+)\]$/, (m, props) => {
10707
- props.replace(/\b([A-Z0-9]+)=([^\s]+)/g, (m, key, value) => {
10933
+ const response = info.response.toString();
10934
+ if (response.length > 2 && response.charAt(response.length - 1) === "]") {
10935
+ const open = response.indexOf("[", response.lastIndexOf("]", response.length - 2) + 1);
10936
+ if (open >= 0 && open < response.length - 2) response.substring(open + 1, response.length - 1).replace(/\b([A-Z0-9]+)=([^\s]+)/g, (m, key, value) => {
10708
10937
  infoProps.set(key, value);
10709
10938
  });
10710
- });
10939
+ }
10711
10940
  if (infoProps.has("STATUS") && infoProps.has("MSGID")) return (testAccount.web || ETHEREAL_WEB) + "/message/" + infoProps.get("MSGID");
10712
10941
  return false;
10713
10942
  };
@@ -10715,31 +10944,25 @@ var import_nodemailer = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin((
10715
10944
  /**
10716
10945
  * Environment variables for nodemailer configuration
10717
10946
  */
10718
- const envSchema = t.object({
10719
- EMAIL_HOST: t.optional(t.text({ description: "SMTP server host" })),
10720
- EMAIL_PORT: t.number({
10721
- default: 587,
10722
- description: "SMTP server port"
10723
- }),
10724
- EMAIL_USER: t.optional(t.text({ description: "SMTP authentication username" })),
10725
- EMAIL_PASS: t.optional(t.text({ description: "SMTP authentication password" })),
10726
- EMAIL_FROM: t.optional(t.text({ description: "Default from email address" })),
10727
- EMAIL_SECURE: t.boolean({
10728
- default: false,
10729
- description: "Use secure connection (TLS)"
10730
- })
10947
+ const envSchema = z.object({
10948
+ EMAIL_HOST: z.text({ description: "SMTP server host" }).optional(),
10949
+ EMAIL_PORT: z.number().describe("SMTP server port").default(587),
10950
+ EMAIL_USER: z.text({ description: "SMTP authentication username" }).optional(),
10951
+ EMAIL_PASS: z.text({ description: "SMTP authentication password" }).optional(),
10952
+ EMAIL_FROM: z.text({ description: "Default from email address" }).optional(),
10953
+ EMAIL_SECURE: z.boolean().describe("Use secure connection (TLS)").default(false)
10731
10954
  });
10732
10955
  /**
10733
10956
  * Nodemailer connection pooling and rate limiting options
10734
10957
  */
10735
10958
  const nodemailerEmailOptions = $atom({
10736
10959
  name: "alepha.email.nodemailer.options",
10737
- schema: t.object({
10738
- pool: t.optional(t.boolean({ description: "Enable connection pooling" })),
10739
- maxConnections: t.optional(t.number({ description: "Maximum number of connections in pool" })),
10740
- maxMessages: t.optional(t.number({ description: "Maximum messages per connection" })),
10741
- rateDelta: t.optional(t.number({ description: "Time in milliseconds between message sends" })),
10742
- rateLimit: t.optional(t.number({ description: "Maximum number of messages per rateDelta" }))
10960
+ schema: z.object({
10961
+ pool: z.boolean().describe("Enable connection pooling").optional(),
10962
+ maxConnections: z.number().describe("Maximum number of connections in pool").optional(),
10963
+ maxMessages: z.number().describe("Maximum messages per connection").optional(),
10964
+ rateDelta: z.number().describe("Time in milliseconds between message sends").optional(),
10965
+ rateLimit: z.number().describe("Maximum number of messages per rateDelta").optional()
10743
10966
  }),
10744
10967
  default: {}
10745
10968
  });