@classytic/arc 2.34.0 → 2.35.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 (182) hide show
  1. package/dist/{BaseController-CbkuhNI2.mjs → BaseController-C-pofd0v.mjs} +95 -14
  2. package/dist/{EventTransport-tq4CEB-q.mjs → EventTransport-BrPeGUil.mjs} +1 -1
  3. package/dist/{HookSystem-DqXkMXkB.mjs → HookSystem-LlPm3Anm.mjs} +6 -4
  4. package/dist/{ResourceRegistry-DoALUlOO.mjs → ResourceRegistry-yuD1Ra53.mjs} +2 -2
  5. package/dist/{pipeline-q69DZzgG.mjs → actionPermissions-LFuOra7W.mjs} +30 -7
  6. package/dist/audit/index.d.mts +2 -2
  7. package/dist/audit/index.mjs +2 -2
  8. package/dist/auth/audit.mjs +1 -1
  9. package/dist/auth/index.d.mts +2 -2
  10. package/dist/auth/index.mjs +6 -6
  11. package/dist/auth/redis-session.mjs +1 -1
  12. package/dist/{authorizationDecision-CMMLWmuZ.mjs → authorizationDecision-DYXBBgtg.mjs} +2 -2
  13. package/dist/{base-Csjc2oF-.d.mts → base-GZU3LlzP.d.mts} +1 -1
  14. package/dist/{buildHandler-BrdYrG_1.mjs → buildHandler-Do9aMIvL.mjs} +4 -4
  15. package/dist/cache/index.mjs +4 -4
  16. package/dist/{caching-BcGmvnHh.mjs → caching-cN5X9VEL.mjs} +2 -2
  17. package/dist/cleanup/index.d.mts +2 -2
  18. package/dist/cleanup/index.mjs +4 -4
  19. package/dist/cli/commands/describe.d.mts +1 -1
  20. package/dist/cli/commands/describe.mjs +3 -3
  21. package/dist/cli/commands/docs.mjs +3 -3
  22. package/dist/cli/commands/doctor.mjs +1 -1
  23. package/dist/cli/commands/generate.mjs +2 -2
  24. package/dist/cli/commands/init.mjs +2 -2
  25. package/dist/cli/commands/introspect.mjs +2 -2
  26. package/dist/cli/index.mjs +3 -3
  27. package/dist/{constants-BxCoxmiN.mjs → constants-BhzLXCfN.mjs} +1 -1
  28. package/dist/context/index.d.mts +16 -1
  29. package/dist/context/index.mjs +64 -4
  30. package/dist/core/index.d.mts +2 -2
  31. package/dist/core/index.mjs +7 -8
  32. package/dist/{core-BYKa8wHu.mjs → core-DdEvmmkY.mjs} +3 -3
  33. package/dist/{createActionRouter-D6T0jWhS.mjs → createActionRouter-EYWgd0ly.mjs} +27 -64
  34. package/dist/{createAggregationRouter-QLV2PrWP.mjs → createAggregationRouter-ByOK9Iev.mjs} +7 -7
  35. package/dist/defineAggregation-DoIijIFq.mjs +25 -0
  36. package/dist/{defineResource-ZhuLonLm.mjs → defineResource-BOrGeocE.mjs} +62 -66
  37. package/dist/discovery/index.mjs +1 -1
  38. package/dist/docs/index.d.mts +1 -1
  39. package/dist/docs/index.mjs +3 -3
  40. package/dist/{elevation-B0tlY8y1.mjs → elevation-tGIAldco.mjs} +4 -4
  41. package/dist/encryption/index.mjs +3 -3
  42. package/dist/{errorHandler-C7xBqHsI.mjs → errorHandler-BbQ1nQdk.mjs} +3 -3
  43. package/dist/{errors-Cd_yy7aW.mjs → errors-CLid6atr.mjs} +1 -1
  44. package/dist/{eventPlugin-DSNEZWfV.d.mts → eventPlugin-B47sfCJ8.d.mts} +1 -1
  45. package/dist/{eventPlugin-Dar8qRaj.mjs → eventPlugin-ClPn5kjn.mjs} +5 -5
  46. package/dist/events/index.d.mts +2 -2
  47. package/dist/events/index.mjs +5 -5
  48. package/dist/events/transports/redis-stream-entry.mjs +1 -1
  49. package/dist/events/transports/redis.mjs +1 -1
  50. package/dist/factory/index.d.mts +5 -5
  51. package/dist/factory/index.mjs +5 -6
  52. package/dist/{fastify-augmentation-DVsTAy6X.d.mts → fastify-augmentation-CMMTL3cj.d.mts} +3 -3
  53. package/dist/{fields-CojeUkS4.mjs → fields-UtpiJO5R.mjs} +1 -1
  54. package/dist/{generate-DiB0nHPR.mjs → generate-BoAVy3_b.mjs} +2 -2
  55. package/dist/{headers-CveNO9gR.mjs → headers-DODWf7aC.mjs} +2 -2
  56. package/dist/{health-CasG2A28.mjs → health-_Zs3R_Sb.mjs} +1 -1
  57. package/dist/hooks/index.d.mts +1 -1
  58. package/dist/hooks/index.mjs +2 -2
  59. package/dist/idempotency/index.mjs +22 -56
  60. package/dist/idempotency/redis.mjs +1 -1
  61. package/dist/{index-C5NnMEKF.d.mts → index-C50BUxKs.d.mts} +1 -1
  62. package/dist/{index-BcR2bFZQ.d.mts → index-C5K78SXo.d.mts} +33 -105
  63. package/dist/{index-ugr1tQlW.d.mts → index-CJCcbADG.d.mts} +1 -1
  64. package/dist/{index-B-DvUzsr.d.mts → index-K7auNNW0.d.mts} +2 -2
  65. package/dist/{index-CFAJEWCX.d.mts → index-h-mTgMqy.d.mts} +7 -30
  66. package/dist/index.d.mts +5 -5
  67. package/dist/index.mjs +11 -12
  68. package/dist/{init-mdJ-v4Xp.mjs → init-Ce4R0ZGK.mjs} +1 -1
  69. package/dist/integrations/event-gateway.mjs +2 -2
  70. package/dist/integrations/index.d.mts +2 -2
  71. package/dist/integrations/index.mjs +1 -1
  72. package/dist/integrations/jobs/index.d.mts +1 -1
  73. package/dist/integrations/jobs/index.mjs +2 -2
  74. package/dist/integrations/mcp/index.d.mts +4 -4
  75. package/dist/integrations/mcp/index.mjs +2 -2
  76. package/dist/integrations/mcp/testing.d.mts +1 -1
  77. package/dist/integrations/mcp/testing.mjs +3 -3
  78. package/dist/integrations/streamline.mjs +3 -3
  79. package/dist/integrations/webhooks.d.mts +1 -1
  80. package/dist/integrations/webhooks.mjs +11 -24
  81. package/dist/integrations/websocket-pushref-redis.mjs +1 -1
  82. package/dist/integrations/websocket-redis.mjs +1 -1
  83. package/dist/integrations/websocket.mjs +1 -1
  84. package/dist/{interface-DznJrm9R.mjs → interface-my7sxjw5.mjs} +1 -1
  85. package/dist/{jsonBody-CfGH-GxO.mjs → jsonBody-CVKA7C5m.mjs} +2 -2
  86. package/dist/{keys-WeKvY1dE.mjs → keys-GlU7XpmG.mjs} +1 -1
  87. package/dist/{loadResources-Bj-aSsXi.mjs → loadResources-DdQb0qgV.mjs} +2 -2
  88. package/dist/{loadResourcesFromEntry-DwaxNcE2.mjs → loadResourcesFromEntry-s6aGs6-0.mjs} +2 -2
  89. package/dist/logger/index.d.mts +23 -4
  90. package/dist/logger/index.mjs +50 -7
  91. package/dist/{mcpPlugin-DX3PHD7K.mjs → mcpPlugin-DkzZ7Nfx.mjs} +15 -16
  92. package/dist/{memory-qYSB7rMQ.mjs → memory-BwedEXau.mjs} +2 -2
  93. package/dist/{metrics-D7uchLjN.mjs → metrics-5LNPvL3P.mjs} +2 -2
  94. package/dist/middleware/index.d.mts +1 -1
  95. package/dist/middleware/index.mjs +3 -3
  96. package/dist/migrations/index.mjs +7 -4
  97. package/dist/{module-CwKsgZXp.mjs → module-Bh5OC7ww.mjs} +1 -1
  98. package/dist/{multipartBody-4w-S3-PU.mjs → multipartBody-DjilSDAT.mjs} +1 -1
  99. package/dist/{openapi-CkV5mQ53.mjs → openapi-ItLH12_L.mjs} +6 -6
  100. package/dist/outbox-admin/index.d.mts +2 -2
  101. package/dist/outbox-admin/index.mjs +4 -4
  102. package/dist/{outbox-module-D1QfHqO4.mjs → outbox-module-SGIZz6oS.mjs} +6 -4
  103. package/dist/{outbox-module-C1Bs_FXF.d.mts → outbox-module-b1TyDGGi.d.mts} +24 -1
  104. package/dist/permissions/index.d.mts +2 -2
  105. package/dist/permissions/index.mjs +5 -5
  106. package/dist/{permissions-CP47jdi7.mjs → permissions-CpSBlFXZ.mjs} +6 -6
  107. package/dist/{pipe-BzzoEhHj.mjs → pipe-DNOuCfAs.mjs} +2 -2
  108. package/dist/pipeline/index.d.mts +1 -1
  109. package/dist/pipeline/index.mjs +2 -2
  110. package/dist/plugins/index.d.mts +92 -7
  111. package/dist/plugins/index.mjs +168 -17
  112. package/dist/plugins/response-cache.mjs +2 -2
  113. package/dist/plugins/tracing-entry.mjs +2 -2
  114. package/dist/{pluralize-B7xf8qZF.mjs → pluralize-DGAQQKL8.mjs} +1 -1
  115. package/dist/{preloadResources-g07ldtzh.d.mts → preloadResources--ZtY9pe9.d.mts} +54 -270
  116. package/dist/{createApp-zR-DEesr.mjs → preloadResources-DYMzmUk1.mjs} +112 -31
  117. package/dist/presets/filesUpload.d.mts +3 -3
  118. package/dist/presets/filesUpload.mjs +5 -5
  119. package/dist/presets/index.d.mts +2 -2
  120. package/dist/presets/index.mjs +2 -2
  121. package/dist/presets/multiTenant.d.mts +1 -1
  122. package/dist/presets/multiTenant.mjs +3 -3
  123. package/dist/presets/search.d.mts +9 -47
  124. package/dist/presets/search.mjs +2 -2
  125. package/dist/{presets-BAPijK_A.mjs → presets-Bi0Z6Iq8.mjs} +4 -4
  126. package/dist/{projection-BKM0Ui-s.mjs → projection-aevMua7Q.mjs} +2 -2
  127. package/dist/{queryCachePlugin-DhsZ0ZIc.mjs → queryCachePlugin-BI7Z88Cx.mjs} +5 -5
  128. package/dist/{rateLimitKey-XngqVNEV.mjs → rateLimitKey-pyevMUVf.mjs} +1 -1
  129. package/dist/{realtime-G1TC6Yzc.mjs → realtime-Cfl2bVjj.mjs} +9 -9
  130. package/dist/{rateLimit-D4-ASwsI.mjs → registerRoute-u1opU66a.mjs} +114 -3
  131. package/dist/registry/index.d.mts +2 -2
  132. package/dist/registry/index.mjs +3 -3
  133. package/dist/{registry-CLxCR5LF.mjs → registry-B4sf9Rfm.mjs} +15 -56
  134. package/dist/{renewingLease-BnWtbA2U.mjs → renewingLease-5ESPMxp0.mjs} +14 -2
  135. package/dist/{replyHelpers-BSBVCwL3.mjs → replyHelpers-2jfmMnnV.mjs} +2 -2
  136. package/dist/{requestContext-uYE35JxI.mjs → requestContext-DzOUGNdY.mjs} +1 -1
  137. package/dist/{rolldown-runtime-DNg-KNCk.mjs → rolldown-runtime-CEvvVXTC.mjs} +1 -1
  138. package/dist/{runtimeCapabilities-Dm88DaTW.mjs → runtimeCapabilities-BagWc3TI.mjs} +1 -1
  139. package/dist/{schedules-CAcZgia0.mjs → schedules-BLpZLWGF.mjs} +6 -4
  140. package/dist/{schemaConverter-XH1RZRyu.mjs → schemaConverter-D2_bHGil.mjs} +19 -32
  141. package/dist/{schemaIR-CDvclAew.mjs → schemaIR-s3-ouZmP.mjs} +2 -2
  142. package/dist/schemas/index.mjs +1 -1
  143. package/dist/scim/index.mjs +2 -2
  144. package/dist/scope/index.d.mts +1 -1
  145. package/dist/scope/index.mjs +5 -5
  146. package/dist/{scope-BaWcqBvr.mjs → scope-DgepeCv6.mjs} +4 -4
  147. package/dist/simpleEqualityMatcher-BO-sFTQf.mjs +43 -0
  148. package/dist/{sse-Cf0jUHsh.mjs → sse-DUIP1XH6.mjs} +5 -5
  149. package/dist/{sseStream-Bvpi-UXQ.mjs → sseStream-ByFGyIVr.mjs} +2 -2
  150. package/dist/{store-helpers-B88p99Z2.mjs → store-helpers-kIJCY0wI.mjs} +1 -1
  151. package/dist/{streaming-DsT1B5zJ.mjs → streaming-DOpZVht6.mjs} +1 -1
  152. package/dist/{subscribe-helpers-CLIOHsOK.mjs → subscribe-helpers-Dh2BnzJf.mjs} +12 -46
  153. package/dist/sync/changelog.mjs +1 -1
  154. package/dist/testing/cleanupStoreContract.mjs +1 -1
  155. package/dist/testing/index.d.mts +6 -6
  156. package/dist/testing/index.mjs +10 -11
  157. package/dist/testing/outboxStoreContract.mjs +1 -1
  158. package/dist/testing/storageContract.mjs +1 -1
  159. package/dist/{transactionContext-BYtWnwAS.mjs → transactionContext-BTZzEcRo.mjs} +1 -1
  160. package/dist/{typeGuards-jjKJDN13.mjs → typeGuards-B-_jqaMi.mjs} +1 -1
  161. package/dist/types/index.d.mts +3 -3
  162. package/dist/types/index.mjs +1 -1
  163. package/dist/types/storage.mjs +1 -1
  164. package/dist/{types-BcTumAz_.d.mts → types-DDD5RKTu.d.mts} +30 -87
  165. package/dist/{types-BfC83KsP.d.mts → types-DSvHH0uR.d.mts} +1 -1
  166. package/dist/{types-ChuShpCP.d.mts → types-Ddl9OjmE.d.mts} +18 -121
  167. package/dist/{types-CoqIRrkY.mjs → types-GY4kATJb.mjs} +10 -53
  168. package/dist/usage/index.d.mts +2 -2
  169. package/dist/usage/index.mjs +0 -0
  170. package/dist/{userHelpers-CWF5pbZD.mjs → userHelpers-AKcB4V03.mjs} +1 -1
  171. package/dist/utils/index.d.mts +16 -42
  172. package/dist/utils/index.mjs +11 -11
  173. package/dist/{utils-h1V_sT-t.mjs → utils-CBK9HQOI.mjs} +3 -3
  174. package/dist/{validate-CdQlz52F.mjs → validate-dosAIvQU.mjs} +2 -2
  175. package/dist/{versioning-rZbyLVD-.mjs → versioning-BbTs4pwM.mjs} +3 -3
  176. package/package.json +8 -8
  177. package/dist/actionPermissions-CUeCmpUd.mjs +0 -25
  178. package/dist/defineAggregation-Nv-DwfOf.mjs +0 -48
  179. package/dist/preloadResources-BkyqeTDz.mjs +0 -46
  180. package/dist/registerRoute-Ba8v0PCa.mjs +0 -113
  181. package/dist/repositoryFilter-BANpz6BX.mjs +0 -78
  182. package/dist/simpleEqualityMatcher-Se8VrsaP.mjs +0 -69
