@xtandard/permissions 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 (375) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +362 -2
  3. package/bin/xtandard-permissions.mjs +3 -0
  4. package/dist/better-auth-Bp9YVyQa.d.cts +56 -0
  5. package/dist/better-auth-DHyW5-yt.cjs +91 -0
  6. package/dist/better-auth-DHyW5-yt.cjs.map +1 -0
  7. package/dist/better-auth-NO40ZqSM.mjs +74 -0
  8. package/dist/better-auth-NO40ZqSM.mjs.map +1 -0
  9. package/dist/better-auth-NSXgt6ZU.d.mts +56 -0
  10. package/dist/catalog-DA_d1SdC.d.cts +153 -0
  11. package/dist/catalog-DJcJ3ycq.d.mts +153 -0
  12. package/dist/catalog.cjs +198 -0
  13. package/dist/catalog.cjs.map +1 -0
  14. package/dist/catalog.d.cts +3 -0
  15. package/dist/catalog.d.mts +3 -0
  16. package/dist/catalog.mjs +141 -0
  17. package/dist/catalog.mjs.map +1 -0
  18. package/dist/chunk-DakpK96I.cjs +43 -0
  19. package/dist/cli.cjs +548 -0
  20. package/dist/cli.cjs.map +1 -0
  21. package/dist/cli.d.cts +28 -0
  22. package/dist/cli.d.mts +28 -0
  23. package/dist/cli.mjs +544 -0
  24. package/dist/cli.mjs.map +1 -0
  25. package/dist/contract-BMiOmg2f.d.cts +50 -0
  26. package/dist/contract-Bpy8yPrS.cjs +70 -0
  27. package/dist/contract-Bpy8yPrS.cjs.map +1 -0
  28. package/dist/contract-CNgMXr2u.d.cts +46 -0
  29. package/dist/contract-CNgMXr2u.d.mts +46 -0
  30. package/dist/contract-CPmJVoRx.cjs +70 -0
  31. package/dist/contract-CPmJVoRx.cjs.map +1 -0
  32. package/dist/contract-D32H1t0u.d.mts +50 -0
  33. package/dist/contract-DTdTXZtJ.mjs +47 -0
  34. package/dist/contract-DTdTXZtJ.mjs.map +1 -0
  35. package/dist/contract-DUzgB-He.d.mts +375 -0
  36. package/dist/contract-Dk6d2ylD.d.cts +375 -0
  37. package/dist/contract-RMkmERhT.d.cts +2 -0
  38. package/dist/contract-RMkmERhT.d.mts +2 -0
  39. package/dist/contract-Yc5AZuvv.mjs +47 -0
  40. package/dist/contract-Yc5AZuvv.mjs.map +1 -0
  41. package/dist/create-fetch-handler-BHDU4chu.d.mts +77 -0
  42. package/dist/create-fetch-handler-BtX64_rS.d.cts +77 -0
  43. package/dist/create-fetch-handler-C-WyaRCR.cjs +653 -0
  44. package/dist/create-fetch-handler-C-WyaRCR.cjs.map +1 -0
  45. package/dist/create-fetch-handler-ojjpk1Iw.mjs +636 -0
  46. package/dist/create-fetch-handler-ojjpk1Iw.mjs.map +1 -0
  47. package/dist/elysia-shared-BM6cPoCU.mjs +78 -0
  48. package/dist/elysia-shared-BM6cPoCU.mjs.map +1 -0
  49. package/dist/elysia-shared-BUTFTeal.cjs +101 -0
  50. package/dist/elysia-shared-BUTFTeal.cjs.map +1 -0
  51. package/dist/elysia-shared-DtKViycb.d.cts +58 -0
  52. package/dist/elysia-shared-g8zsb_pU.d.mts +58 -0
  53. package/dist/engine-Bufv0TbD.mjs +574 -0
  54. package/dist/engine-Bufv0TbD.mjs.map +1 -0
  55. package/dist/engine-CGGVDCqi.d.cts +296 -0
  56. package/dist/engine-DpFIcbgh.d.mts +296 -0
  57. package/dist/engine-bMoz3iW-.cjs +587 -0
  58. package/dist/engine-bMoz3iW-.cjs.map +1 -0
  59. package/dist/entry-auth-basic.cjs +40 -0
  60. package/dist/entry-auth-basic.cjs.map +1 -0
  61. package/dist/entry-auth-basic.d.cts +24 -0
  62. package/dist/entry-auth-basic.d.mts +24 -0
  63. package/dist/entry-auth-basic.mjs +26 -0
  64. package/dist/entry-auth-basic.mjs.map +1 -0
  65. package/dist/entry-auth-better-auth.cjs +12 -0
  66. package/dist/entry-auth-better-auth.d.cts +5 -0
  67. package/dist/entry-auth-better-auth.d.mts +5 -0
  68. package/dist/entry-auth-better-auth.mjs +4 -0
  69. package/dist/entry-auth-delegated.cjs +8 -0
  70. package/dist/entry-auth-delegated.d.cts +2 -0
  71. package/dist/entry-auth-delegated.d.mts +2 -0
  72. package/dist/entry-auth-delegated.mjs +2 -0
  73. package/dist/entry-auth-jwt.cjs +116 -0
  74. package/dist/entry-auth-jwt.cjs.map +1 -0
  75. package/dist/entry-auth-jwt.d.cts +65 -0
  76. package/dist/entry-auth-jwt.d.mts +65 -0
  77. package/dist/entry-auth-jwt.mjs +108 -0
  78. package/dist/entry-auth-jwt.mjs.map +1 -0
  79. package/dist/entry-auth-none.cjs +14 -0
  80. package/dist/entry-auth-none.d.cts +2 -0
  81. package/dist/entry-auth-none.d.mts +2 -0
  82. package/dist/entry-auth-none.mjs +2 -0
  83. package/dist/entry-auth-session.cjs +82 -0
  84. package/dist/entry-auth-session.cjs.map +1 -0
  85. package/dist/entry-auth-session.d.cts +20 -0
  86. package/dist/entry-auth-session.d.mts +20 -0
  87. package/dist/entry-auth-session.mjs +75 -0
  88. package/dist/entry-auth-session.mjs.map +1 -0
  89. package/dist/entry-authorization-delegated.cjs +31 -0
  90. package/dist/entry-authorization-delegated.cjs.map +1 -0
  91. package/dist/entry-authorization-delegated.d.cts +27 -0
  92. package/dist/entry-authorization-delegated.d.mts +27 -0
  93. package/dist/entry-authorization-delegated.mjs +30 -0
  94. package/dist/entry-authorization-delegated.mjs.map +1 -0
  95. package/dist/entry-authorization-none.cjs +29 -0
  96. package/dist/entry-authorization-none.cjs.map +1 -0
  97. package/dist/entry-authorization-none.d.cts +17 -0
  98. package/dist/entry-authorization-none.d.mts +17 -0
  99. package/dist/entry-authorization-none.mjs +28 -0
  100. package/dist/entry-authorization-none.mjs.map +1 -0
  101. package/dist/entry-authorization-permissions.cjs +4 -0
  102. package/dist/entry-authorization-permissions.d.cts +49 -0
  103. package/dist/entry-authorization-permissions.d.mts +49 -0
  104. package/dist/entry-authorization-permissions.mjs +2 -0
  105. package/dist/entry-authorization-roles.cjs +9 -0
  106. package/dist/entry-authorization-roles.d.cts +37 -0
  107. package/dist/entry-authorization-roles.d.mts +37 -0
  108. package/dist/entry-authorization-roles.mjs +3 -0
  109. package/dist/entry-better-auth-client.cjs +31 -0
  110. package/dist/entry-better-auth-client.cjs.map +1 -0
  111. package/dist/entry-better-auth-client.d.cts +63 -0
  112. package/dist/entry-better-auth-client.d.mts +63 -0
  113. package/dist/entry-better-auth-client.mjs +29 -0
  114. package/dist/entry-better-auth-client.mjs.map +1 -0
  115. package/dist/entry-better-auth.cjs +289 -0
  116. package/dist/entry-better-auth.cjs.map +1 -0
  117. package/dist/entry-better-auth.d.cts +3 -0
  118. package/dist/entry-better-auth.d.mts +3 -0
  119. package/dist/entry-better-auth.mjs +284 -0
  120. package/dist/entry-better-auth.mjs.map +1 -0
  121. package/dist/entry-bridges-audit.cjs +106 -0
  122. package/dist/entry-bridges-audit.cjs.map +1 -0
  123. package/dist/entry-bridges-audit.d.cts +58 -0
  124. package/dist/entry-bridges-audit.d.mts +58 -0
  125. package/dist/entry-bridges-audit.mjs +105 -0
  126. package/dist/entry-bridges-audit.mjs.map +1 -0
  127. package/dist/entry-bridges-webhooks.cjs +90 -0
  128. package/dist/entry-bridges-webhooks.cjs.map +1 -0
  129. package/dist/entry-bridges-webhooks.d.cts +46 -0
  130. package/dist/entry-bridges-webhooks.d.mts +46 -0
  131. package/dist/entry-bridges-webhooks.mjs +88 -0
  132. package/dist/entry-bridges-webhooks.mjs.map +1 -0
  133. package/dist/entry-bun.cjs +33 -0
  134. package/dist/entry-bun.cjs.map +1 -0
  135. package/dist/entry-bun.d.cts +31 -0
  136. package/dist/entry-bun.d.mts +31 -0
  137. package/dist/entry-bun.mjs +30 -0
  138. package/dist/entry-bun.mjs.map +1 -0
  139. package/dist/entry-drizzle-mysql.cjs +34 -0
  140. package/dist/entry-drizzle-mysql.cjs.map +1 -0
  141. package/dist/entry-drizzle-mysql.d.cts +20 -0
  142. package/dist/entry-drizzle-mysql.d.mts +20 -0
  143. package/dist/entry-drizzle-mysql.mjs +33 -0
  144. package/dist/entry-drizzle-mysql.mjs.map +1 -0
  145. package/dist/entry-drizzle-pg.cjs +44 -0
  146. package/dist/entry-drizzle-pg.cjs.map +1 -0
  147. package/dist/entry-drizzle-pg.d.cts +20 -0
  148. package/dist/entry-drizzle-pg.d.mts +20 -0
  149. package/dist/entry-drizzle-pg.mjs +43 -0
  150. package/dist/entry-drizzle-pg.mjs.map +1 -0
  151. package/dist/entry-drizzle-sqlite.cjs +34 -0
  152. package/dist/entry-drizzle-sqlite.cjs.map +1 -0
  153. package/dist/entry-drizzle-sqlite.d.cts +15 -0
  154. package/dist/entry-drizzle-sqlite.d.mts +15 -0
  155. package/dist/entry-drizzle-sqlite.mjs +33 -0
  156. package/dist/entry-drizzle-sqlite.mjs.map +1 -0
  157. package/dist/entry-elysia.cjs +117 -0
  158. package/dist/entry-elysia.cjs.map +1 -0
  159. package/dist/entry-elysia.d.cts +446 -0
  160. package/dist/entry-elysia.d.mts +446 -0
  161. package/dist/entry-elysia.mjs +113 -0
  162. package/dist/entry-elysia.mjs.map +1 -0
  163. package/dist/entry-elysia2.cjs +117 -0
  164. package/dist/entry-elysia2.cjs.map +1 -0
  165. package/dist/entry-elysia2.d.cts +571 -0
  166. package/dist/entry-elysia2.d.mts +571 -0
  167. package/dist/entry-elysia2.mjs +113 -0
  168. package/dist/entry-elysia2.mjs.map +1 -0
  169. package/dist/entry-express.cjs +101 -0
  170. package/dist/entry-express.cjs.map +1 -0
  171. package/dist/entry-express.d.cts +36 -0
  172. package/dist/entry-express.d.mts +36 -0
  173. package/dist/entry-express.mjs +97 -0
  174. package/dist/entry-express.mjs.map +1 -0
  175. package/dist/entry-hono.cjs +63 -0
  176. package/dist/entry-hono.cjs.map +1 -0
  177. package/dist/entry-hono.d.cts +40 -0
  178. package/dist/entry-hono.d.mts +40 -0
  179. package/dist/entry-hono.mjs +60 -0
  180. package/dist/entry-hono.mjs.map +1 -0
  181. package/dist/entry-hooks-log.cjs +39 -0
  182. package/dist/entry-hooks-log.cjs.map +1 -0
  183. package/dist/entry-hooks-log.d.cts +19 -0
  184. package/dist/entry-hooks-log.d.mts +19 -0
  185. package/dist/entry-hooks-log.mjs +36 -0
  186. package/dist/entry-hooks-log.mjs.map +1 -0
  187. package/dist/entry-next.cjs +67 -0
  188. package/dist/entry-next.cjs.map +1 -0
  189. package/dist/entry-next.d.cts +60 -0
  190. package/dist/entry-next.d.mts +60 -0
  191. package/dist/entry-next.mjs +57 -0
  192. package/dist/entry-next.mjs.map +1 -0
  193. package/dist/entry-react.cjs +401 -0
  194. package/dist/entry-react.cjs.map +1 -0
  195. package/dist/entry-react.d.cts +206 -0
  196. package/dist/entry-react.d.mts +206 -0
  197. package/dist/entry-react.mjs +388 -0
  198. package/dist/entry-react.mjs.map +1 -0
  199. package/dist/entry-storage-cloudflare-kv.cjs +8 -0
  200. package/dist/entry-storage-cloudflare-kv.d.cts +2 -0
  201. package/dist/entry-storage-cloudflare-kv.d.mts +2 -0
  202. package/dist/entry-storage-cloudflare-kv.mjs +2 -0
  203. package/dist/entry-storage-drizzle.cjs +71 -0
  204. package/dist/entry-storage-drizzle.cjs.map +1 -0
  205. package/dist/entry-storage-drizzle.d.cts +27 -0
  206. package/dist/entry-storage-drizzle.d.mts +27 -0
  207. package/dist/entry-storage-drizzle.mjs +68 -0
  208. package/dist/entry-storage-drizzle.mjs.map +1 -0
  209. package/dist/entry-storage-file.cjs +54 -0
  210. package/dist/entry-storage-file.cjs.map +1 -0
  211. package/dist/entry-storage-file.d.cts +24 -0
  212. package/dist/entry-storage-file.d.mts +24 -0
  213. package/dist/entry-storage-file.mjs +46 -0
  214. package/dist/entry-storage-file.mjs.map +1 -0
  215. package/dist/entry-storage-libsql.cjs +64 -0
  216. package/dist/entry-storage-libsql.cjs.map +1 -0
  217. package/dist/entry-storage-libsql.d.cts +28 -0
  218. package/dist/entry-storage-libsql.d.mts +28 -0
  219. package/dist/entry-storage-libsql.mjs +61 -0
  220. package/dist/entry-storage-libsql.mjs.map +1 -0
  221. package/dist/entry-storage-memory.cjs +3 -0
  222. package/dist/entry-storage-memory.d.cts +25 -0
  223. package/dist/entry-storage-memory.d.mts +25 -0
  224. package/dist/entry-storage-memory.mjs +2 -0
  225. package/dist/entry-storage-mongodb.cjs +61 -0
  226. package/dist/entry-storage-mongodb.cjs.map +1 -0
  227. package/dist/entry-storage-mongodb.d.cts +25 -0
  228. package/dist/entry-storage-mongodb.d.mts +25 -0
  229. package/dist/entry-storage-mongodb.mjs +58 -0
  230. package/dist/entry-storage-mongodb.mjs.map +1 -0
  231. package/dist/entry-storage-postgres.cjs +62 -0
  232. package/dist/entry-storage-postgres.cjs.map +1 -0
  233. package/dist/entry-storage-postgres.d.cts +29 -0
  234. package/dist/entry-storage-postgres.d.mts +29 -0
  235. package/dist/entry-storage-postgres.mjs +58 -0
  236. package/dist/entry-storage-postgres.mjs.map +1 -0
  237. package/dist/entry-storage-redis.cjs +76 -0
  238. package/dist/entry-storage-redis.cjs.map +1 -0
  239. package/dist/entry-storage-redis.d.cts +29 -0
  240. package/dist/entry-storage-redis.d.mts +29 -0
  241. package/dist/entry-storage-redis.mjs +72 -0
  242. package/dist/entry-storage-redis.mjs.map +1 -0
  243. package/dist/entry-storage-sqlite.cjs +46 -0
  244. package/dist/entry-storage-sqlite.cjs.map +1 -0
  245. package/dist/entry-storage-sqlite.d.cts +22 -0
  246. package/dist/entry-storage-sqlite.d.mts +22 -0
  247. package/dist/entry-storage-sqlite.mjs +43 -0
  248. package/dist/entry-storage-sqlite.mjs.map +1 -0
  249. package/dist/entry-storage-unstorage.cjs +8 -0
  250. package/dist/entry-storage-unstorage.d.cts +2 -0
  251. package/dist/entry-storage-unstorage.d.mts +2 -0
  252. package/dist/entry-storage-unstorage.mjs +2 -0
  253. package/dist/error-codes-9MRMSSMQ.cjs +49 -0
  254. package/dist/error-codes-9MRMSSMQ.cjs.map +1 -0
  255. package/dist/error-codes-CCKuDDu7.mjs +44 -0
  256. package/dist/error-codes-CCKuDDu7.mjs.map +1 -0
  257. package/dist/errors-bL3XQLfE.mjs +54 -0
  258. package/dist/errors-bL3XQLfE.mjs.map +1 -0
  259. package/dist/errors-vVYic8gz.cjs +89 -0
  260. package/dist/errors-vVYic8gz.cjs.map +1 -0
  261. package/dist/events-AE4Ytqmz.d.cts +6 -0
  262. package/dist/events-AE4Ytqmz.d.mts +6 -0
  263. package/dist/events-DYZShrYB.mjs +15 -0
  264. package/dist/events-DYZShrYB.mjs.map +1 -0
  265. package/dist/events-FJ2K0wly.cjs +26 -0
  266. package/dist/events-FJ2K0wly.cjs.map +1 -0
  267. package/dist/guard-BOx5cnMP.mjs +141 -0
  268. package/dist/guard-BOx5cnMP.mjs.map +1 -0
  269. package/dist/guard-C3o7V14m.d.cts +62 -0
  270. package/dist/guard-DCbTnqPz.d.mts +62 -0
  271. package/dist/guard-nwdOYe90.cjs +188 -0
  272. package/dist/guard-nwdOYe90.cjs.map +1 -0
  273. package/dist/index-BVVgDSdq.d.cts +1 -0
  274. package/dist/index-BVVgDSdq.d.mts +1 -0
  275. package/dist/index.cjs +240 -0
  276. package/dist/index.cjs.map +1 -0
  277. package/dist/index.d.cts +195 -0
  278. package/dist/index.d.mts +195 -0
  279. package/dist/index.mjs +60 -0
  280. package/dist/index.mjs.map +1 -0
  281. package/dist/kit-C7tepDB2.cjs +76 -0
  282. package/dist/kit-C7tepDB2.cjs.map +1 -0
  283. package/dist/kit-DMVBLBI9.d.mts +57 -0
  284. package/dist/kit-fzXHYb1l.mjs +65 -0
  285. package/dist/kit-fzXHYb1l.mjs.map +1 -0
  286. package/dist/kit-qAROuhOI.d.cts +57 -0
  287. package/dist/memory-BbBbbY8-.mjs +32 -0
  288. package/dist/memory-BbBbbY8-.mjs.map +1 -0
  289. package/dist/memory-knijqKw_.cjs +39 -0
  290. package/dist/memory-knijqKw_.cjs.map +1 -0
  291. package/dist/permissions-C9PjftY6.mjs +59 -0
  292. package/dist/permissions-C9PjftY6.mjs.map +1 -0
  293. package/dist/permissions-Cxri_P_k.cjs +70 -0
  294. package/dist/permissions-Cxri_P_k.cjs.map +1 -0
  295. package/dist/policy-BQmlo2lu.mjs +3 -0
  296. package/dist/policy-CGA6QD0a.d.mts +4 -0
  297. package/dist/policy-DFq_SYR3.d.cts +4 -0
  298. package/dist/react-embed.js +18710 -0
  299. package/dist/react.css +1 -0
  300. package/dist/relationships-BLYEJ9tc.cjs +907 -0
  301. package/dist/relationships-BLYEJ9tc.cjs.map +1 -0
  302. package/dist/relationships-BfLonEMI.mjs +756 -0
  303. package/dist/relationships-BfLonEMI.mjs.map +1 -0
  304. package/dist/roles-DBk4i8b5.mjs +69 -0
  305. package/dist/roles-DBk4i8b5.mjs.map +1 -0
  306. package/dist/roles-a8B5uZ35.cjs +104 -0
  307. package/dist/roles-a8B5uZ35.cjs.map +1 -0
  308. package/dist/rolldown-runtime-D7D4PA-g.mjs +13 -0
  309. package/dist/routes-DtRb3EO0.mjs +1001 -0
  310. package/dist/routes-DtRb3EO0.mjs.map +1 -0
  311. package/dist/routes-irNuuZqo.cjs +1049 -0
  312. package/dist/routes-irNuuZqo.cjs.map +1 -0
  313. package/dist/server-C2F4H6bR.d.cts +886 -0
  314. package/dist/server-CJ7AIJpO.d.mts +886 -0
  315. package/dist/table-DA98mVVT.d.cts +2 -0
  316. package/dist/table-DA98mVVT.d.mts +2 -0
  317. package/dist/testing.cjs +59 -0
  318. package/dist/testing.cjs.map +1 -0
  319. package/dist/testing.d.cts +37 -0
  320. package/dist/testing.d.mts +37 -0
  321. package/dist/testing.mjs +57 -0
  322. package/dist/testing.mjs.map +1 -0
  323. package/dist/types-elysia2/adapters/elysia-shared.d.ts +71 -0
  324. package/dist/types-elysia2/adapters/elysia2.d.ts +432 -0
  325. package/dist/types-elysia2/adapters/guard.d.ts +140 -0
  326. package/dist/types-elysia2/auth/contract.d.ts +9 -0
  327. package/dist/types-elysia2/auth-provider/contract.d.ts +57 -0
  328. package/dist/types-elysia2/auth-provider/kit.d.ts +57 -0
  329. package/dist/types-elysia2/authorization/contract.d.ts +53 -0
  330. package/dist/types-elysia2/authorization/permissions.d.ts +54 -0
  331. package/dist/types-elysia2/catalog.d.ts +197 -0
  332. package/dist/types-elysia2/engine.d.ts +192 -0
  333. package/dist/types-elysia2/entry-elysia2.d.ts +9 -0
  334. package/dist/types-elysia2/errors.d.ts +47 -0
  335. package/dist/types-elysia2/hooks/contract.d.ts +100 -0
  336. package/dist/types-elysia2/keys.d.ts +78 -0
  337. package/dist/types-elysia2/policy.d.ts +13 -0
  338. package/dist/types-elysia2/relationships.d.ts +162 -0
  339. package/dist/types-elysia2/schema.d.ts +299 -0
  340. package/dist/types-elysia2/server/cors.d.ts +8 -0
  341. package/dist/types-elysia2/server/create-fetch-handler.d.ts +87 -0
  342. package/dist/types-elysia2/server/openapi.d.ts +29 -0
  343. package/dist/types-elysia2/server/routes.d.ts +132 -0
  344. package/dist/types-elysia2/server/validation.d.ts +205 -0
  345. package/dist/types-elysia2/storage/contract.d.ts +18 -0
  346. package/dist/types-react/catalog.d.ts +197 -0
  347. package/dist/types-react/engine.d.ts +192 -0
  348. package/dist/types-react/entry-react-embed.d.ts +20 -0
  349. package/dist/types-react/errors.d.ts +47 -0
  350. package/dist/types-react/hooks/contract.d.ts +100 -0
  351. package/dist/types-react/keys.d.ts +78 -0
  352. package/dist/types-react/policy.d.ts +13 -0
  353. package/dist/types-react/react-embed.d.ts +37 -0
  354. package/dist/types-react/relationships.d.ts +162 -0
  355. package/dist/types-react/schema.d.ts +299 -0
  356. package/dist/types-react/storage/contract.d.ts +18 -0
  357. package/dist/types-react/ui/App.d.ts +23 -0
  358. package/dist/types-react/ui/api.d.ts +73 -0
  359. package/dist/types-react/ui/components/perm-bits.d.ts +64 -0
  360. package/dist/types-react/ui/lib/queries.d.ts +46 -0
  361. package/dist/types-react/ui/theme.d.ts +10 -0
  362. package/dist/types-react/ui/types.d.ts +109 -0
  363. package/dist/types-react/ui/views/CatalogView.d.ts +3 -0
  364. package/dist/types-react/ui/views/HistoryView.d.ts +6 -0
  365. package/dist/types-react/ui/views/PlaygroundView.d.ts +14 -0
  366. package/dist/types-react/ui/views/RelationshipsView.d.ts +6 -0
  367. package/dist/types-react/ui/views/SubjectDetailView.d.ts +7 -0
  368. package/dist/types-react/ui/views/SubjectsView.d.ts +6 -0
  369. package/dist/ui/apple-touch-icon.png +0 -0
  370. package/dist/ui/assets/index-DCPZRo-Z.css +1 -0
  371. package/dist/ui/assets/index-uXGOtyuj.js +104 -0
  372. package/dist/ui/favicon.ico +0 -0
  373. package/dist/ui/favicon.svg +15 -0
  374. package/dist/ui/index.html +20 -0
  375. package/package.json +587 -4
