@classytic/arc 2.43.0 → 2.44.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 (212) hide show
  1. package/dist/{EventTransport-tzA7CAB4.mjs → EventTransport-DZWDsaPa.mjs} +2 -2
  2. package/dist/{HookSystem-B6UaKRbF.mjs → HookSystem-yjEgn7Cm.mjs} +2 -2
  3. package/dist/{ResourceRegistry-CuCARu2B.mjs → ResourceRegistry-DJxHUpE4.mjs} +2 -2
  4. package/dist/acquire-BozJ-9yt.mjs +35 -0
  5. package/dist/{actionPermissions-BotX1YOa.mjs → actionPermissions-5N04zBL4.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 +11 -8
  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-wX3SA9w_.mjs} +4 -4
  15. package/dist/{boundedMap-BULzfXYU.mjs → boundedMap-DWiKW7lP.mjs} +1 -1
  16. package/dist/{buildHandler-CRQ8EcX5.mjs → buildHandler-Bswu_vNb.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-Drp68DIS.mjs} +2 -2
  20. package/dist/{claimed-B10RTfkM.mjs → claimed-DYvQoZLv.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-B2QHb6u6.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-COcqo0Cp.mjs} +13 -4
  40. package/dist/{createActionRouter-xjqonMRO.mjs → createActionRouter-zG13rpPJ.mjs} +18 -8
  41. package/dist/{createAggregationRouter-zRYWw_5D.mjs → createAggregationRouter-CWRz96Vr.mjs} +7 -7
  42. package/dist/{createApp-D-953ZAq.mjs → createApp-BGLYtErt.mjs} +34 -32
  43. package/dist/{createMcpServer-C9cxS8zt.d.mts → createMcpServer-DSztofa9.d.mts} +1 -1
  44. package/dist/{defineAggregation-Bm8RjMbq.mjs → defineAggregation--3xguLkk.mjs} +1 -1
  45. package/dist/{defineResource-DIC7JZGU.mjs → defineResource-gUp9ug66.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-BG4gnMsJ.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-COHw3N1b.mjs} +3 -3
  54. package/dist/{errors-CtrywMHP.mjs → errors-CW4anJBy.mjs} +1 -1
  55. package/dist/{eventPlugin-Q6BhzHzs.mjs → eventPlugin-BweHAVws.mjs} +8 -8
  56. package/dist/{eventTypes-Cdhm6ZlV.mjs → eventTypes-N4-omQFR.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-A5crhsJb.mjs} +1 -1
  66. package/dist/{filter-merge-IpGywvym.mjs → filter-merge-DGM-GQ1J.mjs} +1 -1
  67. package/dist/{generate-DRTkLlIl.mjs → generate-BXKo2Gc8.mjs} +2 -2
  68. package/dist/{headers-BbkIF6vA.mjs → headers-DKZQKL-Z.mjs} +2 -2
  69. package/dist/{health-D-Ft6JM6.mjs → health-BYAwA6YS.mjs} +1 -1
  70. package/dist/{health-DqbsG-_w.mjs → health-CrqUp3sz.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-C8zVGYsk.d.mts → index-BkV55WlV.d.mts} +3 -3
  79. package/dist/{index-JdbZAIsm.d.mts → index-CUJvoyw3.d.mts} +1 -1
  80. package/dist/{index-mqaqZNpe.d.mts → index-WH7xgvxS.d.mts} +52 -1
  81. package/dist/index.d.mts +5 -5
  82. package/dist/index.mjs +11 -11
  83. package/dist/{init-B_oUYDXI.mjs → init-BPzK5Lnr.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-YIq-vGLv.mjs} +2 -2
  104. package/dist/{keys-B2KtgMLJ.mjs → keys-CpoiZ8hU.mjs} +1 -1
  105. package/dist/{loadResources-Dn4lalw2.mjs → loadResources-6jO52-RR.mjs} +3 -3
  106. package/dist/{loadResourcesFromEntry-3sLYbuse.mjs → loadResourcesFromEntry-MP8xEppu.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-D4V1zGLI.mjs} +1 -1
  110. package/dist/{mcpPlugin-C08HalN5.mjs → mcpPlugin-srPc7ItN.mjs} +42 -29
  111. package/dist/{memory-9Cp7611C.mjs → memory-CTa5pOCW.mjs} +3 -3
  112. package/dist/{metrics-CWI11eRu.mjs → metrics-DsZrvnpB.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--L0iBIZz.mjs} +1 -1
  118. package/dist/mongodb-memory-server-CHhYSq5y.mjs +35539 -0
  119. package/dist/mongoose-CYJCLyi-.mjs +67451 -0
  120. package/dist/{multiTenant-cY0FkDiA.d.mts → multiTenant-CAtYlW6H.d.mts} +1 -1
  121. package/dist/{multipartBody-CXM2a-Dy.mjs → multipartBody-Cc7eZ9cq.mjs} +1 -1
  122. package/dist/node-D8UZv_8c.mjs +41236 -0
  123. package/dist/{openapi-DT_G4VhY.mjs → openapi-CMegfsm8.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-Ryk270jd.mjs} +9 -9
  127. package/dist/permissions/index.mjs +7 -7
  128. package/dist/{permissions-Cm0uYHvd.mjs → permissions-C5ijIz5Q.mjs} +9 -9
  129. package/dist/{pipe-BqeGT6UO.mjs → pipe-D81zMtWs.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-CJGMKoui.mjs} +1 -1
  133. package/dist/{plugin-BccET1tL.mjs → plugin-DALd9dcF.mjs} +39 -27
  134. package/dist/plugins/index.d.mts +7 -7
  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-COUNYo3d.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-CONf2Qem.mjs} +4 -4
  149. package/dist/{projection-Ce4aQhQk.mjs → projection-wFoLqdss.mjs} +2 -2
  150. package/dist/{queryCachePlugin-CFWNH8aT.mjs → queryCachePlugin-BATECpyh.mjs} +6 -6
  151. package/dist/{rateLimitKey-C4O-kPm0.mjs → rateLimitKey-DVEZ_UpV.mjs} +1 -1
  152. package/dist/{realtime-DmPE9S54.mjs → realtime-xyubMKSB.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-Bdzg-hdm.mjs} +5 -4
  157. package/dist/{renewingLease-qODa7KJQ.mjs → renewingLease-BFJxGPuh.mjs} +1 -1
  158. package/dist/{replyHelpers-CG_VtVgS.mjs → replyHelpers-Bnc6lJyy.mjs} +2 -2
  159. package/dist/{requestContext-Dsu9P1bV.mjs → requestContext-C10UeFe5.mjs} +1 -1
  160. package/dist/{requirement-KDdoRcOP.mjs → requirement-Bu50QALH.mjs} +1 -1
  161. package/dist/{resourceRateLimit-dSjVr1pk.mjs → resourceRateLimit-urWPJxrt.mjs} +2 -2
  162. package/dist/rolldown-runtime-MYrLNGnq.mjs +45 -0
  163. package/dist/{routeValidator-D36SW8qt.mjs → routeValidator-DHtpzrzk.mjs} +1 -1
  164. package/dist/{runtimeCapabilities-0tccjRlj.mjs → runtimeCapabilities-DIMKMV2G.mjs} +1 -1
  165. package/dist/{schedules-C-OpmHBq.mjs → schedules-CKTs5ys8.mjs} +5 -5
  166. package/dist/{schemaConverter-BORek3O-.mjs → schemaConverter-BVjkQ5DD.mjs} +2 -2
  167. package/dist/{schemaIR-C7Vbp71I.mjs → schemaIR-BA0Hb21Y.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-DINaj7Ax.mjs} +4 -4
  175. package/dist/{shutdown-MqA81z_P.mjs → shutdown-LpLMH8T1.mjs} +1 -1
  176. package/dist/{simpleEqualityMatcher-auW8QjXN.mjs → simpleEqualityMatcher-DbwIM1f1.mjs} +1 -1
  177. package/dist/{sse-CYzQBVFe.mjs → sse-BzJFPX_1.mjs} +7 -7
  178. package/dist/{sseStream-B5_Afiqn.mjs → sseStream-DQChzGTs.mjs} +2 -2
  179. package/dist/{store-helpers-BOzk-CuX.mjs → store-helpers-Coj9RhOZ.mjs} +1 -1
  180. package/dist/{streaming-DjTQhZrN.mjs → streaming-JzB5CAga.mjs} +1 -1
  181. package/dist/{subscriberIdentity-CW39uA8G.mjs → subscriberIdentity-DeyppIif.mjs} +1 -1
  182. package/dist/{tenancy--ed9eH_z.mjs → tenancy-DxV8OuX2.mjs} +2 -2
  183. package/dist/{tenantPreparation-BKon6Yox.mjs → tenantPreparation-CBvvAcAj.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-CntavTlR.mjs} +1 -1
  195. package/dist/{transactionContext-DjFkrNG6.mjs → transactionContext-orvnGu4F.mjs} +1 -1
  196. package/dist/{typeGuards-CySF12G-.mjs → typeGuards-kEaP_WmO.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-B4Aq4Sdj.d.mts → types-D3Ixsh00.d.mts} +1 -1
  201. package/dist/{types-Bk9NOgOC.mjs → types-fvO6Ovzx.mjs} +4 -4
  202. package/dist/usage/index.d.mts +4 -4
  203. package/dist/usage/index.mjs +4 -4
  204. package/dist/{userHelpers-aklawRaK.mjs → userHelpers-C76zD5pa.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-BpkVZ8rB.mjs} +4 -4
  208. package/dist/{validate-9yzHC1e2.mjs → validate-CWp-lsrm.mjs} +3 -3
  209. package/dist/{versioning-fhhWHV74.mjs → versioning-CHhL9P3o.mjs} +3 -3
  210. package/dist/{workScope-zpPyge4t.mjs → workScope-n9a7d_lZ.mjs} +2 -2
  211. package/package.json +45 -51
  212. package/dist/rolldown-runtime-D1w9Y1VJ.mjs +0 -15
