@forinda/kickjs 3.1.3 → 4.0.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.
- package/README.md +13 -212
- package/dist/adapter-BNw2pGbg.d.mts +261 -0
- package/dist/adapter-BNw2pGbg.d.mts.map +1 -0
- package/dist/{app-module-Cotu9TIC.d.mts → app-module-CO0ksPCm.d.mts} +12 -2
- package/dist/app-module-CO0ksPCm.d.mts.map +1 -0
- package/dist/{application-BVl6L8xo.mjs → application-Ce4DQN6m.mjs} +114 -25
- package/dist/application-Ce4DQN6m.mjs.map +1 -0
- package/dist/application-Czwm7Gty.d.mts +302 -0
- package/dist/application-Czwm7Gty.d.mts.map +1 -0
- package/dist/{bootstrap-D6leYXz2.mjs → bootstrap-CB7bJeJG.mjs} +6 -6
- package/dist/{bootstrap-D6leYXz2.mjs.map → bootstrap-CB7bJeJG.mjs.map} +1 -1
- package/dist/bootstrap-NxFRaNTh.d.mts +28 -0
- package/dist/bootstrap-NxFRaNTh.d.mts.map +1 -0
- package/dist/{cache-CcTzzNdr.d.mts → cache-BStrqXSZ.d.mts} +2 -2
- package/dist/{cache-CcTzzNdr.d.mts.map → cache-BStrqXSZ.d.mts.map} +1 -1
- package/dist/config/index.d.mts +1 -1
- package/dist/config/index.mjs +3 -3
- package/dist/{config-gkVEnxVm.mjs → config-wZ_TgBfs.mjs} +4 -4
- package/dist/{config-gkVEnxVm.mjs.map → config-wZ_TgBfs.mjs.map} +1 -1
- package/dist/{container-BJb34faa.d.mts → container-CnWDsxi-.d.mts} +9 -7
- package/dist/container-CnWDsxi-.d.mts.map +1 -0
- package/dist/{container-BBZLlK6y.mjs → container-DYYSu58w.mjs} +313 -9
- package/dist/container-DYYSu58w.mjs.map +1 -0
- package/dist/context-BAGzqT7-.mjs +319 -0
- package/dist/context-BAGzqT7-.mjs.map +1 -0
- package/dist/context-Ymvv-85x.d.mts +260 -0
- package/dist/context-Ymvv-85x.d.mts.map +1 -0
- package/dist/context-decorator-B5v3VQCN.d.mts +111 -0
- package/dist/context-decorator-B5v3VQCN.d.mts.map +1 -0
- package/dist/core/adapter.d.mts +1 -1
- package/dist/core/adapter.mjs +1 -1
- package/dist/core/app-module.d.mts +1 -1
- package/dist/core/app-module.mjs +1 -1
- package/dist/core/cache.d.mts +1 -1
- package/dist/core/cache.mjs +2 -2
- package/dist/core/cache.mjs.map +1 -1
- package/dist/core/container.d.mts +1 -1
- package/dist/core/container.mjs +2 -2
- package/dist/core/cron.d.mts +1 -1
- package/dist/core/cron.mjs +2 -2
- package/dist/core/decorators.d.mts +2 -2
- package/dist/core/decorators.mjs +48 -16
- package/dist/core/decorators.mjs.map +1 -1
- package/dist/core/errors.d.mts +1 -1
- package/dist/core/errors.mjs +1 -1
- package/dist/core/interfaces.d.mts +1 -1
- package/dist/core/interfaces.mjs +35 -16
- package/dist/core/interfaces.mjs.map +1 -1
- package/dist/core/logger.d.mts +2 -2
- package/dist/core/logger.mjs +2 -4
- package/dist/core/logger.mjs.map +1 -1
- package/dist/core/path.d.mts +1 -1
- package/dist/core/path.mjs +1 -1
- package/dist/core/plugin.d.mts +1 -1
- package/dist/core/plugin.mjs +1 -1
- package/dist/core/reactivity.d.mts +1 -1
- package/dist/core/reactivity.mjs +1 -1
- package/dist/core-DBcoqPHM.mjs +709 -0
- package/dist/core-DBcoqPHM.mjs.map +1 -0
- package/dist/cors-BfgqfLPd.d.mts +48 -0
- package/dist/cors-BfgqfLPd.d.mts.map +1 -0
- package/dist/{cron-H-IyLcOr.d.mts → cron-7zqvsmMI.d.mts} +1 -1
- package/dist/{cron-H-IyLcOr.d.mts.map → cron-7zqvsmMI.d.mts.map} +1 -1
- package/dist/csrf-DiK9zept.d.mts +52 -0
- package/dist/csrf-DiK9zept.d.mts.map +1 -0
- package/dist/{decorators-C9_SN7ge.d.mts → decorators-BMvaLliz.d.mts} +147 -12
- package/dist/decorators-BMvaLliz.d.mts.map +1 -0
- package/dist/{env-Cu5hWsuE.mjs → env-CdH5-dM_.mjs} +3 -4
- package/dist/{env-Cu5hWsuE.mjs.map → env-CdH5-dM_.mjs.map} +1 -1
- package/dist/error-handler-Xud_3Lah.d.mts +20 -0
- package/dist/error-handler-Xud_3Lah.d.mts.map +1 -0
- package/dist/{errors-BOUCRl-p.d.mts → errors-uaHCeXRz.d.mts} +1 -1
- package/dist/{errors-BOUCRl-p.d.mts.map → errors-uaHCeXRz.d.mts.map} +1 -1
- package/dist/execution-context-DKnt61pY.d.mts +57 -0
- package/dist/execution-context-DKnt61pY.d.mts.map +1 -0
- package/dist/helmet-CaMbjzBG.d.mts +41 -0
- package/dist/helmet-CaMbjzBG.d.mts.map +1 -0
- package/dist/http/application.d.mts +2 -239
- package/dist/http/application.mjs +2 -2
- package/dist/http/bootstrap.d.mts +2 -27
- package/dist/http/bootstrap.mjs +2 -2
- package/dist/http/context.d.mts +3 -262
- package/dist/http/context.mjs +2 -271
- package/dist/http/middleware/cors.d.mts +2 -47
- package/dist/http/middleware/cors.mjs +1 -1
- package/dist/http/middleware/csrf.d.mts +2 -51
- package/dist/http/middleware/csrf.mjs +2 -2
- package/dist/http/middleware/csrf.mjs.map +1 -1
- package/dist/http/middleware/error-handler.d.mts +2 -19
- package/dist/http/middleware/error-handler.mjs +2 -2
- package/dist/http/middleware/helmet.d.mts +2 -40
- package/dist/http/middleware/helmet.mjs +1 -1
- package/dist/http/middleware/rate-limit.d.mts +2 -55
- package/dist/http/middleware/rate-limit.mjs +2 -2
- package/dist/http/middleware/rate-limit.mjs.map +1 -1
- package/dist/http/middleware/request-id.d.mts +2 -9
- package/dist/http/middleware/request-id.mjs +12 -3
- package/dist/http/middleware/request-id.mjs.map +1 -1
- package/dist/http/middleware/request-logger.d.mts +2 -31
- package/dist/http/middleware/request-logger.mjs +2 -2
- package/dist/http/middleware/session.d.mts +2 -69
- package/dist/http/middleware/session.mjs +1 -1
- package/dist/http/middleware/spa.d.mts +2 -100
- package/dist/http/middleware/spa.mjs +5 -5
- package/dist/http/middleware/spa.mjs.map +1 -1
- package/dist/http/middleware/upload.d.mts +2 -78
- package/dist/http/middleware/upload.mjs +1 -1
- package/dist/http/middleware/validate.d.mts +2 -22
- package/dist/http/middleware/validate.mjs +2 -2
- package/dist/http/middleware/views.d.mts +2 -61
- package/dist/http/middleware/views.mjs +16 -15
- package/dist/http/middleware/views.mjs.map +1 -1
- package/dist/http/query/index.d.mts +1 -1
- package/dist/http/query/index.mjs +2 -2
- package/dist/http/router-builder.d.mts +2 -20
- package/dist/http/router-builder.mjs +58 -10
- package/dist/http/router-builder.mjs.map +1 -1
- package/dist/{index-Co7a3Zat.d.mts → index-B9cyOQAe.d.mts} +1 -1
- package/dist/{index-Co7a3Zat.d.mts.map → index-B9cyOQAe.d.mts.map} +1 -1
- package/dist/{index-DNVfGjF9.d.mts → index-D-qhXg9M.d.mts} +3 -3
- package/dist/{index-DNVfGjF9.d.mts.map → index-D-qhXg9M.d.mts.map} +1 -1
- package/dist/index-DQyWtyp0.d.mts +511 -0
- package/dist/index-DQyWtyp0.d.mts.map +1 -0
- package/dist/index.d.mts +34 -133
- package/dist/index.mjs +14 -14
- package/dist/interfaces-B50n7dwl.d.mts +71 -0
- package/dist/{interfaces-DXjE8Re1.d.mts.map → interfaces-B50n7dwl.d.mts.map} +1 -1
- package/dist/{logger-CW6FHtvU.d.mts → logger-CLVRZf2N.d.mts} +2 -4
- package/dist/{logger-CW6FHtvU.d.mts.map → logger-CLVRZf2N.d.mts.map} +1 -1
- package/dist/{metadata-BwRJ69bC.mjs → metadata-VQM9wChy.mjs} +2 -2
- package/dist/{metadata-BwRJ69bC.mjs.map → metadata-VQM9wChy.mjs.map} +1 -1
- package/dist/{path-B4JcbwKX.d.mts → path-Diviu6hv.d.mts} +1 -1
- package/dist/path-Diviu6hv.d.mts.map +1 -0
- package/dist/plugin-WdrDgNzk.d.mts +165 -0
- package/dist/plugin-WdrDgNzk.d.mts.map +1 -0
- package/dist/{query-BQ2UT3oi.mjs → query-DJMxdx5r.mjs} +2 -2
- package/dist/{query-BQ2UT3oi.mjs.map → query-DJMxdx5r.mjs.map} +1 -1
- package/dist/rate-limit-DUwoICtI.d.mts +56 -0
- package/dist/rate-limit-DUwoICtI.d.mts.map +1 -0
- package/dist/{reactivity-I8nDlg4c.d.mts → reactivity-CfJceo4H.d.mts} +1 -1
- package/dist/{reactivity-I8nDlg4c.d.mts.map → reactivity-CfJceo4H.d.mts.map} +1 -1
- package/dist/request-id-BgglvZHN.d.mts +19 -0
- package/dist/request-id-BgglvZHN.d.mts.map +1 -0
- package/dist/request-logger-CWHbAzTE.d.mts +32 -0
- package/dist/request-logger-CWHbAzTE.d.mts.map +1 -0
- package/dist/router-builder-C799BAf0.d.mts +31 -0
- package/dist/router-builder-C799BAf0.d.mts.map +1 -0
- package/dist/session-N0hActOO.d.mts +70 -0
- package/dist/session-N0hActOO.d.mts.map +1 -0
- package/dist/spa-CrFR2_cz.d.mts +101 -0
- package/dist/spa-CrFR2_cz.d.mts.map +1 -0
- package/dist/upload-BueOnnLw.d.mts +79 -0
- package/dist/upload-BueOnnLw.d.mts.map +1 -0
- package/dist/validate-HwAyWTwH.d.mts +23 -0
- package/dist/validate-HwAyWTwH.d.mts.map +1 -0
- package/dist/views-DhQSXV2P.d.mts +176 -0
- package/dist/views-DhQSXV2P.d.mts.map +1 -0
- package/package.json +6 -9
- package/dist/adapter-DjL8ql5d.d.mts +0 -140
- package/dist/adapter-DjL8ql5d.d.mts.map +0 -1
- package/dist/app-module-Cotu9TIC.d.mts.map +0 -1
- package/dist/application-BVl6L8xo.mjs.map +0 -1
- package/dist/chunk-CVPG7JJl.mjs +0 -15
- package/dist/container-BBZLlK6y.mjs.map +0 -1
- package/dist/container-BJb34faa.d.mts.map +0 -1
- package/dist/core-qyPNtpKp.mjs +0 -121
- package/dist/core-qyPNtpKp.mjs.map +0 -1
- package/dist/decorators-C9_SN7ge.d.mts.map +0 -1
- package/dist/http/application.d.mts.map +0 -1
- package/dist/http/bootstrap.d.mts.map +0 -1
- package/dist/http/context.d.mts.map +0 -1
- package/dist/http/context.mjs.map +0 -1
- package/dist/http/middleware/cors.d.mts.map +0 -1
- package/dist/http/middleware/csrf.d.mts.map +0 -1
- package/dist/http/middleware/error-handler.d.mts.map +0 -1
- package/dist/http/middleware/helmet.d.mts.map +0 -1
- package/dist/http/middleware/rate-limit.d.mts.map +0 -1
- package/dist/http/middleware/request-id.d.mts.map +0 -1
- package/dist/http/middleware/request-logger.d.mts.map +0 -1
- package/dist/http/middleware/session.d.mts.map +0 -1
- package/dist/http/middleware/spa.d.mts.map +0 -1
- package/dist/http/middleware/upload.d.mts.map +0 -1
- package/dist/http/middleware/validate.d.mts.map +0 -1
- package/dist/http/middleware/views.d.mts.map +0 -1
- package/dist/http/router-builder.d.mts.map +0 -1
- package/dist/index-CwqjAF6I.d.mts +0 -112
- package/dist/index-CwqjAF6I.d.mts.map +0 -1
- package/dist/index.d.mts.map +0 -1
- package/dist/interfaces-DXjE8Re1.d.mts +0 -52
- package/dist/path-B4JcbwKX.d.mts.map +0 -1
- package/dist/plugin-Cvacmm7N.d.mts +0 -95
- package/dist/plugin-Cvacmm7N.d.mts.map +0 -1
|
@@ -0,0 +1,511 @@
|
|
|
1
|
+
|
|
2
|
+
import { s as InjectionToken, t as Container } from "./container-CnWDsxi-.mjs";
|
|
3
|
+
import { n as ExecutionContext } from "./execution-context-DKnt61pY.mjs";
|
|
4
|
+
import { r as ContributorRegistration } from "./context-decorator-B5v3VQCN.mjs";
|
|
5
|
+
import { r as AppAdapter } from "./adapter-BNw2pGbg.mjs";
|
|
6
|
+
import { t as KickPlugin } from "./plugin-WdrDgNzk.mjs";
|
|
7
|
+
//#region src/core/metadata.d.ts
|
|
8
|
+
/**
|
|
9
|
+
* Typed utilities for reflect-metadata operations.
|
|
10
|
+
*
|
|
11
|
+
* Replaces scattered Reflect.defineMetadata/getMetadata calls with a single
|
|
12
|
+
* source of truth. If we later move to Stage 3 decorators or a WeakMap-based
|
|
13
|
+
* store, only this file changes — all 24+ consumer files stay untouched.
|
|
14
|
+
*
|
|
15
|
+
* Keys may be symbols, strings, or `InjectionToken<T>` objects produced by
|
|
16
|
+
* `createToken()`. Using `createToken` is the preferred pattern because the
|
|
17
|
+
* token's phantom type flows through the helpers, enabling type-safe reads.
|
|
18
|
+
*/
|
|
19
|
+
type MetaKey = symbol | string | InjectionToken<unknown>;
|
|
20
|
+
/** Set metadata on a class (or prototype for property decorators) */
|
|
21
|
+
declare function setClassMeta<T>(key: MetaKey, value: T, target: object): void;
|
|
22
|
+
/** Set metadata on a specific method */
|
|
23
|
+
declare function setMethodMeta<T>(key: MetaKey, value: T, target: object, method: string): void;
|
|
24
|
+
/** Get metadata from a class, returning `fallback` if not set */
|
|
25
|
+
declare function getClassMeta<T>(key: MetaKey, target: object, fallback: T): T;
|
|
26
|
+
/** Get metadata from a specific method, returning `fallback` if not set */
|
|
27
|
+
declare function getMethodMeta<T>(key: MetaKey, target: object, method: string, fallback: T): T;
|
|
28
|
+
/** Check if metadata exists on a class */
|
|
29
|
+
declare function hasClassMeta(key: MetaKey, target: object): boolean;
|
|
30
|
+
/** Get metadata from a class with no default (returns undefined if absent) */
|
|
31
|
+
declare function getClassMetaOrUndefined<T>(key: MetaKey, target: object): T | undefined;
|
|
32
|
+
/** Get metadata from a method with no default (returns undefined if absent) */
|
|
33
|
+
declare function getMethodMetaOrUndefined<T>(key: MetaKey, target: object, method: string): T | undefined;
|
|
34
|
+
/** Append items to an array stored in class metadata */
|
|
35
|
+
declare function pushClassMeta<T>(key: MetaKey, target: object, ...items: T[]): void;
|
|
36
|
+
/** Append items to an array stored in method metadata */
|
|
37
|
+
declare function pushMethodMeta<T>(key: MetaKey, target: object, method: string, ...items: T[]): void;
|
|
38
|
+
/** Set a key/value in a Map stored in class metadata */
|
|
39
|
+
declare function setInMetaMap<K, V>(key: MetaKey, target: object, mapKey: K, mapValue: V): void;
|
|
40
|
+
/** Get a Map from class metadata (returns empty Map if absent) */
|
|
41
|
+
declare function getMetaMap<K, V>(key: MetaKey, target: object): Map<K, V>;
|
|
42
|
+
/** Set a key/value in a Record stored in class metadata */
|
|
43
|
+
declare function setInMetaRecord<V>(key: MetaKey, target: object, recKey: string | number, recValue: V): void;
|
|
44
|
+
/** Get a Record from class metadata (returns empty object if absent) */
|
|
45
|
+
declare function getMetaRecord<V>(key: MetaKey, target: object): Record<string | number, V>;
|
|
46
|
+
//#endregion
|
|
47
|
+
//#region src/core/circuit-breaker.d.ts
|
|
48
|
+
/**
|
|
49
|
+
* Circuit Breaker pattern for external service calls.
|
|
50
|
+
*
|
|
51
|
+
* Protects your application from cascading failures when downstream
|
|
52
|
+
* services are unhealthy by short-circuiting requests after a
|
|
53
|
+
* configurable failure threshold.
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* ```ts
|
|
57
|
+
* const breaker = new CircuitBreaker('payment-api', {
|
|
58
|
+
* failureThreshold: 5,
|
|
59
|
+
* resetTimeout: 30_000,
|
|
60
|
+
* })
|
|
61
|
+
*
|
|
62
|
+
* const result = await breaker.execute(() => fetch('https://payment.example.com/charge'))
|
|
63
|
+
* ```
|
|
64
|
+
*/
|
|
65
|
+
type CircuitBreakerState = 'closed' | 'open' | 'half_open';
|
|
66
|
+
interface CircuitBreakerOptions {
|
|
67
|
+
/** Number of consecutive failures before the circuit opens. */
|
|
68
|
+
failureThreshold: number;
|
|
69
|
+
/** Milliseconds to wait before transitioning from OPEN to HALF_OPEN. */
|
|
70
|
+
resetTimeout: number;
|
|
71
|
+
/** Max requests allowed in HALF_OPEN state before deciding (default 1). */
|
|
72
|
+
halfOpenMax?: number;
|
|
73
|
+
}
|
|
74
|
+
interface CircuitBreakerStats {
|
|
75
|
+
failures: number;
|
|
76
|
+
successes: number;
|
|
77
|
+
state: CircuitBreakerState;
|
|
78
|
+
lastFailure?: Date;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Error thrown when the circuit is open and calls are being rejected.
|
|
82
|
+
*/
|
|
83
|
+
declare class CircuitOpenError extends Error {
|
|
84
|
+
readonly breakerName: string;
|
|
85
|
+
constructor(breakerName: string);
|
|
86
|
+
}
|
|
87
|
+
declare class CircuitBreaker {
|
|
88
|
+
readonly name: string;
|
|
89
|
+
private state;
|
|
90
|
+
private failures;
|
|
91
|
+
private successes;
|
|
92
|
+
private halfOpenAttempts;
|
|
93
|
+
private lastFailure?;
|
|
94
|
+
private openedAt?;
|
|
95
|
+
private readonly failureThreshold;
|
|
96
|
+
private readonly resetTimeout;
|
|
97
|
+
private readonly halfOpenMax;
|
|
98
|
+
constructor(name: string, options: CircuitBreakerOptions);
|
|
99
|
+
/**
|
|
100
|
+
* Execute an async function through the circuit breaker.
|
|
101
|
+
* Throws `CircuitOpenError` if the circuit is open.
|
|
102
|
+
*/
|
|
103
|
+
execute<T>(fn: () => Promise<T>): Promise<T>;
|
|
104
|
+
/** Returns the current circuit state. */
|
|
105
|
+
getState(): CircuitBreakerState;
|
|
106
|
+
/** Returns current statistics. */
|
|
107
|
+
getStats(): CircuitBreakerStats;
|
|
108
|
+
/** Manually reset the circuit breaker to CLOSED state. */
|
|
109
|
+
reset(): void;
|
|
110
|
+
private onSuccess;
|
|
111
|
+
private onFailure;
|
|
112
|
+
private maybeTransitionToHalfOpen;
|
|
113
|
+
}
|
|
114
|
+
//#endregion
|
|
115
|
+
//#region src/core/context-errors.d.ts
|
|
116
|
+
/**
|
|
117
|
+
* Errors thrown by the Context Contributor pipeline.
|
|
118
|
+
*
|
|
119
|
+
* All three are startup-time errors raised during pipeline build (topo-sort
|
|
120
|
+
* + validation), not per-request — a misconfigured app fails to boot rather
|
|
121
|
+
* than fails a request. Per the locked design in `architecture.md` §20.4,
|
|
122
|
+
* the pipeline is validated once when each route is mounted and the
|
|
123
|
+
* resolved order is cached on the route.
|
|
124
|
+
*/
|
|
125
|
+
/**
|
|
126
|
+
* A contributor declared `dependsOn: ['<key>']` but no other contributor
|
|
127
|
+
* (at any precedence level) produces that key for the same route.
|
|
128
|
+
*
|
|
129
|
+
* @example
|
|
130
|
+
* ```text
|
|
131
|
+
* MissingContributorError: Missing context contributor 'tenant' required by 'project' on route GET /projects/:id
|
|
132
|
+
* ```
|
|
133
|
+
*/
|
|
134
|
+
declare class MissingContributorError extends Error {
|
|
135
|
+
readonly key: string;
|
|
136
|
+
readonly dependent: string;
|
|
137
|
+
readonly route?: string;
|
|
138
|
+
constructor(key: string, dependent: string, route?: string);
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Topo-sort detected a cycle in `dependsOn` declarations. The `cycle` field
|
|
142
|
+
* lists the keys in the order they form the loop, with the first key
|
|
143
|
+
* repeated at the end so the path reads naturally.
|
|
144
|
+
*
|
|
145
|
+
* @example
|
|
146
|
+
* ```text
|
|
147
|
+
* ContributorCycleError: Cycle in context contributors on route GET /projects/:id: tenant → project → tenant
|
|
148
|
+
* ```
|
|
149
|
+
*/
|
|
150
|
+
declare class ContributorCycleError extends Error {
|
|
151
|
+
readonly cycle: readonly string[];
|
|
152
|
+
readonly route?: string;
|
|
153
|
+
constructor(cycle: readonly string[], route?: string);
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* Two contributors at the same precedence level both produce the same key
|
|
157
|
+
* for the same route. Precedence resolution (method > class > module >
|
|
158
|
+
* adapter > global, per architecture.md §20.4) silently drops
|
|
159
|
+
* lower-precedence duplicates; this error fires only when ties occur
|
|
160
|
+
* within a single level — e.g., two method-level decorators declaring
|
|
161
|
+
* `key: 'tenant'`.
|
|
162
|
+
*
|
|
163
|
+
* `sources` is best-effort identifying labels for each conflicting
|
|
164
|
+
* registration (typically the decorator's call site or registering
|
|
165
|
+
* module/adapter name).
|
|
166
|
+
*
|
|
167
|
+
* @example
|
|
168
|
+
* ```text
|
|
169
|
+
* DuplicateContributorError: Duplicate context contributor for key 'tenant' at the same precedence level. Sources: LoadTenantFromHeader, LoadTenantFromSubdomain
|
|
170
|
+
* ```
|
|
171
|
+
*/
|
|
172
|
+
declare class DuplicateContributorError extends Error {
|
|
173
|
+
readonly key: string;
|
|
174
|
+
readonly sources: readonly string[];
|
|
175
|
+
constructor(key: string, sources: readonly string[]);
|
|
176
|
+
}
|
|
177
|
+
//#endregion
|
|
178
|
+
//#region src/core/contributor-pipeline.d.ts
|
|
179
|
+
/**
|
|
180
|
+
* Where a contributor was registered, ordered by precedence
|
|
181
|
+
* (lower index wins). Mirrors `architecture.md` §20.4.
|
|
182
|
+
*
|
|
183
|
+
* Levels (highest → lowest precedence):
|
|
184
|
+
* - `'method'` — `@LoadX` on a controller method.
|
|
185
|
+
* - `'class'` — `@LoadX` on a controller class.
|
|
186
|
+
* - `'module'` — returned by `AppModule.contributors?()`. Per-module scope.
|
|
187
|
+
* - `'adapter'` — returned by `AppAdapter.contributors?()`. Cross-cutting, applies
|
|
188
|
+
* to every module's routes.
|
|
189
|
+
* - `'global'` — `ApplicationOptions.contributors`. App-wide default.
|
|
190
|
+
*/
|
|
191
|
+
type ContributorSource = 'method' | 'class' | 'module' | 'adapter' | 'global';
|
|
192
|
+
/**
|
|
193
|
+
* Input row to {@link buildPipeline}. Pairs a registration with its origin
|
|
194
|
+
* so dedup can apply the precedence rule and diagnostic errors can name
|
|
195
|
+
* the offending site.
|
|
196
|
+
*/
|
|
197
|
+
interface SourcedRegistration {
|
|
198
|
+
registration: ContributorRegistration;
|
|
199
|
+
source: ContributorSource;
|
|
200
|
+
/** Human label surfaced in DuplicateContributorError messages. */
|
|
201
|
+
label?: string;
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* Resolved, validated, topo-sorted pipeline ready for execution.
|
|
205
|
+
*
|
|
206
|
+
* `contributors` is in execution order — every entry's `dependsOn`
|
|
207
|
+
* keys appear earlier. `keys` is the set of all keys this pipeline
|
|
208
|
+
* produces; the runner uses it for fast existence checks and the
|
|
209
|
+
* builder uses it for missing-dep validation.
|
|
210
|
+
*/
|
|
211
|
+
interface ContributorPipeline {
|
|
212
|
+
readonly contributors: readonly ContributorRegistration[];
|
|
213
|
+
readonly keys: ReadonlySet<string>;
|
|
214
|
+
}
|
|
215
|
+
interface BuildPipelineOptions {
|
|
216
|
+
/** Optional route identifier surfaced in diagnostic errors (e.g., 'GET /projects/:id'). */
|
|
217
|
+
route?: string;
|
|
218
|
+
}
|
|
219
|
+
/**
|
|
220
|
+
* Build, validate, and topo-sort a contributor pipeline.
|
|
221
|
+
*
|
|
222
|
+
* Pipeline:
|
|
223
|
+
*
|
|
224
|
+
* 1. Group sources by precedence (method > class > module > adapter > global).
|
|
225
|
+
* 2. Within each precedence level, two contributors with the same `key`
|
|
226
|
+
* raise {@link DuplicateContributorError}.
|
|
227
|
+
* 3. Across levels, the highest-precedence contributor wins each key
|
|
228
|
+
* (lower-precedence duplicates are silently dropped — that is the
|
|
229
|
+
* documented override mechanism, not an error).
|
|
230
|
+
* 4. Every key referenced by `dependsOn` must be produced by the
|
|
231
|
+
* surviving set, otherwise {@link MissingContributorError}.
|
|
232
|
+
* 5. Kahn's algorithm topo-sorts the survivors. Any nodes left after
|
|
233
|
+
* the queue drains form a cycle → {@link ContributorCycleError}
|
|
234
|
+
* with a reconstructed path.
|
|
235
|
+
*
|
|
236
|
+
* Pure function — no DI, no I/O. Safe to call once at startup per
|
|
237
|
+
* route and cache the result.
|
|
238
|
+
*/
|
|
239
|
+
declare function buildPipeline(sources: readonly SourcedRegistration[], options?: BuildPipelineOptions): ContributorPipeline;
|
|
240
|
+
//#endregion
|
|
241
|
+
//#region src/core/contributor-runner.d.ts
|
|
242
|
+
interface RunContributorsOptions {
|
|
243
|
+
/** Pre-built, validated, topo-sorted pipeline. */
|
|
244
|
+
pipeline: ContributorPipeline;
|
|
245
|
+
/** The execution context contributors read from and write into. */
|
|
246
|
+
ctx: ExecutionContext;
|
|
247
|
+
/** DI container used to resolve declared `deps`. */
|
|
248
|
+
container: Container;
|
|
249
|
+
}
|
|
250
|
+
/**
|
|
251
|
+
* Execute a built {@link ContributorPipeline} against an {@link ExecutionContext}.
|
|
252
|
+
*
|
|
253
|
+
* Sequential — one contributor at a time, in the topo order chosen at
|
|
254
|
+
* pipeline-build time. Per `architecture.md` §20.10, V1 does not run
|
|
255
|
+
* contributors in parallel even within the same topo level; that is a
|
|
256
|
+
* V2 follow-up gated on profiling.
|
|
257
|
+
*
|
|
258
|
+
* ## Error matrix (architecture.md §20.9)
|
|
259
|
+
*
|
|
260
|
+
* | resolve outcome | optional | onError defined | runner behaviour |
|
|
261
|
+
* |-----------------|----------|-----------------|--------------------------------------------------|
|
|
262
|
+
* | throws | true | — | skip; `ctx.get(key)` remains undefined |
|
|
263
|
+
* | throws | false | yes | call hook; returned value (if any) stored |
|
|
264
|
+
* | throws | false | no | propagate the original error |
|
|
265
|
+
* | hook throws | — | yes | propagate the new error |
|
|
266
|
+
* | hook returns | — | yes | undefined/void → skip; value → `ctx.set(key, v)` |
|
|
267
|
+
* | resolves | — | — | `ctx.set(key, value)` |
|
|
268
|
+
*
|
|
269
|
+
* Container.resolve() throwing while building `deps` is treated as a
|
|
270
|
+
* resolve-side throw and flows through the same matrix — adopters who
|
|
271
|
+
* need different behaviour for missing-DI vs. data-fetch failures can
|
|
272
|
+
* wrap the container access inside their own `resolve()`.
|
|
273
|
+
*/
|
|
274
|
+
declare function runContributors(options: RunContributorsOptions): Promise<void>;
|
|
275
|
+
//#endregion
|
|
276
|
+
//#region src/core/mount-sort.d.ts
|
|
277
|
+
/**
|
|
278
|
+
* Topological sort for plugins and adapters with `dependsOn` declarations.
|
|
279
|
+
*
|
|
280
|
+
* Mirrors the algorithm used by the Context Contributor pipeline
|
|
281
|
+
* (`contributor-pipeline.ts:topoSort`) but operates on a name-keyed
|
|
282
|
+
* `MountSortItem` shape rather than a `ContributorRegistration`. Kept
|
|
283
|
+
* standalone instead of factored generic so that:
|
|
284
|
+
*
|
|
285
|
+
* 1. The contributor pipeline doesn't need refactoring (risk reduction).
|
|
286
|
+
* 2. The error classes can carry plugin/adapter-specific diagnostic
|
|
287
|
+
* fields (`kind`, `dependent`) without bending the contributor types.
|
|
288
|
+
*/
|
|
289
|
+
/**
|
|
290
|
+
* A plugin or adapter that participates in dependency-ordered mounting.
|
|
291
|
+
* Both `KickPlugin` and `AppAdapter` satisfy this shape via their `name`
|
|
292
|
+
* and `dependsOn` fields.
|
|
293
|
+
*/
|
|
294
|
+
interface MountSortItem {
|
|
295
|
+
/** Unique mount name within the plugin/adapter set being sorted. */
|
|
296
|
+
name: string;
|
|
297
|
+
/**
|
|
298
|
+
* Other plugin/adapter names that must mount before this one. Cycles
|
|
299
|
+
* and missing names fail at boot — same fail-fast contract as the
|
|
300
|
+
* Context Contributor pipeline (architecture.md §20.4).
|
|
301
|
+
*/
|
|
302
|
+
dependsOn?: readonly string[];
|
|
303
|
+
}
|
|
304
|
+
/** What kind of mount set the sort is operating on — surfaces in error messages. */
|
|
305
|
+
type MountKind = 'plugin' | 'adapter';
|
|
306
|
+
/**
|
|
307
|
+
* Two items in the same mount set declared the same `name`. Plugin/adapter
|
|
308
|
+
* names must be unique so `dependsOn` references resolve unambiguously.
|
|
309
|
+
*/
|
|
310
|
+
declare class DuplicateMountNameError extends Error {
|
|
311
|
+
readonly kind: MountKind;
|
|
312
|
+
readonly mountName: string;
|
|
313
|
+
constructor(kind: MountKind, mountName: string);
|
|
314
|
+
}
|
|
315
|
+
/**
|
|
316
|
+
* A `dependsOn` entry references a plugin/adapter that isn't in the
|
|
317
|
+
* current set. The dependency might not be installed, might be misspelled,
|
|
318
|
+
* or might live in a different mount set (plugin referencing an adapter,
|
|
319
|
+
* or vice versa — they sort independently).
|
|
320
|
+
*/
|
|
321
|
+
declare class MissingMountDepError extends Error {
|
|
322
|
+
readonly kind: MountKind;
|
|
323
|
+
readonly missing: string;
|
|
324
|
+
readonly dependent: string;
|
|
325
|
+
constructor(kind: MountKind, missing: string, dependent: string);
|
|
326
|
+
}
|
|
327
|
+
/**
|
|
328
|
+
* The `dependsOn` declarations form a cycle. Boot fails so the cycle
|
|
329
|
+
* can't poison live traffic. The `cycle` field reports one path through
|
|
330
|
+
* the offending nodes for diagnostics — formatted `A → B → C → A`.
|
|
331
|
+
*/
|
|
332
|
+
declare class MountCycleError extends Error {
|
|
333
|
+
readonly kind: MountKind;
|
|
334
|
+
readonly cycle: readonly string[];
|
|
335
|
+
constructor(kind: MountKind, cycle: readonly string[]);
|
|
336
|
+
}
|
|
337
|
+
/**
|
|
338
|
+
* Topologically sort `items` so every item with `dependsOn: ['X']` mounts
|
|
339
|
+
* after `X`. Items without `dependsOn` keep their input order via Kahn's
|
|
340
|
+
* algorithm with a FIFO queue seeded in input order — preserves the
|
|
341
|
+
* historical "plugins/adapters mount in declaration order" behaviour for
|
|
342
|
+
* any set that doesn't use `dependsOn`.
|
|
343
|
+
*
|
|
344
|
+
* @param items - mountable items, e.g. plugins or adapters
|
|
345
|
+
* @param kind - 'plugin' | 'adapter', used in error messages
|
|
346
|
+
* @returns a new array in valid mount order
|
|
347
|
+
* @throws {DuplicateMountNameError} two items share a name
|
|
348
|
+
* @throws {MissingMountDepError} a `dependsOn` references an unknown name
|
|
349
|
+
* @throws {MountCycleError} the dep graph contains a cycle
|
|
350
|
+
*/
|
|
351
|
+
declare function mountSort<T extends MountSortItem>(items: readonly T[], kind: MountKind): T[];
|
|
352
|
+
//#endregion
|
|
353
|
+
//#region src/core/define-plugin.d.ts
|
|
354
|
+
/**
|
|
355
|
+
* Options passed to {@link definePlugin}. Mirrors the spec in
|
|
356
|
+
* `architecture.md` §21.3.1 + §21.2.2 (Phase A "lite").
|
|
357
|
+
*/
|
|
358
|
+
interface DefinePluginOptions<TConfig> {
|
|
359
|
+
/** Stable identity used for logging, `dependsOn` lookups, and `.scoped()` namespacing. */
|
|
360
|
+
name: string;
|
|
361
|
+
/** Optional plugin version — surfaced to DevTools and `kick add` compatibility checks (Phase B). */
|
|
362
|
+
version?: string;
|
|
363
|
+
/**
|
|
364
|
+
* Peer-version ranges this plugin needs from the framework or other
|
|
365
|
+
* plugins. Recorded as metadata; runtime enforcement lands in §21.4.4.
|
|
366
|
+
*/
|
|
367
|
+
requires?: {
|
|
368
|
+
kickjs?: string;
|
|
369
|
+
};
|
|
370
|
+
/** Default config merged under any caller overrides. */
|
|
371
|
+
defaults?: Partial<TConfig>;
|
|
372
|
+
/** Builds the underlying {@link KickPlugin} from the resolved config. */
|
|
373
|
+
build(config: TConfig, ctx: BuildContext): Omit<KickPlugin, 'name'>;
|
|
374
|
+
}
|
|
375
|
+
/**
|
|
376
|
+
* Hook context handed to a plugin/adapter `build` function. `name` is the
|
|
377
|
+
* resolved instance name (the bare definition name for the bare call,
|
|
378
|
+
* or `${defName}:${scope}` for `.scoped()`). `scoped` is the discriminator
|
|
379
|
+
* authors use to namespace DI tokens or resource keys.
|
|
380
|
+
*/
|
|
381
|
+
interface BuildContext {
|
|
382
|
+
name: string;
|
|
383
|
+
scoped: boolean;
|
|
384
|
+
}
|
|
385
|
+
/**
|
|
386
|
+
* Async-config form of a plugin or adapter — `inject` lists DI tokens to
|
|
387
|
+
* resolve from the container, then `useFactory` produces the config.
|
|
388
|
+
*
|
|
389
|
+
* Plugins resolve this lazily inside `onReady`, so any module/adapter/
|
|
390
|
+
* middleware/contributor a plugin contributes via `build` is **not
|
|
391
|
+
* available** when `.async()` is used. Use the bare/`.scoped()` form for
|
|
392
|
+
* plugins that need to register modules or middleware.
|
|
393
|
+
*/
|
|
394
|
+
interface PluginAsyncOptions<TConfig> {
|
|
395
|
+
inject?: ReadonlyArray<unknown>;
|
|
396
|
+
useFactory(...deps: any[]): TConfig | Promise<TConfig>;
|
|
397
|
+
}
|
|
398
|
+
/**
|
|
399
|
+
* Factory returned by {@link definePlugin}. Callable form is the singleton
|
|
400
|
+
* (`AuthPlugin(config)`); `.scoped()` and `.async()` are the multi-instance
|
|
401
|
+
* and deferred-config forms.
|
|
402
|
+
*/
|
|
403
|
+
interface PluginFactory<TConfig> {
|
|
404
|
+
(config?: Partial<TConfig>): KickPlugin;
|
|
405
|
+
scoped(scopeName: string, config?: Partial<TConfig>): KickPlugin;
|
|
406
|
+
async(opts: PluginAsyncOptions<TConfig>): KickPlugin;
|
|
407
|
+
/** Read-only access to the original definition — useful for DevTools introspection. */
|
|
408
|
+
readonly definition: Readonly<DefinePluginOptions<TConfig>>;
|
|
409
|
+
}
|
|
410
|
+
/**
|
|
411
|
+
* Build a {@link KickPlugin} factory from a typed definition. See
|
|
412
|
+
* `architecture.md` §21.2.2 for the design rationale.
|
|
413
|
+
*
|
|
414
|
+
* @example
|
|
415
|
+
* ```ts
|
|
416
|
+
* const FlagsPlugin = definePlugin<FlagsConfig>({
|
|
417
|
+
* name: 'FlagsPlugin',
|
|
418
|
+
* defaults: { defaultTtl: 60_000 },
|
|
419
|
+
* build(config) {
|
|
420
|
+
* return {
|
|
421
|
+
* register(container) {
|
|
422
|
+
* container.registerInstance(FLAGS, makeProvider(config))
|
|
423
|
+
* },
|
|
424
|
+
* }
|
|
425
|
+
* },
|
|
426
|
+
* })
|
|
427
|
+
*
|
|
428
|
+
* bootstrap({ plugins: [FlagsPlugin({ provider: launchDarkly })] })
|
|
429
|
+
* ```
|
|
430
|
+
*/
|
|
431
|
+
declare function definePlugin<TConfig = Record<string, unknown>>(options: DefinePluginOptions<TConfig>): PluginFactory<TConfig>;
|
|
432
|
+
//#endregion
|
|
433
|
+
//#region src/core/define-adapter.d.ts
|
|
434
|
+
/**
|
|
435
|
+
* Options passed to {@link defineAdapter}. Mirrors {@link DefinePluginOptions}
|
|
436
|
+
* exactly — see `architecture.md` §21.3.4 for the definePlugin/defineAdapter
|
|
437
|
+
* symmetry rationale.
|
|
438
|
+
*
|
|
439
|
+
* The optional `TExtra` generic lets an adapter ship public methods
|
|
440
|
+
* beyond the standard {@link AppAdapter} contract — they're preserved
|
|
441
|
+
* on the returned adapter instance so external callers (tests, peer
|
|
442
|
+
* adapters) can invoke them directly. See `OtelAdapter.applyRedaction`
|
|
443
|
+
* for the canonical use case.
|
|
444
|
+
*/
|
|
445
|
+
interface DefineAdapterOptions<TConfig, TExtra = unknown> {
|
|
446
|
+
/**
|
|
447
|
+
* Stable identity used for logging, `dependsOn` lookups, and `.scoped()`
|
|
448
|
+
* namespacing. Required for adapters that participate in `dependsOn`
|
|
449
|
+
* sort — error messages reference adapters by name.
|
|
450
|
+
*/
|
|
451
|
+
name: string;
|
|
452
|
+
version?: string;
|
|
453
|
+
requires?: {
|
|
454
|
+
kickjs?: string;
|
|
455
|
+
};
|
|
456
|
+
defaults?: Partial<TConfig>;
|
|
457
|
+
build(config: TConfig, ctx: BuildContext): Omit<AppAdapter, 'name'> & TExtra;
|
|
458
|
+
}
|
|
459
|
+
/**
|
|
460
|
+
* Async-config form of an adapter. Identical shape to `PluginAsyncOptions`
|
|
461
|
+
* but resolved during `beforeStart` (the earliest async hook in
|
|
462
|
+
* `AppAdapter`) — meaning `middleware()` and `contributors()` from the inner
|
|
463
|
+
* adapter are **not** picked up. Use the bare/`.scoped()` form when you need
|
|
464
|
+
* those.
|
|
465
|
+
*/
|
|
466
|
+
interface AdapterAsyncOptions<TConfig> {
|
|
467
|
+
inject?: ReadonlyArray<unknown>;
|
|
468
|
+
useFactory(...deps: any[]): TConfig | Promise<TConfig>;
|
|
469
|
+
}
|
|
470
|
+
/**
|
|
471
|
+
* Factory returned by {@link defineAdapter}. Same surface as
|
|
472
|
+
* {@link PluginFactory} (call / `.scoped()` / `.async()`) so adopters learn
|
|
473
|
+
* one mental model for both primitives. Returned instances carry both
|
|
474
|
+
* the standard {@link AppAdapter} contract and any `TExtra` extension
|
|
475
|
+
* methods the `build` function exposed.
|
|
476
|
+
*/
|
|
477
|
+
interface AdapterFactory<TConfig, TExtra = unknown> {
|
|
478
|
+
(config?: Partial<TConfig>): AppAdapter & TExtra;
|
|
479
|
+
scoped(scopeName: string, config?: Partial<TConfig>): AppAdapter & TExtra;
|
|
480
|
+
async(opts: AdapterAsyncOptions<TConfig>): AppAdapter;
|
|
481
|
+
readonly definition: Readonly<DefineAdapterOptions<TConfig, TExtra>>;
|
|
482
|
+
}
|
|
483
|
+
/**
|
|
484
|
+
* Build an {@link AppAdapter} factory from a typed definition. See
|
|
485
|
+
* `architecture.md` §21.3.4 for migration guidance — most first-party
|
|
486
|
+
* adapter packages collapse to a single `defineAdapter()` call after this
|
|
487
|
+
* lands.
|
|
488
|
+
*
|
|
489
|
+
* @example
|
|
490
|
+
* ```ts
|
|
491
|
+
* const TenantAdapter = defineAdapter<TenantConfig>({
|
|
492
|
+
* name: 'TenantAdapter',
|
|
493
|
+
* defaults: { strategy: 'header', required: true },
|
|
494
|
+
* build: (config) => ({
|
|
495
|
+
* middleware: () => [tenantResolverMiddleware(config)],
|
|
496
|
+
* beforeStart: ({ container }) => registerTenantFactory(container, config),
|
|
497
|
+
* }),
|
|
498
|
+
* })
|
|
499
|
+
*
|
|
500
|
+
* bootstrap({
|
|
501
|
+
* adapters: [
|
|
502
|
+
* TenantAdapter({ strategy: 'subdomain' }),
|
|
503
|
+
* TenantAdapter.scoped('shard-eu', { headerName: 'x-eu-tenant' }),
|
|
504
|
+
* ],
|
|
505
|
+
* })
|
|
506
|
+
* ```
|
|
507
|
+
*/
|
|
508
|
+
declare function defineAdapter<TConfig = Record<string, unknown>, TExtra = unknown>(options: DefineAdapterOptions<TConfig, TExtra>): AdapterFactory<TConfig, TExtra>;
|
|
509
|
+
//#endregion
|
|
510
|
+
export { CircuitOpenError as A, setClassMeta as B, ContributorCycleError as C, CircuitBreakerOptions as D, CircuitBreaker as E, getMethodMeta as F, setInMetaRecord as H, getMethodMetaOrUndefined as I, hasClassMeta as L, getClassMetaOrUndefined as M, getMetaMap as N, CircuitBreakerState as O, getMetaRecord as P, pushClassMeta as R, buildPipeline as S, MissingContributorError as T, setMethodMeta as U, setInMetaMap as V, runContributors as _, BuildContext as a, ContributorSource as b, PluginFactory as c, MissingMountDepError as d, MountCycleError as f, RunContributorsOptions as g, mountSort as h, defineAdapter as i, getClassMeta as j, CircuitBreakerStats as k, definePlugin as l, MountSortItem as m, AdapterFactory as n, DefinePluginOptions as o, MountKind as p, DefineAdapterOptions as r, PluginAsyncOptions as s, AdapterAsyncOptions as t, DuplicateMountNameError as u, BuildPipelineOptions as v, DuplicateContributorError as w, SourcedRegistration as x, ContributorPipeline as y, pushMethodMeta as z };
|
|
511
|
+
//# sourceMappingURL=index-DQyWtyp0.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-DQyWtyp0.d.mts","names":[],"sources":["../src/core/metadata.ts","../src/core/circuit-breaker.ts","../src/core/context-errors.ts","../src/core/contributor-pipeline.ts","../src/core/contributor-runner.ts","../src/core/mount-sort.ts","../src/core/define-plugin.ts","../src/core/define-adapter.ts"],"mappings":";;;;;;;;;;;;;;;;;;KAeK,OAAA,qBAA4B,cAAA;;iBAKjB,YAAA,GAAA,CAAgB,GAAA,EAAK,OAAA,EAAS,KAAA,EAAO,CAAA,EAAG,MAAA;;iBAKxC,aAAA,GAAA,CAAiB,GAAA,EAAK,OAAA,EAAS,KAAA,EAAO,CAAA,EAAG,MAAA,UAAgB,MAAA;AALzE;AAAA,iBAYgB,YAAA,GAAA,CAAgB,GAAA,EAAK,OAAA,EAAS,MAAA,UAAgB,QAAA,EAAU,CAAA,GAAI,CAAA;;iBAK5D,aAAA,GAAA,CAAiB,GAAA,EAAK,OAAA,EAAS,MAAA,UAAgB,MAAA,UAAgB,QAAA,EAAU,CAAA,GAAI,CAAA;;iBAK7E,YAAA,CAAa,GAAA,EAAK,OAAA,EAAS,MAAA;;iBAK3B,uBAAA,GAAA,CAA2B,GAAA,EAAK,OAAA,EAAS,MAAA,WAAiB,CAAA;;iBAK1D,wBAAA,GAAA,CACd,GAAA,EAAK,OAAA,EACL,MAAA,UACA,MAAA,WACC,CAAA;;iBAOa,aAAA,GAAA,CAAiB,GAAA,EAAK,OAAA,EAAS,MAAA,aAAmB,KAAA,EAAO,CAAA;AAtCzE;AAAA,iBA4CgB,cAAA,GAAA,CACd,GAAA,EAAK,OAAA,EACL,MAAA,UACA,MAAA,aACG,KAAA,EAAO,CAAA;;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