@@ -1,11 +1,10 @@
1
- /*! @classytic/arc v2.34.0 | MIT | https://classytic.com */
2
- import { t as __exportAll } from "./rolldown-runtime-DNg-KNCk.mjs";
3
- import "./constants-BxCoxmiN.mjs";
4
- import { f as createError } from "./errors-Cd_yy7aW.mjs";
5
- import { a as buildRouteHooks, i as selectPluginMw, l as buildAuthMiddlewareForPermissions, n as buildRouteConfig, r as resolveRouterPluginMw, s as routeHookOptions, t as buildRateLimitConfig, u as buildArcDecorator } from "./rateLimit-D4-ASwsI.mjs";
6
- import { n as buildActionPermissionMw, t as tryRegisterRoute } from "./registerRoute-Ba8v0PCa.mjs";
7
- import { l as sendControllerResponse, r as resolvePipelineSteps, t as buildActionPipelineHandler } from "./pipeline-q69DZzgG.mjs";
8
- import { n as schemaIRToJsonSchemaBranch, t as normalizeSchemaIR } from "./schemaIR-CDvclAew.mjs";
1
+ /*! @classytic/arc v2.35.0 | MIT | https://classytic.com */
2
+ import { t as __exportAll } from "./rolldown-runtime-CEvvVXTC.mjs";
3
+ import "./constants-BhzLXCfN.mjs";
4
+ import { f as createError } from "./errors-CLid6atr.mjs";
5
+ import { a as selectPluginMw, c as buildRouteHooks, f as buildAuthMiddlewareForPermissions, i as resolveRouterPluginMw, n as buildRateLimitConfig, o as buildActionPermissionMw, p as buildArcDecorator, r as buildRouteConfig, t as tryRegisterRoute, u as routeHookOptions } from "./registerRoute-u1opU66a.mjs";
6
+ import { i as resolvePipelineSteps, n as buildActionPipelineHandler, u as sendControllerResponse } from "./actionPermissions-LFuOra7W.mjs";
7
+ import { n as schemaIRToJsonSchemaBranch, t as normalizeSchemaIR } from "./schemaIR-s3-ouZmP.mjs";
9
8
  //#region src/core/createActionRouter.ts
