@xtandard/kit 0.0.0-stage → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (402) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +71 -2
  3. package/bin/xtandard-kit.mjs +3 -0
  4. package/dist/base-path-BJugWLNO.cjs +42 -0
  5. package/dist/base-path-BJugWLNO.cjs.map +1 -0
  6. package/dist/base-path-CDb4In5E.mjs +31 -0
  7. package/dist/base-path-CDb4In5E.mjs.map +1 -0
  8. package/dist/basic-Qtriv0xS.mjs +176 -0
  9. package/dist/basic-Qtriv0xS.mjs.map +1 -0
  10. package/dist/basic-ZaO92-lB.cjs +199 -0
  11. package/dist/basic-ZaO92-lB.cjs.map +1 -0
  12. package/dist/bin.cjs +126 -0
  13. package/dist/bin.cjs.map +1 -0
  14. package/dist/bin.d.cts +20 -0
  15. package/dist/bin.d.mts +20 -0
  16. package/dist/bin.mjs +125 -0
  17. package/dist/bin.mjs.map +1 -0
  18. package/dist/cas-CuPSaXBV.cjs +23 -0
  19. package/dist/cas-CuPSaXBV.cjs.map +1 -0
  20. package/dist/cas-CzA-yECx.mjs +18 -0
  21. package/dist/cas-CzA-yECx.mjs.map +1 -0
  22. package/dist/chunk-DakpK96I.cjs +43 -0
  23. package/dist/contract-B3UPXXLx.d.cts +30 -0
  24. package/dist/contract-B3UPXXLx.d.mts +30 -0
  25. package/dist/contract-BDPNvjtp.d.mts +64 -0
  26. package/dist/contract-BEdfGTPs.mjs +85 -0
  27. package/dist/contract-BEdfGTPs.mjs.map +1 -0
  28. package/dist/contract-BIVzAn4f.d.cts +64 -0
  29. package/dist/contract-BvgtswLX.d.cts +75 -0
  30. package/dist/contract-BvgtswLX.d.mts +75 -0
  31. package/dist/contract-DUj9P3Vt.d.cts +72 -0
  32. package/dist/contract-DUj9P3Vt.d.mts +72 -0
  33. package/dist/contract-wAEMDmYG.cjs +132 -0
  34. package/dist/contract-wAEMDmYG.cjs.map +1 -0
  35. package/dist/drizzle-BElCHWri.d.mts +115 -0
  36. package/dist/drizzle-BXaQXCr0.cjs +232 -0
  37. package/dist/drizzle-BXaQXCr0.cjs.map +1 -0
  38. package/dist/drizzle-CEpahWQB.d.cts +115 -0
  39. package/dist/drizzle-DxnelsPT.mjs +197 -0
  40. package/dist/drizzle-DxnelsPT.mjs.map +1 -0
  41. package/dist/duration-7WpAK-xe.mjs +52 -0
  42. package/dist/duration-7WpAK-xe.mjs.map +1 -0
  43. package/dist/duration-DVA0Fzkx.cjs +63 -0
  44. package/dist/duration-DVA0Fzkx.cjs.map +1 -0
  45. package/dist/duration-FPwbmWIU.d.cts +35 -0
  46. package/dist/duration-FPwbmWIU.d.mts +35 -0
  47. package/dist/entry-adapters-bun.cjs +10 -0
  48. package/dist/entry-adapters-bun.cjs.map +1 -0
  49. package/dist/entry-adapters-bun.d.cts +10 -0
  50. package/dist/entry-adapters-bun.d.mts +10 -0
  51. package/dist/entry-adapters-bun.mjs +9 -0
  52. package/dist/entry-adapters-bun.mjs.map +1 -0
  53. package/dist/entry-adapters-elysia.cjs +54 -0
  54. package/dist/entry-adapters-elysia.cjs.map +1 -0
  55. package/dist/entry-adapters-elysia.d.cts +38 -0
  56. package/dist/entry-adapters-elysia.d.mts +38 -0
  57. package/dist/entry-adapters-elysia.mjs +53 -0
  58. package/dist/entry-adapters-elysia.mjs.map +1 -0
  59. package/dist/entry-adapters-express.cjs +27 -0
  60. package/dist/entry-adapters-express.cjs.map +1 -0
  61. package/dist/entry-adapters-express.d.cts +24 -0
  62. package/dist/entry-adapters-express.d.mts +24 -0
  63. package/dist/entry-adapters-express.mjs +26 -0
  64. package/dist/entry-adapters-express.mjs.map +1 -0
  65. package/dist/entry-adapters-hono.cjs +33 -0
  66. package/dist/entry-adapters-hono.cjs.map +1 -0
  67. package/dist/entry-adapters-hono.d.cts +36 -0
  68. package/dist/entry-adapters-hono.d.mts +36 -0
  69. package/dist/entry-adapters-hono.mjs +30 -0
  70. package/dist/entry-adapters-hono.mjs.map +1 -0
  71. package/dist/entry-adapters-next.cjs +19 -0
  72. package/dist/entry-adapters-next.cjs.map +1 -0
  73. package/dist/entry-adapters-next.d.cts +35 -0
  74. package/dist/entry-adapters-next.d.mts +35 -0
  75. package/dist/entry-adapters-next.mjs +18 -0
  76. package/dist/entry-adapters-next.mjs.map +1 -0
  77. package/dist/entry-adapters-node.cjs +7 -0
  78. package/dist/entry-adapters-node.d.cts +2 -0
  79. package/dist/entry-adapters-node.d.mts +2 -0
  80. package/dist/entry-adapters-node.mjs +2 -0
  81. package/dist/entry-auth-basic.cjs +5 -0
  82. package/dist/entry-auth-basic.d.cts +83 -0
  83. package/dist/entry-auth-basic.d.mts +83 -0
  84. package/dist/entry-auth-basic.mjs +2 -0
  85. package/dist/entry-auth-delegated.cjs +28 -0
  86. package/dist/entry-auth-delegated.cjs.map +1 -0
  87. package/dist/entry-auth-delegated.d.cts +36 -0
  88. package/dist/entry-auth-delegated.d.mts +36 -0
  89. package/dist/entry-auth-delegated.mjs +27 -0
  90. package/dist/entry-auth-delegated.mjs.map +1 -0
  91. package/dist/entry-auth-none.cjs +4 -0
  92. package/dist/entry-auth-none.d.cts +25 -0
  93. package/dist/entry-auth-none.d.mts +25 -0
  94. package/dist/entry-auth-none.mjs +2 -0
  95. package/dist/entry-auth.cjs +0 -0
  96. package/dist/entry-auth.d.cts +2 -0
  97. package/dist/entry-auth.d.mts +2 -0
  98. package/dist/entry-auth.mjs +1 -0
  99. package/dist/entry-authorization-delegated.cjs +27 -0
  100. package/dist/entry-authorization-delegated.cjs.map +1 -0
  101. package/dist/entry-authorization-delegated.d.cts +31 -0
  102. package/dist/entry-authorization-delegated.d.mts +31 -0
  103. package/dist/entry-authorization-delegated.mjs +26 -0
  104. package/dist/entry-authorization-delegated.mjs.map +1 -0
  105. package/dist/entry-authorization-none.cjs +3 -0
  106. package/dist/entry-authorization-none.d.cts +18 -0
  107. package/dist/entry-authorization-none.d.mts +18 -0
  108. package/dist/entry-authorization-none.mjs +2 -0
  109. package/dist/entry-authorization-roles.cjs +3 -0
  110. package/dist/entry-authorization-roles.d.cts +2 -0
  111. package/dist/entry-authorization-roles.d.mts +2 -0
  112. package/dist/entry-authorization-roles.mjs +2 -0
  113. package/dist/entry-authorization.cjs +35 -0
  114. package/dist/entry-authorization.cjs.map +1 -0
  115. package/dist/entry-authorization.d.cts +2 -0
  116. package/dist/entry-authorization.d.mts +2 -0
  117. package/dist/entry-authorization.mjs +34 -0
  118. package/dist/entry-authorization.mjs.map +1 -0
  119. package/dist/entry-build.cjs +481 -0
  120. package/dist/entry-build.cjs.map +1 -0
  121. package/dist/entry-build.d.cts +355 -0
  122. package/dist/entry-build.d.mts +355 -0
  123. package/dist/entry-build.mjs +460 -0
  124. package/dist/entry-build.mjs.map +1 -0
  125. package/dist/entry-cli.cjs +368 -0
  126. package/dist/entry-cli.cjs.map +1 -0
  127. package/dist/entry-cli.d.cts +275 -0
  128. package/dist/entry-cli.d.mts +275 -0
  129. package/dist/entry-cli.mjs +355 -0
  130. package/dist/entry-cli.mjs.map +1 -0
  131. package/dist/entry-drizzle-mysql.cjs +36 -0
  132. package/dist/entry-drizzle-mysql.cjs.map +1 -0
  133. package/dist/entry-drizzle-mysql.d.cts +55 -0
  134. package/dist/entry-drizzle-mysql.d.mts +55 -0
  135. package/dist/entry-drizzle-mysql.mjs +34 -0
  136. package/dist/entry-drizzle-mysql.mjs.map +1 -0
  137. package/dist/entry-drizzle-pg.cjs +38 -0
  138. package/dist/entry-drizzle-pg.cjs.map +1 -0
  139. package/dist/entry-drizzle-pg.d.cts +78 -0
  140. package/dist/entry-drizzle-pg.d.mts +78 -0
  141. package/dist/entry-drizzle-pg.mjs +36 -0
  142. package/dist/entry-drizzle-pg.mjs.map +1 -0
  143. package/dist/entry-drizzle-sqlite.cjs +20 -0
  144. package/dist/entry-drizzle-sqlite.cjs.map +1 -0
  145. package/dist/entry-drizzle-sqlite.d.cts +22 -0
  146. package/dist/entry-drizzle-sqlite.d.mts +22 -0
  147. package/dist/entry-drizzle-sqlite.mjs +19 -0
  148. package/dist/entry-drizzle-sqlite.mjs.map +1 -0
  149. package/dist/entry-hooks-log.cjs +32 -0
  150. package/dist/entry-hooks-log.cjs.map +1 -0
  151. package/dist/entry-hooks-log.d.cts +36 -0
  152. package/dist/entry-hooks-log.d.mts +36 -0
  153. package/dist/entry-hooks-log.mjs +31 -0
  154. package/dist/entry-hooks-log.mjs.map +1 -0
  155. package/dist/entry-hooks.cjs +10 -0
  156. package/dist/entry-hooks.d.cts +2 -0
  157. package/dist/entry-hooks.d.mts +2 -0
  158. package/dist/entry-hooks.mjs +2 -0
  159. package/dist/entry-server-router.cjs +235 -0
  160. package/dist/entry-server-router.cjs.map +1 -0
  161. package/dist/entry-server-router.d.cts +193 -0
  162. package/dist/entry-server-router.d.mts +193 -0
  163. package/dist/entry-server-router.mjs +228 -0
  164. package/dist/entry-server-router.mjs.map +1 -0
  165. package/dist/entry-server.cjs +344 -0
  166. package/dist/entry-server.cjs.map +1 -0
  167. package/dist/entry-server.d.cts +230 -0
  168. package/dist/entry-server.d.mts +230 -0
  169. package/dist/entry-server.mjs +322 -0
  170. package/dist/entry-server.mjs.map +1 -0
  171. package/dist/entry-site.cjs +1083 -0
  172. package/dist/entry-site.cjs.map +1 -0
  173. package/dist/entry-site.d.cts +336 -0
  174. package/dist/entry-site.d.mts +336 -0
  175. package/dist/entry-site.mjs +1060 -0
  176. package/dist/entry-site.mjs.map +1 -0
  177. package/dist/entry-storage-cloudflare-kv.cjs +51 -0
  178. package/dist/entry-storage-cloudflare-kv.cjs.map +1 -0
  179. package/dist/entry-storage-cloudflare-kv.d.cts +52 -0
  180. package/dist/entry-storage-cloudflare-kv.d.mts +52 -0
  181. package/dist/entry-storage-cloudflare-kv.mjs +50 -0
  182. package/dist/entry-storage-cloudflare-kv.mjs.map +1 -0
  183. package/dist/entry-storage-drizzle-internals.cjs +6 -0
  184. package/dist/entry-storage-drizzle-internals.d.cts +2 -0
  185. package/dist/entry-storage-drizzle-internals.d.mts +2 -0
  186. package/dist/entry-storage-drizzle-internals.mjs +2 -0
  187. package/dist/entry-storage-drizzle.cjs +4 -0
  188. package/dist/entry-storage-drizzle.d.cts +3 -0
  189. package/dist/entry-storage-drizzle.d.mts +3 -0
  190. package/dist/entry-storage-drizzle.mjs +2 -0
  191. package/dist/entry-storage-file.cjs +306 -0
  192. package/dist/entry-storage-file.cjs.map +1 -0
  193. package/dist/entry-storage-file.d.cts +76 -0
  194. package/dist/entry-storage-file.d.mts +76 -0
  195. package/dist/entry-storage-file.mjs +301 -0
  196. package/dist/entry-storage-file.mjs.map +1 -0
  197. package/dist/entry-storage-libsql-internals.cjs +7 -0
  198. package/dist/entry-storage-libsql-internals.d.cts +3 -0
  199. package/dist/entry-storage-libsql-internals.d.mts +3 -0
  200. package/dist/entry-storage-libsql-internals.mjs +3 -0
  201. package/dist/entry-storage-libsql.cjs +3 -0
  202. package/dist/entry-storage-libsql.d.cts +2 -0
  203. package/dist/entry-storage-libsql.d.mts +2 -0
  204. package/dist/entry-storage-libsql.mjs +2 -0
  205. package/dist/entry-storage-memory.cjs +78 -0
  206. package/dist/entry-storage-memory.cjs.map +1 -0
  207. package/dist/entry-storage-memory.d.cts +35 -0
  208. package/dist/entry-storage-memory.d.mts +35 -0
  209. package/dist/entry-storage-memory.mjs +77 -0
  210. package/dist/entry-storage-memory.mjs.map +1 -0
  211. package/dist/entry-storage-mongodb-internals.cjs +5 -0
  212. package/dist/entry-storage-mongodb-internals.d.cts +2 -0
  213. package/dist/entry-storage-mongodb-internals.d.mts +2 -0
  214. package/dist/entry-storage-mongodb-internals.mjs +2 -0
  215. package/dist/entry-storage-mongodb.cjs +3 -0
  216. package/dist/entry-storage-mongodb.d.cts +2 -0
  217. package/dist/entry-storage-mongodb.d.mts +2 -0
  218. package/dist/entry-storage-mongodb.mjs +2 -0
  219. package/dist/entry-storage-postgres-internals.cjs +6 -0
  220. package/dist/entry-storage-postgres-internals.d.cts +2 -0
  221. package/dist/entry-storage-postgres-internals.d.mts +2 -0
  222. package/dist/entry-storage-postgres-internals.mjs +2 -0
  223. package/dist/entry-storage-postgres.cjs +4 -0
  224. package/dist/entry-storage-postgres.d.cts +2 -0
  225. package/dist/entry-storage-postgres.d.mts +2 -0
  226. package/dist/entry-storage-postgres.mjs +2 -0
  227. package/dist/entry-storage-redis-internals.cjs +7 -0
  228. package/dist/entry-storage-redis-internals.d.cts +2 -0
  229. package/dist/entry-storage-redis-internals.d.mts +2 -0
  230. package/dist/entry-storage-redis-internals.mjs +2 -0
  231. package/dist/entry-storage-redis.cjs +4 -0
  232. package/dist/entry-storage-redis.d.cts +2 -0
  233. package/dist/entry-storage-redis.d.mts +2 -0
  234. package/dist/entry-storage-redis.mjs +2 -0
  235. package/dist/entry-storage-sqlite-internals.cjs +7 -0
  236. package/dist/entry-storage-sqlite-internals.d.cts +3 -0
  237. package/dist/entry-storage-sqlite-internals.d.mts +3 -0
  238. package/dist/entry-storage-sqlite-internals.mjs +3 -0
  239. package/dist/entry-storage-sqlite.cjs +3 -0
  240. package/dist/entry-storage-sqlite.d.cts +2 -0
  241. package/dist/entry-storage-sqlite.d.mts +2 -0
  242. package/dist/entry-storage-sqlite.mjs +2 -0
  243. package/dist/entry-storage-testing.cjs +801 -0
  244. package/dist/entry-storage-testing.cjs.map +1 -0
  245. package/dist/entry-storage-testing.d.cts +150 -0
  246. package/dist/entry-storage-testing.d.mts +150 -0
  247. package/dist/entry-storage-testing.mjs +790 -0
  248. package/dist/entry-storage-testing.mjs.map +1 -0
  249. package/dist/entry-storage-unstorage.cjs +78 -0
  250. package/dist/entry-storage-unstorage.cjs.map +1 -0
  251. package/dist/entry-storage-unstorage.d.cts +30 -0
  252. package/dist/entry-storage-unstorage.d.mts +30 -0
  253. package/dist/entry-storage-unstorage.mjs +77 -0
  254. package/dist/entry-storage-unstorage.mjs.map +1 -0
  255. package/dist/entry-storage.cjs +114 -0
  256. package/dist/entry-storage.cjs.map +1 -0
  257. package/dist/entry-storage.d.cts +152 -0
  258. package/dist/entry-storage.d.mts +152 -0
  259. package/dist/entry-storage.mjs +91 -0
  260. package/dist/entry-storage.mjs.map +1 -0
  261. package/dist/entry-testing.cjs +79 -0
  262. package/dist/entry-testing.cjs.map +1 -0
  263. package/dist/entry-testing.d.cts +55 -0
  264. package/dist/entry-testing.d.mts +55 -0
  265. package/dist/entry-testing.mjs +77 -0
  266. package/dist/entry-testing.mjs.map +1 -0
  267. package/dist/entry-tokens.cjs +4 -0
  268. package/dist/entry-tokens.d.cts +85 -0
  269. package/dist/entry-tokens.d.mts +85 -0
  270. package/dist/entry-tokens.mjs +2 -0
  271. package/dist/entry-ui-embed.cjs +131 -0
  272. package/dist/entry-ui-embed.cjs.map +1 -0
  273. package/dist/entry-ui-embed.d.cts +87 -0
  274. package/dist/entry-ui-embed.d.mts +87 -0
  275. package/dist/entry-ui-embed.mjs +127 -0
  276. package/dist/entry-ui-embed.mjs.map +1 -0
  277. package/dist/entry-ui.cjs +795 -0
  278. package/dist/entry-ui.cjs.map +1 -0
  279. package/dist/entry-ui.d.cts +574 -0
  280. package/dist/entry-ui.d.mts +574 -0
  281. package/dist/entry-ui.mjs +731 -0
  282. package/dist/entry-ui.mjs.map +1 -0
  283. package/dist/entry-util.cjs +145 -0
  284. package/dist/entry-util.cjs.map +1 -0
  285. package/dist/entry-util.d.cts +85 -0
  286. package/dist/entry-util.d.mts +85 -0
  287. package/dist/entry-util.mjs +130 -0
  288. package/dist/entry-util.mjs.map +1 -0
  289. package/dist/http-B_rTnLW9.cjs +235 -0
  290. package/dist/http-B_rTnLW9.cjs.map +1 -0
  291. package/dist/http-CxYM7kPT.d.mts +133 -0
  292. package/dist/http-DVdVI6kJ.mjs +164 -0
  293. package/dist/http-DVdVI6kJ.mjs.map +1 -0
  294. package/dist/http-XBVRk8uo.d.cts +133 -0
  295. package/dist/index.cjs +8 -0
  296. package/dist/index.cjs.map +1 -0
  297. package/dist/index.d.cts +6 -0
  298. package/dist/index.d.mts +6 -0
  299. package/dist/index.mjs +7 -0
  300. package/dist/index.mjs.map +1 -0
  301. package/dist/json-CCyzstIm.d.cts +44 -0
  302. package/dist/json-CCyzstIm.d.mts +44 -0
  303. package/dist/json-CM7TwYQ7.cjs +92 -0
  304. package/dist/json-CM7TwYQ7.cjs.map +1 -0
  305. package/dist/json-CmM1M5Kz.mjs +63 -0
  306. package/dist/json-CmM1M5Kz.mjs.map +1 -0
  307. package/dist/keys-Bwubabk0.mjs +73 -0
  308. package/dist/keys-Bwubabk0.mjs.map +1 -0
  309. package/dist/keys-DQrwxDKI.cjs +126 -0
  310. package/dist/keys-DQrwxDKI.cjs.map +1 -0
  311. package/dist/kv-sqlite-B6iTLOx2.d.cts +20 -0
  312. package/dist/kv-sqlite-CHOdIMJ-.cjs +77 -0
  313. package/dist/kv-sqlite-CHOdIMJ-.cjs.map +1 -0
  314. package/dist/kv-sqlite-DIIPfflJ.mjs +66 -0
  315. package/dist/kv-sqlite-DIIPfflJ.mjs.map +1 -0
  316. package/dist/kv-sqlite-Tx4UedJs.d.mts +20 -0
  317. package/dist/libsql-0160BubR.d.mts +65 -0
  318. package/dist/libsql-BZmRZIqt.d.cts +65 -0
  319. package/dist/libsql-CiBfVtbS.cjs +103 -0
  320. package/dist/libsql-CiBfVtbS.cjs.map +1 -0
  321. package/dist/libsql-CkOjQINi.mjs +86 -0
  322. package/dist/libsql-CkOjQINi.mjs.map +1 -0
  323. package/dist/mongodb--Cuj7V_9.cjs +150 -0
  324. package/dist/mongodb--Cuj7V_9.cjs.map +1 -0
  325. package/dist/mongodb-DGtsolQ2.d.cts +61 -0
  326. package/dist/mongodb-JMizy4Wg.mjs +127 -0
  327. package/dist/mongodb-JMizy4Wg.mjs.map +1 -0
  328. package/dist/mongodb-xGEU5Gwz.d.mts +61 -0
  329. package/dist/node-B1Djcwfi.d.cts +57 -0
  330. package/dist/node-B1Djcwfi.d.mts +57 -0
  331. package/dist/node-BYjocCbU.mjs +167 -0
  332. package/dist/node-BYjocCbU.mjs.map +1 -0
  333. package/dist/node-DFFqYRk-.cjs +201 -0
  334. package/dist/node-DFFqYRk-.cjs.map +1 -0
  335. package/dist/none-BEY7Kc_-.mjs +33 -0
  336. package/dist/none-BEY7Kc_-.mjs.map +1 -0
  337. package/dist/none-BoQ6-30P.cjs +33 -0
  338. package/dist/none-BoQ6-30P.cjs.map +1 -0
  339. package/dist/none-CHwVkQL-.cjs +49 -0
  340. package/dist/none-CHwVkQL-.cjs.map +1 -0
  341. package/dist/none-yu3qC47E.mjs +23 -0
  342. package/dist/none-yu3qC47E.mjs.map +1 -0
  343. package/dist/peer-BIjBFzwQ.cjs +56 -0
  344. package/dist/peer-BIjBFzwQ.cjs.map +1 -0
  345. package/dist/peer-CTHMzOdn.mjs +40 -0
  346. package/dist/peer-CTHMzOdn.mjs.map +1 -0
  347. package/dist/portal-container-CJIcau3B.mjs +610 -0
  348. package/dist/portal-container-CJIcau3B.mjs.map +1 -0
  349. package/dist/portal-container-Ca1NxrLE.cjs +774 -0
  350. package/dist/portal-container-Ca1NxrLE.cjs.map +1 -0
  351. package/dist/postgres-BJzxKBk0.d.cts +72 -0
  352. package/dist/postgres-CA8_XcAE.cjs +164 -0
  353. package/dist/postgres-CA8_XcAE.cjs.map +1 -0
  354. package/dist/postgres-RfQMgAsj.d.mts +72 -0
  355. package/dist/postgres-aDiBmNzr.mjs +135 -0
  356. package/dist/postgres-aDiBmNzr.mjs.map +1 -0
  357. package/dist/redis-B2AS4xAQ.cjs +259 -0
  358. package/dist/redis-B2AS4xAQ.cjs.map +1 -0
  359. package/dist/redis-B362ofBw.d.cts +159 -0
  360. package/dist/redis-CahNAVTW.d.mts +159 -0
  361. package/dist/redis-hdoKymfG.mjs +218 -0
  362. package/dist/redis-hdoKymfG.mjs.map +1 -0
  363. package/dist/roles-7JPrQXZa.mjs +46 -0
  364. package/dist/roles-7JPrQXZa.mjs.map +1 -0
  365. package/dist/roles-B_8QqJ3j.cjs +56 -0
  366. package/dist/roles-B_8QqJ3j.cjs.map +1 -0
  367. package/dist/roles-DLISB4T3.d.mts +41 -0
  368. package/dist/roles-DQbbtUPW.d.cts +41 -0
  369. package/dist/rolldown-runtime-D7D4PA-g.mjs +13 -0
  370. package/dist/scope-css-BN3jf0ly.cjs +315 -0
  371. package/dist/scope-css-BN3jf0ly.cjs.map +1 -0
  372. package/dist/scope-css-BuJfRCsE.mjs +256 -0
  373. package/dist/scope-css-BuJfRCsE.mjs.map +1 -0
  374. package/dist/scoped-BRoE1W1x.cjs +175 -0
  375. package/dist/scoped-BRoE1W1x.cjs.map +1 -0
  376. package/dist/scoped-cFBbotCh.mjs +164 -0
  377. package/dist/scoped-cFBbotCh.mjs.map +1 -0
  378. package/dist/sqlite-B2g1JJz1.d.cts +47 -0
  379. package/dist/sqlite-BIPIlxfj.d.mts +47 -0
  380. package/dist/sqlite-BntoYaXZ.cjs +79 -0
  381. package/dist/sqlite-BntoYaXZ.cjs.map +1 -0
  382. package/dist/sqlite-DYJDcu7p.mjs +62 -0
  383. package/dist/sqlite-DYJDcu7p.mjs.map +1 -0
  384. package/dist/table-BrioFSra.d.cts +11 -0
  385. package/dist/table-BrioFSra.d.mts +11 -0
  386. package/dist/theme-context-DzZ1otaD.d.cts +270 -0
  387. package/dist/theme-context-J65pythD.d.mts +270 -0
  388. package/dist/ui/styles.css +239 -0
  389. package/dist/util-Dnj5T-yw.mjs +39 -0
  390. package/dist/util-Dnj5T-yw.mjs.map +1 -0
  391. package/dist/util-dAnTK9x-.cjs +74 -0
  392. package/dist/util-dAnTK9x-.cjs.map +1 -0
  393. package/dist/validation-B-atP968.mjs +191 -0
  394. package/dist/validation-B-atP968.mjs.map +1 -0
  395. package/dist/validation-BJifGoB2.d.mts +122 -0
  396. package/dist/validation-DLnzBVJr.cjs +258 -0
  397. package/dist/validation-DLnzBVJr.cjs.map +1 -0
  398. package/dist/validation-tfV2qhbD.d.cts +122 -0
  399. package/package.json +715 -4
  400. package/tsconfig/assets.d.ts +21 -0
  401. package/tsconfig/base.json +21 -0
  402. package/tsconfig/react.json +9 -0