@@ -33,15 +33,15 @@ interface ScimResourceMapping {
33
33
  /** Custom outbound transform — runs after attribute mapping. */
34
34
  toScim?: (resource: Record<string, unknown>, mapped: Record<string, unknown>) => Record<string, unknown>;
35
35
  }
36
- declare const SCIM_USER_SCHEMA = "urn:ietf:params:scim:schemas:core:2.0:User";
37
- declare const SCIM_GROUP_SCHEMA = "urn:ietf:params:scim:schemas:core:2.0:Group";
38
- declare const SCIM_ENTERPRISE_USER_SCHEMA = "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User";
39
- declare const DEFAULT_USER_MAPPING: ScimResourceMapping;
40
- declare const DEFAULT_GROUP_MAPPING: ScimResourceMapping;
36
+ export declare const SCIM_USER_SCHEMA = "urn:ietf:params:scim:schemas:core:2.0:User";
37
+ export declare const SCIM_GROUP_SCHEMA = "urn:ietf:params:scim:schemas:core:2.0:Group";
38
+ export declare const SCIM_ENTERPRISE_USER_SCHEMA = "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User";
39
+ export declare const DEFAULT_USER_MAPPING: ScimResourceMapping;
40
+ export declare const DEFAULT_GROUP_MAPPING: ScimResourceMapping;
41
41
  /** Translate inbound SCIM JSON → resource shape. */
42
- declare function scimToResource(scim: Record<string, unknown>, mapping: ScimResourceMapping): Record<string, unknown>;
42
+ export declare function scimToResource(scim: Record<string, unknown>, mapping: ScimResourceMapping): Record<string, unknown>;
43
43
  /** Translate resource → SCIM JSON. */
44
- declare function resourceToScim(resource: Record<string, unknown>, mapping: ScimResourceMapping, baseUrl: string): Record<string, unknown>;
44
+ export declare function resourceToScim(resource: Record<string, unknown>, mapping: ScimResourceMapping, baseUrl: string): Record<string, unknown>;
45
45
  //#endregion
46
46
  //#region src/scim/types.d.ts
47
47
  /**
@@ -138,7 +138,7 @@ interface ScimObservedEvent {
138
138
  * ```
139
139
  */
140
140
  type ScimType = "invalidFilter" | "tooMany" | "uniqueness" | "mutability" | "invalidSyntax" | "invalidPath" | "noTarget" | "invalidValue" | "invalidVers" | "sensitive";