10
9
  var createActionRouter_exports = /* @__PURE__ */ __exportAll({
11
10
  buildActionBodySchema: () => buildActionBodySchema,
@@ -186,65 +185,29 @@ function createActionRouter(fastify, config) {
186
185
  });
187
186
  }
188
187
  /**
189
- * Build a discriminated body schema for the unified action endpoint.
188
+ * Discriminated body schema for the unified action endpoint: a top-level
189
+ * `action` enum plus a `oneOf` branch per action, each branch pinning
190
+ * `action: { const }` and carrying its own `required`.
190
191
  *
191
- * Produces a schema of the form:
192
- * ```json
193
- * {
194
- * "type": "object",
195
- * "required": ["action"],
196
- * "properties": {
197
- * "action": { "type": "string", "enum": ["dispatch", "approve"] },
198
- * "carrier": { "type": "string" }
199
- * },
200
- * "oneOf": [
201
- * {
202
- * "properties": {
203
- * "action": { "const": "dispatch" },
204
- * "carrier": { "type": "string" } // ← every branch lists the union
205
- * },
206
- * "required": ["action", "carrier"]
207
- * },
208
- * {
209
- * "properties": {
210
- * "action": { "const": "approve" },
211
- * "carrier": { "type": "string" } // ← even though approve doesn't use it
212
- * },
213
- * "required": ["action"]
214
- * }
215
- * ]
216
- * }
217
- * ```
192
+ * EVERY BRANCH LISTS THE FULL PROPERTY UNION — the non-obvious part. AJV's
193
+ * `removeAdditional: 'all'` (Fastify's default) strips a field during a
194
+ * branch's evaluation when that branch's `properties` omits it, EVEN IF
195
+ * another branch would have allowed it. The strip mutates the body before
196
+ * `oneOf` finishes discriminating, so the winning branch receives a body that
197
+ * has already lost fields: `POST { action: 'hold', amount, reason }` arrived at
198
+ * the handler as `{ action: 'hold' }`. Listing every action's properties on
199
+ * every branch makes each walk see every field as its own, so nothing is
200
+ * stripped; `required` stays per-action, so dispatch still gates correctly.
218
201
  *
219
- * **Why every branch carries the full property union.** AJV's
220
- * `removeAdditional: 'all'` (Fastify's framework default) interacts badly
221
- * with `oneOf`: when a branch's `properties` lacks a field, AJV strips it
222
- * from the body during that branch's evaluation — *even if a different
223
- * branch would have allowed it*. The strip mutates the body before
224
- * `oneOf` finishes discriminating, so by the time the matching branch
225
- * wins, the body has already lost fields. Concretely: `actions: { verify:
226
- * {}, hold: { schema: z.object({ amount, reason }.optional()) } }` +
227
- * `POST { action: 'hold', amount: 1, reason }` lands at the handler as
228
- * `{ action: 'hold' }`. Empirically reproduced and locked at
229
- * [tests/core/action-discriminator-strip.test.ts](../../tests/core/action-discriminator-strip.test.ts).
202
+ * Per-branch `additionalProperties: false` survives but cannot reject
203
+ * sibling-action fields under host `removeAdditional: 'all'` — those strip at
204
+ * top level instead. That is the host's opt-in; arc's job is only to stop
205
+ * losing an action's OWN declared fields. Under arc's `createApp`
206
+ * (`removeAdditional: false`) strict rejection works normally.
230
207
  *
231
- * Listing every action's properties on every branch makes per-branch
232
- * removeAdditional walks see every caller field as "in this branch's
233
- * properties," so nothing gets stripped during oneOf evaluation. The
234
- * `required` array stays per-action, so the handler still gets called
235
- * only when the matching branch's required-field contract is satisfied.
236
- * Per-branch `additionalProperties: false` (Zod v4 default) carries
237
- * through but, under host removeAdditional: 'all', it can no longer
238
- * reject sibling-action fields — those become silently stripped at top
239
- * level instead. That's the host's opt-in to stripping; arc's job is to
240
- * stop accidentally losing the action's *own* declared fields.
241
- *
242
- * Under arc's own `createApp` (`removeAdditional: false`), strict-mode
243
- * rejection still functions normally — see
244
- * [tests/core/action-strict-schema-parity.test.ts](../../tests/core/action-strict-schema-parity.test.ts).
245
- *
246
- * Exported so OpenAPI generation and MCP tool generation can reuse the same
247
- * schema shape (single source of truth).
208
+ * Pinned by `tests/core/action-discriminator-strip.test.ts` and
209
+ * `action-strict-schema-parity.test.ts`. Exported so OpenAPI and MCP tool
210
+ * generation reuse one shape.
248
211
  */