@@ -0,0 +1,25 @@
1
+ import * as kit from "@xtandard/kit/storage/memory";
2
+
3
+ //#region src/storage/memory.d.ts
4
+ /** Options for {@link createMemoryStorage}. */
5
+ type MemoryStorageOptions = kit.MemoryStorageOptions;
6
+ /** The memory storage: watchable and compare-and-swap capable. */
7
+ type MemoryPermissionsStorage = kit.MemoryKvStorage;
8
+ /**
9
+ * Create an in-memory storage implementing both `watch` (callbacks fire on the
10
+ * next microtask after a write/remove) and `compareAndSwap` (structural
11
+ * equality; race-free in-process).
12
+ *
13
+ * @example
14
+ * ```ts
15
+ * import { createMemoryStorage } from "@xtandard/permissions/storage/memory";
16
+ *
17
+ * const storage = createMemoryStorage();
18
+ * // Optionally seed with pre-existing data:
19
+ * // const storage = createMemoryStorage({ initial: { "my-key": { value: 1 } } });
20
+ * ```
21
+ */
22
+ declare function createMemoryStorage(options?: MemoryStorageOptions): MemoryPermissionsStorage;
23
+ //#endregion
24
+ export { type MemoryPermissionsStorage, type MemoryStorageOptions, createMemoryStorage };
25
+ //# sourceMappingURL=entry-storage-memory.d.mts.map
@@ -0,0 +1,2 @@
1
+ import { t as createMemoryStorage } from "./memory-BbBbbY8-.mjs";
2
+ export { createMemoryStorage };
@@ -0,0 +1,61 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_chunk = require("./chunk-DakpK96I.cjs");
3
+ let _xtandard_kit_storage_mongodb = require("@xtandard/kit/storage/mongodb");
4
+ _xtandard_kit_storage_mongodb = require_chunk.__toESM(_xtandard_kit_storage_mongodb, 1);
5
+ //#region src/storage/mongodb.ts
6
+ /**
7
+ * MongoDB storage adapter built on the [`mongodb`](https://github.com/mongodb/node-mongodb-native)
8
+ * driver, an optional peer dependency. You can either pass a pre-constructed
9
+ * (optionally pre-connected) `MongoClient`, or a connection `url` to create and
10
+ * connect a client lazily on first use.
11
+ *
12
+ * The backend is a single collection of `{ _id: <key>, value: <any> }` documents.
13
+ * The storage key is stored verbatim as the document `_id`, and the value is
14
+ * stored directly as a BSON field — MongoDB persists arbitrary objects, arrays,
15
+ * and primitives, so no JSON (de)serialisation round-trip is needed. Object
16
+ * keys are written in sorted (canonical) order, because BSON document equality
17
+ * is field-order sensitive and `compareAndSwap` relies on it.
18
+ *
19
+ * `getKeys(prefix)` matches `_id` against an anchored, escaped regular
20
+ * expression (`^<prefix>`; case-sensitive), projecting only `_id` so the server
21
+ * never ships values back for a key listing.
22
+ *
23
+ * `compareAndSwap` is one `updateOne({ _id, $expr: { $eq: ["$value", expected] } })`
24
+ * (or an `insertOne` guarded by the unique `_id` when absence is expected), so it
25
+ * is atomic on any deployment, standalone included.
26
+ *
27
+ * ## Why no `watch`
28
+ *
29
+ * MongoDB change streams (the natural way to back a watchable storage) require
30
+ * a replica set or sharded cluster — they are unavailable on a standalone
31
+ * `mongod`. To keep this adapter usable against any deployment, `watch` is
32
+ * intentionally **not** implemented; the engine feature-detects its absence via
33
+ * `isWatchable` and relies on its cache TTL instead.
34
+ *
35
+ * The driver is `@xtandard/kit/storage/mongodb`.
36
+ *
37
+ * @module
38
+ */
39
+ /**
40
+ * Create a MongoDB-backed {@link MongoPermissionsStorage}. The client is
41
+ * created and connected lazily when only a `url` is given.
42
+ *
43
+ * @example
44
+ * ```ts
45
+ * import { createMongoStorage } from "@xtandard/permissions/storage/mongodb";
46
+ *
47
+ * const storage = createMongoStorage({ url: process.env.MONGO_URL });
48
+ * ```
49
+ */
50
+ function createMongoStorage(options) {
51
+ return _xtandard_kit_storage_mongodb.createMongoStorage({
52
+ subpath: "@xtandard/permissions/storage/mongodb",
53
+ ...options,
54
+ dbName: options.dbName ?? "xtandard_permissions",
55
+ collectionName: options.collectionName ?? "permissions_kv"
56
+ });
57
+ }
58
+ //#endregion
59
+ exports.createMongoStorage = createMongoStorage;
60
+
61
+ //# sourceMappingURL=entry-storage-mongodb.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entry-storage-mongodb.cjs","names":["kit"],"sources":["../src/storage/mongodb.ts"],"sourcesContent":["/**\n * MongoDB storage adapter built on the [`mongodb`](https://github.com/mongodb/node-mongodb-native)\n * driver, an optional peer dependency. You can either pass a pre-constructed\n * (optionally pre-connected) `MongoClient`, or a connection `url` to create and\n * connect a client lazily on first use.\n *\n * The backend is a single collection of `{ _id: <key>, value: <any> }` documents.\n * The storage key is stored verbatim as the document `_id`, and the value is\n * stored directly as a BSON field — MongoDB persists arbitrary objects, arrays,\n * and primitives, so no JSON (de)serialisation round-trip is needed. Object\n * keys are written in sorted (canonical) order, because BSON document equality\n * is field-order sensitive and `compareAndSwap` relies on it.\n *\n * `getKeys(prefix)` matches `_id` against an anchored, escaped regular\n * expression (`^<prefix>`; case-sensitive), projecting only `_id` so the server\n * never ships values back for a key listing.\n *\n * `compareAndSwap` is one `updateOne({ _id, $expr: { $eq: [\"$value\", expected] } })`\n * (or an `insertOne` guarded by the unique `_id` when absence is expected), so it\n * is atomic on any deployment, standalone included.\n *\n * ## Why no `watch`\n *\n * MongoDB change streams (the natural way to back a watchable storage) require\n * a replica set or sharded cluster — they are unavailable on a standalone\n * `mongod`. To keep this adapter usable against any deployment, `watch` is\n * intentionally **not** implemented; the engine feature-detects its absence via\n * `isWatchable` and relies on its cache TTL instead.\n *\n * The driver is `@xtandard/kit/storage/mongodb`.\n *\n * @module\n */\n\nimport * as kit from \"@xtandard/kit/storage/mongodb\";\n\n/**\n * Options for {@link createMongoStorage}. `dbName` defaults to\n * `\"xtandard_permissions\"` and `collectionName` to `\"permissions_kv\"`.\n */\nexport type MongoStorageOptions = kit.MongoStorageOptions;\n\n/** A compare-and-swap capable storage backed by MongoDB, plus `close()`. */\nexport type MongoPermissionsStorage = kit.MongoKvStorage;\n\n/**\n * Create a MongoDB-backed {@link MongoPermissionsStorage}. The client is\n * created and connected lazily when only a `url` is given.\n *\n * @example\n * ```ts\n * import { createMongoStorage } from \"@xtandard/permissions/storage/mongodb\";\n *\n * const storage = createMongoStorage({ url: process.env.MONGO_URL });\n * ```\n */\nexport function createMongoStorage(options: MongoStorageOptions): MongoPermissionsStorage {\n return kit.createMongoStorage({\n subpath: \"@xtandard/permissions/storage/mongodb\",\n ...options,\n dbName: options.dbName ?? \"xtandard_permissions\",\n collectionName: options.collectionName ?? \"permissions_kv\",\n });\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwDA,SAAgB,mBAAmB,SAAuD;CACxF,OAAOA,8BAAI,mBAAmB;EAC5B,SAAS;EACT,GAAG;EACH,QAAQ,QAAQ,UAAU;EAC1B,gBAAgB,QAAQ,kBAAkB;CAC5C,CAAC;AACH"}
@@ -0,0 +1,25 @@
1
+ import * as kit from "@xtandard/kit/storage/mongodb";
2
+
3
+ //#region src/storage/mongodb.d.ts
4
+ /**
5
+ * Options for {@link createMongoStorage}. `dbName` defaults to
6
+ * `"xtandard_permissions"` and `collectionName` to `"permissions_kv"`.
7
+ */
8
+ type MongoStorageOptions = kit.MongoStorageOptions;
9
+ /** A compare-and-swap capable storage backed by MongoDB, plus `close()`. */
10
+ type MongoPermissionsStorage = kit.MongoKvStorage;
11
+ /**
12
+ * Create a MongoDB-backed {@link MongoPermissionsStorage}. The client is
13
+ * created and connected lazily when only a `url` is given.
14
+ *
15
+ * @example
16
+ * ```ts
17
+ * import { createMongoStorage } from "@xtandard/permissions/storage/mongodb";
18
+ *
19
+ * const storage = createMongoStorage({ url: process.env.MONGO_URL });
20
+ * ```
21
+ */
22
+ declare function createMongoStorage(options: MongoStorageOptions): MongoPermissionsStorage;
23
+ //#endregion
24
+ export { type MongoPermissionsStorage, type MongoStorageOptions, createMongoStorage };
25
+ //# sourceMappingURL=entry-storage-mongodb.d.cts.map
@@ -0,0 +1,25 @@
1
+ import * as kit from "@xtandard/kit/storage/mongodb";
2
+
3
+ //#region src/storage/mongodb.d.ts
4
+ /**
5
+ * Options for {@link createMongoStorage}. `dbName` defaults to
6
+ * `"xtandard_permissions"` and `collectionName` to `"permissions_kv"`.
7
+ */
8
+ type MongoStorageOptions = kit.MongoStorageOptions;
9
+ /** A compare-and-swap capable storage backed by MongoDB, plus `close()`. */
10
+ type MongoPermissionsStorage = kit.MongoKvStorage;
11
+ /**
12
+ * Create a MongoDB-backed {@link MongoPermissionsStorage}. The client is
13
+ * created and connected lazily when only a `url` is given.
14
+ *
15
+ * @example
16
+ * ```ts
17
+ * import { createMongoStorage } from "@xtandard/permissions/storage/mongodb";
18
+ *
19
+ * const storage = createMongoStorage({ url: process.env.MONGO_URL });
20
+ * ```
21
+ */
22
+ declare function createMongoStorage(options: MongoStorageOptions): MongoPermissionsStorage;
23
+ //#endregion
24
+ export { type MongoPermissionsStorage, type MongoStorageOptions, createMongoStorage };
25
+ //# sourceMappingURL=entry-storage-mongodb.d.mts.map
@@ -0,0 +1,58 @@
1
+ import * as kit from "@xtandard/kit/storage/mongodb";
2
+ //#region src/storage/mongodb.ts
3
+ /**
4
+ * MongoDB storage adapter built on the [`mongodb`](https://github.com/mongodb/node-mongodb-native)
5
+ * driver, an optional peer dependency. You can either pass a pre-constructed
6
+ * (optionally pre-connected) `MongoClient`, or a connection `url` to create and
7
+ * connect a client lazily on first use.
8
+ *
9
+ * The backend is a single collection of `{ _id: <key>, value: <any> }` documents.
10
+ * The storage key is stored verbatim as the document `_id`, and the value is
11
+ * stored directly as a BSON field — MongoDB persists arbitrary objects, arrays,
12
+ * and primitives, so no JSON (de)serialisation round-trip is needed. Object
13
+ * keys are written in sorted (canonical) order, because BSON document equality
14
+ * is field-order sensitive and `compareAndSwap` relies on it.
15
+ *
16
+ * `getKeys(prefix)` matches `_id` against an anchored, escaped regular
17
+ * expression (`^<prefix>`; case-sensitive), projecting only `_id` so the server
18
+ * never ships values back for a key listing.
19
+ *
20
+ * `compareAndSwap` is one `updateOne({ _id, $expr: { $eq: ["$value", expected] } })`
21
+ * (or an `insertOne` guarded by the unique `_id` when absence is expected), so it
22
+ * is atomic on any deployment, standalone included.
23
+ *
24
+ * ## Why no `watch`
25
+ *
26
+ * MongoDB change streams (the natural way to back a watchable storage) require
27
+ * a replica set or sharded cluster — they are unavailable on a standalone
28
+ * `mongod`. To keep this adapter usable against any deployment, `watch` is
29
+ * intentionally **not** implemented; the engine feature-detects its absence via
30
+ * `isWatchable` and relies on its cache TTL instead.
31
+ *
32
+ * The driver is `@xtandard/kit/storage/mongodb`.
33
+ *
34
+ * @module
35
+ */
36
+ /**
37
+ * Create a MongoDB-backed {@link MongoPermissionsStorage}. The client is
38
+ * created and connected lazily when only a `url` is given.
39
+ *
40
+ * @example
41
+ * ```ts
42
+ * import { createMongoStorage } from "@xtandard/permissions/storage/mongodb";
43
+ *
44
+ * const storage = createMongoStorage({ url: process.env.MONGO_URL });
45
+ * ```
46
+ */
47
+ function createMongoStorage(options) {
48
+ return kit.createMongoStorage({
49
+ subpath: "@xtandard/permissions/storage/mongodb",
50
+ ...options,
51
+ dbName: options.dbName ?? "xtandard_permissions",
52
+ collectionName: options.collectionName ?? "permissions_kv"
53
+ });
54
+ }
55
+ //#endregion
56
+ export { createMongoStorage };
57
+
58
+ //# sourceMappingURL=entry-storage-mongodb.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entry-storage-mongodb.mjs","names":[],"sources":["../src/storage/mongodb.ts"],"sourcesContent":["/**\n * MongoDB storage adapter built on the [`mongodb`](https://github.com/mongodb/node-mongodb-native)\n * driver, an optional peer dependency. You can either pass a pre-constructed\n * (optionally pre-connected) `MongoClient`, or a connection `url` to create and\n * connect a client lazily on first use.\n *\n * The backend is a single collection of `{ _id: <key>, value: <any> }` documents.\n * The storage key is stored verbatim as the document `_id`, and the value is\n * stored directly as a BSON field — MongoDB persists arbitrary objects, arrays,\n * and primitives, so no JSON (de)serialisation round-trip is needed. Object\n * keys are written in sorted (canonical) order, because BSON document equality\n * is field-order sensitive and `compareAndSwap` relies on it.\n *\n * `getKeys(prefix)` matches `_id` against an anchored, escaped regular\n * expression (`^<prefix>`; case-sensitive), projecting only `_id` so the server\n * never ships values back for a key listing.\n *\n * `compareAndSwap` is one `updateOne({ _id, $expr: { $eq: [\"$value\", expected] } })`\n * (or an `insertOne` guarded by the unique `_id` when absence is expected), so it\n * is atomic on any deployment, standalone included.\n *\n * ## Why no `watch`\n *\n * MongoDB change streams (the natural way to back a watchable storage) require\n * a replica set or sharded cluster — they are unavailable on a standalone\n * `mongod`. To keep this adapter usable against any deployment, `watch` is\n * intentionally **not** implemented; the engine feature-detects its absence via\n * `isWatchable` and relies on its cache TTL instead.\n *\n * The driver is `@xtandard/kit/storage/mongodb`.\n *\n * @module\n */\n\nimport * as kit from \"@xtandard/kit/storage/mongodb\";\n\n/**\n * Options for {@link createMongoStorage}. `dbName` defaults to\n * `\"xtandard_permissions\"` and `collectionName` to `\"permissions_kv\"`.\n */\nexport type MongoStorageOptions = kit.MongoStorageOptions;\n\n/** A compare-and-swap capable storage backed by MongoDB, plus `close()`. */\nexport type MongoPermissionsStorage = kit.MongoKvStorage;\n\n/**\n * Create a MongoDB-backed {@link MongoPermissionsStorage}. The client is\n * created and connected lazily when only a `url` is given.\n *\n * @example\n * ```ts\n * import { createMongoStorage } from \"@xtandard/permissions/storage/mongodb\";\n *\n * const storage = createMongoStorage({ url: process.env.MONGO_URL });\n * ```\n */\nexport function createMongoStorage(options: MongoStorageOptions): MongoPermissionsStorage {\n return kit.createMongoStorage({\n subpath: \"@xtandard/permissions/storage/mongodb\",\n ...options,\n dbName: options.dbName ?? \"xtandard_permissions\",\n collectionName: options.collectionName ?? \"permissions_kv\",\n });\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwDA,SAAgB,mBAAmB,SAAuD;CACxF,OAAO,IAAI,mBAAmB;EAC5B,SAAS;EACT,GAAG;EACH,QAAQ,QAAQ,UAAU;EAC1B,gBAAgB,QAAQ,kBAAkB;CAC5C,CAAC;AACH"}
@@ -0,0 +1,62 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_chunk = require("./chunk-DakpK96I.cjs");
3
+ let _xtandard_kit_storage_postgres = require("@xtandard/kit/storage/postgres");
4
+ _xtandard_kit_storage_postgres = require_chunk.__toESM(_xtandard_kit_storage_postgres, 1);
5
+ //#region src/storage/postgres.ts
6
+ /**
7
+ * Postgres storage adapter backed by a single key/value table
8
+ * (`key text COLLATE "C" PRIMARY KEY, value jsonb`). It works with any client
9
+ * exposing a `query(text, params?)` method that resolves to `{ rows }` — this
10
+ * covers [`pg`](https://github.com/brianc/node-postgres) (`Pool`/`Client`) and
11
+ * the in-process [`@electric-sql/pglite`](https://github.com/electric-sql/pglite)
12
+ * alike. You can pass a pre-built `client`, or a `connectionString`/`url` to
13
+ * lazily create a `pg` `Pool` on first use.
14
+ *
15
+ * The table is created on demand (`CREATE TABLE IF NOT EXISTS`) the first time
16
+ * any operation runs, guarded by a single promise so concurrent callers only
17
+ * issue the DDL once. The key column uses the `"C"` collation so ordering and
18
+ * `LIKE` prefixes are bytewise (case-sensitive) whatever the database default.
19
+ * Values are stored as `jsonb`; both `pg` and `pglite` return `jsonb` already
20
+ * parsed to JS, but a string is JSON-parsed defensively so either driver works.
21
+ *
22
+ * `compareAndSwap` is a single statement — `UPDATE … WHERE key = $1 AND value =
23
+ * $2::jsonb` (jsonb equality is structural) or `INSERT … ON CONFLICT DO
24
+ * NOTHING` when absence is expected — so it is atomic across connections.
25
+ *
26
+ * The driver is `@xtandard/kit/storage/postgres`.
27
+ *
28
+ * @module
29
+ */
30
+ /** The persisted default table name. */
31
+ const DEFAULT_TABLE = "xtandard_permissions_kv";
32
+ /**
33
+ * The DDL {@link createPostgresStorage} runs on first use — for migrations when
34
+ * the runtime role may not create tables.
35
+ */
36
+ function postgresStorageSchema(table = DEFAULT_TABLE) {
37
+ return _xtandard_kit_storage_postgres.postgresStorageSchema(table);
38
+ }
39
+ /**
40
+ * Create a Postgres-backed {@link PostgresPermissionsStorage}. Connection and
41
+ * table creation are lazy.
42
+ *
43
+ * @example
44
+ * ```ts
45
+ * import { createPostgresStorage } from "@xtandard/permissions/storage/postgres";
46
+ *
47
+ * const storage = createPostgresStorage({ connectionString: process.env.DATABASE_URL });
48
+ * // or: createPostgresStorage({ client: new PGlite() })
49
+ * ```
50
+ */
51
+ function createPostgresStorage(options = {}) {
52
+ return _xtandard_kit_storage_postgres.createPostgresStorage({
53
+ subpath: "@xtandard/permissions/storage/postgres",
54
+ ...options,
55
+ table: options.table ?? DEFAULT_TABLE
56
+ });
57
+ }
58
+ //#endregion
59
+ exports.createPostgresStorage = createPostgresStorage;
60
+ exports.postgresStorageSchema = postgresStorageSchema;
61
+
62
+ //# sourceMappingURL=entry-storage-postgres.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entry-storage-postgres.cjs","names":["kit"],"sources":["../src/storage/postgres.ts"],"sourcesContent":["/**\n * Postgres storage adapter backed by a single key/value table\n * (`key text COLLATE \"C\" PRIMARY KEY, value jsonb`). It works with any client\n * exposing a `query(text, params?)` method that resolves to `{ rows }` — this\n * covers [`pg`](https://github.com/brianc/node-postgres) (`Pool`/`Client`) and\n * the in-process [`@electric-sql/pglite`](https://github.com/electric-sql/pglite)\n * alike. You can pass a pre-built `client`, or a `connectionString`/`url` to\n * lazily create a `pg` `Pool` on first use.\n *\n * The table is created on demand (`CREATE TABLE IF NOT EXISTS`) the first time\n * any operation runs, guarded by a single promise so concurrent callers only\n * issue the DDL once. The key column uses the `\"C\"` collation so ordering and\n * `LIKE` prefixes are bytewise (case-sensitive) whatever the database default.\n * Values are stored as `jsonb`; both `pg` and `pglite` return `jsonb` already\n * parsed to JS, but a string is JSON-parsed defensively so either driver works.\n *\n * `compareAndSwap` is a single statement — `UPDATE … WHERE key = $1 AND value =\n * $2::jsonb` (jsonb equality is structural) or `INSERT … ON CONFLICT DO\n * NOTHING` when absence is expected — so it is atomic across connections.\n *\n * The driver is `@xtandard/kit/storage/postgres`.\n *\n * @module\n */\n\nimport * as kit from \"@xtandard/kit/storage/postgres\";\n\nexport type { ClosableSqlClient, SqlClient } from \"@xtandard/kit/storage/postgres\";\n\n/** Options for {@link createPostgresStorage}. `table` defaults to `\"xtandard_permissions_kv\"`. */\nexport type PostgresStorageOptions = kit.PostgresStorageOptions;\n\n/** A compare-and-swap capable storage backed by Postgres, plus `close()`. */\nexport type PostgresPermissionsStorage = kit.PostgresKvStorage;\n\n/** The persisted default table name. */\nconst DEFAULT_TABLE = \"xtandard_permissions_kv\";\n\n/**\n * The DDL {@link createPostgresStorage} runs on first use — for migrations when\n * the runtime role may not create tables.\n */\nexport function postgresStorageSchema(table = DEFAULT_TABLE): string {\n return kit.postgresStorageSchema(table);\n}\n\n/**\n * Create a Postgres-backed {@link PostgresPermissionsStorage}. Connection and\n * table creation are lazy.\n *\n * @example\n * ```ts\n * import { createPostgresStorage } from \"@xtandard/permissions/storage/postgres\";\n *\n * const storage = createPostgresStorage({ connectionString: process.env.DATABASE_URL });\n * // or: createPostgresStorage({ client: new PGlite() })\n * ```\n */\nexport function createPostgresStorage(\n options: PostgresStorageOptions = {},\n): PostgresPermissionsStorage {\n return kit.createPostgresStorage({\n subpath: \"@xtandard/permissions/storage/postgres\",\n ...options,\n table: options.table ?? DEFAULT_TABLE,\n });\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCA,MAAM,gBAAgB;;;;;AAMtB,SAAgB,sBAAsB,QAAQ,eAAuB;CACnE,OAAOA,+BAAI,sBAAsB,KAAK;AACxC;;;;;;;;;;;;;AAcA,SAAgB,sBACd,UAAkC,CAAC,GACP;CAC5B,OAAOA,+BAAI,sBAAsB;EAC/B,SAAS;EACT,GAAG;EACH,OAAO,QAAQ,SAAS;CAC1B,CAAC;AACH"}
@@ -0,0 +1,29 @@
1
+ import * as kit from "@xtandard/kit/storage/postgres";
2
+ import { ClosableSqlClient, SqlClient } from "@xtandard/kit/storage/postgres";
3
+
4
+ //#region src/storage/postgres.d.ts
5
+ /** Options for {@link createPostgresStorage}. `table` defaults to `"xtandard_permissions_kv"`. */
6
+ type PostgresStorageOptions = kit.PostgresStorageOptions;
7
+ /** A compare-and-swap capable storage backed by Postgres, plus `close()`. */
8
+ type PostgresPermissionsStorage = kit.PostgresKvStorage;
9
+ /**
10
+ * The DDL {@link createPostgresStorage} runs on first use — for migrations when
11
+ * the runtime role may not create tables.
12
+ */
13
+ declare function postgresStorageSchema(table?: string): string;
14
+ /**
15
+ * Create a Postgres-backed {@link PostgresPermissionsStorage}. Connection and
16
+ * table creation are lazy.
17
+ *
18
+ * @example
19
+ * ```ts
20
+ * import { createPostgresStorage } from "@xtandard/permissions/storage/postgres";
21
+ *
22
+ * const storage = createPostgresStorage({ connectionString: process.env.DATABASE_URL });
23
+ * // or: createPostgresStorage({ client: new PGlite() })
24
+ * ```
25
+ */
26
+ declare function createPostgresStorage(options?: PostgresStorageOptions): PostgresPermissionsStorage;
27
+ //#endregion
28
+ export { type ClosableSqlClient, type PostgresPermissionsStorage, type PostgresStorageOptions, type SqlClient, createPostgresStorage, postgresStorageSchema };
29
+ //# sourceMappingURL=entry-storage-postgres.d.cts.map
@@ -0,0 +1,29 @@
1
+ import * as kit from "@xtandard/kit/storage/postgres";
2
+ import { ClosableSqlClient, SqlClient } from "@xtandard/kit/storage/postgres";
3
+
4
+ //#region src/storage/postgres.d.ts
5
+ /** Options for {@link createPostgresStorage}. `table` defaults to `"xtandard_permissions_kv"`. */
6
+ type PostgresStorageOptions = kit.PostgresStorageOptions;
7
+ /** A compare-and-swap capable storage backed by Postgres, plus `close()`. */
8
+ type PostgresPermissionsStorage = kit.PostgresKvStorage;
9
+ /**
10
+ * The DDL {@link createPostgresStorage} runs on first use — for migrations when
11
+ * the runtime role may not create tables.
12
+ */
13
+ declare function postgresStorageSchema(table?: string): string;
14
+ /**
15
+ * Create a Postgres-backed {@link PostgresPermissionsStorage}. Connection and
16
+ * table creation are lazy.
17
+ *
18
+ * @example
19
+ * ```ts
20
+ * import { createPostgresStorage } from "@xtandard/permissions/storage/postgres";
21
+ *
22
+ * const storage = createPostgresStorage({ connectionString: process.env.DATABASE_URL });
23
+ * // or: createPostgresStorage({ client: new PGlite() })
24
+ * ```
25
+ */
26
+ declare function createPostgresStorage(options?: PostgresStorageOptions): PostgresPermissionsStorage;
27
+ //#endregion
28
+ export { type ClosableSqlClient, type PostgresPermissionsStorage, type PostgresStorageOptions, type SqlClient, createPostgresStorage, postgresStorageSchema };
29
+ //# sourceMappingURL=entry-storage-postgres.d.mts.map
@@ -0,0 +1,58 @@
1
+ import * as kit from "@xtandard/kit/storage/postgres";
2
+ //#region src/storage/postgres.ts
3
+ /**
4
+ * Postgres storage adapter backed by a single key/value table
5
+ * (`key text COLLATE "C" PRIMARY KEY, value jsonb`). It works with any client
6
+ * exposing a `query(text, params?)` method that resolves to `{ rows }` — this
7
+ * covers [`pg`](https://github.com/brianc/node-postgres) (`Pool`/`Client`) and
8
+ * the in-process [`@electric-sql/pglite`](https://github.com/electric-sql/pglite)
9
+ * alike. You can pass a pre-built `client`, or a `connectionString`/`url` to
10
+ * lazily create a `pg` `Pool` on first use.
11
+ *
12
+ * The table is created on demand (`CREATE TABLE IF NOT EXISTS`) the first time
13
+ * any operation runs, guarded by a single promise so concurrent callers only
14
+ * issue the DDL once. The key column uses the `"C"` collation so ordering and
15
+ * `LIKE` prefixes are bytewise (case-sensitive) whatever the database default.
16
+ * Values are stored as `jsonb`; both `pg` and `pglite` return `jsonb` already
17
+ * parsed to JS, but a string is JSON-parsed defensively so either driver works.
18
+ *
19
+ * `compareAndSwap` is a single statement — `UPDATE … WHERE key = $1 AND value =
20
+ * $2::jsonb` (jsonb equality is structural) or `INSERT … ON CONFLICT DO
21
+ * NOTHING` when absence is expected — so it is atomic across connections.
22
+ *
23
+ * The driver is `@xtandard/kit/storage/postgres`.
24
+ *
25
+ * @module
26
+ */
27
+ /** The persisted default table name. */
28
+ const DEFAULT_TABLE = "xtandard_permissions_kv";
29
+ /**
30
+ * The DDL {@link createPostgresStorage} runs on first use — for migrations when
31
+ * the runtime role may not create tables.
32
+ */
33
+ function postgresStorageSchema(table = DEFAULT_TABLE) {
34
+ return kit.postgresStorageSchema(table);
35
+ }
36
+ /**
37
+ * Create a Postgres-backed {@link PostgresPermissionsStorage}. Connection and
38
+ * table creation are lazy.
39
+ *
40
+ * @example
41
+ * ```ts
42
+ * import { createPostgresStorage } from "@xtandard/permissions/storage/postgres";
43
+ *
44
+ * const storage = createPostgresStorage({ connectionString: process.env.DATABASE_URL });
45
+ * // or: createPostgresStorage({ client: new PGlite() })
46
+ * ```
47
+ */
48
+ function createPostgresStorage(options = {}) {
49
+ return kit.createPostgresStorage({
50
+ subpath: "@xtandard/permissions/storage/postgres",
51
+ ...options,
52
+ table: options.table ?? DEFAULT_TABLE
53
+ });
54
+ }
55
+ //#endregion
56
+ export { createPostgresStorage, postgresStorageSchema };
57
+
58
+ //# sourceMappingURL=entry-storage-postgres.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entry-storage-postgres.mjs","names":[],"sources":["../src/storage/postgres.ts"],"sourcesContent":["/**\n * Postgres storage adapter backed by a single key/value table\n * (`key text COLLATE \"C\" PRIMARY KEY, value jsonb`). It works with any client\n * exposing a `query(text, params?)` method that resolves to `{ rows }` — this\n * covers [`pg`](https://github.com/brianc/node-postgres) (`Pool`/`Client`) and\n * the in-process [`@electric-sql/pglite`](https://github.com/electric-sql/pglite)\n * alike. You can pass a pre-built `client`, or a `connectionString`/`url` to\n * lazily create a `pg` `Pool` on first use.\n *\n * The table is created on demand (`CREATE TABLE IF NOT EXISTS`) the first time\n * any operation runs, guarded by a single promise so concurrent callers only\n * issue the DDL once. The key column uses the `\"C\"` collation so ordering and\n * `LIKE` prefixes are bytewise (case-sensitive) whatever the database default.\n * Values are stored as `jsonb`; both `pg` and `pglite` return `jsonb` already\n * parsed to JS, but a string is JSON-parsed defensively so either driver works.\n *\n * `compareAndSwap` is a single statement — `UPDATE … WHERE key = $1 AND value =\n * $2::jsonb` (jsonb equality is structural) or `INSERT … ON CONFLICT DO\n * NOTHING` when absence is expected — so it is atomic across connections.\n *\n * The driver is `@xtandard/kit/storage/postgres`.\n *\n * @module\n */\n\nimport * as kit from \"@xtandard/kit/storage/postgres\";\n\nexport type { ClosableSqlClient, SqlClient } from \"@xtandard/kit/storage/postgres\";\n\n/** Options for {@link createPostgresStorage}. `table` defaults to `\"xtandard_permissions_kv\"`. */\nexport type PostgresStorageOptions = kit.PostgresStorageOptions;\n\n/** A compare-and-swap capable storage backed by Postgres, plus `close()`. */\nexport type PostgresPermissionsStorage = kit.PostgresKvStorage;\n\n/** The persisted default table name. */\nconst DEFAULT_TABLE = \"xtandard_permissions_kv\";\n\n/**\n * The DDL {@link createPostgresStorage} runs on first use — for migrations when\n * the runtime role may not create tables.\n */\nexport function postgresStorageSchema(table = DEFAULT_TABLE): string {\n return kit.postgresStorageSchema(table);\n}\n\n/**\n * Create a Postgres-backed {@link PostgresPermissionsStorage}. Connection and\n * table creation are lazy.\n *\n * @example\n * ```ts\n * import { createPostgresStorage } from \"@xtandard/permissions/storage/postgres\";\n *\n * const storage = createPostgresStorage({ connectionString: process.env.DATABASE_URL });\n * // or: createPostgresStorage({ client: new PGlite() })\n * ```\n */\nexport function createPostgresStorage(\n options: PostgresStorageOptions = {},\n): PostgresPermissionsStorage {\n return kit.createPostgresStorage({\n subpath: \"@xtandard/permissions/storage/postgres\",\n ...options,\n table: options.table ?? DEFAULT_TABLE,\n });\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCA,MAAM,gBAAgB;;;;;AAMtB,SAAgB,sBAAsB,QAAQ,eAAuB;CACnE,OAAO,IAAI,sBAAsB,KAAK;AACxC;;;;;;;;;;;;;AAcA,SAAgB,sBACd,UAAkC,CAAC,GACP;CAC5B,OAAO,IAAI,sBAAsB;EAC/B,SAAS;EACT,GAAG;EACH,OAAO,QAAQ,SAAS;CAC1B,CAAC;AACH"}
@@ -0,0 +1,76 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_chunk = require("./chunk-DakpK96I.cjs");
3
+ let _xtandard_kit_storage_redis = require("@xtandard/kit/storage/redis");
4
+ _xtandard_kit_storage_redis = require_chunk.__toESM(_xtandard_kit_storage_redis, 1);
5
+ //#region src/storage/redis.ts
6
+ /**
7
+ * Redis storage adapters built on the [`redis`](https://github.com/redis/node-redis)
8
+ * package (node-redis v4/v5), an optional peer dependency. You can either pass a
9
+ * pre-connected `client` or a `url` to connect lazily on first use. An optional
10
+ * `prefix` is prepended (with a `:` separator) to every key so multiple
11
+ * deployments can share a Redis instance without collisions; the prefix is
12
+ * stripped from keys returned by {@link RedisPermissionsStorage.getKeys}.
13
+ *
14
+ * Two variants over the same plumbing, differing only in the value encoding:
15
+ *
16
+ * - {@link createRedisStorage} — values are plain **strings** containing JSON
17
+ * (`SET`/`GET`). Works on any Redis; the default choice.
18
+ * - {@link createRedisJSONStorage} — values are native **RedisJSON** documents
19
+ * (`JSON.SET`/`JSON.GET`), so the stored data is queryable with JSONPath and
20
+ * indexable with RediSearch. Requires the JSON module (Redis 8 / Redis Stack).
21
+ * Do NOT point both variants at the same keys — the types are incompatible
22
+ * (`WRONGTYPE`).
23
+ *
24
+ * `getKeys` uses a non-blocking `SCAN` cursor (never the blocking `KEYS`
25
+ * command) with the prefix glob-escaped, so `*`, `?`, `[` and `\` in a prefix
26
+ * match literally. `watch` is implemented with Redis keyspace notifications; it
27
+ * requires the server to be configured with `notify-keyspace-events` covering
28
+ * generic + string + expiry events (e.g. `KEA` — whose `A` class also covers the
29
+ * module events that RedisJSON writes emit, e.g. `json.set`).
30
+ *
31
+ * ## Compare-and-swap
32
+ *
33
+ * Both variants implement `compareAndSwap` with a small Lua script: it decodes
34
+ * the stored value and the expectation with `cjson`, compares them
35
+ * structurally (object key order is irrelevant) and writes `next` only on a
36
+ * match — one atomic server-side step, safe across any number of instances.
37
+ * The engine uses it for insert-if-absent grant writes.
38
+ *
39
+ * The driver is `@xtandard/kit/storage/redis`.
40
+ *
41
+ * @module
42
+ */
43
+ const SUBPATH = "@xtandard/permissions/storage/redis";
44
+ /**
45
+ * Create a Redis storage that stores values as JSON **strings**. Works on any
46
+ * Redis. Connection is lazy (first operation).
47
+ *
48
+ * @example
49
+ * ```ts
50
+ * import { createRedisStorage } from "@xtandard/permissions/storage/redis";
51
+ *
52
+ * const storage = createRedisStorage({ url: process.env.REDIS_URL, prefix: "permissions" });
53
+ * ```
54
+ */
55
+ function createRedisStorage(options) {
56
+ return _xtandard_kit_storage_redis.createRedisStorage({
57
+ subpath: SUBPATH,
58
+ ...options
59
+ });
60
+ }
61
+ /**
62
+ * Create a Redis storage that stores values as native **RedisJSON** documents.
63
+ * Needs Redis 8+ or Redis Stack. Never point it at keys written by
64
+ * {@link createRedisStorage}.
65
+ */
66
+ function createRedisJSONStorage(options) {
67
+ return _xtandard_kit_storage_redis.createRedisJSONStorage({
68
+ subpath: SUBPATH,
69
+ ...options
70
+ });
71
+ }
72
+ //#endregion
73
+ exports.createRedisJSONStorage = createRedisJSONStorage;
74
+ exports.createRedisStorage = createRedisStorage;
75
+
76
+ //# sourceMappingURL=entry-storage-redis.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entry-storage-redis.cjs","names":["kit"],"sources":["../src/storage/redis.ts"],"sourcesContent":["/**\n * Redis storage adapters built on the [`redis`](https://github.com/redis/node-redis)\n * package (node-redis v4/v5), an optional peer dependency. You can either pass a\n * pre-connected `client` or a `url` to connect lazily on first use. An optional\n * `prefix` is prepended (with a `:` separator) to every key so multiple\n * deployments can share a Redis instance without collisions; the prefix is\n * stripped from keys returned by {@link RedisPermissionsStorage.getKeys}.\n *\n * Two variants over the same plumbing, differing only in the value encoding:\n *\n * - {@link createRedisStorage} — values are plain **strings** containing JSON\n * (`SET`/`GET`). Works on any Redis; the default choice.\n * - {@link createRedisJSONStorage} — values are native **RedisJSON** documents\n * (`JSON.SET`/`JSON.GET`), so the stored data is queryable with JSONPath and\n * indexable with RediSearch. Requires the JSON module (Redis 8 / Redis Stack).\n * Do NOT point both variants at the same keys — the types are incompatible\n * (`WRONGTYPE`).\n *\n * `getKeys` uses a non-blocking `SCAN` cursor (never the blocking `KEYS`\n * command) with the prefix glob-escaped, so `*`, `?`, `[` and `\\` in a prefix\n * match literally. `watch` is implemented with Redis keyspace notifications; it\n * requires the server to be configured with `notify-keyspace-events` covering\n * generic + string + expiry events (e.g. `KEA` — whose `A` class also covers the\n * module events that RedisJSON writes emit, e.g. `json.set`).\n *\n * ## Compare-and-swap\n *\n * Both variants implement `compareAndSwap` with a small Lua script: it decodes\n * the stored value and the expectation with `cjson`, compares them\n * structurally (object key order is irrelevant) and writes `next` only on a\n * match — one atomic server-side step, safe across any number of instances.\n * The engine uses it for insert-if-absent grant writes.\n *\n * The driver is `@xtandard/kit/storage/redis`.\n *\n * @module\n */\n\nimport * as kit from \"@xtandard/kit/storage/redis\";\n\nexport type { RedisLike } from \"@xtandard/kit/storage/redis\";\n\n/** Options for {@link createRedisStorage} and {@link createRedisJSONStorage}. */\nexport type RedisStorageOptions = kit.RedisStorageOptions;\n\n/** A watchable, compare-and-swap capable storage backed by Redis, plus `close()`. */\nexport type RedisPermissionsStorage = kit.RedisKvStorage;\n\nconst SUBPATH = \"@xtandard/permissions/storage/redis\";\n\n/**\n * Create a Redis storage that stores values as JSON **strings**. Works on any\n * Redis. Connection is lazy (first operation).\n *\n * @example\n * ```ts\n * import { createRedisStorage } from \"@xtandard/permissions/storage/redis\";\n *\n * const storage = createRedisStorage({ url: process.env.REDIS_URL, prefix: \"permissions\" });\n * ```\n */\nexport function createRedisStorage(options: RedisStorageOptions): RedisPermissionsStorage {\n return kit.createRedisStorage({ subpath: SUBPATH, ...options });\n}\n\n/**\n * Create a Redis storage that stores values as native **RedisJSON** documents.\n * Needs Redis 8+ or Redis Stack. Never point it at keys written by\n * {@link createRedisStorage}.\n */\nexport function createRedisJSONStorage(options: RedisStorageOptions): RedisPermissionsStorage {\n return kit.createRedisJSONStorage({ subpath: SUBPATH, ...options });\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgDA,MAAM,UAAU;;;;;;;;;;;;AAahB,SAAgB,mBAAmB,SAAuD;CACxF,OAAOA,4BAAI,mBAAmB;EAAE,SAAS;EAAS,GAAG;CAAQ,CAAC;AAChE;;;;;;AAOA,SAAgB,uBAAuB,SAAuD;CAC5F,OAAOA,4BAAI,uBAAuB;EAAE,SAAS;EAAS,GAAG;CAAQ,CAAC;AACpE"}
@@ -0,0 +1,29 @@
1
+ import * as kit from "@xtandard/kit/storage/redis";
2
+ import { RedisLike } from "@xtandard/kit/storage/redis";
3
+
4
+ //#region src/storage/redis.d.ts
5
+ /** Options for {@link createRedisStorage} and {@link createRedisJSONStorage}. */
6
+ type RedisStorageOptions = kit.RedisStorageOptions;
7
+ /** A watchable, compare-and-swap capable storage backed by Redis, plus `close()`. */
8
+ type RedisPermissionsStorage = kit.RedisKvStorage;
9
+ /**
10
+ * Create a Redis storage that stores values as JSON **strings**. Works on any
11
+ * Redis. Connection is lazy (first operation).
12
+ *
13
+ * @example
14
+ * ```ts
15
+ * import { createRedisStorage } from "@xtandard/permissions/storage/redis";
16
+ *
17
+ * const storage = createRedisStorage({ url: process.env.REDIS_URL, prefix: "permissions" });
18
+ * ```
19
+ */
20
+ declare function createRedisStorage(options: RedisStorageOptions): RedisPermissionsStorage;
21
+ /**
22
+ * Create a Redis storage that stores values as native **RedisJSON** documents.
23
+ * Needs Redis 8+ or Redis Stack. Never point it at keys written by
24
+ * {@link createRedisStorage}.
25
+ */
26
+ declare function createRedisJSONStorage(options: RedisStorageOptions): RedisPermissionsStorage;
27
+ //#endregion
28
+ export { type RedisLike, type RedisPermissionsStorage, type RedisStorageOptions, createRedisJSONStorage, createRedisStorage };
29
+ //# sourceMappingURL=entry-storage-redis.d.cts.map
@@ -0,0 +1,29 @@
1
+ import * as kit from "@xtandard/kit/storage/redis";
2
+ import { RedisLike } from "@xtandard/kit/storage/redis";
3
+
4
+ //#region src/storage/redis.d.ts
5
+ /** Options for {@link createRedisStorage} and {@link createRedisJSONStorage}. */
6
+ type RedisStorageOptions = kit.RedisStorageOptions;
7
+ /** A watchable, compare-and-swap capable storage backed by Redis, plus `close()`. */
8
+ type RedisPermissionsStorage = kit.RedisKvStorage;
9
+ /**
10
+ * Create a Redis storage that stores values as JSON **strings**. Works on any
11
+ * Redis. Connection is lazy (first operation).
12
+ *
13
+ * @example
14
+ * ```ts
15
+ * import { createRedisStorage } from "@xtandard/permissions/storage/redis";
16
+ *
17
+ * const storage = createRedisStorage({ url: process.env.REDIS_URL, prefix: "permissions" });
18
+ * ```
19
+ */
20
+ declare function createRedisStorage(options: RedisStorageOptions): RedisPermissionsStorage;
21
+ /**
22
+ * Create a Redis storage that stores values as native **RedisJSON** documents.
23
+ * Needs Redis 8+ or Redis Stack. Never point it at keys written by
24
+ * {@link createRedisStorage}.
25
+ */
26
+ declare function createRedisJSONStorage(options: RedisStorageOptions): RedisPermissionsStorage;
27
+ //#endregion
28
+ export { type RedisLike, type RedisPermissionsStorage, type RedisStorageOptions, createRedisJSONStorage, createRedisStorage };
29
+ //# sourceMappingURL=entry-storage-redis.d.mts.map
@@ -0,0 +1,72 @@
1
+ import * as kit from "@xtandard/kit/storage/redis";
2
+ //#region src/storage/redis.ts
3
+ /**
4
+ * Redis storage adapters built on the [`redis`](https://github.com/redis/node-redis)
5
+ * package (node-redis v4/v5), an optional peer dependency. You can either pass a
6
+ * pre-connected `client` or a `url` to connect lazily on first use. An optional
7
+ * `prefix` is prepended (with a `:` separator) to every key so multiple
8
+ * deployments can share a Redis instance without collisions; the prefix is
9
+ * stripped from keys returned by {@link RedisPermissionsStorage.getKeys}.
10
+ *
11
+ * Two variants over the same plumbing, differing only in the value encoding:
12
+ *
13
+ * - {@link createRedisStorage} — values are plain **strings** containing JSON
14
+ * (`SET`/`GET`). Works on any Redis; the default choice.
15
+ * - {@link createRedisJSONStorage} — values are native **RedisJSON** documents
16
+ * (`JSON.SET`/`JSON.GET`), so the stored data is queryable with JSONPath and
17
+ * indexable with RediSearch. Requires the JSON module (Redis 8 / Redis Stack).
18
+ * Do NOT point both variants at the same keys — the types are incompatible
19
+ * (`WRONGTYPE`).
20
+ *
21
+ * `getKeys` uses a non-blocking `SCAN` cursor (never the blocking `KEYS`
22
+ * command) with the prefix glob-escaped, so `*`, `?`, `[` and `\` in a prefix
23
+ * match literally. `watch` is implemented with Redis keyspace notifications; it
24
+ * requires the server to be configured with `notify-keyspace-events` covering
25
+ * generic + string + expiry events (e.g. `KEA` — whose `A` class also covers the
26
+ * module events that RedisJSON writes emit, e.g. `json.set`).
27
+ *
28
+ * ## Compare-and-swap
29
+ *
30
+ * Both variants implement `compareAndSwap` with a small Lua script: it decodes
31
+ * the stored value and the expectation with `cjson`, compares them
32
+ * structurally (object key order is irrelevant) and writes `next` only on a
33
+ * match — one atomic server-side step, safe across any number of instances.
34
+ * The engine uses it for insert-if-absent grant writes.
35
+ *
36
+ * The driver is `@xtandard/kit/storage/redis`.
37
+ *
38
+ * @module
39
+ */
40
+ const SUBPATH = "@xtandard/permissions/storage/redis";
41
+ /**
42
+ * Create a Redis storage that stores values as JSON **strings**. Works on any
43
+ * Redis. Connection is lazy (first operation).
44
+ *
45
+ * @example
46
+ * ```ts
47
+ * import { createRedisStorage } from "@xtandard/permissions/storage/redis";
48
+ *
49
+ * const storage = createRedisStorage({ url: process.env.REDIS_URL, prefix: "permissions" });
50
+ * ```
51
+ */
52
+ function createRedisStorage(options) {
53
+ return kit.createRedisStorage({
54
+ subpath: SUBPATH,
55
+ ...options
56
+ });
57
+ }
58
+ /**
59
+ * Create a Redis storage that stores values as native **RedisJSON** documents.
60
+ * Needs Redis 8+ or Redis Stack. Never point it at keys written by
61
+ * {@link createRedisStorage}.
62
+ */
63
+ function createRedisJSONStorage(options) {
64
+ return kit.createRedisJSONStorage({
65
+ subpath: SUBPATH,
66
+ ...options
67
+ });
68
+ }
69
+ //#endregion
70
+ export { createRedisJSONStorage, createRedisStorage };
71
+
72
+ //# sourceMappingURL=entry-storage-redis.mjs.map