@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,275 @@
1
+ import { t as FetchHandler } from "./node-B1Djcwfi.cjs";
2
+ import { t as AuthProvider } from "./contract-B3UPXXLx.cjs";
3
+ import { r as AuthorizationProvider } from "./contract-BIVzAn4f.cjs";
4
+ import { n as RolesAuthorizationOptions } from "./roles-DQbbtUPW.cjs";
5
+
6
+ //#region src/cli/index.d.ts
7
+ /** An environment: `process.env` or a test double. */
8
+ type Env = Record<string, string | undefined>;
9
+ /**
10
+ * Read an env var. An **empty** value counts as unset (`||` semantics), so
11
+ * `FOO=` in a `.env` file falls back to the default instead of becoming `""`.
12
+ */
13
+ declare const env: (key: string, fallback?: string, source?: Env) => string;
14
+ /** `"1"` or `"true"` (any case). */
15
+ declare const isTruthy: (value: string | undefined) => boolean;
16
+ /** Parsed argv. */
17
+ interface ParsedArgs {
18
+ /** Positional arguments. */
19
+ _: string[];
20
+ /** `--key value`, `--key=value`, `--flag` and mapped short flags. */
21
+ flags: Record<string, string | boolean>;
22
+ }
23
+ /** Options for {@link parseArgs}. */
24
+ interface ParseArgsOptions {
25
+ /** Short flags → long names. Default `{ h: "help", v: "version" }`. */
26
+ short?: Record<string, string>;
27
+ /** Flags that never take a value (`--help foo` keeps `foo` positional). Default `["help", "version"]`. */
28
+ boolean?: readonly string[];
29
+ }
30
+ /**
31
+ * Minimal argv parser:
32
+ *
33
+ * - `--key value`, `--key=value` (the value may contain `=`), `--flag`;
34
+ * - short flags from `short` (`-t acme` → `tenant: "acme"`, `-h` → `help: true`);
35
+ * - `--` ends the flags; a malformed `--=x` stays positional.
36
+ *
37
+ * @example
38
+ * ```ts
39
+ * parseArgs(["serve", "--port=4000", "-t", "acme"], { short: { t: "tenant" } });
40
+ * // { _: ["serve"], flags: { port: "4000", tenant: "acme" } }
41
+ * ```
42
+ */
43
+ declare function parseArgs(argv: readonly string[], options?: ParseArgsOptions): ParsedArgs;
44
+ /** Options for {@link buildAuthFromEnv}. */
45
+ interface AuthFromEnvOptions<Action extends string = string> {
46
+ /** The `WWW-Authenticate` realm, e.g. `"xtandard-webhooks"`. */
47
+ realm: string;
48
+ /** The roles provider used with `AUTH_MODE=basic` (the product's policy and actions). */
49
+ roles: RolesAuthorizationOptions<Action>;
50
+ /** Default `AUTH_ROLE`. Default `"admin"`. */
51
+ defaultRole?: string;
52
+ env?: Env;
53
+ /** Where warnings go. Default: stderr. */
54
+ warn?: (line: string) => void;
55
+ /** Log prefix for warnings. Default `"xtandard"`. */
56
+ name?: string;
57
+ }
58
+ /** What {@link buildAuthFromEnv} returns. */
59
+ interface AuthFromEnv<Action extends string = string> {
60
+ mode: "none" | "basic";
61
+ auth: AuthProvider;
62
+ authorization: AuthorizationProvider<Action>;
63
+ }
64
+ /**
65
+ * Build the auth + authorization providers from env:
66
+ *
67
+ * - `AUTH_MODE=none` (or empty / unset): anonymous, allow-all.
68
+ * - `AUTH_MODE=basic`: one Basic user from `AUTH_USERNAME` (default `admin`),
69
+ * `AUTH_PASSWORD_HASH` or `AUTH_PASSWORD`, with role `AUTH_ROLE`, and the
70
+ * product's roles provider.
71
+ * - **Anything else throws.** A typo such as `basci` must not open the panel.
72
+ */
73
+ declare function buildAuthFromEnv<Action extends string = string>(options: AuthFromEnvOptions<Action>): Promise<AuthFromEnv<Action>>;
74
+ /** Per-role defaults. The persisted ones (table, db, collection, paths) are the product's (ADR 0005). */
75
+ interface StorageRoleDefaults {
76
+ /** Driver when the driver env var is unset. Default `"file"`. */
77
+ driver?: string;
78
+ /** Redis key prefix (`<ROLE>_PREFIX`). */
79
+ prefix?: string;
80
+ /** Postgres table (`<ROLE>_PG_TABLE`). */
81
+ pgTable?: string;
82
+ /** Mongo database (`MONGO_DB`). */
83
+ mongoDb?: string;
84
+ /** Mongo collection (`<ROLE>_MONGO_COLLECTION`). */
85
+ mongoCollection?: string;
86
+ /** SQLite file (`<ROLE>_SQLITE_PATH`). */
87
+ sqlitePath?: string;
88
+ /**
89
+ * Table of the `sqlite` and `libsql` drivers (`<ROLE>_SQLITE_TABLE`). Without
90
+ * it the drivers use the kit's neutral `xtandard_kv` and miss a product's
91
+ * existing rows.
92
+ */
93
+ sqliteTable?: string;
94
+ /** libSQL URL (`<ROLE>_LIBSQL_URL`, then `LIBSQL_URL`). */
95
+ libsqlUrl?: string;
96
+ /** File-driver directory (`<ROLE>_FILE_DIR`). */
97
+ fileDir?: string;
98
+ }
99
+ /** A storage role: `STORAGE`, `QUEUE`, `SOURCE`, `RUNTIME`, `COUNTERS`… */
100
+ interface StorageRole {
101
+ /** The env-var prefix of the role's settings, e.g. `"QUEUE"` → `QUEUE_PG_TABLE`. */
102
+ name: string;
103
+ /**
104
+ * The env var naming the driver. Default: `STORAGE_DRIVER` for the
105
+ * `STORAGE` role, `<NAME>_STORAGE_DRIVER` otherwise (webhooks
106
+ * `QUEUE_STORAGE_DRIVER`, flags `SOURCE_STORAGE_DRIVER`).
107
+ */
108
+ driverEnv?: string;
109
+ defaults?: StorageRoleDefaults;
110
+ }
111
+ /** The resolved settings a driver factory receives. Connection strings are never logged. */
112
+ interface StorageConfig {
113
+ driver: string;
114
+ role: string;
115
+ /** `REDIS_URL` (default `redis://localhost:6379`). */
116
+ redisUrl: string;
117
+ prefix: string | undefined;
118
+ /** `DATABASE_URL`, else `POSTGRES_URL` (default `postgres://localhost:5432/postgres`). */
119
+ postgresUrl: string;
120
+ pgTable: string | undefined;
121
+ /** `MONGO_URL` (default `mongodb://localhost:27017`). */
122
+ mongoUrl: string;
123
+ mongoDb: string | undefined;
124
+ mongoCollection: string | undefined;
125
+ sqlitePath: string | undefined;
126
+ /** `<ROLE>_SQLITE_TABLE`: the `sqlite` and `libsql` table. */
127
+ sqliteTable: string | undefined;
128
+ libsqlUrl: string | undefined;
129
+ /** `LIBSQL_AUTH_TOKEN`. */
130
+ libsqlAuthToken: string | undefined;
131
+ fileDir: string | undefined;
132
+ env: Env;
133
+ }
134
+ /** Builds a storage for a driver from the resolved config. */
135
+ type StorageFactory<S = unknown> = (config: StorageConfig) => Promise<S> | S;
136
+ /** Driver name → factory. */
137
+ type StorageRegistry<S = unknown> = Record<string, StorageFactory<S>>;
138
+ /**
139
+ * The default registry: each driver lazily imports the kit's storage entry, so
140
+ * an optional peer loads only when its driver is chosen. Factory names and
141
+ * options match the products' CLIs.
142
+ */
143
+ declare const defaultStorageRegistry: StorageRegistry;
144
+ /** Options for {@link storageFromEnv}. */
145
+ interface StorageFromEnvOptions<S = unknown> {
146
+ role: StorageRole;
147
+ env?: Env;
148
+ /** Driver registry. Default: {@link defaultStorageRegistry} (all kit drivers). */
149
+ drivers?: StorageRegistry<S>;
150
+ /** Restrict the drivers this product's CLI accepts (default: every registry key). */
151
+ allowed?: readonly string[];
152
+ }
153
+ /** The driver env var of a role. */
154
+ declare const driverEnvOf: (role: StorageRole) => string;
155
+ /** Resolve a role's driver and settings from env. **An unknown driver throws.** */
156
+ declare function resolveStorageConfig(role: StorageRole, options: {
157
+ env?: Env;
158
+ allowed: readonly string[];
159
+ }): StorageConfig;
160
+ /**
161
+ * Build a role's storage from env (au/en's allow-list loader, generic over the
162
+ * product's roles). Unknown drivers fail instead of silently using `file`.
163
+ *
164
+ * @example
165
+ * ```ts
166
+ * const queue = await storageFromEnv<WebhooksStorage>({
167
+ * role: {
168
+ * name: "QUEUE",
169
+ * defaults: { prefix: "xtandard:webhooks:queue", pgTable: "xtandard_webhooks_queue",
170
+ * mongoDb: "xtandard_webhooks", mongoCollection: "webhooks_queue",
171
+ * sqlitePath: "./.webhooks/queue.sqlite", sqliteTable: "xtandard_webhooks",
172
+ * libsqlUrl: "file:./.webhooks/queue.db", fileDir: "./.webhooks/queue" },
173
+ * },
174
+ * });
175
+ * ```
176
+ */
177
+ declare function storageFromEnv<S = unknown>(options: StorageFromEnvOptions<S>): Promise<S>;
178
+ /**
179
+ * A log-safe description of where a role persists data, for the startup
180
+ * banner: file and SQLite paths are resolved to absolute paths; drivers with a
181
+ * connection string print only their name (never the URL, which may carry
182
+ * credentials).
183
+ */
184
+ declare function describeStorage(role: StorageRole, options?: {
185
+ env?: Env;
186
+ allowed?: readonly string[];
187
+ }): Promise<string>;
188
+ /** A running server. */
189
+ interface RunningServer {
190
+ /** The bound port (useful with port `0`). */
191
+ port: number;
192
+ /** Stop listening. */
193
+ stop(): Promise<void>;
194
+ }
195
+ /** Options for {@link startServer}. */
196
+ interface StartServerOptions {
197
+ hostname?: string;
198
+ /** Force the Node bridge even under Bun (tests). Default `false`. */
199
+ node?: boolean;
200
+ }
201
+ /**
202
+ * Serve a fetch handler under whatever runtime the CLI runs on: `Bun.serve`
203
+ * under Bun, a `node:http` server over the shared Node bridge under Node
204
+ * (multi-value headers, every `Set-Cookie`, streamed responses). Resolves once
205
+ * listening.
206
+ */
207
+ declare function startServer(port: number, fetch: FetchHandler, options?: StartServerOptions): Promise<RunningServer>;
208
+ /** The env-derived settings {@link serve} passes to `buildPanel`. */
209
+ interface ServeSettings {
210
+ port: number;
211
+ /** `BASE_PATH`, normalized (`""` or `/segment`). */
212
+ basePath: string;
213
+ /** `TITLE`, when set. */
214
+ title: string | undefined;
215
+ /** `LOGO_URL`, when set. */
216
+ logoUrl: string | undefined;
217
+ /** `READONLY` is `1`/`true`. */
218
+ readonly: boolean;
219
+ env: Env;
220
+ }
221
+ /** Options for {@link serve}. */
222
+ interface ServeOptions {
223
+ /** Log prefix, e.g. `"xtandard/webhooks"`. */
224
+ name: string;
225
+ /** Build the panel from the env-derived settings (the product reads its own extra env). */
226
+ buildPanel(settings: ServeSettings): Promise<{
227
+ fetch: FetchHandler;
228
+ close?(): unknown;
229
+ }>;
230
+ /** `--port` override; default `PORT`, then 3000. */
231
+ port?: number;
232
+ env?: Env;
233
+ /** Extra banner lines (e.g. `describeStorage`), printed before listening. */
234
+ banner?: () => Promise<string[]> | string[];
235
+ stdout?: (line: string) => void;
236
+ stderr?: (line: string) => void;
237
+ /** Resolve with the running server instead of never resolving (tests). Default `false`. */
238
+ returnServer?: boolean;
239
+ startServer?: StartServerOptions;
240
+ }
241
+ /**
242
+ * The `serve` command: read the common env (`PORT`, `BASE_PATH`, `TITLE`,
243
+ * `LOGO_URL`, `READONLY`), warn on `AUTH_MODE=none`, build the panel, print
244
+ * the banner and listen. The server owns the process: it **never resolves**,
245
+ * so the bin doesn't exit (unless `returnServer`).
246
+ */
247
+ declare function serve(options: ServeOptions & {
248
+ returnServer: true;
249
+ }): Promise<RunningServer>;
250
+ declare function serve(options: ServeOptions): Promise<never>;
251
+ /**
252
+ * The `version` of the package.json at `relative` to `moduleUrl` (default
253
+ * `../package.json`, which is right for `dist/cli.mjs` and `src/cli.ts`), or
254
+ * `"unknown"`.
255
+ */
256
+ declare function pkgVersion(moduleUrl: string | URL, relative?: string): Promise<string>;
257
+ /**
258
+ * The self-run guard (au 6761a34): true when the module is the program's entry
259
+ * point (`bun src/cli.ts`, `node dist/cli.mjs`), false when it is imported —
260
+ * by the `bin/` wrapper, a test or the standalone app — so `run()` executes
261
+ * exactly once.
262
+ *
263
+ * ```ts
264
+ * // src/cli.ts
265
+ * export async function run(argv: string[]): Promise<number> { … }
266
+ * if (isMainModule(import.meta)) run(process.argv.slice(2)).then((code) => process.exit(code));
267
+ * ```
268
+ */
269
+ declare function isMainModule(meta: {
270
+ url: string;
271
+ main?: boolean;
272
+ }): boolean;
273
+ //#endregion
274
+ export { type AuthFromEnv, type AuthFromEnvOptions, type Env, type ParseArgsOptions, type ParsedArgs, type RunningServer, type ServeOptions, type ServeSettings, type StartServerOptions, type StorageConfig, type StorageFactory, type StorageFromEnvOptions, type StorageRegistry, type StorageRole, type StorageRoleDefaults, buildAuthFromEnv, defaultStorageRegistry, describeStorage, driverEnvOf, env, isMainModule, isTruthy, parseArgs, pkgVersion, resolveStorageConfig, serve, startServer, storageFromEnv };
275
+ //# sourceMappingURL=entry-cli.d.cts.map
@@ -0,0 +1,275 @@
1
+ import { t as FetchHandler } from "./node-B1Djcwfi.mjs";
2
+ import { t as AuthProvider } from "./contract-B3UPXXLx.mjs";
3
+ import { r as AuthorizationProvider } from "./contract-BDPNvjtp.mjs";
4
+ import { n as RolesAuthorizationOptions } from "./roles-DLISB4T3.mjs";
5
+
6
+ //#region src/cli/index.d.ts
7
+ /** An environment: `process.env` or a test double. */
8
+ type Env = Record<string, string | undefined>;
9
+ /**
10
+ * Read an env var. An **empty** value counts as unset (`||` semantics), so
11
+ * `FOO=` in a `.env` file falls back to the default instead of becoming `""`.
12
+ */
13
+ declare const env: (key: string, fallback?: string, source?: Env) => string;
14
+ /** `"1"` or `"true"` (any case). */
15
+ declare const isTruthy: (value: string | undefined) => boolean;
16
+ /** Parsed argv. */
17
+ interface ParsedArgs {
18
+ /** Positional arguments. */
19
+ _: string[];
20
+ /** `--key value`, `--key=value`, `--flag` and mapped short flags. */
21
+ flags: Record<string, string | boolean>;
22
+ }
23
+ /** Options for {@link parseArgs}. */
24
+ interface ParseArgsOptions {
25
+ /** Short flags → long names. Default `{ h: "help", v: "version" }`. */
26
+ short?: Record<string, string>;
27
+ /** Flags that never take a value (`--help foo` keeps `foo` positional). Default `["help", "version"]`. */
28
+ boolean?: readonly string[];
29
+ }
30
+ /**
31
+ * Minimal argv parser:
32
+ *
33
+ * - `--key value`, `--key=value` (the value may contain `=`), `--flag`;
34
+ * - short flags from `short` (`-t acme` → `tenant: "acme"`, `-h` → `help: true`);
35
+ * - `--` ends the flags; a malformed `--=x` stays positional.
36
+ *
37
+ * @example
38
+ * ```ts
39
+ * parseArgs(["serve", "--port=4000", "-t", "acme"], { short: { t: "tenant" } });
40
+ * // { _: ["serve"], flags: { port: "4000", tenant: "acme" } }
41
+ * ```
42
+ */
43
+ declare function parseArgs(argv: readonly string[], options?: ParseArgsOptions): ParsedArgs;
44
+ /** Options for {@link buildAuthFromEnv}. */
45
+ interface AuthFromEnvOptions<Action extends string = string> {
46
+ /** The `WWW-Authenticate` realm, e.g. `"xtandard-webhooks"`. */
47
+ realm: string;
48
+ /** The roles provider used with `AUTH_MODE=basic` (the product's policy and actions). */
49
+ roles: RolesAuthorizationOptions<Action>;
50
+ /** Default `AUTH_ROLE`. Default `"admin"`. */
51
+ defaultRole?: string;
52
+ env?: Env;
53
+ /** Where warnings go. Default: stderr. */
54
+ warn?: (line: string) => void;
55
+ /** Log prefix for warnings. Default `"xtandard"`. */
56
+ name?: string;
57
+ }
58
+ /** What {@link buildAuthFromEnv} returns. */
59
+ interface AuthFromEnv<Action extends string = string> {
60
+ mode: "none" | "basic";
61
+ auth: AuthProvider;
62
+ authorization: AuthorizationProvider<Action>;
63
+ }
64
+ /**
65
+ * Build the auth + authorization providers from env:
66
+ *
67
+ * - `AUTH_MODE=none` (or empty / unset): anonymous, allow-all.
68
+ * - `AUTH_MODE=basic`: one Basic user from `AUTH_USERNAME` (default `admin`),
69
+ * `AUTH_PASSWORD_HASH` or `AUTH_PASSWORD`, with role `AUTH_ROLE`, and the
70
+ * product's roles provider.
71
+ * - **Anything else throws.** A typo such as `basci` must not open the panel.
72
+ */
73
+ declare function buildAuthFromEnv<Action extends string = string>(options: AuthFromEnvOptions<Action>): Promise<AuthFromEnv<Action>>;
74
+ /** Per-role defaults. The persisted ones (table, db, collection, paths) are the product's (ADR 0005). */
75
+ interface StorageRoleDefaults {
76
+ /** Driver when the driver env var is unset. Default `"file"`. */
77
+ driver?: string;
78
+ /** Redis key prefix (`<ROLE>_PREFIX`). */
79
+ prefix?: string;
80
+ /** Postgres table (`<ROLE>_PG_TABLE`). */
81
+ pgTable?: string;
82
+ /** Mongo database (`MONGO_DB`). */
83
+ mongoDb?: string;
84
+ /** Mongo collection (`<ROLE>_MONGO_COLLECTION`). */
85
+ mongoCollection?: string;
86
+ /** SQLite file (`<ROLE>_SQLITE_PATH`). */
87
+ sqlitePath?: string;
88
+ /**
89
+ * Table of the `sqlite` and `libsql` drivers (`<ROLE>_SQLITE_TABLE`). Without
90
+ * it the drivers use the kit's neutral `xtandard_kv` and miss a product's
91
+ * existing rows.
92
+ */
93
+ sqliteTable?: string;
94
+ /** libSQL URL (`<ROLE>_LIBSQL_URL`, then `LIBSQL_URL`). */
95
+ libsqlUrl?: string;
96
+ /** File-driver directory (`<ROLE>_FILE_DIR`). */
97
+ fileDir?: string;
98
+ }
99
+ /** A storage role: `STORAGE`, `QUEUE`, `SOURCE`, `RUNTIME`, `COUNTERS`… */
100
+ interface StorageRole {
101
+ /** The env-var prefix of the role's settings, e.g. `"QUEUE"` → `QUEUE_PG_TABLE`. */
102
+ name: string;
103
+ /**
104
+ * The env var naming the driver. Default: `STORAGE_DRIVER` for the
105
+ * `STORAGE` role, `<NAME>_STORAGE_DRIVER` otherwise (webhooks
106
+ * `QUEUE_STORAGE_DRIVER`, flags `SOURCE_STORAGE_DRIVER`).
107
+ */
108
+ driverEnv?: string;
109
+ defaults?: StorageRoleDefaults;
110
+ }
111
+ /** The resolved settings a driver factory receives. Connection strings are never logged. */
112
+ interface StorageConfig {
113
+ driver: string;
114
+ role: string;
115
+ /** `REDIS_URL` (default `redis://localhost:6379`). */
116
+ redisUrl: string;
117
+ prefix: string | undefined;
118
+ /** `DATABASE_URL`, else `POSTGRES_URL` (default `postgres://localhost:5432/postgres`). */
119
+ postgresUrl: string;
120
+ pgTable: string | undefined;
121
+ /** `MONGO_URL` (default `mongodb://localhost:27017`). */
122
+ mongoUrl: string;
123
+ mongoDb: string | undefined;
124
+ mongoCollection: string | undefined;
125
+ sqlitePath: string | undefined;
126
+ /** `<ROLE>_SQLITE_TABLE`: the `sqlite` and `libsql` table. */
127
+ sqliteTable: string | undefined;
128
+ libsqlUrl: string | undefined;
129
+ /** `LIBSQL_AUTH_TOKEN`. */
130
+ libsqlAuthToken: string | undefined;
131
+ fileDir: string | undefined;
132
+ env: Env;
133
+ }
134
+ /** Builds a storage for a driver from the resolved config. */
135
+ type StorageFactory<S = unknown> = (config: StorageConfig) => Promise<S> | S;
136
+ /** Driver name → factory. */
137
+ type StorageRegistry<S = unknown> = Record<string, StorageFactory<S>>;
138
+ /**
139
+ * The default registry: each driver lazily imports the kit's storage entry, so
140
+ * an optional peer loads only when its driver is chosen. Factory names and
141
+ * options match the products' CLIs.
142
+ */
143
+ declare const defaultStorageRegistry: StorageRegistry;
144
+ /** Options for {@link storageFromEnv}. */
145
+ interface StorageFromEnvOptions<S = unknown> {
146
+ role: StorageRole;
147
+ env?: Env;
148
+ /** Driver registry. Default: {@link defaultStorageRegistry} (all kit drivers). */
149
+ drivers?: StorageRegistry<S>;
150
+ /** Restrict the drivers this product's CLI accepts (default: every registry key). */
151
+ allowed?: readonly string[];
152
+ }
153
+ /** The driver env var of a role. */
154
+ declare const driverEnvOf: (role: StorageRole) => string;
155
+ /** Resolve a role's driver and settings from env. **An unknown driver throws.** */
156
+ declare function resolveStorageConfig(role: StorageRole, options: {
157
+ env?: Env;
158
+ allowed: readonly string[];
159
+ }): StorageConfig;
160
+ /**
161
+ * Build a role's storage from env (au/en's allow-list loader, generic over the
162
+ * product's roles). Unknown drivers fail instead of silently using `file`.
163
+ *
164
+ * @example
165
+ * ```ts
166
+ * const queue = await storageFromEnv<WebhooksStorage>({
167
+ * role: {
168
+ * name: "QUEUE",
169
+ * defaults: { prefix: "xtandard:webhooks:queue", pgTable: "xtandard_webhooks_queue",
170
+ * mongoDb: "xtandard_webhooks", mongoCollection: "webhooks_queue",
171
+ * sqlitePath: "./.webhooks/queue.sqlite", sqliteTable: "xtandard_webhooks",
172
+ * libsqlUrl: "file:./.webhooks/queue.db", fileDir: "./.webhooks/queue" },
173
+ * },
174
+ * });
175
+ * ```
176
+ */
177
+ declare function storageFromEnv<S = unknown>(options: StorageFromEnvOptions<S>): Promise<S>;
178
+ /**
179
+ * A log-safe description of where a role persists data, for the startup
180
+ * banner: file and SQLite paths are resolved to absolute paths; drivers with a
181
+ * connection string print only their name (never the URL, which may carry
182
+ * credentials).
183
+ */
184
+ declare function describeStorage(role: StorageRole, options?: {
185
+ env?: Env;
186
+ allowed?: readonly string[];
187
+ }): Promise<string>;
188
+ /** A running server. */
189
+ interface RunningServer {
190
+ /** The bound port (useful with port `0`). */
191
+ port: number;
192
+ /** Stop listening. */
193
+ stop(): Promise<void>;
194
+ }
195
+ /** Options for {@link startServer}. */
196
+ interface StartServerOptions {
197
+ hostname?: string;
198
+ /** Force the Node bridge even under Bun (tests). Default `false`. */
199
+ node?: boolean;
200
+ }
201
+ /**
202
+ * Serve a fetch handler under whatever runtime the CLI runs on: `Bun.serve`
203
+ * under Bun, a `node:http` server over the shared Node bridge under Node
204
+ * (multi-value headers, every `Set-Cookie`, streamed responses). Resolves once
205
+ * listening.
206
+ */
207
+ declare function startServer(port: number, fetch: FetchHandler, options?: StartServerOptions): Promise<RunningServer>;
208
+ /** The env-derived settings {@link serve} passes to `buildPanel`. */
209
+ interface ServeSettings {
210
+ port: number;
211
+ /** `BASE_PATH`, normalized (`""` or `/segment`). */
212
+ basePath: string;
213
+ /** `TITLE`, when set. */
214
+ title: string | undefined;
215
+ /** `LOGO_URL`, when set. */
216
+ logoUrl: string | undefined;
217
+ /** `READONLY` is `1`/`true`. */
218
+ readonly: boolean;
219
+ env: Env;
220
+ }
221
+ /** Options for {@link serve}. */
222
+ interface ServeOptions {
223
+ /** Log prefix, e.g. `"xtandard/webhooks"`. */
224
+ name: string;
225
+ /** Build the panel from the env-derived settings (the product reads its own extra env). */
226
+ buildPanel(settings: ServeSettings): Promise<{
227
+ fetch: FetchHandler;
228
+ close?(): unknown;
229
+ }>;
230
+ /** `--port` override; default `PORT`, then 3000. */
231
+ port?: number;
232
+ env?: Env;
233
+ /** Extra banner lines (e.g. `describeStorage`), printed before listening. */
234
+ banner?: () => Promise<string[]> | string[];
235
+ stdout?: (line: string) => void;
236
+ stderr?: (line: string) => void;
237
+ /** Resolve with the running server instead of never resolving (tests). Default `false`. */
238
+ returnServer?: boolean;
239
+ startServer?: StartServerOptions;
240
+ }
241
+ /**
242
+ * The `serve` command: read the common env (`PORT`, `BASE_PATH`, `TITLE`,
243
+ * `LOGO_URL`, `READONLY`), warn on `AUTH_MODE=none`, build the panel, print
244
+ * the banner and listen. The server owns the process: it **never resolves**,
245
+ * so the bin doesn't exit (unless `returnServer`).
246
+ */
247
+ declare function serve(options: ServeOptions & {
248
+ returnServer: true;
249
+ }): Promise<RunningServer>;
250
+ declare function serve(options: ServeOptions): Promise<never>;
251
+ /**
252
+ * The `version` of the package.json at `relative` to `moduleUrl` (default
253
+ * `../package.json`, which is right for `dist/cli.mjs` and `src/cli.ts`), or
254
+ * `"unknown"`.
255
+ */
256
+ declare function pkgVersion(moduleUrl: string | URL, relative?: string): Promise<string>;
257
+ /**
258
+ * The self-run guard (au 6761a34): true when the module is the program's entry
259
+ * point (`bun src/cli.ts`, `node dist/cli.mjs`), false when it is imported —
260
+ * by the `bin/` wrapper, a test or the standalone app — so `run()` executes
261
+ * exactly once.
262
+ *
263
+ * ```ts
264
+ * // src/cli.ts
265
+ * export async function run(argv: string[]): Promise<number> { … }
266
+ * if (isMainModule(import.meta)) run(process.argv.slice(2)).then((code) => process.exit(code));
267
+ * ```
268
+ */
269
+ declare function isMainModule(meta: {
270
+ url: string;
271
+ main?: boolean;
272
+ }): boolean;
273
+ //#endregion
274
+ export { type AuthFromEnv, type AuthFromEnvOptions, type Env, type ParseArgsOptions, type ParsedArgs, type RunningServer, type ServeOptions, type ServeSettings, type StartServerOptions, type StorageConfig, type StorageFactory, type StorageFromEnvOptions, type StorageRegistry, type StorageRole, type StorageRoleDefaults, buildAuthFromEnv, defaultStorageRegistry, describeStorage, driverEnvOf, env, isMainModule, isTruthy, parseArgs, pkgVersion, resolveStorageConfig, serve, startServer, storageFromEnv };
275
+ //# sourceMappingURL=entry-cli.d.mts.map