@forinda/kickjs 5.12.0 → 5.13.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 (129) hide show
  1. package/dist/{adapter-BRvrS9xR.d.mts → adapter-D1NzavIt.d.mts} +4 -4
  2. package/dist/{adapter-BRvrS9xR.d.mts.map → adapter-D1NzavIt.d.mts.map} +1 -1
  3. package/dist/{app-module-BE7hAASB.d.mts → app-module-iAA20Cc6.d.mts} +3 -3
  4. package/dist/{app-module-BE7hAASB.d.mts.map → app-module-iAA20Cc6.d.mts.map} +1 -1
  5. package/dist/application-CbRBh5Dd.mjs +12 -0
  6. package/dist/application-CbRBh5Dd.mjs.map +1 -0
  7. package/dist/{application-BNxhBgji.d.mts → application-ChL6ufgq.d.mts} +6 -6
  8. package/dist/application-ChL6ufgq.d.mts.map +1 -0
  9. package/dist/{bootstrap-qvftPBfr.d.mts → bootstrap-Cgt_j-0Q.d.mts} +2 -2
  10. package/dist/{bootstrap-qvftPBfr.d.mts.map → bootstrap-Cgt_j-0Q.d.mts.map} +1 -1
  11. package/dist/{bootstrap-DpnpCnL0.mjs → bootstrap-DK8o5euq.mjs} +3 -3
  12. package/dist/{bootstrap-DpnpCnL0.mjs.map → bootstrap-DK8o5euq.mjs.map} +1 -1
  13. package/dist/config/index.d.mts +1 -1
  14. package/dist/config/index.mjs +2 -2
  15. package/dist/{config-DF9KJwp8.mjs → config-CfIpCoJs.mjs} +3 -3
  16. package/dist/{config-DF9KJwp8.mjs.map → config-CfIpCoJs.mjs.map} +1 -1
  17. package/dist/{container-BZKeHc5X.d.mts → container-B51bkskE.d.mts} +2 -2
  18. package/dist/container-B51bkskE.d.mts.map +1 -0
  19. package/dist/container-CBeLvm_9.mjs +108 -0
  20. package/dist/container-CBeLvm_9.mjs.map +1 -0
  21. package/dist/{context-C2yPZ22U.d.mts → context-D7sGbb8E.d.mts} +98 -1
  22. package/dist/context-D7sGbb8E.d.mts.map +1 -0
  23. package/dist/context-DpIvcO8X.mjs +12 -0
  24. package/dist/context-DpIvcO8X.mjs.map +1 -0
  25. package/dist/{context-decorator-BYf8HdMl.d.mts → context-decorator-BzcOhlej.d.mts} +3 -3
  26. package/dist/{context-decorator-BYf8HdMl.d.mts.map → context-decorator-BzcOhlej.d.mts.map} +1 -1
  27. package/dist/core/adapter.d.mts +1 -1
  28. package/dist/core/adapter.mjs +1 -1
  29. package/dist/core/app-module.d.mts +1 -1
  30. package/dist/core/app-module.mjs +1 -1
  31. package/dist/core/cache.mjs +1 -1
  32. package/dist/core/container.d.mts +1 -1
  33. package/dist/core/container.mjs +2 -2
  34. package/dist/core/cron.mjs +2 -2
  35. package/dist/core/decorators.d.mts +1 -1
  36. package/dist/core/decorators.mjs +2 -2
  37. package/dist/core/errors.d.mts +2 -2
  38. package/dist/core/errors.mjs +2 -2
  39. package/dist/core/errors.mjs.map +1 -1
  40. package/dist/core/interfaces.d.mts +1 -1
  41. package/dist/core/interfaces.mjs +1 -1
  42. package/dist/core/logger.mjs +1 -1
  43. package/dist/core/path.mjs +1 -1
  44. package/dist/core/plugin.d.mts +1 -1
  45. package/dist/core/plugin.mjs +1 -1
  46. package/dist/core/reactivity.mjs +1 -1
  47. package/dist/{core-pTiSM6v2.mjs → core-Cs7Djz9w.mjs} +3 -3
  48. package/dist/{core-pTiSM6v2.mjs.map → core-Cs7Djz9w.mjs.map} +1 -1
  49. package/dist/cors-BfgqfLPd.d.mts.map +1 -1
  50. package/dist/csrf-DiK9zept.d.mts.map +1 -1
  51. package/dist/{decorators-BYi8lB37.d.mts → decorators-KbaPUBXd.d.mts} +8 -8
  52. package/dist/decorators-KbaPUBXd.d.mts.map +1 -0
  53. package/dist/{env-iO4nTPjc.mjs → env-B9_HjyB6.mjs} +3 -3
  54. package/dist/{env-iO4nTPjc.mjs.map → env-B9_HjyB6.mjs.map} +1 -1
  55. package/dist/{error-handler-Xud_3Lah.d.mts → error-handler-C4SG5o_i.d.mts} +6 -1
  56. package/dist/error-handler-C4SG5o_i.d.mts.map +1 -0
  57. package/dist/errors-DytV77Hb.d.mts +241 -0
  58. package/dist/errors-DytV77Hb.d.mts.map +1 -0
  59. package/dist/helmet-CaMbjzBG.d.mts.map +1 -1
  60. package/dist/http/application.d.mts +1 -1
  61. package/dist/http/application.mjs +2 -2
  62. package/dist/http/bootstrap.d.mts +1 -1
  63. package/dist/http/bootstrap.mjs +2 -2
  64. package/dist/http/context.d.mts +1 -1
  65. package/dist/http/context.mjs +2 -2
  66. package/dist/http/middleware/cors.mjs +1 -1
  67. package/dist/http/middleware/csrf.mjs +1 -1
  68. package/dist/http/middleware/error-handler.d.mts +1 -1
  69. package/dist/http/middleware/error-handler.mjs +2 -2
  70. package/dist/http/middleware/error-handler.mjs.map +1 -1
  71. package/dist/http/middleware/helmet.mjs +1 -1
  72. package/dist/http/middleware/rate-limit.mjs +1 -1
  73. package/dist/http/middleware/request-id.mjs +1 -1
  74. package/dist/http/middleware/request-logger.mjs +2 -2
  75. package/dist/http/middleware/session.mjs +1 -1
  76. package/dist/http/middleware/spa.d.mts +1 -1
  77. package/dist/http/middleware/spa.mjs +2 -2
  78. package/dist/http/middleware/upload.d.mts +1 -1
  79. package/dist/http/middleware/upload.mjs +1 -1
  80. package/dist/http/middleware/validate.mjs +2 -2
  81. package/dist/http/middleware/views.d.mts +1 -1
  82. package/dist/http/middleware/views.mjs +2 -2
  83. package/dist/http/query/index.mjs +2 -2
  84. package/dist/http/router-builder.d.mts +1 -1
  85. package/dist/http/router-builder.mjs +2 -2
  86. package/dist/{index-DM1PteZT.d.mts → index-BM32LMqZ.d.mts} +4 -4
  87. package/dist/{index-DM1PteZT.d.mts.map → index-BM32LMqZ.d.mts.map} +1 -1
  88. package/dist/{index-qZqR_Mxr.d.mts → index-BYLVLFA8.d.mts} +63 -7
  89. package/dist/index-BYLVLFA8.d.mts.map +1 -0
  90. package/dist/index.d.mts +19 -19
  91. package/dist/index.mjs +2 -2
  92. package/dist/index.mjs.map +1 -1
  93. package/dist/{interfaces-B50n7dwl.d.mts → interfaces-ClcFeDhd.d.mts} +20 -20
  94. package/dist/{interfaces-B50n7dwl.d.mts.map → interfaces-ClcFeDhd.d.mts.map} +1 -1
  95. package/dist/logger-SKhhzmU2.d.mts.map +1 -1
  96. package/dist/{metadata-PnPdY-2N.mjs → metadata-epuUfh0i.mjs} +2 -2
  97. package/dist/{metadata-PnPdY-2N.mjs.map → metadata-epuUfh0i.mjs.map} +1 -1
  98. package/dist/{plugin-CyoGnRbq.d.mts → plugin-DG_jFA6h.d.mts} +5 -5
  99. package/dist/{plugin-CyoGnRbq.d.mts.map → plugin-DG_jFA6h.d.mts.map} +1 -1
  100. package/dist/{query-bbA6sG2R.mjs → query-BXkCd9cg.mjs} +2 -2
  101. package/dist/{query-bbA6sG2R.mjs.map → query-BXkCd9cg.mjs.map} +1 -1
  102. package/dist/rate-limit-DUwoICtI.d.mts.map +1 -1
  103. package/dist/request-id-BgglvZHN.d.mts.map +1 -1
  104. package/dist/request-logger-CWHbAzTE.d.mts.map +1 -1
  105. package/dist/{router-builder-R6dyZ-A3.d.mts → router-builder-CSAOc9MR.d.mts} +2 -2
  106. package/dist/{router-builder-R6dyZ-A3.d.mts.map → router-builder-CSAOc9MR.d.mts.map} +1 -1
  107. package/dist/session-N0hActOO.d.mts.map +1 -1
  108. package/dist/{spa-DFxiK7jQ.d.mts → spa-DNOAvuFy.d.mts} +2 -2
  109. package/dist/{spa-DFxiK7jQ.d.mts.map → spa-DNOAvuFy.d.mts.map} +1 -1
  110. package/dist/{upload-5goxbO9A.d.mts → upload-7RRWSKkI.d.mts} +2 -2
  111. package/dist/{upload-5goxbO9A.d.mts.map → upload-7RRWSKkI.d.mts.map} +1 -1
  112. package/dist/validate-HwAyWTwH.d.mts.map +1 -1
  113. package/dist/{views-BvKu3uGv.d.mts → views-srW0E4Ll.d.mts} +4 -4
  114. package/dist/{views-BvKu3uGv.d.mts.map → views-srW0E4Ll.d.mts.map} +1 -1
  115. package/package.json +9 -22
  116. package/dist/application-BAVtRjLt.mjs +0 -12
  117. package/dist/application-BAVtRjLt.mjs.map +0 -1
  118. package/dist/application-BNxhBgji.d.mts.map +0 -1
  119. package/dist/container-BZKeHc5X.d.mts.map +0 -1
  120. package/dist/container-Dwl5vSSQ.mjs +0 -12
  121. package/dist/container-Dwl5vSSQ.mjs.map +0 -1
  122. package/dist/context-C2yPZ22U.d.mts.map +0 -1
  123. package/dist/context-Cm6r9rSR.mjs +0 -12
  124. package/dist/context-Cm6r9rSR.mjs.map +0 -1
  125. package/dist/decorators-BYi8lB37.d.mts.map +0 -1
  126. package/dist/error-handler-Xud_3Lah.d.mts.map +0 -1
  127. package/dist/errors-uaHCeXRz.d.mts +0 -81
  128. package/dist/errors-uaHCeXRz.d.mts.map +0 -1
  129. package/dist/index-qZqR_Mxr.d.mts.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"context-Cm6r9rSR.mjs","names":[],"sources":["../src/http/request-store.ts","../src/http/context.ts"],"sourcesContent":["import { AsyncLocalStorage } from 'node:async_hooks'\nimport type { MetaValue } from '../core/execution-context'\n\n/** Per-request storage for REQUEST-scoped DI and request context propagation */\nexport interface RequestStore {\n /** Unique request identifier */\n requestId: string\n /**\n * Per-request singleton cache for REQUEST-scoped services. Keys are\n * heterogeneous (class constructors, `InjectionToken` objects, raw\n * strings), so the map type stays `Map<any, any>`.\n */\n instances: Map<any, any>\n /**\n * Per-request key/value bag. Canonical backing store for\n * `RequestContext.set/get` and the Context Contributor pipeline (#107)\n * since Phase 3. Anything written here is visible to every concrete\n * execution context constructed for the same request, regardless of\n * which middleware/contributor wrote it.\n *\n * Keys are constrained to `string` per the locked decision in\n * `architecture.md` §20.12 (#4); the value type is `unknown` because\n * the concrete shape at each key is determined by the consumer's\n * `ContextMeta` augmentation, not by the store itself.\n *\n * Prefer the {@link getRequestValue} helper over reaching into this\n * map directly — it threads the augmented `ContextMeta` shape through\n * `MetaValue<K>` so consumers get typed reads without an `as` cast.\n * Writes should flow through `ctx.set(key, value)` or a Context\n * Contributor's return value — see the `setRequestValue` note below\n * for why this package intentionally does NOT ship a service-level\n * write helper.\n */\n values: Map<string, unknown>\n}\n\n/** AsyncLocalStorage instance shared across the framework */\nexport const requestStore = new AsyncLocalStorage<RequestStore>()\n\n/**\n * Get the current request store. Throws if called outside a request context.\n * Used by the Container to resolve REQUEST-scoped dependencies.\n */\nexport function getRequestStore(): RequestStore {\n const store = requestStore.getStore()\n if (!store) {\n throw new Error(\n 'No active request context. REQUEST-scoped services can only be resolved during an HTTP request.',\n )\n }\n return store\n}\n\n/**\n * Read a per-request `ContextMeta`-keyed value from outside a controller\n * (services, repositories, anywhere with no `ctx` reference). Returns\n * the augmented type for the key — `MetaValue<K>` — so consumers get the\n * same static safety as `ctx.get(key)` without holding the context.\n *\n * Returns `undefined` outside an active request frame (background jobs,\n * startup code, tests without `requestScopeMiddleware()`) — the helper\n * is intentionally null-tolerant so calling it from a service that\n * runs in both request and non-request paths doesn't throw.\n *\n * @example\n * ```ts\n * declare module '@forinda/kickjs' {\n * interface ContextMeta { tenant: { id: string; name: string } }\n * }\n *\n * @Service()\n * class AuditService {\n * log(action: string) {\n * const tenant = getRequestValue('tenant') // typed: { id; name } | undefined\n * db.audit.insert({ action, tenantId: tenant?.id })\n * }\n * }\n * ```\n */\nexport function getRequestValue<K extends string>(key: K): MetaValue<K> | undefined {\n return requestStore.getStore()?.values.get(key) as MetaValue<K> | undefined\n}\n\n// Intentionally NO `setRequestValue` export.\n//\n// Writes are deliberately context-scoped — only the controlled write\n// surfaces should mutate the per-request Map:\n//\n// 1. A Context Contributor's `resolve()` / `onError()` return value\n// (the runner does `ctx.set(reg.key, value)` on the contributor's\n// behalf). This is the canonical way to populate a key.\n// 2. A controller / middleware / contributor that holds a\n// `RequestContext` instance can call `ctx.set(key, value)`\n// directly. The write is auditable inline at the call site.\n//\n// Letting arbitrary services reach in and mutate the store from\n// anywhere produces \"spooky action at a distance\" — keys appear in\n// the request bag without an obvious source, and tracing which\n// service polluted what becomes a grep exercise. Services that need\n// to publish per-request state should return the value to the caller\n// (controller or contributor) and let *that* layer write it via\n// `ctx.set`. If a future need genuinely requires a service-level\n// write surface, expose a narrow function (`recordTrace`,\n// `markStartTime`) on a service that captures the side effect, not a\n// generic `setRequestValue`.\n","/// <reference types=\"multer\" />\nimport type { Request, Response, NextFunction } from 'express'\nimport { type ExecutionContext, type MetaValue } from '../core/execution-context'\nimport { requestStore } from './request-store'\nimport {\n parseQuery,\n type QueryFieldConfig,\n type PaginatedResponse,\n type TypedParsedQuery,\n} from './query'\n\n/**\n * Recursively marks every property of `T` as `readonly`. Preserves\n * `Function`, `Date`, and `RegExp` unchanged, and converts `Map` / `Set`\n * to `ReadonlyMap` / `ReadonlySet` so their mutating methods (`set`,\n * `delete`, `add`, `clear`) are removed from the public surface.\n * Tuples keep their positional element types — only their per-element\n * mutability is locked.\n *\n * Exposed as a utility for adopters who want to opt into compile-time\n * sealing of their own shapes. **No longer applied to\n * `RequestContext.{body,params,query,headers,file,files}`** — that\n * broke TS narrowing / discriminated-union drilldowns on typed request\n * payloads. Runtime read-only enforcement now lives in\n * {@link makeReadOnlyProxy} (dev-only Proxy that warns on writes,\n * no-op in production).\n *\n * Type-only. No runtime cost. `DeepReadonly<any>` is `any` (TS\n * distributes conditional types over `any`).\n */\nexport type DeepReadonly<T> = T extends (...args: never[]) => unknown\n ? T\n : T extends Date | RegExp\n ? T\n : T extends Map<infer K, infer V>\n ? ReadonlyMap<DeepReadonly<K>, DeepReadonly<V>>\n : T extends Set<infer V>\n ? ReadonlySet<DeepReadonly<V>>\n : T extends readonly (infer U)[]\n ? // Distinguish a regular array from a tuple. A regular `T[]` widens\n // its `length` to `number`; a tuple's `length` is a literal\n // (e.g. `2`). The literal branch maps over `keyof T` so each\n // positional slot keeps its own type — `DeepReadonly<[1, 2]>` →\n // `readonly [1, 2]`, not `readonly (1 | 2)[]`.\n number extends T['length']\n ? ReadonlyArray<DeepReadonly<U>>\n : { readonly [K in keyof T]: DeepReadonly<T[K]> }\n : T extends object\n ? { readonly [K in keyof T]: DeepReadonly<T[K]> }\n : T\n\n/**\n * Re-export the augmentable {@link ContextMeta} registry from core/.\n * Declared in `core/execution-context.ts` so non-HTTP transports\n * (WS/queue/cron, V2) share one declaration site. Apps still augment\n * via the canonical `declare module '@forinda/kickjs'` form.\n */\nexport type { ContextMeta } from '../core/execution-context'\n\n/**\n * Symbol key under which the per-request `AbortController` backing\n * `RequestContext.signal` is cached on the Express `req` object.\n * Shared across every `RequestContext` instance built for the same\n * request (router-builder constructs separate wrappers for\n * middleware, the contributor pipeline, and the main handler — they\n * all need the same signal).\n */\nconst signalControllerKey = Symbol.for('kickjs.requestContext.signalController')\n\n/**\n * Symbol key under which per-target read-only Proxy wrappers are\n * cached on the Express `req` object. Used by {@link makeReadOnlyProxy}\n * so repeat access of `ctx.body` / `ctx.params` / etc. returns the same\n * Proxy instance (cheap, and stable under `===` for adopters comparing\n * values across middleware).\n */\nconst readOnlyProxyCacheKey = Symbol.for('kickjs.requestContext.readOnlyProxyCache')\n\n/**\n * `true` iff `v` is a plain object (`{}` / `Object.create(null)`) or an\n * array — the two shapes JSON.parse / Express body-parser produce and\n * the only ones the read-only Proxy recurses into. Class instances,\n * `Date`, `RegExp`, `Map`, `Set`, `Buffer`, streams, and functions\n * pass through unwrapped so their method dispatch and `instanceof`\n * checks keep working.\n */\nfunction isPlainObjectOrArray(v: unknown): v is object {\n if (v === null || typeof v !== 'object') return false\n if (Array.isArray(v)) return true\n const proto = Object.getPrototypeOf(v)\n return proto === Object.prototype || proto === null\n}\n\n/**\n * In dev, wrap `target` in a `Proxy` whose `set` / `deleteProperty` /\n * `defineProperty` traps log a warning and otherwise leave the\n * underlying object untouched. A `get` trap recursively wraps nested\n * plain objects and arrays on access, so deep mutations\n * (`ctx.body.user.name = 'x'`, `ctx.files[0].fieldname = 'y'`,\n * `ctx.body.tags.push(...)`) all surface a warning — matching the\n * prior `DeepReadonly<T>` contract at runtime instead of at the type\n * level. In production (`process.env.NODE_ENV === 'production'`) the\n * proxy is bypassed entirely and `target` is returned as-is so the\n * hot path stays zero-cost.\n *\n * Why a Proxy instead of `DeepReadonly<T>` at the type level: the\n * recursive conditional type interfered with TS narrowing (notably\n * discriminated unions on `ctx.body`) and slowed type-checking on\n * deeply-nested Zod-inferred shapes. Compile-time sealing is gone;\n * runtime warning catches the same class of bug during dev and tests.\n *\n * Trap returns `true` so strict-mode call sites (which is all of them\n * — ES modules are strict) don't *throw* on assignment — they just\n * get a warning + the underlying value stays untouched. Adopters\n * discover the violation when the subsequent read returns the\n * original value, not the one they \"set\".\n *\n * Targets are cached per-`req` under {@link readOnlyProxyCacheKey} so\n * (1) repeat getter access returns the same proxy (`ctx.body ===\n * ctx.body`, `ctx.body.user === ctx.body.user`); and (2) cyclic refs\n * (`body.self = body`) terminate via the cache hit on the second\n * visit. Primitives, `null`, and non-plain values pass through.\n */\nfunction makeReadOnlyProxy<T>(target: T, req: object, label: string): T {\n if (process.env.NODE_ENV === 'production') return target\n if (!isPlainObjectOrArray(target)) return target\n\n type Cache = WeakMap<object, unknown>\n const reqObj = req as Record<symbol, Cache | undefined>\n let cache = reqObj[readOnlyProxyCacheKey]\n if (!cache) {\n cache = new WeakMap()\n reqObj[readOnlyProxyCacheKey] = cache\n }\n const targetObj = target as unknown as object\n const cached = cache.get(targetObj)\n if (cached) return cached as T\n\n const warnWrite = (verb: string, prop: PropertyKey) => {\n console.warn(\n `[kickjs] Attempted to ${verb} \\`ctx.${label}.${String(prop)}\\` — ` +\n `request data is read-only. ` +\n `Stash computed values via \\`ctx.set('key', value)\\` or a Context Contributor, ` +\n `or reach \\`ctx.req.${label}\\` if you genuinely need the raw mutable handle.`,\n )\n }\n\n const proxy = new Proxy(targetObj, {\n get(t, prop, receiver) {\n const value = Reflect.get(t, prop, receiver)\n // Recurse only into plain objects / arrays. Functions (incl.\n // array methods like `.push`) pass through with `receiver` as\n // their `this`, so internal `this[i] = x` writes still hit the\n // `set` trap and warn.\n if (isPlainObjectOrArray(value)) {\n return makeReadOnlyProxy(value, req, `${label}.${String(prop)}`)\n }\n return value\n },\n set(_t, prop) {\n warnWrite('assign', prop)\n return true\n },\n deleteProperty(_t, prop) {\n warnWrite('delete', prop)\n return true\n },\n defineProperty(_t, prop) {\n warnWrite('Object.defineProperty on', prop)\n return true\n },\n })\n cache.set(targetObj, proxy)\n return proxy as T\n}\n\n/**\n * The shape of a single route entry in `KickRoutes`. Generated by\n * `kick typegen` and consumed via the `Ctx<T>` helper. Each field is\n * `unknown` by default and is filled in as the typegen learns more\n * about the route (URL params from the path, body/query from validation\n * schemas, etc.).\n */\nexport interface RouteShape {\n params?: unknown\n body?: unknown\n query?: unknown\n response?: unknown\n}\n\n/**\n * Unified request/response abstraction passed to every controller method.\n * Shields handlers from raw Express objects and provides convenience methods.\n *\n * Implements {@link ExecutionContext} so the transport-agnostic Context\n * Contributor pipeline (#107) can run against this concrete HTTP context\n * the same way it will run against future WS / queue / cron contexts.\n */\nexport class RequestContext<TBody = any, TParams = any, TQuery = any> implements ExecutionContext {\n constructor(\n public readonly req: Request,\n public readonly res: Response,\n public readonly next: NextFunction,\n ) {}\n\n /**\n * Read-side accessor for the per-request metadata map.\n *\n * Returns the AsyncLocalStorage map (`requestStore.getStore().values`)\n * shared with the Context Contributor pipeline when an ALS frame is\n * active. Returns `null` outside any frame — read-side callers\n * (`ctx.get`, `ctx.user`, `ctx.tenantId`, `ctx.roles`) treat that as\n * \"no metadata\" and fall through to their `req.*` defaults. Reads\n * never throw because outside an ALS frame nobody could have written\n * via `ctx.set` anyway, so an empty answer is the truthful one.\n */\n private metadataReadOnly(): Map<string, any> | null {\n return (requestStore.getStore()?.values as Map<string, any> | undefined) ?? null\n }\n\n /**\n * Write-side accessor for the per-request metadata map.\n *\n * Returns the same map as {@link metadataReadOnly} when an ALS frame\n * is active. Throws otherwise — writing to a fallback map outside\n * the ALS frame would silently lose data because other call sites\n * (downstream contributors, request-logger, etc.) read from the\n * canonical store and would never see it. Mount\n * `requestScopeMiddleware()` (Application does this for you in\n * `'auto'` mode) or wrap your test setup in\n * `requestStore.run({...}, () => …)` to fix.\n */\n private metadataForWrite(): Map<string, any> {\n const store = requestStore.getStore()\n if (store) return store.values as Map<string, any>\n throw new Error(\n 'RequestContext.set called outside an AsyncLocalStorage frame. ' +\n 'Mount requestScopeMiddleware() before constructing RequestContext, ' +\n 'or wrap test setup in requestStore.run({ requestId, instances: new Map(), values: new Map() }, () => ...).',\n )\n }\n\n // ── Request Data ────────────────────────────────────────────────────\n\n /**\n * Parsed request body. Wrapped in a dev-only Proxy that warns when\n * adopters try to mutate Zod-validated payloads in place — compute\n * new values and stash them via `ctx.set('key', value)` or a Context\n * Contributor instead. Reach for `ctx.req.body` if you genuinely\n * need the raw, mutable Express handle (rare).\n *\n * In production the Proxy is bypassed and `this.req.body` is\n * returned as-is — no runtime cost on the hot path.\n */\n get body(): TBody {\n return makeReadOnlyProxy<TBody>(this.req.body, this.req, 'body')\n }\n\n /** Path parameters parsed from the route — read-only, see {@link body}. */\n get params(): TParams {\n return makeReadOnlyProxy<TParams>(this.req.params as TParams, this.req, 'params')\n }\n\n /** Parsed query string — read-only, see {@link body}. */\n get query(): TQuery {\n return makeReadOnlyProxy<TQuery>(this.req.query as TQuery, this.req, 'query')\n }\n\n /** Inbound HTTP headers — read-only, see {@link body}. */\n get headers(): Request['headers'] {\n return makeReadOnlyProxy<Request['headers']>(this.req.headers, this.req, 'headers')\n }\n\n get requestId(): string | undefined {\n return (this.req as any).requestId ?? (this.req.headers['x-request-id'] as string | undefined)\n }\n\n /**\n * `AbortSignal` that fires when the underlying HTTP request is\n * closed — either because the client disconnected before the\n * response was sent, or because Node's socket-close event ran\n * after a normal response. Multiple `RequestContext` wrappers for\n * the same request (router-builder constructs one per\n * middleware/contributor pipeline / main handler) share a single\n * `AbortController` cached on the underlying `req` object, so the\n * signal is stable across the request lifecycle.\n *\n * Thread it through anything that takes an `AbortSignal` so the\n * work cancels as soon as the client gives up — e.g. a kickjs-db\n * relational query:\n *\n * ```ts\n * @Get('/:id/full')\n * async show(ctx: RequestContext) {\n * const row = await this.repo.findFullById(ctx.params.id, ctx.signal)\n * if (!row) return ctx.notFound()\n * ctx.json(row)\n * }\n * ```\n *\n * The repo passes `signal` to `db.query.<table>.findUnique({ signal })`;\n * if the client disconnects mid-flight, the in-flight query rejects\n * with `RelationalQueryCancelledError` instead of consuming the\n * connection until completion.\n *\n * Implementation note — both `req.on('close')` and `res.on('close')`\n * are wired so the signal aborts regardless of whether the close\n * event lands on the request stream or the response stream first.\n * Subsequent fires are no-ops (`AbortController.abort()` is\n * idempotent).\n */\n get signal(): AbortSignal {\n const req = this.req as Request & { [signalControllerKey]?: AbortController }\n const cached = req[signalControllerKey]\n if (cached) return cached.signal\n\n const ctrl = new AbortController()\n req[signalControllerKey] = ctrl\n const abort = () => ctrl.abort('request closed')\n this.req.once('close', abort)\n this.res.once('close', abort)\n return ctrl.signal\n }\n\n /** Session data (requires session middleware) */\n get session(): any {\n return (this.req as any).session\n }\n\n /**\n * The authenticated user set by AuthAdapter.\n * Reads from the per-request metadata store first (`ctx.set('user', ...)`),\n * then falls back to `req.user` (set directly by AuthAdapter middleware).\n *\n * Extend the `AuthUser` interface via module augmentation in `@forinda/kickjs-auth`\n * to get full typing.\n *\n * @example\n * ```ts\n * @Get('/me')\n * @Authenticated()\n * getProfile(ctx: RequestContext) {\n * const user = ctx.user\n * if (!user) return ctx.notFound()\n * return ctx.json({ user })\n * }\n * ```\n */\n get user(): MetaValue<'user', Record<string, any>> | undefined {\n return this.metadataReadOnly()?.get('user') ?? (this.req as any).user\n }\n\n /**\n * Tenant identifier for multi-tenant apps. Reads `user.tenantId` —\n * populated either by `AuthAdapter.testMode({ tenantId })`, a tenant\n * resolver middleware, or manually on the strategy's `mapPayload`.\n *\n * Augment `AuthUser` (or `ContextMeta['user']`) to widen the return\n * type if your user shape guarantees a non-`string | undefined` id.\n */\n get tenantId(): string | undefined {\n const u = this.user as Record<string, any> | undefined\n return u?.tenantId\n }\n\n /**\n * Effective role list for the current user. Prefers `user.tenantRoles`\n * (populated by `AuthAdapterOptions.roleResolver` under a tenant) and\n * falls back to `user.roles`. Returns an empty array when the user is\n * absent or the shape has neither field.\n */\n get roles(): string[] {\n const u = this.user as Record<string, any> | undefined\n return u?.tenantRoles ?? u?.roles ?? []\n }\n\n // ── Query String Parsing ───────────────────────────────────────────\n\n /**\n * Parse the request query string into structured filters, sort, pagination, and search.\n * Pass the result to an ORM query builder adapter (Drizzle, Prisma, Sequelize, etc.).\n *\n * Generic over the field config: when passed an inline literal (or\n * `as const`), `filters[].field` and `sort[].field` are narrowed to\n * the exact whitelisted field names. Pass nothing or a non-literal\n * config and you get the loose `string` fallback.\n *\n * @param fieldConfig - Optional whitelist for filterable, sortable, and searchable fields\n *\n * @example\n * ```ts\n * @Get('/')\n * async list(ctx: RequestContext) {\n * const parsed = ctx.qs({\n * filterable: ['status', 'priority'],\n * sortable: ['createdAt', 'title'],\n * } as const)\n * parsed.filters[0].field // typed as 'status' | 'priority'\n * parsed.sort[0].field // typed as 'createdAt' | 'title'\n * }\n * ```\n */\n qs<TConfig extends QueryFieldConfig | undefined = undefined>(\n fieldConfig?: TConfig,\n ): TypedParsedQuery<TConfig> {\n return parseQuery<TConfig>(this.req.query as Record<string, any>, fieldConfig)\n }\n\n // ── File Uploads ────────────────────────────────────────────────────\n\n /**\n * Single uploaded file (requires `@FileUpload({ mode: 'single' })`).\n * Wrapped in a dev-only Proxy that warns on mutation — see {@link body}.\n * File metadata is set by the upload middleware and shouldn't be\n * mutated downstream.\n */\n get file(): Express.Multer.File | undefined {\n const f = this.req.file\n return f ? makeReadOnlyProxy<Express.Multer.File>(f, this.req, 'file') : undefined\n }\n\n /**\n * Array of uploaded files (requires `@FileUpload({ mode: 'array' })`).\n * The array (and each entry in dev) is wrapped in a read-only Proxy\n * that warns on `push`/`pop` and per-file mutation. Use\n * `ctx.req.files` if you genuinely need the mutable Express handle.\n */\n get files(): Express.Multer.File[] | undefined {\n // multer's `Request['files']` is a union — array (mode: 'array' /\n // 'any') or `{ [fieldname]: File[] }` (mode: 'fields'). The\n // `@FileUpload({ mode: 'array' })` decorator only sets the array\n // shape, but `Request['files']` is the broad union. Narrow back to\n // `File[]` here for the common-case getter; adopters using\n // `mode: 'fields'` can read `ctx.req.files` directly for the\n // dictionary shape.\n const f = this.req.files\n if (!Array.isArray(f)) return undefined\n return makeReadOnlyProxy<Express.Multer.File[]>(f, this.req, 'files')\n }\n\n // ── Metadata Store ──────────────────────────────────────────────────\n\n /**\n * Read a value from the per-request metadata store.\n *\n * When `ContextMeta` has been augmented with a matching key, the return\n * type is inferred automatically. For ad-hoc keys, pass a generic:\n * `ctx.get<MyType>('custom')`.\n */\n get<K extends string>(key: K): MetaValue<K> | undefined {\n return this.metadataReadOnly()?.get(key) as MetaValue<K> | undefined\n }\n\n /**\n * Write a value to the per-request metadata store. Throws when no\n * AsyncLocalStorage frame is active — see {@link metadataForWrite}\n * for why a silent fallback is the wrong default.\n */\n set<K extends string>(key: K, value: MetaValue<K>): void {\n this.metadataForWrite().set(key, value)\n }\n\n // ── Response Helpers ────────────────────────────────────────────────\n\n json(data: any, status = 200) {\n return this.res.status(status).json(data)\n }\n\n created(data: any) {\n return this.res.status(201).json(data)\n }\n\n noContent() {\n return this.res.status(204).end()\n }\n\n notFound(message = 'Not Found') {\n return this.res.status(404).json({ message })\n }\n\n badRequest(message: string) {\n return this.res.status(400).json({ message })\n }\n\n html(content: string, status = 200) {\n return this.res.status(status).type('html').send(content)\n }\n\n download(buffer: Buffer, filename: string, contentType = 'application/octet-stream') {\n this.res.setHeader('Content-Disposition', `attachment; filename=\"${filename}\"`)\n this.res.setHeader('Content-Type', contentType)\n return this.res.send(buffer)\n }\n\n /**\n * Render a template using the registered view engine (EJS, Pug, Handlebars, etc.).\n * Requires a ViewAdapter to be configured in bootstrap().\n *\n * @param template - Template name (without extension, relative to viewsDir)\n * @param data - Data to pass to the template\n *\n * @example\n * ```ts\n * ctx.render('dashboard', { user, title: 'Dashboard' })\n * ctx.render('emails/welcome', { name: 'Alice' })\n * ```\n */\n render(template: string, data: Record<string, any> = {}) {\n return this.res.render(template, data)\n }\n\n /**\n * Parse query params and return a standardized paginated response.\n * Calls `ctx.qs()` internally, then wraps your data with pagination meta.\n *\n * @param fetcher - Async function that receives ParsedQuery and returns `{ data, total }`\n * @param fieldConfig - Optional whitelist for filterable, sortable, searchable fields\n *\n * @example\n * ```ts\n * @Get('/')\n * async list(ctx: RequestContext) {\n * return ctx.paginate(\n * async (parsed) => {\n * const data = await db.select().from(users)\n * .where(query.where).limit(parsed.pagination.limit)\n * .offset(parsed.pagination.offset).all()\n * const total = await db.select({ count: count() }).from(users).get()\n * return { data, total: total?.count ?? 0 }\n * },\n * { filterable: ['name', 'role'], sortable: ['createdAt'] },\n * )\n * }\n * ```\n */\n async paginate<T, TConfig extends QueryFieldConfig | undefined = undefined>(\n fetcher: (parsed: TypedParsedQuery<TConfig>) => Promise<{ data: T[]; total: number }>,\n fieldConfig?: TConfig,\n ) {\n const parsed = this.qs<TConfig>(fieldConfig)\n const { data, total } = await fetcher(parsed)\n const { page, limit } = parsed.pagination\n const totalPages = Math.ceil(total / limit) || 1\n\n const response: PaginatedResponse<T> = {\n data,\n meta: {\n page,\n limit,\n total,\n totalPages,\n hasNext: page < totalPages,\n hasPrev: page > 1,\n },\n }\n\n return this.json(response)\n }\n\n // ── Server-Sent Events ──────────────────────────────────────────────\n\n /**\n * Start an SSE (Server-Sent Events) stream.\n * Sets the correct headers and returns helpers to send events.\n *\n * @example\n * ```ts\n * @Get('/events')\n * async stream(ctx: RequestContext) {\n * const sse = ctx.sse()\n *\n * const interval = setInterval(() => {\n * sse.send({ time: new Date().toISOString() }, 'tick')\n * }, 1000)\n *\n * sse.onClose(() => clearInterval(interval))\n * }\n * ```\n */\n sse() {\n this.res.writeHead(200, {\n 'Content-Type': 'text/event-stream',\n 'Cache-Control': 'no-cache',\n Connection: 'keep-alive',\n 'X-Accel-Buffering': 'no',\n })\n this.res.flushHeaders()\n\n const closeCallbacks: Array<() => void> = []\n\n this.req.on('close', () => {\n for (const cb of closeCallbacks) cb()\n })\n\n return {\n /** Send an SSE event with optional event name and id */\n send: (data: any, event?: string, id?: string) => {\n if (id) this.res.write(`id: ${id}\\n`)\n if (event) this.res.write(`event: ${event}\\n`)\n this.res.write(`data: ${JSON.stringify(data)}\\n\\n`)\n },\n /** Send a comment (keeps connection alive) */\n comment: (text: string) => {\n this.res.write(`: ${text}\\n\\n`)\n },\n /** Register a callback when the client disconnects */\n onClose: (fn: () => void) => {\n closeCallbacks.push(fn)\n },\n /** End the SSE stream */\n close: () => {\n this.res.end()\n },\n }\n }\n}\n\n/**\n * Short alias for `RequestContext` parameterised by a route shape.\n *\n * Use with `kick typegen`'s generated `KickRoutes` namespace for\n * fully-typed `ctx.params`, `ctx.body`, and `ctx.query`. Metadata\n * typing (`ctx.get()`, `ctx.set()`, `ctx.user`) comes from\n * `ContextMeta` augmentation and works on all `RequestContext` instances.\n *\n * @example\n * ```ts\n * @Get('/:id')\n * getUser(ctx: Ctx<KickRoutes.UserController['getUser']>) {\n * ctx.params.id // typed from RouteShape\n * ctx.body // typed from RouteShape\n * ctx.user // typed from ContextMeta\n * ctx.get('tenant') // typed from ContextMeta\n * }\n * ```\n */\nexport type Ctx<TRoute extends RouteShape = RouteShape> = RequestContext<\n TRoute extends { body: infer B } ? B : any,\n TRoute extends { params: infer P } ? P : any,\n TRoute extends { query: infer Q } ? Q : any\n>\n\n/**\n * Global ambient registry of typed routes, populated by `kick typegen`.\n *\n * Each interface inside `KickRoutes` corresponds to a controller class;\n * each property is one route method on that controller. The values\n * conform to `RouteShape`.\n *\n * Empty by default — declarations come from `.kickjs/types/routes.d.ts`\n * generated alongside the rest of the typegen output.\n */\ndeclare global {\n // eslint-disable-next-line @typescript-eslint/no-namespace\n namespace KickRoutes {}\n}\n"],"mappings":";;;;;;;;;;kGAqCA,MAAa,a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AAIlD;;iBAiNgB,WAAA,mBAA8B,IAAA,gBAAA,CAC5C,IAAA,EAAM,CAAA,GACL,CAAA;EAAM,OAAA,IAAW,SAAA,CAAU,YAAA,CAAa,CAAA;AAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"error-handler-Xud_3Lah.d.mts","names":[],"sources":["../src/http/middleware/error-handler.ts"],"mappings":";;;;;iBAMgB,eAAA,CAAA,IACN,IAAA,EAAM,OAAA,EAAS,GAAA,EAAK,QAAA,EAAU,KAAA,EAAO,YAAA;AAD/C;;;;;;;;;;AAAA,iBAgBgB,YAAA,CAAA,IAEN,GAAA,OAAU,GAAA,EAAK,OAAA,EAAS,GAAA,EAAK,QAAA,EAAU,KAAA,EAAO,YAAA,KAAY,QAAA,MAAA,MAAA"}
