@classytic/arc 2.2.5 → 2.4.1

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 (174) hide show
  1. package/README.md +187 -18
  2. package/bin/arc.js +11 -3
  3. package/dist/BaseController-CkM5dUh_.mjs +1031 -0
  4. package/dist/{EventTransport-BkUDYZEb.d.mts → EventTransport-wc5hSLik.d.mts} +1 -1
  5. package/dist/{HookSystem-BsGV-j2l.mjs → HookSystem-COkyWztM.mjs} +2 -3
  6. package/dist/{ResourceRegistry-7Ic20ZMw.mjs → ResourceRegistry-DeCIFlix.mjs} +8 -5
  7. package/dist/adapters/index.d.mts +3 -5
  8. package/dist/adapters/index.mjs +2 -3
  9. package/dist/{prisma-DJbMt3yf.mjs → adapters-DTC4Ug66.mjs} +45 -12
  10. package/dist/audit/index.d.mts +4 -7
  11. package/dist/audit/index.mjs +2 -29
  12. package/dist/audit/mongodb.d.mts +1 -4
  13. package/dist/audit/mongodb.mjs +2 -3
  14. package/dist/auth/index.d.mts +7 -9
  15. package/dist/auth/index.mjs +65 -63
  16. package/dist/auth/redis-session.d.mts +1 -1
  17. package/dist/auth/redis-session.mjs +1 -2
  18. package/dist/{betterAuthOpenApi-DjWDddNc.mjs → betterAuthOpenApi-lz0IRbXJ.mjs} +4 -6
  19. package/dist/cache/index.d.mts +23 -23
  20. package/dist/cache/index.mjs +4 -6
  21. package/dist/{caching-GSDJcA6-.mjs → caching-BSXB-Xr7.mjs} +2 -24
  22. package/dist/chunk-BpYLSNr0.mjs +14 -0
  23. package/dist/circuitBreaker-BOBOpN2w.mjs +284 -0
  24. package/dist/circuitBreaker-JP2GdJ4b.d.mts +206 -0
  25. package/dist/cli/commands/describe.mjs +24 -7
  26. package/dist/cli/commands/docs.mjs +6 -7
  27. package/dist/cli/commands/doctor.d.mts +10 -0
  28. package/dist/cli/commands/doctor.mjs +156 -0
  29. package/dist/cli/commands/generate.mjs +66 -17
  30. package/dist/cli/commands/init.mjs +315 -45
  31. package/dist/cli/commands/introspect.mjs +2 -4
  32. package/dist/cli/index.d.mts +1 -10
  33. package/dist/cli/index.mjs +4 -153
  34. package/dist/{constants-DdXFXQtN.mjs → constants-Cxde4rpC.mjs} +1 -2
  35. package/dist/core/index.d.mts +3 -5
  36. package/dist/core/index.mjs +5 -4
  37. package/dist/core-C1XCMtqM.mjs +185 -0
  38. package/dist/{createApp-BKHSl2nT.mjs → createApp-ByWNRsZj.mjs} +65 -36
  39. package/dist/{defineResource-DO9ONe_D.mjs → defineResource-D9aY5Cy6.mjs} +154 -1165
  40. package/dist/discovery/index.mjs +37 -5
  41. package/dist/docs/index.d.mts +6 -9
  42. package/dist/docs/index.mjs +3 -21
  43. package/dist/dynamic/index.d.mts +93 -0
  44. package/dist/dynamic/index.mjs +122 -0
  45. package/dist/{elevation-DSTbVvYj.mjs → elevation-BEdACOLB.mjs} +5 -36
  46. package/dist/{elevation-DGo5shaX.d.mts → elevation-Ca_yveIO.d.mts} +41 -7
  47. package/dist/{errorHandler-C3GY3_ow.mjs → errorHandler--zp54tGc.mjs} +3 -5
  48. package/dist/errorHandler-Do4vVQ1f.d.mts +139 -0
  49. package/dist/{errors-DBANPbGr.mjs → errors-rxhfP7Hf.mjs} +1 -2
  50. package/dist/{eventPlugin-BEOvaDqo.mjs → eventPlugin-Ba00swHF.mjs} +25 -27
  51. package/dist/{eventPlugin-H6wDDjGO.d.mts → eventPlugin-iGrSEmwJ.d.mts} +105 -5
  52. package/dist/events/index.d.mts +72 -7
  53. package/dist/events/index.mjs +216 -4
  54. package/dist/events/transports/redis-stream-entry.d.mts +1 -1
  55. package/dist/events/transports/redis-stream-entry.mjs +19 -7
  56. package/dist/events/transports/redis.d.mts +1 -1
  57. package/dist/events/transports/redis.mjs +3 -4
  58. package/dist/factory/index.d.mts +23 -9
  59. package/dist/factory/index.mjs +48 -3
  60. package/dist/{fields-Bi_AVKSo.d.mts → fields-DFwdaWCq.d.mts} +1 -1
  61. package/dist/{fields-CTd_CrKr.mjs → fields-ipsbIRPK.mjs} +1 -2
  62. package/dist/hooks/index.d.mts +1 -3
  63. package/dist/hooks/index.mjs +2 -3
  64. package/dist/idempotency/index.d.mts +5 -5
  65. package/dist/idempotency/index.mjs +3 -7
  66. package/dist/idempotency/mongodb.d.mts +1 -1
  67. package/dist/idempotency/mongodb.mjs +4 -5
  68. package/dist/idempotency/redis.d.mts +1 -1
  69. package/dist/idempotency/redis.mjs +2 -5
  70. package/dist/{fastifyAdapter-CyAA2zlB.d.mts → index-BL8CaQih.d.mts} +56 -57
  71. package/dist/index-Diqcm14c.d.mts +369 -0
  72. package/dist/{prisma-xjhMEq_S.d.mts → index-yhxyjqNb.d.mts} +4 -5
  73. package/dist/index.d.mts +100 -105
  74. package/dist/index.mjs +85 -58
  75. package/dist/integrations/event-gateway.d.mts +1 -1
  76. package/dist/integrations/event-gateway.mjs +8 -4
  77. package/dist/integrations/index.d.mts +4 -2
  78. package/dist/integrations/index.mjs +1 -1
  79. package/dist/integrations/jobs.d.mts +2 -2
  80. package/dist/integrations/jobs.mjs +63 -14
  81. package/dist/integrations/mcp/index.d.mts +219 -0
  82. package/dist/integrations/mcp/index.mjs +572 -0
  83. package/dist/integrations/mcp/testing.d.mts +53 -0
  84. package/dist/integrations/mcp/testing.mjs +104 -0
  85. package/dist/integrations/streamline.mjs +39 -19
  86. package/dist/integrations/webhooks.d.mts +56 -0
  87. package/dist/integrations/webhooks.mjs +139 -0
  88. package/dist/integrations/websocket-redis.d.mts +46 -0
  89. package/dist/integrations/websocket-redis.mjs +50 -0
  90. package/dist/integrations/websocket.d.mts +68 -2
  91. package/dist/integrations/websocket.mjs +96 -13
  92. package/dist/{interface-CSNjltAc.d.mts → interface-B4awm1RJ.d.mts} +2 -2
  93. package/dist/interface-DGmPxakH.d.mts +2213 -0
  94. package/dist/{keys-DhqDRxv3.mjs → keys-qcD-TVJl.mjs} +3 -4
  95. package/dist/{logger-ByrvQWZO.mjs → logger-Dz3j1ItV.mjs} +2 -4
  96. package/dist/{memory-B2v7KrCB.mjs → memory-Cb_7iy9e.mjs} +2 -4
  97. package/dist/metrics-Csh4nsvv.mjs +224 -0
  98. package/dist/migrations/index.mjs +3 -7
  99. package/dist/{mongodb-DNKEExbf.mjs → mongodb-BuQ7fNTg.mjs} +1 -4
  100. package/dist/{mongodb-ClykrfGo.d.mts → mongodb-CUpYfxfD.d.mts} +2 -3
  101. package/dist/{mongodb-Dg8O_gvd.d.mts → mongodb-bga9AbkD.d.mts} +2 -2
  102. package/dist/{openapi-9nB_kiuR.mjs → openapi-CBmZ6EQN.mjs} +4 -21
  103. package/dist/org/index.d.mts +12 -14
  104. package/dist/org/index.mjs +92 -119
  105. package/dist/org/types.d.mts +2 -2
  106. package/dist/org/types.mjs +1 -1
  107. package/dist/permissions/index.d.mts +4 -278
  108. package/dist/permissions/index.mjs +4 -579
  109. package/dist/permissions-CA5zg0yK.mjs +751 -0
  110. package/dist/plugins/index.d.mts +104 -107
  111. package/dist/plugins/index.mjs +203 -313
  112. package/dist/plugins/response-cache.mjs +4 -69
  113. package/dist/plugins/tracing-entry.d.mts +1 -1
  114. package/dist/plugins/tracing-entry.mjs +24 -11
  115. package/dist/{pluralize-CM-jZg7p.mjs → pluralize-CcT6qF0a.mjs} +12 -13
  116. package/dist/policies/index.d.mts +2 -2
  117. package/dist/policies/index.mjs +80 -83
  118. package/dist/presets/index.d.mts +26 -19
  119. package/dist/presets/index.mjs +2 -142
  120. package/dist/presets/multiTenant.d.mts +1 -4
  121. package/dist/presets/multiTenant.mjs +4 -6
  122. package/dist/presets-C9QXJV1u.mjs +422 -0
  123. package/dist/{queryCachePlugin-B6R0d4av.mjs → queryCachePlugin-ClosZdNS.mjs} +6 -27
  124. package/dist/{queryCachePlugin-Q6SYuHZ6.d.mts → queryCachePlugin-DcmETvcB.d.mts} +3 -3
  125. package/dist/queryParser-CgCtsjti.mjs +352 -0
  126. package/dist/{redis-UwjEp8Ea.d.mts → redis-CQ5YxMC5.d.mts} +2 -2
  127. package/dist/{redis-stream-CBg0upHI.d.mts → redis-stream-BW9UKLZM.d.mts} +9 -2
  128. package/dist/registry/index.d.mts +1 -4
  129. package/dist/registry/index.mjs +3 -4
  130. package/dist/{introspectionPlugin-B3JkrjwU.mjs → registry-I-ogLgL9.mjs} +1 -8
  131. package/dist/{requestContext-xi6OKBL-.mjs → requestContext-DYtmNpm5.mjs} +1 -3
  132. package/dist/resourceToTools-B6ZN9Ing.mjs +489 -0
  133. package/dist/rpc/index.d.mts +90 -0
  134. package/dist/rpc/index.mjs +248 -0
  135. package/dist/{schemaConverter-Dtg0Kt9T.mjs → schemaConverter-DjzHpFam.mjs} +1 -2
  136. package/dist/schemas/index.d.mts +30 -30
  137. package/dist/schemas/index.mjs +4 -6
  138. package/dist/scope/index.d.mts +13 -2
  139. package/dist/scope/index.mjs +18 -5
  140. package/dist/{sessionManager-D_iEHjQl.d.mts → sessionManager-wbkYj2HL.d.mts} +2 -2
  141. package/dist/{sse-DkqQ1uxb.mjs → sse-BkViJPlT.mjs} +4 -25
  142. package/dist/testing/index.d.mts +551 -567
  143. package/dist/testing/index.mjs +1744 -1799
  144. package/dist/{tracing-8CEbhF0w.d.mts → tracing-bz_U4EM1.d.mts} +6 -1
  145. package/dist/{typeGuards-DwxA1t_L.mjs → typeGuards-Cj5Rgvlg.mjs} +1 -2
  146. package/dist/types/index.d.mts +4 -946
  147. package/dist/types/index.mjs +2 -4
  148. package/dist/types-BJmgxNbF.d.mts +275 -0
  149. package/dist/{types-RLkFVgaw.d.mts → types-BNUccdcf.d.mts} +2 -2
  150. package/dist/{types-Beqn1Un7.mjs → types-C6TQjtdi.mjs} +30 -2
  151. package/dist/{types-DMSBMkaZ.d.mts → types-Dt0-AI6E.d.mts} +85 -27
  152. package/dist/{types-DelU6kln.mjs → types-ZUu_h0jp.mjs} +1 -2
  153. package/dist/utils/index.d.mts +255 -352
  154. package/dist/utils/index.mjs +7 -6
  155. package/dist/utils-Dc0WhlIl.mjs +594 -0
  156. package/dist/versioning-BzfeHmhj.mjs +37 -0
  157. package/package.json +46 -12
  158. package/skills/arc/SKILL.md +506 -0
  159. package/skills/arc/references/auth.md +250 -0
  160. package/skills/arc/references/events.md +272 -0
  161. package/skills/arc/references/integrations.md +385 -0
  162. package/skills/arc/references/mcp.md +386 -0
  163. package/skills/arc/references/production.md +610 -0
  164. package/skills/arc/references/testing.md +183 -0
  165. package/dist/audited-CGdLiSlE.mjs +0 -140
  166. package/dist/chunk-C7Uep-_p.mjs +0 -20
  167. package/dist/circuitBreaker-DYhWBW_D.mjs +0 -1096
  168. package/dist/errorHandler-CW3OOeYq.d.mts +0 -72
  169. package/dist/interface-DZYNK9bb.d.mts +0 -1112
  170. package/dist/presets-BTeYbw7h.d.mts +0 -57
  171. package/dist/presets-CeFtfDR8.mjs +0 -119
  172. /package/dist/{errors-DAWRdiYP.d.mts → errors-CPpvPHT0.d.mts} +0 -0
  173. /package/dist/{externalPaths-SyPF2tgK.d.mts → externalPaths-DpO-s7r8.d.mts} +0 -0
  174. /package/dist/{interface-DTbsvIWe.d.mts → interface-D_BWALyZ.d.mts} +0 -0