@@ -0,0 +1,36 @@
1
+ import { t as FetchHandler } from "./node-B1Djcwfi.cjs";
2
+
3
+ //#region src/adapters/hono.d.ts
4
+ /** The part of a Hono context the helpers read. */
5
+ interface HonoContextLike {
6
+ req: {
7
+ raw: Request;
8
+ };
9
+ /** Throws on runtimes without an execution context (Bun, Node). */
10
+ readonly executionCtx?: unknown;
11
+ }
12
+ /** The part of a Hono app {@link mountPanel} uses. */
13
+ interface HonoAppLike<App> {
14
+ all(path: string, handler: (c: HonoContextLike) => Response | Promise<Response>): App;
15
+ }
16
+ /** A Hono handler that forwards the raw request to `fetch`. */
17
+ declare const toHonoHandler: (fetch: FetchHandler) => (c: HonoContextLike) => Response | Promise<Response>;
18
+ /**
19
+ * Route `path` (default `"*"`, everything) to `fetch` on `app`, for every
20
+ * method. Returns the app, so it chains. With a sub-path, mount both the path
21
+ * and everything below it: `mountPanel(app, fetch, "/webhooks")`.
22
+ */
23
+ declare function mountPanel<App extends HonoAppLike<App>>(app: App, fetch: FetchHandler, path?: string): App;
24
+ /** Something that can keep work alive past the response (Workers' `ExecutionContext`). */
25
+ interface WaitUntil {
26
+ waitUntil(promise: Promise<unknown>): void;
27
+ }
28
+ /**
29
+ * The context's `waitUntil`, bound and safe to call, or `undefined` on runtimes
30
+ * without one. Hono's `c.executionCtx` getter **throws** outside Workers, and
31
+ * `waitUntil` must be called as a method (li bf20268), so read it here.
32
+ */
33
+ declare function waitUntilOf(c: HonoContextLike): WaitUntil | undefined;
34
+ //#endregion
35
+ export { type HonoAppLike, type HonoContextLike, type WaitUntil, mountPanel, toHonoHandler, waitUntilOf };
36
+ //# sourceMappingURL=entry-adapters-hono.d.cts.map
@@ -0,0 +1,36 @@
1
+ import { t as FetchHandler } from "./node-B1Djcwfi.mjs";
2
+
3
+ //#region src/adapters/hono.d.ts
4
+ /** The part of a Hono context the helpers read. */
5
+ interface HonoContextLike {
6
+ req: {
7
+ raw: Request;
8
+ };
9
+ /** Throws on runtimes without an execution context (Bun, Node). */
10
+ readonly executionCtx?: unknown;
11
+ }
12
+ /** The part of a Hono app {@link mountPanel} uses. */
13
+ interface HonoAppLike<App> {
14
+ all(path: string, handler: (c: HonoContextLike) => Response | Promise<Response>): App;
15
+ }
16
+ /** A Hono handler that forwards the raw request to `fetch`. */
17
+ declare const toHonoHandler: (fetch: FetchHandler) => (c: HonoContextLike) => Response | Promise<Response>;
18
+ /**
19
+ * Route `path` (default `"*"`, everything) to `fetch` on `app`, for every
20
+ * method. Returns the app, so it chains. With a sub-path, mount both the path
21
+ * and everything below it: `mountPanel(app, fetch, "/webhooks")`.
22
+ */
23
+ declare function mountPanel<App extends HonoAppLike<App>>(app: App, fetch: FetchHandler, path?: string): App;
24
+ /** Something that can keep work alive past the response (Workers' `ExecutionContext`). */
25
+ interface WaitUntil {
26
+ waitUntil(promise: Promise<unknown>): void;
27
+ }
28
+ /**
29
+ * The context's `waitUntil`, bound and safe to call, or `undefined` on runtimes
30
+ * without one. Hono's `c.executionCtx` getter **throws** outside Workers, and
31
+ * `waitUntil` must be called as a method (li bf20268), so read it here.
32
+ */
33
+ declare function waitUntilOf(c: HonoContextLike): WaitUntil | undefined;
34
+ //#endregion
35
+ export { type HonoAppLike, type HonoContextLike, type WaitUntil, mountPanel, toHonoHandler, waitUntilOf };
36
+ //# sourceMappingURL=entry-adapters-hono.d.mts.map
@@ -0,0 +1,30 @@
1
+ //#region src/adapters/hono.ts
2
+ /** A Hono handler that forwards the raw request to `fetch`. */
3
+ const toHonoHandler = (fetch) => (c) => fetch(c.req.raw);
4
+ /**
5
+ * Route `path` (default `"*"`, everything) to `fetch` on `app`, for every
6
+ * method. Returns the app, so it chains. With a sub-path, mount both the path
7
+ * and everything below it: `mountPanel(app, fetch, "/webhooks")`.
8
+ */
9
+ function mountPanel(app, fetch, path = "*") {
10
+ const handler = toHonoHandler(fetch);
11
+ if (path === "*" || path === "/*") return app.all("*", handler);
12
+ const base = path.replace(/\/+$/, "");
13
+ app.all(base, handler);
14
+ return app.all(`${base}/*`, handler);
15
+ }
16
+ /**
17
+ * The context's `waitUntil`, bound and safe to call, or `undefined` on runtimes
18
+ * without one. Hono's `c.executionCtx` getter **throws** outside Workers, and
19
+ * `waitUntil` must be called as a method (li bf20268), so read it here.
20
+ */
21
+ function waitUntilOf(c) {
22
+ try {
23
+ const ctx = c.executionCtx;
24
+ if (ctx && typeof ctx.waitUntil === "function") return { waitUntil: (p) => ctx.waitUntil?.(p) };
25
+ } catch {}
26
+ }
27
+ //#endregion
28
+ export { mountPanel, toHonoHandler, waitUntilOf };
29
+
30
+ //# sourceMappingURL=entry-adapters-hono.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entry-adapters-hono.mjs","names":[],"sources":["../src/adapters/hono.ts"],"sourcesContent":["/**\n * Hono helpers. No `hono` import at runtime: {@link mountPanel} takes the\n * product's (or the user's) `Hono` app structurally, and {@link waitUntilOf}\n * reads the execution context defensively.\n *\n * ```ts\n * import { Hono } from \"hono\";\n * import { mountPanel } from \"@xtandard/kit/adapters/hono\";\n *\n * const app = new Hono();\n * mountPanel(app, panel.fetch); // every path, every method\n * ```\n *\n * @module\n */\n\nimport type { FetchHandler } from \"./node.ts\";\n\n/** The part of a Hono context the helpers read. */\nexport interface HonoContextLike {\n req: { raw: Request };\n /** Throws on runtimes without an execution context (Bun, Node). */\n readonly executionCtx?: unknown;\n}\n\n/** The part of a Hono app {@link mountPanel} uses. */\nexport interface HonoAppLike<App> {\n all(path: string, handler: (c: HonoContextLike) => Response | Promise<Response>): App;\n}\n\n/** A Hono handler that forwards the raw request to `fetch`. */\nexport const toHonoHandler =\n (fetch: FetchHandler) =>\n (c: HonoContextLike): Response | Promise<Response> =>\n fetch(c.req.raw);\n\n/**\n * Route `path` (default `\"*\"`, everything) to `fetch` on `app`, for every\n * method. Returns the app, so it chains. With a sub-path, mount both the path\n * and everything below it: `mountPanel(app, fetch, \"/webhooks\")`.\n */\nexport function mountPanel<App extends HonoAppLike<App>>(\n app: App,\n fetch: FetchHandler,\n path = \"*\",\n): App {\n const handler = toHonoHandler(fetch);\n if (path === \"*\" || path === \"/*\") return app.all(\"*\", handler);\n const base = path.replace(/\\/+$/, \"\");\n app.all(base, handler);\n return app.all(`${base}/*`, handler);\n}\n\n/** Something that can keep work alive past the response (Workers' `ExecutionContext`). */\nexport interface WaitUntil {\n waitUntil(promise: Promise<unknown>): void;\n}\n\n/**\n * The context's `waitUntil`, bound and safe to call, or `undefined` on runtimes\n * without one. Hono's `c.executionCtx` getter **throws** outside Workers, and\n * `waitUntil` must be called as a method (li bf20268), so read it here.\n */\nexport function waitUntilOf(c: HonoContextLike): WaitUntil | undefined {\n try {\n const ctx = c.executionCtx as { waitUntil?: (p: Promise<unknown>) => void } | undefined;\n if (ctx && typeof ctx.waitUntil === \"function\") {\n return { waitUntil: (p) => ctx.waitUntil?.(p) };\n }\n } catch {\n // No ExecutionContext (Bun / Node).\n }\n return undefined;\n}\n"],"mappings":";;AA+BA,MAAa,iBACV,WACA,MACC,MAAM,EAAE,IAAI,GAAG;;;;;;AAOnB,SAAgB,WACd,KACA,OACA,OAAO,KACF;CACL,MAAM,UAAU,cAAc,KAAK;CACnC,IAAI,SAAS,OAAO,SAAS,MAAM,OAAO,IAAI,IAAI,KAAK,OAAO;CAC9D,MAAM,OAAO,KAAK,QAAQ,QAAQ,EAAE;CACpC,IAAI,IAAI,MAAM,OAAO;CACrB,OAAO,IAAI,IAAI,GAAG,KAAK,KAAK,OAAO;AACrC;;;;;;AAYA,SAAgB,YAAY,GAA2C;CACrE,IAAI;EACF,MAAM,MAAM,EAAE;EACd,IAAI,OAAO,OAAO,IAAI,cAAc,YAClC,OAAO,EAAE,YAAY,MAAM,IAAI,YAAY,CAAC,EAAE;CAElD,QAAQ,CAER;AAEF"}
@@ -0,0 +1,19 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ //#region src/adapters/next.ts
3
+ /** Turn a panel into App Router method exports. */
4
+ function toNextHandler(panel) {
5
+ const handle = async (request) => panel.fetch(request);
6
+ return {
7
+ GET: handle,
8
+ HEAD: handle,
9
+ POST: handle,
10
+ PUT: handle,
11
+ PATCH: handle,
12
+ DELETE: handle,
13
+ OPTIONS: handle
14
+ };
15
+ }
16
+ //#endregion
17
+ exports.toNextHandler = toNextHandler;
18
+
19
+ //# sourceMappingURL=entry-adapters-next.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entry-adapters-next.cjs","names":[],"sources":["../src/adapters/next.ts"],"sourcesContent":["/**\n * Next.js App Router adapter: turn a panel (anything with a web `fetch`) into\n * the method exports of a catch-all route. Build the panel once at module\n * scope and set its `basePath` to the route's mount (e.g. `\"/webhooks\"` for\n * `app/webhooks/[[...path]]/route.ts`).\n *\n * ```ts\n * // app/webhooks/[[...path]]/route.ts\n * import { toNextHandler } from \"@xtandard/kit/adapters/next\";\n *\n * export const { GET, HEAD, POST, PUT, PATCH, DELETE, OPTIONS } = toNextHandler(panel);\n * ```\n *\n * @module\n */\n\n/** An App Router route handler. */\nexport type NextRouteHandler<Ctx = unknown> = (request: Request, context: Ctx) => Promise<Response>;\n\n/** The method exports of a catch-all route. */\nexport interface NextRouteHandlers {\n GET: NextRouteHandler;\n HEAD: NextRouteHandler;\n POST: NextRouteHandler;\n PUT: NextRouteHandler;\n PATCH: NextRouteHandler;\n DELETE: NextRouteHandler;\n OPTIONS: NextRouteHandler;\n}\n\n/** Turn a panel into App Router method exports. */\nexport function toNextHandler(panel: {\n fetch(request: Request): Response | Promise<Response>;\n}): NextRouteHandlers {\n const handle: NextRouteHandler = async (request) => panel.fetch(request);\n return {\n GET: handle,\n HEAD: handle,\n POST: handle,\n PUT: handle,\n PATCH: handle,\n DELETE: handle,\n OPTIONS: handle,\n };\n}\n"],"mappings":";;;AA+BA,SAAgB,cAAc,OAER;CACpB,MAAM,SAA2B,OAAO,YAAY,MAAM,MAAM,OAAO;CACvE,OAAO;EACL,KAAK;EACL,MAAM;EACN,MAAM;EACN,KAAK;EACL,OAAO;EACP,QAAQ;EACR,SAAS;CACX;AACF"}
@@ -0,0 +1,35 @@
1
+ //#region src/adapters/next.d.ts
2
+ /**
3
+ * Next.js App Router adapter: turn a panel (anything with a web `fetch`) into
4
+ * the method exports of a catch-all route. Build the panel once at module
5
+ * scope and set its `basePath` to the route's mount (e.g. `"/webhooks"` for
6
+ * `app/webhooks/[[...path]]/route.ts`).
7
+ *
8
+ * ```ts
9
+ * // app/webhooks/[[...path]]/route.ts
10
+ * import { toNextHandler } from "@xtandard/kit/adapters/next";
11
+ *
12
+ * export const { GET, HEAD, POST, PUT, PATCH, DELETE, OPTIONS } = toNextHandler(panel);
13
+ * ```
14
+ *
15
+ * @module
16
+ */
17
+ /** An App Router route handler. */
18
+ type NextRouteHandler<Ctx = unknown> = (request: Request, context: Ctx) => Promise<Response>;
19
+ /** The method exports of a catch-all route. */
20
+ interface NextRouteHandlers {
21
+ GET: NextRouteHandler;
22
+ HEAD: NextRouteHandler;
23
+ POST: NextRouteHandler;
24
+ PUT: NextRouteHandler;
25
+ PATCH: NextRouteHandler;
26
+ DELETE: NextRouteHandler;
27
+ OPTIONS: NextRouteHandler;
28
+ }
29
+ /** Turn a panel into App Router method exports. */
30
+ declare function toNextHandler(panel: {
31
+ fetch(request: Request): Response | Promise<Response>;
32
+ }): NextRouteHandlers;
33
+ //#endregion
34
+ export { type NextRouteHandler, type NextRouteHandlers, toNextHandler };
35
+ //# sourceMappingURL=entry-adapters-next.d.cts.map
@@ -0,0 +1,35 @@
1
+ //#region src/adapters/next.d.ts
2
+ /**
3
+ * Next.js App Router adapter: turn a panel (anything with a web `fetch`) into
4
+ * the method exports of a catch-all route. Build the panel once at module
5
+ * scope and set its `basePath` to the route's mount (e.g. `"/webhooks"` for
6
+ * `app/webhooks/[[...path]]/route.ts`).
7
+ *
8
+ * ```ts
9
+ * // app/webhooks/[[...path]]/route.ts
10
+ * import { toNextHandler } from "@xtandard/kit/adapters/next";
11
+ *
12
+ * export const { GET, HEAD, POST, PUT, PATCH, DELETE, OPTIONS } = toNextHandler(panel);
13
+ * ```
14
+ *
15
+ * @module
16
+ */
17
+ /** An App Router route handler. */
18
+ type NextRouteHandler<Ctx = unknown> = (request: Request, context: Ctx) => Promise<Response>;
19
+ /** The method exports of a catch-all route. */
20
+ interface NextRouteHandlers {
21
+ GET: NextRouteHandler;
22
+ HEAD: NextRouteHandler;
23
+ POST: NextRouteHandler;
24
+ PUT: NextRouteHandler;
25
+ PATCH: NextRouteHandler;
26
+ DELETE: NextRouteHandler;
27
+ OPTIONS: NextRouteHandler;
28
+ }
29
+ /** Turn a panel into App Router method exports. */
30
+ declare function toNextHandler(panel: {
31
+ fetch(request: Request): Response | Promise<Response>;
32
+ }): NextRouteHandlers;
33
+ //#endregion
34
+ export { type NextRouteHandler, type NextRouteHandlers, toNextHandler };
35
+ //# sourceMappingURL=entry-adapters-next.d.mts.map
@@ -0,0 +1,18 @@
1
+ //#region src/adapters/next.ts
2
+ /** Turn a panel into App Router method exports. */
3
+ function toNextHandler(panel) {
4
+ const handle = async (request) => panel.fetch(request);
5
+ return {
6
+ GET: handle,
7
+ HEAD: handle,
8
+ POST: handle,
9
+ PUT: handle,
10
+ PATCH: handle,
11
+ DELETE: handle,
12
+ OPTIONS: handle
13
+ };
14
+ }
15
+ //#endregion
16
+ export { toNextHandler };
17
+
18
+ //# sourceMappingURL=entry-adapters-next.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entry-adapters-next.mjs","names":[],"sources":["../src/adapters/next.ts"],"sourcesContent":["/**\n * Next.js App Router adapter: turn a panel (anything with a web `fetch`) into\n * the method exports of a catch-all route. Build the panel once at module\n * scope and set its `basePath` to the route's mount (e.g. `\"/webhooks\"` for\n * `app/webhooks/[[...path]]/route.ts`).\n *\n * ```ts\n * // app/webhooks/[[...path]]/route.ts\n * import { toNextHandler } from \"@xtandard/kit/adapters/next\";\n *\n * export const { GET, HEAD, POST, PUT, PATCH, DELETE, OPTIONS } = toNextHandler(panel);\n * ```\n *\n * @module\n */\n\n/** An App Router route handler. */\nexport type NextRouteHandler<Ctx = unknown> = (request: Request, context: Ctx) => Promise<Response>;\n\n/** The method exports of a catch-all route. */\nexport interface NextRouteHandlers {\n GET: NextRouteHandler;\n HEAD: NextRouteHandler;\n POST: NextRouteHandler;\n PUT: NextRouteHandler;\n PATCH: NextRouteHandler;\n DELETE: NextRouteHandler;\n OPTIONS: NextRouteHandler;\n}\n\n/** Turn a panel into App Router method exports. */\nexport function toNextHandler(panel: {\n fetch(request: Request): Response | Promise<Response>;\n}): NextRouteHandlers {\n const handle: NextRouteHandler = async (request) => panel.fetch(request);\n return {\n GET: handle,\n HEAD: handle,\n POST: handle,\n PUT: handle,\n PATCH: handle,\n DELETE: handle,\n OPTIONS: handle,\n };\n}\n"],"mappings":";;AA+BA,SAAgB,cAAc,OAER;CACpB,MAAM,SAA2B,OAAO,YAAY,MAAM,MAAM,OAAO;CACvE,OAAO;EACL,KAAK;EACL,MAAM;EACN,MAAM;EACN,KAAK;EACL,OAAO;EACP,QAAQ;EACR,SAAS;CACX;AACF"}
@@ -0,0 +1,7 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_node = require("./node-DFFqYRk-.cjs");
3
+ exports.headersFrom = require_node.headersFrom;
4
+ exports.requestUrl = require_node.requestUrl;
5
+ exports.toNodeHandler = require_node.toNodeHandler;
6
+ exports.toWebRequest = require_node.toWebRequest;
7
+ exports.writeWebResponse = require_node.writeWebResponse;
@@ -0,0 +1,2 @@
1
+ import { a as headersFrom, c as toWebRequest, i as ToWebRequestOptions, l as writeWebResponse, n as NodeHandlerOptions, o as requestUrl, r as NodeRequest, s as toNodeHandler, t as FetchHandler } from "./node-B1Djcwfi.cjs";
2
+ export { type FetchHandler, type NodeHandlerOptions, type NodeRequest, type ToWebRequestOptions, headersFrom, requestUrl, toNodeHandler, toWebRequest, writeWebResponse };
@@ -0,0 +1,2 @@
1
+ import { a as headersFrom, c as toWebRequest, i as ToWebRequestOptions, l as writeWebResponse, n as NodeHandlerOptions, o as requestUrl, r as NodeRequest, s as toNodeHandler, t as FetchHandler } from "./node-B1Djcwfi.mjs";
2
+ export { type FetchHandler, type NodeHandlerOptions, type NodeRequest, type ToWebRequestOptions, headersFrom, requestUrl, toNodeHandler, toWebRequest, writeWebResponse };
@@ -0,0 +1,2 @@
1
+ import { a as toWebRequest, i as toNodeHandler, o as writeWebResponse, r as requestUrl, t as headersFrom } from "./node-BYjocCbU.mjs";
2
+ export { headersFrom, requestUrl, toNodeHandler, toWebRequest, writeWebResponse };
@@ -0,0 +1,5 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_basic = require("./basic-ZaO92-lB.cjs");
3
+ exports.basicAuth = require_basic.basicAuth;
4
+ exports.hashPassword = require_basic.hashPassword;
5
+ exports.verifyPassword = require_basic.verifyPassword;
@@ -0,0 +1,83 @@
1
+ import { t as AuthProvider } from "./contract-B3UPXXLx.cjs";
2
+
3
+ //#region src/auth/basic.d.ts
4
+ /**
5
+ * Hash a password with scrypt and a fresh random salt.
6
+ *
7
+ * The returned string is self-describing and safe to store in config or a
8
+ * database: `scrypt$<saltHex>$<hashHex>`. Pass it back to
9
+ * {@link verifyPassword} (or supply it as a user's `passwordHash`) to check a
10
+ * candidate password.
11
+ *
12
+ * @example
13
+ * ```ts
14
+ * const stored = await hashPassword("correct horse battery staple");
15
+ * // → "scrypt$<32 hex chars>$<128 hex chars>"
16
+ * ```
17
+ */
18
+ declare function hashPassword(password: string): Promise<string>;
19
+ /**
20
+ * Verify a candidate `password` against a digest produced by
21
+ * {@link hashPassword}.
22
+ *
23
+ * Re-derives the scrypt hash using the stored salt and compares it to the stored
24
+ * hash with `crypto.timingSafeEqual` (constant time). Returns `false` — rather
25
+ * than throwing — for malformed or unrecognized digests.
26
+ */
27
+ declare function verifyPassword(password: string, stored: string): Promise<boolean>;
28
+ /** A configured user for {@link basicAuth}. */
29
+ interface BasicAuthUser {
30
+ /** The login name, matched against the Basic credentials. */
31
+ username: string;
32
+ /**
33
+ * A digest produced by {@link hashPassword} (`scrypt$<salt>$<hash>`).
34
+ * Preferred for production.
35
+ */
36
+ passwordHash?: string;
37
+ /**
38
+ * A plaintext password. **Development only** — prefer `passwordHash`. Compared
39
+ * in constant time but stored as cleartext in your config.
40
+ */
41
+ password?: string;
42
+ /** Roles attached to the resulting {@link Principal}. */
43
+ roles?: string[];
44
+ /** Email attached to the resulting {@link Principal}. */
45
+ email?: string;
46
+ /** Principal id. Defaults to {@link BasicAuthUser.username} when omitted. */
47
+ id?: string;
48
+ }
49
+ /** Options for {@link basicAuth}. */
50
+ interface BasicAuthOptions {
51
+ /** The known users. */
52
+ users: BasicAuthUser[];
53
+ /**
54
+ * Realm advertised in the `WWW-Authenticate` header on challenge.
55
+ * @default "xtandard" (products pass their own, e.g. `"xtandard-webhooks"`)
56
+ */
57
+ realm?: string;
58
+ /**
59
+ * Custom verifier. When supplied it takes precedence over `passwordHash` and
60
+ * `password` for matched users — delegate to your own credential store and
61
+ * return `true` to accept.
62
+ */
63
+ passwordVerifier?: (username: string, password: string) => Promise<boolean> | boolean;
64
+ }
65
+ /**
66
+ * Create an HTTP Basic {@link AuthProvider}.
67
+ *
68
+ * @example
69
+ * ```ts
70
+ * import { basicAuth, hashPassword } from "@xtandard/kit/auth/basic";
71
+ *
72
+ * const auth = basicAuth({
73
+ * realm: "xtandard-webhooks",
74
+ * users: [
75
+ * { username: "admin", passwordHash: await hashPassword("s3cret"), roles: ["admin"] },
76
+ * ],
77
+ * });
78
+ * ```
79
+ */
80
+ declare function basicAuth(options: BasicAuthOptions): AuthProvider;
81
+ //#endregion
82
+ export { type BasicAuthOptions, type BasicAuthUser, basicAuth, hashPassword, verifyPassword };
83
+ //# sourceMappingURL=entry-auth-basic.d.cts.map
@@ -0,0 +1,83 @@
1
+ import { t as AuthProvider } from "./contract-B3UPXXLx.mjs";
2
+
3
+ //#region src/auth/basic.d.ts
4
+ /**
5
+ * Hash a password with scrypt and a fresh random salt.
6
+ *
7
+ * The returned string is self-describing and safe to store in config or a
8
+ * database: `scrypt$<saltHex>$<hashHex>`. Pass it back to
9
+ * {@link verifyPassword} (or supply it as a user's `passwordHash`) to check a
10
+ * candidate password.
11
+ *
12
+ * @example
13
+ * ```ts
14
+ * const stored = await hashPassword("correct horse battery staple");
15
+ * // → "scrypt$<32 hex chars>$<128 hex chars>"
16
+ * ```
17
+ */
18
+ declare function hashPassword(password: string): Promise<string>;
19
+ /**
20
+ * Verify a candidate `password` against a digest produced by
21
+ * {@link hashPassword}.
22
+ *
23
+ * Re-derives the scrypt hash using the stored salt and compares it to the stored
24
+ * hash with `crypto.timingSafeEqual` (constant time). Returns `false` — rather
25
+ * than throwing — for malformed or unrecognized digests.
26
+ */
27
+ declare function verifyPassword(password: string, stored: string): Promise<boolean>;
28
+ /** A configured user for {@link basicAuth}. */
29
+ interface BasicAuthUser {
30
+ /** The login name, matched against the Basic credentials. */
31
+ username: string;
32
+ /**
33
+ * A digest produced by {@link hashPassword} (`scrypt$<salt>$<hash>`).
34
+ * Preferred for production.
35
+ */
36
+ passwordHash?: string;
37
+ /**
38
+ * A plaintext password. **Development only** — prefer `passwordHash`. Compared
39
+ * in constant time but stored as cleartext in your config.
40
+ */
41
+ password?: string;
42
+ /** Roles attached to the resulting {@link Principal}. */
43
+ roles?: string[];
44
+ /** Email attached to the resulting {@link Principal}. */
45
+ email?: string;
46
+ /** Principal id. Defaults to {@link BasicAuthUser.username} when omitted. */
47
+ id?: string;
48
+ }
49
+ /** Options for {@link basicAuth}. */
50
+ interface BasicAuthOptions {
51
+ /** The known users. */
52
+ users: BasicAuthUser[];
53
+ /**
54
+ * Realm advertised in the `WWW-Authenticate` header on challenge.
55
+ * @default "xtandard" (products pass their own, e.g. `"xtandard-webhooks"`)
56
+ */
57
+ realm?: string;
58
+ /**
59
+ * Custom verifier. When supplied it takes precedence over `passwordHash` and
60
+ * `password` for matched users — delegate to your own credential store and
61
+ * return `true` to accept.
62
+ */
63
+ passwordVerifier?: (username: string, password: string) => Promise<boolean> | boolean;
64
+ }
65
+ /**
66
+ * Create an HTTP Basic {@link AuthProvider}.
67
+ *
68
+ * @example
69
+ * ```ts
70
+ * import { basicAuth, hashPassword } from "@xtandard/kit/auth/basic";
71
+ *
72
+ * const auth = basicAuth({
73
+ * realm: "xtandard-webhooks",
74
+ * users: [
75
+ * { username: "admin", passwordHash: await hashPassword("s3cret"), roles: ["admin"] },
76
+ * ],
77
+ * });
78
+ * ```
79
+ */
80
+ declare function basicAuth(options: BasicAuthOptions): AuthProvider;
81
+ //#endregion
82
+ export { type BasicAuthOptions, type BasicAuthUser, basicAuth, hashPassword, verifyPassword };
83
+ //# sourceMappingURL=entry-auth-basic.d.mts.map
@@ -0,0 +1,2 @@
1
+ import { i as verifyPassword, r as hashPassword, t as basicAuth } from "./basic-Qtriv0xS.mjs";
2
+ export { basicAuth, hashPassword, verifyPassword };
@@ -0,0 +1,28 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ //#region src/auth/delegated.ts
3
+ /**
4
+ * Create an {@link AuthProvider} from plain functions.
5
+ *
6
+ * @example
7
+ * ```ts
8
+ * import { delegatedAuth } from "@xtandard/kit/auth/delegated";
9
+ *
10
+ * const auth = delegatedAuth({
11
+ * authenticate: async (request) => {
12
+ * const token = request.headers.get("authorization")?.replace("Bearer ", "");
13
+ * return token ? await verifyToken(token) : null;
14
+ * },
15
+ * });
16
+ * ```
17
+ */
18
+ function delegatedAuth(options) {
19
+ const provider = { async authenticate(request) {
20
+ return await options.authenticate(request);
21
+ } };
22
+ if (options.challenge) provider.challenge = options.challenge;
23
+ return provider;
24
+ }
25
+ //#endregion
26
+ exports.delegatedAuth = delegatedAuth;
27
+
28
+ //# sourceMappingURL=entry-auth-delegated.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entry-auth-delegated.cjs","names":[],"sources":["../src/auth/delegated.ts"],"sourcesContent":["/**\n * Delegated {@link AuthProvider}. Wraps caller-supplied functions so you can\n * plug in any authentication scheme — JWT/bearer tokens, sessions, API keys,\n * OAuth, an existing middleware — without implementing the {@link AuthProvider}\n * interface by hand.\n *\n * The wrapper normalizes a synchronous-or-asynchronous `authenticate` into the\n * `Promise`-returning shape the contract requires, and forwards an optional\n * `challenge`.\n *\n * @module\n */\n\nimport type { AuthProvider, Principal } from \"./contract.ts\";\n\n/** Options for {@link delegatedAuth}. */\nexport interface DelegatedAuthOptions {\n /**\n * Resolve the {@link Principal} for a request, or `null` if unauthenticated.\n * May be synchronous or asynchronous.\n */\n authenticate: (request: Request) => Promise<Principal | null> | Principal | null;\n /**\n * Optional challenge builder, mirroring {@link AuthProvider.challenge}. Return\n * a `Response` (typically a `401`) to prompt for credentials, or `undefined`\n * to fall back to the server's default.\n */\n challenge?: (request: Request) => Response | undefined;\n}\n\n/**\n * Create an {@link AuthProvider} from plain functions.\n *\n * @example\n * ```ts\n * import { delegatedAuth } from \"@xtandard/kit/auth/delegated\";\n *\n * const auth = delegatedAuth({\n * authenticate: async (request) => {\n * const token = request.headers.get(\"authorization\")?.replace(\"Bearer \", \"\");\n * return token ? await verifyToken(token) : null;\n * },\n * });\n * ```\n */\nexport function delegatedAuth(options: DelegatedAuthOptions): AuthProvider {\n const provider: AuthProvider = {\n async authenticate(request: Request): Promise<Principal | null> {\n return await options.authenticate(request);\n },\n };\n if (options.challenge) {\n provider.challenge = options.challenge;\n }\n return provider;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AA6CA,SAAgB,cAAc,SAA6C;CACzE,MAAM,WAAyB,EAC7B,MAAM,aAAa,SAA6C;EAC9D,OAAO,MAAM,QAAQ,aAAa,OAAO;CAC3C,EACF;CACA,IAAI,QAAQ,WACV,SAAS,YAAY,QAAQ;CAE/B,OAAO;AACT"}
@@ -0,0 +1,36 @@
1
+ import { n as Principal, t as AuthProvider } from "./contract-B3UPXXLx.cjs";
2
+
3
+ //#region src/auth/delegated.d.ts
4
+ /** Options for {@link delegatedAuth}. */
5
+ interface DelegatedAuthOptions {
6
+ /**
7
+ * Resolve the {@link Principal} for a request, or `null` if unauthenticated.
8
+ * May be synchronous or asynchronous.
9
+ */
10
+ authenticate: (request: Request) => Promise<Principal | null> | Principal | null;
11
+ /**
12
+ * Optional challenge builder, mirroring {@link AuthProvider.challenge}. Return
13
+ * a `Response` (typically a `401`) to prompt for credentials, or `undefined`
14
+ * to fall back to the server's default.
15
+ */
16
+ challenge?: (request: Request) => Response | undefined;
17
+ }
18
+ /**
19
+ * Create an {@link AuthProvider} from plain functions.
20
+ *
21
+ * @example
22
+ * ```ts
23
+ * import { delegatedAuth } from "@xtandard/kit/auth/delegated";
24
+ *
25
+ * const auth = delegatedAuth({
26
+ * authenticate: async (request) => {
27
+ * const token = request.headers.get("authorization")?.replace("Bearer ", "");
28
+ * return token ? await verifyToken(token) : null;
29
+ * },
30
+ * });
31
+ * ```
32
+ */
33
+ declare function delegatedAuth(options: DelegatedAuthOptions): AuthProvider;
34
+ //#endregion
35
+ export { type DelegatedAuthOptions, delegatedAuth };
36
+ //# sourceMappingURL=entry-auth-delegated.d.cts.map
@@ -0,0 +1,36 @@
1
+ import { n as Principal, t as AuthProvider } from "./contract-B3UPXXLx.mjs";
2
+
3
+ //#region src/auth/delegated.d.ts
4
+ /** Options for {@link delegatedAuth}. */
5
+ interface DelegatedAuthOptions {
6
+ /**
7
+ * Resolve the {@link Principal} for a request, or `null` if unauthenticated.
8
+ * May be synchronous or asynchronous.
9
+ */
10
+ authenticate: (request: Request) => Promise<Principal | null> | Principal | null;
11
+ /**
12
+ * Optional challenge builder, mirroring {@link AuthProvider.challenge}. Return
13
+ * a `Response` (typically a `401`) to prompt for credentials, or `undefined`
14
+ * to fall back to the server's default.
15
+ */
16
+ challenge?: (request: Request) => Response | undefined;
17
+ }
18
+ /**
19
+ * Create an {@link AuthProvider} from plain functions.
20
+ *
21
+ * @example
22
+ * ```ts
23
+ * import { delegatedAuth } from "@xtandard/kit/auth/delegated";
24
+ *
25
+ * const auth = delegatedAuth({
26
+ * authenticate: async (request) => {
27
+ * const token = request.headers.get("authorization")?.replace("Bearer ", "");
28
+ * return token ? await verifyToken(token) : null;
29
+ * },
30
+ * });
31
+ * ```
32
+ */
33
+ declare function delegatedAuth(options: DelegatedAuthOptions): AuthProvider;
34
+ //#endregion
35
+ export { type DelegatedAuthOptions, delegatedAuth };
36
+ //# sourceMappingURL=entry-auth-delegated.d.mts.map
@@ -0,0 +1,27 @@
1
+ //#region src/auth/delegated.ts
2
+ /**
3
+ * Create an {@link AuthProvider} from plain functions.
4
+ *
5
+ * @example
6
+ * ```ts
7
+ * import { delegatedAuth } from "@xtandard/kit/auth/delegated";
8
+ *
9
+ * const auth = delegatedAuth({
10
+ * authenticate: async (request) => {
11
+ * const token = request.headers.get("authorization")?.replace("Bearer ", "");
12
+ * return token ? await verifyToken(token) : null;
13
+ * },
14
+ * });
15
+ * ```
16
+ */
17
+ function delegatedAuth(options) {
18
+ const provider = { async authenticate(request) {
19
+ return await options.authenticate(request);
20
+ } };
21
+ if (options.challenge) provider.challenge = options.challenge;
22
+ return provider;
23
+ }
24
+ //#endregion
25
+ export { delegatedAuth };
26
+
27
+ //# sourceMappingURL=entry-auth-delegated.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entry-auth-delegated.mjs","names":[],"sources":["../src/auth/delegated.ts"],"sourcesContent":["/**\n * Delegated {@link AuthProvider}. Wraps caller-supplied functions so you can\n * plug in any authentication scheme — JWT/bearer tokens, sessions, API keys,\n * OAuth, an existing middleware — without implementing the {@link AuthProvider}\n * interface by hand.\n *\n * The wrapper normalizes a synchronous-or-asynchronous `authenticate` into the\n * `Promise`-returning shape the contract requires, and forwards an optional\n * `challenge`.\n *\n * @module\n */\n\nimport type { AuthProvider, Principal } from \"./contract.ts\";\n\n/** Options for {@link delegatedAuth}. */\nexport interface DelegatedAuthOptions {\n /**\n * Resolve the {@link Principal} for a request, or `null` if unauthenticated.\n * May be synchronous or asynchronous.\n */\n authenticate: (request: Request) => Promise<Principal | null> | Principal | null;\n /**\n * Optional challenge builder, mirroring {@link AuthProvider.challenge}. Return\n * a `Response` (typically a `401`) to prompt for credentials, or `undefined`\n * to fall back to the server's default.\n */\n challenge?: (request: Request) => Response | undefined;\n}\n\n/**\n * Create an {@link AuthProvider} from plain functions.\n *\n * @example\n * ```ts\n * import { delegatedAuth } from \"@xtandard/kit/auth/delegated\";\n *\n * const auth = delegatedAuth({\n * authenticate: async (request) => {\n * const token = request.headers.get(\"authorization\")?.replace(\"Bearer \", \"\");\n * return token ? await verifyToken(token) : null;\n * },\n * });\n * ```\n */\nexport function delegatedAuth(options: DelegatedAuthOptions): AuthProvider {\n const provider: AuthProvider = {\n async authenticate(request: Request): Promise<Principal | null> {\n return await options.authenticate(request);\n },\n };\n if (options.challenge) {\n provider.challenge = options.challenge;\n }\n return provider;\n}\n"],"mappings":";;;;;;;;;;;;;;;;AA6CA,SAAgB,cAAc,SAA6C;CACzE,MAAM,WAAyB,EAC7B,MAAM,aAAa,SAA6C;EAC9D,OAAO,MAAM,QAAQ,aAAa,OAAO;CAC3C,EACF;CACA,IAAI,QAAQ,WACV,SAAS,YAAY,QAAQ;CAE/B,OAAO;AACT"}
@@ -0,0 +1,4 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_none = require("./none-CHwVkQL-.cjs");
3
+ exports.ANONYMOUS_PRINCIPAL = require_none.ANONYMOUS_PRINCIPAL;
4
+ exports.noAuth = require_none.noAuth;
@@ -0,0 +1,25 @@
1
+ import { n as Principal, t as AuthProvider } from "./contract-B3UPXXLx.cjs";
2
+
3
+ //#region src/auth/none.d.ts
4
+ /** The fixed principal returned by {@link noAuth}. */
5
+ declare const ANONYMOUS_PRINCIPAL: Principal;
6
+ /**
7
+ * Create an {@link AuthProvider} that performs no authentication and resolves
8
+ * every request to the shared {@link ANONYMOUS_PRINCIPAL}.
9
+ *
10
+ * Because it never returns `null`, the request is always "authenticated" — use
11
+ * an {@link AuthorizationProvider} to control what the anonymous principal may
12
+ * actually do.
13
+ *
14
+ * @example
15
+ * ```ts
16
+ * import { noAuth } from "@xtandard/kit/auth/none";
17
+ *
18
+ * const auth = noAuth();
19
+ * await auth.authenticate(request); // → { id: "anonymous" }
20
+ * ```
21
+ */
22
+ declare function noAuth(): AuthProvider;
23
+ //#endregion
24
+ export { ANONYMOUS_PRINCIPAL, noAuth };
25
+ //# sourceMappingURL=entry-auth-none.d.cts.map
@@ -0,0 +1,25 @@
1
+ import { n as Principal, t as AuthProvider } from "./contract-B3UPXXLx.mjs";
2
+
3
+ //#region src/auth/none.d.ts
4
+ /** The fixed principal returned by {@link noAuth}. */
5
+ declare const ANONYMOUS_PRINCIPAL: Principal;
6
+ /**
7
+ * Create an {@link AuthProvider} that performs no authentication and resolves
8
+ * every request to the shared {@link ANONYMOUS_PRINCIPAL}.
9
+ *
10
+ * Because it never returns `null`, the request is always "authenticated" — use
11
+ * an {@link AuthorizationProvider} to control what the anonymous principal may
12
+ * actually do.
13
+ *
14
+ * @example
15
+ * ```ts
16
+ * import { noAuth } from "@xtandard/kit/auth/none";
17
+ *
18
+ * const auth = noAuth();
19
+ * await auth.authenticate(request); // → { id: "anonymous" }
20
+ * ```
21
+ */
22
+ declare function noAuth(): AuthProvider;
23
+ //#endregion
24
+ export { ANONYMOUS_PRINCIPAL, noAuth };
25
+ //# sourceMappingURL=entry-auth-none.d.mts.map
@@ -0,0 +1,2 @@
1
+ import { n as noAuth, t as ANONYMOUS_PRINCIPAL } from "./none-BEY7Kc_-.mjs";
2
+ export { ANONYMOUS_PRINCIPAL, noAuth };
File without changes
@@ -0,0 +1,2 @@
1
+ import { n as Principal, t as AuthProvider } from "./contract-B3UPXXLx.cjs";
2
+ export type { AuthProvider, Principal };