@@ -1,81 +0,0 @@
1
-
2
- //#region src/core/errors.d.ts
3
- /**
4
- * Standard HTTP status codes as a const enum.
5
- * Use instead of raw numbers for readability and type safety.
6
- *
7
- * @example
8
- * ```ts
9
- * throw new HttpException(HttpStatus.NOT_FOUND, 'User not found')
10
- * ctx.res.status(HttpStatus.CREATED).json(data)
11
- * ```
12
- */
13
- declare const HttpStatus: {
14
- readonly OK: 200;
15
- readonly CREATED: 201;
16
- readonly ACCEPTED: 202;
17
- readonly NO_CONTENT: 204;
18
- readonly MOVED_PERMANENTLY: 301;
19
- readonly FOUND: 302;
20
- readonly NOT_MODIFIED: 304;
21
- readonly TEMPORARY_REDIRECT: 307;
22
- readonly PERMANENT_REDIRECT: 308;
23
- readonly BAD_REQUEST: 400;
24
- readonly UNAUTHORIZED: 401;
25
- readonly PAYMENT_REQUIRED: 402;
26
- readonly FORBIDDEN: 403;
27
- readonly NOT_FOUND: 404;
28
- readonly METHOD_NOT_ALLOWED: 405;
29
- readonly NOT_ACCEPTABLE: 406;
30
- readonly CONFLICT: 409;
31
- readonly GONE: 410;
32
- readonly UNPROCESSABLE_ENTITY: 422;
33
- readonly TOO_MANY_REQUESTS: 429;
34
- readonly INTERNAL_SERVER_ERROR: 500;
35
- readonly NOT_IMPLEMENTED: 501;
36
- readonly BAD_GATEWAY: 502;
37
- readonly SERVICE_UNAVAILABLE: 503;
38
- readonly GATEWAY_TIMEOUT: 504;
39
- };
40
- type HttpStatusCode = (typeof HttpStatus)[keyof typeof HttpStatus];
41
- /** Validation error detail — shape used by `unprocessable()` and `fromZodError()`. */
42
- interface ValidationError {
43
- field: string;
44
- message: string;
45
- code?: string;
46
- }
47
- /**
48
- * Typed HTTP exception with status code, free-form details, and optional
49
- * response headers. Provides static factory methods for common HTTP errors.
50
- *
51
- * `details` is intentionally typed as `unknown` — it serializes straight into
52
- * the response body's `errors` field, so any JSON-compatible shape works
53
- * (string, object, array of mixed values, ValidationError[]).
54
- *
55
- * `headers` are merged into the response by the global error handler so
56
- * spec-mandated headers (Retry-After, WWW-Authenticate, Allow, Location)
57
- * stay on the exception, not on ad-hoc try/catch chains.
58
- */
59
- declare class HttpException extends Error {
60
- readonly status: number;
61
- readonly details?: unknown | undefined;
62
- readonly headers?: Record<string, string> | undefined;
63
- constructor(status: number, message: string, details?: unknown | undefined, headers?: Record<string, string> | undefined);
64
- /** Return a new exception with `headers` shallow-merged onto this one. */
65
- withHeaders(headers: Record<string, string>): HttpException;
66
- /** Create from a Zod error */
67
- static fromZodError(error: any, message?: string): HttpException;
68
- static badRequest(message?: string): HttpException;
69
- static unauthorized(message?: string, wwwAuthenticate?: string): HttpException;
70
- static forbidden(message?: string): HttpException;
71
- static notFound(message?: string): HttpException;
72
- static methodNotAllowed(allowedMethods: string[], message?: string): HttpException;
73
- static conflict(message?: string): HttpException;
74
- static unprocessable(message?: string, details?: ValidationError[]): HttpException;
75
- static tooManyRequests(message?: string, retryAfterSeconds?: number): HttpException;
76
- static serviceUnavailable(message?: string, retryAfterSeconds?: number): HttpException;
77
- static internal(message?: string): HttpException;
78
- }
79
- //#endregion
80
- export { ValidationError as i, HttpStatus as n, HttpStatusCode as r, HttpException as t };
81
- //# sourceMappingURL=errors-uaHCeXRz.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"errors-uaHCeXRz.d.mts","names":[],"sources":["../src/core/errors.ts"],"mappings":";;;AAUA;;;;;;;;;cAAa,UAAA;EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;KAmCD,cAAA,WAAyB,UAAA,eAAyB,UAAU;;UAGvD,eAAA;EACf,KAAA;EACA,OAAA;EACA,IAAA;AAAA;;AAAI;AAeN;;;;;;;;;;cAAa,aAAA,SAAsB,KAAA;EAAA,SAEf,MAAA;EAAA,SAEA,OAAA;EAAA,SACA,OAAA,GAAU,MAAA;cAHV,MAAA,UAChB,OAAA,UACgB,OAAA,wBACA,OAAA,GAAU,MAAA;EAsDsD;EA/ClF,WAAA,CAAY,OAAA,EAAS,MAAA,mBAAyB,aAAA;EA0DuC;EAAA,OAlD9E,YAAA,CAAa,KAAA,OAAY,OAAA,YAAmB,aAAA;EAAA,OAc5C,UAAA,CAAW,OAAA,YAAuB,aAAA;EAAA,OAGlC,YAAA,CAAa,OAAA,WAA0B,eAAA,YAAwB,aAAA;EAAA,OAQ/D,SAAA,CAAU,OAAA,YAAqB,aAAA;EAAA,OAG/B,QAAA,CAAS,OAAA,YAAqB,aAAA;EAAA,OAG9B,gBAAA,CAAiB,cAAA,YAA0B,OAAA,YAA8B,aAAA;EAAA,OAKzE,QAAA,CAAS,OAAA,YAAoB,aAAA;EAAA,OAG7B,aAAA,CAAc,OAAA,WAAkC,OAAA,GAAU,eAAA,KAAiB,aAAA;EAAA,OAG3E,eAAA,CAAgB,OAAA,WAA+B,iBAAA,YAA0B,aAAA;EAAA,OAQzE,kBAAA,CAAmB,OAAA,WAAiC,iBAAA,YAA0B,aAAA;EAAA,OAQ9E,QAAA,CAAS,OAAA,YAAiC,aAAA;AAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index-qZqR_Mxr.d.mts","names":[],"sources":["../src/core/define-plugin.ts","../src/core/define-module.ts","../src/core/define-modules.ts","../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-adapter.ts","../src/core/asset-keys.ts"],"mappings":";;;;;;;;;;;;UAOiB,mBAAA;;EAEf,IAAA;;EAGA,OAAA;;;AALF;;EAWE,QAAA;IAAa,MAAA;EAAA;EAMC;EAHd,QAAA,GAAW,OAAA,CAAQ,OAAA;EAG6B;EAAhD,KAAA,CAAM,MAAA,EAAQ,OAAA,EAAS,GAAA,EAAK,YAAA,GAAe,IAAA,CAAK,UAAA;AAAA;;;;;;;UASjC,YAAA;EACf,IAAA;EACA,MAAM;AAAA;;;;;;;;AAXoD;AAS5D;UAciB,kBAAA;EACf,MAAA,GAAS,aAAA;EACT,UAAA,IAAc,IAAA,UAAc,OAAA,GAAU,OAAA,CAAQ,OAAA;AAAA;AAFhD;;;;;AAAA,UAUiB,aAAA;EAAA,CACd,MAAA,GAAS,OAAA,CAAQ,OAAA,IAAW,UAAA;EAC7B,MAAA,CAAO,SAAA,UAAmB,MAAA,GAAS,OAAA,CAAQ,OAAA,IAAW,UAAA;EACtD,KAAA,CAAM,IAAA,EAAM,kBAAA,CAAmB,OAAA,IAAW,UAAA;EAbR;EAAA,SAezB,UAAA,EAAY,QAAA,CAAS,mBAAA,CAAoB,OAAA;AAAA;;;;;;;AAbG;AAQvD;;;;;;;;;;;;;;iBAoCgB,YAAA,WAAuB,MAAA,kBAAA,CACrC,OAAA,EAAS,mBAAA,CAAoB,OAAA,IAC5B,aAAA,CAAc,OAAA;;;;;;;;;;;;;UClFA,mBAAA;EDNmB;;;;;;ECalC,IAAA;EDI2C;ECF3C,OAAA;EDE+C;;;;;ECI/C,QAAA;IAAa,MAAA;EAAA;EDPM;;;;ECYnB,QAAA,GAAW,OAAA,CAAQ,OAAA;EDTI;;;;AAAmC;AAS5D;;;;AAEQ;AAYR;ECFE,KAAA,CAAM,MAAA,EAAQ,OAAA,EAAS,GAAA,EAAK,YAA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