@@ -1,92 +1,43 @@
1
- import "../elevation-DGo5shaX.mjs";
2
- import { K as HookSystem, w as ResourceRegistry } from "../interface-DZYNK9bb.mjs";
3
- import "../types-RLkFVgaw.mjs";
4
- import { AdditionalRoute, AnyRecord, MiddlewareConfig, PresetHook, RouteSchemaOptions } from "../types/index.mjs";
5
- import { t as ExternalOpenApiPaths } from "../externalPaths-SyPF2tgK.mjs";
6
- import { a as ssePlugin, c as _default$1, i as _default$5, l as cachingPlugin, n as errorHandlerPlugin, o as CachingOptions, r as SSEOptions, s as CachingRule, t as ErrorHandlerOptions } from "../errorHandler-CW3OOeYq.mjs";
7
- import { t as TracingOptions } from "../tracing-8CEbhF0w.mjs";
1
+ import { B as MiddlewareConfig, It as ResourceRegistry, J as PresetHook, c as AdditionalRoute, in as HookSystem, l as AnyRecord, lt as RouteSchemaOptions } from "../interface-DGmPxakH.mjs";
2
+ import { t as ExternalOpenApiPaths } from "../externalPaths-DpO-s7r8.mjs";
3
+ import { _ as cachingPlugin, a as versioningPlugin, c as MetricsOptions, d as SSEOptions, f as _default$6, g as _default$1, h as CachingRule, i as _default$7, l as _default$4, m as CachingOptions, n as errorHandlerPlugin, o as MetricEntry, p as ssePlugin, r as VersioningOptions, s as MetricsCollector, t as ErrorHandlerOptions, u as metricsPlugin } from "../errorHandler-Do4vVQ1f.mjs";
4
+ import { t as TracingOptions } from "../tracing-bz_U4EM1.mjs";
8
5
  import { FastifyInstance, FastifyPluginAsync } from "fastify";
