@classytic/arc 2.36.0 → 2.37.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 (147) hide show
  1. package/dist/{BaseController-CTJKm6Cb.mjs → BaseController-B5GZfUBy.mjs} +11 -11
  2. package/dist/{EventTransport-D23Uvhg4.mjs → EventTransport-pGNNDQ__.mjs} +1 -1
  3. package/dist/{HookSystem-DgwxNZTx.mjs → HookSystem-CuhHvcyZ.mjs} +2 -2
  4. package/dist/{ResourceRegistry-DNuYVbmv.mjs → ResourceRegistry-DFOmazXg.mjs} +2 -2
  5. package/dist/{actionPermissions-D97DniUQ.mjs → actionPermissions-CQQrR4tu.mjs} +6 -6
  6. package/dist/audit/index.mjs +2 -2
  7. package/dist/auth/audit.mjs +1 -1
  8. package/dist/auth/index.mjs +6 -6
  9. package/dist/auth/redis-session.mjs +1 -1
  10. package/dist/{authorizationDecision-EsiY3nUu.mjs → authorizationDecision-DgyWdav8.mjs} +2 -2
  11. package/dist/{buildHandler-Dohd2JuY.mjs → buildHandler-D2DkqtiY.mjs} +4 -4
  12. package/dist/cache/index.mjs +4 -4
  13. package/dist/{caching-CP3GLJ7U.mjs → caching-BmC2T-pX.mjs} +2 -2
  14. package/dist/cleanup/index.d.mts +1 -1
  15. package/dist/cleanup/index.mjs +4 -4
  16. package/dist/cli/commands/describe.mjs +3 -3
  17. package/dist/cli/commands/docs.mjs +3 -3
  18. package/dist/cli/commands/doctor.mjs +1 -1
  19. package/dist/cli/commands/generate.mjs +2 -2
  20. package/dist/cli/commands/init.mjs +2 -2
  21. package/dist/cli/commands/introspect.mjs +2 -2
  22. package/dist/cli/index.mjs +3 -3
  23. package/dist/{constants-DUoKAGYD.mjs → constants-CUpamQMJ.mjs} +1 -1
  24. package/dist/context/index.mjs +3 -3
  25. package/dist/core/index.d.mts +1 -1
  26. package/dist/core/index.mjs +7 -7
  27. package/dist/{core-DTXsiNTJ.mjs → core-C8GWw-Iu.mjs} +3 -3
  28. package/dist/{createActionRouter-CZz6JO93.mjs → createActionRouter-CwDU_j2S.mjs} +7 -7
  29. package/dist/{createAggregationRouter-DKrGv_EC.mjs → createAggregationRouter-d057xXX1.mjs} +7 -7
  30. package/dist/{defineAggregation-CpQfcM8R.mjs → defineAggregation-cCitY2FA.mjs} +1 -1
  31. package/dist/{defineResource-DWzjyxb2.mjs → defineResource-WcbE1kJL.mjs} +18 -18
  32. package/dist/discovery/index.mjs +1 -1
  33. package/dist/docs/index.mjs +3 -3
  34. package/dist/{elevation-D_cmo80j.mjs → elevation-Bc6Gafv9.mjs} +4 -4
  35. package/dist/encryption/index.mjs +3 -3
  36. package/dist/{errorHandler-2RT0hLSI.mjs → errorHandler-CB75oY5i.mjs} +3 -3
  37. package/dist/{errors-DDKni6Tz.mjs → errors-DsdZc1Xv.mjs} +1 -1
  38. package/dist/{eventPlugin-c3YwGzz9.mjs → eventPlugin-DEIfV1iC.mjs} +5 -5
  39. package/dist/events/index.d.mts +1 -1
  40. package/dist/events/index.mjs +5 -5
  41. package/dist/events/transports/redis-stream-entry.mjs +1 -1
  42. package/dist/events/transports/redis.mjs +1 -1
  43. package/dist/factory/index.d.mts +4 -4
  44. package/dist/factory/index.mjs +5 -5
  45. package/dist/{fastify-augmentation-Bk_9PoiV.d.mts → fastify-augmentation-CdY8FINU.d.mts} +2 -2
  46. package/dist/{fields-DdP225wt.mjs → fields-DvGz47Ul.mjs} +1 -1
  47. package/dist/{generate-B1bKdcV9.mjs → generate-D7CIIWhS.mjs} +2 -2
  48. package/dist/{headers-DKslnhey.mjs → headers-BFu1st_i.mjs} +2 -2
  49. package/dist/{health-k6NODS8f.mjs → health-Cc_sb94d.mjs} +1 -1
  50. package/dist/hooks/index.mjs +2 -2
  51. package/dist/idempotency/index.mjs +4 -4
  52. package/dist/idempotency/redis.mjs +1 -1
  53. package/dist/{index-C50BUxKs.d.mts → index-DCxxRwLC.d.mts} +1 -1
  54. package/dist/{index-RdpLP71b.d.mts → index-du18bJjH.d.mts} +1 -1
  55. package/dist/index.d.mts +2 -2
  56. package/dist/index.mjs +11 -11
  57. package/dist/{init-LuGxIbQ_.mjs → init-BMgU1wYR.mjs} +1 -1
  58. package/dist/integrations/event-gateway.mjs +2 -2
  59. package/dist/integrations/index.mjs +1 -1
  60. package/dist/integrations/jobs/index.mjs +2 -2
  61. package/dist/integrations/mcp/index.mjs +2 -2
  62. package/dist/integrations/mcp/testing.mjs +2 -2
  63. package/dist/integrations/streamline.mjs +3 -3
  64. package/dist/integrations/webhooks.d.mts +1 -1
  65. package/dist/integrations/webhooks.mjs +3 -3
  66. package/dist/integrations/websocket-pushref-redis.mjs +1 -1
  67. package/dist/integrations/websocket-redis.mjs +1 -1
  68. package/dist/integrations/websocket.mjs +1 -1
  69. package/dist/{interface-B7awDx3b.mjs → interface-CaPVHoVJ.mjs} +1 -1
  70. package/dist/{jsonBody-CiHih3ZU.mjs → jsonBody-BuzxOZV8.mjs} +2 -2
  71. package/dist/{keys-BcNl12HN.mjs → keys-DoUI9-yP.mjs} +1 -1
  72. package/dist/{loadResources-DGlfRQc9.mjs → loadResources-CPlRWJCv.mjs} +2 -2
  73. package/dist/{loadResourcesFromEntry-VYPGSas8.mjs → loadResourcesFromEntry-CPCZiX9n.mjs} +2 -2
  74. package/dist/logger/index.mjs +1 -1
  75. package/dist/{mcpPlugin-NxSlc-Ks.mjs → mcpPlugin-dxMxBPIg.mjs} +15 -15
  76. package/dist/{memory-BU-C-MV3.mjs → memory-BnafVem_.mjs} +2 -2
  77. package/dist/{metrics-7_1GbJpl.mjs → metrics-CeAIcVMY.mjs} +2 -2
  78. package/dist/middleware/index.mjs +3 -3
  79. package/dist/migrations/index.mjs +2 -2
  80. package/dist/{module-CQNHzE7g.mjs → module-DIvG8qOg.mjs} +1 -1
  81. package/dist/{multipartBody-Bi5yqW0M.mjs → multipartBody-BVCoaTwu.mjs} +1 -1
  82. package/dist/{openapi-RpNbPBL-.mjs → openapi-D_i6CifU.mjs} +6 -6
  83. package/dist/outbox-admin/index.d.mts +1 -1
  84. package/dist/outbox-admin/index.mjs +4 -4
  85. package/dist/{outbox-module-b1TyDGGi.d.mts → outbox-module-BbdaMyqy.d.mts} +1 -1
  86. package/dist/{outbox-module-ClcFrq98.mjs → outbox-module-CKaLL5BH.mjs} +4 -4
  87. package/dist/permissions/index.mjs +5 -5
  88. package/dist/{permissions-DgPrZsJh.mjs → permissions-DWkl60hx.mjs} +6 -6
  89. package/dist/{pipe-Cjy1UiXX.mjs → pipe-Dbs3GhOZ.mjs} +2 -2
  90. package/dist/pipeline/index.mjs +2 -2
  91. package/dist/plugins/index.d.mts +2 -2
  92. package/dist/plugins/index.mjs +16 -16
  93. package/dist/plugins/response-cache.mjs +2 -2
  94. package/dist/plugins/tracing-entry.mjs +2 -2
  95. package/dist/{pluralize-B7m0dPm8.mjs → pluralize-DgaYX91M.mjs} +1 -1
  96. package/dist/{preloadResources-CjnW4iIX.mjs → preloadResources-BUoGKPaS.mjs} +21 -21
  97. package/dist/{preloadResources-BuutdWgr.d.mts → preloadResources-BYFfYnjZ.d.mts} +2 -2
  98. package/dist/presets/filesUpload.mjs +5 -5
  99. package/dist/presets/index.mjs +2 -2
  100. package/dist/presets/multiTenant.mjs +3 -3
  101. package/dist/presets/search.mjs +2 -2
  102. package/dist/{presets-CsGg8B58.mjs → presets-Gbv9mNKD.mjs} +4 -4
  103. package/dist/{projection-koISNyQo.mjs → projection-BunxoeON.mjs} +2 -2
  104. package/dist/{queryCachePlugin-DHueQT9O.mjs → queryCachePlugin-BYqmg89O.mjs} +5 -5
  105. package/dist/{rateLimitKey-Bma8VXDO.mjs → rateLimitKey-DlqmDHA5.mjs} +1 -1
  106. package/dist/{realtime-BBoC91Bz.mjs → realtime-CiAp2-LH.mjs} +9 -9
  107. package/dist/{registerRoute-BTgORTlR.mjs → registerRoute-dnf-JJf-.mjs} +5 -5
  108. package/dist/registry/index.d.mts +1 -1
  109. package/dist/registry/index.mjs +3 -3
  110. package/dist/{registry-BzvRCYS6.mjs → registry-ByC0UFNS.mjs} +2 -2
  111. package/dist/{renewingLease-CgIGh0Ab.mjs → renewingLease-C5Ta_ImD.mjs} +1 -1
  112. package/dist/{replyHelpers-BN16KPHr.mjs → replyHelpers-D1k0wHoO.mjs} +2 -2
  113. package/dist/{requestContext-B93dmpf0.mjs → requestContext-DGM7EZRI.mjs} +1 -1
  114. package/dist/{rolldown-runtime-JJWfp8rp.mjs → rolldown-runtime-DrZrabOW.mjs} +1 -1
  115. package/dist/{runtimeCapabilities-jK99Ciw_.mjs → runtimeCapabilities-c4Sc85X-.mjs} +1 -1
  116. package/dist/{schedules-CKKEL21P.mjs → schedules-CVtolEa-.mjs} +31 -5
  117. package/dist/{schemaConverter-gg0_aUPF.mjs → schemaConverter-C8zbW7tJ.mjs} +1 -1
  118. package/dist/{schemaIR-CngYvpCF.mjs → schemaIR-BfI425RH.mjs} +2 -2
  119. package/dist/schemas/index.mjs +1 -1
  120. package/dist/scim/index.mjs +2 -2
  121. package/dist/scope/index.mjs +5 -5
  122. package/dist/{scope-B1RsHdjF.mjs → scope-DFSOKc4T.mjs} +4 -4
  123. package/dist/{simpleEqualityMatcher-_9NAMHUD.mjs → simpleEqualityMatcher-Bhp7WrRF.mjs} +1 -1
  124. package/dist/{sse-Bxt03Hk5.mjs → sse-vRuwDd6N.mjs} +5 -5
  125. package/dist/{sseStream-BMHTLlhR.mjs → sseStream-cWezGOk1.mjs} +2 -2
  126. package/dist/{store-helpers-Brt8OxWZ.mjs → store-helpers-bU8H5c-A.mjs} +1 -1
  127. package/dist/{streaming-CiTJW8kZ.mjs → streaming-weWcFCk4.mjs} +1 -1
  128. package/dist/{subscribe-helpers-B4fNHRNc.mjs → subscribe-helpers-BrcG3NlV.mjs} +2 -2
  129. package/dist/sync/changelog.mjs +1 -1
  130. package/dist/testing/cleanupStoreContract.mjs +1 -1
  131. package/dist/testing/index.d.mts +3 -3
  132. package/dist/testing/index.mjs +10 -10
  133. package/dist/testing/outboxStoreContract.mjs +1 -1
  134. package/dist/testing/storageContract.mjs +1 -1
  135. package/dist/{transactionContext-D2HwJM2z.mjs → transactionContext-Ca5peQpc.mjs} +1 -1
  136. package/dist/{typeGuards-IE1laMDf.mjs → typeGuards-ALWme5WB.mjs} +1 -1
  137. package/dist/types/index.mjs +1 -1
  138. package/dist/types/storage.mjs +1 -1
  139. package/dist/{types-DDD5RKTu.d.mts → types-BMa2EPtv.d.mts} +9 -0
  140. package/dist/{types-B8lwJv9Q.mjs → types-lDs9oF4z.mjs} +4 -4
  141. package/dist/usage/index.mjs +0 -0
  142. package/dist/{userHelpers-xQAi5bPF.mjs → userHelpers-DU_Z5OBA.mjs} +1 -1
  143. package/dist/utils/index.mjs +11 -11
  144. package/dist/{utils-DgNFsJ2c.mjs → utils-sXGFLegw.mjs} +3 -3
  145. package/dist/{validate-DI3L5V9w.mjs → validate-qK_-7MVk.mjs} +2 -2
  146. package/dist/{versioning-COpAyfpZ.mjs → versioning-Dtw0MyX4.mjs} +3 -3
  147. package/package.json +5 -2
