@classytic/arc 2.43.0 → 2.45.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 (214) hide show
  1. package/dist/{EventTransport-tzA7CAB4.mjs → EventTransport-Ci6hGO1Y.mjs} +2 -2
  2. package/dist/{HookSystem-B6UaKRbF.mjs → HookSystem-CtnnYHME.mjs} +2 -2
  3. package/dist/{ResourceRegistry-CuCARu2B.mjs → ResourceRegistry-BNoHOx-D.mjs} +2 -2
  4. package/dist/acquire-BW_2Dt60.mjs +35 -0
  5. package/dist/{actionPermissions-BotX1YOa.mjs → actionPermissions-TAc_6LCw.mjs} +13 -17
  6. package/dist/audit/index.d.mts +6 -6
  7. package/dist/audit/index.mjs +4 -4
  8. package/dist/auth/audit.d.mts +8 -8
  9. package/dist/auth/audit.mjs +1 -1
  10. package/dist/auth/index.d.mts +5 -5
  11. package/dist/auth/index.mjs +14 -12
  12. package/dist/auth/redis-session.d.mts +4 -5
  13. package/dist/auth/redis-session.mjs +1 -1
  14. package/dist/{authorizationDecision-DQYrkl5f.mjs → authorizationDecision-BixzgirP.mjs} +4 -4
  15. package/dist/{boundedMap-BULzfXYU.mjs → boundedMap-DQfXgxMo.mjs} +1 -1
  16. package/dist/{buildHandler-CRQ8EcX5.mjs → buildHandler-mEUmO2_u.mjs} +4 -4
  17. package/dist/cache/index.d.mts +9 -9
  18. package/dist/cache/index.mjs +4 -4
  19. package/dist/{caching-Cc2M1DwO.mjs → caching-TQfW2QX7.mjs} +2 -2
  20. package/dist/{claimed-B10RTfkM.mjs → claimed-CnEEOHuL.mjs} +1 -1
  21. package/dist/cleanup/index.d.mts +14 -14
  22. package/dist/cleanup/index.mjs +4 -4
  23. package/dist/cli/commands/describe.d.mts +5 -5
  24. package/dist/cli/commands/describe.mjs +3 -3
  25. package/dist/cli/commands/docs.d.mts +2 -3
  26. package/dist/cli/commands/docs.mjs +3 -3
  27. package/dist/cli/commands/doctor.d.mts +2 -3
  28. package/dist/cli/commands/doctor.mjs +1 -1
  29. package/dist/cli/commands/generate.mjs +2 -3
  30. package/dist/cli/commands/init.mjs +2 -3
  31. package/dist/cli/commands/introspect.d.mts +2 -3
  32. package/dist/cli/commands/introspect.mjs +2 -2
  33. package/dist/cli/index.mjs +3 -3
  34. package/dist/{constants-Cu7Mx7_U.mjs → constants-B90SnSQn.mjs} +1 -1
  35. package/dist/context/index.d.mts +9 -9
  36. package/dist/context/index.mjs +5 -5
  37. package/dist/core/index.d.mts +3 -3
  38. package/dist/core/index.mjs +8 -8
  39. package/dist/{core-Cb0LjccA.mjs → core-DV9PSXtr.mjs} +13 -4
  40. package/dist/{createActionRouter-xjqonMRO.mjs → createActionRouter-BgPCYU2U.mjs} +18 -8
  41. package/dist/{createAggregationRouter-zRYWw_5D.mjs → createAggregationRouter-lNCkDwKe.mjs} +7 -7
  42. package/dist/{createApp-D-953ZAq.mjs → createApp-BSBPntOQ.mjs} +34 -32
  43. package/dist/{createMcpServer-C9cxS8zt.d.mts → createMcpServer-DSztofa9.d.mts} +1 -1
  44. package/dist/{defineAggregation-Bm8RjMbq.mjs → defineAggregation-CwD8_XNd.mjs} +1 -1
  45. package/dist/{defineResource-DIC7JZGU.mjs → defineResource-CRkhRRSj.mjs} +7 -7
  46. package/dist/discovery/index.d.mts +6 -7
  47. package/dist/discovery/index.mjs +1 -1
  48. package/dist/docs/index.d.mts +3 -3
  49. package/dist/docs/index.mjs +3 -3
  50. package/dist/{elevation-DG8SrLN-.mjs → elevation-BAfsnnO0.mjs} +5 -5
  51. package/dist/encryption/index.d.mts +5 -5
  52. package/dist/encryption/index.mjs +3 -3
  53. package/dist/{errorHandler-BnfDviL1.mjs → errorHandler-DbHGwrQM.mjs} +3 -3
  54. package/dist/{errors-CtrywMHP.mjs → errors-C9G4A8cN.mjs} +1 -1
  55. package/dist/{eventPlugin-Q6BhzHzs.mjs → eventPlugin-Dghr7iL5.mjs} +8 -8
  56. package/dist/{eventTypes-Cdhm6ZlV.mjs → eventTypes-DDy7BMAn.mjs} +2 -2
  57. package/dist/events/index.d.mts +14 -14
  58. package/dist/events/index.mjs +7 -7
  59. package/dist/events/transports/redis-stream-entry.mjs +4 -4
  60. package/dist/events/transports/redis.d.mts +4 -5
  61. package/dist/events/transports/redis.mjs +2 -2
  62. package/dist/factory/index.d.mts +16 -16
  63. package/dist/factory/index.mjs +6 -6
  64. package/dist/{fastify-augmentation-DhUJ-mvo.d.mts → fastify-augmentation-DRlCIWE9.d.mts} +2 -2
  65. package/dist/{fields-ToPYpMqS.mjs → fields-Da--1DNS.mjs} +1 -1
  66. package/dist/{filter-merge-IpGywvym.mjs → filter-merge-BYKBa9b2.mjs} +1 -1
  67. package/dist/{generate-DRTkLlIl.mjs → generate-Cm5Ct81v.mjs} +2 -2
  68. package/dist/{headers-BbkIF6vA.mjs → headers-B6DRXXzT.mjs} +2 -2
  69. package/dist/{health-D-Ft6JM6.mjs → health-hRGgxnOC.mjs} +1 -1
  70. package/dist/{health-DqbsG-_w.mjs → health-pLbfckGB.mjs} +1 -1
  71. package/dist/hooks/index.d.mts +1 -1
  72. package/dist/hooks/index.mjs +2 -3
  73. package/dist/idempotency/index.d.mts +8 -6
  74. package/dist/idempotency/index.mjs +108 -46
  75. package/dist/idempotency/redis.d.mts +1 -1
  76. package/dist/idempotency/redis.mjs +30 -2
  77. package/dist/{index-CRoPtISf.d.mts → index-Beg3aNnK.d.mts} +3 -31
  78. package/dist/{index-JdbZAIsm.d.mts → index-CUJvoyw3.d.mts} +1 -1
  79. package/dist/{index-mqaqZNpe.d.mts → index-WH7xgvxS.d.mts} +52 -1
  80. package/dist/{index-C8zVGYsk.d.mts → index-uhkUA5-U.d.mts} +4 -4
  81. package/dist/index.d.mts +5 -5
  82. package/dist/index.mjs +11 -11
  83. package/dist/{init-B_oUYDXI.mjs → init-lpaUB-Ph.mjs} +1 -1
  84. package/dist/integrations/event-gateway.d.mts +3 -4
  85. package/dist/integrations/event-gateway.mjs +2 -2
  86. package/dist/integrations/index.d.mts +1 -1
  87. package/dist/integrations/index.mjs +1 -1
  88. package/dist/integrations/jobs/index.mjs +3 -3
  89. package/dist/integrations/mcp/index.d.mts +36 -36
  90. package/dist/integrations/mcp/index.mjs +2 -2
  91. package/dist/integrations/mcp/testing.d.mts +8 -9
  92. package/dist/integrations/mcp/testing.mjs +2 -2
  93. package/dist/integrations/streamline.d.mts +12 -13
  94. package/dist/integrations/streamline.mjs +18 -4
  95. package/dist/integrations/webhooks.d.mts +23 -23
  96. package/dist/integrations/webhooks.mjs +3 -3
  97. package/dist/integrations/websocket-pushref-redis.d.mts +4 -5
  98. package/dist/integrations/websocket-pushref-redis.mjs +1 -1
  99. package/dist/integrations/websocket-redis.d.mts +4 -5
  100. package/dist/integrations/websocket-redis.mjs +1 -1
  101. package/dist/integrations/websocket.mjs +2 -2
  102. package/dist/{interface-C0395yUN.d.mts → interface-JJzwH4Ro.d.mts} +22 -2
  103. package/dist/{jsonBody-B4YVGcql.mjs → jsonBody-CzKHE-Fg.mjs} +2 -2
  104. package/dist/{keys-B2KtgMLJ.mjs → keys-BoZKnBel.mjs} +1 -1
  105. package/dist/{loadResources-Dn4lalw2.mjs → loadResources-BEKG6bP9.mjs} +3 -3
  106. package/dist/{loadResourcesFromEntry-3sLYbuse.mjs → loadResourcesFromEntry-BEPA0ptL.mjs} +2 -2
  107. package/dist/logger/index.d.mts +9 -10
  108. package/dist/logger/index.mjs +2 -3
  109. package/dist/{logger-DXjfIqjV.mjs → logger-vxu0DXf_.mjs} +1 -1
  110. package/dist/{mcpPlugin-C08HalN5.mjs → mcpPlugin-DP_UB0LK.mjs} +42 -29
  111. package/dist/{memory-9Cp7611C.mjs → memory-DJN6kyC8.mjs} +3 -3
  112. package/dist/{metrics-CWI11eRu.mjs → metrics-wfr7XFE7.mjs} +3 -3
  113. package/dist/middleware/index.d.mts +5 -5
  114. package/dist/middleware/index.mjs +3 -3
  115. package/dist/migrations/index.d.mts +13 -13
  116. package/dist/migrations/index.mjs +2 -2
  117. package/dist/{module-BSvOQC7E.mjs → module-BtdcGn_E.mjs} +1 -1
  118. package/dist/mongodb-memory-server-Cn57YIsc.mjs +35539 -0
  119. package/dist/mongoose-DzFjTtBN.mjs +67451 -0
  120. package/dist/{multiTenant-cY0FkDiA.d.mts → multiTenant-CAtYlW6H.d.mts} +1 -1
  121. package/dist/{multipartBody-CXM2a-Dy.mjs → multipartBody-NHGOuUnG.mjs} +1 -1
  122. package/dist/node-C0HB_V6E.mjs +41236 -0
  123. package/dist/{openapi-DT_G4VhY.mjs → openapi-BCOaGAgE.mjs} +6 -6
  124. package/dist/outbox-admin/index.d.mts +2 -2
  125. package/dist/outbox-admin/index.mjs +5 -5
  126. package/dist/{outbox-module-Bjgzl6tg.mjs → outbox-module-BVDiMwXb.mjs} +9 -9
  127. package/dist/permissions/index.mjs +7 -7
  128. package/dist/{permissions-Cm0uYHvd.mjs → permissions-IdHJ0_5V.mjs} +9 -9
  129. package/dist/{pipe-BqeGT6UO.mjs → pipe-BPJPifhi.mjs} +2 -2
  130. package/dist/pipeline/index.d.mts +7 -7
  131. package/dist/pipeline/index.mjs +2 -2
  132. package/dist/{plan-FVR6LP59.mjs → plan-CEedaMlr.mjs} +1 -1
  133. package/dist/{plugin-BccET1tL.mjs → plugin-BDBOS3-c.mjs} +39 -27
  134. package/dist/plugins/index.d.mts +8 -8
  135. package/dist/plugins/index.mjs +17 -17
  136. package/dist/plugins/response-cache.d.mts +5 -6
  137. package/dist/plugins/response-cache.mjs +4 -4
  138. package/dist/plugins/tracing-entry.mjs +2 -2
  139. package/dist/{pluralize-CVIOcgMF.mjs → pluralize-B4FcZEyI.mjs} +1 -1
  140. package/dist/presets/filesUpload.d.mts +7 -7
  141. package/dist/presets/filesUpload.mjs +5 -5
  142. package/dist/presets/index.d.mts +14 -14
  143. package/dist/presets/index.mjs +2 -2
  144. package/dist/presets/multiTenant.d.mts +1 -1
  145. package/dist/presets/multiTenant.mjs +5 -5
  146. package/dist/presets/search.d.mts +8 -9
  147. package/dist/presets/search.mjs +2 -2
  148. package/dist/{presets-Cpvj6fGO.mjs → presets-BPjNc-Np.mjs} +4 -4
  149. package/dist/{projection-Ce4aQhQk.mjs → projection-BXUOYosj.mjs} +2 -2
  150. package/dist/{queryCachePlugin-CFWNH8aT.mjs → queryCachePlugin-s4pBvjFF.mjs} +6 -6
  151. package/dist/{rateLimitKey-C4O-kPm0.mjs → rateLimitKey-C4mkCwQ-.mjs} +1 -1
  152. package/dist/{realtime-DmPE9S54.mjs → realtime-MPj6eIoV.mjs} +11 -11
  153. package/dist/{redis-vLvtcGy_.d.mts → redis-BDgv9Glw.d.mts} +5 -1
  154. package/dist/registry/index.d.mts +9 -9
  155. package/dist/registry/index.mjs +3 -3
  156. package/dist/{registry-Bcz9G1bh.mjs → registry-DIdh6mWE.mjs} +5 -4
  157. package/dist/{renewingLease-qODa7KJQ.mjs → renewingLease-boGRXWCr.mjs} +1 -1
  158. package/dist/{replyHelpers-CG_VtVgS.mjs → replyHelpers-BW_p67QD.mjs} +2 -2
  159. package/dist/{requestContext-Dsu9P1bV.mjs → requestContext-B8JKbeb7.mjs} +1 -1
  160. package/dist/{requirement-KDdoRcOP.mjs → requirement-tXpcD56f.mjs} +1 -1
  161. package/dist/{resourceRateLimit-dSjVr1pk.mjs → resourceRateLimit-DWob9nQ8.mjs} +2 -2
  162. package/dist/rolldown-runtime-AD16t29l.mjs +45 -0
  163. package/dist/{routeValidator-D36SW8qt.mjs → routeValidator-CnmenC4Y.mjs} +1 -1
  164. package/dist/{runtimeCapabilities-0tccjRlj.mjs → runtimeCapabilities-C7gAbIxC.mjs} +1 -1
  165. package/dist/{schedules-C-OpmHBq.mjs → schedules-Dr9gNFzx.mjs} +5 -5
  166. package/dist/{schemaConverter-BORek3O-.mjs → schemaConverter-rzBovk00.mjs} +2 -2
  167. package/dist/{schemaIR-C7Vbp71I.mjs → schemaIR-GrOK1JO4.mjs} +2 -2
  168. package/dist/schemas/index.d.mts +10 -10
  169. package/dist/schemas/index.mjs +1 -1
  170. package/dist/scim/index.d.mts +13 -13
  171. package/dist/scim/index.mjs +2 -2
  172. package/dist/scope/index.d.mts +3 -3
  173. package/dist/scope/index.mjs +5 -5
  174. package/dist/{scope-DQthe88b.mjs → scope-DpOpxyHT.mjs} +4 -4
  175. package/dist/{shutdown-MqA81z_P.mjs → shutdown-BW8qwgpx.mjs} +1 -1
  176. package/dist/{simpleEqualityMatcher-auW8QjXN.mjs → simpleEqualityMatcher-WdZw6GOt.mjs} +1 -1
  177. package/dist/sse-D8AgoUN3.mjs +212 -0
  178. package/dist/{sseStream-B5_Afiqn.mjs → sseStream-B7rPhIQw.mjs} +2 -2
  179. package/dist/{store-helpers-BOzk-CuX.mjs → store-helpers-Bxk7TDgG.mjs} +1 -1
  180. package/dist/{streaming-DjTQhZrN.mjs → streaming-BLg1buwL.mjs} +1 -1
  181. package/dist/{subscriberIdentity-CW39uA8G.mjs → subscriberIdentity-Cxp19Ked.mjs} +1 -1
  182. package/dist/{tenancy--ed9eH_z.mjs → tenancy-D7jo78AP.mjs} +2 -2
  183. package/dist/{tenantPreparation-BKon6Yox.mjs → tenantPreparation-DqJnokDW.mjs} +4 -4
  184. package/dist/testing/cleanupStoreContract.d.mts +4 -5
  185. package/dist/testing/cleanupStoreContract.mjs +1 -1
  186. package/dist/testing/index.d.mts +35 -35
  187. package/dist/testing/index.mjs +16 -15
  188. package/dist/testing/outboxStoreContract.d.mts +4 -5
  189. package/dist/testing/outboxStoreContract.mjs +2 -2
  190. package/dist/testing/requiredPorts.d.mts +4 -5
  191. package/dist/testing/requiredPorts.mjs +2 -2
  192. package/dist/testing/storageContract.d.mts +4 -5
  193. package/dist/testing/storageContract.mjs +1 -1
  194. package/dist/{timing-qczZ0YC-.mjs → timing-Y6_ZpoYG.mjs} +1 -1
  195. package/dist/{transactionContext-DjFkrNG6.mjs → transactionContext-BWp0MBGL.mjs} +1 -1
  196. package/dist/{typeGuards-CySF12G-.mjs → typeGuards-CtZJypJO.mjs} +1 -1
  197. package/dist/types/index.d.mts +1 -1
  198. package/dist/types/index.mjs +1 -1
  199. package/dist/types/storage.mjs +1 -1
  200. package/dist/{types-Bk9NOgOC.mjs → types-4JKkSvds.mjs} +4 -4
  201. package/dist/{types-B4Aq4Sdj.d.mts → types-D3Ixsh00.d.mts} +1 -1
  202. package/dist/usage/index.d.mts +4 -4
  203. package/dist/usage/index.mjs +4 -4
  204. package/dist/{userHelpers-aklawRaK.mjs → userHelpers-Nc5ePCsf.mjs} +1 -1
  205. package/dist/utils/index.d.mts +47 -47
  206. package/dist/utils/index.mjs +12 -12
  207. package/dist/{utils-ec1oTo1n.mjs → utils-QWSIKqAk.mjs} +4 -4
  208. package/dist/{validate-9yzHC1e2.mjs → validate-CT4umNhp.mjs} +3 -3
  209. package/dist/{versioning-Bsb51gGT.d.mts → versioning-Bqm_57Qt.d.mts} +23 -1
  210. package/dist/{versioning-fhhWHV74.mjs → versioning-JIqxO64K.mjs} +3 -3
  211. package/dist/{workScope-zpPyge4t.mjs → workScope-BDjGXwU9.mjs} +2 -2
  212. package/package.json +47 -52
  213. package/dist/rolldown-runtime-D1w9Y1VJ.mjs +0 -15
  214. package/dist/sse-CYzQBVFe.mjs +0 -89