141
- declare class ScimError extends Error {
141
+ export declare class ScimError extends Error {
142
142
  readonly statusCode: number;
143
143
  readonly scimType?: ScimType;
144
144
  constructor(statusCode: number, scimType: ScimType | undefined, detail: string);
@@ -197,9 +197,9 @@ type FilterNode = {
197
197
  * `undefined` to deny (yields 400 invalidFilter). Use `IDENTITY_MAP` when
198
198
  * the resource exposes SCIM-named attributes directly.
199
199
  */
200
- declare function parseScimFilter(filter: string, mapAttr: (scimAttr: string) => string | undefined): Record<string, unknown>;
200
+ export declare function parseScimFilter(filter: string, mapAttr: (scimAttr: string) => string | undefined): Record<string, unknown>;
201
201
  /** Pass-through mapper for resources that already use SCIM attribute names. */
202
- declare const IDENTITY_MAP: (a: string) => string;
202
+ export declare const IDENTITY_MAP: (a: string) => string;
203
203
  //#endregion
204
204
  //#region src/scim/patch.d.ts
205
205
  /**
@@ -248,17 +248,17 @@ interface ScimUpdate {
248
248
  /** Field unset (remove without filter). */
249
249
  $unset: Record<string, true>;
250
250
  }
251
- declare function parseScimPatch(req: ScimPatchRequest): ScimUpdate;
251
+ export declare function parseScimPatch(req: ScimPatchRequest): ScimUpdate;
252
252
  /**
253
253
  * Flatten a {@link ScimUpdate} into a plain `{ field: value }` object suitable
254
254
  * for arc resource `PATCH` handlers that expect a partial document. Drops
255
255
  * `$push` / `$pull` / `$unset` semantics — use {@link parseScimPatch} directly
256
256
  * when the host needs the full op stream (e.g. to issue array mutations).
257
257
  */
258
- declare function scimUpdateToFlatPatch(update: ScimUpdate): Record<string, unknown>;
258
+ export declare function scimUpdateToFlatPatch(update: ScimUpdate): Record<string, unknown>;
259
259
  //#endregion
260
260
  //#region src/scim/index.d.ts
261
261
  declare const scimPlugin: FastifyPluginAsync<ScimPluginOptions>;
262
262
  declare const _default: FastifyPluginAsync<ScimPluginOptions>;
263
263
  //#endregion
264
- export { DEFAULT_GROUP_MAPPING, DEFAULT_USER_MAPPING, type FilterNode, IDENTITY_MAP, SCIM_ENTERPRISE_USER_SCHEMA, SCIM_GROUP_SCHEMA, SCIM_USER_SCHEMA, ScimError, type ScimObservedEvent, type ScimPatchRequest, type ScimPluginOptions, type ScimResourceBinding, type ScimResourceMapping, type ScimType, type ScimUpdate, _default as default, parseScimFilter, parseScimPatch, resourceToScim, scimPlugin, scimToResource, scimUpdateToFlatPatch };
264
+ export { type FilterNode, type ScimObservedEvent, type ScimPatchRequest, type ScimPluginOptions, type ScimResourceBinding, type ScimResourceMapping, type ScimType, type ScimUpdate, _default as default, scimPlugin };
@@ -1,5 +1,5 @@
1
- /*! @classytic/arc v2.43.0 | MIT | https://classytic.com */
2
- import { t as parseJsonBody } from "../jsonBody-B4YVGcql.mjs";
1
+ /*! @classytic/arc v2.44.0 | MIT | https://classytic.com */
2
+ import { t as parseJsonBody } from "../jsonBody-YIq-vGLv.mjs";
3
3
  import fp from "fastify-plugin";
4
4
  //#region src/scim/errors.ts
5
5
  var ScimError = class extends Error {
@@ -11,7 +11,7 @@ interface TenantKeyGeneratorOptions {
11
11
  /** Custom strategy — overrides default scope-based logic */
12
12
  strategy?: (ctx: RateLimitKeyContext) => string;
13
13
  }
14
- declare function createTenantKeyGenerator(opts?: TenantKeyGeneratorOptions): (ctx: RateLimitKeyContext) => string;
14
+ export declare function createTenantKeyGenerator(opts?: TenantKeyGeneratorOptions): (ctx: RateLimitKeyContext) => string;
15
15
  //#endregion
16
16
  //#region src/scope/resolveOrgFromHeader.d.ts
17
17
  interface ResolveOrgFromHeaderOptions {
@@ -28,6 +28,6 @@ interface ResolveOrgFromHeaderOptions {
28
28
  * If the header is present and user is a member, sets `request.scope` to `member`.
29
29
  * If the header is absent, scope stays as-is (typically `authenticated`).
30
30
  */
31
- declare function resolveOrgFromHeader(options: ResolveOrgFromHeaderOptions): (request: FastifyRequest, reply: FastifyReply) => Promise<void>;
31
+ export declare function resolveOrgFromHeader(options: ResolveOrgFromHeaderOptions): (request: FastifyRequest, reply: FastifyReply) => Promise<void>;
32
32
  //#endregion
33
- export { AUTHENTICATED_SCOPE, type ElevationEvent, type ElevationOptions, type Mandate, PUBLIC_SCOPE, type RateLimitKeyContext, type RequestScope, type ResolveOrgFromHeaderOptions, type ScopeFirstCtx, type ScopeFirstCtxOptions, type ScopeFirstCtxRequest, type TenantKeyGeneratorOptions, createTenantKeyGenerator, _default as elevationPlugin, getAncestorOrgIds, getClientId, getDPoPJkt, getMandate, getOrgContext, getOrgId, getOrgRoles, getRequestScope, getScopeContext, getScopeContextMap, getServiceScopes, getTeamId, getTenantFromRequest, getUserId, getUserRoles, hasOrgAccess, isAuthenticated, isElevated, isMember, isOrgInScope, isService, requireClientId, requireOrgId, requireTeamId, requireUserId, resolveOrgFromHeader, scopeFirstCtx };
33
+ export { AUTHENTICATED_SCOPE, type ElevationEvent, type ElevationOptions, type Mandate, PUBLIC_SCOPE, type RateLimitKeyContext, type RequestScope, type ResolveOrgFromHeaderOptions, type ScopeFirstCtx, type ScopeFirstCtxOptions, type ScopeFirstCtxRequest, type TenantKeyGeneratorOptions, _default as elevationPlugin, getAncestorOrgIds, getClientId, getDPoPJkt, getMandate, getOrgContext, getOrgId, getOrgRoles, getRequestScope, getScopeContext, getScopeContextMap, getServiceScopes, getTeamId, getTenantFromRequest, getUserId, getUserRoles, hasOrgAccess, isAuthenticated, isElevated, isMember, isOrgInScope, isService, requireClientId, requireOrgId, requireTeamId, requireUserId, scopeFirstCtx };
@@ -1,6 +1,6 @@
1
- /*! @classytic/arc v2.43.0 | MIT | https://classytic.com */
2
- import { C as isService, D as requireUserId, E as requireTeamId, O as scopeFirstCtx, S as isOrgInScope, T as requireOrgId, _ as getUserRoles, a as getDPoPJkt, b as isElevated, c as getOrgId, d as getScopeContext, f as getScopeContextMap, g as getUserId, h as getTenantFromRequest, i as getClientId, l as getOrgRoles, m as getTeamId, n as PUBLIC_SCOPE, o as getMandate, p as getServiceScopes, r as getAncestorOrgIds, s as getOrgContext, t as AUTHENTICATED_SCOPE, u as getRequestScope, v as hasOrgAccess, w as requireClientId, x as isMember, y as isAuthenticated } from "../types-Bk9NOgOC.mjs";
3
- import { t as createTenantKeyGenerator } from "../rateLimitKey-C4O-kPm0.mjs";
4
- import { t as elevation_default } from "../elevation-DG8SrLN-.mjs";
5
- import { t as resolveOrgFromHeader } from "../scope-DQthe88b.mjs";
1
+ /*! @classytic/arc v2.44.0 | MIT | https://classytic.com */
2
+ import { C as isService, D as requireUserId, E as requireTeamId, O as scopeFirstCtx, S as isOrgInScope, T as requireOrgId, _ as getUserRoles, a as getDPoPJkt, b as isElevated, c as getOrgId, d as getScopeContext, f as getScopeContextMap, g as getUserId, h as getTenantFromRequest, i as getClientId, l as getOrgRoles, m as getTeamId, n as PUBLIC_SCOPE, o as getMandate, p as getServiceScopes, r as getAncestorOrgIds, s as getOrgContext, t as AUTHENTICATED_SCOPE, u as getRequestScope, v as hasOrgAccess, w as requireClientId, x as isMember, y as isAuthenticated } from "../types-fvO6Ovzx.mjs";
3
+ import { t as createTenantKeyGenerator } from "../rateLimitKey-DVEZ_UpV.mjs";
4
+ import { t as elevation_default } from "../elevation-BG4gnMsJ.mjs";
5
+ import { t as resolveOrgFromHeader } from "../scope-DINaj7Ax.mjs";
6
6
  export { AUTHENTICATED_SCOPE, PUBLIC_SCOPE, createTenantKeyGenerator, elevation_default as elevationPlugin, getAncestorOrgIds, getClientId, getDPoPJkt, getMandate, getOrgContext, getOrgId, getOrgRoles, getRequestScope, getScopeContext, getScopeContextMap, getServiceScopes, getTeamId, getTenantFromRequest, getUserId, getUserRoles, hasOrgAccess, isAuthenticated, isElevated, isMember, isOrgInScope, isService, requireClientId, requireOrgId, requireTeamId, requireUserId, resolveOrgFromHeader, scopeFirstCtx };
@@ -1,7 +1,7 @@
1
- /*! @classytic/arc v2.43.0 | MIT | https://classytic.com */
2
- import { a as OrgAccessDeniedError, l as UnauthorizedError } from "./errors-CtrywMHP.mjs";
3
- import { n as requireSingleHeaderValue } from "./headers-BbkIF6vA.mjs";
4
- import { n as getUserRoles } from "./userHelpers-aklawRaK.mjs";
1
+ /*! @classytic/arc v2.44.0 | MIT | https://classytic.com */
2
+ import { a as OrgAccessDeniedError, l as UnauthorizedError } from "./errors-CW4anJBy.mjs";
3
+ import { n as requireSingleHeaderValue } from "./headers-DKZQKL-Z.mjs";
4
+ import { n as getUserRoles } from "./userHelpers-C76zD5pa.mjs";
5
5
  //#region src/scope/resolveOrgFromHeader.ts
6
6
  /**
7
7
  * Create a preHandler hook that resolves org scope from a header.
@@ -1,4 +1,4 @@
1
- /*! @classytic/arc v2.43.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.44.0 | MIT | https://classytic.com */
2
2
  import { AsyncLocalStorage } from "node:async_hooks";
3
3
  //#region src/utils/shutdown.ts
4
4
  /** Stop admissions across every runtime before draining work and disposing domain engines. */
@@ -1,4 +1,4 @@
1
- /*! @classytic/arc v2.43.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.44.0 | MIT | https://classytic.com */
2
2
  //#region src/utils/simpleEqualityMatcher.ts
3
3
  /**
4
4
  * `simpleEqualityMatcher` — a minimal, dialect-agnostic flat-key equality
@@ -1,10 +1,10 @@
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 { n as PUBLIC_SCOPE } from "./types-Bk9NOgOC.mjs";
5
- import { n as isEventVisible, t as eventAudienceOf } from "./tenancy--ed9eH_z.mjs";
6
- import { a as promoteStreamTokenToHeader } from "./streaming-DjTQhZrN.mjs";
7
- import { t as openSseStream } from "./sseStream-B5_Afiqn.mjs";
1
+ /*! @classytic/arc v2.44.0 | MIT | https://classytic.com */
2
+ import { r as __exportAll } from "./rolldown-runtime-MYrLNGnq.mjs";
3
+ import { t as arcLog } from "./logger-D4V1zGLI.mjs";
4
+ import { n as PUBLIC_SCOPE } from "./types-fvO6Ovzx.mjs";
5
+ import { n as isEventVisible, t as eventAudienceOf } from "./tenancy-DxV8OuX2.mjs";
6
+ import { a as promoteStreamTokenToHeader } from "./streaming-JzB5CAga.mjs";
7
+ import { t as openSseStream } from "./sseStream-DQChzGTs.mjs";
8
8
  import fp from "fastify-plugin";
9
9
  //#region src/plugins/sse.ts
10
10
  var sse_exports = /* @__PURE__ */ __exportAll({
@@ -1,5 +1,5 @@
1
- /*! @classytic/arc v2.43.0 | MIT | https://classytic.com */
2
- import { n as forwardedStreamHeaders } from "./streaming-DjTQhZrN.mjs";
1
+ /*! @classytic/arc v2.44.0 | MIT | https://classytic.com */
2
+ import { n as forwardedStreamHeaders } from "./streaming-JzB5CAga.mjs";
3
3
  //#region src/utils/sseStream.ts
4
4
  /**
5
5
  * Take over the reply socket and open an SSE stream. Call ONLY after every
@@ -1,4 +1,4 @@
1
- /*! @classytic/arc v2.43.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.44.0 | MIT | https://classytic.com */
2
2
  //#region src/utils/store-helpers.ts
3
3
  /**
4
4
  * Classify an error thrown by `getOne` / `getById` / `update` as a
@@ -1,4 +1,4 @@
1
- /*! @classytic/arc v2.43.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.44.0 | MIT | https://classytic.com */
2
2
  import { Readable } from "node:stream";
3
3
  //#region src/utils/streaming.ts
4
4
  /**
@@ -1,4 +1,4 @@
1
- /*! @classytic/arc v2.43.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.44.0 | MIT | https://classytic.com */
2
2
  //#region src/events/subscriberIdentity.ts
3
3
  const SUBSCRIBER_ID = Symbol.for("@classytic/arc/subscriber-id");
4
4
  /** Assign a deployment-stable identity for durable per-handler progress; never use an index. */
@@ -1,5 +1,5 @@
1
- /*! @classytic/arc v2.43.0 | MIT | https://classytic.com */
2
- import { b as isElevated, c as getOrgId } from "./types-Bk9NOgOC.mjs";
1
+ /*! @classytic/arc v2.44.0 | MIT | https://classytic.com */
2
+ import { b as isElevated, c as getOrgId } from "./types-fvO6Ovzx.mjs";
3
3
  //#region src/core/tenancy.ts
4
4
  function eventAudienceOf(scope) {
5
5
  const tenancy = resolveTenancy({ _scope: scope }, "organizationId");
@@ -1,7 +1,7 @@
1
- /*! @classytic/arc v2.43.0 | MIT | https://classytic.com */
2
- import { t as conjoinPolicyFilters } from "./filter-merge-IpGywvym.mjs";
3
- import { d as createDomainError } from "./errors-CtrywMHP.mjs";
4
- import { b as isElevated, c as getOrgId, d as getScopeContext, m as getTeamId, v as hasOrgAccess } from "./types-Bk9NOgOC.mjs";
1
+ /*! @classytic/arc v2.44.0 | MIT | https://classytic.com */
2
+ import { t as conjoinPolicyFilters } from "./filter-merge-DGM-GQ1J.mjs";
3
+ import { d as createDomainError } from "./errors-CW4anJBy.mjs";
4
+ import { b as isElevated, c as getOrgId, d as getScopeContext, m as getTeamId, v as hasOrgAccess } from "./types-fvO6Ovzx.mjs";
5
5
  //#region src/permissions/tenantPreparation.ts
6
6
  /** Tenant preparation shared by HTTP middleware and direct transport invocation. */
7
7
  const PREPARATION = Symbol.for("arc.tenantPreparation");
@@ -1,11 +1,10 @@
1
1
 
2
2
  import { D as CleanupRunStore } from "../types-DVLddu2q.mjs";
3
3
  //#region src/testing/cleanupStoreContract.d.ts
4
- interface CleanupRunStoreContractSetupResult {
4
+ export interface CleanupRunStoreContractSetupResult {
5
5
  store: CleanupRunStore;
6
6
  teardown?: () => Promise<void>;
7
7
  }
8
- type CleanupRunStoreContractSetup = () => Promise<CleanupRunStoreContractSetupResult>;
9
- declare function runCleanupRunStoreContract(name: string, setup: CleanupRunStoreContractSetup): void;
10
- //#endregion
11
- export { CleanupRunStoreContractSetup, CleanupRunStoreContractSetupResult, runCleanupRunStoreContract };
8
+ export type CleanupRunStoreContractSetup = () => Promise<CleanupRunStoreContractSetupResult>;
9
+ export declare function runCleanupRunStoreContract(name: string, setup: CleanupRunStoreContractSetup): void;
10
+ //#endregion
@@ -1,4 +1,4 @@
1
- /*! @classytic/arc v2.43.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.44.0 | MIT | https://classytic.com */
2
2
  import { afterAll, beforeAll, describe, expect, it } from "vitest";
3
3
  //#region src/testing/cleanupStoreContract.ts
4
4
  /**
@@ -1,10 +1,10 @@
1
1
 
2
2
  import { i as RequestScope } from "../types-Ddl9OjmE.mjs";
3
3
  import { l as PermissionCheck, t as AnyRecord } from "../base-CZyixEQR.mjs";
4
- import { F as ResourceDefinition } from "../index-mqaqZNpe.mjs";
4
+ import { F as ResourceDefinition } from "../index-WH7xgvxS.mjs";
5
5
  import { h as ModuleSetupContext, m as ModuleDisposer, o as ArcPorts, p as PortName, r as ArcModuleInput, u as ModuleName } from "../types-BJ-2XqVF.mjs";
6
- import "../index-JdbZAIsm.mjs";
7
- import { n as CreateAppOptions } from "../index-C8zVGYsk.mjs";
6
+ import "../index-CUJvoyw3.mjs";
7
+ import { n as CreateAppOptions } from "../index-BkV55WlV.mjs";
8
8
  import { StorageContractSetup, StorageContractSetupResult, runStorageContract } from "./storageContract.mjs";
9
9
  import { StandardRepo } from "@classytic/repo-core/repository";
10
10
  import { FastifyInstance, FastifyServerOptions } from "fastify";
@@ -72,11 +72,11 @@ interface ArcAssertion {
72
72
  /** Assert a specific key on `body.meta` or flattened top-level (matches sendControllerResponse flattening). */
73
73
  hasMeta(key: string, value?: unknown): ArcAssertion;
74
74
  }
75
- declare function expectArc(response: ArcResponseLike): ArcAssertion;
75
+ export declare function expectArc(response: ArcResponseLike): ArcAssertion;
76
76
  //#endregion
77
77
  //#region src/testing/testActor.d.ts
78
78
  /** The header the testing harness uses to carry a request's actor. */
79
- declare const TEST_ACTOR_HEADER = "x-test-actor";
79
+ export declare const TEST_ACTOR_HEADER = "x-test-actor";
80
80
  /**
81
81
  * What a test wants to be. An `organizationId` produces a `member` scope (the
82
82
  * org-scoped case); without one the actor is `authenticated`.
@@ -119,7 +119,7 @@ interface TestActor {
119
119
  * headers: testActorHeaders('manager', ORG) });
120
120
  * ```
121
121
  */
122
- declare function testActorHeaders(actor: TestActor | string | null, organizationId?: string): Record<string, string>;
122
+ export declare function testActorHeaders(actor: TestActor | string | null, organizationId?: string): Record<string, string>;
123
123
  /**
124
124
  * Turn a spec into a `RequestScope`.
125
125
  *
@@ -127,7 +127,7 @@ declare function testActorHeaders(actor: TestActor | string | null, organization
127
127
  * levels, and making the caller repeat itself only produces tests that pass a
128
128
  * global gate and mysteriously fail an org one.
129
129
  */
130
- declare function scopeFromTestActor(spec: TestActor): RequestScope;
130
+ export declare function scopeFromTestActor(spec: TestActor): RequestScope;
131
131
  /**
132
132
  * Build the `auth` option that makes the test actor arc's authenticator.
133
133
  *
@@ -144,7 +144,7 @@ declare function scopeFromTestActor(spec: TestActor): RequestScope;
144
144
  * REJECTS rather than falling back to public — a test that meant to be an admin
145
145
  * and got quietly demoted is the most expensive way to fail.
146
146
  */
147
- declare function testActorAuth(defaultActor?: TestActor): {
147
+ export declare function testActorAuth(defaultActor?: TestActor): {
148
148
  type: "authenticator";
149
149
  authenticate: (request: unknown) => Promise<void>;
150
150
  };
@@ -230,10 +230,10 @@ interface ModuleTestApp<TConn = unknown> {
230
230
  * Everything Mongo-specific about the harness lives HERE — the harness
231
231
  * itself is driver-blind and any kit can replace this via `database`.
232
232
  */
233
- declare function mongoMemoryDatabase(opts: {
233
+ export declare function mongoMemoryDatabase(opts: {
234
234
  replset?: boolean;
235
235
  }): Promise<TestDatabase<unknown>>;
236
- declare function bootModuleApp<TConn = unknown>(modules: BootModulesInput<TConn>, options?: BootModuleAppOptions<TConn>): Promise<ModuleTestApp<TConn>>;
236
+ export declare function bootModuleApp<TConn = unknown>(modules: BootModulesInput<TConn>, options?: BootModuleAppOptions<TConn>): Promise<ModuleTestApp<TConn>>;
237
237
  //#endregion
238
238
  //#region src/testing/assertModuleBootsAlone.d.ts
239
239
  interface ModuleBootsAloneOptions<TConn = unknown> extends BootModuleAppOptions<TConn> {
@@ -244,7 +244,7 @@ interface ModuleBootsAloneResult {
244
244
  /** The closure's modules (bridges excluded), in input order. */
245
245
  readonly closure: readonly string[];
246
246
  }
247
- declare function assertModuleBootsAlone<TConn = unknown>(modules: BootModulesInput<TConn>,
247
+ export declare function assertModuleBootsAlone<TConn = unknown>(modules: BootModulesInput<TConn>,
248
248
  /** The module — or several roots booted together, when a deployment rule pairs them. */
249
249
  name: ModuleName | readonly ModuleName[], options?: ModuleBootsAloneOptions<TConn>): Promise<ModuleBootsAloneResult>;
250
250
  //#endregion
@@ -281,7 +281,7 @@ interface AuthorizationConformance {
281
281
  * Boot a one-resource app gated by `permission` on both list + an aggregation,
282
282
  * hit both surfaces anonymously, and report what arc enforced on each.
283
283
  */
284
- declare function runAuthorizationConformance(opts: {
284
+ export declare function runAuthorizationConformance(opts: {
285
285
  /** The permission under test — applied to `list` and the aggregation alike. */
286
286
  permission: PermissionCheck;
287
287
  /** Rows the mock repo returns for list (aggregation returns a count). */
@@ -340,21 +340,21 @@ interface TestAuthProvider {
340
340
  * Accepts both `user` (payload to sign) and `token` (pre-signed) role configs,
341
341
  * so the same provider handles mixed flows in a single test.
342
342
  */
343
- declare function createJwtAuthProvider(app: FastifyInstance, opts?: {
343
+ export declare function createJwtAuthProvider(app: FastifyInstance, opts?: {
344
344
  defaultOrgId?: string;
345
345
  }): TestAuthProvider;
346
346
  /**
347
347
  * Better Auth provider — uses pre-signed tokens (from signUp/signIn flows).
348
348
  * No signing: role configs MUST carry `token`. A `user` alone will throw.
349
349
  */
350
- declare function createBetterAuthProvider(opts?: {
350
+ export declare function createBetterAuthProvider(opts?: {
351
351
  defaultOrgId?: string;
352
352
  }): TestAuthProvider;
353
353
  /**
354
354
  * Custom provider — plug in your own token minting logic. Useful for
355
355
  * mocked external issuers, session-cookie flows, or fixtures that pre-mint.
356
356
  */
357
- declare function createCustomAuthProvider(mintToken: (role: string, config: RoleConfig) => string, opts?: {
357
+ export declare function createCustomAuthProvider(mintToken: (role: string, config: RoleConfig) => string, opts?: {
358
358
  defaultOrgId?: string;
359
359
  }): TestAuthProvider;
360
360
  //#endregion
@@ -487,13 +487,13 @@ interface SetupBetterAuthTestAppResult {
487
487
  * Auth endpoints occasionally emit empty 204 bodies (e.g. set-active) and
488
488
  * tests shouldn't crash on the parse.
489
489
  */
490
- declare function safeParseBody<T = unknown>(body: string | undefined): T | null;
490
+ export declare function safeParseBody<T = unknown>(body: string | undefined): T | null;
491
491
  /**
492
492
  * Stateless Better Auth helpers. Each function takes the app as a positional
493
493
  * argument, so a single helper instance works across multiple test apps in
494
494
  * the same suite.
495
495
  */
496
- declare function createBetterAuthTestHelpers(options?: BetterAuthTestHelpersOptions): BetterAuthTestHelpers;
496
+ export declare function createBetterAuthTestHelpers(options?: BetterAuthTestHelpersOptions): BetterAuthTestHelpers;
497
497
  /**
498
498
  * Composite setup for Better Auth apps. Replaces the pre-v2.11
499
499
  * `setupBetterAuthOrg` with a tighter contract:
@@ -513,7 +513,7 @@ declare function createBetterAuthTestHelpers(options?: BetterAuthTestHelpersOpti
513
513
  * creators are supplied (ambiguous ownership is a boot-time bug, not a
514
514
  * runtime one).
515
515
  */
516
- declare function setupBetterAuthTestApp(input: SetupBetterAuthTestAppInput): Promise<SetupBetterAuthTestAppResult>;
516
+ export declare function setupBetterAuthTestApp(input: SetupBetterAuthTestAppInput): Promise<SetupBetterAuthTestAppResult>;
517
517
  //#endregion
518
518
  //#region src/testing/fixtures.d.ts
519
519
  type FixtureFactory<T extends object = AnyRecord> = (data: Partial<T>) => Promise<T>;
@@ -543,7 +543,7 @@ interface TestFixtures {
543
543
  /** Registered factory names. */
544
544
  readonly names: readonly string[];
545
545
  }
546
- declare function createTestFixtures(): TestFixtures;
546
+ export declare function createTestFixtures(): TestFixtures;
547
547
  //#endregion
548
548
  //#region src/testing/HttpTestHarness.d.ts
549
549
  interface HttpTestHarnessOptions<T = unknown> {
@@ -563,7 +563,7 @@ interface HttpTestHarnessOptions<T = unknown> {
563
563
  apiPrefix?: string;
564
564
  }
565
565
  type OptionsOrGetter<T> = HttpTestHarnessOptions<T> | (() => HttpTestHarnessOptions<T>);
566
- declare class HttpTestHarness<T = unknown> {
566
+ export declare class HttpTestHarness<T = unknown> {
567
567
  private resource;
568
568
  private optionsOrGetter;
569
569
  private enabledRoutes;
@@ -581,7 +581,7 @@ declare class HttpTestHarness<T = unknown> {
581
581
  * Create an HTTP test harness. `optionsOrGetter` may be a plain object
582
582
  * (for eager app setup) or a getter function (for async `beforeAll` apps).
583
583
  */
584
- declare function createHttpTestHarness<T = unknown>(resource: ResourceDefinition<unknown>, optionsOrGetter: HttpTestHarnessOptions<T> | (() => HttpTestHarnessOptions<T>)): HttpTestHarness<T>;
584
+ export declare function createHttpTestHarness<T = unknown>(resource: ResourceDefinition<unknown>, optionsOrGetter: HttpTestHarnessOptions<T> | (() => HttpTestHarnessOptions<T>)): HttpTestHarness<T>;
585
585
  //#endregion
586
586
  //#region src/testing/mocks.d.ts
587
587
  /**
@@ -606,11 +606,11 @@ interface MockRepository<T> extends StandardRepo<T> {
606
606
  *
607
607
  * await mockRepo.getById('1'); // Returns mocked product
608
608
  */
609
- declare function createMockRepository<T extends object = AnyRecord>(overrides?: Partial<MockRepository<T>>): MockRepository<T>;
609
+ export declare function createMockRepository<T extends object = AnyRecord>(overrides?: Partial<MockRepository<T>>): MockRepository<T>;
610
610
  /**
611
611
  * Create a mock user for authentication testing
612
612
  */
613
- declare function createMockUser(overrides?: Partial<AnyRecord>): {
613
+ export declare function createMockUser(overrides?: Partial<AnyRecord>): {
614
614
  _id: string;
615
615
  id: string;
616
616
  email: string;
@@ -620,11 +620,11 @@ declare function createMockUser(overrides?: Partial<AnyRecord>): {
620
620
  /**
621
621
  * Create a mock Fastify request
622
622
  */
623
- declare function createMockRequest(overrides?: Partial<AnyRecord>): unknown;
623
+ export declare function createMockRequest(overrides?: Partial<AnyRecord>): unknown;
624
624
  /**
625
625
  * Create a mock Fastify reply
626
626
  */
627
- declare function createMockReply(): unknown;
627
+ export declare function createMockReply(): unknown;
628
628
  /**
629
629
  * Create a mock controller for testing.
630
630
  *
@@ -640,7 +640,7 @@ declare function createMockReply(): unknown;
640
640
  * arguments) while naming only `vitest`, which arc does declare. Same shape
641
641
  * `MockRepository` above uses.
642
642
  */
643
- declare function createMockController(repository: StandardRepo<AnyRecord>): {
643
+ export declare function createMockController(repository: StandardRepo<AnyRecord>): {
644
644
  repository: StandardRepo<AnyRecord>;
645
645
  list: Mock;
646
646
  get: Mock;
@@ -661,7 +661,7 @@ declare function createMockController(repository: StandardRepo<AnyRecord>): {
661
661
  * const product = productFactory.build();
662
662
  * const products = productFactory.buildMany(10);
663
663
  */
664
- declare function createDataFactory<T extends AnyRecord>(template: Record<keyof T, (index: number) => unknown>): {
664
+ export declare function createDataFactory<T extends AnyRecord>(template: Record<keyof T, (index: number) => unknown>): {
665
665
  build(overrides?: Partial<T>): T;
666
666
  buildMany(count: number, overrides?: Partial<T>): T[];
667
667
  reset(): void;
@@ -671,7 +671,7 @@ declare function createDataFactory<T extends AnyRecord>(template: Record<keyof T
671
671
  *
672
672
  * Useful for testing side effects without full mocking
673
673
  */
674
- declare function createSpy<T extends (...args: unknown[]) => unknown>(_name?: string): Mock<T> & {
674
+ export declare function createSpy<T extends (...args: unknown[]) => unknown>(_name?: string): Mock<T> & {
675
675
  getCalls(): unknown[][];
676
676
  getLastCall(): unknown[];
677
677
  };
@@ -692,7 +692,7 @@ declare function createSpy<T extends (...args: unknown[]) => unknown>(_name?: st
692
692
  * @example
693
693
  * await waitFor(() => runs >= 3, { label: "3 scheduler ticks" });
694
694
  */
695
- declare function waitFor(condition: () => boolean | Promise<boolean>, options?: {
695
+ export declare function waitFor(condition: () => boolean | Promise<boolean>, options?: {
696
696
  timeout?: number;
697
697
  interval?: number;
698
698
  label?: string;
@@ -700,7 +700,7 @@ declare function waitFor(condition: () => boolean | Promise<boolean>, options?:
700
700
  /**
701
701
  * Create a test timer that can be controlled
702
702
  */
703
- declare function createTestTimer(): {
703
+ export declare function createTestTimer(): {
704
704
  now: () => number;
705
705
  advance: (ms: number) => void;
706
706
  set: (timestamp: number) => void;
@@ -727,7 +727,7 @@ interface TestModuleSetup {
727
727
  */
728
728
  dispose(): Promise<void>;
729
729
  }
730
- declare function createTestModuleSetup(options?: {
730
+ export declare function createTestModuleSetup(options?: {
731
731
  /** The `context.ports` the phases see — supply what the module declares. */
732
732
  readonly ports?: ArcPorts;
733
733
  }): TestModuleSetup;
@@ -755,7 +755,7 @@ declare function createTestModuleSetup(options?: {
755
755
  * filters by tenant, so a gate that waves a tenant-less request through is how a
756
756
  * green test reads another org's rows.
757
757
  */
758
- declare function scopeRoleGate(...allowed: string[]): PermissionCheck;
758
+ export declare function scopeRoleGate(...allowed: string[]): PermissionCheck;
759
759
  //#endregion
760
760
  //#region src/testing/testApp.d.ts
761
761
  type DbMode = "in-memory" | {
@@ -826,12 +826,12 @@ interface TestAppContext {
826
826
  */
827
827
  close(): Promise<void>;
828
828
  }
829
- declare function createTestApp(options?: CreateTestAppOptions): Promise<TestAppContext>;
829
+ export declare function createTestApp(options?: CreateTestAppOptions): Promise<TestAppContext>;
830
830
  /**
831
831
  * Minimal Fastify instance — no arc plugins, no auth, no db. Use when a test
832
832
  * needs bare Fastify (e.g. plugin unit tests that manually register their
833
833
  * dependencies).
834
834
  */
835
- declare function createMinimalTestApp(options?: FastifyServerOptions): FastifyInstance;
835
+ export declare function createMinimalTestApp(options?: FastifyServerOptions): FastifyInstance;
836
836
  //#endregion
837
- export { type ArcAssertion, type ArcResponseLike, type AuthMode, type AuthResponse, type AuthorizationConformance, type BetterAuthTestHelpers, type BetterAuthTestHelpersOptions, type BetterAuthTestUser, type BootModuleAppOptions, type BootModulesInput, type CreateOrgInput, type CreateTestAppOptions, type DbMode, type FixtureDestroyer, type FixtureFactory, type FixtureRegistration, HttpTestHarness, type HttpTestHarnessOptions, type MockRepository, type ModuleBootsAloneOptions, type ModuleBootsAloneResult, type ModuleTestApp, type OrgResponse, type RoleConfig, type SetupBetterAuthTestAppInput, type SetupBetterAuthTestAppResult, type SignInInput, type SignUpInput, type StorageContractSetup, type StorageContractSetupResult, type SurfaceObservation, TEST_ACTOR_HEADER, type TestActor, type TestAppContext, type TestAuthProvider, type TestAuthSession, type TestDatabase, type TestDatabaseFactory, type TestFixtures, type TestModuleSetup, type TestkitContext, assertModuleBootsAlone, bootModuleApp, createBetterAuthProvider, createBetterAuthTestHelpers, createCustomAuthProvider, createDataFactory, createHttpTestHarness, createJwtAuthProvider, createMinimalTestApp, createMockController, createMockReply, createMockRepository, createMockRequest, createMockUser, createSpy, createTestApp, createTestFixtures, createTestModuleSetup, createTestTimer, expectArc, mongoMemoryDatabase, runAuthorizationConformance, runStorageContract, safeParseBody, scopeFromTestActor, scopeRoleGate, setupBetterAuthTestApp, testActorAuth, testActorHeaders, waitFor };
837
+ export { type ArcAssertion, type ArcResponseLike, type AuthMode, type AuthResponse, type AuthorizationConformance, type BetterAuthTestHelpers, type BetterAuthTestHelpersOptions, type BetterAuthTestUser, type BootModuleAppOptions, type BootModulesInput, type CreateOrgInput, type CreateTestAppOptions, type DbMode, type FixtureDestroyer, type FixtureFactory, type FixtureRegistration, type HttpTestHarnessOptions, type MockRepository, type ModuleBootsAloneOptions, type ModuleBootsAloneResult, type ModuleTestApp, type OrgResponse, type RoleConfig, type SetupBetterAuthTestAppInput, type SetupBetterAuthTestAppResult, type SignInInput, type SignUpInput, type StorageContractSetup, type StorageContractSetupResult, type SurfaceObservation, type TestActor, type TestAppContext, type TestAuthProvider, type TestAuthSession, type TestDatabase, type TestDatabaseFactory, type TestFixtures, type TestModuleSetup, type TestkitContext, runStorageContract };
@@ -1,13 +1,14 @@
1
- /*! @classytic/arc v2.43.0 | MIT | https://classytic.com */
2
- import { t as CRUD_OPERATIONS } from "../constants-Cu7Mx7_U.mjs";
3
- import { c as BaseController } from "../plugin-BccET1tL.mjs";
4
- import { g as getUserId } from "../types-Bk9NOgOC.mjs";
5
- import { t as defineAggregation } from "../defineAggregation-Bm8RjMbq.mjs";
6
- import { t as defineResource } from "../defineResource-DIC7JZGU.mjs";
7
- import { E as requireOrgRole } from "../permissions-Cm0uYHvd.mjs";
8
- import { h as asModulePorts, r as createApp } from "../createApp-D-953ZAq.mjs";
9
- import { d as resolveModule, l as isLazyBridge, o as resolveModuleClosure } from "../plan-FVR6LP59.mjs";
10
- import { n as getModuleExports } from "../module-BSvOQC7E.mjs";
1
+ /*! @classytic/arc v2.44.0 | MIT | https://classytic.com */
2
+ import { o as __toESM } from "../rolldown-runtime-MYrLNGnq.mjs";
3
+ import { t as CRUD_OPERATIONS } from "../constants-B2QHb6u6.mjs";
4
+ import { c as BaseController } from "../plugin-DALd9dcF.mjs";
5
+ import { g as getUserId } from "../types-fvO6Ovzx.mjs";
6
+ import { t as defineAggregation } from "../defineAggregation--3xguLkk.mjs";
7
+ import { t as defineResource } from "../defineResource-gUp9ug66.mjs";
8
+ import { E as requireOrgRole } from "../permissions-C5ijIz5Q.mjs";
9
+ import { h as asModulePorts, r as createApp } from "../createApp-BGLYtErt.mjs";
10
+ import { d as resolveModule, l as isLazyBridge, o as resolveModuleClosure } from "../plan-CJGMKoui.mjs";
11
+ import { n as getModuleExports } from "../module--L0iBIZz.mjs";
11
12
  import { runStorageContract } from "./storageContract.mjs";
12
13
  import Fastify from "fastify";
13
14
  import { afterAll, describe, expect, it, vi } from "vitest";
@@ -265,13 +266,13 @@ function testActorAuth(defaultActor) {
265
266
  async function mongoMemoryDatabase(opts) {
266
267
  let mms;
267
268
  try {
268
- mms = await import("mongodb-memory-server");
269
+ mms = await import("../mongodb-memory-server-CHhYSq5y.mjs").then((m) => /* @__PURE__ */ __toESM(m.default, 1));
269
270
  } catch {
270
271
  throw new Error("[arc-testing] bootModuleApp's default database is in-memory MongoDB — install 'mongodb-memory-server' + 'mongoose' as devDependencies, or inject your own `database` factory for a different store");
271
272
  }
272
273
  const server = opts.replset ? await mms.MongoMemoryReplSet.create({ replSet: { count: 1 } }) : await mms.MongoMemoryServer.create();
273
274
  const uri = server.getUri();
274
- const mongoose = (await import("mongoose")).default;
275
+ const mongoose = (await import("../mongoose-CYJCLyi-.mjs").then((m) => /* @__PURE__ */ __toESM(m.default, 1))).default;
275
276
  if (mongoose.connection.readyState !== 0) await mongoose.disconnect();
276
277
  await mongoose.connect(uri);
277
278
  mongoose.connection.deleteModel(/.*/);
@@ -1547,7 +1548,7 @@ function scopeRoleGate(...allowed) {
1547
1548
  */
1548
1549
  async function startInMemoryMongo() {
1549
1550
  try {
1550
- const { MongoMemoryServer } = await import("mongodb-memory-server");
1551
+ const { MongoMemoryServer } = await import("../mongodb-memory-server-CHhYSq5y.mjs").then((m) => /* @__PURE__ */ __toESM(m.default, 1));
1551
1552
  const mongod = await MongoMemoryServer.create();
1552
1553
  return {
1553
1554
  uri: mongod.getUri(),
@@ -1561,7 +1562,7 @@ async function startInMemoryMongo() {
1561
1562
  }
1562
1563
  async function connectMongooseToUri(uri) {
1563
1564
  try {
1564
- const mongoose = (await import("mongoose")).default;
1565
+ const mongoose = (await import("../mongoose-CYJCLyi-.mjs").then((m) => /* @__PURE__ */ __toESM(m.default, 1))).default;
1565
1566
  await mongoose.connect(uri);
1566
1567
  return { async disconnect() {
1567
1568
  await mongoose.disconnect();
@@ -1578,7 +1579,7 @@ function pickDefaultAuth(authMode, callerAuth) {
1578
1579
  };
1579
1580
  }
1580
1581
  async function createTestApp(options = {}) {
1581
- const { createApp } = await import("../createApp-D-953ZAq.mjs").then((n) => n.i);
1582
+ const { createApp } = await import("../createApp-BGLYtErt.mjs").then((n) => n.i);
1582
1583
  const { resources = [], db = "in-memory", connectMongoose = false, authMode = "jwt", defaultOrgId, plugins, auth: callerAuth, ...appOptions } = options;
1583
1584
  let dbHandle;
1584
1585
  let dbUri;
@@ -1,7 +1,7 @@
1
1
 
2
2
  import { OutboxStore } from "@classytic/primitives/outbox";
3
3
  //#region src/testing/outboxStoreContract.d.ts
4
- interface OutboxStoreContractSetupResult {
4
+ export interface OutboxStoreContractSetupResult {
5
5
  store: OutboxStore;
6
6
  /** Called once after the suite. */
7
7
  teardown?: () => Promise<void>;
@@ -17,7 +17,6 @@ interface OutboxStoreContractSetupResult {
17
17
  */
18
18
  reset: () => Promise<void>;
19
19
  }
20
- type OutboxStoreContractSetup = () => Promise<OutboxStoreContractSetupResult>;
21
- declare function runOutboxStoreContract(name: string, setup: OutboxStoreContractSetup): void;
22
- //#endregion
23
- export { OutboxStoreContractSetup, OutboxStoreContractSetupResult, runOutboxStoreContract };
20
+ export type OutboxStoreContractSetup = () => Promise<OutboxStoreContractSetupResult>;
21
+ export declare function runOutboxStoreContract(name: string, setup: OutboxStoreContractSetup): void;
22
+ //#endregion
@@ -1,5 +1,5 @@
1
- /*! @classytic/arc v2.43.0 | MIT | https://classytic.com */
2
- import { t as claimedAttempts } from "../claimed-B10RTfkM.mjs";
1
+ /*! @classytic/arc v2.44.0 | MIT | https://classytic.com */
2
+ import { t as claimedAttempts } from "../claimed-DYvQoZLv.mjs";
3
3
  import { OutboxConflictError, OutboxOwnershipError } from "@classytic/primitives/outbox";
4
4
  import { afterAll, beforeAll, beforeEach, describe, expect, it } from "vitest";
5
5
  //#region src/testing/outboxStoreContract.ts
@@ -1,17 +1,16 @@
1
1
 
2
2
  import { r as ArcModuleInput } from "../types-BJ-2XqVF.mjs";
3
3
  //#region src/testing/requiredPorts.d.ts
4
- interface RequiredPortsOptions {
4
+ export interface RequiredPortsOptions {
5
5
  /** Modules composed alongside — the peers the module `dependsOn` or `requires.modules`. */
6
6
  readonly with?: readonly ArcModuleInput[];
7
7
  /** Ports supplied in every case — the peers' own required ports. Never one under test. Values are never read. */
8
8
  readonly ports?: Readonly<Record<string, unknown>>;
9
9
  }
10
- interface RequiredPortsResult {
10
+ export interface RequiredPortsResult {
11
11
  readonly module: string;
12
12
  /** The required ports, in declared order. */
13
13
  readonly ports: readonly string[];
14
14
  }
15
- declare function assertRequiresPorts(module: ArcModuleInput, ports: readonly string[], options?: RequiredPortsOptions): Promise<RequiredPortsResult>;
16
- //#endregion
17
- export { RequiredPortsOptions, RequiredPortsResult, assertRequiresPorts };
15
+ export declare function assertRequiresPorts(module: ArcModuleInput, ports: readonly string[], options?: RequiredPortsOptions): Promise<RequiredPortsResult>;
16
+ //#endregion