9
6
 
10
- //#region src/plugins/requestId.d.ts
11
- interface RequestIdOptions {
12
- /** Header name to read/write request ID (default: 'x-request-id') */
13
- header?: string;
14
- /** Custom ID generator (default: crypto.randomUUID) */
15
- generator?: () => string;
16
- /** Whether to set response header (default: true) */
17
- setResponseHeader?: boolean;
18
- }
19
- declare module 'fastify' {
20
- interface FastifyRequest {
21
- /** Unique request identifier for tracing */
22
- requestId: string;
23
- }
24
- }
25
- declare const requestIdPlugin: FastifyPluginAsync<RequestIdOptions>;
26
- declare const _default$4: FastifyPluginAsync<RequestIdOptions>;
27
- //#endregion
28
- //#region src/plugins/health.d.ts
29
- declare module 'fastify' {
30
- interface FastifyRequest {
31
- _startTime?: number;
32
- }
7
+ //#region src/core/arcCorePlugin.d.ts
8
+ interface ArcCorePluginOptions {
9
+ /** Enable event emission for CRUD operations (requires eventPlugin) */
10
+ emitEvents?: boolean;
11
+ /** Hook system instance (for testing/custom setup) */
12
+ hookSystem?: HookSystem;
13
+ /** Resource registry instance (for testing/custom setup) */
14
+ registry?: ResourceRegistry;
33
15
  }
34
- interface HealthCheck {
35
- /** Name of the dependency */
16
+ interface PluginMeta {
36
17
  name: string;
37
- /** Function that returns true if healthy, false otherwise */
38
- check: () => Promise<boolean> | boolean;
39
- /** Optional timeout in ms (default: 5000) */
40
- timeout?: number;
41
- /** Whether this check is critical for readiness (default: true) */
42
- critical?: boolean;
43
- }
44
- interface HealthOptions {
45
- /** Route prefix (default: '/_health') */
46
- prefix?: string;
47
- /** Health check dependencies */
48
- checks?: HealthCheck[];
49
- /** Enable metrics endpoint (default: false) */
50
- metrics?: boolean;
51
- /** Custom metrics collector function */
52
- metricsCollector?: () => Promise<string> | string;
53
- /** Version info to include in responses */
54
18
  version?: string;
55
- /** Collect HTTP request metrics (default: true if metrics enabled) */
56
- collectHttpMetrics?: boolean;
19
+ options?: Record<string, unknown>;
20
+ registeredAt: string;
57
21
  }
58
- declare const healthPlugin: FastifyPluginAsync<HealthOptions>;
59
- declare const _default$3: FastifyPluginAsync<HealthOptions>;
60
- //#endregion
61
- //#region src/plugins/gracefulShutdown.d.ts
62
- interface GracefulShutdownOptions {
63
- /** Maximum time to wait for graceful shutdown in ms (default: 30000) */
64
- timeout?: number;
65
- /** Custom cleanup function called before exit */
66
- onShutdown?: () => Promise<void> | void;
67
- /** Signals to handle (default: ['SIGTERM', 'SIGINT']) */
68
- signals?: NodeJS.Signals[];
69
- /** Whether to log shutdown events (default: true) */
70
- logEvents?: boolean;
71
- /**
72
- * Called when shutdown times out or encounters an error.
73
- * Defaults to `process.exit(1)` — appropriate for production but dangerous in:
74
- * - **Tests**: kills the test runner. Pass `() => {}` or `() => { throw … }`.
75
- * - **Shared runtimes** (e.g., serverless): may kill unrelated handlers.
76
- *
77
- * @param reason - `'timeout'` if shutdown exceeded `timeout` ms,
78
- * `'error'` if `onShutdown` or `fastify.close()` threw.
79
- */
80
- onForceExit?: (reason: 'timeout' | 'error') => void;
22
+ interface ArcCore {
23
+ /** Instance-scoped hook system */
24
+ hooks: HookSystem;
25
+ /** Instance-scoped resource registry */
26
+ registry: ResourceRegistry;
27
+ /** Whether event emission is enabled */
28
+ emitEvents: boolean;
29
+ /** External OpenAPI paths contributed by auth adapters or third-party integrations */
30
+ externalOpenApiPaths: ExternalOpenApiPaths[];
31
+ /** Registered plugins for introspection */
32
+ plugins: Map<string, PluginMeta>;
81
33
  }
82
- declare const gracefulShutdownPlugin: FastifyPluginAsync<GracefulShutdownOptions>;
83
- declare module 'fastify' {
34
+ declare module "fastify" {
84
35
  interface FastifyInstance {
85
- /** Trigger graceful shutdown manually */
86
- shutdown: () => Promise<void>;
36
+ arc: ArcCore;
87
37
  }
88
38
  }
89
- declare const _default$2: FastifyPluginAsync<GracefulShutdownOptions>;
39
+ declare const arcCorePlugin: FastifyPluginAsync<ArcCorePluginOptions>;
40
+ declare const _default: FastifyPluginAsync<ArcCorePluginOptions>;
90
41
  //#endregion
91
42
  //#region src/plugins/createPlugin.d.ts
92
43
  interface PluginResourceResult {
@@ -134,39 +85,85 @@ interface ArcPlugin<TRootOpts extends AnyRecord = AnyRecord, TResourceOpts exten
134
85
  */
135
86
  declare function createPlugin<TRootOpts extends AnyRecord = AnyRecord, TResourceOpts extends AnyRecord = AnyRecord>(name: string, definition: CreatePluginDefinition<TRootOpts, TResourceOpts>): ArcPlugin<TRootOpts, TResourceOpts>;
136
87
  //#endregion
137
- //#region src/core/arcCorePlugin.d.ts
138
- interface ArcCorePluginOptions {
139
- /** Enable event emission for CRUD operations (requires eventPlugin) */
140
- emitEvents?: boolean;
141
- /** Hook system instance (for testing/custom setup) */
142
- hookSystem?: HookSystem;
143
- /** Resource registry instance (for testing/custom setup) */
144
- registry?: ResourceRegistry;
88
+ //#region src/plugins/gracefulShutdown.d.ts
89
+ interface GracefulShutdownOptions {
90
+ /** Maximum time to wait for graceful shutdown in ms (default: 30000) */
91
+ timeout?: number;
92
+ /** Custom cleanup function called before exit */
93
+ onShutdown?: () => Promise<void> | void;
94
+ /** Signals to handle (default: ['SIGTERM', 'SIGINT']) */
95
+ signals?: NodeJS.Signals[];
96
+ /** Whether to log shutdown events (default: true) */
97
+ logEvents?: boolean;
98
+ /**
99
+ * Called when shutdown times out or encounters an error.
100
+ * Defaults to `process.exit(1)` — appropriate for production but dangerous in:
101
+ * - **Tests**: kills the test runner. Pass `() => {}` or `() => { throw … }`.
102
+ * - **Shared runtimes** (e.g., serverless): may kill unrelated handlers.
103
+ *
104
+ * @param reason - `'timeout'` if shutdown exceeded `timeout` ms,
105
+ * `'error'` if `onShutdown` or `fastify.close()` threw.
106
+ */
107
+ onForceExit?: (reason: "timeout" | "error") => void;
145
108
  }
146
- interface PluginMeta {
109
+ declare const gracefulShutdownPlugin: FastifyPluginAsync<GracefulShutdownOptions>;
110
+ declare module "fastify" {
111
+ interface FastifyInstance {
112
+ /** Trigger graceful shutdown manually */
113
+ shutdown: () => Promise<void>;
114
+ }
115
+ }
116
+ declare const _default$2: FastifyPluginAsync<GracefulShutdownOptions>;
117
+ //#endregion
118
+ //#region src/plugins/health.d.ts
119
+ declare module "fastify" {
120
+ interface FastifyRequest {
121
+ _startTime?: number;
122
+ }
123
+ }
124
+ interface HealthCheck {
125
+ /** Name of the dependency */
147
126
  name: string;
127
+ /** Function that returns true if healthy, false otherwise */
128
+ check: () => Promise<boolean> | boolean;
129
+ /** Optional timeout in ms (default: 5000) */
130
+ timeout?: number;
131
+ /** Whether this check is critical for readiness (default: true) */
132
+ critical?: boolean;
133
+ }
134
+ interface HealthOptions {
135
+ /** Route prefix (default: '/_health') */
136
+ prefix?: string;
137
+ /** Health check dependencies */
138
+ checks?: HealthCheck[];
139
+ /** Enable metrics endpoint (default: false) */
140
+ metrics?: boolean;
141
+ /** Custom metrics collector function */
142
+ metricsCollector?: () => Promise<string> | string;
143
+ /** Version info to include in responses */
148
144
  version?: string;
149
- options?: Record<string, unknown>;
150
- registeredAt: string;
145
+ /** Collect HTTP request metrics (default: true if metrics enabled) */
146
+ collectHttpMetrics?: boolean;
151
147
  }
152
- interface ArcCore {
153
- /** Instance-scoped hook system */
154
- hooks: HookSystem;
155
- /** Instance-scoped resource registry */
156
- registry: ResourceRegistry;
157
- /** Whether event emission is enabled */
158
- emitEvents: boolean;
159
- /** External OpenAPI paths contributed by auth adapters or third-party integrations */
160
- externalOpenApiPaths: ExternalOpenApiPaths[];
161
- /** Registered plugins for introspection */
162
- plugins: Map<string, PluginMeta>;
148
+ declare const healthPlugin: FastifyPluginAsync<HealthOptions>;
149
+ declare const _default$3: FastifyPluginAsync<HealthOptions>;
150
+ //#endregion
151
+ //#region src/plugins/requestId.d.ts
152
+ interface RequestIdOptions {
153
+ /** Header name to read/write request ID (default: 'x-request-id') */
154
+ header?: string;
155
+ /** Custom ID generator (default: crypto.randomUUID) */
156
+ generator?: () => string;
157
+ /** Whether to set response header (default: true) */
158
+ setResponseHeader?: boolean;
163
159
  }
164
- declare module 'fastify' {
165
- interface FastifyInstance {
166
- arc: ArcCore;
160
+ declare module "fastify" {
161
+ interface FastifyRequest {
162
+ /** Unique request identifier for tracing */
163
+ requestId: string;
167
164
  }
168
165
  }
169
- declare const arcCorePlugin: FastifyPluginAsync<ArcCorePluginOptions>;
170
- declare const _default: FastifyPluginAsync<ArcCorePluginOptions>;
166
+ declare const requestIdPlugin: FastifyPluginAsync<RequestIdOptions>;
167
+ declare const _default$5: FastifyPluginAsync<RequestIdOptions>;
171
168
  //#endregion
172
- export { type ArcCore, type ArcCorePluginOptions, type ArcPlugin, type CachingOptions, type CachingRule, type CreatePluginDefinition, type ErrorHandlerOptions, type GracefulShutdownOptions, type HealthCheck, type HealthOptions, type PluginMeta, type PluginResourceResult, type RequestIdOptions, type SSEOptions, type TracingOptions, _default as arcCorePlugin, arcCorePlugin as arcCorePluginFn, _default$1 as cachingPlugin, cachingPlugin as cachingPluginFn, createPlugin, errorHandlerPlugin, errorHandlerPlugin as errorHandlerPluginFn, _default$2 as gracefulShutdownPlugin, gracefulShutdownPlugin as gracefulShutdownPluginFn, _default$3 as healthPlugin, healthPlugin as healthPluginFn, _default$4 as requestIdPlugin, requestIdPlugin as requestIdPluginFn, _default$5 as ssePlugin, ssePlugin as ssePluginFn };
169
+ export { type ArcCore, type ArcCorePluginOptions, type ArcPlugin, type CachingOptions, type CachingRule, type CreatePluginDefinition, type ErrorHandlerOptions, type GracefulShutdownOptions, type HealthCheck, type HealthOptions, type MetricEntry, type MetricsCollector, type MetricsOptions, type PluginMeta, type PluginResourceResult, type RequestIdOptions, type SSEOptions, type TracingOptions, type VersioningOptions, _default as arcCorePlugin, arcCorePlugin as arcCorePluginFn, _default$1 as cachingPlugin, cachingPlugin as cachingPluginFn, createPlugin, errorHandlerPlugin, errorHandlerPlugin as errorHandlerPluginFn, _default$2 as gracefulShutdownPlugin, gracefulShutdownPlugin as gracefulShutdownPluginFn, _default$3 as healthPlugin, healthPlugin as healthPluginFn, _default$4 as metricsPlugin, metricsPlugin as metricsPluginFn, _default$5 as requestIdPlugin, requestIdPlugin as requestIdPluginFn, _default$6 as ssePlugin, ssePlugin as ssePluginFn, _default$7 as versioningPlugin, versioningPlugin as versioningPluginFn };