mimarjs 0.0.0-stage → 0.0.1-alpha.1

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 (1364) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +50 -2
  3. package/bin/mimar.js +32 -0
  4. package/dist/auth/auth.d.ts +86 -0
  5. package/dist/auth/auth.d.ts.map +1 -0
  6. package/dist/auth/auth.js +212 -0
  7. package/dist/auth/auth.js.map +1 -0
  8. package/dist/auth/errors.d.ts +44 -0
  9. package/dist/auth/errors.d.ts.map +1 -0
  10. package/dist/auth/errors.js +66 -0
  11. package/dist/auth/errors.js.map +1 -0
  12. package/dist/auth/index.d.ts +9 -0
  13. package/dist/auth/index.d.ts.map +1 -0
  14. package/dist/auth/index.js +9 -0
  15. package/dist/auth/index.js.map +1 -0
  16. package/dist/auth/manager.d.ts +109 -0
  17. package/dist/auth/manager.d.ts.map +1 -0
  18. package/dist/auth/manager.js +113 -0
  19. package/dist/auth/manager.js.map +1 -0
  20. package/dist/auth/middleware.d.ts +26 -0
  21. package/dist/auth/middleware.d.ts.map +1 -0
  22. package/dist/auth/middleware.js +152 -0
  23. package/dist/auth/middleware.js.map +1 -0
  24. package/dist/auth/passwords.d.ts +45 -0
  25. package/dist/auth/passwords.d.ts.map +1 -0
  26. package/dist/auth/passwords.js +104 -0
  27. package/dist/auth/passwords.js.map +1 -0
  28. package/dist/auth/policy.d.ts +57 -0
  29. package/dist/auth/policy.d.ts.map +1 -0
  30. package/dist/auth/policy.js +115 -0
  31. package/dist/auth/policy.js.map +1 -0
  32. package/dist/auth/setup.d.ts +55 -0
  33. package/dist/auth/setup.d.ts.map +1 -0
  34. package/dist/auth/setup.js +50 -0
  35. package/dist/auth/setup.js.map +1 -0
  36. package/dist/auth/state.d.ts +19 -0
  37. package/dist/auth/state.d.ts.map +1 -0
  38. package/dist/auth/state.js +19 -0
  39. package/dist/auth/state.js.map +1 -0
  40. package/dist/auth/tokens.d.ts +22 -0
  41. package/dist/auth/tokens.d.ts.map +1 -0
  42. package/dist/auth/tokens.js +51 -0
  43. package/dist/auth/tokens.js.map +1 -0
  44. package/dist/auth/verification.d.ts +31 -0
  45. package/dist/auth/verification.d.ts.map +1 -0
  46. package/dist/auth/verification.js +77 -0
  47. package/dist/auth/verification.js.map +1 -0
  48. package/dist/aws/index.d.ts +2 -0
  49. package/dist/aws/index.d.ts.map +1 -0
  50. package/dist/aws/index.js +2 -0
  51. package/dist/aws/index.js.map +1 -0
  52. package/dist/aws/signer.d.ts +47 -0
  53. package/dist/aws/signer.d.ts.map +1 -0
  54. package/dist/aws/signer.js +130 -0
  55. package/dist/aws/signer.js.map +1 -0
  56. package/dist/broadcast/index.d.ts +2 -0
  57. package/dist/broadcast/index.d.ts.map +1 -0
  58. package/dist/broadcast/index.js +2 -0
  59. package/dist/broadcast/index.js.map +1 -0
  60. package/dist/cache/cache.d.ts +129 -0
  61. package/dist/cache/cache.d.ts.map +1 -0
  62. package/dist/cache/cache.js +407 -0
  63. package/dist/cache/cache.js.map +1 -0
  64. package/dist/cache/database.d.ts +38 -0
  65. package/dist/cache/database.d.ts.map +1 -0
  66. package/dist/cache/database.js +210 -0
  67. package/dist/cache/database.js.map +1 -0
  68. package/dist/cache/file.d.ts +18 -0
  69. package/dist/cache/file.d.ts.map +1 -0
  70. package/dist/cache/file.js +237 -0
  71. package/dist/cache/file.js.map +1 -0
  72. package/dist/cache/index.d.ts +9 -0
  73. package/dist/cache/index.d.ts.map +1 -0
  74. package/dist/cache/index.js +9 -0
  75. package/dist/cache/index.js.map +1 -0
  76. package/dist/cache/manager.d.ts +42 -0
  77. package/dist/cache/manager.d.ts.map +1 -0
  78. package/dist/cache/manager.js +107 -0
  79. package/dist/cache/manager.js.map +1 -0
  80. package/dist/cache/module.d.ts +41 -0
  81. package/dist/cache/module.d.ts.map +1 -0
  82. package/dist/cache/module.js +49 -0
  83. package/dist/cache/module.js.map +1 -0
  84. package/dist/cache/rate-limiter.d.ts +76 -0
  85. package/dist/cache/rate-limiter.d.ts.map +1 -0
  86. package/dist/cache/rate-limiter.js +119 -0
  87. package/dist/cache/rate-limiter.js.map +1 -0
  88. package/dist/cache/redis.d.ts +19 -0
  89. package/dist/cache/redis.d.ts.map +1 -0
  90. package/dist/cache/redis.js +99 -0
  91. package/dist/cache/redis.js.map +1 -0
  92. package/dist/cache/store.d.ts +78 -0
  93. package/dist/cache/store.d.ts.map +1 -0
  94. package/dist/cache/store.js +162 -0
  95. package/dist/cache/store.js.map +1 -0
  96. package/dist/client/index.d.ts +4 -0
  97. package/dist/client/index.d.ts.map +1 -0
  98. package/dist/client/index.js +2 -0
  99. package/dist/client/index.js.map +1 -0
  100. package/dist/client/pages.d.ts +51 -0
  101. package/dist/client/pages.d.ts.map +1 -0
  102. package/dist/client/pages.js +2 -0
  103. package/dist/client/pages.js.map +1 -0
  104. package/dist/client/routes.d.ts +22 -0
  105. package/dist/client/routes.d.ts.map +1 -0
  106. package/dist/client/routes.js +66 -0
  107. package/dist/client/routes.js.map +1 -0
  108. package/dist/client/wire.d.ts +44 -0
  109. package/dist/client/wire.d.ts.map +1 -0
  110. package/dist/client/wire.js +2 -0
  111. package/dist/client/wire.js.map +1 -0
  112. package/dist/config/config.d.ts +39 -0
  113. package/dist/config/config.d.ts.map +1 -0
  114. package/dist/config/config.js +44 -0
  115. package/dist/config/config.js.map +1 -0
  116. package/dist/config/index.d.ts +3 -0
  117. package/dist/config/index.d.ts.map +1 -0
  118. package/dist/config/index.js +3 -0
  119. package/dist/config/index.js.map +1 -0
  120. package/dist/config/sections.d.ts +243 -0
  121. package/dist/config/sections.d.ts.map +1 -0
  122. package/dist/config/sections.js +250 -0
  123. package/dist/config/sections.js.map +1 -0
  124. package/dist/console/command.d.ts +82 -0
  125. package/dist/console/command.d.ts.map +1 -0
  126. package/dist/console/command.js +82 -0
  127. package/dist/console/command.js.map +1 -0
  128. package/dist/console/index.d.ts +4 -0
  129. package/dist/console/index.d.ts.map +1 -0
  130. package/dist/console/index.js +4 -0
  131. package/dist/console/index.js.map +1 -0
  132. package/dist/console/io.d.ts +79 -0
  133. package/dist/console/io.d.ts.map +1 -0
  134. package/dist/console/io.js +214 -0
  135. package/dist/console/io.js.map +1 -0
  136. package/dist/console/kernel.d.ts +38 -0
  137. package/dist/console/kernel.d.ts.map +1 -0
  138. package/dist/console/kernel.js +279 -0
  139. package/dist/console/kernel.js.map +1 -0
  140. package/dist/container/container.d.ts +47 -0
  141. package/dist/container/container.d.ts.map +1 -0
  142. package/dist/container/container.js +130 -0
  143. package/dist/container/container.js.map +1 -0
  144. package/dist/container/index.d.ts +2 -0
  145. package/dist/container/index.d.ts.map +1 -0
  146. package/dist/container/index.js +2 -0
  147. package/dist/container/index.js.map +1 -0
  148. package/dist/cookie/index.d.ts +2 -0
  149. package/dist/cookie/index.d.ts.map +1 -0
  150. package/dist/cookie/index.js +2 -0
  151. package/dist/cookie/index.js.map +1 -0
  152. package/dist/crypt/crypt.d.ts +48 -0
  153. package/dist/crypt/crypt.d.ts.map +1 -0
  154. package/dist/crypt/crypt.js +151 -0
  155. package/dist/crypt/crypt.js.map +1 -0
  156. package/dist/crypt/index.d.ts +2 -0
  157. package/dist/crypt/index.d.ts.map +1 -0
  158. package/dist/crypt/index.js +2 -0
  159. package/dist/crypt/index.js.map +1 -0
  160. package/dist/db/codec.d.ts +36 -0
  161. package/dist/db/codec.d.ts.map +1 -0
  162. package/dist/db/codec.js +129 -0
  163. package/dist/db/codec.js.map +1 -0
  164. package/dist/db/contract.d.ts +103 -0
  165. package/dist/db/contract.d.ts.map +1 -0
  166. package/dist/db/contract.js +2 -0
  167. package/dist/db/contract.js.map +1 -0
  168. package/dist/db/db.d.ts +41 -0
  169. package/dist/db/db.d.ts.map +1 -0
  170. package/dist/db/db.js +48 -0
  171. package/dist/db/db.js.map +1 -0
  172. package/dist/db/drivers/better-sqlite3.d.ts +4 -0
  173. package/dist/db/drivers/better-sqlite3.d.ts.map +1 -0
  174. package/dist/db/drivers/better-sqlite3.js +49 -0
  175. package/dist/db/drivers/better-sqlite3.js.map +1 -0
  176. package/dist/db/drivers/mysql.d.ts +5 -0
  177. package/dist/db/drivers/mysql.d.ts.map +1 -0
  178. package/dist/db/drivers/mysql.js +318 -0
  179. package/dist/db/drivers/mysql.js.map +1 -0
  180. package/dist/db/drivers/pgsql.d.ts +5 -0
  181. package/dist/db/drivers/pgsql.d.ts.map +1 -0
  182. package/dist/db/drivers/pgsql.js +261 -0
  183. package/dist/db/drivers/pgsql.js.map +1 -0
  184. package/dist/db/drivers/sqlite.d.ts +51 -0
  185. package/dist/db/drivers/sqlite.d.ts.map +1 -0
  186. package/dist/db/drivers/sqlite.js +251 -0
  187. package/dist/db/drivers/sqlite.js.map +1 -0
  188. package/dist/db/errors.d.ts +65 -0
  189. package/dist/db/errors.d.ts.map +1 -0
  190. package/dist/db/errors.js +101 -0
  191. package/dist/db/errors.js.map +1 -0
  192. package/dist/db/grammars/grammar.d.ts +77 -0
  193. package/dist/db/grammars/grammar.d.ts.map +1 -0
  194. package/dist/db/grammars/grammar.js +345 -0
  195. package/dist/db/grammars/grammar.js.map +1 -0
  196. package/dist/db/grammars/mysql.d.ts +45 -0
  197. package/dist/db/grammars/mysql.d.ts.map +1 -0
  198. package/dist/db/grammars/mysql.js +147 -0
  199. package/dist/db/grammars/mysql.js.map +1 -0
  200. package/dist/db/grammars/pgsql.d.ts +20 -0
  201. package/dist/db/grammars/pgsql.d.ts.map +1 -0
  202. package/dist/db/grammars/pgsql.js +66 -0
  203. package/dist/db/grammars/pgsql.js.map +1 -0
  204. package/dist/db/grammars/sqlite.d.ts +27 -0
  205. package/dist/db/grammars/sqlite.d.ts.map +1 -0
  206. package/dist/db/grammars/sqlite.js +95 -0
  207. package/dist/db/grammars/sqlite.js.map +1 -0
  208. package/dist/db/index.d.ts +18 -0
  209. package/dist/db/index.d.ts.map +1 -0
  210. package/dist/db/index.js +17 -0
  211. package/dist/db/index.js.map +1 -0
  212. package/dist/db/kysely/index.d.ts +2 -0
  213. package/dist/db/kysely/index.d.ts.map +1 -0
  214. package/dist/db/kysely/index.js +2 -0
  215. package/dist/db/kysely/index.js.map +1 -0
  216. package/dist/db/kysely/kysely.d.ts +15 -0
  217. package/dist/db/kysely/kysely.d.ts.map +1 -0
  218. package/dist/db/kysely/kysely.js +127 -0
  219. package/dist/db/kysely/kysely.js.map +1 -0
  220. package/dist/db/manager.d.ts +138 -0
  221. package/dist/db/manager.d.ts.map +1 -0
  222. package/dist/db/manager.js +776 -0
  223. package/dist/db/manager.js.map +1 -0
  224. package/dist/db/pool.d.ts +28 -0
  225. package/dist/db/pool.d.ts.map +1 -0
  226. package/dist/db/pool.js +114 -0
  227. package/dist/db/pool.js.map +1 -0
  228. package/dist/db/query/builder.d.ts +290 -0
  229. package/dist/db/query/builder.d.ts.map +1 -0
  230. package/dist/db/query/builder.js +957 -0
  231. package/dist/db/query/builder.js.map +1 -0
  232. package/dist/db/query/state.d.ts +183 -0
  233. package/dist/db/query/state.d.ts.map +1 -0
  234. package/dist/db/query/state.js +48 -0
  235. package/dist/db/query/state.js.map +1 -0
  236. package/dist/db/sql.d.ts +82 -0
  237. package/dist/db/sql.d.ts.map +1 -0
  238. package/dist/db/sql.js +143 -0
  239. package/dist/db/sql.js.map +1 -0
  240. package/dist/env/env.d.ts +61 -0
  241. package/dist/env/env.d.ts.map +1 -0
  242. package/dist/env/env.js +184 -0
  243. package/dist/env/env.js.map +1 -0
  244. package/dist/env/index.d.ts +2 -0
  245. package/dist/env/index.d.ts.map +1 -0
  246. package/dist/env/index.js +2 -0
  247. package/dist/env/index.js.map +1 -0
  248. package/dist/errors/errors.d.ts +42 -0
  249. package/dist/errors/errors.d.ts.map +1 -0
  250. package/dist/errors/errors.js +60 -0
  251. package/dist/errors/errors.js.map +1 -0
  252. package/dist/errors/index.d.ts +2 -0
  253. package/dist/errors/index.d.ts.map +1 -0
  254. package/dist/errors/index.js +2 -0
  255. package/dist/errors/index.js.map +1 -0
  256. package/dist/events/event.d.ts +52 -0
  257. package/dist/events/event.d.ts.map +1 -0
  258. package/dist/events/event.js +77 -0
  259. package/dist/events/event.js.map +1 -0
  260. package/dist/events/fake.d.ts +22 -0
  261. package/dist/events/fake.d.ts.map +1 -0
  262. package/dist/events/fake.js +53 -0
  263. package/dist/events/fake.js.map +1 -0
  264. package/dist/events/index.d.ts +6 -0
  265. package/dist/events/index.d.ts.map +1 -0
  266. package/dist/events/index.js +6 -0
  267. package/dist/events/index.js.map +1 -0
  268. package/dist/events/listener.d.ts +49 -0
  269. package/dist/events/listener.d.ts.map +1 -0
  270. package/dist/events/listener.js +31 -0
  271. package/dist/events/listener.js.map +1 -0
  272. package/dist/events/manager.d.ts +54 -0
  273. package/dist/events/manager.d.ts.map +1 -0
  274. package/dist/events/manager.js +166 -0
  275. package/dist/events/manager.js.map +1 -0
  276. package/dist/events/module.d.ts +10 -0
  277. package/dist/events/module.d.ts.map +1 -0
  278. package/dist/events/module.js +12 -0
  279. package/dist/events/module.js.map +1 -0
  280. package/dist/factory/factory.d.ts +93 -0
  281. package/dist/factory/factory.d.ts.map +1 -0
  282. package/dist/factory/factory.js +261 -0
  283. package/dist/factory/factory.js.map +1 -0
  284. package/dist/factory/fake.d.ts +92 -0
  285. package/dist/factory/fake.d.ts.map +1 -0
  286. package/dist/factory/fake.js +328 -0
  287. package/dist/factory/fake.js.map +1 -0
  288. package/dist/factory/index.d.ts +4 -0
  289. package/dist/factory/index.d.ts.map +1 -0
  290. package/dist/factory/index.js +4 -0
  291. package/dist/factory/index.js.map +1 -0
  292. package/dist/factory/seed.d.ts +21 -0
  293. package/dist/factory/seed.d.ts.map +1 -0
  294. package/dist/factory/seed.js +55 -0
  295. package/dist/factory/seed.js.map +1 -0
  296. package/dist/feature/index.d.ts +2 -0
  297. package/dist/feature/index.d.ts.map +1 -0
  298. package/dist/feature/index.js +2 -0
  299. package/dist/feature/index.js.map +1 -0
  300. package/dist/foundation/application.d.ts +156 -0
  301. package/dist/foundation/application.d.ts.map +1 -0
  302. package/dist/foundation/application.js +1258 -0
  303. package/dist/foundation/application.js.map +1 -0
  304. package/dist/foundation/cache-commands.d.ts +7 -0
  305. package/dist/foundation/cache-commands.d.ts.map +1 -0
  306. package/dist/foundation/cache-commands.js +48 -0
  307. package/dist/foundation/cache-commands.js.map +1 -0
  308. package/dist/foundation/command-result.d.ts +14 -0
  309. package/dist/foundation/command-result.d.ts.map +1 -0
  310. package/dist/foundation/command-result.js +43 -0
  311. package/dist/foundation/command-result.js.map +1 -0
  312. package/dist/foundation/commands.d.ts +159 -0
  313. package/dist/foundation/commands.d.ts.map +1 -0
  314. package/dist/foundation/commands.js +404 -0
  315. package/dist/foundation/commands.js.map +1 -0
  316. package/dist/foundation/database-commands.d.ts +24 -0
  317. package/dist/foundation/database-commands.d.ts.map +1 -0
  318. package/dist/foundation/database-commands.js +304 -0
  319. package/dist/foundation/database-commands.js.map +1 -0
  320. package/dist/foundation/debug-page.d.ts +11 -0
  321. package/dist/foundation/debug-page.d.ts.map +1 -0
  322. package/dist/foundation/debug-page.js +112 -0
  323. package/dist/foundation/debug-page.js.map +1 -0
  324. package/dist/foundation/dev-vite.d.ts +2 -0
  325. package/dist/foundation/dev-vite.d.ts.map +1 -0
  326. package/dist/foundation/dev-vite.js +39 -0
  327. package/dist/foundation/dev-vite.js.map +1 -0
  328. package/dist/foundation/dev.d.ts +31 -0
  329. package/dist/foundation/dev.d.ts.map +1 -0
  330. package/dist/foundation/dev.js +430 -0
  331. package/dist/foundation/dev.js.map +1 -0
  332. package/dist/foundation/discovery.d.ts +41 -0
  333. package/dist/foundation/discovery.d.ts.map +1 -0
  334. package/dist/foundation/discovery.js +69 -0
  335. package/dist/foundation/discovery.js.map +1 -0
  336. package/dist/foundation/error-pages.d.ts +10 -0
  337. package/dist/foundation/error-pages.d.ts.map +1 -0
  338. package/dist/foundation/error-pages.js +38 -0
  339. package/dist/foundation/error-pages.js.map +1 -0
  340. package/dist/foundation/exceptions.d.ts +20 -0
  341. package/dist/foundation/exceptions.d.ts.map +1 -0
  342. package/dist/foundation/exceptions.js +36 -0
  343. package/dist/foundation/exceptions.js.map +1 -0
  344. package/dist/foundation/generators.d.ts +71 -0
  345. package/dist/foundation/generators.d.ts.map +1 -0
  346. package/dist/foundation/generators.js +577 -0
  347. package/dist/foundation/generators.js.map +1 -0
  348. package/dist/foundation/helpers.d.ts +7 -0
  349. package/dist/foundation/helpers.d.ts.map +1 -0
  350. package/dist/foundation/helpers.js +12 -0
  351. package/dist/foundation/helpers.js.map +1 -0
  352. package/dist/foundation/index.d.ts +8 -0
  353. package/dist/foundation/index.d.ts.map +1 -0
  354. package/dist/foundation/index.js +8 -0
  355. package/dist/foundation/index.js.map +1 -0
  356. package/dist/foundation/install-api.d.ts +4 -0
  357. package/dist/foundation/install-api.d.ts.map +1 -0
  358. package/dist/foundation/install-api.js +91 -0
  359. package/dist/foundation/install-api.js.map +1 -0
  360. package/dist/foundation/provider.d.ts +83 -0
  361. package/dist/foundation/provider.d.ts.map +1 -0
  362. package/dist/foundation/provider.js +13 -0
  363. package/dist/foundation/provider.js.map +1 -0
  364. package/dist/foundation/queue-commands.d.ts +38 -0
  365. package/dist/foundation/queue-commands.d.ts.map +1 -0
  366. package/dist/foundation/queue-commands.js +279 -0
  367. package/dist/foundation/queue-commands.js.map +1 -0
  368. package/dist/foundation/route-types.d.ts +22 -0
  369. package/dist/foundation/route-types.d.ts.map +1 -0
  370. package/dist/foundation/route-types.js +158 -0
  371. package/dist/foundation/route-types.js.map +1 -0
  372. package/dist/foundation/schedule-commands.d.ts +4 -0
  373. package/dist/foundation/schedule-commands.d.ts.map +1 -0
  374. package/dist/foundation/schedule-commands.js +128 -0
  375. package/dist/foundation/schedule-commands.js.map +1 -0
  376. package/dist/foundation/stubs/api.d.ts +9 -0
  377. package/dist/foundation/stubs/api.d.ts.map +1 -0
  378. package/dist/foundation/stubs/api.js +225 -0
  379. package/dist/foundation/stubs/api.js.map +1 -0
  380. package/dist/foundation/stubs/handler.d.ts +15 -0
  381. package/dist/foundation/stubs/handler.d.ts.map +1 -0
  382. package/dist/foundation/stubs/handler.js +54 -0
  383. package/dist/foundation/stubs/handler.js.map +1 -0
  384. package/dist/foundation/stubs/others.d.ts +53 -0
  385. package/dist/foundation/stubs/others.d.ts.map +1 -0
  386. package/dist/foundation/stubs/others.js +159 -0
  387. package/dist/foundation/stubs/others.js.map +1 -0
  388. package/dist/foundation/test-command.d.ts +9 -0
  389. package/dist/foundation/test-command.d.ts.map +1 -0
  390. package/dist/foundation/test-command.js +43 -0
  391. package/dist/foundation/test-command.js.map +1 -0
  392. package/dist/hash/hash.d.ts +44 -0
  393. package/dist/hash/hash.d.ts.map +1 -0
  394. package/dist/hash/hash.js +94 -0
  395. package/dist/hash/hash.js.map +1 -0
  396. package/dist/hash/index.d.ts +2 -0
  397. package/dist/hash/index.d.ts.map +1 -0
  398. package/dist/hash/index.js +2 -0
  399. package/dist/hash/index.js.map +1 -0
  400. package/dist/http/cookies.d.ts +37 -0
  401. package/dist/http/cookies.d.ts.map +1 -0
  402. package/dist/http/cookies.js +86 -0
  403. package/dist/http/cookies.js.map +1 -0
  404. package/dist/http/csrf.d.ts +24 -0
  405. package/dist/http/csrf.d.ts.map +1 -0
  406. package/dist/http/csrf.js +93 -0
  407. package/dist/http/csrf.js.map +1 -0
  408. package/dist/http/form.d.ts +11 -0
  409. package/dist/http/form.d.ts.map +1 -0
  410. package/dist/http/form.js +57 -0
  411. package/dist/http/form.js.map +1 -0
  412. package/dist/http/index.d.ts +18 -0
  413. package/dist/http/index.d.ts.map +1 -0
  414. package/dist/http/index.js +18 -0
  415. package/dist/http/index.js.map +1 -0
  416. package/dist/http/kernel.d.ts +82 -0
  417. package/dist/http/kernel.d.ts.map +1 -0
  418. package/dist/http/kernel.js +454 -0
  419. package/dist/http/kernel.js.map +1 -0
  420. package/dist/http/maintenance.d.ts +25 -0
  421. package/dist/http/maintenance.d.ts.map +1 -0
  422. package/dist/http/maintenance.js +70 -0
  423. package/dist/http/maintenance.js.map +1 -0
  424. package/dist/http/middleware.d.ts +75 -0
  425. package/dist/http/middleware.d.ts.map +1 -0
  426. package/dist/http/middleware.js +169 -0
  427. package/dist/http/middleware.js.map +1 -0
  428. package/dist/http/multipart.d.ts +4 -0
  429. package/dist/http/multipart.d.ts.map +1 -0
  430. package/dist/http/multipart.js +95 -0
  431. package/dist/http/multipart.js.map +1 -0
  432. package/dist/http/render.d.ts +19 -0
  433. package/dist/http/render.d.ts.map +1 -0
  434. package/dist/http/render.js +65 -0
  435. package/dist/http/render.js.map +1 -0
  436. package/dist/http/request.d.ts +106 -0
  437. package/dist/http/request.d.ts.map +1 -0
  438. package/dist/http/request.js +313 -0
  439. package/dist/http/request.js.map +1 -0
  440. package/dist/http/response.d.ts +128 -0
  441. package/dist/http/response.d.ts.map +1 -0
  442. package/dist/http/response.js +217 -0
  443. package/dist/http/response.js.map +1 -0
  444. package/dist/http/server.d.ts +27 -0
  445. package/dist/http/server.d.ts.map +1 -0
  446. package/dist/http/server.js +76 -0
  447. package/dist/http/server.js.map +1 -0
  448. package/dist/http/signature.d.ts +10 -0
  449. package/dist/http/signature.d.ts.map +1 -0
  450. package/dist/http/signature.js +42 -0
  451. package/dist/http/signature.js.map +1 -0
  452. package/dist/http/throttle.d.ts +26 -0
  453. package/dist/http/throttle.d.ts.map +1 -0
  454. package/dist/http/throttle.js +52 -0
  455. package/dist/http/throttle.js.map +1 -0
  456. package/dist/http/types.d.ts +66 -0
  457. package/dist/http/types.d.ts.map +1 -0
  458. package/dist/http/types.js +5 -0
  459. package/dist/http/types.js.map +1 -0
  460. package/dist/http/uploads.d.ts +46 -0
  461. package/dist/http/uploads.d.ts.map +1 -0
  462. package/dist/http/uploads.js +130 -0
  463. package/dist/http/uploads.js.map +1 -0
  464. package/dist/http/wire.d.ts +15 -0
  465. package/dist/http/wire.d.ts.map +1 -0
  466. package/dist/http/wire.js +114 -0
  467. package/dist/http/wire.js.map +1 -0
  468. package/dist/http/write.d.ts +13 -0
  469. package/dist/http/write.d.ts.map +1 -0
  470. package/dist/http/write.js +161 -0
  471. package/dist/http/write.js.map +1 -0
  472. package/dist/http-client/index.d.ts +2 -0
  473. package/dist/http-client/index.d.ts.map +1 -0
  474. package/dist/http-client/index.js +2 -0
  475. package/dist/http-client/index.js.map +1 -0
  476. package/dist/index.d.ts +8 -0
  477. package/dist/index.d.ts.map +1 -0
  478. package/dist/index.js +6 -0
  479. package/dist/index.js.map +1 -0
  480. package/dist/inertia/index.d.ts +5 -0
  481. package/dist/inertia/index.d.ts.map +1 -0
  482. package/dist/inertia/index.js +4 -0
  483. package/dist/inertia/index.js.map +1 -0
  484. package/dist/inertia/inertia.d.ts +159 -0
  485. package/dist/inertia/inertia.d.ts.map +1 -0
  486. package/dist/inertia/inertia.js +406 -0
  487. package/dist/inertia/inertia.js.map +1 -0
  488. package/dist/inertia/props.d.ts +138 -0
  489. package/dist/inertia/props.d.ts.map +1 -0
  490. package/dist/inertia/props.js +138 -0
  491. package/dist/inertia/props.js.map +1 -0
  492. package/dist/inertia/resolve.d.ts +51 -0
  493. package/dist/inertia/resolve.d.ts.map +1 -0
  494. package/dist/inertia/resolve.js +289 -0
  495. package/dist/inertia/resolve.js.map +1 -0
  496. package/dist/inertia/response.d.ts +24 -0
  497. package/dist/inertia/response.d.ts.map +1 -0
  498. package/dist/inertia/response.js +49 -0
  499. package/dist/inertia/response.js.map +1 -0
  500. package/dist/inertia/ssr-worker.d.ts +25 -0
  501. package/dist/inertia/ssr-worker.d.ts.map +1 -0
  502. package/dist/inertia/ssr-worker.js +55 -0
  503. package/dist/inertia/ssr-worker.js.map +1 -0
  504. package/dist/inertia/ssr.d.ts +49 -0
  505. package/dist/inertia/ssr.d.ts.map +1 -0
  506. package/dist/inertia/ssr.js +273 -0
  507. package/dist/inertia/ssr.js.map +1 -0
  508. package/dist/log/channels.d.ts +27 -0
  509. package/dist/log/channels.d.ts.map +1 -0
  510. package/dist/log/channels.js +95 -0
  511. package/dist/log/channels.js.map +1 -0
  512. package/dist/log/index.d.ts +4 -0
  513. package/dist/log/index.d.ts.map +1 -0
  514. package/dist/log/index.js +4 -0
  515. package/dist/log/index.js.map +1 -0
  516. package/dist/log/log.d.ts +69 -0
  517. package/dist/log/log.d.ts.map +1 -0
  518. package/dist/log/log.js +173 -0
  519. package/dist/log/log.js.map +1 -0
  520. package/dist/log/record.d.ts +26 -0
  521. package/dist/log/record.d.ts.map +1 -0
  522. package/dist/log/record.js +89 -0
  523. package/dist/log/record.js.map +1 -0
  524. package/dist/mail/address.d.ts +27 -0
  525. package/dist/mail/address.d.ts.map +1 -0
  526. package/dist/mail/address.js +44 -0
  527. package/dist/mail/address.js.map +1 -0
  528. package/dist/mail/auth.d.ts +6 -0
  529. package/dist/mail/auth.d.ts.map +1 -0
  530. package/dist/mail/auth.js +39 -0
  531. package/dist/mail/auth.js.map +1 -0
  532. package/dist/mail/components.d.ts +29 -0
  533. package/dist/mail/components.d.ts.map +1 -0
  534. package/dist/mail/components.js +87 -0
  535. package/dist/mail/components.js.map +1 -0
  536. package/dist/mail/fake.d.ts +42 -0
  537. package/dist/mail/fake.d.ts.map +1 -0
  538. package/dist/mail/fake.js +111 -0
  539. package/dist/mail/fake.js.map +1 -0
  540. package/dist/mail/index.d.ts +9 -0
  541. package/dist/mail/index.d.ts.map +1 -0
  542. package/dist/mail/index.js +9 -0
  543. package/dist/mail/index.js.map +1 -0
  544. package/dist/mail/mail.d.ts +56 -0
  545. package/dist/mail/mail.d.ts.map +1 -0
  546. package/dist/mail/mail.js +68 -0
  547. package/dist/mail/mail.js.map +1 -0
  548. package/dist/mail/manager.d.ts +77 -0
  549. package/dist/mail/manager.d.ts.map +1 -0
  550. package/dist/mail/manager.js +160 -0
  551. package/dist/mail/manager.js.map +1 -0
  552. package/dist/mail/text.d.ts +3 -0
  553. package/dist/mail/text.d.ts.map +1 -0
  554. package/dist/mail/text.js +161 -0
  555. package/dist/mail/text.js.map +1 -0
  556. package/dist/mail/transport.d.ts +57 -0
  557. package/dist/mail/transport.d.ts.map +1 -0
  558. package/dist/mail/transport.js +41 -0
  559. package/dist/mail/transport.js.map +1 -0
  560. package/dist/migrations/create-database.d.ts +6 -0
  561. package/dist/migrations/create-database.d.ts.map +1 -0
  562. package/dist/migrations/create-database.js +23 -0
  563. package/dist/migrations/create-database.js.map +1 -0
  564. package/dist/migrations/dump.d.ts +27 -0
  565. package/dist/migrations/dump.d.ts.map +1 -0
  566. package/dist/migrations/dump.js +258 -0
  567. package/dist/migrations/dump.js.map +1 -0
  568. package/dist/migrations/files.d.ts +40 -0
  569. package/dist/migrations/files.d.ts.map +1 -0
  570. package/dist/migrations/files.js +101 -0
  571. package/dist/migrations/files.js.map +1 -0
  572. package/dist/migrations/index.d.ts +5 -0
  573. package/dist/migrations/index.d.ts.map +1 -0
  574. package/dist/migrations/index.js +5 -0
  575. package/dist/migrations/index.js.map +1 -0
  576. package/dist/migrations/migrator.d.ts +97 -0
  577. package/dist/migrations/migrator.d.ts.map +1 -0
  578. package/dist/migrations/migrator.js +383 -0
  579. package/dist/migrations/migrator.js.map +1 -0
  580. package/dist/model/checks.d.ts +10 -0
  581. package/dist/model/checks.d.ts.map +1 -0
  582. package/dist/model/checks.js +171 -0
  583. package/dist/model/checks.js.map +1 -0
  584. package/dist/model/columns.d.ts +153 -0
  585. package/dist/model/columns.d.ts.map +1 -0
  586. package/dist/model/columns.js +96 -0
  587. package/dist/model/columns.js.map +1 -0
  588. package/dist/model/describe.d.ts +36 -0
  589. package/dist/model/describe.d.ts.map +1 -0
  590. package/dist/model/describe.js +57 -0
  591. package/dist/model/describe.js.map +1 -0
  592. package/dist/model/drift.d.ts +15 -0
  593. package/dist/model/drift.d.ts.map +1 -0
  594. package/dist/model/drift.js +123 -0
  595. package/dist/model/drift.js.map +1 -0
  596. package/dist/model/errors.d.ts +33 -0
  597. package/dist/model/errors.d.ts.map +1 -0
  598. package/dist/model/errors.js +55 -0
  599. package/dist/model/errors.js.map +1 -0
  600. package/dist/model/index.d.ts +14 -0
  601. package/dist/model/index.d.ts.map +1 -0
  602. package/dist/model/index.js +13 -0
  603. package/dist/model/index.js.map +1 -0
  604. package/dist/model/keys.d.ts +37 -0
  605. package/dist/model/keys.d.ts.map +1 -0
  606. package/dist/model/keys.js +39 -0
  607. package/dist/model/keys.js.map +1 -0
  608. package/dist/model/loading.d.ts +8 -0
  609. package/dist/model/loading.d.ts.map +1 -0
  610. package/dist/model/loading.js +201 -0
  611. package/dist/model/loading.js.map +1 -0
  612. package/dist/model/meta.d.ts +27 -0
  613. package/dist/model/meta.d.ts.map +1 -0
  614. package/dist/model/meta.js +110 -0
  615. package/dist/model/meta.js.map +1 -0
  616. package/dist/model/model.d.ts +107 -0
  617. package/dist/model/model.d.ts.map +1 -0
  618. package/dist/model/model.js +667 -0
  619. package/dist/model/model.js.map +1 -0
  620. package/dist/model/query.d.ts +214 -0
  621. package/dist/model/query.d.ts.map +1 -0
  622. package/dist/model/query.js +869 -0
  623. package/dist/model/query.js.map +1 -0
  624. package/dist/model/related.d.ts +40 -0
  625. package/dist/model/related.d.ts.map +1 -0
  626. package/dist/model/related.js +274 -0
  627. package/dist/model/related.js.map +1 -0
  628. package/dist/model/relations.d.ts +160 -0
  629. package/dist/model/relations.d.ts.map +1 -0
  630. package/dist/model/relations.js +44 -0
  631. package/dist/model/relations.js.map +1 -0
  632. package/dist/model/types.d.ts +461 -0
  633. package/dist/model/types.d.ts.map +1 -0
  634. package/dist/model/types.js +2 -0
  635. package/dist/model/types.js.map +1 -0
  636. package/dist/notification/index.d.ts +2 -0
  637. package/dist/notification/index.d.ts.map +1 -0
  638. package/dist/notification/index.js +2 -0
  639. package/dist/notification/index.js.map +1 -0
  640. package/dist/pagination/index.d.ts +2 -0
  641. package/dist/pagination/index.d.ts.map +1 -0
  642. package/dist/pagination/index.js +2 -0
  643. package/dist/pagination/index.js.map +1 -0
  644. package/dist/pagination/paginator.d.ts +174 -0
  645. package/dist/pagination/paginator.d.ts.map +1 -0
  646. package/dist/pagination/paginator.js +413 -0
  647. package/dist/pagination/paginator.js.map +1 -0
  648. package/dist/queue/batches.d.ts +152 -0
  649. package/dist/queue/batches.d.ts.map +1 -0
  650. package/dist/queue/batches.js +344 -0
  651. package/dist/queue/batches.js.map +1 -0
  652. package/dist/queue/database.d.ts +35 -0
  653. package/dist/queue/database.d.ts.map +1 -0
  654. package/dist/queue/database.js +137 -0
  655. package/dist/queue/database.js.map +1 -0
  656. package/dist/queue/driver.d.ts +72 -0
  657. package/dist/queue/driver.d.ts.map +1 -0
  658. package/dist/queue/driver.js +17 -0
  659. package/dist/queue/driver.js.map +1 -0
  660. package/dist/queue/envelope.d.ts +66 -0
  661. package/dist/queue/envelope.d.ts.map +1 -0
  662. package/dist/queue/envelope.js +81 -0
  663. package/dist/queue/envelope.js.map +1 -0
  664. package/dist/queue/failed.d.ts +43 -0
  665. package/dist/queue/failed.d.ts.map +1 -0
  666. package/dist/queue/failed.js +76 -0
  667. package/dist/queue/failed.js.map +1 -0
  668. package/dist/queue/fake.d.ts +68 -0
  669. package/dist/queue/fake.d.ts.map +1 -0
  670. package/dist/queue/fake.js +93 -0
  671. package/dist/queue/fake.js.map +1 -0
  672. package/dist/queue/index.d.ts +15 -0
  673. package/dist/queue/index.d.ts.map +1 -0
  674. package/dist/queue/index.js +15 -0
  675. package/dist/queue/index.js.map +1 -0
  676. package/dist/queue/job.d.ts +137 -0
  677. package/dist/queue/job.d.ts.map +1 -0
  678. package/dist/queue/job.js +154 -0
  679. package/dist/queue/job.js.map +1 -0
  680. package/dist/queue/manager.d.ts +116 -0
  681. package/dist/queue/manager.d.ts.map +1 -0
  682. package/dist/queue/manager.js +545 -0
  683. package/dist/queue/manager.js.map +1 -0
  684. package/dist/queue/middleware.d.ts +33 -0
  685. package/dist/queue/middleware.d.ts.map +1 -0
  686. package/dist/queue/middleware.js +88 -0
  687. package/dist/queue/middleware.js.map +1 -0
  688. package/dist/queue/module.d.ts +42 -0
  689. package/dist/queue/module.d.ts.map +1 -0
  690. package/dist/queue/module.js +68 -0
  691. package/dist/queue/module.js.map +1 -0
  692. package/dist/queue/redis.d.ts +27 -0
  693. package/dist/queue/redis.d.ts.map +1 -0
  694. package/dist/queue/redis.js +189 -0
  695. package/dist/queue/redis.js.map +1 -0
  696. package/dist/queue/runner.d.ts +79 -0
  697. package/dist/queue/runner.d.ts.map +1 -0
  698. package/dist/queue/runner.js +129 -0
  699. package/dist/queue/runner.js.map +1 -0
  700. package/dist/queue/sqs.d.ts +59 -0
  701. package/dist/queue/sqs.d.ts.map +1 -0
  702. package/dist/queue/sqs.js +323 -0
  703. package/dist/queue/sqs.js.map +1 -0
  704. package/dist/queue/worker.d.ts +59 -0
  705. package/dist/queue/worker.d.ts.map +1 -0
  706. package/dist/queue/worker.js +466 -0
  707. package/dist/queue/worker.js.map +1 -0
  708. package/dist/redis/index.d.ts +2 -0
  709. package/dist/redis/index.d.ts.map +1 -0
  710. package/dist/redis/index.js +2 -0
  711. package/dist/redis/index.js.map +1 -0
  712. package/dist/redis/redis.d.ts +41 -0
  713. package/dist/redis/redis.d.ts.map +1 -0
  714. package/dist/redis/redis.js +140 -0
  715. package/dist/redis/redis.js.map +1 -0
  716. package/dist/reverb/index.d.ts +2 -0
  717. package/dist/reverb/index.d.ts.map +1 -0
  718. package/dist/reverb/index.js +2 -0
  719. package/dist/reverb/index.js.map +1 -0
  720. package/dist/routing/index.d.ts +6 -0
  721. package/dist/routing/index.d.ts.map +1 -0
  722. package/dist/routing/index.js +6 -0
  723. package/dist/routing/index.js.map +1 -0
  724. package/dist/routing/paths.d.ts +27 -0
  725. package/dist/routing/paths.d.ts.map +1 -0
  726. package/dist/routing/paths.js +45 -0
  727. package/dist/routing/paths.js.map +1 -0
  728. package/dist/routing/router.d.ts +137 -0
  729. package/dist/routing/router.d.ts.map +1 -0
  730. package/dist/routing/router.js +236 -0
  731. package/dist/routing/router.js.map +1 -0
  732. package/dist/routing/routing.d.ts +34 -0
  733. package/dist/routing/routing.d.ts.map +1 -0
  734. package/dist/routing/routing.js +57 -0
  735. package/dist/routing/routing.js.map +1 -0
  736. package/dist/routing/table.d.ts +35 -0
  737. package/dist/routing/table.d.ts.map +1 -0
  738. package/dist/routing/table.js +247 -0
  739. package/dist/routing/table.js.map +1 -0
  740. package/dist/routing/urls.d.ts +34 -0
  741. package/dist/routing/urls.d.ts.map +1 -0
  742. package/dist/routing/urls.js +116 -0
  743. package/dist/routing/urls.js.map +1 -0
  744. package/dist/schedule/cron.d.ts +35 -0
  745. package/dist/schedule/cron.d.ts.map +1 -0
  746. package/dist/schedule/cron.js +212 -0
  747. package/dist/schedule/cron.js.map +1 -0
  748. package/dist/schedule/index.d.ts +5 -0
  749. package/dist/schedule/index.d.ts.map +1 -0
  750. package/dist/schedule/index.js +5 -0
  751. package/dist/schedule/index.js.map +1 -0
  752. package/dist/schedule/schedule.d.ts +38 -0
  753. package/dist/schedule/schedule.d.ts.map +1 -0
  754. package/dist/schedule/schedule.js +70 -0
  755. package/dist/schedule/schedule.js.map +1 -0
  756. package/dist/schedule/scheduler.d.ts +89 -0
  757. package/dist/schedule/scheduler.d.ts.map +1 -0
  758. package/dist/schedule/scheduler.js +404 -0
  759. package/dist/schedule/scheduler.js.map +1 -0
  760. package/dist/schedule/task.d.ts +150 -0
  761. package/dist/schedule/task.d.ts.map +1 -0
  762. package/dist/schedule/task.js +323 -0
  763. package/dist/schedule/task.js.map +1 -0
  764. package/dist/schema/blueprint.d.ts +256 -0
  765. package/dist/schema/blueprint.d.ts.map +1 -0
  766. package/dist/schema/blueprint.js +458 -0
  767. package/dist/schema/blueprint.js.map +1 -0
  768. package/dist/schema/builder.d.ts +40 -0
  769. package/dist/schema/builder.d.ts.map +1 -0
  770. package/dist/schema/builder.js +153 -0
  771. package/dist/schema/builder.js.map +1 -0
  772. package/dist/schema/grammars/grammar.d.ts +112 -0
  773. package/dist/schema/grammars/grammar.d.ts.map +1 -0
  774. package/dist/schema/grammars/grammar.js +231 -0
  775. package/dist/schema/grammars/grammar.js.map +1 -0
  776. package/dist/schema/grammars/mysql.d.ts +43 -0
  777. package/dist/schema/grammars/mysql.d.ts.map +1 -0
  778. package/dist/schema/grammars/mysql.js +220 -0
  779. package/dist/schema/grammars/mysql.js.map +1 -0
  780. package/dist/schema/grammars/pgsql.d.ts +33 -0
  781. package/dist/schema/grammars/pgsql.d.ts.map +1 -0
  782. package/dist/schema/grammars/pgsql.js +218 -0
  783. package/dist/schema/grammars/pgsql.js.map +1 -0
  784. package/dist/schema/grammars/sqlite-text.d.ts +24 -0
  785. package/dist/schema/grammars/sqlite-text.d.ts.map +1 -0
  786. package/dist/schema/grammars/sqlite-text.js +174 -0
  787. package/dist/schema/grammars/sqlite-text.js.map +1 -0
  788. package/dist/schema/grammars/sqlite.d.ts +39 -0
  789. package/dist/schema/grammars/sqlite.d.ts.map +1 -0
  790. package/dist/schema/grammars/sqlite.js +484 -0
  791. package/dist/schema/grammars/sqlite.js.map +1 -0
  792. package/dist/schema/index.d.ts +9 -0
  793. package/dist/schema/index.d.ts.map +1 -0
  794. package/dist/schema/index.js +9 -0
  795. package/dist/schema/index.js.map +1 -0
  796. package/dist/schema/schema.d.ts +48 -0
  797. package/dist/schema/schema.d.ts.map +1 -0
  798. package/dist/schema/schema.js +47 -0
  799. package/dist/schema/schema.js.map +1 -0
  800. package/dist/scope/context.d.ts +39 -0
  801. package/dist/scope/context.d.ts.map +1 -0
  802. package/dist/scope/context.js +113 -0
  803. package/dist/scope/context.js.map +1 -0
  804. package/dist/scope/index.d.ts +3 -0
  805. package/dist/scope/index.d.ts.map +1 -0
  806. package/dist/scope/index.js +3 -0
  807. package/dist/scope/index.js.map +1 -0
  808. package/dist/scope/scope.d.ts +116 -0
  809. package/dist/scope/scope.d.ts.map +1 -0
  810. package/dist/scope/scope.js +148 -0
  811. package/dist/scope/scope.js.map +1 -0
  812. package/dist/session/cache-store.d.ts +17 -0
  813. package/dist/session/cache-store.d.ts.map +1 -0
  814. package/dist/session/cache-store.js +45 -0
  815. package/dist/session/cache-store.js.map +1 -0
  816. package/dist/session/database.d.ts +32 -0
  817. package/dist/session/database.d.ts.map +1 -0
  818. package/dist/session/database.js +98 -0
  819. package/dist/session/database.js.map +1 -0
  820. package/dist/session/index.d.ts +7 -0
  821. package/dist/session/index.d.ts.map +1 -0
  822. package/dist/session/index.js +7 -0
  823. package/dist/session/index.js.map +1 -0
  824. package/dist/session/manager.d.ts +61 -0
  825. package/dist/session/manager.d.ts.map +1 -0
  826. package/dist/session/manager.js +217 -0
  827. package/dist/session/manager.js.map +1 -0
  828. package/dist/session/middleware.d.ts +6 -0
  829. package/dist/session/middleware.d.ts.map +1 -0
  830. package/dist/session/middleware.js +76 -0
  831. package/dist/session/middleware.js.map +1 -0
  832. package/dist/session/session.d.ts +118 -0
  833. package/dist/session/session.d.ts.map +1 -0
  834. package/dist/session/session.js +223 -0
  835. package/dist/session/session.js.map +1 -0
  836. package/dist/session/stores.d.ts +36 -0
  837. package/dist/session/stores.d.ts.map +1 -0
  838. package/dist/session/stores.js +151 -0
  839. package/dist/session/stores.js.map +1 -0
  840. package/dist/storage/index.d.ts +2 -0
  841. package/dist/storage/index.d.ts.map +1 -0
  842. package/dist/storage/index.js +2 -0
  843. package/dist/storage/index.js.map +1 -0
  844. package/dist/str/index.d.ts +2 -0
  845. package/dist/str/index.d.ts.map +1 -0
  846. package/dist/str/index.js +2 -0
  847. package/dist/str/index.js.map +1 -0
  848. package/dist/str/str.d.ts +27 -0
  849. package/dist/str/str.d.ts.map +1 -0
  850. package/dist/str/str.js +102 -0
  851. package/dist/str/str.js.map +1 -0
  852. package/dist/support/clock.d.ts +6 -0
  853. package/dist/support/clock.d.ts.map +1 -0
  854. package/dist/support/clock.js +7 -0
  855. package/dist/support/clock.js.map +1 -0
  856. package/dist/support/data.d.ts +29 -0
  857. package/dist/support/data.d.ts.map +1 -0
  858. package/dist/support/data.js +160 -0
  859. package/dist/support/data.js.map +1 -0
  860. package/dist/support/index.d.ts +8 -0
  861. package/dist/support/index.d.ts.map +1 -0
  862. package/dist/support/index.js +7 -0
  863. package/dist/support/index.js.map +1 -0
  864. package/dist/support/register.d.ts +14 -0
  865. package/dist/support/register.d.ts.map +1 -0
  866. package/dist/support/register.js +2 -0
  867. package/dist/support/register.js.map +1 -0
  868. package/dist/support/text.d.ts +8 -0
  869. package/dist/support/text.d.ts.map +1 -0
  870. package/dist/support/text.js +19 -0
  871. package/dist/support/text.js.map +1 -0
  872. package/dist/support/type-assertions.d.ts +7 -0
  873. package/dist/support/type-assertions.d.ts.map +1 -0
  874. package/dist/support/type-assertions.js +10 -0
  875. package/dist/support/type-assertions.js.map +1 -0
  876. package/dist/support/types.d.ts +34 -0
  877. package/dist/support/types.d.ts.map +1 -0
  878. package/dist/support/types.js +31 -0
  879. package/dist/support/types.js.map +1 -0
  880. package/dist/support/units.d.ts +17 -0
  881. package/dist/support/units.d.ts.map +1 -0
  882. package/dist/support/units.js +54 -0
  883. package/dist/support/units.js.map +1 -0
  884. package/dist/task/index.d.ts +2 -0
  885. package/dist/task/index.d.ts.map +1 -0
  886. package/dist/task/index.js +2 -0
  887. package/dist/task/index.js.map +1 -0
  888. package/dist/task/task.d.ts +68 -0
  889. package/dist/task/task.d.ts.map +1 -0
  890. package/dist/task/task.js +162 -0
  891. package/dist/task/task.js.map +1 -0
  892. package/dist/testing/assert-database.d.ts +10 -0
  893. package/dist/testing/assert-database.d.ts.map +1 -0
  894. package/dist/testing/assert-database.js +125 -0
  895. package/dist/testing/assert-database.js.map +1 -0
  896. package/dist/testing/conformance/cache.d.ts +24 -0
  897. package/dist/testing/conformance/cache.d.ts.map +1 -0
  898. package/dist/testing/conformance/cache.js +397 -0
  899. package/dist/testing/conformance/cache.js.map +1 -0
  900. package/dist/testing/conformance/column-types.d.ts +44 -0
  901. package/dist/testing/conformance/column-types.d.ts.map +1 -0
  902. package/dist/testing/conformance/column-types.js +47 -0
  903. package/dist/testing/conformance/column-types.js.map +1 -0
  904. package/dist/testing/conformance/database.d.ts +11 -0
  905. package/dist/testing/conformance/database.d.ts.map +1 -0
  906. package/dist/testing/conformance/database.js +410 -0
  907. package/dist/testing/conformance/database.js.map +1 -0
  908. package/dist/testing/conformance/factories.d.ts +4 -0
  909. package/dist/testing/conformance/factories.d.ts.map +1 -0
  910. package/dist/testing/conformance/factories.js +313 -0
  911. package/dist/testing/conformance/factories.js.map +1 -0
  912. package/dist/testing/conformance/harness.d.ts +30 -0
  913. package/dist/testing/conformance/harness.d.ts.map +1 -0
  914. package/dist/testing/conformance/harness.js +85 -0
  915. package/dist/testing/conformance/harness.js.map +1 -0
  916. package/dist/testing/conformance/index.d.ts +13 -0
  917. package/dist/testing/conformance/index.d.ts.map +1 -0
  918. package/dist/testing/conformance/index.js +12 -0
  919. package/dist/testing/conformance/index.js.map +1 -0
  920. package/dist/testing/conformance/migrations.d.ts +4 -0
  921. package/dist/testing/conformance/migrations.d.ts.map +1 -0
  922. package/dist/testing/conformance/migrations.js +313 -0
  923. package/dist/testing/conformance/migrations.js.map +1 -0
  924. package/dist/testing/conformance/models.d.ts +4 -0
  925. package/dist/testing/conformance/models.d.ts.map +1 -0
  926. package/dist/testing/conformance/models.js +715 -0
  927. package/dist/testing/conformance/models.js.map +1 -0
  928. package/dist/testing/conformance/pagination.d.ts +4 -0
  929. package/dist/testing/conformance/pagination.d.ts.map +1 -0
  930. package/dist/testing/conformance/pagination.js +283 -0
  931. package/dist/testing/conformance/pagination.js.map +1 -0
  932. package/dist/testing/conformance/query-builder.d.ts +4 -0
  933. package/dist/testing/conformance/query-builder.d.ts.map +1 -0
  934. package/dist/testing/conformance/query-builder.js +725 -0
  935. package/dist/testing/conformance/query-builder.js.map +1 -0
  936. package/dist/testing/conformance/queue.d.ts +29 -0
  937. package/dist/testing/conformance/queue.d.ts.map +1 -0
  938. package/dist/testing/conformance/queue.js +203 -0
  939. package/dist/testing/conformance/queue.js.map +1 -0
  940. package/dist/testing/conformance/relationships.d.ts +4 -0
  941. package/dist/testing/conformance/relationships.d.ts.map +1 -0
  942. package/dist/testing/conformance/relationships.js +737 -0
  943. package/dist/testing/conformance/relationships.js.map +1 -0
  944. package/dist/testing/conformance/schema.d.ts +4 -0
  945. package/dist/testing/conformance/schema.d.ts.map +1 -0
  946. package/dist/testing/conformance/schema.js +320 -0
  947. package/dist/testing/conformance/schema.js.map +1 -0
  948. package/dist/testing/conformance/session.d.ts +22 -0
  949. package/dist/testing/conformance/session.d.ts.map +1 -0
  950. package/dist/testing/conformance/session.js +162 -0
  951. package/dist/testing/conformance/session.js.map +1 -0
  952. package/dist/testing/database.d.ts +28 -0
  953. package/dist/testing/database.d.ts.map +1 -0
  954. package/dist/testing/database.js +213 -0
  955. package/dist/testing/database.js.map +1 -0
  956. package/dist/testing/files.d.ts +11 -0
  957. package/dist/testing/files.d.ts.map +1 -0
  958. package/dist/testing/files.js +44 -0
  959. package/dist/testing/files.js.map +1 -0
  960. package/dist/testing/index.d.ts +7 -0
  961. package/dist/testing/index.d.ts.map +1 -0
  962. package/dist/testing/index.js +7 -0
  963. package/dist/testing/index.js.map +1 -0
  964. package/dist/testing/inertia.d.ts +35 -0
  965. package/dist/testing/inertia.d.ts.map +1 -0
  966. package/dist/testing/inertia.js +127 -0
  967. package/dist/testing/inertia.js.map +1 -0
  968. package/dist/testing/query-log.d.ts +10 -0
  969. package/dist/testing/query-log.d.ts.map +1 -0
  970. package/dist/testing/query-log.js +31 -0
  971. package/dist/testing/query-log.js.map +1 -0
  972. package/dist/testing/response.d.ts +100 -0
  973. package/dist/testing/response.d.ts.map +1 -0
  974. package/dist/testing/response.js +329 -0
  975. package/dist/testing/response.js.map +1 -0
  976. package/dist/testing/testing.d.ts +191 -0
  977. package/dist/testing/testing.d.ts.map +1 -0
  978. package/dist/testing/testing.js +449 -0
  979. package/dist/testing/testing.js.map +1 -0
  980. package/dist/time/index.d.ts +3 -0
  981. package/dist/time/index.d.ts.map +1 -0
  982. package/dist/time/index.js +2 -0
  983. package/dist/time/index.js.map +1 -0
  984. package/dist/time/time.d.ts +39 -0
  985. package/dist/time/time.d.ts.map +1 -0
  986. package/dist/time/time.js +130 -0
  987. package/dist/time/time.js.map +1 -0
  988. package/dist/tracing/index.d.ts +2 -0
  989. package/dist/tracing/index.d.ts.map +1 -0
  990. package/dist/tracing/index.js +2 -0
  991. package/dist/tracing/index.js.map +1 -0
  992. package/dist/validation/index.d.ts +6 -0
  993. package/dist/validation/index.d.ts.map +1 -0
  994. package/dist/validation/index.js +6 -0
  995. package/dist/validation/index.js.map +1 -0
  996. package/dist/validation/input.d.ts +89 -0
  997. package/dist/validation/input.d.ts.map +1 -0
  998. package/dist/validation/input.js +241 -0
  999. package/dist/validation/input.js.map +1 -0
  1000. package/dist/validation/messages.d.ts +7 -0
  1001. package/dist/validation/messages.d.ts.map +1 -0
  1002. package/dist/validation/messages.js +93 -0
  1003. package/dist/validation/messages.js.map +1 -0
  1004. package/dist/validation/presence.d.ts +32 -0
  1005. package/dist/validation/presence.d.ts.map +1 -0
  1006. package/dist/validation/presence.js +17 -0
  1007. package/dist/validation/presence.js.map +1 -0
  1008. package/dist/validation/rules.d.ts +321 -0
  1009. package/dist/validation/rules.d.ts.map +1 -0
  1010. package/dist/validation/rules.js +603 -0
  1011. package/dist/validation/rules.js.map +1 -0
  1012. package/dist/validation/standard.d.ts +33 -0
  1013. package/dist/validation/standard.d.ts.map +1 -0
  1014. package/dist/validation/standard.js +10 -0
  1015. package/dist/validation/standard.js.map +1 -0
  1016. package/dist/view/channel.d.ts +13 -0
  1017. package/dist/view/channel.d.ts.map +1 -0
  1018. package/dist/view/channel.js +6 -0
  1019. package/dist/view/channel.js.map +1 -0
  1020. package/dist/view/head.d.ts +60 -0
  1021. package/dist/view/head.d.ts.map +1 -0
  1022. package/dist/view/head.js +122 -0
  1023. package/dist/view/head.js.map +1 -0
  1024. package/dist/view/helpers.d.ts +17 -0
  1025. package/dist/view/helpers.d.ts.map +1 -0
  1026. package/dist/view/helpers.js +19 -0
  1027. package/dist/view/helpers.js.map +1 -0
  1028. package/dist/view/html.d.ts +25 -0
  1029. package/dist/view/html.d.ts.map +1 -0
  1030. package/dist/view/html.js +291 -0
  1031. package/dist/view/html.js.map +1 -0
  1032. package/dist/view/index.d.ts +7 -0
  1033. package/dist/view/index.d.ts.map +1 -0
  1034. package/dist/view/index.js +7 -0
  1035. package/dist/view/index.js.map +1 -0
  1036. package/dist/view/translate.d.ts +14 -0
  1037. package/dist/view/translate.d.ts.map +1 -0
  1038. package/dist/view/translate.js +42 -0
  1039. package/dist/view/translate.js.map +1 -0
  1040. package/dist/vite/index.d.ts +3 -0
  1041. package/dist/vite/index.d.ts.map +1 -0
  1042. package/dist/vite/index.js +3 -0
  1043. package/dist/vite/index.js.map +1 -0
  1044. package/dist/vite/plugin.d.ts +51 -0
  1045. package/dist/vite/plugin.d.ts.map +1 -0
  1046. package/dist/vite/plugin.js +273 -0
  1047. package/dist/vite/plugin.js.map +1 -0
  1048. package/dist/vite/vite.d.ts +68 -0
  1049. package/dist/vite/vite.d.ts.map +1 -0
  1050. package/dist/vite/vite.js +228 -0
  1051. package/dist/vite/vite.js.map +1 -0
  1052. package/dist/workflow/index.d.ts +2 -0
  1053. package/dist/workflow/index.d.ts.map +1 -0
  1054. package/dist/workflow/index.js +2 -0
  1055. package/dist/workflow/index.js.map +1 -0
  1056. package/docs/authentication.md +428 -0
  1057. package/docs/authorization.md +203 -0
  1058. package/docs/cache.md +215 -0
  1059. package/docs/configuration.md +86 -0
  1060. package/docs/console.md +99 -0
  1061. package/docs/container.md +58 -0
  1062. package/docs/csrf.md +54 -0
  1063. package/docs/database-testing.md +121 -0
  1064. package/docs/database.md +314 -0
  1065. package/docs/documentation.md +49 -0
  1066. package/docs/encryption.md +104 -0
  1067. package/docs/errors.md +85 -0
  1068. package/docs/events.md +136 -0
  1069. package/docs/factories.md +144 -0
  1070. package/docs/hashing.md +78 -0
  1071. package/docs/inertia.md +469 -0
  1072. package/docs/installation.md +87 -0
  1073. package/docs/lifecycle.md +84 -0
  1074. package/docs/logging.md +49 -0
  1075. package/docs/middleware.md +64 -0
  1076. package/docs/migrations.md +192 -0
  1077. package/docs/models.md +301 -0
  1078. package/docs/pagination.md +129 -0
  1079. package/docs/passwords.md +151 -0
  1080. package/docs/providers.md +51 -0
  1081. package/docs/queries.md +239 -0
  1082. package/docs/queues.md +407 -0
  1083. package/docs/rate-limiting.md +64 -0
  1084. package/docs/redis.md +76 -0
  1085. package/docs/relationships.md +251 -0
  1086. package/docs/requests.md +53 -0
  1087. package/docs/responses.md +71 -0
  1088. package/docs/routing.md +84 -0
  1089. package/docs/scheduling.md +177 -0
  1090. package/docs/seeding.md +96 -0
  1091. package/docs/session.md +138 -0
  1092. package/docs/structure.md +45 -0
  1093. package/docs/testing.md +134 -0
  1094. package/docs/upgrade.md +42 -0
  1095. package/docs/uploads.md +74 -0
  1096. package/docs/validation.md +105 -0
  1097. package/docs/verification.md +125 -0
  1098. package/docs/views.md +94 -0
  1099. package/docs/vite.md +193 -0
  1100. package/package.json +270 -3
  1101. package/src/auth/auth.ts +260 -0
  1102. package/src/auth/errors.ts +69 -0
  1103. package/src/auth/index.ts +34 -0
  1104. package/src/auth/manager.ts +205 -0
  1105. package/src/auth/middleware.ts +169 -0
  1106. package/src/auth/passwords.ts +117 -0
  1107. package/src/auth/policy.ts +184 -0
  1108. package/src/auth/setup.ts +96 -0
  1109. package/src/auth/state.ts +24 -0
  1110. package/src/auth/tokens.ts +66 -0
  1111. package/src/auth/verification.ts +85 -0
  1112. package/src/aws/index.ts +10 -0
  1113. package/src/aws/signer.ts +170 -0
  1114. package/src/broadcast/index.ts +1 -0
  1115. package/src/cache/cache.ts +495 -0
  1116. package/src/cache/database.ts +243 -0
  1117. package/src/cache/file.ts +262 -0
  1118. package/src/cache/index.ts +26 -0
  1119. package/src/cache/manager.ts +138 -0
  1120. package/src/cache/module.ts +59 -0
  1121. package/src/cache/rate-limiter.ts +183 -0
  1122. package/src/cache/redis.ts +122 -0
  1123. package/src/cache/store.ts +239 -0
  1124. package/src/client/index.ts +3 -0
  1125. package/src/client/pages.ts +90 -0
  1126. package/src/client/routes.ts +90 -0
  1127. package/src/client/wire.ts +93 -0
  1128. package/src/config/config.ts +83 -0
  1129. package/src/config/index.ts +27 -0
  1130. package/src/config/sections.ts +501 -0
  1131. package/src/console/command.ts +171 -0
  1132. package/src/console/index.ts +13 -0
  1133. package/src/console/io.ts +285 -0
  1134. package/src/console/kernel.ts +309 -0
  1135. package/src/container/container.ts +174 -0
  1136. package/src/container/index.ts +1 -0
  1137. package/src/cookie/index.ts +1 -0
  1138. package/src/crypt/crypt.ts +185 -0
  1139. package/src/crypt/index.ts +1 -0
  1140. package/src/db/codec.ts +143 -0
  1141. package/src/db/contract.ts +128 -0
  1142. package/src/db/db.ts +72 -0
  1143. package/src/db/drivers/better-sqlite3.ts +62 -0
  1144. package/src/db/drivers/mysql.ts +379 -0
  1145. package/src/db/drivers/pgsql.ts +293 -0
  1146. package/src/db/drivers/sqlite.ts +321 -0
  1147. package/src/db/errors.ts +149 -0
  1148. package/src/db/grammars/grammar.ts +429 -0
  1149. package/src/db/grammars/mysql.ts +181 -0
  1150. package/src/db/grammars/pgsql.ts +83 -0
  1151. package/src/db/grammars/sqlite.ts +109 -0
  1152. package/src/db/index.ts +107 -0
  1153. package/src/db/kysely/index.ts +1 -0
  1154. package/src/db/kysely/kysely.ts +182 -0
  1155. package/src/db/manager.ts +891 -0
  1156. package/src/db/pool.ts +127 -0
  1157. package/src/db/query/builder.ts +1245 -0
  1158. package/src/db/query/state.ts +210 -0
  1159. package/src/db/sql.ts +196 -0
  1160. package/src/env/env.ts +224 -0
  1161. package/src/env/index.ts +11 -0
  1162. package/src/errors/errors.ts +83 -0
  1163. package/src/errors/index.ts +1 -0
  1164. package/src/events/event.ts +113 -0
  1165. package/src/events/fake.ts +73 -0
  1166. package/src/events/index.ts +16 -0
  1167. package/src/events/listener.ts +86 -0
  1168. package/src/events/manager.ts +192 -0
  1169. package/src/events/module.ts +14 -0
  1170. package/src/factory/factory.ts +394 -0
  1171. package/src/factory/fake.ts +431 -0
  1172. package/src/factory/index.ts +14 -0
  1173. package/src/factory/seed.ts +72 -0
  1174. package/src/feature/index.ts +1 -0
  1175. package/src/foundation/application.ts +1419 -0
  1176. package/src/foundation/cache-commands.ts +49 -0
  1177. package/src/foundation/command-result.ts +46 -0
  1178. package/src/foundation/commands.ts +432 -0
  1179. package/src/foundation/database-commands.ts +321 -0
  1180. package/src/foundation/debug-page.ts +142 -0
  1181. package/src/foundation/dev-vite.ts +32 -0
  1182. package/src/foundation/dev.ts +464 -0
  1183. package/src/foundation/discovery.ts +96 -0
  1184. package/src/foundation/error-pages.ts +32 -0
  1185. package/src/foundation/exceptions.ts +56 -0
  1186. package/src/foundation/generators.ts +642 -0
  1187. package/src/foundation/helpers.ts +15 -0
  1188. package/src/foundation/index.ts +16 -0
  1189. package/src/foundation/install-api.ts +109 -0
  1190. package/src/foundation/provider.ts +98 -0
  1191. package/src/foundation/queue-commands.ts +301 -0
  1192. package/src/foundation/route-types.ts +199 -0
  1193. package/src/foundation/schedule-commands.ts +139 -0
  1194. package/src/foundation/stubs/api.ts +232 -0
  1195. package/src/foundation/stubs/handler.ts +76 -0
  1196. package/src/foundation/stubs/others.ts +188 -0
  1197. package/src/foundation/test-command.ts +40 -0
  1198. package/src/hash/hash.ts +138 -0
  1199. package/src/hash/index.ts +1 -0
  1200. package/src/http/busboy.d.ts +31 -0
  1201. package/src/http/cookies.ts +104 -0
  1202. package/src/http/csrf.ts +102 -0
  1203. package/src/http/form.ts +60 -0
  1204. package/src/http/index.ts +87 -0
  1205. package/src/http/kernel.ts +509 -0
  1206. package/src/http/maintenance.ts +85 -0
  1207. package/src/http/middleware.ts +229 -0
  1208. package/src/http/multipart.ts +105 -0
  1209. package/src/http/render.ts +77 -0
  1210. package/src/http/request.ts +368 -0
  1211. package/src/http/response.ts +301 -0
  1212. package/src/http/server.ts +95 -0
  1213. package/src/http/signature.ts +42 -0
  1214. package/src/http/throttle.ts +67 -0
  1215. package/src/http/types.ts +71 -0
  1216. package/src/http/uploads.ts +139 -0
  1217. package/src/http/wire.ts +104 -0
  1218. package/src/http/write.ts +158 -0
  1219. package/src/http-client/index.ts +1 -0
  1220. package/src/index.ts +20 -0
  1221. package/src/inertia/index.ts +26 -0
  1222. package/src/inertia/inertia.ts +590 -0
  1223. package/src/inertia/props.ts +237 -0
  1224. package/src/inertia/resolve.ts +326 -0
  1225. package/src/inertia/response.ts +66 -0
  1226. package/src/inertia/ssr-worker.ts +66 -0
  1227. package/src/inertia/ssr.ts +369 -0
  1228. package/src/log/channels.ts +101 -0
  1229. package/src/log/index.ts +3 -0
  1230. package/src/log/log.ts +216 -0
  1231. package/src/log/record.ts +107 -0
  1232. package/src/mail/address.ts +60 -0
  1233. package/src/mail/auth.ts +54 -0
  1234. package/src/mail/components.ts +98 -0
  1235. package/src/mail/fake.ts +131 -0
  1236. package/src/mail/index.ts +38 -0
  1237. package/src/mail/mail.ts +124 -0
  1238. package/src/mail/manager.ts +212 -0
  1239. package/src/mail/text.ts +150 -0
  1240. package/src/mail/transport.ts +88 -0
  1241. package/src/migrations/create-database.ts +27 -0
  1242. package/src/migrations/dump.ts +317 -0
  1243. package/src/migrations/files.ts +118 -0
  1244. package/src/migrations/index.ts +21 -0
  1245. package/src/migrations/migrator.ts +499 -0
  1246. package/src/model/checks.ts +189 -0
  1247. package/src/model/columns.ts +221 -0
  1248. package/src/model/describe.ts +95 -0
  1249. package/src/model/drift.ts +150 -0
  1250. package/src/model/errors.ts +69 -0
  1251. package/src/model/index.ts +96 -0
  1252. package/src/model/keys.ts +73 -0
  1253. package/src/model/loading.ts +226 -0
  1254. package/src/model/meta.ts +120 -0
  1255. package/src/model/model.ts +788 -0
  1256. package/src/model/query.ts +1100 -0
  1257. package/src/model/related.ts +336 -0
  1258. package/src/model/relations.ts +211 -0
  1259. package/src/model/types.ts +557 -0
  1260. package/src/notification/index.ts +1 -0
  1261. package/src/pagination/index.ts +21 -0
  1262. package/src/pagination/paginator.ts +545 -0
  1263. package/src/queue/batches.ts +481 -0
  1264. package/src/queue/database.ts +177 -0
  1265. package/src/queue/driver.ts +85 -0
  1266. package/src/queue/envelope.ts +133 -0
  1267. package/src/queue/failed.ts +119 -0
  1268. package/src/queue/fake.ts +145 -0
  1269. package/src/queue/index.ts +88 -0
  1270. package/src/queue/job.ts +295 -0
  1271. package/src/queue/manager.ts +636 -0
  1272. package/src/queue/middleware.ts +111 -0
  1273. package/src/queue/module.ts +74 -0
  1274. package/src/queue/redis.ts +223 -0
  1275. package/src/queue/runner.ts +185 -0
  1276. package/src/queue/sqs.ts +381 -0
  1277. package/src/queue/worker.ts +519 -0
  1278. package/src/redis/index.ts +1 -0
  1279. package/src/redis/redis.ts +158 -0
  1280. package/src/reverb/index.ts +1 -0
  1281. package/src/routing/index.ts +15 -0
  1282. package/src/routing/paths.ts +67 -0
  1283. package/src/routing/router.ts +346 -0
  1284. package/src/routing/routing.ts +80 -0
  1285. package/src/routing/table.ts +281 -0
  1286. package/src/routing/urls.ts +139 -0
  1287. package/src/schedule/cron.ts +221 -0
  1288. package/src/schedule/index.ts +11 -0
  1289. package/src/schedule/schedule.ts +99 -0
  1290. package/src/schedule/scheduler.ts +455 -0
  1291. package/src/schedule/task.ts +381 -0
  1292. package/src/schema/blueprint.ts +684 -0
  1293. package/src/schema/builder.ts +178 -0
  1294. package/src/schema/grammars/grammar.ts +348 -0
  1295. package/src/schema/grammars/mysql.ts +241 -0
  1296. package/src/schema/grammars/pgsql.ts +248 -0
  1297. package/src/schema/grammars/sqlite-text.ts +177 -0
  1298. package/src/schema/grammars/sqlite.ts +540 -0
  1299. package/src/schema/index.ts +25 -0
  1300. package/src/schema/schema.ts +87 -0
  1301. package/src/scope/context.ts +124 -0
  1302. package/src/scope/index.ts +26 -0
  1303. package/src/scope/scope.ts +250 -0
  1304. package/src/session/cache-store.ts +57 -0
  1305. package/src/session/database.ts +121 -0
  1306. package/src/session/index.ts +24 -0
  1307. package/src/session/manager.ts +251 -0
  1308. package/src/session/middleware.ts +79 -0
  1309. package/src/session/session.ts +282 -0
  1310. package/src/session/stores.ts +173 -0
  1311. package/src/storage/index.ts +1 -0
  1312. package/src/str/index.ts +1 -0
  1313. package/src/str/str.ts +115 -0
  1314. package/src/support/clock.ts +11 -0
  1315. package/src/support/data.ts +156 -0
  1316. package/src/support/index.ts +26 -0
  1317. package/src/support/register.ts +13 -0
  1318. package/src/support/text.ts +17 -0
  1319. package/src/support/type-assertions.ts +14 -0
  1320. package/src/support/types.ts +80 -0
  1321. package/src/support/units.ts +67 -0
  1322. package/src/task/index.ts +14 -0
  1323. package/src/task/task.ts +199 -0
  1324. package/src/testing/assert-database.ts +145 -0
  1325. package/src/testing/conformance/cache.ts +453 -0
  1326. package/src/testing/conformance/column-types.ts +47 -0
  1327. package/src/testing/conformance/database.ts +512 -0
  1328. package/src/testing/conformance/factories.ts +350 -0
  1329. package/src/testing/conformance/harness.ts +107 -0
  1330. package/src/testing/conformance/index.ts +12 -0
  1331. package/src/testing/conformance/migrations.ts +400 -0
  1332. package/src/testing/conformance/models.ts +810 -0
  1333. package/src/testing/conformance/pagination.ts +324 -0
  1334. package/src/testing/conformance/query-builder.ts +900 -0
  1335. package/src/testing/conformance/queue.ts +239 -0
  1336. package/src/testing/conformance/relationships.ts +948 -0
  1337. package/src/testing/conformance/schema.ts +373 -0
  1338. package/src/testing/conformance/session.ts +190 -0
  1339. package/src/testing/database.ts +245 -0
  1340. package/src/testing/files.ts +46 -0
  1341. package/src/testing/index.ts +15 -0
  1342. package/src/testing/inertia.ts +151 -0
  1343. package/src/testing/query-log.ts +34 -0
  1344. package/src/testing/response.ts +391 -0
  1345. package/src/testing/testing.ts +593 -0
  1346. package/src/time/index.ts +2 -0
  1347. package/src/time/time.ts +143 -0
  1348. package/src/tracing/index.ts +1 -0
  1349. package/src/validation/index.ts +38 -0
  1350. package/src/validation/input.ts +334 -0
  1351. package/src/validation/messages.ts +96 -0
  1352. package/src/validation/presence.ts +52 -0
  1353. package/src/validation/rules.ts +839 -0
  1354. package/src/validation/standard.ts +45 -0
  1355. package/src/view/channel.ts +16 -0
  1356. package/src/view/head.ts +165 -0
  1357. package/src/view/helpers.ts +29 -0
  1358. package/src/view/html.ts +303 -0
  1359. package/src/view/index.ts +6 -0
  1360. package/src/view/translate.ts +48 -0
  1361. package/src/vite/index.ts +2 -0
  1362. package/src/vite/plugin.ts +311 -0
  1363. package/src/vite/vite.ts +302 -0
  1364. package/src/workflow/index.ts +1 -0