@@ -1,9 +1,9 @@
1
- /*! @classytic/arc v2.43.0 | MIT | https://classytic.com */
2
- import { n as getUserRoles } from "./userHelpers-aklawRaK.mjs";
3
- import { n as convertRouteSchema } from "./schemaConverter-BORek3O-.mjs";
4
- import { t as resolveActionPermission } from "./actionPermissions-BotX1YOa.mjs";
5
- import { t as pluralize } from "./pluralize-CVIOcgMF.mjs";
6
- import { t as buildActionBodySchema } from "./createActionRouter-xjqonMRO.mjs";
1
+ /*! @classytic/arc v2.45.0 | MIT | https://classytic.com */
2
+ import { n as getUserRoles } from "./userHelpers-Nc5ePCsf.mjs";
3
+ import { n as convertRouteSchema } from "./schemaConverter-rzBovk00.mjs";
4
+ import { t as resolveActionPermission } from "./actionPermissions-TAc_6LCw.mjs";
5
+ import { t as pluralize } from "./pluralize-B4FcZEyI.mjs";
6
+ import { t as buildActionBodySchema } from "./createActionRouter-BgPCYU2U.mjs";
7
7
  import fp from "fastify-plugin";
8
8
  //#region src/docs/openapi/canonical-schemas.ts