@@ -1,4 +1,4 @@
1
- /*! @classytic/arc v2.36.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.37.0 | MIT | https://classytic.com */
2
2
  import { createRequire } from "node:module";
3
3
  import fp from "fastify-plugin";
4
4
  //#region src/plugins/tracing.ts
@@ -59,7 +59,7 @@ try {
59
59
  function createTracerProvider(options) {
60
60
  if (!isAvailable || !NodeTracerProvider || !BatchSpanProcessor || !OTLPTraceExporter) return null;
61
61
  const { serviceName = "@classytic/arc", serviceVersion, exporterUrl = "http://localhost:4318/v1/traces" } = options;
62
- const resolvedVersion = serviceVersion ?? "2.36.0";
62
+ const resolvedVersion = serviceVersion ?? "2.37.0";
63
63
  const exporter = new OTLPTraceExporter({ url: exporterUrl });
64
64
  const provider = new NodeTracerProvider({ resource: { attributes: {
65
65
  "service.name": serviceName,
@@ -1,4 +1,4 @@
1
- /*! @classytic/arc v2.36.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.37.0 | MIT | https://classytic.com */
2
2
  //#region src/utils/pluralize.ts
3
3
  /**
4
4
  * Lightweight English pluralization for the Arc CLI.
@@ -1,12 +1,12 @@
1
- /*! @classytic/arc v2.36.0 | MIT | https://classytic.com */
2
- import { t as __exportAll } from "./rolldown-runtime-JJWfp8rp.mjs";
1
+ /*! @classytic/arc v2.37.0 | MIT | https://classytic.com */
2
+ import { t as __exportAll } from "./rolldown-runtime-DrZrabOW.mjs";
3
3
  import { arcLog, configureArcLogger, createPinoWriter, enterArcLoggerScope, runWithArcLogger } from "./logger/index.mjs";
4
- import { n as PUBLIC_SCOPE } from "./types-B8lwJv9Q.mjs";
5
- import { t as auditRuntimeCapabilities } from "./runtimeCapabilities-jK99Ciw_.mjs";
6
- import { t as createTenantKeyGenerator } from "./rateLimitKey-Bma8VXDO.mjs";
7
- import { i as createRequestIdGenerator, r as mergeHealthChecks } from "./health-k6NODS8f.mjs";
8
- import { t as parseJsonBody } from "./jsonBody-CiHih3ZU.mjs";
9
- import { r as wrapWithBoundary } from "./subscribe-helpers-B4fNHRNc.mjs";
4
+ import { n as PUBLIC_SCOPE } from "./types-lDs9oF4z.mjs";
5
+ import { t as auditRuntimeCapabilities } from "./runtimeCapabilities-c4Sc85X-.mjs";
6
+ import { t as createTenantKeyGenerator } from "./rateLimitKey-DlqmDHA5.mjs";
7
+ import { i as createRequestIdGenerator, r as mergeHealthChecks } from "./health-Cc_sb94d.mjs";
8
+ import { t as parseJsonBody } from "./jsonBody-BuzxOZV8.mjs";
9
+ import { r as wrapWithBoundary } from "./subscribe-helpers-BrcG3NlV.mjs";
10
10
  import { isProductionEnv } from "@classytic/primitives/environment";
11
11
  import Fastify from "fastify";
12
12
  import qs from "qs";
@@ -851,7 +851,7 @@ async function registerArcCore(fastify, config, trackPlugin) {
851
851
  await fastify.register(arcCorePlugin, { emitEvents: config.arcPlugins?.emitEvents !== false });
852
852
  trackPlugin("arc-core");
853
853
  if (config.arcPlugins?.events !== false) {
854
- const { default: eventPlugin } = await import("./eventPlugin-c3YwGzz9.mjs").then((n) => n.n);
854
+ const { default: eventPlugin } = await import("./eventPlugin-DEIfV1iC.mjs").then((n) => n.n);
855
855
  const eventOpts = typeof config.arcPlugins?.events === "object" ? config.arcPlugins.events : {};
856
856
  await fastify.register(eventPlugin, {
857
857
  /**
@@ -910,15 +910,15 @@ async function registerArcPlugins(fastify, config, trackPlugin, modules, moduleH
910
910
  trackPlugin("arc-graceful-shutdown");
911
911
  }
912
912
  if (config.arcPlugins?.caching) {
913
- const { default: cachingPlugin } = await import("./caching-CP3GLJ7U.mjs").then((n) => n.r);
913
+ const { default: cachingPlugin } = await import("./caching-BmC2T-pX.mjs").then((n) => n.r);
914
914
  const opts = config.arcPlugins.caching === true ? {} : config.arcPlugins.caching;
915
915
  await fastify.register(cachingPlugin, opts);
916
916
  trackPlugin("arc-caching", opts);
917
917
  }
918
918
  if (config.arcPlugins?.queryCache) {
919
- const { queryCachePlugin } = await import("./queryCachePlugin-DHueQT9O.mjs").then((n) => n.n);
919
+ const { queryCachePlugin } = await import("./queryCachePlugin-BYqmg89O.mjs").then((n) => n.n);
920
920
  const opts = config.arcPlugins.queryCache === true ? {} : config.arcPlugins.queryCache;
921
- const store = config.stores?.queryCache ?? new (await (import("./memory-BU-C-MV3.mjs").then((n) => n.n))).MemoryCacheStore();
921
+ const store = config.stores?.queryCache ?? new (await (import("./memory-BnafVem_.mjs").then((n) => n.n))).MemoryCacheStore();
922
922
  await fastify.register(queryCachePlugin, {
923
923
  store,
924
924
  ...opts
@@ -928,7 +928,7 @@ async function registerArcPlugins(fastify, config, trackPlugin, modules, moduleH
928
928
  if (config.arcPlugins?.sse) {
929
929
  if (config.arcPlugins?.events === false) fastify.log.warn("SSE plugin requires events plugin (arcPlugins.events). SSE disabled.");
930
930
  else {
931
- const { default: ssePlugin } = await import("./sse-Bxt03Hk5.mjs").then((n) => n.r);
931
+ const { default: ssePlugin } = await import("./sse-vRuwDd6N.mjs").then((n) => n.r);
932
932
  const opts = config.arcPlugins.sse === true ? {} : config.arcPlugins.sse;
933
933
  await fastify.register(ssePlugin, opts);
934
934
  trackPlugin("arc-sse", opts);
@@ -937,20 +937,20 @@ async function registerArcPlugins(fastify, config, trackPlugin, modules, moduleH
937
937
  if (config.arcPlugins?.realtime) {
938
938
  if (config.arcPlugins?.events === false) fastify.log.warn("Realtime plugin requires events plugin (arcPlugins.events). Realtime disabled.");
939
939
  else {
940
- const { default: realtimePlugin } = await import("./realtime-BBoC91Bz.mjs").then((n) => n.r);
940
+ const { default: realtimePlugin } = await import("./realtime-CiAp2-LH.mjs").then((n) => n.r);
941
941
  const opts = config.arcPlugins.realtime === true ? {} : config.arcPlugins.realtime;
942
942
  await fastify.register(realtimePlugin, opts);
943
943
  trackPlugin("arc-realtime", opts);
944
944
  }
945
945
  }
946
946
  if (config.arcPlugins?.metrics) {
947
- const { default: metricsPlugin } = await import("./metrics-7_1GbJpl.mjs").then((n) => n.r);
947
+ const { default: metricsPlugin } = await import("./metrics-CeAIcVMY.mjs").then((n) => n.r);
948
948
  const opts = config.arcPlugins.metrics === true ? {} : config.arcPlugins.metrics;
949
949
  await fastify.register(metricsPlugin, opts);
950
950
  trackPlugin("arc-metrics", opts);
951
951
  }
952
952
  if (config.arcPlugins?.versioning) {
953
- const { default: versioningPlugin } = await import("./versioning-COpAyfpZ.mjs").then((n) => n.r);
953
+ const { default: versioningPlugin } = await import("./versioning-Dtw0MyX4.mjs").then((n) => n.r);
954
954
  await fastify.register(versioningPlugin, config.arcPlugins.versioning);
955
955
  trackPlugin("arc-versioning", config.arcPlugins.versioning);
956
956
  }
@@ -1027,7 +1027,7 @@ async function registerAuth(fastify, config, trackPlugin) {
1027
1027
  */
1028
1028
  async function registerElevation(fastify, config, trackPlugin) {
1029
1029
  if (!config.elevation) return;
1030
- const { elevationPlugin } = await import("./elevation-D_cmo80j.mjs").then((n) => n.r);
1030
+ const { elevationPlugin } = await import("./elevation-Bc6Gafv9.mjs").then((n) => n.r);
1031
1031
  await fastify.register(elevationPlugin, config.elevation);
1032
1032
  trackPlugin("arc-elevation", config.elevation);
1033
1033
  fastify.log.debug("Elevation plugin enabled");
@@ -1042,7 +1042,7 @@ async function registerElevation(fastify, config, trackPlugin) {
1042
1042
  */
1043
1043
  async function registerErrorHandler(fastify, config, trackPlugin, moduleErrorMappers) {
1044
1044
  if (config.errorHandler === false) return;
1045
- const { errorHandlerPlugin } = await import("./errorHandler-2RT0hLSI.mjs").then((n) => n.r);
1045
+ const { errorHandlerPlugin } = await import("./errorHandler-CB75oY5i.mjs").then((n) => n.r);
1046
1046
  /**
1047
1047
  * DISCLOSURE DEFAULTS MERGE — they used to be REPLACED, and that was two bugs.
1048
1048
  *
@@ -1266,7 +1266,7 @@ async function registerResources(fastify, config, preResolvedModules) {
1266
1266
  let discoveryPath;
1267
1267
  let discoveryYieldedZero = false;
1268
1268
  if (resolvedResources === void 0 && config.resourceDir) {
1269
- const { loadResources } = await import("./loadResources-DGlfRQc9.mjs").then((n) => n.n);
1269
+ const { loadResources } = await import("./loadResources-CPlRWJCv.mjs").then((n) => n.n);
1270
1270
  const { resolve, dirname } = await import("node:path");
1271
1271
  const { fileURLToPath } = await import("node:url");
1272
1272
  const rawDir = config.resourceDir;
@@ -1392,7 +1392,7 @@ Resources supplied by "${m.name}": ${provided}.`);
1392
1392
  if (fastify.hasDecorator("getScheduleStats")) throw new Error("[arc] modules declare scheduledJobs but schedulesPlugin was already registered manually. Configure their runner through arcPlugins.schedules so Arc can compose one schedule table.");
1393
1393
  const frozenJobs = Object.freeze(scheduledJobs.map((job) => Object.freeze({ ...job })));
1394
1394
  const scheduleOptions = typeof config.arcPlugins?.schedules === "object" ? config.arcPlugins.schedules : {};
1395
- const { default: schedulesPlugin } = await import("./schedules-CKKEL21P.mjs").then((n) => n.r);
1395
+ const { default: schedulesPlugin } = await import("./schedules-CVtolEa-.mjs").then((n) => n.r);
1396
1396
  await fastify.register(schedulesPlugin, {
1397
1397
  ...scheduleOptions,
1398
1398
  schedules: frozenJobs
@@ -1999,7 +1999,7 @@ async function buildApp(options, loggerScope, onInstance) {
1999
1999
  await registerErrorHandler(fastify, config, trackPlugin, moduleErrorMappers);
2000
2000
  await registerResources(fastify, config, resolvedModules);
2001
2001
  if (config.replyHelpers) {
2002
- const { replyHelpersPlugin } = await import("./replyHelpers-BN16KPHr.mjs").then((n) => n.n);
2002
+ const { replyHelpersPlugin } = await import("./replyHelpers-D1k0wHoO.mjs").then((n) => n.n);
2003
2003
  await fastify.register(replyHelpersPlugin);
2004
2004
  }
2005
2005
  if (config.serializeBigInt) {
@@ -6,8 +6,8 @@ import { a as EventTransport } from "./EventTransport-BEVP50ka.mjs";
6
6
  import { t as ExternalOpenApiPaths } from "./externalPaths-CmGOxOtD.mjs";
7
7
  import { r as QueryCachePluginOptions } from "./queryCachePlugin-BzqxconG.mjs";
8
8
  import { t as ErrorHandlerOptions } from "./errorHandler-DI5AN2b5.mjs";
9
- import { l as ResourceLike, m as SchedulesPluginOptions, n as ArcModuleInput, v as HealthOptions } from "./types-DDD5RKTu.mjs";
10
- import "./index-C50BUxKs.mjs";
9
+ import { l as ResourceLike, m as SchedulesPluginOptions, n as ArcModuleInput, v as HealthOptions } from "./types-BMa2EPtv.mjs";
10
+ import "./index-DCxxRwLC.mjs";
11
11
  import { t as EventPluginOptions } from "./eventPlugin-B47sfCJ8.mjs";
12
12
  import { g as CachingOptions, o as MetricsOptions, p as SSEOptions, t as VersioningOptions, u as RealtimeOptions } from "./versioning-DEs-_hFi.mjs";
13
13
  import { r as IdempotencyStore } from "./interface-DEWNOMza.mjs";
@@ -1,8 +1,8 @@
1
- /*! @classytic/arc v2.36.0 | MIT | https://classytic.com */
2
- import { i as NotFoundError, u as ValidationError } from "../errors-DDKni6Tz.mjs";
3
- import { c as getOrgId, g as getUserId } from "../types-B8lwJv9Q.mjs";
4
- import { B as requireAuth, F as allowPublic } from "../permissions-DgPrZsJh.mjs";
5
- import { t as multipartBody } from "../multipartBody-Bi5yqW0M.mjs";
1
+ /*! @classytic/arc v2.37.0 | MIT | https://classytic.com */
2
+ import { i as NotFoundError, u as ValidationError } from "../errors-DsdZc1Xv.mjs";
3
+ import { c as getOrgId, g as getUserId } from "../types-lDs9oF4z.mjs";
4
+ import { B as requireAuth, F as allowPublic } from "../permissions-DWkl60hx.mjs";
5
+ import { t as multipartBody } from "../multipartBody-BVCoaTwu.mjs";
6
6
  //#region src/presets/filesUpload.ts
7
7
  const DEFAULT_FIELD_NAME = "file";
8
8
  const DEFAULT_MAX_FILE_SIZE = 10485760;
@@ -1,6 +1,6 @@
1
- /*! @classytic/arc v2.36.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.37.0 | MIT | https://classytic.com */
2
2
  import { multiTenantPreset } from "./multiTenant.mjs";
3
- import { a as registerPreset, c as auditedPreset, d as ownedByUserPreset, i as getPreset, l as softDeletePreset, n as flexibleMultiTenantPreset, o as treePreset, r as getAvailablePresets, s as bulkPreset, t as applyPresets, u as slugLookupPreset } from "../presets-CsGg8B58.mjs";
3
+ import { a as registerPreset, c as auditedPreset, d as ownedByUserPreset, i as getPreset, l as softDeletePreset, n as flexibleMultiTenantPreset, o as treePreset, r as getAvailablePresets, s as bulkPreset, t as applyPresets, u as slugLookupPreset } from "../presets-Gbv9mNKD.mjs";
4
4
  import { filesUploadPreset } from "./filesUpload.mjs";
5
5
  import { searchPreset } from "./search.mjs";
6
6
  export { applyPresets, auditedPreset, bulkPreset, filesUploadPreset, flexibleMultiTenantPreset, getAvailablePresets, getPreset, multiTenantPreset, ownedByUserPreset, registerPreset, searchPreset, slugLookupPreset, softDeletePreset, treePreset };
@@ -1,6 +1,6 @@
1
- /*! @classytic/arc v2.36.0 | MIT | https://classytic.com */
2
- import "../constants-DUoKAGYD.mjs";
3
- import { b as isElevated, c as getOrgId, d as getScopeContext, m as getTeamId, u as getRequestScope, v as hasOrgAccess } from "../types-B8lwJv9Q.mjs";
1
+ /*! @classytic/arc v2.37.0 | MIT | https://classytic.com */
2
+ import "../constants-CUpamQMJ.mjs";
3
+ import { b as isElevated, c as getOrgId, d as getScopeContext, m as getTeamId, u as getRequestScope, v as hasOrgAccess } from "../types-lDs9oF4z.mjs";
4
4
  //#region src/presets/multiTenant.ts
5
5
  /**
6
6
  * Resolve a single TenantFieldSpec against the current scope.
@@ -1,5 +1,5 @@
1
- /*! @classytic/arc v2.36.0 | MIT | https://classytic.com */
2
- import { B as requireAuth, F as allowPublic } from "../permissions-DgPrZsJh.mjs";
1
+ /*! @classytic/arc v2.37.0 | MIT | https://classytic.com */
2
+ import { B as requireAuth, F as allowPublic } from "../permissions-DWkl60hx.mjs";
3
3
  //#region src/presets/search.ts
4
4
  const BUILTINS = [
5
5
  {
@@ -1,7 +1,7 @@
1
- /*! @classytic/arc v2.36.0 | MIT | https://classytic.com */
2
- import { l as UnauthorizedError } from "./errors-DDKni6Tz.mjs";
3
- import { b as isElevated, n as PUBLIC_SCOPE } from "./types-B8lwJv9Q.mjs";
4
- import { B as requireAuth, F as allowPublic, U as requireRoles } from "./permissions-DgPrZsJh.mjs";
1
+ /*! @classytic/arc v2.37.0 | MIT | https://classytic.com */
2
+ import { l as UnauthorizedError } from "./errors-DsdZc1Xv.mjs";
3
+ import { b as isElevated, n as PUBLIC_SCOPE } from "./types-lDs9oF4z.mjs";
4
+ import { B as requireAuth, F as allowPublic, U as requireRoles } from "./permissions-DWkl60hx.mjs";
5
5
  import { multiTenantPreset } from "./presets/multiTenant.mjs";
6
6
  //#region src/presets/ownedByUser.ts
7
7
  /**
@@ -1,5 +1,5 @@
1
- /*! @classytic/arc v2.36.0 | MIT | https://classytic.com */
2
- import { c as getOrgId, f as getScopeContextMap, g as getUserId, m as getTeamId, x as isMember } from "./types-B8lwJv9Q.mjs";
1
+ /*! @classytic/arc v2.37.0 | MIT | https://classytic.com */
2
+ import { c as getOrgId, f as getScopeContextMap, g as getUserId, m as getTeamId, x as isMember } from "./types-lDs9oF4z.mjs";
3
3
  //#region src/scope/projection.ts
4
4
  /**
5
5
  * Compute the request-scope projection. Returns `undefined` when no
@@ -1,8 +1,8 @@
1
- /*! @classytic/arc v2.36.0 | MIT | https://classytic.com */
2
- import { t as __exportAll } from "./rolldown-runtime-JJWfp8rp.mjs";
3
- import { t as hasEvents } from "./typeGuards-IE1laMDf.mjs";
4
- import { i as versionKey, r as tagVersionKey } from "./keys-BcNl12HN.mjs";
5
- import { t as MemoryCacheStore } from "./memory-BU-C-MV3.mjs";
1
+ /*! @classytic/arc v2.37.0 | MIT | https://classytic.com */
2
+ import { t as __exportAll } from "./rolldown-runtime-DrZrabOW.mjs";
3
+ import { t as hasEvents } from "./typeGuards-ALWme5WB.mjs";
4
+ import { i as versionKey, r as tagVersionKey } from "./keys-DoUI9-yP.mjs";
5
+ import { t as MemoryCacheStore } from "./memory-BnafVem_.mjs";
6
6
  import fp from "fastify-plugin";
7
7
  //#region src/cache/QueryCache.ts
8
8
  var QueryCache = class {
@@ -1,4 +1,4 @@
1
- /*! @classytic/arc v2.36.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.37.0 | MIT | https://classytic.com */
2
2
  //#region src/scope/rateLimitKey.ts
3
3
  function createTenantKeyGenerator(opts) {
4
4
  if (opts?.strategy) return opts.strategy;
@@ -1,13 +1,13 @@
1
- /*! @classytic/arc v2.36.0 | MIT | https://classytic.com */
2
- import { t as __exportAll } from "./rolldown-runtime-JJWfp8rp.mjs";
1
+ /*! @classytic/arc v2.37.0 | MIT | https://classytic.com */
2
+ import { t as __exportAll } from "./rolldown-runtime-DrZrabOW.mjs";
3
3
  import { arcLog } from "./logger/index.mjs";
4
- import { n as evaluateAndApplyPermission } from "./authorizationDecision-EsiY3nUu.mjs";
5
- import { n as getUserRoles } from "./userHelpers-xQAi5bPF.mjs";
6
- import { c as getOrgId } from "./types-B8lwJv9Q.mjs";
7
- import { t as simpleEqualityMatcher } from "./simpleEqualityMatcher-_9NAMHUD.mjs";
8
- import { t as applyFieldReadPermissions } from "./fields-DdP225wt.mjs";
9
- import { a as promoteStreamTokenToHeader } from "./streaming-CiTJW8kZ.mjs";
10
- import { t as openSseStream } from "./sseStream-BMHTLlhR.mjs";
4
+ import { n as evaluateAndApplyPermission } from "./authorizationDecision-DgyWdav8.mjs";
5
+ import { n as getUserRoles } from "./userHelpers-DU_Z5OBA.mjs";
6
+ import { c as getOrgId } from "./types-lDs9oF4z.mjs";
7
+ import { t as simpleEqualityMatcher } from "./simpleEqualityMatcher-Bhp7WrRF.mjs";
8
+ import { t as applyFieldReadPermissions } from "./fields-DvGz47Ul.mjs";
9
+ import { a as promoteStreamTokenToHeader } from "./streaming-weWcFCk4.mjs";
10
+ import { t as openSseStream } from "./sseStream-cWezGOk1.mjs";
11
11
  import fp from "fastify-plugin";
12
12
  //#region src/plugins/realtime.ts
13
13
  var realtime_exports = /* @__PURE__ */ __exportAll({
@@ -1,8 +1,8 @@
1
- /*! @classytic/arc v2.36.0 | MIT | https://classytic.com */
2
- import { n as evaluateAndApplyPermission } from "./authorizationDecision-EsiY3nUu.mjs";
3
- import { f as createError } from "./errors-DDKni6Tz.mjs";
4
- import { u as getRequestScope } from "./types-B8lwJv9Q.mjs";
5
- import { n as requestContext } from "./requestContext-B93dmpf0.mjs";
1
+ /*! @classytic/arc v2.37.0 | MIT | https://classytic.com */
2
+ import { n as evaluateAndApplyPermission } from "./authorizationDecision-DgyWdav8.mjs";
3
+ import { f as createError } from "./errors-DsdZc1Xv.mjs";
4
+ import { u as getRequestScope } from "./types-lDs9oF4z.mjs";
5
+ import { n as requestContext } from "./requestContext-DGM7EZRI.mjs";
6
6
  //#region src/core/middlewares/arcDecorator.ts
7
7
  /**
8
8
  * Build the `arcDecorator` preHandler for a resource.
@@ -1,6 +1,6 @@
1
1
 
2
2
  import { K as ResolvedTenantPurge, R as RegisterOptions, V as ResourceDefinition, X as CrudRouteKey, k as IntrospectionPluginOptions, p as RegistryEntry, z as ResourceRegistry } from "../index-C01wWGJt.mjs";
3
- import "../fastify-augmentation-Bk_9PoiV.mjs";
3
+ import "../fastify-augmentation-CdY8FINU.mjs";
4
4
  import { TenantPurgeProgress, TenantPurgeStrategy } from "@classytic/repo-core/repository";
5
5
  import { FastifyPluginAsync } from "fastify";
6
6
  //#region src/registry/assertNoTenantData.d.ts
@@ -1,4 +1,4 @@
1
- /*! @classytic/arc v2.36.0 | MIT | https://classytic.com */
2
- import { a as cascadeDeleteForOrganization, c as assertNoTenantData, i as introspectionPlugin_default, n as buildResourceManifestFromRegistry, o as getCascadingResources, r as introspectionPlugin, s as getCascadingResourcesWithMetadata, t as buildResourceManifest } from "../registry-BzvRCYS6.mjs";
3
- import { t as ResourceRegistry } from "../ResourceRegistry-DNuYVbmv.mjs";
1
+ /*! @classytic/arc v2.37.0 | MIT | https://classytic.com */
2
+ import { a as cascadeDeleteForOrganization, c as assertNoTenantData, i as introspectionPlugin_default, n as buildResourceManifestFromRegistry, o as getCascadingResources, r as introspectionPlugin, s as getCascadingResourcesWithMetadata, t as buildResourceManifest } from "../registry-ByC0UFNS.mjs";
3
+ import { t as ResourceRegistry } from "../ResourceRegistry-DFOmazXg.mjs";
4
4
  export { ResourceRegistry, assertNoTenantData, buildResourceManifest, buildResourceManifestFromRegistry, cascadeDeleteForOrganization, getCascadingResources, getCascadingResourcesWithMetadata, introspectionPlugin_default as introspectionPlugin, introspectionPlugin as introspectionPluginFn };
@@ -1,5 +1,5 @@
1
- /*! @classytic/arc v2.36.0 | MIT | https://classytic.com */
2
- import { t as CRUD_OPERATIONS } from "./constants-DUoKAGYD.mjs";
1
+ /*! @classytic/arc v2.37.0 | MIT | https://classytic.com */
2
+ import { t as CRUD_OPERATIONS } from "./constants-CUpamQMJ.mjs";
3
3
  import fp from "fastify-plugin";
4
4
  //#region src/registry/assertNoTenantData.ts
5
5
  /**
@@ -1,4 +1,4 @@
1
- /*! @classytic/arc v2.36.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.37.0 | MIT | https://classytic.com */
2
2
  //#region src/lock/renewingLease.ts
3
3
  /**
4
4
  * Start renewing an ALREADY-ACQUIRED lease. The caller performed the
@@ -1,5 +1,5 @@
1
- /*! @classytic/arc v2.36.0 | MIT | https://classytic.com */
2
- import { t as __exportAll } from "./rolldown-runtime-JJWfp8rp.mjs";
1
+ /*! @classytic/arc v2.37.0 | MIT | https://classytic.com */
2
+ import { t as __exportAll } from "./rolldown-runtime-DrZrabOW.mjs";
3
3
  import { toCanonicalList } from "@classytic/repo-core/pagination";
4
4
  import fp from "fastify-plugin";
5
5
  //#region src/plugins/replyHelpers.ts
@@ -1,4 +1,4 @@
1
- /*! @classytic/arc v2.36.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.37.0 | MIT | https://classytic.com */
2
2
  import { AsyncLocalStorage } from "node:async_hooks";
3
3
  //#region src/context/requestContext.ts
4
4
  /**
@@ -1,4 +1,4 @@
1
- /*! @classytic/arc v2.36.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.37.0 | MIT | https://classytic.com */
2
2
  import "node:module";
3
3
  //#region \0rolldown/runtime.js
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! @classytic/arc v2.36.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.37.0 | MIT | https://classytic.com */
2
2
  //#region src/utils/runtimeCapabilities.ts
3
3
  /**
4
4
  * `Symbol.for` so declarations from two arc copies in one dependency graph
@@ -1,6 +1,6 @@
1
- /*! @classytic/arc v2.36.0 | MIT | https://classytic.com */
2
- import { t as __exportAll } from "./rolldown-runtime-JJWfp8rp.mjs";
3
- import { t as startRenewingLease } from "./renewingLease-CgIGh0Ab.mjs";
1
+ /*! @classytic/arc v2.37.0 | MIT | https://classytic.com */
2
+ import { t as __exportAll } from "./rolldown-runtime-DrZrabOW.mjs";
3
+ import { t as startRenewingLease } from "./renewingLease-C5Ta_ImD.mjs";
4
4
  import fp from "fastify-plugin";
5
5
  //#region src/plugins/schedules.ts
6
6
  var schedules_exports = /* @__PURE__ */ __exportAll({
@@ -10,7 +10,7 @@ var schedules_exports = /* @__PURE__ */ __exportAll({
10
10
  const MIN_SAFE_INTERVAL_MS = 1e3;
11
11
  const MAX_DEFAULT_LEASE_MS = 3e5;
12
12
  const schedulesPlugin = async (fastify, opts) => {
13
- const { schedules, lock, enabled = true } = opts;
13
+ const { schedules, lock, enabled = true, drainTimeoutMs = 5e3 } = opts;
14
14
  const holderId = opts.holderId ?? `arc-${process.pid}-${Math.random().toString(36).slice(2, 10)}`;
15
15
  const stats = /* @__PURE__ */ new Map();
16
16
  fastify.decorate("getScheduleStats", () => [...stats.values()].map((s) => ({ ...s })));
@@ -105,7 +105,33 @@ const schedulesPlugin = async (fastify, opts) => {
105
105
  closing = true;
106
106
  for (const timer of timers.values()) clearTimeout(timer);
107
107
  timers.clear();
108
- await Promise.allSettled([...inFlight.values()]);
108
+ /**
109
+ * Let in-flight runs settle so shutdown never truncates a sweep mid-write —
110
+ * but BOUNDED, because a tick has no cancellation contract and its duration
111
+ * is not this plugin's to predict. An outbox relay whose subscriber retries
112
+ * on a backoff ladder holds one tick for minutes, and an unbounded await
113
+ * here contradicts the `unref` two functions up: pending scheduled work is
114
+ * already declared as something that must not hold the process.
115
+ *
116
+ * Waiting longer than the orchestrator's grace period buys nothing anyway —
117
+ * SIGKILL truncates the same write, without the log line naming what was
118
+ * still running.
119
+ */
120
+ const pending = [...inFlight.entries()];
121
+ if (pending.length === 0) return;
122
+ let timeout;
123
+ const expired = Symbol("drain-timeout");
124
+ const budget = new Promise((resolve) => {
125
+ timeout = setTimeout(() => resolve(expired), drainTimeoutMs);
126
+ timeout.unref?.();
127
+ });
128
+ const settled = Promise.allSettled(pending.map(([, run]) => run)).then(() => void 0);
129
+ const outcome = await Promise.race([settled, budget]);
130
+ if (timeout) clearTimeout(timeout);
131
+ if (outcome === expired) fastify.log.warn({
132
+ schedules: pending.map(([name]) => name),
133
+ drainTimeoutMs
134
+ }, "[arc-schedules] shutdown drain budget exceeded — abandoning in-flight run(s). Durable work (outbox rows, leased sweeps) is retried on the next boot; raise `drainTimeoutMs` only if a listed job is genuinely non-resumable.");
109
135
  });
110
136
  };
111
137
  var schedules_default = fp(schedulesPlugin, {
@@ -1,4 +1,4 @@
1
- /*! @classytic/arc v2.36.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.37.0 | MIT | https://classytic.com */
2
2
  import { arcLog } from "./logger/index.mjs";
3
3
  //#region src/utils/schemaConverter.ts
4
4
  /**
@@ -1,5 +1,5 @@
1
- /*! @classytic/arc v2.36.0 | MIT | https://classytic.com */
2
- import { o as toJsonSchema } from "./schemaConverter-gg0_aUPF.mjs";
1
+ /*! @classytic/arc v2.37.0 | MIT | https://classytic.com */
2
+ import { o as toJsonSchema } from "./schemaConverter-C8zbW7tJ.mjs";
3
3
  //#region src/core/schemaIR.ts
4
4
  /**
5
5
  * Schema IR — one canonical representation, two adapters.
@@ -1,4 +1,4 @@
1
- /*! @classytic/arc v2.36.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.37.0 | MIT | https://classytic.com */
2
2
  import { errorContractSchema, errorDetailSchema } from "@classytic/repo-core/errors";
3
3
  import { Type, Type as Type$1 } from "typebox";
4
4
  //#region src/schemas/index.ts
@@ -1,5 +1,5 @@
1
- /*! @classytic/arc v2.36.0 | MIT | https://classytic.com */
2
- import { t as parseJsonBody } from "../jsonBody-CiHih3ZU.mjs";
1
+ /*! @classytic/arc v2.37.0 | MIT | https://classytic.com */
2
+ import { t as parseJsonBody } from "../jsonBody-BuzxOZV8.mjs";
3
3
  import fp from "fastify-plugin";
4
4
  //#region src/scim/errors.ts
5
5
  var ScimError = class extends Error {
@@ -1,6 +1,6 @@
1
- /*! @classytic/arc v2.36.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-B8lwJv9Q.mjs";
3
- import { n as elevation_default, t as elevationPlugin } from "../elevation-D_cmo80j.mjs";
4
- import { t as createTenantKeyGenerator } from "../rateLimitKey-Bma8VXDO.mjs";
5
- import { t as resolveOrgFromHeader } from "../scope-B1RsHdjF.mjs";
1
+ /*! @classytic/arc v2.37.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-lDs9oF4z.mjs";
3
+ import { n as elevation_default, t as elevationPlugin } from "../elevation-Bc6Gafv9.mjs";
4
+ import { t as createTenantKeyGenerator } from "../rateLimitKey-DlqmDHA5.mjs";
5
+ import { t as resolveOrgFromHeader } from "../scope-DFSOKc4T.mjs";
6
6
  export { AUTHENTICATED_SCOPE, PUBLIC_SCOPE, createTenantKeyGenerator, elevation_default as elevationPlugin, elevationPlugin as elevationPluginFn, 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.36.0 | MIT | https://classytic.com */
2
- import { a as OrgAccessDeniedError, l as UnauthorizedError } from "./errors-DDKni6Tz.mjs";
3
- import { n as requireSingleHeaderValue } from "./headers-DKslnhey.mjs";
4
- import { n as getUserRoles } from "./userHelpers-xQAi5bPF.mjs";
1
+ /*! @classytic/arc v2.37.0 | MIT | https://classytic.com */
2
+ import { a as OrgAccessDeniedError, l as UnauthorizedError } from "./errors-DsdZc1Xv.mjs";
3
+ import { n as requireSingleHeaderValue } from "./headers-BFu1st_i.mjs";
4
+ import { n as getUserRoles } from "./userHelpers-DU_Z5OBA.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.36.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.37.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,9 +1,9 @@
1
- /*! @classytic/arc v2.36.0 | MIT | https://classytic.com */
2
- import { t as __exportAll } from "./rolldown-runtime-JJWfp8rp.mjs";
1
+ /*! @classytic/arc v2.37.0 | MIT | https://classytic.com */
2
+ import { t as __exportAll } from "./rolldown-runtime-DrZrabOW.mjs";
3
3
  import { arcLog } from "./logger/index.mjs";
4
- import { c as getOrgId, n as PUBLIC_SCOPE } from "./types-B8lwJv9Q.mjs";
5
- import { a as promoteStreamTokenToHeader } from "./streaming-CiTJW8kZ.mjs";
6
- import { t as openSseStream } from "./sseStream-BMHTLlhR.mjs";
4
+ import { c as getOrgId, n as PUBLIC_SCOPE } from "./types-lDs9oF4z.mjs";
5
+ import { a as promoteStreamTokenToHeader } from "./streaming-weWcFCk4.mjs";
6
+ import { t as openSseStream } from "./sseStream-cWezGOk1.mjs";
7
7
  import fp from "fastify-plugin";
8
8
  //#region src/plugins/sse.ts
9
9
  var sse_exports = /* @__PURE__ */ __exportAll({
@@ -1,5 +1,5 @@
1
- /*! @classytic/arc v2.36.0 | MIT | https://classytic.com */
2
- import { n as forwardedStreamHeaders } from "./streaming-CiTJW8kZ.mjs";
1
+ /*! @classytic/arc v2.37.0 | MIT | https://classytic.com */
2
+ import { n as forwardedStreamHeaders } from "./streaming-weWcFCk4.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.36.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.37.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.36.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.37.0 | MIT | https://classytic.com */
2
2
  import { Readable } from "node:stream";
3
3
  //#region src/utils/streaming.ts
4
4
  /**
@@ -1,5 +1,5 @@
1
- /*! @classytic/arc v2.36.0 | MIT | https://classytic.com */
2
- import { r as createEvent } from "./EventTransport-D23Uvhg4.mjs";
1
+ /*! @classytic/arc v2.37.0 | MIT | https://classytic.com */
2
+ import { r as createEvent } from "./EventTransport-pGNNDQ__.mjs";
3
3
  //#region src/events/defineEvent.ts
4
4
  /**
5
5
  * Typed event declarations, a registry for introspection, and `.create()` to
@@ -1,3 +1,3 @@
1
- /*! @classytic/arc v2.36.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.37.0 | MIT | https://classytic.com */
2
2
  import { CursorExpiredError, MemoryChangeLogStore } from "@classytic/repo-core/sync";
3
3
  export { CursorExpiredError, MemoryChangeLogStore };
@@ -1,4 +1,4 @@
1
- /*! @classytic/arc v2.36.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.37.0 | MIT | https://classytic.com */
2
2
  import { afterAll, beforeAll, describe, expect, it } from "vitest";
3
3
  //#region src/testing/cleanupStoreContract.ts
4
4
  /**
@@ -2,9 +2,9 @@
2
2
  import { i as RequestScope } from "../types-Ddl9OjmE.mjs";
3
3
  import { l as PermissionCheck, t as AnyRecord } from "../base-C-NL2fTi.mjs";
4
4
  import { V as ResourceDefinition } from "../index-C01wWGJt.mjs";
5
- import { n as ArcModuleInput, o as ModuleDisposer, s as ModuleSetupContext } from "../types-DDD5RKTu.mjs";
6
- import "../index-C50BUxKs.mjs";
7
- import { n as preloadResourcesAsync, r as CreateAppOptions, t as preloadResources } from "../preloadResources-BuutdWgr.mjs";
5
+ import { n as ArcModuleInput, o as ModuleDisposer, s as ModuleSetupContext } from "../types-BMa2EPtv.mjs";
6
+ import "../index-DCxxRwLC.mjs";
7
+ import { n as preloadResourcesAsync, r as CreateAppOptions, t as preloadResources } from "../preloadResources-BYFfYnjZ.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";
@@ -1,12 +1,12 @@
1
- /*! @classytic/arc v2.36.0 | MIT | https://classytic.com */
2
- import { t as CRUD_OPERATIONS } from "../constants-DUoKAGYD.mjs";
3
- import { g as getUserId } from "../types-B8lwJv9Q.mjs";
4
- import { t as BaseController } from "../BaseController-CTJKm6Cb.mjs";
5
- import { t as defineResource } from "../defineResource-DWzjyxb2.mjs";
6
- import { t as defineAggregation } from "../defineAggregation-CpQfcM8R.mjs";
7
- import { E as requireOrgRole } from "../permissions-DgPrZsJh.mjs";
8
- import { a as createApp, n as preloadResourcesAsync, t as preloadResources } from "../preloadResources-CjnW4iIX.mjs";
9
- import { n as getModuleExports } from "../module-CQNHzE7g.mjs";
1
+ /*! @classytic/arc v2.37.0 | MIT | https://classytic.com */
2
+ import { t as CRUD_OPERATIONS } from "../constants-CUpamQMJ.mjs";
3
+ import { g as getUserId } from "../types-lDs9oF4z.mjs";
4
+ import { t as BaseController } from "../BaseController-B5GZfUBy.mjs";
5
+ import { t as defineResource } from "../defineResource-WcbE1kJL.mjs";
6
+ import { t as defineAggregation } from "../defineAggregation-cCitY2FA.mjs";
7
+ import { E as requireOrgRole } from "../permissions-DWkl60hx.mjs";
8
+ import { a as createApp, n as preloadResourcesAsync, t as preloadResources } from "../preloadResources-BUoGKPaS.mjs";
9
+ import { n as getModuleExports } from "../module-DIvG8qOg.mjs";
10
10
  import { runStorageContract } from "./storageContract.mjs";
11
11
  import Fastify from "fastify";
12
12
  import { afterAll, describe, expect, it, vi } from "vitest";
@@ -1504,7 +1504,7 @@ function pickDefaultAuth(authMode, callerAuth) {
1504
1504
  };
1505
1505
  }
1506
1506
  async function createTestApp(options = {}) {
1507
- const { createApp } = await import("../preloadResources-CjnW4iIX.mjs").then((n) => n.o);
1507
+ const { createApp } = await import("../preloadResources-BUoGKPaS.mjs").then((n) => n.o);
1508
1508
  const { resources = [], db = "in-memory", connectMongoose = false, authMode = "jwt", defaultOrgId, plugins, auth: callerAuth, ...appOptions } = options;
1509
1509
  let dbHandle;
1510
1510
  let dbUri;
@@ -1,4 +1,4 @@
1
- /*! @classytic/arc v2.36.0 | MIT | https://classytic.com */
1
+ /*! @classytic/arc v2.37.0 | MIT | https://classytic.com */
2
2
  import { OutboxOwnershipError } from "@classytic/primitives/outbox";
3
3
  import { afterAll, beforeAll, beforeEach, describe, expect, it } from "vitest";
4
4
  //#region src/testing/outboxStoreContract.ts