@classytic/arc 2.1.2 → 2.1.7

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 (263) hide show
  1. package/README.md +6 -5
  2. package/bin/arc.js +1 -0
  3. package/dist/{EventTransport-BD2U0BTc.d.mts → EventTransport-BkUDYZEb.d.mts} +1 -2
  4. package/dist/HookSystem-BsGV-j2l.mjs +1 -2
  5. package/dist/{ResourceRegistry-DsN4KJjV.mjs → ResourceRegistry-7Ic20ZMw.mjs} +1 -2
  6. package/dist/adapters/index.d.mts +4 -4
  7. package/dist/audit/index.d.mts +5 -6
  8. package/dist/audit/index.mjs +2 -3
  9. package/dist/audit/mongodb.d.mts +4 -4
  10. package/dist/audit/mongodb.mjs +1 -1
  11. package/dist/{audited-C3T5DTUx.mjs → audited-CGdLiSlE.mjs} +1 -2
  12. package/dist/auth/index.d.mts +6 -7
  13. package/dist/auth/index.mjs +10 -16
  14. package/dist/auth/redis-session.d.mts +2 -3
  15. package/dist/auth/redis-session.mjs +1 -2
  16. package/dist/{betterAuthOpenApi-BrHKeSAx.mjs → betterAuthOpenApi-DjWDddNc.mjs} +2 -3
  17. package/dist/cache/index.d.mts +3 -4
  18. package/dist/cache/index.mjs +4 -5
  19. package/dist/{caching-Bl28lYsR.mjs → caching-GSDJcA6-.mjs} +1 -2
  20. package/dist/{circuitBreaker-DeY4FCjs.mjs → circuitBreaker-DYhWBW_D.mjs} +1 -2
  21. package/dist/cli/commands/describe.d.mts +1 -2
  22. package/dist/cli/commands/describe.mjs +1 -2
  23. package/dist/cli/commands/docs.d.mts +1 -2
  24. package/dist/cli/commands/docs.mjs +3 -4
  25. package/dist/cli/commands/generate.d.mts +6 -2
  26. package/dist/cli/commands/generate.mjs +89 -58
  27. package/dist/cli/commands/init.d.mts +1 -2
  28. package/dist/cli/commands/init.mjs +15 -19
  29. package/dist/cli/commands/introspect.d.mts +1 -2
  30. package/dist/cli/commands/introspect.mjs +2 -3
  31. package/dist/cli/index.d.mts +1 -2
  32. package/dist/cli/index.mjs +1 -2
  33. package/dist/constants-DdXFXQtN.mjs +1 -2
  34. package/dist/core/index.d.mts +4 -4
  35. package/dist/core/index.mjs +1 -1
  36. package/dist/{createApp-CUgNqegw.mjs → createApp-D2D5XXaV.mjs} +9 -10
  37. package/dist/{defineResource-k0_BDn8v.mjs → defineResource-DZVbwsFb.mjs} +17 -39
  38. package/dist/discovery/index.d.mts +1 -2
  39. package/dist/discovery/index.mjs +1 -2
  40. package/dist/docs/index.d.mts +5 -6
  41. package/dist/docs/index.mjs +5 -4
  42. package/dist/{elevation-B_2dRLVP.d.mts → elevation-DGo5shaX.d.mts} +1 -2
  43. package/dist/{elevation-BRy3yFWT.mjs → elevation-DSTbVvYj.mjs} +4 -4
  44. package/dist/{errorHandler-C1okiriz.mjs → errorHandler-C3GY3_ow.mjs} +2 -3
  45. package/dist/{errorHandler-BbcgBmIH.d.mts → errorHandler-CW3OOeYq.d.mts} +2 -3
  46. package/dist/{errors-ChKiFz62.d.mts → errors-DAWRdiYP.d.mts} +1 -2
  47. package/dist/{errors-B9bZok84.mjs → errors-DBANPbGr.mjs} +1 -2
  48. package/dist/{eventPlugin-DGR_B2on.mjs → eventPlugin-BEOvaDqo.mjs} +2 -3
  49. package/dist/{eventPlugin-CTrLH3mt.d.mts → eventPlugin-H6wDDjGO.d.mts} +2 -3
  50. package/dist/events/index.d.mts +4 -5
  51. package/dist/events/index.mjs +2 -3
  52. package/dist/events/transports/redis-stream-entry.d.mts +1 -1
  53. package/dist/events/transports/redis-stream-entry.mjs +1 -2
  54. package/dist/events/transports/redis.d.mts +2 -3
  55. package/dist/events/transports/redis.mjs +1 -2
  56. package/dist/{externalPaths-DlINfKbP.d.mts → externalPaths-SyPF2tgK.d.mts} +1 -2
  57. package/dist/factory/index.d.mts +8 -9
  58. package/dist/factory/index.mjs +1 -1
  59. package/dist/{fastifyAdapter-BkrGrlFi.d.mts → fastifyAdapter-sGkvUvf5.d.mts} +4 -5
  60. package/dist/{fields-DyaDVX4J.d.mts → fields-Bi_AVKSo.d.mts} +2 -3
  61. package/dist/{fields-iagOozy0.mjs → fields-CTd_CrKr.mjs} +2 -3
  62. package/dist/hooks/index.d.mts +3 -3
  63. package/dist/idempotency/index.d.mts +4 -5
  64. package/dist/idempotency/index.mjs +1 -2
  65. package/dist/idempotency/mongodb.d.mts +1 -1
  66. package/dist/idempotency/mongodb.mjs +1 -2
  67. package/dist/idempotency/redis.d.mts +1 -1
  68. package/dist/idempotency/redis.mjs +1 -2
  69. package/dist/index.d.mts +9 -10
  70. package/dist/index.mjs +7 -8
  71. package/dist/integrations/event-gateway.d.mts +2 -3
  72. package/dist/integrations/event-gateway.mjs +2 -3
  73. package/dist/integrations/jobs.d.mts +1 -2
  74. package/dist/integrations/jobs.mjs +1 -2
  75. package/dist/integrations/streamline.d.mts +1 -2
  76. package/dist/integrations/streamline.mjs +1 -2
  77. package/dist/integrations/websocket.d.mts +1 -2
  78. package/dist/integrations/websocket.mjs +1 -2
  79. package/dist/{interface-B01JvPVc.d.mts → interface-CSNjltAc.d.mts} +1 -2
  80. package/dist/{interface-Ch8HU9uM.d.mts → interface-Cb2klgid.d.mts} +10 -10
  81. package/dist/{interface-CZe8IkMf.d.mts → interface-DTbsvIWe.d.mts} +1 -2
  82. package/dist/{introspectionPlugin-rFdO8ZUa.mjs → introspectionPlugin-B3JkrjwU.mjs} +1 -2
  83. package/dist/{keys-BqNejWup.mjs → keys-DhqDRxv3.mjs} +1 -2
  84. package/dist/{logger-Df2O2WsW.mjs → logger-ByrvQWZO.mjs} +1 -2
  85. package/dist/{memory-cQgelFOj.mjs → memory-B2v7KrCB.mjs} +1 -2
  86. package/dist/migrations/index.d.mts +1 -2
  87. package/dist/migrations/index.mjs +1 -2
  88. package/dist/{mongodb-CGzRbfAK.d.mts → mongodb-ClykrfGo.d.mts} +2 -3
  89. package/dist/{mongodb-BfJVlUJH.mjs → mongodb-DNKEExbf.mjs} +1 -2
  90. package/dist/{mongodb-JN-9JA7K.d.mts → mongodb-Dg8O_gvd.d.mts} +2 -3
  91. package/dist/{openapi-G3Cw7XuM.mjs → openapi-9nB_kiuR.mjs} +5 -4
  92. package/dist/org/index.d.mts +4 -5
  93. package/dist/org/index.mjs +1 -2
  94. package/dist/org/types.d.mts +1 -2
  95. package/dist/permissions/index.d.mts +5 -6
  96. package/dist/permissions/index.mjs +7 -7
  97. package/dist/plugins/index.d.mts +7 -8
  98. package/dist/plugins/index.mjs +7 -8
  99. package/dist/plugins/response-cache.d.mts +1 -2
  100. package/dist/plugins/response-cache.mjs +2 -3
  101. package/dist/plugins/tracing-entry.d.mts +1 -1
  102. package/dist/plugins/tracing-entry.mjs +1 -2
  103. package/dist/{pluralize-CEweyOEm.mjs → pluralize-CM-jZg7p.mjs} +1 -2
  104. package/dist/policies/index.d.mts +4 -5
  105. package/dist/policies/index.mjs +1 -2
  106. package/dist/presets/index.d.mts +4 -5
  107. package/dist/presets/index.mjs +2 -3
  108. package/dist/presets/multiTenant.d.mts +4 -5
  109. package/dist/presets/multiTenant.mjs +1 -2
  110. package/dist/{presets-DzSMwlKj.d.mts → presets-BTeYbw7h.d.mts} +2 -3
  111. package/dist/{presets-BITljm96.mjs → presets-CeFtfDR8.mjs} +1 -2
  112. package/dist/prisma-DJbMt3yf.mjs +1 -2
  113. package/dist/{prisma-Dg9GoVdj.d.mts → prisma-DQBSSHAB.d.mts} +2 -3
  114. package/dist/{queryCachePlugin-DMBnp2Q0.mjs → queryCachePlugin-B6R0d4av.mjs} +4 -5
  115. package/dist/{queryCachePlugin-7THaI5mt.d.mts → queryCachePlugin-Q6SYuHZ6.d.mts} +2 -3
  116. package/dist/{redis-D-JAeLtm.d.mts → redis-UwjEp8Ea.d.mts} +2 -3
  117. package/dist/{redis-stream-Bdh_vUU8.d.mts → redis-stream-CBg0upHI.d.mts} +2 -3
  118. package/dist/registry/index.d.mts +4 -5
  119. package/dist/registry/index.mjs +2 -2
  120. package/dist/{requestContext-QQD6ROJc.mjs → requestContext-xi6OKBL-.mjs} +1 -2
  121. package/dist/{schemaConverter-BwrmWroW.mjs → schemaConverter-Dtg0Kt9T.mjs} +1 -2
  122. package/dist/schemas/index.d.mts +1 -2
  123. package/dist/schemas/index.mjs +1 -2
  124. package/dist/scope/index.d.mts +2 -3
  125. package/dist/scope/index.mjs +2 -3
  126. package/dist/{sessionManager-jPKLbHE0.d.mts → sessionManager-D_iEHjQl.d.mts} +1 -2
  127. package/dist/{sse-B3c3_yZp.mjs → sse-DkqQ1uxb.mjs} +2 -3
  128. package/dist/testing/index.d.mts +8 -9
  129. package/dist/testing/index.mjs +3 -4
  130. package/dist/{tracing-Cc7vVQPp.d.mts → tracing-8CEbhF0w.d.mts} +1 -2
  131. package/dist/{typeGuards-DhMNLuvU.mjs → typeGuards-DwxA1t_L.mjs} +1 -2
  132. package/dist/types/index.d.mts +7 -8
  133. package/dist/types/index.mjs +1 -2
  134. package/dist/{types-CIgB7UUl.d.mts → types-B0dhNrnd.d.mts} +9 -10
  135. package/dist/types-Beqn1Un7.mjs +1 -2
  136. package/dist/types-DelU6kln.mjs +25 -0
  137. package/dist/{types-aYB4V7uN.d.mts → types-RLkFVgaw.d.mts} +18 -4
  138. package/dist/utils/index.d.mts +5 -6
  139. package/dist/utils/index.mjs +4 -4
  140. package/package.json +1 -1
  141. package/dist/EventTransport-BD2U0BTc.d.mts.map +0 -1
  142. package/dist/HookSystem-BsGV-j2l.mjs.map +0 -1
  143. package/dist/ResourceRegistry-DsN4KJjV.mjs.map +0 -1
  144. package/dist/audit/index.d.mts.map +0 -1
  145. package/dist/audit/index.mjs.map +0 -1
  146. package/dist/audited-C3T5DTUx.mjs.map +0 -1
  147. package/dist/auth/index.d.mts.map +0 -1
  148. package/dist/auth/index.mjs.map +0 -1
  149. package/dist/auth/redis-session.d.mts.map +0 -1
  150. package/dist/auth/redis-session.mjs.map +0 -1
  151. package/dist/betterAuthOpenApi-BrHKeSAx.mjs.map +0 -1
  152. package/dist/cache/index.d.mts.map +0 -1
  153. package/dist/cache/index.mjs.map +0 -1
  154. package/dist/caching-Bl28lYsR.mjs.map +0 -1
  155. package/dist/circuitBreaker-DeY4FCjs.mjs.map +0 -1
  156. package/dist/cli/commands/describe.d.mts.map +0 -1
  157. package/dist/cli/commands/describe.mjs.map +0 -1
  158. package/dist/cli/commands/docs.d.mts.map +0 -1
  159. package/dist/cli/commands/docs.mjs.map +0 -1
  160. package/dist/cli/commands/generate.d.mts.map +0 -1
  161. package/dist/cli/commands/generate.mjs.map +0 -1
  162. package/dist/cli/commands/init.d.mts.map +0 -1
  163. package/dist/cli/commands/init.mjs.map +0 -1
  164. package/dist/cli/commands/introspect.d.mts.map +0 -1
  165. package/dist/cli/commands/introspect.mjs.map +0 -1
  166. package/dist/cli/index.d.mts.map +0 -1
  167. package/dist/cli/index.mjs.map +0 -1
  168. package/dist/constants-DdXFXQtN.mjs.map +0 -1
  169. package/dist/createApp-CUgNqegw.mjs.map +0 -1
  170. package/dist/defineResource-k0_BDn8v.mjs.map +0 -1
  171. package/dist/discovery/index.d.mts.map +0 -1
  172. package/dist/discovery/index.mjs.map +0 -1
  173. package/dist/docs/index.d.mts.map +0 -1
  174. package/dist/docs/index.mjs.map +0 -1
  175. package/dist/elevation-BRy3yFWT.mjs.map +0 -1
  176. package/dist/elevation-B_2dRLVP.d.mts.map +0 -1
  177. package/dist/errorHandler-BbcgBmIH.d.mts.map +0 -1
  178. package/dist/errorHandler-C1okiriz.mjs.map +0 -1
  179. package/dist/errors-B9bZok84.mjs.map +0 -1
  180. package/dist/errors-ChKiFz62.d.mts.map +0 -1
  181. package/dist/eventPlugin-CTrLH3mt.d.mts.map +0 -1
  182. package/dist/eventPlugin-DGR_B2on.mjs.map +0 -1
  183. package/dist/events/index.d.mts.map +0 -1
  184. package/dist/events/index.mjs.map +0 -1
  185. package/dist/events/transports/redis-stream-entry.mjs.map +0 -1
  186. package/dist/events/transports/redis.d.mts.map +0 -1
  187. package/dist/events/transports/redis.mjs.map +0 -1
  188. package/dist/externalPaths-DlINfKbP.d.mts.map +0 -1
  189. package/dist/factory/index.d.mts.map +0 -1
  190. package/dist/fastifyAdapter-BkrGrlFi.d.mts.map +0 -1
  191. package/dist/fields-DyaDVX4J.d.mts.map +0 -1
  192. package/dist/fields-iagOozy0.mjs.map +0 -1
  193. package/dist/idempotency/index.d.mts.map +0 -1
  194. package/dist/idempotency/index.mjs.map +0 -1
  195. package/dist/idempotency/mongodb.mjs.map +0 -1
  196. package/dist/idempotency/redis.mjs.map +0 -1
  197. package/dist/index.d.mts.map +0 -1
  198. package/dist/index.mjs.map +0 -1
  199. package/dist/integrations/event-gateway.d.mts.map +0 -1
  200. package/dist/integrations/event-gateway.mjs.map +0 -1
  201. package/dist/integrations/jobs.d.mts.map +0 -1
  202. package/dist/integrations/jobs.mjs.map +0 -1
  203. package/dist/integrations/streamline.d.mts.map +0 -1
  204. package/dist/integrations/streamline.mjs.map +0 -1
  205. package/dist/integrations/websocket.d.mts.map +0 -1
  206. package/dist/integrations/websocket.mjs.map +0 -1
  207. package/dist/interface-B01JvPVc.d.mts.map +0 -1
  208. package/dist/interface-CZe8IkMf.d.mts.map +0 -1
  209. package/dist/interface-Ch8HU9uM.d.mts.map +0 -1
  210. package/dist/introspectionPlugin-rFdO8ZUa.mjs.map +0 -1
  211. package/dist/keys-BqNejWup.mjs.map +0 -1
  212. package/dist/logger-Df2O2WsW.mjs.map +0 -1
  213. package/dist/memory-cQgelFOj.mjs.map +0 -1
  214. package/dist/migrations/index.d.mts.map +0 -1
  215. package/dist/migrations/index.mjs.map +0 -1
  216. package/dist/mongodb-BfJVlUJH.mjs.map +0 -1
  217. package/dist/mongodb-CGzRbfAK.d.mts.map +0 -1
  218. package/dist/mongodb-JN-9JA7K.d.mts.map +0 -1
  219. package/dist/openapi-G3Cw7XuM.mjs.map +0 -1
  220. package/dist/org/index.d.mts.map +0 -1
  221. package/dist/org/index.mjs.map +0 -1
  222. package/dist/org/types.d.mts.map +0 -1
  223. package/dist/permissions/index.d.mts.map +0 -1
  224. package/dist/permissions/index.mjs.map +0 -1
  225. package/dist/plugins/index.d.mts.map +0 -1
  226. package/dist/plugins/index.mjs.map +0 -1
  227. package/dist/plugins/response-cache.d.mts.map +0 -1
  228. package/dist/plugins/response-cache.mjs.map +0 -1
  229. package/dist/plugins/tracing-entry.mjs.map +0 -1
  230. package/dist/pluralize-CEweyOEm.mjs.map +0 -1
  231. package/dist/policies/index.d.mts.map +0 -1
  232. package/dist/policies/index.mjs.map +0 -1
  233. package/dist/presets/index.d.mts.map +0 -1
  234. package/dist/presets/index.mjs.map +0 -1
  235. package/dist/presets/multiTenant.d.mts.map +0 -1
  236. package/dist/presets/multiTenant.mjs.map +0 -1
  237. package/dist/presets-BITljm96.mjs.map +0 -1
  238. package/dist/presets-DzSMwlKj.d.mts.map +0 -1
  239. package/dist/prisma-DJbMt3yf.mjs.map +0 -1
  240. package/dist/prisma-Dg9GoVdj.d.mts.map +0 -1
  241. package/dist/queryCachePlugin-7THaI5mt.d.mts.map +0 -1
  242. package/dist/queryCachePlugin-DMBnp2Q0.mjs.map +0 -1
  243. package/dist/redis-D-JAeLtm.d.mts.map +0 -1
  244. package/dist/redis-stream-Bdh_vUU8.d.mts.map +0 -1
  245. package/dist/registry/index.d.mts.map +0 -1
  246. package/dist/requestContext-QQD6ROJc.mjs.map +0 -1
  247. package/dist/schemaConverter-BwrmWroW.mjs.map +0 -1
  248. package/dist/schemas/index.d.mts.map +0 -1
  249. package/dist/schemas/index.mjs.map +0 -1
  250. package/dist/scope/index.d.mts.map +0 -1
  251. package/dist/scope/index.mjs.map +0 -1
  252. package/dist/sessionManager-jPKLbHE0.d.mts.map +0 -1
  253. package/dist/sse-B3c3_yZp.mjs.map +0 -1
  254. package/dist/testing/index.d.mts.map +0 -1
  255. package/dist/testing/index.mjs.map +0 -1
  256. package/dist/tracing-Cc7vVQPp.d.mts.map +0 -1
  257. package/dist/typeGuards-DhMNLuvU.mjs.map +0 -1
  258. package/dist/types/index.d.mts.map +0 -1
  259. package/dist/types/index.mjs.map +0 -1
  260. package/dist/types-Beqn1Un7.mjs.map +0 -1
  261. package/dist/types-CIgB7UUl.d.mts.map +0 -1
  262. package/dist/types-aYB4V7uN.d.mts.map +0 -1
  263. package/dist/utils/index.d.mts.map +0 -1