9
9
  /**
@@ -80,6 +80,6 @@ interface OutboxAdminModuleDeps {
80
80
  */
81
81
  relayLagUnhealthyMs?: number;
82
82
  }
83
- declare function createOutboxAdminModule(deps: OutboxAdminModuleDeps): ArcModule<void>;
83
+ export declare function createOutboxAdminModule(deps: OutboxAdminModuleDeps): ArcModule<void>;
84
84
  //#endregion
85
- export { type OutboxAdminModuleDeps, type OutboxAdminPermissions, type OutboxAdminStore, createOutboxAdminModule };
85
+ export type { OutboxAdminModuleDeps, OutboxAdminPermissions, OutboxAdminStore };
@@ -1,8 +1,8 @@
1
- /*! @classytic/arc v2.43.0 | MIT | https://classytic.com */
2
- import { i as NotFoundError, u as ValidationError } from "../errors-CtrywMHP.mjs";
3
- import { t as defineResource } from "../defineResource-DIC7JZGU.mjs";
4
- import { n as getModuleExports, t as defineModule } from "../module-BSvOQC7E.mjs";
5
- import { r as readOutboxHealth } from "../health-D-Ft6JM6.mjs";
1
+ /*! @classytic/arc v2.45.0 | MIT | https://classytic.com */
2
+ import { i as NotFoundError, u as ValidationError } from "../errors-C9G4A8cN.mjs";
3
+ import { t as defineResource } from "../defineResource-CRkhRRSj.mjs";
4
+ import { n as getModuleExports, t as defineModule } from "../module-BtdcGn_E.mjs";
5
+ import { r as readOutboxHealth } from "../health-hRGgxnOC.mjs";
6
6
  //#region src/outbox-admin/module.ts
7
7
  /**
8
8
  * Strip the domain payload and the stack unless explicitly opted in.
@@ -1,12 +1,12 @@
1
- /*! @classytic/arc v2.43.0 | MIT | https://classytic.com */
2
- import { t as transactionContext } from "./transactionContext-DjFkrNG6.mjs";
3
- import { n as requestContext } from "./requestContext-Dsu9P1bV.mjs";
4
- import { n as evictToSize, r as touch } from "./boundedMap-BULzfXYU.mjs";
5
- import { i as resolveEventTransport } from "./EventTransport-tzA7CAB4.mjs";
6
- import { t as emitObserved } from "./eventPlugin-Q6BhzHzs.mjs";
7
- import { n as canReportHealth, r as readOutboxHealth } from "./health-D-Ft6JM6.mjs";
8
- import { n as createSafeGetOne, t as createIsDuplicateKeyError } from "./store-helpers-BOzk-CuX.mjs";
9
- import { t as claimedAttempts } from "./claimed-B10RTfkM.mjs";
1
+ /*! @classytic/arc v2.45.0 | MIT | https://classytic.com */
2
+ import { t as transactionContext } from "./transactionContext-BWp0MBGL.mjs";
3
+ import { n as requestContext } from "./requestContext-B8JKbeb7.mjs";
4
+ import { n as evictToSize, r as touch } from "./boundedMap-DQfXgxMo.mjs";
5
+ import { i as resolveEventTransport } from "./EventTransport-Ci6hGO1Y.mjs";
6
+ import { t as emitObserved } from "./eventPlugin-Dghr7iL5.mjs";
7
+ import { n as canReportHealth, r as readOutboxHealth } from "./health-hRGgxnOC.mjs";
8
+ import { n as createSafeGetOne, t as createIsDuplicateKeyError } from "./store-helpers-Bxk7TDgG.mjs";
9
+ import { t as claimedAttempts } from "./claimed-CnEEOHuL.mjs";
10
10
  import { and, anyOf, eq, lte, ne, or } from "@classytic/repo-core/filter";
11
11
  import { randomBytes } from "node:crypto";
12
12
  import { InvalidOutboxEventError, OutboxConflictError, OutboxOwnershipError, outboxPayloadFingerprint } from "@classytic/primitives/outbox";