249
212
  function buildActionBodySchema(actionEnum, actionSchemas = {}) {
250
213
  const unionProperties = {};
@@ -1,10 +1,10 @@
1
- /*! @classytic/arc v2.34.0 | MIT | https://classytic.com */
2
- import { n as evaluateAndApplyPermission } from "./authorizationDecision-CMMLWmuZ.mjs";
3
- import { f as createError } from "./errors-Cd_yy7aW.mjs";
4
- import { u as getRequestScope } from "./types-CoqIRrkY.mjs";
5
- import { a as buildRouteHooks, c as buildAuthMiddleware, i as selectPluginMw, r as resolveRouterPluginMw, s as routeHookOptions, t as buildRateLimitConfig, u as buildArcDecorator } from "./rateLimit-D4-ASwsI.mjs";
6
- import { n as validateAggregations } from "./validate-CdQlz52F.mjs";
7
- import { t as buildAggregationHandler } from "./buildHandler-BrdYrG_1.mjs";
1
+ /*! @classytic/arc v2.35.0 | MIT | https://classytic.com */
2
+ import { n as evaluateAndApplyPermission } from "./authorizationDecision-DYXBBgtg.mjs";
3
+ import { f as createError } from "./errors-CLid6atr.mjs";
4
+ import { u as getRequestScope } from "./types-GY4kATJb.mjs";
5
+ import { a as selectPluginMw, c as buildRouteHooks, d as buildAuthMiddleware, i as resolveRouterPluginMw, n as buildRateLimitConfig, p as buildArcDecorator, u as routeHookOptions } from "./registerRoute-u1opU66a.mjs";
6
+ import { n as validateAggregations } from "./validate-dosAIvQU.mjs";
7
+ import { t as buildAggregationHandler } from "./buildHandler-Do9aMIvL.mjs";
8
8
  //#region src/core/aggregation/createAggregationRouter.ts
9
9
  /**
10
10
  * Register one Fastify route per aggregation. No-op when the map is
@@ -0,0 +1,25 @@
1
+ /*! @classytic/arc v2.35.0 | MIT | https://classytic.com */
2
+ //#region src/core/aggregation/defineAggregation.ts
3
+ /**
4
+ * Declare a single resource aggregation. Exported configs flow into
5
+ * `defineResource({ aggregations: { ... } })` either as named keys or
6
+ * via auto-discovery patterns (loadAggregations — future).
7
+ *
8
+ * A namespace import lets many live in their own files and flow in at once
9
+ * (`import * as aggregations` → `defineResource({ aggregations })`).
10
+ *
11
+ * @example
12
+ * ```ts
13
+ * export const revenueByStatus = defineAggregation({
14
+ * groupBy: 'status',
15
+ * measures: { count: 'count', revenue: 'sum:totalPrice' },
16
+ * permissions: requireRoles(['admin']),
17
+ * cache: { staleTime: 60 },
18
+ * });
19
+ * ```
20
+ */
21
+ function defineAggregation(config) {
22
+ return config;
23
+ }
24
+ //#endregion
25
+ export { defineAggregation as t };
@@ -1,22 +1,20 @@
1
- /*! @classytic/arc v2.34.0 | MIT | https://classytic.com */
2
- import { p as MUTATION_OPERATIONS, s as DEFAULT_UPDATE_METHOD, t as CRUD_OPERATIONS } from "./constants-BxCoxmiN.mjs";
1
+ /*! @classytic/arc v2.35.0 | MIT | https://classytic.com */
2
+ import { p as MUTATION_OPERATIONS, s as DEFAULT_UPDATE_METHOD, t as CRUD_OPERATIONS } from "./constants-BhzLXCfN.mjs";
3
3
  import { arcLog } from "./logger/index.mjs";
4
- import { r as ForbiddenError } from "./errors-Cd_yy7aW.mjs";
5
- import { n as getUserRoles } from "./userHelpers-CWF5pbZD.mjs";
6
- import { b as isElevated, n as PUBLIC_SCOPE, x as isMember } from "./types-CoqIRrkY.mjs";
7
- import { d as isWriteVerbCapable, p as DEFAULT_FIELD_WRITE_DENIAL_POLICY, t as BaseController, u as detectOverriddenWriteSlots } from "./BaseController-CbkuhNI2.mjs";
8
- import { a as buildRouteHooks, c as buildAuthMiddleware, i as selectPluginMw, n as buildRouteConfig, o as resolveRoutePreHandlers, r as resolveRouterPluginMw, s as routeHookOptions, t as buildRateLimitConfig, u as buildArcDecorator } from "./rateLimit-D4-ASwsI.mjs";
9
- import { i as resolveEffectiveRoles, n as applyFieldWritePermissions } from "./fields-CojeUkS4.mjs";
10
- import { r as buildCrudPermissionMw, t as tryRegisterRoute } from "./registerRoute-Ba8v0PCa.mjs";
11
- import { c as getDefaultCrudSchemas } from "./utils-h1V_sT-t.mjs";
12
- import { n as convertRouteSchema, r as ensureSchemaConverter, t as convertOpenApiSchemas } from "./schemaConverter-XH1RZRyu.mjs";
13
- import { i as pipeUIMessageStreamToReply, r as isReadableStream } from "./streaming-DsT1B5zJ.mjs";
14
- import { t as hasEvents } from "./typeGuards-jjKJDN13.mjs";
15
- import { a as createFastifyHandler, i as createCrudHandlers, n as buildPipelineHandler, o as createRequestContext, r as resolvePipelineSteps } from "./pipeline-q69DZzgG.mjs";
16
- import { B as requireAuth } from "./permissions-CP47jdi7.mjs";
17
- import { r as getAvailablePresets, t as applyPresets } from "./presets-BAPijK_A.mjs";
18
- import { t as pluralize } from "./pluralize-B7xf8qZF.mjs";
19
- import { t as resolveActionPermission } from "./actionPermissions-CUeCmpUd.mjs";
4
+ import { r as ForbiddenError } from "./errors-CLid6atr.mjs";
5
+ import { n as getUserRoles } from "./userHelpers-AKcB4V03.mjs";
6
+ import { b as isElevated, n as PUBLIC_SCOPE, x as isMember } from "./types-GY4kATJb.mjs";
7
+ import { d as isWriteVerbCapable, p as DEFAULT_FIELD_WRITE_DENIAL_POLICY, t as BaseController, u as detectOverriddenWriteSlots } from "./BaseController-C-pofd0v.mjs";
8
+ import { a as selectPluginMw, c as buildRouteHooks, d as buildAuthMiddleware, i as resolveRouterPluginMw, l as resolveRoutePreHandlers, n as buildRateLimitConfig, p as buildArcDecorator, r as buildRouteConfig, s as buildCrudPermissionMw, t as tryRegisterRoute, u as routeHookOptions } from "./registerRoute-u1opU66a.mjs";
9
+ import { i as resolveEffectiveRoles, n as applyFieldWritePermissions } from "./fields-UtpiJO5R.mjs";
10
+ import { c as getDefaultCrudSchemas } from "./utils-CBK9HQOI.mjs";
11
+ import { n as convertRouteSchema, r as ensureSchemaConverter, t as convertOpenApiSchemas } from "./schemaConverter-D2_bHGil.mjs";
12
+ import { i as pipeUIMessageStreamToReply, r as isReadableStream } from "./streaming-DOpZVht6.mjs";
13
+ import { t as hasEvents } from "./typeGuards-B-_jqaMi.mjs";
14
+ import { a as createCrudHandlers, i as resolvePipelineSteps, o as createFastifyHandler, r as buildPipelineHandler, s as createRequestContext, t as resolveActionPermission } from "./actionPermissions-LFuOra7W.mjs";
15
+ import { B as requireAuth } from "./permissions-CpSBlFXZ.mjs";
16
+ import { r as getAvailablePresets, t as applyPresets } from "./presets-Bi0Z6Iq8.mjs";
17
+ import { t as pluralize } from "./pluralize-DGAQQKL8.mjs";
20
18
  import { isReadOnlyRepo } from "@classytic/repo-core/repository";
21
19
  //#region src/core/middlewares/fieldWrite.ts
22
20
  /**
@@ -939,50 +937,27 @@ function stripFromRequired(schema, fieldName) {
939
937
  return next;
940
938
  }
941
939
  /**
942
- * Strip framework-injected fields from the `required[]` list of every
943
- * body-shaped slot in an adapter's generated schemas.
944
- *
945
- * A "framework-injected field" is any field marked `systemManaged: true`
946
- * in `schemaOptions.fieldRules`. Arc populates those fields from the
947
- * request scope / preset middleware / controller — the client is never
948
- * expected to supply them, so they must not be in the wire contract's
949
- * `required[]` even if the underlying engine's Mongoose/Zod schema
950
- * declares them as required at the DB layer.
951
- *
952
- * **The primary gotcha this closes:** engines built on
953
- * `@classytic/primitives` (mongokit, pricelist, and every downstream
954
- * `@classytic/*` engine) default to `tenant: { required: true }` in
955
- * `resolveTenantConfig()`. That stamps `organizationId: { required: true }`
956
- * on the Mongoose schema, which the adapter faithfully reflects into the
957
- * generated `createBody` / `updateBody` schema's `required[]`. Fastify's
958
- * preValidation runs BEFORE arc's preHandler chain, so
959
- * `multiTenantPreset`'s tenant-injection hook never gets a chance to run —
960
- * the request is rejected with `must have required property 'organizationId'`
961
- * even though the client correctly supplied `x-organization-id` and the
962
- * framework had already promised to inject the value.
963
- *
964
- * The only workaround before 2.11 was
965
- * `createEngine({ tenant: { required: false } })` at every consumer site —
966
- * a leaky abstraction every new engine-backed resource had to remember.
967
- *
968
- * **Secondary coverage (defense-in-depth):** the same transform also fires
969
- * for `auditedPreset`'s `createdBy` / `updatedBy`, any future preset that
970
- * marks fields `systemManaged`, and any host-declared `fieldRules` with
971
- * `systemManaged: true`. Every framework-injected field gets the wire
972
- * contract / runtime pairing for free.
973
- *
974
- * **Leaves `properties` intact** — elevated admins or advanced callers can
975
- * still send systemManaged fields in the body. `BodySanitizer` enforces
976
- * the runtime policy (`preserveForElevated`, `strip` vs `reject`, etc.).
977
- *
978
- * **No-op when:**
979
- * - `schemaOptions.fieldRules` is undefined / empty
980
- * - No rule has `systemManaged: true`
981
- * - The generated schemas object is undefined (adapter didn't generate any)
982
- *
983
- * Applies to both `createBody` and `updateBody` — update middleware also
984
- * injects tenant/audit fields, so the update wire contract has the same
985
- * problem as create.
940
+ * Drop `systemManaged` fields from `required[]` in generated body schemas.
941
+ *
942
+ * Arc populates those from scope / preset middleware / controller, so a client
943
+ * never supplies them — but the DB schema may still mark them required, and the
944
+ * adapter reflects that into the wire contract.
945
+ *
946
+ * THE GOTCHA THIS CLOSES: engines on `@classytic/primitives` default to
947
+ * `tenant: { required: true }`, stamping `organizationId` as required. Fastify
948
+ * preValidation runs BEFORE arc's preHandler chain, so the tenant-injection
949
+ * hook never gets to run and the request dies on
950
+ * `must have required property 'organizationId'` — even though the client sent
951
+ * `x-organization-id` and arc had promised to inject it. The alternative was
952
+ * `tenant: { required: false }` at every consumer site.
953
+ *
954
+ * Also covers `auditedPreset`'s `createdBy`/`updatedBy` and any host rule
955
+ * marked `systemManaged`. Applies to create AND update, since update middleware
956
+ * injects the same fields.
957
+ *
958
+ * `properties` is left INTACT — an elevated caller may still send these, and
959
+ * `BodySanitizer` owns that runtime policy (`preserveForElevated`,
960
+ * strip-vs-reject). No-op without `systemManaged` rules or generated schemas.
986
961
  */
987
962
  function stripSystemManagedFromBodyRequired(schemas, schemaOptions) {
988
963
  if (!schemas) return schemas;
@@ -1188,8 +1163,8 @@ function buildGeneratedCrudSchemas(openApi, customSchemas) {
1188
1163
  const { createBody, updateBody, params } = openApi;
1189
1164
  if (createBody) generated.create = { body: safeBody(createBody) };
1190
1165
  if (updateBody) {
1191
- const patchBody = { ...updateBody };
1192
- delete patchBody.required;
1166
+ const patchBody = structuredClone(updateBody);
1167
+ stripRequiredDeep(patchBody);
1193
1168
  generated.update = { body: safeBody(patchBody) };
1194
1169
  if (params) generated.update.params = cloneShallow(params);
1195
1170
  }
@@ -1287,6 +1262,27 @@ function deepMergeSchemas(base, override) {
1287
1262
  function cloneShallow(value) {
1288
1263
  return { ...value };
1289
1264
  }
1265
+ /**
1266
+ * Delete every `required` from a JSON-schema subtree — PATCH means optional at
1267
+ * every depth, not just the root.
1268
+ *
1269
+ * A generator may legitimately return an `updateBody` whose nested
1270
+ * subdocument-array `items` carries its own `required`. Stripping only the
1271
+ * root left that intact, so a PATCH adding one item to a subdocument array was
1272
+ * rejected by AJV for a field the caller had no way to know it must resend.
1273
+ * Recursing here enforces PATCH semantics on whatever a generator produces,
1274
+ * rather than trusting each to recurse correctly.
1275
+ */
1276
+ function stripRequiredDeep(node) {
1277
+ if (Array.isArray(node)) {
1278
+ for (const item of node) stripRequiredDeep(item);
1279
+ return;
1280
+ }
1281
+ if (!node || typeof node !== "object") return;
1282
+ const obj = node;
1283
+ delete obj.required;
1284
+ for (const value of Object.values(obj)) stripRequiredDeep(value);
1285
+ }
1290
1286
  function safeBody(schema) {
1291
1287
  if (schema && typeof schema === "object" && schema.type === "object") return {
1292
1288
  additionalProperties: true,
@@ -1429,7 +1425,7 @@ function buildResourcePlugin(resource) {
1429
1425
  extensions: resource.extensions
1430
1426
  });
1431
1427
  if (resource.actions && Object.keys(resource.actions).length > 0) {
1432
- const { createActionRouter } = await import("./createActionRouter-D6T0jWhS.mjs").then((n) => n.n);
1428
+ const { createActionRouter } = await import("./createActionRouter-EYWgd0ly.mjs").then((n) => n.n);
1433
1429
  createActionRouter(typedInstance, {
1434
1430
  ...normalizeActionsToRouterConfig(resource.actions, resource.actionPermissions, resource.tag, resource.permissions, resource.name, typedInstance.log),
1435
1431
  resourceName: resource.name,
@@ -1444,7 +1440,7 @@ function buildResourcePlugin(resource) {
1444
1440
  });
1445
1441
  }
1446
1442
  if (resource.aggregations && Object.keys(resource.aggregations).length > 0) {
1447
- const [{ createAggregationRouter }, { adapterSupportsAggregate, ArcAggregationConfigError }] = await Promise.all([import("./createAggregationRouter-QLV2PrWP.mjs"), import("./validate-CdQlz52F.mjs").then((n) => n.r)]);
1443
+ const [{ createAggregationRouter }, { adapterSupportsAggregate, ArcAggregationConfigError }] = await Promise.all([import("./createAggregationRouter-ByOK9Iev.mjs"), import("./validate-dosAIvQU.mjs").then((n) => n.r)]);
1448
1444
  const repoForAgg = resource.controller?.repository ?? resource.repository;
1449
1445
  if (!adapterSupportsAggregate(repoForAgg)) {
1450
1446
  const undispatchable = Object.entries(resource.aggregations).filter(([, cfg]) => !cfg.materialized).map(([name]) => name);
@@ -1,4 +1,4 @@
1
- /*! @classytic/arc v2.34.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.35.0 | MIT | https://classytic.com */
2
2
  import { readdir } from "node:fs/promises";
3
3
  import { extname, join, resolve } from "node:path";
4
4
  import { pathToFileURL } from "node:url";
@@ -1,5 +1,5 @@
1
1
 
2
- import { p as RegistryEntry } from "../index-BcR2bFZQ.mjs";
2
+ import { p as RegistryEntry } from "../index-C5K78SXo.mjs";
3
3
  import { t as ExternalOpenApiPaths } from "../externalPaths-CmGOxOtD.mjs";
4
4
  import { FastifyPluginAsync } from "fastify";
5
5
  //#region src/docs/openapi/types.d.ts
@@ -1,6 +1,6 @@
1
- /*! @classytic/arc v2.34.0 | MIT | https://classytic.com */
2
- import { n as getUserRoles } from "../userHelpers-CWF5pbZD.mjs";
3
- import { n as openApiPlugin, r as openapi_default, t as buildOpenApiSpec } from "../openapi-CkV5mQ53.mjs";
1
+ /*! @classytic/arc v2.35.0 | MIT | https://classytic.com */
2
+ import { n as getUserRoles } from "../userHelpers-AKcB4V03.mjs";
3
+ import { n as openApiPlugin, r as openapi_default, t as buildOpenApiSpec } from "../openapi-ItLH12_L.mjs";
4
4
  import fp from "fastify-plugin";
5
5
  //#region src/docs/scalar.ts
6
6
  const scalarPlugin = async (fastify, opts = {}) => {
@@ -1,8 +1,8 @@
1
- /*! @classytic/arc v2.34.0 | MIT | https://classytic.com */
2
- import { t as __exportAll } from "./rolldown-runtime-DNg-KNCk.mjs";
1
+ /*! @classytic/arc v2.35.0 | MIT | https://classytic.com */
2
+ import { t as __exportAll } from "./rolldown-runtime-CEvvVXTC.mjs";
3
3
  import { arcLog } from "./logger/index.mjs";
4
- import { n as requireSingleHeaderValue } from "./headers-CveNO9gR.mjs";
5
- import { n as getUserRoles } from "./userHelpers-CWF5pbZD.mjs";
4
+ import { n as requireSingleHeaderValue } from "./headers-DODWf7aC.mjs";
5
+ import { n as getUserRoles } from "./userHelpers-AKcB4V03.mjs";
6
6
  import fp from "fastify-plugin";
7
7
  //#region src/scope/elevation.ts
8
8
  var elevation_exports = /* @__PURE__ */ __exportAll({
@@ -1,6 +1,6 @@
1
- /*! @classytic/arc v2.34.0 | MIT | https://classytic.com */
2
- import { t as ArcError } from "../errors-Cd_yy7aW.mjs";
3
- import { t as parseJsonBody } from "../jsonBody-CfGH-GxO.mjs";
1
+ /*! @classytic/arc v2.35.0 | MIT | https://classytic.com */
2
+ import { t as ArcError } from "../errors-CLid6atr.mjs";
3
+ import { t as parseJsonBody } from "../jsonBody-CVKA7C5m.mjs";
4
4
  import { createCipheriv, createDecipheriv, randomBytes } from "node:crypto";
5
5
  import fp from "fastify-plugin";
6
6
  //#region src/encryption/fieldCipher.ts
@@ -1,6 +1,6 @@
1
- /*! @classytic/arc v2.34.0 | MIT | https://classytic.com */
2
- import { t as __exportAll } from "./rolldown-runtime-DNg-KNCk.mjs";
3
- import { m as statusToArcCode, p as isArcError } from "./errors-Cd_yy7aW.mjs";
1
+ /*! @classytic/arc v2.35.0 | MIT | https://classytic.com */
2
+ import { t as __exportAll } from "./rolldown-runtime-CEvvVXTC.mjs";
3
+ import { m as statusToArcCode, p as isArcError } from "./errors-CLid6atr.mjs";
4
4
  import { isHttpError, toErrorContract } from "@classytic/repo-core/errors";
5
5
  import { isProductionEnv } from "@classytic/primitives/environment";
6
6
  import fp from "fastify-plugin";
@@ -1,4 +1,4 @@
1
- /*! @classytic/arc v2.34.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.35.0 | MIT | https://classytic.com */
2
2
  //#region src/utils/errors.ts
3
3
  /**
4
4
  * Base Arc Error. Implements the canonical `HttpError` contract — `status`
@@ -340,7 +340,7 @@ interface EventPluginOptions {
340
340
  */
341
341
  validateMode?: "warn" | "reject" | "off";
342
342
  /**
343
- * Dev-mode duplicate-publish detector (v2.12).
343
+ * Dev-mode duplicate-publish detector.
344
344
  *
345
345
  * When enabled, arc keeps a 5-second LRU on `(eventType, correlationId)`
346
346
  * and emits an `arcLog("events").warn(...)` the second time a request
@@ -1,9 +1,9 @@
1
- /*! @classytic/arc v2.34.0 | MIT | https://classytic.com */
2
- import { t as __exportAll } from "./rolldown-runtime-DNg-KNCk.mjs";
1
+ /*! @classytic/arc v2.35.0 | MIT | https://classytic.com */
2
+ import { t as __exportAll } from "./rolldown-runtime-CEvvVXTC.mjs";
3
3
  import { arcLog } from "./logger/index.mjs";
4
- import { d as createDomainError } from "./errors-Cd_yy7aW.mjs";
5
- import { n as requestContext } from "./requestContext-uYE35JxI.mjs";
6
- import { n as MemoryEventTransport, r as createEvent, t as ARC_EVENT_TRANSPORT } from "./EventTransport-tq4CEB-q.mjs";
4
+ import { d as createDomainError } from "./errors-CLid6atr.mjs";
5
+ import { n as requestContext } from "./requestContext-DzOUGNdY.mjs";
6
+ import { n as MemoryEventTransport, r as createEvent, t as ARC_EVENT_TRANSPORT } from "./EventTransport-BrPeGUil.mjs";
7
7
  import { isProductionEnv } from "@classytic/primitives/environment";
8
8
  import fp from "fastify-plugin";
9
9
  //#region src/events/retry.ts
@@ -1,7 +1,7 @@
1
1
 
2
2
  import { i as EventLogger, n as DomainEvent, o as MemoryEventTransport, r as EventHandler, s as MemoryEventTransportOptions } from "../EventTransport-BEVP50ka.mjs";
3
- import { a as withRetry, c as EventDefinitionOutput, d as EventSchema, f as ValidationResult, i as createDeadLetterPublisher, l as EventRegistry, m as defineEvent, n as eventPlugin, o as CustomValidator, p as createEventRegistry, r as RetryOptions, s as EventDefinitionInput, t as EventPluginOptions, u as EventRegistryOptions } from "../eventPlugin-DSNEZWfV.mjs";
4
- import { a as EventOutbox, c as OutboxRelayErrorKind, i as MemoryOutboxStore, l as RelayResult, n as OutboxModuleOptions, o as EventOutboxOptions, r as createOutboxModule, s as OutboxRelayErrorHandler, t as OutboxModuleExports } from "../outbox-module-C1Bs_FXF.mjs";
3
+ import { a as withRetry, c as EventDefinitionOutput, d as EventSchema, f as ValidationResult, i as createDeadLetterPublisher, l as EventRegistry, m as defineEvent, n as eventPlugin, o as CustomValidator, p as createEventRegistry, r as RetryOptions, s as EventDefinitionInput, t as EventPluginOptions, u as EventRegistryOptions } from "../eventPlugin-B47sfCJ8.mjs";
4
+ import { a as EventOutbox, c as OutboxRelayErrorKind, i as MemoryOutboxStore, l as RelayResult, n as OutboxModuleOptions, o as EventOutboxOptions, r as createOutboxModule, s as OutboxRelayErrorHandler, t as OutboxModuleExports } from "../outbox-module-b1TyDGGi.mjs";
5
5
  import { RedisEventTransportOptions, RedisLike } from "./transports/redis.mjs";
6
6
  import { r as RedisStreamTransportOptions, t as RedisStreamLike } from "../redis-stream-mwLWlfHG.mjs";
7
7
  import { OutboxStore } from "@classytic/primitives/outbox";
@@ -1,8 +1,8 @@
1
- /*! @classytic/arc v2.34.0 | MIT | https://classytic.com */
2
- import { n as MemoryEventTransport } from "../EventTransport-tq4CEB-q.mjs";
3
- import { a as createEventRegistry, i as wrapWithSchema, n as subscribeWithSchema, o as defineEvent, r as wrapWithBoundary, t as subscribeWithBoundary } from "../subscribe-helpers-CLIOHsOK.mjs";
4
- import { i as withRetry, r as createDeadLetterPublisher, t as eventPlugin } from "../eventPlugin-Dar8qRaj.mjs";
5
- import { i as exponentialBackoff, n as EventOutbox, r as repositoryAsOutboxStore, t as createOutboxModule } from "../outbox-module-D1QfHqO4.mjs";
1
+ /*! @classytic/arc v2.35.0 | MIT | https://classytic.com */
2
+ import { n as MemoryEventTransport } from "../EventTransport-BrPeGUil.mjs";
3
+ import { a as createEventRegistry, i as wrapWithSchema, n as subscribeWithSchema, o as defineEvent, r as wrapWithBoundary, t as subscribeWithBoundary } from "../subscribe-helpers-Dh2BnzJf.mjs";
4
+ import { i as withRetry, r as createDeadLetterPublisher, t as eventPlugin } from "../eventPlugin-ClPn5kjn.mjs";
5
+ import { i as exponentialBackoff, n as EventOutbox, r as repositoryAsOutboxStore, t as createOutboxModule } from "../outbox-module-SGIZz6oS.mjs";
6
6
  import { MemoryOutboxStore } from "@classytic/primitives/memory-outbox";
7
7
  //#region src/events/eventTypes.ts
8
8
  /**
@@ -1,4 +1,4 @@
1
- /*! @classytic/arc v2.34.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.35.0 | MIT | https://classytic.com */
2
2
  import sjson from "secure-json-parse";
3
3
  //#region src/events/transports/redis-stream.ts
4
4
  /**
@@ -1,4 +1,4 @@
1
- /*! @classytic/arc v2.34.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.35.0 | MIT | https://classytic.com */
2
2
  import sjson from "secure-json-parse";
3
3
  //#region src/events/transports/redis.ts
4
4
  /**
@@ -1,8 +1,8 @@
1
1
 
2
- import { _ as HealthCheck, a as ModuleContribution, c as LoadResourcesOptions, d as loadResources, i as EventHandlerDefinition, l as ResourceLike, n as ArcModuleInput, o as ModuleDisposer, r as ArcModuleRegistry, s as ModuleSetupContext, t as ArcModule, u as ResourceModule } from "../types-BcTumAz_.mjs";
3
- import { _ as collectModuleScheduledJobs, a as lazyModuleExports, c as getModuleState, d as resolveModule, f as orderModules, g as collectModuleHealthChecks, h as extendModule, i as hasModuleExports, l as hasModule, m as ModuleExtension, n as getModuleExports, o as lazyRequiredModuleExports, p as subscribeModuleEventHandlers, r as getOptionalModuleExports, s as ModuleState, t as defineModule, u as resolveContribution, v as collectModuleWorkflows } from "../index-C5NnMEKF.mjs";
4
- import { c as ResolvedResourceDescriptor, l as describeResolvedModule, o as ResolvedModuleDescriptor, s as ResolvedModuleLifecycle } from "../fastify-augmentation-DVsTAy6X.mjs";
5
- import { a as RawBodyOptions, c as BetterAuthOption, d as JwtAuthOption, i as MultipartOptions, l as CustomAuthenticatorOption, n as preloadResourcesAsync, o as UnderPressureOptions, r as CreateAppOptions, s as AuthOption, t as preloadResources, u as CustomPluginAuthOption } from "../preloadResources-g07ldtzh.mjs";
2
+ import { _ as HealthCheck, a as ModuleContribution, c as LoadResourcesOptions, d as loadResources, i as EventHandlerDefinition, l as ResourceLike, n as ArcModuleInput, o as ModuleDisposer, r as ArcModuleRegistry, s as ModuleSetupContext, t as ArcModule, u as ResourceModule } from "../types-DDD5RKTu.mjs";
3
+ import { _ as collectModuleScheduledJobs, a as lazyModuleExports, c as getModuleState, d as resolveModule, f as orderModules, g as collectModuleHealthChecks, h as extendModule, i as hasModuleExports, l as hasModule, m as ModuleExtension, n as getModuleExports, o as lazyRequiredModuleExports, p as subscribeModuleEventHandlers, r as getOptionalModuleExports, s as ModuleState, t as defineModule, u as resolveContribution, v as collectModuleWorkflows } from "../index-C50BUxKs.mjs";
4
+ import { c as ResolvedResourceDescriptor, l as describeResolvedModule, o as ResolvedModuleDescriptor, s as ResolvedModuleLifecycle } from "../fastify-augmentation-CMMTL3cj.mjs";
5
+ import { a as RawBodyOptions, c as BetterAuthOption, d as JwtAuthOption, i as MultipartOptions, l as CustomAuthenticatorOption, n as preloadResourcesAsync, o as UnderPressureOptions, r as CreateAppOptions, s as AuthOption, t as preloadResources, u as CustomPluginAuthOption } from "../preloadResources--ZtY9pe9.mjs";
6
6
  import { FastifyInstance, FastifyServerOptions } from "fastify";
7
7
  //#region src/factory/createApp.d.ts
8
8
  /**
@@ -17,7 +17,7 @@ import { FastifyInstance, FastifyServerOptions } from "fastify";
17
17
  * Hosts that need NO redaction (test fixtures, security audits) opt out
18
18
  * with `logger: { redact: [] }`. Hosts that need MORE redaction supply
19
19
  * their own `redact` and arc steps aside — this default never overrides
20
- * an explicit setting. (2.15.1)
20
+ * an explicit setting.
21
21
  */
22
22
  declare const DEFAULT_LOGGER_REDACT_PATHS: readonly ["req.headers.authorization", 'req.headers["x-api-key"]', 'req.headers["x-internal-api-key"]', "req.headers.cookie", 'req.headers["set-cookie"]', 'res.headers["set-cookie"]', "*.password", "*.passwordHash", "*.token", "*.accessToken", "*.refreshToken", "*.secret", "*.apiKey"];
23
23
  /**
@@ -1,9 +1,8 @@
1
- /*! @classytic/arc v2.34.0 | MIT | https://classytic.com */
2
- import { r as mergeHealthChecks, t as healthPlugin } from "../health-CasG2A28.mjs";
3
- import { _ as collectModuleScheduledJobs, a as developmentPreset, b as resolveModule, c as productionPreset, d as getModuleState, f as hasModule, g as collectModuleHealthChecks, h as describeResolvedModule, l as testingPreset, m as subscribeModuleEventHandlers, n as DEFAULT_LOGGER_REDACT_PATHS, o as edgePreset, p as orderModules, r as createApp, s as getPreset, t as ArcFactory, u as workerPreset, v as collectModuleWorkflows, y as resolveContribution } from "../createApp-zR-DEesr.mjs";
4
- import { a as lazyModuleExports, i as hasModuleExports, n as getModuleExports, o as lazyRequiredModuleExports, r as getOptionalModuleExports, t as defineModule } from "../module-CwKsgZXp.mjs";
5
- import { t as loadResources } from "../loadResources-Bj-aSsXi.mjs";
6
- import { n as preloadResourcesAsync, t as preloadResources } from "../preloadResources-BkyqeTDz.mjs";
1
+ /*! @classytic/arc v2.35.0 | MIT | https://classytic.com */
2
+ import { r as mergeHealthChecks, t as healthPlugin } from "../health-_Zs3R_Sb.mjs";
3
+ import { S as resolveModule, _ as describeResolvedModule, a as createApp, b as collectModuleWorkflows, c as edgePreset, d as testingPreset, f as workerPreset, g as subscribeModuleEventHandlers, h as orderModules, i as DEFAULT_LOGGER_REDACT_PATHS, l as getPreset, m as hasModule, n as preloadResourcesAsync, p as getModuleState, r as ArcFactory, s as developmentPreset, t as preloadResources, u as productionPreset, v as collectModuleHealthChecks, x as resolveContribution, y as collectModuleScheduledJobs } from "../preloadResources-DYMzmUk1.mjs";
4
+ import { a as lazyModuleExports, i as hasModuleExports, n as getModuleExports, o as lazyRequiredModuleExports, r as getOptionalModuleExports, t as defineModule } from "../module-Bh5OC7ww.mjs";
5
+ import { t as loadResources } from "../loadResources-DdQb0qgV.mjs";
7
6
  //#region src/factory/module/extend.ts
8
7
  /** Concatenate two contributions, resolving factories only when arc asks. */
9
8
  function mergeContribution(own, extra) {
@@ -1,8 +1,8 @@
1
1
 
2
- import { on as HookSystem, z as ResourceRegistry } from "./index-BcR2bFZQ.mjs";
2
+ import { on as HookSystem, z as ResourceRegistry } from "./index-C5K78SXo.mjs";
3
3
  import { t as ExternalOpenApiPaths } from "./externalPaths-CmGOxOtD.mjs";
4
- import { _ as HealthCheck, f as ScheduleDefinition, r as ArcModuleRegistry, t as ArcModule } from "./types-BcTumAz_.mjs";
5
- import { s as ModuleState } from "./index-C5NnMEKF.mjs";
4
+ import { _ as HealthCheck, f as ScheduleDefinition, r as ArcModuleRegistry, t as ArcModule } from "./types-DDD5RKTu.mjs";
5
+ import { s as ModuleState } from "./index-C50BUxKs.mjs";
6
6
  import { FastifyPluginAsync } from "fastify";
7
7
  //#region src/factory/module/descriptor.d.ts
8
8
  /**
@@ -1,4 +1,4 @@
1
- /*! @classytic/arc v2.34.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.35.0 | MIT | https://classytic.com */
2
2
  //#region src/permissions/fields.ts
3
3
  /**
4
4
  * Field-Level Permissions
@@ -1,5 +1,5 @@
1
- /*! @classytic/arc v2.34.0 | MIT | https://classytic.com */
2
- import { t as pluralize } from "./pluralize-B7xf8qZF.mjs";
1
+ /*! @classytic/arc v2.35.0 | MIT | https://classytic.com */
2
+ import { t as pluralize } from "./pluralize-DGAQQKL8.mjs";
3
3
  import { join } from "node:path";
4
4
  import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
5
5
  //#region src/cli/commands/generate/name-helpers.ts
@@ -1,5 +1,5 @@
1
- /*! @classytic/arc v2.34.0 | MIT | https://classytic.com */
2
- import { u as ValidationError } from "./errors-Cd_yy7aW.mjs";
1
+ /*! @classytic/arc v2.35.0 | MIT | https://classytic.com */
2
+ import { u as ValidationError } from "./errors-CLid6atr.mjs";
3
3
  //#region src/utils/headers.ts
4
4
  /**
5
5
  * Canonical header typing + accessor.
@@ -1,4 +1,4 @@
1
- /*! @classytic/arc v2.34.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.35.0 | MIT | https://classytic.com */
2
2
  import { randomUUID } from "node:crypto";
3
3
  import fp from "fastify-plugin";
4
4
  //#region src/plugins/requestId.ts
@@ -1,3 +1,3 @@
1
1
 
2
- import { an as HookRegistration, cn as afterCreate, dn as beforeCreate, en as DefineHookOptions, fn as beforeDelete, hn as defineHook, in as HookPhase, ln as afterDelete, mn as createHookSystem, nn as HookHandler, on as HookSystem, pn as beforeUpdate, rn as HookOperation, sn as HookSystemOptions, tn as HookContext, un as afterUpdate } from "../index-BcR2bFZQ.mjs";
2
+ import { an as HookRegistration, cn as afterCreate, dn as beforeCreate, en as DefineHookOptions, fn as beforeDelete, hn as defineHook, in as HookPhase, ln as afterDelete, mn as createHookSystem, nn as HookHandler, on as HookSystem, pn as beforeUpdate, rn as HookOperation, sn as HookSystemOptions, tn as HookContext, un as afterUpdate } from "../index-C5K78SXo.mjs";
3
3
  export { type DefineHookOptions, type HookContext, type HookHandler, type HookOperation, type HookPhase, type HookRegistration, HookSystem, type HookSystemOptions, afterCreate, afterDelete, afterUpdate, beforeCreate, beforeDelete, beforeUpdate, createHookSystem, defineHook };
@@ -1,3 +1,3 @@
1
- /*! @classytic/arc v2.34.0 | MIT | https://classytic.com */
2
- import { a as beforeCreate, c as createHookSystem, i as afterUpdate, l as defineHook, n as afterCreate, o as beforeDelete, r as afterDelete, s as beforeUpdate, t as HookSystem } from "../HookSystem-DqXkMXkB.mjs";
1
+ /*! @classytic/arc v2.35.0 | MIT | https://classytic.com */
2
+ import { a as beforeCreate, c as createHookSystem, i as afterUpdate, l as defineHook, n as afterCreate, o as beforeDelete, r as afterDelete, s as beforeUpdate, t as HookSystem } from "../HookSystem-LlPm3Anm.mjs";
3
3
  export { HookSystem, afterCreate, afterDelete, afterUpdate, beforeCreate, beforeDelete, beforeUpdate, createHookSystem, defineHook };