package/README.md CHANGED
@@ -326,11 +326,12 @@ import { tracingPlugin } from '@classytic/arc/plugins/tracing';
326
326
  ## CLI
327
327
 
328
328
  ```bash
329
- arc init my-api --mongokit --better-auth --ts # Scaffold project
330
- arc generate resource product # Generate resource files
331
- arc docs ./openapi.json --entry ./dist/index.js # Export OpenAPI
332
- arc introspect --entry ./dist/index.js # Show resources
333
- arc doctor # Health check
329
+ npx @classytic/arc init my-api --mongokit --better-auth --ts # Scaffold project
330
+ npx @classytic/arc generate resource product # Generate resource files
331
+ npx @classytic/arc describe ./dist/index.js # Resource metadata (JSON)
332
+ npx @classytic/arc docs ./openapi.json --entry ./dist/index.js # Export OpenAPI
333
+ npx @classytic/arc introspect --entry ./dist/index.js # Show resources
334
+ npx @classytic/arc doctor # Health check
334
335
  ```
335
336
 
336
337
  ## Subpath Imports
package/bin/arc.js CHANGED
@@ -221,6 +221,7 @@ function parseInitOptions(rawArgs) {
221
221
  const opts = {
222
222
  name: undefined,
223
223
  adapter: undefined,
224
+ auth: undefined,
224
225
  tenant: undefined,
225
226
  typescript: undefined,
226
227
  edge: undefined,
@@ -96,5 +96,4 @@ declare class MemoryEventTransport implements EventTransport {
96
96
  */
97
97
  declare function createEvent<T>(type: string, payload: T, meta?: Partial<DomainEvent['meta']>): DomainEvent<T>;
98
98
  //#endregion
99
- export { MemoryEventTransport as a, EventTransport as i, EventHandler as n, MemoryEventTransportOptions as o, EventLogger as r, createEvent as s, DomainEvent as t };
100
- //# sourceMappingURL=EventTransport-BD2U0BTc.d.mts.map
99
+ export { MemoryEventTransport as a, EventTransport as i, EventHandler as n, MemoryEventTransportOptions as o, EventLogger as r, createEvent as s, DomainEvent as t };
@@ -401,5 +401,4 @@ function afterDelete(hooks, resource, handler, priority = 10) {
401
401
  }
402
402
 
403
403
  //#endregion
404
- export { beforeCreate as a, createHookSystem as c, afterUpdate as i, defineHook as l, afterCreate as n, beforeDelete as o, afterDelete as r, beforeUpdate as s, HookSystem as t };
405
- //# sourceMappingURL=HookSystem-BsGV-j2l.mjs.map
404
+ export { beforeCreate as a, createHookSystem as c, afterUpdate as i, defineHook as l, afterCreate as n, beforeDelete as o, afterDelete as r, beforeUpdate as s, HookSystem as t };
@@ -246,5 +246,4 @@ function extractPipelineSteps(pipe) {
246
246
  }
247
247
 
248
248
  //#endregion
249
- export { ResourceRegistry as t };
250
- //# sourceMappingURL=ResourceRegistry-DsN4KJjV.mjs.map
249
+ export { ResourceRegistry as t };
@@ -1,5 +1,5 @@
1
- import "../elevation-B_2dRLVP.mjs";
2
- import { a as RepositoryLike, i as RelationMetadata, n as DataAdapter, o as SchemaMetadata, r as FieldMetadata, s as ValidationResult, t as AdapterFactory } from "../interface-Ch8HU9uM.mjs";
3
- import "../types-aYB4V7uN.mjs";
4
- import { a as PrismaQueryParserOptions, c as MongooseAdapterOptions, i as PrismaQueryParser, l as createMongooseAdapter, n as PrismaAdapterOptions, o as createPrismaAdapter, r as PrismaQueryOptions, s as MongooseAdapter, t as PrismaAdapter } from "../prisma-Dg9GoVdj.mjs";
1
+ import "../elevation-DGo5shaX.mjs";
2
+ import { a as RepositoryLike, i as RelationMetadata, n as DataAdapter, o as SchemaMetadata, r as FieldMetadata, s as ValidationResult, t as AdapterFactory } from "../interface-Cb2klgid.mjs";
3
+ import "../types-RLkFVgaw.mjs";
4
+ import { a as PrismaQueryParserOptions, c as MongooseAdapterOptions, i as PrismaQueryParser, l as createMongooseAdapter, n as PrismaAdapterOptions, o as createPrismaAdapter, r as PrismaQueryOptions, s as MongooseAdapter, t as PrismaAdapter } from "../prisma-DQBSSHAB.mjs";
5
5
  export { type AdapterFactory, type DataAdapter, type FieldMetadata, MongooseAdapter, type MongooseAdapterOptions, PrismaAdapter, type PrismaAdapterOptions, type PrismaQueryOptions, PrismaQueryParser, type PrismaQueryParserOptions, type RelationMetadata, type RepositoryLike, type SchemaMetadata, type ValidationResult, createMongooseAdapter, createPrismaAdapter };
@@ -1,7 +1,7 @@
1
- import "../elevation-B_2dRLVP.mjs";
2
- import "../interface-Ch8HU9uM.mjs";
3
- import "../types-aYB4V7uN.mjs";
4
- import { a as AuditContext, c as AuditStore, i as AuditAction, l as AuditStoreOptions, n as MongoAuditStoreOptions, o as AuditEntry, r as MongoConnection, s as AuditQueryOptions, u as createAuditEntry } from "../mongodb-CGzRbfAK.mjs";
1
+ import "../elevation-DGo5shaX.mjs";
2
+ import "../interface-Cb2klgid.mjs";
3
+ import "../types-RLkFVgaw.mjs";
4
+ import { a as AuditContext, c as AuditStore, i as AuditAction, l as AuditStoreOptions, n as MongoAuditStoreOptions, o as AuditEntry, r as MongoConnection, s as AuditQueryOptions, u as createAuditEntry } from "../mongodb-ClykrfGo.mjs";
5
5
  import { FastifyPluginAsync } from "fastify";
6
6
 
7
7
  //#region src/audit/auditPlugin.d.ts
@@ -78,5 +78,4 @@ declare class MemoryAuditStore implements AuditStore {
78
78
  clear(): void;
79
79
  }
80
80
  //#endregion
81
- export { type AuditAction, type AuditContext, type AuditEntry, type AuditLogger, type AuditPluginOptions, type AuditQueryOptions, type AuditStore, type AuditStoreOptions, MemoryAuditStore, type MemoryAuditStoreOptions, type MongoAuditStoreOptions, _default as auditPlugin, auditPlugin as auditPluginFn, createAuditEntry };
82
- //# sourceMappingURL=index.d.mts.map
81
+ export { type AuditAction, type AuditContext, type AuditEntry, type AuditLogger, type AuditPluginOptions, type AuditQueryOptions, type AuditStore, type AuditStoreOptions, MemoryAuditStore, type MemoryAuditStoreOptions, type MongoAuditStoreOptions, _default as auditPlugin, auditPlugin as auditPluginFn, createAuditEntry };
@@ -1,4 +1,4 @@
1
- import { t as MongoAuditStore } from "../mongodb-BfJVlUJH.mjs";
1
+ import { t as MongoAuditStore } from "../mongodb-DNKEExbf.mjs";
2
2
  import fp from "fastify-plugin";
3
3
 
4
4
  //#region src/audit/stores/interface.ts
@@ -272,5 +272,4 @@ var auditPlugin_default = fp(auditPlugin, {
272
272
  });
273
273
 
274
274
  //#endregion
275
- export { MemoryAuditStore, auditPlugin_default as auditPlugin, auditPlugin as auditPluginFn, createAuditEntry };
276
- //# sourceMappingURL=index.mjs.map
275
+ export { MemoryAuditStore, auditPlugin_default as auditPlugin, auditPlugin as auditPluginFn, createAuditEntry };
@@ -1,5 +1,5 @@
1
- import "../elevation-B_2dRLVP.mjs";
2
- import "../interface-Ch8HU9uM.mjs";
3
- import "../types-aYB4V7uN.mjs";
4
- import { n as MongoAuditStoreOptions, t as MongoAuditStore } from "../mongodb-CGzRbfAK.mjs";
1
+ import "../elevation-DGo5shaX.mjs";
2
+ import "../interface-Cb2klgid.mjs";
3
+ import "../types-RLkFVgaw.mjs";
4
+ import { n as MongoAuditStoreOptions, t as MongoAuditStore } from "../mongodb-ClykrfGo.mjs";
5
5
  export { MongoAuditStore, type MongoAuditStoreOptions };
@@ -1,3 +1,3 @@
1
- import { t as MongoAuditStore } from "../mongodb-BfJVlUJH.mjs";
1
+ import { t as MongoAuditStore } from "../mongodb-DNKEExbf.mjs";
2
2
 
3
3
  export { MongoAuditStore };
@@ -137,5 +137,4 @@ function auditedPreset(options = {}) {
137
137
  }
138
138
 
139
139
  //#endregion
140
- export { softDeletePreset as a, slugLookupPreset as i, treePreset as n, ownedByUserPreset as r, auditedPreset as t };
141
- //# sourceMappingURL=audited-C3T5DTUx.mjs.map
140
+ export { softDeletePreset as a, slugLookupPreset as i, treePreset as n, ownedByUserPreset as r, auditedPreset as t };
@@ -1,9 +1,9 @@
1
- import "../elevation-B_2dRLVP.mjs";
2
- import "../interface-Ch8HU9uM.mjs";
3
- import { t as PermissionCheck } from "../types-aYB4V7uN.mjs";
1
+ import "../elevation-DGo5shaX.mjs";
2
+ import "../interface-Cb2klgid.mjs";
3
+ import { t as PermissionCheck } from "../types-RLkFVgaw.mjs";
4
4
  import { AuthHelpers, AuthPluginOptions } from "../types/index.mjs";
5
- import { t as ExternalOpenApiPaths } from "../externalPaths-DlINfKbP.mjs";
6
- import { a as SessionManagerOptions, c as createSessionManager, i as SessionData, n as MemorySessionStoreOptions, o as SessionManagerResult, r as SessionCookieOptions, s as SessionStore, t as MemorySessionStore } from "../sessionManager-jPKLbHE0.mjs";
5
+ import { t as ExternalOpenApiPaths } from "../externalPaths-SyPF2tgK.mjs";
6
+ import { a as SessionManagerOptions, c as createSessionManager, i as SessionData, n as MemorySessionStoreOptions, o as SessionManagerResult, r as SessionCookieOptions, s as SessionStore, t as MemorySessionStore } from "../sessionManager-D_iEHjQl.mjs";
7
7
  import { FastifyPluginAsync, FastifyReply as FastifyReply$1, FastifyRequest as FastifyRequest$1 } from "fastify";
8
8
 
9
9
  //#region src/auth/authPlugin.d.ts
@@ -185,5 +185,4 @@ interface BetterAuthOpenApiOptions {
185
185
  */
186
186
  declare function extractBetterAuthOpenApi(authApi: Record<string, unknown>, options?: BetterAuthOpenApiOptions): ExternalOpenApiPaths;
187
187
  //#endregion
188
- export { type AuthPluginOptions, type BetterAuthAdapterOptions, type BetterAuthAdapterResult, type BetterAuthHandler, type BetterAuthOpenApiOptions, MemorySessionStore, type MemorySessionStoreOptions, type SessionCookieOptions, type SessionData, type SessionManagerOptions, type SessionManagerResult, type SessionStore, _default as authPlugin, authPlugin as authPluginFn, createBetterAuthAdapter, createSessionManager, extractBetterAuthOpenApi };
189
- //# sourceMappingURL=index.d.mts.map
188
+ export { type AuthPluginOptions, type BetterAuthAdapterOptions, type BetterAuthAdapterResult, type BetterAuthHandler, type BetterAuthOpenApiOptions, MemorySessionStore, type MemorySessionStoreOptions, type SessionCookieOptions, type SessionData, type SessionManagerOptions, type SessionManagerResult, type SessionStore, _default as authPlugin, authPlugin as authPluginFn, createBetterAuthAdapter, createSessionManager, extractBetterAuthOpenApi };
@@ -1,7 +1,8 @@
1
1
  import { t as AUTHENTICATED_SCOPE } from "../types-Beqn1Un7.mjs";
2
- import { t as ArcError } from "../errors-B9bZok84.mjs";
2
+ import { n as normalizeRoles, t as getUserRoles } from "../types-DelU6kln.mjs";
3
+ import { t as ArcError } from "../errors-DBANPbGr.mjs";
3
4
  import { requireOrgMembership, requireOrgRole, requireTeamMembership } from "../permissions/index.mjs";
4
- import { n as extractBetterAuthOpenApi } from "../betterAuthOpenApi-BrHKeSAx.mjs";
5
+ import { n as extractBetterAuthOpenApi } from "../betterAuthOpenApi-DjWDddNc.mjs";
5
6
  import { createHmac, randomUUID, timingSafeEqual } from "node:crypto";
6
7
  import fp from "fastify-plugin";
7
8
 
@@ -241,7 +242,7 @@ const authPlugin = async (fastify, opts = {}) => {
241
242
  });
242
243
  return;
243
244
  }
244
- const userRoles = user.roles ?? [];
245
+ const userRoles = getUserRoles(user);
245
246
  if (allowedRoles.length === 1 && allowedRoles[0] === "*") return;
246
247
  if (!allowedRoles.some((role) => userRoles.includes(role))) {
247
248
  reply.code(403).send({
@@ -385,7 +386,7 @@ async function tryDirectGetMemberRole(auth, headers, organizationId) {
385
386
  headers,
386
387
  query: { organizationId }
387
388
  });
388
- if (result?.role) return parseRoles(result.role);
389
+ if (result?.role) return normalizeRoles(result.role);
389
390
  return null;
390
391
  } catch {
391
392
  return null;
@@ -427,19 +428,13 @@ function normalizeId(value) {
427
428
  }
428
429
  return String(value);
429
430
  }
430
- /** Parse role payload from Better Auth (string, csv, array) into normalized roles[] */
431
- function parseRoles(value) {
432
- if (Array.isArray(value)) return value.map((r) => String(r).trim()).filter(Boolean);
433
- if (typeof value === "string") return value.split(",").map((r) => r.trim()).filter(Boolean);
434
- return [];
435
- }
436
431
  /** Extract role field from heterogeneous org membership shapes */
437
432
  function extractRolesFromMembership(membership) {
438
- const direct = parseRoles(membership.role ?? membership.roles ?? membership.orgRole);
433
+ const direct = normalizeRoles(membership.role ?? membership.roles ?? membership.orgRole);
439
434
  if (direct.length > 0) return direct;
440
435
  const nestedMembership = membership.membership;
441
436
  if (nestedMembership) {
442
- const nested = parseRoles(nestedMembership.role ?? nestedMembership.roles);
437
+ const nested = normalizeRoles(nestedMembership.role ?? nestedMembership.roles);
443
438
  if (nested.length > 0) return nested;
444
439
  }
445
440
  return [];
@@ -480,7 +475,7 @@ async function resolveOrgRoles(auth, protocol, host, normalizedBase, headers, ac
480
475
  const roleResponse = await auth.handler(roleRequest);
481
476
  if (roleResponse.ok) {
482
477
  const roleData = await roleResponse.json();
483
- if (roleData?.role) return parseRoles(roleData.role);
478
+ if (roleData?.role) return normalizeRoles(roleData.role);
484
479
  }
485
480
  const listUrl = `${protocol}://${host}${normalizedBase}/organization/list`;
486
481
  const listRequest = new Request(listUrl, {
@@ -677,7 +672,7 @@ function createBetterAuthAdapter(options) {
677
672
  if (!fastify.hasDecorator("authenticate")) fastify.decorate("authenticate", authenticate);
678
673
  if (!fastify.hasDecorator("optionalAuthenticate")) fastify.decorate("optionalAuthenticate", optionalAuthenticate);
679
674
  if (!extractedOpenApi && openapiOpt !== false && auth.api && typeof auth.api === "object") {
680
- const { extractBetterAuthOpenApi } = await import("../betterAuthOpenApi-BrHKeSAx.mjs").then((n) => n.t);
675
+ const { extractBetterAuthOpenApi } = await import("../betterAuthOpenApi-DjWDddNc.mjs").then((n) => n.t);
681
676
  extractedOpenApi = extractBetterAuthOpenApi(auth.api, {
682
677
  basePath,
683
678
  userFields
@@ -1098,5 +1093,4 @@ function createSessionManager(options) {
1098
1093
  }
1099
1094
 
1100
1095
  //#endregion
1101
- export { MemorySessionStore, authPlugin_default as authPlugin, authPlugin as authPluginFn, createBetterAuthAdapter, createSessionManager, extractBetterAuthOpenApi };
1102
- //# sourceMappingURL=index.mjs.map
1096
+ export { MemorySessionStore, authPlugin_default as authPlugin, authPlugin as authPluginFn, createBetterAuthAdapter, createSessionManager, extractBetterAuthOpenApi };
@@ -1,4 +1,4 @@
1
- import { i as SessionData, s as SessionStore } from "../sessionManager-jPKLbHE0.mjs";
1
+ import { i as SessionData, s as SessionStore } from "../sessionManager-D_iEHjQl.mjs";
2
2
 
3
3
  //#region src/auth/redis-session.d.ts
4
4
  /** Minimal Redis client interface — compatible with ioredis */
@@ -40,5 +40,4 @@ declare class RedisSessionStore implements SessionStore {
40
40
  deleteAllExcept(userId: string, currentSessionId: string): Promise<void>;
41
41
  }
42
42
  //#endregion
43
- export { RedisLike, RedisSessionStore, RedisSessionStoreOptions };
44
- //# sourceMappingURL=redis-session.d.mts.map
43
+ export { RedisLike, RedisSessionStore, RedisSessionStoreOptions };
@@ -72,5 +72,4 @@ var RedisSessionStore = class {
72
72
  };
73
73
 
74
74
  //#endregion
75
- export { RedisSessionStore };
76
- //# sourceMappingURL=redis-session.mjs.map
75
+ export { RedisSessionStore };
@@ -1,5 +1,5 @@
1
1
  import { t as __exportAll } from "./chunk-C7Uep-_p.mjs";
2
- import { a as toJsonSchema } from "./schemaConverter-BwrmWroW.mjs";
2
+ import { a as toJsonSchema } from "./schemaConverter-Dtg0Kt9T.mjs";
3
3
 
4
4
  //#region src/auth/betterAuthOpenApi.ts
5
5
  var betterAuthOpenApi_exports = /* @__PURE__ */ __exportAll({ extractBetterAuthOpenApi: () => extractBetterAuthOpenApi });
@@ -246,5 +246,4 @@ function mergeUserFieldsIntoRequestBody(requestBody, userFields, endpointPath) {
246
246
  }
247
247
 
248
248
  //#endregion
249
- export { extractBetterAuthOpenApi as n, betterAuthOpenApi_exports as t };
250
- //# sourceMappingURL=betterAuthOpenApi-BrHKeSAx.mjs.map
249
+ export { extractBetterAuthOpenApi as n, betterAuthOpenApi_exports as t };
@@ -1,5 +1,5 @@
1
- import { i as CacheStore, n as CacheSetOptions, r as CacheStats, t as CacheLogger } from "../interface-CZe8IkMf.mjs";
2
- import { a as CacheEnvelope, c as QueryCache, i as queryCachePlugin, l as QueryCacheConfig, n as QueryCacheDefaults, o as CacheResult, r as QueryCachePluginOptions, s as CacheStatus, t as CrossResourceRule } from "../queryCachePlugin-7THaI5mt.mjs";
1
+ import { i as CacheStore, n as CacheSetOptions, r as CacheStats, t as CacheLogger } from "../interface-DTbsvIWe.mjs";
2
+ import { a as CacheEnvelope, c as QueryCache, i as queryCachePlugin, l as QueryCacheConfig, n as QueryCacheDefaults, o as CacheResult, r as QueryCachePluginOptions, s as CacheStatus, t as CrossResourceRule } from "../queryCachePlugin-Q6SYuHZ6.mjs";
3
3
 
4
4
  //#region src/cache/memory.d.ts
5
5
  interface MemoryCacheStoreOptions {
@@ -142,5 +142,4 @@ declare function tagVersionKey(tag: string): string;
142
142
  */
143
143
  declare function hashParams(params: Record<string, unknown>): string;
144
144
  //#endregion
145
- export { type CacheEnvelope, type CacheLogger, type CacheResult, type CacheSetOptions, type CacheStats, type CacheStatus, type CacheStore, type CrossResourceRule, MemoryCacheStore, type MemoryCacheStoreOptions, QueryCache, type QueryCacheConfig, type QueryCacheDefaults, type QueryCachePluginOptions, type RedisCacheClient, RedisCacheStore, type RedisCacheStoreOptions, type RedisPipeline, buildQueryKey, hashParams, queryCachePlugin, tagVersionKey, versionKey };
146
- //# sourceMappingURL=index.d.mts.map
145
+ export { type CacheEnvelope, type CacheLogger, type CacheResult, type CacheSetOptions, type CacheStats, type CacheStatus, type CacheStore, type CrossResourceRule, MemoryCacheStore, type MemoryCacheStoreOptions, QueryCache, type QueryCacheConfig, type QueryCacheDefaults, type QueryCachePluginOptions, type RedisCacheClient, RedisCacheStore, type RedisCacheStoreOptions, type RedisPipeline, buildQueryKey, hashParams, queryCachePlugin, tagVersionKey, versionKey };
@@ -1,6 +1,6 @@
1
- import { i as versionKey, n as hashParams, r as tagVersionKey, t as buildQueryKey } from "../keys-BqNejWup.mjs";
2
- import { t as MemoryCacheStore } from "../memory-cQgelFOj.mjs";
3
- import { r as QueryCache, t as queryCachePlugin } from "../queryCachePlugin-DMBnp2Q0.mjs";
1
+ import { i as versionKey, n as hashParams, r as tagVersionKey, t as buildQueryKey } from "../keys-DhqDRxv3.mjs";
2
+ import { t as MemoryCacheStore } from "../memory-B2v7KrCB.mjs";
3
+ import { r as QueryCache, t as queryCachePlugin } from "../queryCachePlugin-B6R0d4av.mjs";
4
4
 
5
5
  //#region src/cache/redis.ts
6
6
  /**
@@ -88,5 +88,4 @@ var RedisCacheStore = class {
88
88
  };
89
89
 
90
90
  //#endregion
91
- export { MemoryCacheStore, QueryCache, RedisCacheStore, buildQueryKey, hashParams, queryCachePlugin, tagVersionKey, versionKey };
92
- //# sourceMappingURL=index.mjs.map
91
+ export { MemoryCacheStore, QueryCache, RedisCacheStore, buildQueryKey, hashParams, queryCachePlugin, tagVersionKey, versionKey };
@@ -90,5 +90,4 @@ var caching_default = fp(cachingPlugin, {
90
90
  });
91
91
 
92
92
  //#endregion
93
- export { caching_default as n, caching_exports as r, cachingPlugin as t };
94
- //# sourceMappingURL=caching-Bl28lYsR.mjs.map
93
+ export { caching_default as n, caching_exports as r, cachingPlugin as t };
@@ -1093,5 +1093,4 @@ function createCircuitBreakerRegistry() {
1093
1093
  }
1094
1094
 
1095
1095
  //#endregion
1096
- export { ArcQueryParser as C, wrapResponse as S, paginateWrapper as _, createCircuitBreaker as a, responses as b, deleteResponse as c, getListQueryParams as d, itemResponse as f, mutationResponse as g, messageWrapper as h, CircuitState as i, errorResponseSchema as l, listResponse as m, CircuitBreakerError as n, createCircuitBreakerRegistry as o, itemWrapper as p, CircuitBreakerRegistry as r, createStateMachine as s, CircuitBreaker as t, getDefaultCrudSchemas as u, paginationSchema as v, createQueryParser as w, successResponseSchema as x, queryParams as y };
1097
- //# sourceMappingURL=circuitBreaker-DeY4FCjs.mjs.map
1096
+ export { ArcQueryParser as C, wrapResponse as S, paginateWrapper as _, createCircuitBreaker as a, responses as b, deleteResponse as c, getListQueryParams as d, itemResponse as f, mutationResponse as g, messageWrapper as h, CircuitState as i, errorResponseSchema as l, listResponse as m, CircuitBreakerError as n, createCircuitBreakerRegistry as o, itemWrapper as p, CircuitBreakerRegistry as r, createStateMachine as s, CircuitBreaker as t, getDefaultCrudSchemas as u, paginationSchema as v, createQueryParser as w, successResponseSchema as x, queryParams as y };
@@ -15,5 +15,4 @@
15
15
  */
16
16
  declare function describe(args: string[]): Promise<void>;
17
17
  //#endregion
18
- export { describe as default, describe };
19
- //# sourceMappingURL=describe.d.mts.map
18
+ export { describe as default, describe };
@@ -235,5 +235,4 @@ async function describe(args) {
235
235
  }
236
236
 
237
237
  //#endregion
238
- export { describe as default, describe };
239
- //# sourceMappingURL=describe.mjs.map
238
+ export { describe as default, describe };
@@ -10,5 +10,4 @@ declare const _default: {
10
10
  exportDocs: typeof exportDocs;
11
11
  };
12
12
  //#endregion
13
- export { _default as default, exportDocs };
14
- //# sourceMappingURL=docs.d.mts.map
13
+ export { _default as default, exportDocs };
@@ -1,5 +1,5 @@
1
- import { t as ResourceRegistry } from "../../ResourceRegistry-DsN4KJjV.mjs";
2
- import { t as buildOpenApiSpec } from "../../openapi-G3Cw7XuM.mjs";
1
+ import { t as ResourceRegistry } from "../../ResourceRegistry-7Ic20ZMw.mjs";
2
+ import { t as buildOpenApiSpec } from "../../openapi-9nB_kiuR.mjs";
3
3
  import { writeFileSync } from "node:fs";
4
4
  import { resolve } from "node:path";
5
5
  import { pathToFileURL } from "node:url";
@@ -49,5 +49,4 @@ async function exportDocs(args) {
49
49
  var docs_default = { exportDocs };
50
50
 
51
51
  //#endregion
52
- export { docs_default as default, exportDocs };
53
- //# sourceMappingURL=docs.mjs.map
52
+ export { docs_default as default, exportDocs };
@@ -8,11 +8,15 @@
8
8
  * - src/resources/product/product.resource.ts
9
9
  * - src/resources/product/product.controller.ts
10
10
  * - src/resources/product/product.schemas.ts
11
+ *
12
+ * Handles kebab-case names: `arc g r org-profile` generates:
13
+ * - Class names: OrgProfile, OrgProfileRepository
14
+ * - Variable names: orgProfileSchema, orgProfileRepository
15
+ * - File names: org-profile.model.ts, org-profile.repository.ts
11
16
  */
12
17
  /**
13
18
  * Generate command handler
14
19
  */
15
20
  declare function generate(type: string | undefined, args: string[]): Promise<void>;
16
21
  //#endregion
17
- export { generate as default, generate };
18
- //# sourceMappingURL=generate.d.mts.map
22
+ export { generate as default, generate };