@@ -1,8 +1,8 @@
1
- /*! @classytic/arc v2.43.0 | MIT | https://classytic.com */
2
- import { t as conjoinPolicyFilters } from "../filter-merge-IpGywvym.mjs";
3
- import { n as getUserRoles, r as normalizeRoles } from "../userHelpers-aklawRaK.mjs";
4
- import { a as resolveEffectiveRoles, i as fields, n as applyFieldWritePermissions, t as applyFieldReadPermissions } from "../fields-ToPYpMqS.mjs";
5
- import { i as normalizeToDecision, r as evaluatePermissionDecision, t as applyAuthorizationDecision } from "../authorizationDecision-DQYrkl5f.mjs";
6
- import { i as resolveResourceRateLimiter, t as createMemoryResourceRateLimiter } from "../resourceRateLimit-dSjVr1pk.mjs";
7
- import { A as requireAgentScope, B as requireAuth, C as createOrgPermissions, D as requireScopeContext, E as requireOrgRole, F as allowPublic, G as when, H as requirePlatformRole, I as anyOf, K as scopeOf, L as deny, M as requireMandate, N as allOf, O as requireServiceScope, P as allow, R as denyAll, S as createDynamicPermissionMatrix, T as requireOrgMembership, U as requireRoles, V as requireOwnership, W as roles, _ as requireGrant, a as adminOnly, b as describePermissionMap, c as ownerWithAdminBypass, d as publicRead, f as publicReadAdminWrite, g as modeSatisfies, h as GRANT_MODES, i as introspectRegistry, j as requireDPoP, k as requireTeamMembership, l as permissionMatrix, m as createRoleHierarchy, n as introspectCheck, o as authenticated, p as readOnly, r as introspectModule, s as fullPublic, t as buildPermissionMatrix, u as presets_exports, v as collectPublicSurface, w as requireOrgInScope, x as explainAccess, y as describePermission, z as not } from "../permissions-Cm0uYHvd.mjs";
1
+ /*! @classytic/arc v2.45.0 | MIT | https://classytic.com */
2
+ import { t as conjoinPolicyFilters } from "../filter-merge-BYKBa9b2.mjs";
3
+ import { n as getUserRoles, r as normalizeRoles } from "../userHelpers-Nc5ePCsf.mjs";
4
+ import { a as resolveEffectiveRoles, i as fields, n as applyFieldWritePermissions, t as applyFieldReadPermissions } from "../fields-Da--1DNS.mjs";
5
+ import { i as normalizeToDecision, r as evaluatePermissionDecision, t as applyAuthorizationDecision } from "../authorizationDecision-BixzgirP.mjs";
6
+ import { i as resolveResourceRateLimiter, t as createMemoryResourceRateLimiter } from "../resourceRateLimit-DWob9nQ8.mjs";
7
+ import { A as requireAgentScope, B as requireAuth, C as createOrgPermissions, D as requireScopeContext, E as requireOrgRole, F as allowPublic, G as when, H as requirePlatformRole, I as anyOf, K as scopeOf, L as deny, M as requireMandate, N as allOf, O as requireServiceScope, P as allow, R as denyAll, S as createDynamicPermissionMatrix, T as requireOrgMembership, U as requireRoles, V as requireOwnership, W as roles, _ as requireGrant, a as adminOnly, b as describePermissionMap, c as ownerWithAdminBypass, d as publicRead, f as publicReadAdminWrite, g as modeSatisfies, h as GRANT_MODES, i as introspectRegistry, j as requireDPoP, k as requireTeamMembership, l as permissionMatrix, m as createRoleHierarchy, n as introspectCheck, o as authenticated, p as readOnly, r as introspectModule, s as fullPublic, t as buildPermissionMatrix, u as presets_exports, v as collectPublicSurface, w as requireOrgInScope, x as explainAccess, y as describePermission, z as not } from "../permissions-IdHJ0_5V.mjs";
8
8
  export { GRANT_MODES, adminOnly, allOf, allow, allowPublic, anyOf, applyAuthorizationDecision, applyFieldReadPermissions, applyFieldWritePermissions, authenticated, buildPermissionMatrix, collectPublicSurface, conjoinPolicyFilters, createDynamicPermissionMatrix, createMemoryResourceRateLimiter, createOrgPermissions, createRoleHierarchy, deny, denyAll, describePermission, describePermissionMap, evaluatePermissionDecision, explainAccess, fields, fullPublic, getUserRoles, introspectCheck, introspectModule, introspectRegistry, modeSatisfies, normalizeRoles, normalizeToDecision, not, ownerWithAdminBypass, permissionMatrix, presets_exports as permissions, publicRead, publicReadAdminWrite, readOnly, requireAgentScope, requireAuth, requireDPoP, requireGrant, requireMandate, requireOrgInScope, requireOrgMembership, requireOrgRole, requireOwnership, requirePlatformRole, requireRoles, requireScopeContext, requireServiceScope, requireTeamMembership, resolveEffectiveRoles, resolveResourceRateLimiter, roles, scopeOf, when };
@@ -1,12 +1,12 @@
1
- /*! @classytic/arc v2.43.0 | MIT | https://classytic.com */
2
- import { t as __exportAll } from "./rolldown-runtime-D1w9Y1VJ.mjs";
3
- import { t as arcLog } from "./logger-DXjfIqjV.mjs";
4
- import { t as conjoinPolicyFilters } from "./filter-merge-IpGywvym.mjs";
5
- import { n as getUserRoles } from "./userHelpers-aklawRaK.mjs";
6
- import { C as isService, S as isOrgInScope, a as getDPoPJkt, b as isElevated, d as getScopeContext, f as getScopeContextMap, g as getUserId, m as getTeamId, n as PUBLIC_SCOPE, o as getMandate, p as getServiceScopes, u as getRequestScope, v as hasOrgAccess, x as isMember } from "./types-Bk9NOgOC.mjs";
7
- import { i as normalizeToDecision } from "./authorizationDecision-DQYrkl5f.mjs";
8
- import { n as declareRuntimeCapability } from "./runtimeCapabilities-0tccjRlj.mjs";
9
- import { t as MemoryCacheStore } from "./memory-9Cp7611C.mjs";
1
+ /*! @classytic/arc v2.45.0 | MIT | https://classytic.com */
2
+ import { r as __exportAll } from "./rolldown-runtime-AD16t29l.mjs";
3
+ import { t as arcLog } from "./logger-vxu0DXf_.mjs";
4
+ import { t as conjoinPolicyFilters } from "./filter-merge-BYKBa9b2.mjs";
5
+ import { n as getUserRoles } from "./userHelpers-Nc5ePCsf.mjs";
6
+ import { C as isService, S as isOrgInScope, a as getDPoPJkt, b as isElevated, d as getScopeContext, f as getScopeContextMap, g as getUserId, m as getTeamId, n as PUBLIC_SCOPE, o as getMandate, p as getServiceScopes, u as getRequestScope, v as hasOrgAccess, x as isMember } from "./types-4JKkSvds.mjs";
7
+ import { i as normalizeToDecision } from "./authorizationDecision-BixzgirP.mjs";
8
+ import { n as declareRuntimeCapability } from "./runtimeCapabilities-C7gAbIxC.mjs";
9
+ import { t as MemoryCacheStore } from "./memory-DJN6kyC8.mjs";
10
10
  import { randomUUID } from "node:crypto";
11
11
  //#region src/permissions/context.ts
12
12
  /**
@@ -1,5 +1,5 @@
1
- /*! @classytic/arc v2.43.0 | MIT | https://classytic.com */
2
- import { r as ForbiddenError } from "./errors-CtrywMHP.mjs";
1
+ /*! @classytic/arc v2.45.0 | MIT | https://classytic.com */
2
+ import { r as ForbiddenError } from "./errors-C9G4A8cN.mjs";
3
3
  //#region src/pipeline/pipe.ts
4
4
  /**
5
5
  * Compose pipeline steps into an ordered array.
@@ -1,5 +1,5 @@
1
1
 
2
- import { In as IControllerResponse, _t as PipelineConfig, bt as Transform, gt as OperationFilter, ht as NextFunction, mt as Interceptor, pt as Guard, vt as PipelineContext, yt as PipelineStep } from "../index-mqaqZNpe.mjs";
2
+ import { Vn as IControllerResponse, _t as PipelineConfig, bt as Transform, gt as OperationFilter, ht as NextFunction, mt as Interceptor, pt as Guard, vt as PipelineContext, yt as PipelineStep } from "../index-WH7xgvxS.mjs";
3
3
  //#region src/pipeline/guard.d.ts
4
4
  interface GuardOptions {
5
5
  operations?: OperationFilter;
@@ -11,7 +11,7 @@ interface GuardOptions {
11
11
  * @param name - Guard name (for debugging/introspection)
12
12
  * @param handlerOrOptions - Handler function or options object
13
13
  */
14
- declare function guard(name: string, handlerOrOptions: ((ctx: PipelineContext) => boolean | Promise<boolean>) | GuardOptions): Guard;
14
+ export declare function guard(name: string, handlerOrOptions: ((ctx: PipelineContext) => boolean | Promise<boolean>) | GuardOptions): Guard;
15
15
  //#endregion
16
16
  //#region src/pipeline/intercept.d.ts
