@classytic/arc 2.3.0 → 2.4.2
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.
- package/README.md +187 -18
- package/bin/arc.js +11 -3
- package/dist/BaseController-CkM5dUh_.mjs +1031 -0
- package/dist/{EventTransport-BkUDYZEb.d.mts → EventTransport-wc5hSLik.d.mts} +1 -1
- package/dist/{HookSystem-BsGV-j2l.mjs → HookSystem-COkyWztM.mjs} +2 -3
- package/dist/{ResourceRegistry-7Ic20ZMw.mjs → ResourceRegistry-DeCIFlix.mjs} +8 -5
- package/dist/adapters/index.d.mts +3 -5
- package/dist/adapters/index.mjs +2 -3
- package/dist/{prisma-DJbMt3yf.mjs → adapters-DTC4Ug66.mjs} +45 -12
- package/dist/audit/index.d.mts +4 -7
- package/dist/audit/index.mjs +2 -29
- package/dist/audit/mongodb.d.mts +1 -4
- package/dist/audit/mongodb.mjs +2 -3
- package/dist/auth/index.d.mts +7 -9
- package/dist/auth/index.mjs +65 -63
- package/dist/auth/redis-session.d.mts +1 -1
- package/dist/auth/redis-session.mjs +1 -2
- package/dist/{betterAuthOpenApi-DjWDddNc.mjs → betterAuthOpenApi-lz0IRbXJ.mjs} +4 -6
- package/dist/cache/index.d.mts +23 -23
- package/dist/cache/index.mjs +4 -6
- package/dist/{caching-GSDJcA6-.mjs → caching-BSXB-Xr7.mjs} +2 -24
- package/dist/chunk-BpYLSNr0.mjs +14 -0
- package/dist/circuitBreaker-BOBOpN2w.mjs +284 -0
- package/dist/circuitBreaker-JP2GdJ4b.d.mts +206 -0
- package/dist/cli/commands/describe.mjs +24 -7
- package/dist/cli/commands/docs.mjs +6 -7
- package/dist/cli/commands/doctor.d.mts +10 -0
- package/dist/cli/commands/doctor.mjs +156 -0
- package/dist/cli/commands/generate.mjs +66 -17
- package/dist/cli/commands/init.mjs +315 -45
- package/dist/cli/commands/introspect.mjs +2 -4
- package/dist/cli/index.d.mts +1 -10
- package/dist/cli/index.mjs +4 -153
- package/dist/{constants-DdXFXQtN.mjs → constants-Cxde4rpC.mjs} +1 -2
- package/dist/core/index.d.mts +3 -5
- package/dist/core/index.mjs +5 -4
- package/dist/core-C1XCMtqM.mjs +185 -0
- package/dist/{createApp-CgKOPhA4.mjs → createApp-ByWNRsZj.mjs} +64 -35
- package/dist/{defineResource-DWbpJYtm.mjs → defineResource-D9aY5Cy6.mjs} +108 -1157
- package/dist/discovery/index.mjs +37 -5
- package/dist/docs/index.d.mts +6 -9
- package/dist/docs/index.mjs +3 -21
- package/dist/dynamic/index.d.mts +93 -0
- package/dist/dynamic/index.mjs +122 -0
- package/dist/{elevation-DSTbVvYj.mjs → elevation-BEdACOLB.mjs} +5 -36
- package/dist/{elevation-DGo5shaX.d.mts → elevation-Ca_yveIO.d.mts} +41 -7
- package/dist/{errorHandler-C3GY3_ow.mjs → errorHandler--zp54tGc.mjs} +3 -5
- package/dist/errorHandler-Do4vVQ1f.d.mts +139 -0
- package/dist/{errors-DBANPbGr.mjs → errors-rxhfP7Hf.mjs} +1 -2
- package/dist/{eventPlugin-BEOvaDqo.mjs → eventPlugin-Ba00swHF.mjs} +25 -27
- package/dist/{eventPlugin-H6wDDjGO.d.mts → eventPlugin-iGrSEmwJ.d.mts} +105 -5
- package/dist/events/index.d.mts +72 -7
- package/dist/events/index.mjs +216 -4
- package/dist/events/transports/redis-stream-entry.d.mts +1 -1
- package/dist/events/transports/redis-stream-entry.mjs +19 -7
- package/dist/events/transports/redis.d.mts +1 -1
- package/dist/events/transports/redis.mjs +3 -4
- package/dist/factory/index.d.mts +23 -9
- package/dist/factory/index.mjs +48 -3
- package/dist/{fields-Bi_AVKSo.d.mts → fields-DFwdaWCq.d.mts} +1 -1
- package/dist/{fields-CTd_CrKr.mjs → fields-ipsbIRPK.mjs} +1 -2
- package/dist/hooks/index.d.mts +1 -3
- package/dist/hooks/index.mjs +2 -3
- package/dist/idempotency/index.d.mts +5 -5
- package/dist/idempotency/index.mjs +3 -7
- package/dist/idempotency/mongodb.d.mts +1 -1
- package/dist/idempotency/mongodb.mjs +4 -5
- package/dist/idempotency/redis.d.mts +1 -1
- package/dist/idempotency/redis.mjs +2 -5
- package/dist/{fastifyAdapter-6b_eRDBw.d.mts → index-BL8CaQih.d.mts} +56 -57
- package/dist/index-Diqcm14c.d.mts +369 -0
- package/dist/{prisma-Dy5S5F5i.d.mts → index-yhxyjqNb.d.mts} +4 -5
- package/dist/index.d.mts +100 -105
- package/dist/index.mjs +85 -58
- package/dist/integrations/event-gateway.d.mts +1 -1
- package/dist/integrations/event-gateway.mjs +8 -4
- package/dist/integrations/index.d.mts +4 -2
- package/dist/integrations/index.mjs +1 -1
- package/dist/integrations/jobs.d.mts +2 -2
- package/dist/integrations/jobs.mjs +63 -14
- package/dist/integrations/mcp/index.d.mts +219 -0
- package/dist/integrations/mcp/index.mjs +572 -0
- package/dist/integrations/mcp/testing.d.mts +53 -0
- package/dist/integrations/mcp/testing.mjs +104 -0
- package/dist/integrations/streamline.mjs +39 -19
- package/dist/integrations/webhooks.d.mts +56 -0
- package/dist/integrations/webhooks.mjs +139 -0
- package/dist/integrations/websocket-redis.d.mts +46 -0
- package/dist/integrations/websocket-redis.mjs +50 -0
- package/dist/integrations/websocket.d.mts +68 -2
- package/dist/integrations/websocket.mjs +96 -13
- package/dist/{interface-CSNjltAc.d.mts → interface-B4awm1RJ.d.mts} +2 -2
- package/dist/interface-DGmPxakH.d.mts +2213 -0
- package/dist/{keys-DhqDRxv3.mjs → keys-qcD-TVJl.mjs} +3 -4
- package/dist/{logger-ByrvQWZO.mjs → logger-Dz3j1ItV.mjs} +2 -4
- package/dist/{memory-B2v7KrCB.mjs → memory-Cb_7iy9e.mjs} +2 -4
- package/dist/metrics-Csh4nsvv.mjs +224 -0
- package/dist/migrations/index.d.mts +113 -44
- package/dist/migrations/index.mjs +84 -102
- package/dist/{mongodb-DNKEExbf.mjs → mongodb-BuQ7fNTg.mjs} +1 -4
- package/dist/{mongodb-ClykrfGo.d.mts → mongodb-CUpYfxfD.d.mts} +2 -3
- package/dist/{mongodb-Dg8O_gvd.d.mts → mongodb-bga9AbkD.d.mts} +2 -2
- package/dist/{openapi-9nB_kiuR.mjs → openapi-CBmZ6EQN.mjs} +4 -21
- package/dist/org/index.d.mts +12 -14
- package/dist/org/index.mjs +92 -119
- package/dist/org/types.d.mts +2 -2
- package/dist/org/types.mjs +1 -1
- package/dist/permissions/index.d.mts +4 -278
- package/dist/permissions/index.mjs +4 -579
- package/dist/permissions-CA5zg0yK.mjs +751 -0
- package/dist/plugins/index.d.mts +104 -107
- package/dist/plugins/index.mjs +203 -313
- package/dist/plugins/response-cache.mjs +4 -69
- package/dist/plugins/tracing-entry.d.mts +1 -1
- package/dist/plugins/tracing-entry.mjs +24 -11
- package/dist/{pluralize-CM-jZg7p.mjs → pluralize-CcT6qF0a.mjs} +12 -13
- package/dist/policies/index.d.mts +2 -2
- package/dist/policies/index.mjs +80 -83
- package/dist/presets/index.d.mts +26 -19
- package/dist/presets/index.mjs +2 -142
- package/dist/presets/multiTenant.d.mts +1 -4
- package/dist/presets/multiTenant.mjs +4 -6
- package/dist/presets-C9QXJV1u.mjs +422 -0
- package/dist/{queryCachePlugin-B6R0d4av.mjs → queryCachePlugin-ClosZdNS.mjs} +6 -27
- package/dist/{queryCachePlugin-Q6SYuHZ6.d.mts → queryCachePlugin-DcmETvcB.d.mts} +3 -3
- package/dist/queryParser-CgCtsjti.mjs +352 -0
- package/dist/{redis-UwjEp8Ea.d.mts → redis-CQ5YxMC5.d.mts} +2 -2
- package/dist/{redis-stream-CBg0upHI.d.mts → redis-stream-BW9UKLZM.d.mts} +9 -2
- package/dist/registry/index.d.mts +1 -4
- package/dist/registry/index.mjs +3 -4
- package/dist/{introspectionPlugin-B3JkrjwU.mjs → registry-I-ogLgL9.mjs} +1 -8
- package/dist/{requestContext-xi6OKBL-.mjs → requestContext-DYtmNpm5.mjs} +1 -3
- package/dist/resourceToTools-PMFE8HIv.mjs +533 -0
- package/dist/rpc/index.d.mts +90 -0
- package/dist/rpc/index.mjs +248 -0
- package/dist/{schemaConverter-Dtg0Kt9T.mjs → schemaConverter-DjzHpFam.mjs} +1 -2
- package/dist/schemas/index.d.mts +30 -30
- package/dist/schemas/index.mjs +2 -4
- package/dist/scope/index.d.mts +13 -2
- package/dist/scope/index.mjs +18 -5
- package/dist/{sessionManager-D_iEHjQl.d.mts → sessionManager-wbkYj2HL.d.mts} +2 -2
- package/dist/{sse-DkqQ1uxb.mjs → sse-BkViJPlT.mjs} +4 -25
- package/dist/testing/index.d.mts +551 -567
- package/dist/testing/index.mjs +1744 -1799
- package/dist/{tracing-8CEbhF0w.d.mts → tracing-bz_U4EM1.d.mts} +6 -1
- package/dist/{typeGuards-DwxA1t_L.mjs → typeGuards-Cj5Rgvlg.mjs} +1 -2
- package/dist/types/index.d.mts +4 -946
- package/dist/types/index.mjs +2 -4
- package/dist/types-BJmgxNbF.d.mts +275 -0
- package/dist/{types-RLkFVgaw.d.mts → types-BNUccdcf.d.mts} +2 -2
- package/dist/{types-Beqn1Un7.mjs → types-C6TQjtdi.mjs} +30 -2
- package/dist/{types-tKwaViYB.d.mts → types-Dt0-AI6E.d.mts} +68 -27
- package/dist/{types-DelU6kln.mjs → types-ZUu_h0jp.mjs} +1 -2
- package/dist/utils/index.d.mts +254 -351
- package/dist/utils/index.mjs +7 -6
- package/dist/utils-Dc0WhlIl.mjs +594 -0
- package/dist/versioning-BzfeHmhj.mjs +37 -0
- package/package.json +44 -10
- package/skills/arc/SKILL.md +518 -0
- package/skills/arc/references/auth.md +250 -0
- package/skills/arc/references/events.md +272 -0
- package/skills/arc/references/integrations.md +385 -0
- package/skills/arc/references/mcp.md +431 -0
- package/skills/arc/references/production.md +610 -0
- package/skills/arc/references/testing.md +183 -0
- package/dist/audited-CGdLiSlE.mjs +0 -140
- package/dist/chunk-C7Uep-_p.mjs +0 -20
- package/dist/circuitBreaker-CSS2VvL6.mjs +0 -1109
- package/dist/errorHandler-CW3OOeYq.d.mts +0 -72
- package/dist/interface-BtdYtQUA.d.mts +0 -1114
- package/dist/presets-BTeYbw7h.d.mts +0 -57
- package/dist/presets-CeFtfDR8.mjs +0 -119
- /package/dist/{errors-DAWRdiYP.d.mts → errors-CPpvPHT0.d.mts} +0 -0
- /package/dist/{externalPaths-SyPF2tgK.d.mts → externalPaths-DpO-s7r8.d.mts} +0 -0
- /package/dist/{interface-DTbsvIWe.d.mts → interface-D_BWALyZ.d.mts} +0 -0
package/dist/plugins/index.d.mts
CHANGED
|
@@ -1,92 +1,43 @@
|
|
|
1
|
-
import "../
|
|
2
|
-
import {
|
|
3
|
-
import "../
|
|
4
|
-
import {
|
|
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/
|
|
11
|
-
interface
|
|
12
|
-
/**
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
|
|
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
|
|
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
|
-
|
|
56
|
-
|
|
19
|
+
options?: Record<string, unknown>;
|
|
20
|
+
registeredAt: string;
|
|
57
21
|
}
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
|
|
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
|
|
83
|
-
declare module 'fastify' {
|
|
34
|
+
declare module "fastify" {
|
|
84
35
|
interface FastifyInstance {
|
|
85
|
-
|
|
86
|
-
shutdown: () => Promise<void>;
|
|
36
|
+
arc: ArcCore;
|
|
87
37
|
}
|
|
88
38
|
}
|
|
89
|
-
declare const
|
|
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/
|
|
138
|
-
interface
|
|
139
|
-
/**
|
|
140
|
-
|
|
141
|
-
/**
|
|
142
|
-
|
|
143
|
-
/**
|
|
144
|
-
|
|
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
|
-
|
|
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
|
-
|
|
150
|
-
|
|
145
|
+
/** Collect HTTP request metrics (default: true if metrics enabled) */
|
|
146
|
+
collectHttpMetrics?: boolean;
|
|
151
147
|
}
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
/**
|
|
158
|
-
|
|
159
|
-
/**
|
|
160
|
-
|
|
161
|
-
/**
|
|
162
|
-
|
|
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
|
|
165
|
-
interface
|
|
166
|
-
|
|
160
|
+
declare module "fastify" {
|
|
161
|
+
interface FastifyRequest {
|
|
162
|
+
/** Unique request identifier for tracing */
|
|
163
|
+
requestId: string;
|
|
167
164
|
}
|
|
168
165
|
}
|
|
169
|
-
declare const
|
|
170
|
-
declare const _default: FastifyPluginAsync<
|
|
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$
|
|
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 };
|