@@ -0,0 +1,57 @@
1
+ import type { AuthUser } from './auth.ts';
2
+ /** The outcome of an ability that says more than yes or no: a message, or a 404 that hides that the record exists. */
3
+ export interface Decision {
4
+ readonly allowed: boolean;
5
+ readonly message?: string;
6
+ readonly status?: 403 | 404;
7
+ }
8
+ /** What an ability returns. */
9
+ export type Verdict = boolean | Decision;
10
+ /** An ability: the signed-in user, then the records it is about. */
11
+ export type Ability = (user: any, ...subjects: any[]) => Verdict | Promise<Verdict>;
12
+ declare const guests: unique symbol;
13
+ /** The mark `allowGuests(...)` puts on an ability. */
14
+ export interface AllowsGuests {
15
+ readonly [guests]: true;
16
+ }
17
+ /** An ability that also runs when nobody is signed in: its user is `null` then. */
18
+ export type GuestAbility<U, A extends unknown[]> = ((user: U | null, ...subjects: A) => Verdict | Promise<Verdict>) & AllowsGuests;
19
+ /** The subjects an ability takes after the user. */
20
+ export type Subjects<F> = F extends (user: any, ...subjects: infer A) => any ? A : never;
21
+ /** An ability whose user may be `null` but that is not wrapped would never see a guest: the call site says so. */
22
+ export type GuestsMustBeWrapped<F> = F extends AllowsGuests ? unknown : F extends (user: infer U, ...subjects: any[]) => any ? null extends U ? {
23
+ readonly problem: 'This ability accepts a guest (its user may be null). Wrap it in allowGuests(...).';
24
+ } : unknown : unknown;
25
+ /** Runs ahead of every ability of its policy, for a signed-in user: true allows, false denies, nothing falls through. */
26
+ export type Before = (user: AuthUser, ability: string) => boolean | Decision | undefined | void | Promise<boolean | Decision | undefined | void>;
27
+ /** Every key of a policy is an ability, except `before`. */
28
+ export type PolicyShape<P> = {
29
+ [K in keyof P]: K extends 'before' ? Before : Ability;
30
+ };
31
+ /** A policy as `definePolicy` returns it: its abilities, without `before`. */
32
+ export type Policy<P> = {
33
+ readonly [K in Exclude<keyof P, 'before'>]: P[K];
34
+ };
35
+ /** Allows. Abilities may return `true` instead. */
36
+ export declare function allow(): Decision;
37
+ /** Denies with 403 and, when given, a message the user sees: `deny('Only the author can delete a post.')`. */
38
+ export declare function deny(message?: string): Decision;
39
+ /** Denies with 404, so the response does not confirm the record exists: for records of another account or team. */
40
+ export declare function denyAsNotFound(): Decision;
41
+ /** Marks an ability that also runs when nobody is signed in. Its user parameter is `User | null`. */
42
+ export declare function allowGuests<U = AuthUser, A extends unknown[] = []>(ability: (user: U | null, ...subjects: A) => Verdict | Promise<Verdict>): GuestAbility<U, A>;
43
+ /**
44
+ * Groups a model's abilities, as a Laravel policy class does: `export const PostPolicy = definePolicy({ update: (user:
45
+ * User, post: Post) => user.id === post.userId })`. `before`, when given, runs ahead of every ability for a signed-in
46
+ * user. Abilities are used by reference: `authorize(PostPolicy.update, post)`.
47
+ */
48
+ export declare function definePolicy<P extends object>(abilities: P & PolicyShape<P>): Policy<P>;
49
+ /**
50
+ * Throws unless the signed-in user may: AuthorizationError (403, or 404 for `denyAsNotFound()`), or AuthenticationError
51
+ * when nobody is signed in and the ability does not allow guests. `await authorize(PostPolicy.update, post)`.
52
+ */
53
+ export declare function authorize<F extends Ability>(ability: F & GuestsMustBeWrapped<F>, ...subjects: Subjects<F>): Promise<void>;
54
+ /** Whether the signed-in user may; false for a guest unless the ability allows guests. For UI flags sent as props. */
55
+ export declare function can<F extends Ability>(ability: F & GuestsMustBeWrapped<F>, ...subjects: Subjects<F>): Promise<boolean>;
56
+ export {};
57
+ //# sourceMappingURL=policy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"policy.d.ts","sourceRoot":"","sources":["../../src/auth/policy.ts"],"names":[],"mappings":"AAKA,OAAO,KAA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C,CAAC,CA6BvF;AAsCD;;;GAGG;AACH,wBAAsB,SAAS,CAAC,CAAC,SAAS,OAAO,EAAE,OAAO,EAAE,CAAC,GAAG,mBAAmB,CAAC,CAAC,CAAC,EAAE,GAAG,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAI/H;AAED,sHAAsH;AACtH,wBAAsB,GAAG,CAAC,CAAC,SAAS,OAAO,EAAE,OAAO,EAAE,CAAC,GAAG,mBAAmB,CAAC,CAAC,CAAC,EAAE,GAAG,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC,CAG5H"}
@@ -0,0 +1,115 @@
1
+ // Authorization: one policy per model, abilities passed by reference. `definePolicy({ update: (user, post) => … })`
2
+ // groups a model's abilities; `authorize(PostPolicy.update, post)` throws when the signed-in user may not, and
3
+ // `can(PostPolicy.update, post)` answers yes or no. A plain ability never sees a guest; `allowGuests(...)` lets one.
4
+ import { MimarError } from '../errors/index.js';
5
+ import { currentUser } from '../scope/index.js';
6
+ import { AuthenticationError, AuthorizationError } from './errors.js';
7
+ const guests = Symbol('mimar.allowGuests');
8
+ const policyAbility = Symbol('mimar.policyAbility');
9
+ const allowed = Object.freeze({ allowed: true });
10
+ const denied = Object.freeze({ allowed: false, status: 403 });
11
+ /** Allows. Abilities may return `true` instead. */
12
+ export function allow() {
13
+ return allowed;
14
+ }
15
+ /** Denies with 403 and, when given, a message the user sees: `deny('Only the author can delete a post.')`. */
16
+ export function deny(message) {
17
+ return message === undefined ? denied : Object.freeze({ allowed: false, status: 403, message });
18
+ }
19
+ /** Denies with 404, so the response does not confirm the record exists: for records of another account or team. */
20
+ export function denyAsNotFound() {
21
+ return Object.freeze({ allowed: false, status: 404 });
22
+ }
23
+ /** Marks an ability that also runs when nobody is signed in. Its user parameter is `User | null`. */
24
+ export function allowGuests(ability) {
25
+ if (typeof ability !== 'function') {
26
+ throw new MimarError('E_NOT_AN_ABILITY', 'allowGuests() takes an ability: allowGuests((user: User | null, post: Post) => …).');
27
+ }
28
+ const wrapped = (user, ...subjects) => ability(user, ...subjects);
29
+ Object.defineProperty(wrapped, 'name', { value: ability.name });
30
+ Object.defineProperty(wrapped, guests, { value: true });
31
+ return wrapped;
32
+ }
33
+ /**
34
+ * Groups a model's abilities, as a Laravel policy class does: `export const PostPolicy = definePolicy({ update: (user:
35
+ * User, post: Post) => user.id === post.userId })`. `before`, when given, runs ahead of every ability for a signed-in
36
+ * user. Abilities are used by reference: `authorize(PostPolicy.update, post)`.
37
+ */
38
+ export function definePolicy(abilities) {
39
+ if (typeof abilities !== 'object' || abilities === null) {
40
+ throw new MimarError('E_INVALID_POLICY', 'definePolicy() takes the abilities: definePolicy({ update: (user, post) => … }).');
41
+ }
42
+ const source = abilities;
43
+ const before = source.before;
44
+ if (before !== undefined && typeof before !== 'function') {
45
+ throw new MimarError('E_INVALID_POLICY', 'definePolicy(): before is not a function. It is (user, ability) => true, false or nothing.');
46
+ }
47
+ const policy = {};
48
+ for (const [name, ability] of Object.entries(source)) {
49
+ if (name === 'before')
50
+ continue;
51
+ if (typeof ability !== 'function') {
52
+ throw new MimarError('E_INVALID_POLICY', `definePolicy(): "${name}" is not a function. Every key of a policy is an ability, except before.`);
53
+ }
54
+ const original = ability;
55
+ const bound = (...args) => original(...args);
56
+ Object.defineProperty(bound, 'name', { value: name });
57
+ Object.defineProperty(bound, policyAbility, { value: Object.freeze({ name, before: before }) });
58
+ if (original[guests] === true)
59
+ Object.defineProperty(bound, guests, { value: true });
60
+ policy[name] = bound;
61
+ }
62
+ return Object.freeze(policy);
63
+ }
64
+ function describe(value) {
65
+ if (value === undefined)
66
+ return 'nothing';
67
+ if (value === null)
68
+ return 'null';
69
+ if (typeof value === 'object')
70
+ return 'an object without "allowed"';
71
+ return `${typeof value} ${String(value)}`;
72
+ }
73
+ function verdict(value, name) {
74
+ if (value === true)
75
+ return allowed;
76
+ if (value === false)
77
+ return denied;
78
+ if (typeof value === 'object' && value !== null && typeof value.allowed === 'boolean')
79
+ return value;
80
+ throw new MimarError('E_INVALID_VERDICT', `The ability ${name || '(anonymous)'} returned ${describe(value)}. An ability returns true, false, allow(), deny() or denyAsNotFound().`);
81
+ }
82
+ /** The decision for the current user, or null when a guest reaches an ability that does not allow guests. */
83
+ async function decide(helper, ability, subjects) {
84
+ if (typeof ability !== 'function') {
85
+ throw new MimarError('E_NOT_AN_ABILITY', `${helper}() takes an ability, not ${describe(ability)}: ${helper}(PostPolicy.update, post). Abilities are passed by reference, never by name.`);
86
+ }
87
+ const marked = ability;
88
+ const user = currentUser();
89
+ if (user === null && marked[guests] !== true)
90
+ return null;
91
+ const info = marked[policyAbility];
92
+ if (user !== null && info?.before !== undefined) {
93
+ const early = await info.before(user, info.name);
94
+ if (early !== undefined && early !== null)
95
+ return verdict(early, 'before');
96
+ }
97
+ return verdict(await marked(user, ...subjects), marked.name);
98
+ }
99
+ /**
100
+ * Throws unless the signed-in user may: AuthorizationError (403, or 404 for `denyAsNotFound()`), or AuthenticationError
101
+ * when nobody is signed in and the ability does not allow guests. `await authorize(PostPolicy.update, post)`.
102
+ */
103
+ export async function authorize(ability, ...subjects) {
104
+ const decision = await decide('authorize', ability, subjects);
105
+ if (decision === null)
106
+ throw new AuthenticationError();
107
+ if (!decision.allowed)
108
+ throw new AuthorizationError(decision);
109
+ }
110
+ /** Whether the signed-in user may; false for a guest unless the ability allows guests. For UI flags sent as props. */
111
+ export async function can(ability, ...subjects) {
112
+ const decision = await decide('can', ability, subjects);
113
+ return decision?.allowed === true;
114
+ }
115
+ //# sourceMappingURL=policy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"policy.js","sourceRoot":"","sources":["../../src/auth/policy.ts"],"names":[],"mappings":"AAAA,oHAAoH;AACpH,+GAA+G;AAC/G,qHAAqH;AACrH,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAm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,OAAO,EAAE,QAAQ,CAAC,CAAA;IACvD,OAAO,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAA;AACrC,CAAC"}
@@ -0,0 +1,55 @@
1
+ import type { PasswordHash } from '../hash/index.ts';
2
+ import type { Handler } from '../http/index.ts';
3
+ import type { AnyModel } from '../model/index.ts';
4
+ import { type AuthPages, type ResetPasswordMailData, type SessionGuard, type VerifyEmailMailData } from './manager.ts';
5
+ /** A row that can sign in: it has an id and a password column. */
6
+ export interface Authenticatable {
7
+ readonly id: number | string;
8
+ readonly password: PasswordHash;
9
+ }
10
+ /** The string columns of a row: what users may sign in with. */
11
+ type StringProperties<T> = {
12
+ [K in keyof T]-?: T[K] extends string ? K : never;
13
+ }[keyof T] & string;
14
+ /** A mailable that can send one of the auth mails: what `defineMail` returns, taking (part of) that mail's data. */
15
+ export interface AuthMailable<D> {
16
+ readonly with: (data: D) => object;
17
+ }
18
+ /** The mailables `auth.mail()` replaces. */
19
+ export interface AuthMailables {
20
+ /** Sent by `passwords.sendResetLink()`. Its data: `url`, `token`, `email`, `name`, `minutes`. */
21
+ readonly reset?: AuthMailable<ResetPasswordMailData> | undefined;
22
+ /** Sent by `verification.send()`. Its data: `url`, `email`, `name`, `minutes`. */
23
+ readonly verify?: AuthMailable<VerifyEmailMailData> | undefined;
24
+ }
25
+ export interface AuthSetup {
26
+ /**
27
+ * The session guard: `auth.session(User)`. The model needs an id, a `password: column.password()` and the column users
28
+ * sign in with (`email`, or `options.username`). `rememberToken` enables "remember me", `emailVerifiedAt` `verified()`.
29
+ */
30
+ session<M extends AnyModel & (new () => Authenticatable)>(model: M, options?: {
31
+ username?: StringProperties<InstanceType<M>>;
32
+ }): void;
33
+ /** The handlers the framework redirects to. Handlers, not URLs. */
34
+ pages(pages: {
35
+ login: Handler<any>;
36
+ home: Handler<any>;
37
+ verificationNotice?: Handler<any>;
38
+ }): void;
39
+ /**
40
+ * The application's own reset and verification mails, in place of ResetPasswordMail and VerifyEmailMail:
41
+ * `auth.mail({ reset: ResetYourPassword })`.
42
+ */
43
+ mail(mailables: AuthMailables): void;
44
+ }
45
+ /** Collects what the application's withAuth() callbacks set up. */
46
+ export declare class AuthRegistry {
47
+ #private;
48
+ guard: SessionGuard | null;
49
+ pages: AuthPages | null;
50
+ mailables: AuthMailables;
51
+ readonly problems: string[];
52
+ readonly setup: AuthSetup;
53
+ }
54
+ export {};
55
+ //# sourceMappingURL=setup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../src/auth/setup.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AACpD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAC/C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AACjD,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,qBAAqB,EAAE,KAAK,YAAY,EAAgB,KAAK,mBAAmB,EAAE,MAAM,cAAc,CAAA;AAEpI,kEAAkE;AAClE,MAAM,WAAW,eAAe;IAC5B,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAAA;IAC5B,QAAQ,CAAC,QAAQ,EAAE,YAAY,CAAA;CAClC;AAED,gEAAgE;AAChE,KAAK,gBAAgB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,MAAM,GAAG,CAAC,GAAG,KAAK;CAAE,CAAC,MAAM,CAAC,CAAC,GAAG,MAAM,CAAA;AAElG,oHAAoH;AACpH,MAAM,WAAW,YAAY,CAAC,CAAC;IAC3B,QAAQ,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,CAAA;CACrC;AAED,4CAA4C;AAC5C,MAAM,WAAW,aAAa;IAC1B,iGAAiG;IACjG,QAAQ,CAAC,KAAK,CAAC,EAAE,YAAY,CAAC,qBAAqB,CAAC,GAAG,SAAS,CAAA;IAChE,kFAAkF;IAClF,QAAQ,CAAC,MAAM,CAAC,EAAE,YAAY,CAAC,mBAAmB,CAAC,GAAG,SAAS,CAAA;CAClE;AAED,MAAM,WAAW,SAAS;IACtB;;;OAGG;IACH,OAAO,CAAC,CAAC,SAAS,QAAQ,GAAG,CAAC,UAAU,eAAe,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,OAAO,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE,gBAAgB,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAAG,IAAI,CAAA;IACrI,mEAAmE;IACnE,KAAK,CAAC,KAAK,EAAE;QAAE,KAAK,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC;QAAC,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC;QAAC,kBAAkB,CAAC,EAAE,OAAO,CAAC,GAAG,CAAC,CAAA;KAAE,GAAG,IAAI,CAAA;IAClG;;;OAGG;IACH,IAAI,CAAC,SAAS,EAAE,aAAa,GAAG,IAAI,CAAA;CACvC;AAED,mEAAmE;AACnE,qBAAa,YAAY;;IACrB,KAAK,EAAE,YAAY,GAAG,IAAI,CAAO;IACjC,KAAK,EAAE,SAAS,GAAG,IAAI,CAAO;IAC9B,SAAS,EAAE,aAAa,CAAK;IAC7B,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,CAAK;IAGhC,QAAQ,CAAC,KAAK,EAAE,SAAS,CA2CxB;CACJ"}
@@ -0,0 +1,50 @@
1
+ import { sessionGuard } from './manager.js';
2
+ /** Collects what the application's withAuth() callbacks set up. */
3
+ export class AuthRegistry {
4
+ guard = null;
5
+ pages = null;
6
+ mailables = {};
7
+ problems = [];
8
+ #sessions = 0;
9
+ setup = {
10
+ session: (model, options = {}) => {
11
+ this.#sessions++;
12
+ if (this.#sessions > 1) {
13
+ this.problems.push('auth.session() is called twice. There is one session guard: call it once, in bootstrap/app.ts.');
14
+ return;
15
+ }
16
+ const result = sessionGuard(model, options.username ?? 'email');
17
+ this.problems.push(...result.problems);
18
+ this.guard = result.guard;
19
+ },
20
+ pages: (pages) => {
21
+ const entries = Object.entries(pages ?? {}).filter(([, handler]) => handler !== undefined);
22
+ const wrong = entries.filter(([, handler]) => typeof handler !== 'function').map(([name]) => name);
23
+ if (wrong.length > 0) {
24
+ this.problems.push(`auth.pages() takes handlers, not URLs: ${wrong.join(', ')}. Write auth.pages({ login: login.create, home: dashboard.show }).`);
25
+ return;
26
+ }
27
+ if (typeof pages.login !== 'function' || typeof pages.home !== 'function') {
28
+ this.problems.push('auth.pages() needs the login and home handlers: auth.pages({ login: login.create, home: dashboard.show }).');
29
+ return;
30
+ }
31
+ this.pages = Object.freeze({ ...pages });
32
+ },
33
+ mail: (mailables) => {
34
+ const entries = Object.entries(mailables ?? {}).filter(([, mailable]) => mailable !== undefined);
35
+ const unknown = entries.filter(([name]) => name !== 'reset' && name !== 'verify').map(([name]) => name);
36
+ const wrong = entries
37
+ .filter(([, mailable]) => typeof mailable?.with !== 'function')
38
+ .map(([name]) => name);
39
+ if (unknown.length > 0)
40
+ this.problems.push(`auth.mail() replaces the reset and verify mails, not ${unknown.join(', ')}.`);
41
+ if (wrong.length > 0) {
42
+ this.problems.push(`auth.mail() takes mailables made with defineMail(): ${wrong.join(', ')} ${wrong.length === 1 ? 'is' : 'are'} not. Write auth.mail({ reset: ResetYourPassword }).`);
43
+ }
44
+ if (unknown.length > 0 || wrong.length > 0)
45
+ return;
46
+ this.mailables = Object.freeze({ ...this.mailables, ...mailables });
47
+ },
48
+ };
49
+ }
50
+ //# sourceMappingURL=setup.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"setup.js","sourceRoot":"","sources":["../../src/auth/setup.ts"],"names":[],"mappings":"AAIA,OAAO,EAAiE,YAAY,EAA4B,MAAM,cAAc,CAAA;AAuCpI,mEAAmE;AACnE,MAAM,OAAO,YAAY;IACrB,KAAK,GAAwB,IAAI,CAAA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C,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,sDAAsD,CACrK,CAAA;YACL,CAAC;YACD,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC;gBAAE,OAAM;YAClD,IAAI,CAAC,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,GAAG,IAAI,CAAC,SAAS,EAAE,GAAG,SAAS,EAAE,CAAC,CAAA;QACvE,CAAC;KACJ,CAAA;CACJ"}
@@ -0,0 +1,19 @@
1
+ import { type UserRef } from '../scope/index.ts';
2
+ /** What to do with the "remember me" cookie when the response goes out. */
3
+ export type RememberCookie = {
4
+ readonly kind: 'set';
5
+ readonly value: string;
6
+ } | {
7
+ readonly kind: 'clear';
8
+ };
9
+ export declare class AuthState implements UserRef {
10
+ current: object | null;
11
+ /** The browser holds a "remember me" cookie, or signed in with `remember`. */
12
+ remembered: boolean;
13
+ /** A cookie change for the response. */
14
+ cookie: RememberCookie | null;
15
+ constructor(user?: object | null);
16
+ }
17
+ /** The current unit of work's auth state, or undefined when nothing set one (a command, a route without auth). */
18
+ export declare function currentState(): AuthState | undefined;
19
+ //# sourceMappingURL=state.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../src/auth/state.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,OAAO,EAAY,MAAM,mBAAmB,CAAA;AAE1D,2EAA2E;AAC3E,MAAM,MAAM,cAAc,GAAG;IAAE,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAA;CAAE,CAAA;AAE1G,qBAAa,SAAU,YAAW,OAAO;IACrC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;IACtB,8EAA8E;IAC9E,UAAU,UAAQ;IAClB,wCAAwC;IACxC,MAAM,EAAE,cAAc,GAAG,IAAI,CAAO;IAEpC,YAAY,IAAI,GAAE,MAAM,GAAG,IAAW,EAErC;CACJ;AAED,kHAAkH;AAClH,wBAAgB,YAAY,IAAI,SAAS,GAAG,SAAS,CAGpD"}
@@ -0,0 +1,19 @@
1
+ // The signed-in user of one unit of work, in the scope's user slot. Sign-in and sign-out change it in place, so code
2
+ // that runs later in the same request sees the change.
3
+ import { userSlot } from '../scope/index.js';
4
+ export class AuthState {
5
+ current;
6
+ /** The browser holds a "remember me" cookie, or signed in with `remember`. */
7
+ remembered = false;
8
+ /** A cookie change for the response. */
9
+ cookie = null;
10
+ constructor(user = null) {
11
+ this.current = user;
12
+ }
13
+ }
14
+ /** The current unit of work's auth state, or undefined when nothing set one (a command, a route without auth). */
15
+ export function currentState() {
16
+ const ref = userSlot.get();
17
+ return ref instanceof AuthState ? ref : undefined;
18
+ }
19
+ //# sourceMappingURL=state.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"state.js","sourceRoot":"","sources":["../../src/auth/state.ts"],"names":[],"mappings":"AAAA,qHAAqH;AACrH,uDAAuD;AACvD,OAAO,EAAgB,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAK1D,MAAM,OAAO,SAAS;IAClB,OAAO,CAAe;IACtB,8EAA8E;IAC9E,UAAU,GAAG,KAAK,CAAA;IAClB,wCAAwC;IACxC,MAAM,GAA0B,IAAI,CAAA;IAEpC,YAAY,IAAI,GAAkB,IAAI;QAClC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAA;IACvB,CAAC;CACJ;AAED,kHAAkH;AAClH,MAAM,UAAU,YAAY;IACxB,MAAM,GAAG,GAAG,QAAQ,CAAC,GAAG,EAAE,CAAA;IAC1B,OAAO,GAAG,YAAY,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,CAAA;AACrD,CAAC"}
@@ -0,0 +1,22 @@
1
+ import type { Cache } from '../cache/index.ts';
2
+ import type { Clock } from '../support/index.ts';
3
+ /** A new reset token: 32 random bytes, as URL-safe text. */
4
+ export declare function newResetToken(): string;
5
+ export declare class ResetTokens {
6
+ #private;
7
+ /** `cache` is called on each use, so the store is chosen on first use. */
8
+ constructor(options: {
9
+ clock: Clock;
10
+ cache: () => Cache;
11
+ });
12
+ /**
13
+ * Keeps `token` as the one reset token for `email`, replacing an earlier one. Returns false, keeping nothing, when a
14
+ * token was made for the address less than a minute ago.
15
+ */
16
+ store(email: string, token: string, lifetime: number): Promise<boolean>;
17
+ /** Whether `token` is the current token for `email` and has not expired. */
18
+ check(email: string, token: string, lifetime: number): Promise<boolean>;
19
+ /** Forgets the token for `email`; true for the one caller that removed it, so a token is used once. */
20
+ use(email: string): Promise<boolean>;
21
+ }
22
+ //# sourceMappingURL=tokens.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../../src/auth/tokens.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAC9C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAA;AAehD,4DAA4D;AAC5D,wBAAgB,aAAa,IAAI,MAAM,CAEtC;AAED,qBAAa,WAAW;;IAIpB,0EAA0E;IAC1E,YAAY,OAAO,EAAE;QAAE,KAAK,EAAE,KAAK,CAAC;QAAC,KAAK,EAAE,MAAM,KAAK,CAAA;KAAE,EAGxD;IAMD;;;OAGG;IACG,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAM5E;IAED,4EAA4E;IACtE,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAM5E;IAED,uGAAuG;IACvG,GAAG,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAEnC;CACJ"}
@@ -0,0 +1,51 @@
1
+ // Password reset tokens: random 32-byte values of which only the SHA-256 is kept, keyed by a hash of the email, for
2
+ // AUTH_RESET_EXPIRES. They live in the application's default cache store (`memory` when that is `null`), so a link
3
+ // works on every process that shares the store, and after a restart unless the store is kept in memory. A new token
4
+ // replaces the earlier one, and none is made within a minute of the last.
5
+ import { createHash, randomBytes, timingSafeEqual } from 'node:crypto';
6
+ /** How long after one reset link the next can be sent. */
7
+ const throttle = '1 minute';
8
+ function digest(text) {
9
+ return createHash('sha256').update(text).digest('hex');
10
+ }
11
+ /** A new reset token: 32 random bytes, as URL-safe text. */
12
+ export function newResetToken() {
13
+ return randomBytes(32).toString('base64url');
14
+ }
15
+ export class ResetTokens {
16
+ #clock;
17
+ #cache;
18
+ /** `cache` is called on each use, so the store is chosen on first use. */
19
+ constructor(options) {
20
+ this.#clock = options.clock;
21
+ this.#cache = options.cache;
22
+ }
23
+ #key(email) {
24
+ return `mimar:password-reset:${digest(email)}`;
25
+ }
26
+ /**
27
+ * Keeps `token` as the one reset token for `email`, replacing an earlier one. Returns false, keeping nothing, when a
28
+ * token was made for the address less than a minute ago.
29
+ */
30
+ async store(email, token, lifetime) {
31
+ const cache = this.#cache();
32
+ if (!(await cache.add(`mimar:password-reset-sent:${digest(email)}`, true, throttle)))
33
+ return false;
34
+ const entry = { hash: digest(token), createdAt: this.#clock.now().epochMilliseconds };
35
+ await cache.put(this.#key(email), entry, `${lifetime}ms`);
36
+ return true;
37
+ }
38
+ /** Whether `token` is the current token for `email` and has not expired. */
39
+ async check(email, token, lifetime) {
40
+ const entry = await this.#cache().get(this.#key(email));
41
+ // The age is checked as well as the cache's expiry: a store such as Redis expires entries by its own clock.
42
+ if (entry === null || typeof entry.hash !== 'string' || this.#clock.now().epochMilliseconds - entry.createdAt >= lifetime)
43
+ return false;
44
+ return timingSafeEqual(Buffer.from(entry.hash), Buffer.from(digest(token)));
45
+ }
46
+ /** Forgets the token for `email`; true for the one caller that removed it, so a token is used once. */
47
+ use(email) {
48
+ return this.#cache().forget(this.#key(email));
49
+ }
50
+ }
51
+ //# sourceMappingURL=tokens.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tokens.js","sourceRoot":"","sources":["../../src/auth/tokens.ts"],"names":[],"mappings":"AAAA,oHAAoH;AACpH,mHAAmH;AACnH,oHAAoH;AACpH,0EAA0E;AAC1E,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAItE,0DAA0D;AAC1D,MAAM,QAAQ,GAAG,UAAU,CAAA;AAE3B,SAAS,MAAM,CAAC,IAAY;IACxB,OAAO,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;AAC1D,CAAC;AAQD,4DAA4D;AAC5D,MAAM,UAAU,aAAa;IACzB,OAAO,WAAW,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAA;AAChD,CAAC;AAED,MAAM,OAAO,WAAW;IACX,MAAM,CAAO;IACb,MAAM,CAAa;IAE5B,0EAA0E;IAC1E,YAAY,OAA6C;QACrD,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,KAAK,CAAA;QAC3B,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,KAAK,CAAA;IAC/B,CAAC;IAED,IAAI,CAAC,KAAa;QACd,OAAO,wBAAwB,MAAM,CAAC,KAAK,CAAC,EAAE,CAAA;IAClD,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,KAAK,CAAC,KAAa,EAAE,KAAa,EAAE,QAAgB;QACtD,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,EAAE,CAAA;QAC3B,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,GAAG,CAAC,6BAA6B,MAAM,CAAC,KAAK,CAAC,EAAE,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC;YAAE,OAAO,KAAK,CAAA;QAClG,MAAM,KAAK,GAAU,EAAE,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,EAAE,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC,iBAAiB,EAAE,CAAA;QAC5F,MAAM,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,GAAG,QAAQ,IAAI,CAAC,CAAA;QACzD,OAAO,IAAI,CAAA;IACf,CAAC;IAED,4EAA4E;IAC5E,KAAK,CAAC,KAAK,CAAC,KAAa,EAAE,KAAa,EAAE,QAAgB;QACtD,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,MAAM,EAAE,CAAC,GAAG,CAAQ,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAA;QAC9D,4GAA4G;QAC5G,IAAI,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,CAAC,IAAI,KAAK,QAAQ,IAAI,IAAI,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC,iBAAiB,GAAG,KAAK,CAAC,SAAS,IAAI,QAAQ;YACrH,OAAO,KAAK,CAAA;QAChB,OAAO,eAAe,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;IAC/E,CAAC;IAED,uGAAuG;IACvG,GAAG,CAAC,KAAa;QACb,OAAO,IAAI,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAA;IACjD,CAAC;CACJ"}
@@ -0,0 +1,31 @@
1
+ import { type Handler, type HttpRequest } from '../http/index.ts';
2
+ import { type AuthUser } from './auth.ts';
3
+ /** The page a verification link opens: its route takes the user's id and the hash of the address. */
4
+ export type VerificationPage = Handler<{
5
+ id: string;
6
+ hash: string;
7
+ }>;
8
+ /** The signed verification link for `user`, valid for AUTH_VERIFY_EXPIRES: for an application that sends its own mail. */
9
+ declare function url(user: object, page: VerificationPage): string;
10
+ /**
11
+ * Mails `user` a signed link to `page`, valid for AUTH_VERIFY_EXPIRES. Sends nothing when the address is verified
12
+ * already, or when a link went to the same address less than a minute ago. Resolves whether it sent one.
13
+ */
14
+ declare function send(user: object, page: VerificationPage): Promise<boolean>;
15
+ /**
16
+ * Checks the link the signed-in user opened and marks their address verified; returns the user. A guest is sent to sign
17
+ * in, and back to the link after. An altered or expired link is InvalidSignatureError; a link for another user or an
18
+ * earlier address is InvalidVerificationLinkError (both 403). Opening a link again changes nothing.
19
+ */
20
+ declare function verify(request: HttpRequest<{
21
+ id: string;
22
+ hash: string;
23
+ }>): Promise<AuthUser>;
24
+ /** Email verification links: send one, build one, check one. */
25
+ export declare const verification: Readonly<{
26
+ send: typeof send;
27
+ url: typeof url;
28
+ verify: typeof verify;
29
+ }>;
30
+ export {};
31
+ //# sourceMappingURL=verification.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"verification.d.ts","sourceRoot":"","sources":["../../src/auth/verification.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,WAAW,EAA6C,MAAM,kBAAkB,CAAA;AAI5G,OAAO,EAAE,KAAK,QAAQ,EAAgD,MAAM,WAAW,CAAA;AAKvF,qGAAqG;AACrG,MAAM,MAAM,gBAAgB,GAAG,OAAO,CAAC;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,CAAA;AAyBpE,0HAA0H;AAC1H,iBAAS,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,gBAAgB,GAAG,MAAM,CAIzD;AAED;;;GAGG;AACH,iBAAe,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,gBAAgB,GAAG,OAAO,CAAC,OAAO,CAAC,CAW1E;AAED;;;;GAIG;AACH,iBAAe,MAAM,CAAC,OAAO,EAAE,WAAW,CAAC;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,CAY3F;AAED,gEAAgE;AAChE,eAAO,MAAM,YAAY;;;;EAAuC,CAAA"}
@@ -0,0 +1,77 @@
1
+ // Email verification: `verification.send(user, verification.verify)` mails a signed link holding the user's id and a
2
+ // hash of their address; `verification.verify(request)` checks it and sets emailVerifiedAt. A link stops working when
3
+ // it expires, when it is altered, and when the address changes.
4
+ import { createHash } from 'node:crypto';
5
+ import { MimarError } from '../errors/index.js';
6
+ import { InvalidSignatureError, rateLimit, signUrl } from '../http/index.js';
7
+ import { route } from '../routing/index.js';
8
+ import { currentApplication } from '../scope/index.js';
9
+ import { milliseconds, now } from '../time/index.js';
10
+ import { keyOf, requireUser, userOrFail } from './auth.js';
11
+ import { InvalidVerificationLinkError } from './errors.js';
12
+ import { AuthManager, sameText } from './manager.js';
13
+ import { emailGuard, minutesOf, nameOf, onAppUrl } from './passwords.js';
14
+ /** The hash of an address in a verification link: a new address makes earlier links stop working. */
15
+ function addressHash(email) {
16
+ return createHash('sha256').update(email).digest('hex');
17
+ }
18
+ function verifiableGuard(auth, helper) {
19
+ const guard = emailGuard(auth, helper);
20
+ if (guard.verifiable)
21
+ return guard;
22
+ throw new MimarError('E_NOT_VERIFIABLE', `${helper} sets emailVerifiedAt, and ${guard.model.name} has no such column. Declare it: emailVerifiedAt: column.timestamp().nullable().`);
23
+ }
24
+ function isVerified(user) {
25
+ return user.emailVerifiedAt !== null && user.emailVerifiedAt !== undefined;
26
+ }
27
+ function link(auth, guard, user, page) {
28
+ const path = route(page, { id: keyOf(guard, user), hash: addressHash(user.email) });
29
+ return signUrl(onAppUrl(auth, path), now().add({ milliseconds: milliseconds(auth.config.verifyExpires) })).toString();
30
+ }
31
+ /** The signed verification link for `user`, valid for AUTH_VERIFY_EXPIRES: for an application that sends its own mail. */
32
+ function url(user, page) {
33
+ const auth = currentApplication('verification.url()').resolve(AuthManager);
34
+ const guard = verifiableGuard(auth, 'verification.url()');
35
+ return link(auth, guard, requireUser(guard, user, 'verification.url()'), page);
36
+ }
37
+ /**
38
+ * Mails `user` a signed link to `page`, valid for AUTH_VERIFY_EXPIRES. Sends nothing when the address is verified
39
+ * already, or when a link went to the same address less than a minute ago. Resolves whether it sent one.
40
+ */
41
+ async function send(user, page) {
42
+ const auth = currentApplication('verification.send()').resolve(AuthManager);
43
+ const guard = verifiableGuard(auth, 'verification.send()');
44
+ const row = requireUser(guard, user, 'verification.send()');
45
+ if (isVerified(row))
46
+ return false;
47
+ const address = row.email;
48
+ const url = link(auth, guard, row, page);
49
+ const attempt = await rateLimit.hit(`verification:${String(keyOf(guard, row))}:${addressHash(address)}`, { perMinute: 1 });
50
+ if (!attempt.allowed)
51
+ return false;
52
+ await auth.mail('verify', row, { url, email: address, name: nameOf(row), minutes: minutesOf(auth.config.verifyExpires) });
53
+ return true;
54
+ }
55
+ /**
56
+ * Checks the link the signed-in user opened and marks their address verified; returns the user. A guest is sent to sign
57
+ * in, and back to the link after. An altered or expired link is InvalidSignatureError; a link for another user or an
58
+ * earlier address is InvalidVerificationLinkError (both 403). Opening a link again changes nothing.
59
+ */
60
+ async function verify(request) {
61
+ const auth = currentApplication('verification.verify()').resolve(AuthManager);
62
+ const guard = verifiableGuard(auth, 'verification.verify()');
63
+ const user = requireUser(guard, userOrFail(), 'verification.verify()');
64
+ if (!request.hasValidSignature())
65
+ throw new InvalidSignatureError();
66
+ const id = request.param('id');
67
+ const hash = request.param('hash');
68
+ if (id !== String(keyOf(guard, user)) || !sameText(hash, addressHash(user.email))) {
69
+ throw new InvalidVerificationLinkError();
70
+ }
71
+ if (!isVerified(user))
72
+ await user.update({ emailVerifiedAt: now() });
73
+ return user;
74
+ }
75
+ /** Email verification links: send one, build one, check one. */
76
+ export const verification = Object.freeze({ send, url, verify });
77
+ //# sourceMappingURL=verification.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"verification.js","sourceRoot":"","sources":["../../src/auth/verification.ts"],"names":[],"mappings":"AAAA,qHAAqH;AACrH,sHAAsH;AACtH,gEAAgE;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAC/C,OAAO,EAAkC,qBAAqB,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAC5G,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAA;AAC3C,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AACtD,OAAO,EAAE,YAAY,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAA;AACpD,OAAO,EAAiB,KAAK,EAAE,WAAW,EAAgB,UAAU,EAAE,MAAM,WAAW,CAAA;AACvF,OAAO,EAAE,4BAA4B,EAAE,MAAM,aAAa,CAAA;AAC1D,OAAO,EAAE,WAAW,EAAqB,QAAQ,EAAE,MAAM,cAAc,CAAA;AACvE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAKxE,qGAAqG;AACrG,SAAS,WAAW,CAAC,KAAa;IAC9B,OAAO,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;AAC3D,CAAC;AAED,SAAS,eAAe,CAAC,IAAiB,EAAE,MAAc;IACtD,MAAM,KAAK,GAAG,UAAU,CAAC,IAAI,EAAE,MAAM,CAAC,CAAA;IACtC,IAAI,KAAK,CAAC,UAAU;QAAE,OAAO,KAAK,CAAA;IAClC,MAAM,IAAI,UAAU,CAChB,kBAAkB,EAClB,GAAG,MAAM,8BAA8B,KAAK,CAAC,KAAK,CAAC,IAAI,kFAAkF,CAC5I,CAAA;AACL,CAAC;AAED,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AAC,CAAA;IAClC,IAAI,EAAE,KAAK,MAAM,CAAC,KAAK,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC,IAAI,CAAC,KAAe,CAAC,CAAC,EAAE,CAAC;QAC1F,MAAM,IAAI,4BAA4B,EAAE,CAAA;IAC5C,CAAC;IACD,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC;QAAE,MAAM,IAAI,CAAC,MAAM,CAAC,EAAE,eAAe,EAAE,GAAG,EAAE,EAAE,CAAC,CAAA;IACpE,OAAO,IAA2B,CAAA;AACtC,CAAC;AAED,gEAAgE;AAChE,MAAM,CAAC,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,CAAC,CAAA"}
@@ -0,0 +1,2 @@
1
+ export { type AwsCredentials, type AwsRequest, type AwsSigningOptions, amzDate, awsEncode, type SignedAwsRequest, signAwsRequest, signingKey, } from './signer.ts';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/aws/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,KAAK,cAAc,EACnB,KAAK,UAAU,EACf,KAAK,iBAAiB,EACtB,OAAO,EACP,SAAS,EACT,KAAK,gBAAgB,EACrB,cAAc,EACd,UAAU,GACb,MAAM,aAAa,CAAA"}
@@ -0,0 +1,2 @@
1
+ export { amzDate, awsEncode, signAwsRequest, signingKey, } from './signer.js';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/aws/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAIH,OAAO,EACP,SAAS,EAET,cAAc,EACd,UAAU,GACb,MAAM,aAAa,CAAA"}