17
17
  interface InterceptOptions {
@@ -24,14 +24,14 @@ interface InterceptOptions {
24
24
  * @param name - Interceptor name (for debugging/introspection)
25
25
  * @param handlerOrOptions - Handler function or options object
26
26
  */
27
- declare function intercept(name: string, handlerOrOptions: ((ctx: PipelineContext, next: NextFunction) => Promise<IControllerResponse<unknown>>) | InterceptOptions): Interceptor;
27
+ export declare function intercept(name: string, handlerOrOptions: ((ctx: PipelineContext, next: NextFunction) => Promise<IControllerResponse<unknown>>) | InterceptOptions): Interceptor;
28
28
  //#endregion
29
29
  //#region src/pipeline/pipe.d.ts
30
30
  /**
31
31
  * Compose pipeline steps into an ordered array.
32
32
  * Accepts guards, transforms, and interceptors in any order.
33
33
  */
34
- declare function pipe(...steps: PipelineStep[]): PipelineStep[];
34
+ export declare function pipe(...steps: PipelineStep[]): PipelineStep[];
35
35
  /**
36
36
  * Execute a pipeline against a request context.
37
37
  *
@@ -44,7 +44,7 @@ declare function pipe(...steps: PipelineStep[]): PipelineStep[];
44
44
  * @param operation - The CRUD operation name
45
45
  * @returns The controller response (possibly modified by interceptors)
46
46
  */
47
- declare function executePipeline(steps: PipelineStep[], ctx: PipelineContext, handler: (ctx: PipelineContext) => Promise<IControllerResponse<unknown>>, operation: string): Promise<IControllerResponse<unknown>>;
47
+ export declare function executePipeline(steps: PipelineStep[], ctx: PipelineContext, handler: (ctx: PipelineContext) => Promise<IControllerResponse<unknown>>, operation: string): Promise<IControllerResponse<unknown>>;
48
48
  //#endregion
49
49
  //#region src/pipeline/transform.d.ts
50
50
  interface TransformOptions {
@@ -57,6 +57,6 @@ interface TransformOptions {
57
57
  * @param name - Transform name (for debugging/introspection)
58
58
  * @param handlerOrOptions - Handler function or options object
59
59
  */
60
- declare function transform(name: string, handlerOrOptions: ((ctx: PipelineContext) => PipelineContext | undefined | Promise<PipelineContext | undefined>) | TransformOptions): Transform;
60
+ export declare function transform(name: string, handlerOrOptions: ((ctx: PipelineContext) => PipelineContext | undefined | Promise<PipelineContext | undefined>) | TransformOptions): Transform;
61
61
  //#endregion
62
- export { type Guard, type GuardOptions, type InterceptOptions, type Interceptor, type NextFunction, type OperationFilter, type PipelineConfig, type PipelineContext, type PipelineStep, type Transform, type TransformOptions, executePipeline, guard, intercept, pipe, transform };
62
+ export type { Guard, GuardOptions, InterceptOptions, Interceptor, NextFunction, OperationFilter, PipelineConfig, PipelineContext, PipelineStep, Transform, TransformOptions };
@@ -1,5 +1,5 @@
1
- /*! @classytic/arc v2.43.0 | MIT | https://classytic.com */
2
- import { n as pipe, t as executePipeline } from "../pipe-BqeGT6UO.mjs";
1
+ /*! @classytic/arc v2.45.0 | MIT | https://classytic.com */
2
+ import { n as pipe, t as executePipeline } from "../pipe-BPJPifhi.mjs";
3
3
  //#region src/pipeline/guard.ts
4
4
  /**
5
5
  * Create a named guard.
@@ -1,4 +1,4 @@
1
- /*! @classytic/arc v2.43.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.45.0 | MIT | https://classytic.com */
2
2
  import { createEventRouter, matchEventPattern } from "@classytic/primitives/events";
3
3
  //#region src/factory/module/graph.ts
4
4
  /**
@@ -1,23 +1,23 @@
1
- /*! @classytic/arc v2.43.0 | MIT | https://classytic.com */
2
- import { g as SYSTEM_FIELDS, o as DEFAULT_TENANT_FIELD, s as DEFAULT_UPDATE_METHOD, t as CRUD_OPERATIONS } from "./constants-Cu7Mx7_U.mjs";
3
- import { t as arcLog } from "./logger-DXjfIqjV.mjs";
4
- import { t as conjoinPolicyFilters } from "./filter-merge-IpGywvym.mjs";
5
- import { d as createDomainError, f as createError, i as NotFoundError, p as isArcError, r as ForbiddenError, u as ValidationError } from "./errors-CtrywMHP.mjs";
6
- import { t as simpleEqualityMatcher } from "./simpleEqualityMatcher-auW8QjXN.mjs";
7
- import { n as requireSingleHeaderValue } from "./headers-BbkIF6vA.mjs";
8
- import { n as getUserRoles, t as getUserId } from "./userHelpers-aklawRaK.mjs";
9
- import { b as isElevated, c as getOrgId, n as PUBLIC_SCOPE, x as isMember } from "./types-Bk9NOgOC.mjs";
10
- import { r as resolveTenancy } from "./tenancy--ed9eH_z.mjs";
11
- import { t as buildQueryKey } from "./keys-B2KtgMLJ.mjs";
12
- import { t as transactionContext } from "./transactionContext-DjFkrNG6.mjs";
13
- import { a as resolveEffectiveRoles, n as applyFieldWritePermissions } from "./fields-ToPYpMqS.mjs";
14
- import { E as ArcQueryParser, v as getDefaultCrudSchemas } from "./utils-ec1oTo1n.mjs";
15
- import { n as convertRouteSchema, r as ensureSchemaConverter, t as convertOpenApiSchemas } from "./schemaConverter-BORek3O-.mjs";
16
- import { i as pipeUIMessageStreamToReply, r as isReadableStream } from "./streaming-DjTQhZrN.mjs";
17
- import { _ as buildArcDecorator, a as resolveRouterPluginMw, b as createRequestContext, c as buildPipelineHandler, d as buildCrudPermissionMw, f as buildRouteHooks, h as buildAuthMiddleware, i as buildRouteConfig, l as resolvePipelineSteps, m as routeHookOptions, n as tryRegisterRoute, o as selectPluginMw, p as resolveRoutePreHandlers, r as buildRateLimitConfig, t as resolveActionPermission, v as createCrudHandlers, y as createFastifyHandler } from "./actionPermissions-BotX1YOa.mjs";
18
- import { a as withoutTenantInjection } from "./tenantPreparation-BKon6Yox.mjs";
19
- import { t as hasEvents } from "./typeGuards-CySF12G-.mjs";
20
- import { n as idempotencyConfigProblem } from "./requirement-KDdoRcOP.mjs";
1
+ /*! @classytic/arc v2.45.0 | MIT | https://classytic.com */
2
+ import { g as SYSTEM_FIELDS, o as DEFAULT_TENANT_FIELD, s as DEFAULT_UPDATE_METHOD, t as CRUD_OPERATIONS } from "./constants-B90SnSQn.mjs";
3
+ import { t as arcLog } from "./logger-vxu0DXf_.mjs";
4
+ import { t as conjoinPolicyFilters } from "./filter-merge-BYKBa9b2.mjs";
5
+ import { d as createDomainError, f as createError, i as NotFoundError, p as isArcError, r as ForbiddenError, u as ValidationError } from "./errors-C9G4A8cN.mjs";
6
+ import { t as simpleEqualityMatcher } from "./simpleEqualityMatcher-WdZw6GOt.mjs";
7
+ import { n as requireSingleHeaderValue } from "./headers-B6DRXXzT.mjs";
8
+ import { n as getUserRoles, t as getUserId } from "./userHelpers-Nc5ePCsf.mjs";
9
+ import { b as isElevated, c as getOrgId, n as PUBLIC_SCOPE, x as isMember } from "./types-4JKkSvds.mjs";
10
+ import { r as resolveTenancy } from "./tenancy-D7jo78AP.mjs";
11
+ import { t as buildQueryKey } from "./keys-BoZKnBel.mjs";
12
+ import { t as transactionContext } from "./transactionContext-BWp0MBGL.mjs";
13
+ import { a as resolveEffectiveRoles, n as applyFieldWritePermissions } from "./fields-Da--1DNS.mjs";
14
+ import { E as ArcQueryParser, v as getDefaultCrudSchemas } from "./utils-QWSIKqAk.mjs";
15
+ import { n as convertRouteSchema, r as ensureSchemaConverter, t as convertOpenApiSchemas } from "./schemaConverter-rzBovk00.mjs";
16
+ import { i as pipeUIMessageStreamToReply, r as isReadableStream } from "./streaming-BLg1buwL.mjs";
17
+ import { _ as buildArcDecorator, a as resolveRouterPluginMw, b as createRequestContext, c as buildPipelineHandler, d as buildCrudPermissionMw, f as buildRouteHooks, h as buildAuthMiddleware, i as buildRouteConfig, l as resolvePipelineSteps, m as routeHookOptions, n as tryRegisterRoute, o as selectPluginMw, p as resolveRoutePreHandlers, r as buildRateLimitConfig, t as resolveActionPermission, v as createCrudHandlers, y as createFastifyHandler } from "./actionPermissions-TAc_6LCw.mjs";
18
+ import { a as withoutTenantInjection } from "./tenantPreparation-DqJnokDW.mjs";
19
+ import { t as hasEvents } from "./typeGuards-CtZJypJO.mjs";
20
+ import { n as idempotencyConfigProblem } from "./requirement-tXpcD56f.mjs";
21
21
  import { ARC_ERROR_CODES } from "@classytic/repo-core/errors";
22
22
  import { policyRecordToFilter } from "@classytic/repo-core/filter";
23
23
  import { retryingTransaction } from "@classytic/repo-core/repository";
@@ -1431,12 +1431,22 @@ var BaseCrudController = class {
1431
1431
  return this.repository !== void 0 && this.repository !== null;
1432
1432
  }
1433
1433
  async isActionTargetVisible(req, id) {
1434
+ return (await this.loadActionTarget(req, id)).visible;
1435
+ }
1436
+ /**
1437
+ * The fence's answer plus the row it read (absent when the resource has no row scope, so
1438
+ * nothing was read). The router hands the row to the handler as `getActionTarget(req)`.
1439
+ */
1440
+ async loadActionTarget(req, id) {
1434
1441
  const meta = this.meta(req);
1435
1442
  const scoped = resolveTenancy(meta, this.tenantField).mode === "scoped";
1436
1443
  const policy = meta?._policyFilters;
1437
- if (!scoped && (!policy || Object.keys(policy).length === 0)) return true;
1444
+ if (!scoped && (!policy || Object.keys(policy).length === 0)) return { visible: true };
1438
1445
  const { doc } = await this.fetchByAnyKey(id, req, this.tenantRepoOptions(req));
1439
- return doc !== null && doc !== void 0;
1446
+ return doc === null || doc === void 0 ? { visible: false } : {
1447
+ visible: true,
1448
+ doc
1449
+ };
1440
1450
  }
1441
1451
  /** `ETag: "<version>"` for a versioned document under optimistic concurrency. */
1442
1452
  etagHeaders(doc) {
@@ -1565,7 +1575,7 @@ var BaseCrudController = class {
1565
1575
  inFlightCacheFills = /* @__PURE__ */ new Map();
1566
1576
  cacheSingleFlight(key, fill) {
1567
1577
  const existing = this.inFlightCacheFills.get(key);
1568
- if (existing) return existing;
1578
+ if (existing !== void 0) return existing;
1569
1579
  const flight = fill().finally(() => {
1570
1580
  this.inFlightCacheFills.delete(key);
1571
1581
  });
@@ -2992,7 +3002,9 @@ function resolveActionTargetFence(resource, actionConfig) {
2992
3002
  if (typeof resource.tenantField === "string" || ctrl !== void 0 && resource.tenantField !== false) throw new Error(`[Arc] Resource '${resource.name}' is tenant-scoped (tenantField '${resource.tenantField === void 0 ? "organizationId (default)" : resource.tenantField}') and declares id-bound actions [${fenced.join(", ")}], but its controller cannot authorize an action target. Use a BaseController with a repository, declare \`tenantField: false\`, or declare \`target: { scope: 'handler', reason }\` on each action.`);
2993
3003
  return;
2994
3004
  }
2995
- return (id, ctx) => check.call(ctrl, ctx, id);
3005
+ const load = ctrl?.loadActionTarget;
3006
+ if (typeof load === "function") return (id, ctx) => load.call(ctrl, ctx, id);
3007
+ return async (id, ctx) => ({ visible: await check.call(ctrl, ctx, id) });
2996
3008
  }
2997
3009
  /**
2998
3010
  * Build the FastifyPluginAsync that materialises a `ResourceDefinition` into
@@ -3072,12 +3084,12 @@ function buildResourcePlugin(resource) {
3072
3084
  extensions: resource.extensions
3073
3085
  });
3074
3086
  if (resource.actions && Object.keys(resource.actions).length > 0) {
3075
- const { createActionRouter } = await import("./createActionRouter-xjqonMRO.mjs").then((n) => n.n);
3087
+ const { createActionRouter } = await import("./createActionRouter-BgPCYU2U.mjs").then((n) => n.n);
3076
3088
  const actionConfig = normalizeActionsToRouterConfig(resource.actions, resource.actionPermissions, resource.tag, resource.permissions, resource.name, typedInstance.log);
3077
3089
  const actionTarget = resolveActionTargetFence(resource, actionConfig);
3078
3090
  createActionRouter(typedInstance, {
3079
3091
  ...actionConfig,
3080
- ...actionTarget ? { isTargetVisible: (id, req) => actionTarget(id, createRequestContext(req)) } : {},
3092
+ ...actionTarget ? { loadTarget: (id, req) => actionTarget(id, createRequestContext(req)) } : {},
3081
3093
  auditActions: Boolean(resource.audit),
3082
3094
  resourceName: resource.name,
3083
3095
  fields: resource.fields,
@@ -3092,7 +3104,7 @@ function buildResourcePlugin(resource) {
3092
3104
  });
3093
3105
  }
3094
3106
  if (resource.aggregations && Object.keys(resource.aggregations).length > 0) {
3095
- const [{ createAggregationRouter }, { adapterSupportsAggregate, ArcAggregationConfigError }] = await Promise.all([import("./createAggregationRouter-zRYWw_5D.mjs"), import("./validate-9yzHC1e2.mjs").then((n) => n.r)]);
3107
+ const [{ createAggregationRouter }, { adapterSupportsAggregate, ArcAggregationConfigError }] = await Promise.all([import("./createAggregationRouter-lNCkDwKe.mjs"), import("./validate-CT4umNhp.mjs").then((n) => n.r)]);
3096
3108
  const repoForAgg = resource.controller?.repository ?? resource.repository;
3097
3109
  if (!adapterSupportsAggregate(repoForAgg)) {
3098
3110
  const undispatchable = Object.entries(resource.aggregations).filter(([, cfg]) => !cfg.materialized).map(([name]) => name);
@@ -1,10 +1,10 @@
1
1
 
2
2
  import { t as AnyRecord } from "../base-CZyixEQR.mjs";
3
- import { Et as RouteDefinition, J as MiddlewareConfig, U as PresetHook, X as RouteSchemaOptions } from "../index-mqaqZNpe.mjs";
3
+ import { Et as RouteDefinition, J as MiddlewareConfig, U as PresetHook, X as RouteSchemaOptions } from "../index-WH7xgvxS.mjs";
4
4
  import { i as errorHandlerPlugin, n as ErrorMapper, r as defaultIsDuplicateKeyError, t as ErrorHandlerOptions } from "../errorHandler--4rSMMvq.mjs";
5
5
  import { C as _default$8, E as _default$3, S as SchedulesPluginOptions, T as HealthOptions, b as ScheduleDefinition, w as HealthCheck, x as ScheduleStats } from "../types-BJ-2XqVF.mjs";
6
- import { i as _default, n as ArcCorePluginOptions, r as PluginMeta, t as ArcCore } from "../fastify-augmentation-DhUJ-mvo.mjs";
7
- import { _ as _default$2, a as MetricsOptions, c as RealtimeOptions, d as _default$9, f as CachingOptions, g as ShutdownState, h as GracefulShutdownOptions, i as MetricsCollector, l as _default$6, m as _default$1, n as _default$10, o as _default$4, p as CachingRule, r as MetricEntry, s as ChangeOperation, t as VersioningOptions, u as SSEOptions } from "../versioning-Bsb51gGT.mjs";
6
+ import { i as _default, n as ArcCorePluginOptions, r as PluginMeta, t as ArcCore } from "../fastify-augmentation-DRlCIWE9.mjs";
7
+ import { _ as ShutdownState, a as MetricsOptions, c as RealtimeOptions, d as SSEStats, f as _default$9, g as GracefulShutdownOptions, h as _default$1, i as MetricsCollector, l as _default$6, m as CachingRule, n as _default$10, o as _default$4, p as CachingOptions, r as MetricEntry, s as ChangeOperation, t as VersioningOptions, u as SSEOptions, v as _default$2 } from "../versioning-Bqm_57Qt.mjs";
8
8
  import { t as TracingOptions } from "../tracing-Dro5eH6j.mjs";
9
9
  import { PaginatedResult } from "@classytic/repo-core/pagination";
10
10
  import { FastifyInstance, FastifyPluginAsync } from "fastify";
@@ -57,7 +57,7 @@ interface ArcPlugin<TRootOpts extends object = AnyRecord, TResourceOpts extends
57
57
  * @param definition - Plugin setup functions
58
58
  * @returns ArcPlugin with forRoot() and forResource() methods
59
59
  */
60
- declare function createPlugin<TRootOpts extends object = AnyRecord, TResourceOpts extends object = AnyRecord>(name: string, definition: CreatePluginDefinition<TRootOpts, TResourceOpts>): ArcPlugin<TRootOpts, TResourceOpts>;
60
+ export declare function createPlugin<TRootOpts extends object = AnyRecord, TResourceOpts extends object = AnyRecord>(name: string, definition: CreatePluginDefinition<TRootOpts, TResourceOpts>): ArcPlugin<TRootOpts, TResourceOpts>;
61
61
  //#endregion
62
62
  //#region src/plugins/pressure.d.ts
63
63
  /**
@@ -176,7 +176,7 @@ declare module "fastify" {
176
176
  }
177
177
  }
178
178
  declare function replyHelpersPluginFn(fastify: FastifyInstance): Promise<void>;
179
- declare const replyHelpersPlugin: typeof replyHelpersPluginFn;
179
+ export declare const replyHelpersPlugin: typeof replyHelpersPluginFn;
180
180
  //#endregion
181
181
  //#region src/plugins/requestId.d.ts
182
182
  interface RequestIdOptions {
@@ -214,16 +214,16 @@ declare module "fastify" {
214
214
  * (repeated headers) are rejected outright — a client sending multiple
215
215
  * request-id headers is not tracing in good faith.
216
216
  */
217
- declare function sanitizeRequestId(value: unknown): string | undefined;
217
+ export declare function sanitizeRequestId(value: unknown): string | undefined;
218
218
  /**
219
219
  * Build a Fastify `genReqId` function: adopt a sanitized incoming request-id
220
220
  * header, or generate one. Wire this into the `Fastify()` constructor so
221
221
  * `request.id`, `request.log`'s `reqId` binding, and the echoed response
222
222
  * header all agree — `createApp` does this automatically.
223
223
  */
224
- declare function createRequestIdGenerator(opts?: Pick<RequestIdOptions, "header" | "generator">): (req: {
224
+ export declare function createRequestIdGenerator(opts?: Pick<RequestIdOptions, "header" | "generator">): (req: {
225
225
  headers: Record<string, string | string[] | undefined>;
226
226
  }) => string;
227
227
  declare const _default$7: FastifyPluginAsync<RequestIdOptions>;
228
228
  //#endregion
229
- export { type ArcCore, type ArcCorePluginOptions, type ArcPlugin, type CachingOptions, type CachingRule, type ChangeOperation, type CreatePluginDefinition, type ErrorHandlerOptions, type ErrorMapper, type GracefulShutdownOptions, type HealthCheck, type HealthOptions, type MetricEntry, type MetricsCollector, type MetricsOptions, type PluginMeta, type PluginResourceResult, type PressureApi, type PressureOptions, type PressureSignal, type PressureSnapshot, type PressureState, type PressureThresholds, type RealtimeOptions, type RequestIdOptions, type SSEOptions, type ScheduleDefinition, type ScheduleStats, type SchedulesPluginOptions, type ShutdownState, type TracingOptions, type VersioningOptions, _default as arcCorePlugin, _default$1 as cachingPlugin, createPlugin, createRequestIdGenerator, defaultIsDuplicateKeyError, errorHandlerPlugin, _default$2 as gracefulShutdownPlugin, _default$3 as healthPlugin, _default$4 as metricsPlugin, _default$5 as pressurePlugin, _default$6 as realtimePlugin, replyHelpersPlugin, _default$7 as requestIdPlugin, sanitizeRequestId, _default$8 as schedulesPlugin, _default$9 as ssePlugin, _default$10 as versioningPlugin };
229
+ export { type ArcCore, type ArcCorePluginOptions, type ArcPlugin, type CachingOptions, type CachingRule, type ChangeOperation, type CreatePluginDefinition, type ErrorHandlerOptions, type ErrorMapper, type GracefulShutdownOptions, type HealthCheck, type HealthOptions, type MetricEntry, type MetricsCollector, type MetricsOptions, type PluginMeta, type PluginResourceResult, type PressureApi, type PressureOptions, type PressureSignal, type PressureSnapshot, type PressureState, type PressureThresholds, type RealtimeOptions, type RequestIdOptions, type SSEOptions, type SSEStats, type ScheduleDefinition, type ScheduleStats, type SchedulesPluginOptions, type ShutdownState, type TracingOptions, type VersioningOptions, _default as arcCorePlugin, _default$1 as cachingPlugin, defaultIsDuplicateKeyError, errorHandlerPlugin, _default$2 as gracefulShutdownPlugin, _default$3 as healthPlugin, _default$4 as metricsPlugin, _default$5 as pressurePlugin, _default$6 as realtimePlugin, _default$7 as requestIdPlugin, _default$8 as schedulesPlugin, _default$9 as ssePlugin, _default$10 as versioningPlugin };
@@ -1,20 +1,20 @@
1
- /*! @classytic/arc v2.43.0 | MIT | https://classytic.com */
2
- import { m as MUTATION_OPERATIONS } from "../constants-Cu7Mx7_U.mjs";
3
- import { t as arcLog } from "../logger-DXjfIqjV.mjs";
4
- import { c as getOrgId } from "../types-Bk9NOgOC.mjs";
5
- import { n as requestContext } from "../requestContext-Dsu9P1bV.mjs";
6
- import { t as hasEvents } from "../typeGuards-CySF12G-.mjs";
7
- import { t as HookSystem } from "../HookSystem-B6UaKRbF.mjs";
8
- import { t as ResourceRegistry } from "../ResourceRegistry-CuCARu2B.mjs";
9
- import { c as createRequestIdGenerator, l as requestId_default, n as health_default, u as sanitizeRequestId } from "../health-DqbsG-_w.mjs";
10
- import { t as caching_default } from "../caching-Cc2M1DwO.mjs";
11
- import { n as errorHandlerPlugin, t as defaultIsDuplicateKeyError } from "../errorHandler-BnfDviL1.mjs";
12
- import { t as metrics_default } from "../metrics-CWI11eRu.mjs";
13
- import { t as realtime_default } from "../realtime-DmPE9S54.mjs";
14
- import { t as replyHelpersPlugin } from "../replyHelpers-CG_VtVgS.mjs";
15
- import { t as schedules_default } from "../schedules-C-OpmHBq.mjs";
16
- import { t as sse_default } from "../sse-CYzQBVFe.mjs";
17
- import { t as versioning_default } from "../versioning-fhhWHV74.mjs";
1
+ /*! @classytic/arc v2.45.0 | MIT | https://classytic.com */
2
+ import { m as MUTATION_OPERATIONS } from "../constants-B90SnSQn.mjs";
3
+ import { t as arcLog } from "../logger-vxu0DXf_.mjs";
4
+ import { c as getOrgId } from "../types-4JKkSvds.mjs";
5
+ import { n as requestContext } from "../requestContext-B8JKbeb7.mjs";
6
+ import { t as hasEvents } from "../typeGuards-CtZJypJO.mjs";
7
+ import { t as HookSystem } from "../HookSystem-CtnnYHME.mjs";
8
+ import { t as ResourceRegistry } from "../ResourceRegistry-BNoHOx-D.mjs";
9
+ import { c as createRequestIdGenerator, l as requestId_default, n as health_default, u as sanitizeRequestId } from "../health-pLbfckGB.mjs";
10
+ import { t as caching_default } from "../caching-TQfW2QX7.mjs";
11
+ import { n as errorHandlerPlugin, t as defaultIsDuplicateKeyError } from "../errorHandler-DbHGwrQM.mjs";
12
+ import { t as metrics_default } from "../metrics-wfr7XFE7.mjs";
13
+ import { t as realtime_default } from "../realtime-MPj6eIoV.mjs";
14
+ import { t as replyHelpersPlugin } from "../replyHelpers-BW_p67QD.mjs";
15
+ import { t as schedules_default } from "../schedules-Dr9gNFzx.mjs";
16
+ import { t as sse_default } from "../sse-D8AgoUN3.mjs";
17
+ import { t as versioning_default } from "../versioning-JIqxO64K.mjs";
18
18
  import fp from "fastify-plugin";
19
19
  import { performance as performance$1 } from "node:perf_hooks";
20
20
  //#region src/core/arcCorePlugin.ts
@@ -1,13 +1,13 @@
1
1
 
2
2
  import { FastifyPluginAsync, FastifyRequest } from "fastify";
3
3
  //#region src/plugins/response-cache.d.ts
4
- interface ResponseCacheRule {
4
+ export interface ResponseCacheRule {
5
5
  /** Path prefix to match (e.g., '/api/products') */
6
6
  match: string;
7
7
  /** TTL in seconds for this path (0 = don't cache) */
8
8
  ttl: number;
9
9
  }
10
- interface ResponseCacheOptions {
10
+ export interface ResponseCacheOptions {
11
11
  /** Maximum number of cached entries (default: 500). LRU eviction when exceeded. */
12
12
  maxEntries?: number;
13
13
  /** Default TTL in seconds (default: 30). Set to 0 to require explicit rules. */
@@ -46,7 +46,7 @@ interface ResponseCacheOptions {
46
46
  patterns?: Record<string, string[]>;
47
47
  };
48
48
  }
49
- interface ResponseCacheStats {
49
+ export interface ResponseCacheStats {
50
50
  entries: number;
51
51
  maxEntries: number;
52
52
  hits: number;
@@ -85,6 +85,5 @@ declare module "fastify" {
85
85
  __arcCacheTTL?: number;
86
86
  }
87
87
  }
88
- declare const responseCachePlugin: FastifyPluginAsync<ResponseCacheOptions>;
89
- //#endregion
90
- export { ResponseCacheOptions, ResponseCacheRule, ResponseCacheStats, responseCachePlugin };
88
+ export declare const responseCachePlugin: FastifyPluginAsync<ResponseCacheOptions>;
89
+ //#endregion
@@ -1,7 +1,7 @@
1
- /*! @classytic/arc v2.43.0 | MIT | https://classytic.com */
2
- import { n as declareRuntimeCapability } from "../runtimeCapabilities-0tccjRlj.mjs";
3
- import { t as hasEvents } from "../typeGuards-CySF12G-.mjs";
4
- import { n as evictToSize, r as touch, t as assertCapacity } from "../boundedMap-BULzfXYU.mjs";
1
+ /*! @classytic/arc v2.45.0 | MIT | https://classytic.com */
2
+ import { n as declareRuntimeCapability } from "../runtimeCapabilities-C7gAbIxC.mjs";
3
+ import { t as hasEvents } from "../typeGuards-CtZJypJO.mjs";
4
+ import { n as evictToSize, r as touch, t as assertCapacity } from "../boundedMap-DQfXgxMo.mjs";
5
5
  import fp from "fastify-plugin";
6
6
  //#region src/plugins/response-cache.ts
7
7
  /**
@@ -1,4 +1,4 @@
1
- /*! @classytic/arc v2.43.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.45.0 | MIT | https://classytic.com */
2
2
  import { createRequire } from "node:module";
3
3
  import fp from "fastify-plugin";
4
4
  //#region src/plugins/tracing.ts
@@ -59,7 +59,7 @@ try {
59
59
  function createTracerProvider(options) {
60
60
  if (!isAvailable || !NodeTracerProvider || !BatchSpanProcessor || !OTLPTraceExporter) return null;
61
61
  const { serviceName = "@classytic/arc", serviceVersion, exporterUrl = "http://localhost:4318/v1/traces" } = options;
62
- const resolvedVersion = serviceVersion ?? "2.43.0";
62
+ const resolvedVersion = serviceVersion ?? "2.45.0";
63
63
  const exporter = new OTLPTraceExporter({ url: exporterUrl });
64
64
  const provider = new NodeTracerProvider({ resource: { attributes: {
65
65
  "service.name": serviceName,
@@ -1,4 +1,4 @@
1
- /*! @classytic/arc v2.43.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.45.0 | MIT | https://classytic.com */
2
2
  //#region src/utils/pluralize.ts
3
3
  /**
4
4
  * Lightweight English pluralization for the Arc CLI.
@@ -1,15 +1,15 @@
1
1
 
2
2
  import { i as RequestScope } from "../types-Ddl9OjmE.mjs";
3
3
  import { l as PermissionCheck } from "../base-CZyixEQR.mjs";
4
- import { W as PresetResult } from "../index-mqaqZNpe.mjs";
4
+ import { W as PresetResult } from "../index-WH7xgvxS.mjs";
5
5
  import { a as StorageReadResult, i as StorageReadRange, n as StorageContext, o as StorageUploadInput, r as StorageFile, t as Storage } from "../storage-Cx9Sz3Ou.mjs";
6
6
  //#region src/presets/filesUpload.d.ts
7
- interface FilesUploadPresetRoutes {
7
+ export interface FilesUploadPresetRoutes {
8
8
  upload?: boolean;
9
9
  read?: boolean;
10
10
  delete?: boolean;
11
11
  }
12
- interface FilesUploadPresetPermissions {
12
+ export interface FilesUploadPresetPermissions {
13
13
  upload?: PermissionCheck;
14
14
  read?: PermissionCheck;
15
15
  delete?: PermissionCheck;
@@ -27,8 +27,8 @@ interface FilesUploadPresetPermissions {
27
27
  * - function: custom policy. Return a string to *transform* the filename,
28
28
  * `false` to reject (triggers `ValidationError`), or `true`/`void` to accept.
29
29
  */
30
- type FilenamePolicy = boolean | "*" | ((filename: string) => string | boolean | undefined);
31
- interface FilesUploadPresetOptions {
30
+ export type FilenamePolicy = boolean | "*" | ((filename: string) => string | boolean | undefined);
31
+ export interface FilesUploadPresetOptions {
32
32
  /** Any implementation of the `Storage` interface. App owns it. */
33
33
  storage: Storage;
34
34
  /** Multipart form field name. Default: `'file'`. */
@@ -66,6 +66,6 @@ interface FilesUploadPresetOptions {
66
66
  * envelope. Upload still returns the standard `{ success: true, data }`
67
67
  * envelope manually because the response is structured metadata, not bytes.
68
68
  */
69
- declare function filesUploadPreset(options: FilesUploadPresetOptions): PresetResult;
69
+ export declare function filesUploadPreset(options: FilesUploadPresetOptions): PresetResult;
70
70
  //#endregion
71
- export { FilenamePolicy, FilesUploadPresetOptions, FilesUploadPresetPermissions, FilesUploadPresetRoutes, type Storage, type StorageContext, type StorageFile, type StorageReadRange, type StorageReadResult, type StorageUploadInput, filesUploadPreset };
71
+ export type { Storage, StorageContext, StorageFile, StorageReadRange, StorageReadResult, StorageUploadInput };
@@ -1,8 +1,8 @@
1
- /*! @classytic/arc v2.43.0 | MIT | https://classytic.com */
2
- import { i as NotFoundError, u as ValidationError } from "../errors-CtrywMHP.mjs";
3
- import { c as getOrgId, g as getUserId } from "../types-Bk9NOgOC.mjs";
4
- import { B as requireAuth, F as allowPublic } from "../permissions-Cm0uYHvd.mjs";
5
- import { t as multipartBody } from "../multipartBody-CXM2a-Dy.mjs";
1
+ /*! @classytic/arc v2.45.0 | MIT | https://classytic.com */
2
+ import { i as NotFoundError, u as ValidationError } from "../errors-C9G4A8cN.mjs";
3
+ import { c as getOrgId, g as getUserId } from "../types-4JKkSvds.mjs";
4
+ import { B as requireAuth, F as allowPublic } from "../permissions-IdHJ0_5V.mjs";
5
+ import { t as multipartBody } from "../multipartBody-NHGOuUnG.mjs";
6
6
  //#region src/presets/filesUpload.ts
7
7
  const DEFAULT_FIELD_NAME = "file";
8
8
  const DEFAULT_MAX_FILE_SIZE = 10485760;