@forinda/kickjs 2.0.1 → 2.1.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 (236) hide show
  1. package/dist/adapter-BqGjZCSm.d.mts +122 -0
  2. package/dist/adapter-BqGjZCSm.d.mts.map +1 -0
  3. package/dist/app-module-CcEbAVtB.d.mts +33 -0
  4. package/dist/app-module-CcEbAVtB.d.mts.map +1 -0
  5. package/dist/application-DNHj-_UL.mjs +449 -0
  6. package/dist/application-DNHj-_UL.mjs.map +1 -0
  7. package/dist/bootstrap-DLEZaJ3b.mjs +205 -0
  8. package/dist/bootstrap-DLEZaJ3b.mjs.map +1 -0
  9. package/dist/{core/cache.d.ts → cache-DJeMaGqb.d.mts} +33 -31
  10. package/dist/cache-DJeMaGqb.d.mts.map +1 -0
  11. package/dist/chunk-C5Qp-JxE.mjs +15 -0
  12. package/dist/container-nBSIhyqV.d.mts +141 -0
  13. package/dist/container-nBSIhyqV.d.mts.map +1 -0
  14. package/dist/core/adapter.d.mts +3 -0
  15. package/dist/core/adapter.mjs +11 -0
  16. package/dist/core/app-module.d.mts +3 -0
  17. package/dist/core/app-module.mjs +11 -0
  18. package/dist/core/cache.d.mts +3 -0
  19. package/dist/core/cache.mjs +113 -0
  20. package/dist/core/cache.mjs.map +1 -0
  21. package/dist/core/container.d.mts +3 -0
  22. package/dist/core/container.mjs +426 -0
  23. package/dist/core/container.mjs.map +1 -0
  24. package/dist/core/cron.d.mts +3 -0
  25. package/dist/core/cron.mjs +42 -0
  26. package/dist/core/cron.mjs.map +1 -0
  27. package/dist/core/decorators.d.mts +3 -0
  28. package/dist/core/decorators.mjs +213 -0
  29. package/dist/core/decorators.mjs.map +1 -0
  30. package/dist/core/errors.d.mts +3 -0
  31. package/dist/core/errors.mjs +97 -0
  32. package/dist/core/errors.mjs.map +1 -0
  33. package/dist/core/interfaces.d.mts +3 -0
  34. package/dist/core/interfaces.mjs +44 -0
  35. package/dist/core/interfaces.mjs.map +1 -0
  36. package/dist/core/logger.d.mts +3 -0
  37. package/dist/core/logger.mjs +217 -0
  38. package/dist/core/logger.mjs.map +1 -0
  39. package/dist/core/path.d.mts +3 -0
  40. package/dist/core/path.mjs +45 -0
  41. package/dist/core/path.mjs.map +1 -0
  42. package/dist/core/plugin.d.mts +3 -0
  43. package/dist/core/plugin.mjs +11 -0
  44. package/dist/core/reactivity.d.mts +3 -0
  45. package/dist/core/reactivity.mjs +189 -0
  46. package/dist/core/reactivity.mjs.map +1 -0
  47. package/dist/core-BL_H8fEZ.mjs +121 -0
  48. package/dist/core-BL_H8fEZ.mjs.map +1 -0
  49. package/dist/{core/cron.d.ts → cron-RKhH5TOd.d.mts} +16 -14
  50. package/dist/cron-RKhH5TOd.d.mts.map +1 -0
  51. package/dist/decorators-CQ93ak6Z.d.mts +154 -0
  52. package/dist/decorators-CQ93ak6Z.d.mts.map +1 -0
  53. package/dist/errors-te5Km00o.d.mts +68 -0
  54. package/dist/errors-te5Km00o.d.mts.map +1 -0
  55. package/dist/http/application.d.mts +220 -0
  56. package/dist/http/application.d.mts.map +1 -0
  57. package/dist/http/application.mjs +12 -0
  58. package/dist/http/bootstrap.d.mts +43 -0
  59. package/dist/http/bootstrap.d.mts.map +1 -0
  60. package/dist/http/bootstrap.mjs +12 -0
  61. package/dist/http/context.d.mts +131 -0
  62. package/dist/http/context.d.mts.map +1 -0
  63. package/dist/http/context.mjs +220 -0
  64. package/dist/http/context.mjs.map +1 -0
  65. package/dist/http/middleware/cors.d.mts +48 -0
  66. package/dist/http/middleware/cors.d.mts.map +1 -0
  67. package/dist/http/middleware/cors.mjs +83 -0
  68. package/dist/http/middleware/cors.mjs.map +1 -0
  69. package/dist/http/middleware/csrf.d.mts +52 -0
  70. package/dist/http/middleware/csrf.d.mts.map +1 -0
  71. package/dist/http/middleware/csrf.mjs +72 -0
  72. package/dist/http/middleware/csrf.mjs.map +1 -0
  73. package/dist/http/middleware/error-handler.d.mts +11 -0
  74. package/dist/http/middleware/error-handler.d.mts.map +1 -0
  75. package/dist/http/middleware/error-handler.mjs +52 -0
  76. package/dist/http/middleware/error-handler.mjs.map +1 -0
  77. package/dist/http/middleware/helmet.d.mts +41 -0
  78. package/dist/http/middleware/helmet.d.mts.map +1 -0
  79. package/dist/http/middleware/helmet.mjs +51 -0
  80. package/dist/http/middleware/helmet.mjs.map +1 -0
  81. package/dist/http/middleware/rate-limit.d.mts +56 -0
  82. package/dist/http/middleware/rate-limit.d.mts.map +1 -0
  83. package/dist/http/middleware/rate-limit.mjs +101 -0
  84. package/dist/http/middleware/rate-limit.mjs.map +1 -0
  85. package/dist/http/middleware/request-id.d.mts +10 -0
  86. package/dist/http/middleware/request-id.d.mts.map +1 -0
  87. package/dist/http/middleware/request-id.mjs +26 -0
  88. package/dist/http/middleware/request-id.mjs.map +1 -0
  89. package/dist/http/middleware/request-logger.d.mts +32 -0
  90. package/dist/http/middleware/request-logger.d.mts.map +1 -0
  91. package/dist/http/middleware/request-logger.mjs +49 -0
  92. package/dist/http/middleware/request-logger.mjs.map +1 -0
  93. package/dist/http/middleware/session.d.mts +67 -0
  94. package/dist/http/middleware/session.d.mts.map +1 -0
  95. package/dist/http/middleware/session.mjs +152 -0
  96. package/dist/http/middleware/session.mjs.map +1 -0
  97. package/dist/http/middleware/spa.d.mts +101 -0
  98. package/dist/http/middleware/spa.d.mts.map +1 -0
  99. package/dist/http/middleware/spa.mjs +108 -0
  100. package/dist/http/middleware/spa.mjs.map +1 -0
  101. package/dist/http/middleware/{upload.d.ts → upload.d.mts} +21 -17
  102. package/dist/http/middleware/upload.d.mts.map +1 -0
  103. package/dist/http/middleware/upload.mjs +191 -0
  104. package/dist/http/middleware/upload.mjs.map +1 -0
  105. package/dist/http/middleware/validate.d.mts +18 -0
  106. package/dist/http/middleware/validate.d.mts.map +1 -0
  107. package/dist/http/middleware/validate.mjs +62 -0
  108. package/dist/http/middleware/validate.mjs.map +1 -0
  109. package/dist/http/middleware/views.d.mts +62 -0
  110. package/dist/http/middleware/views.d.mts.map +1 -0
  111. package/dist/http/middleware/views.mjs +65 -0
  112. package/dist/http/middleware/views.mjs.map +1 -0
  113. package/dist/http/query/index.d.mts +3 -0
  114. package/dist/http/query/index.mjs +12 -0
  115. package/dist/http/{router-builder.d.ts → router-builder.d.mts} +9 -5
  116. package/dist/http/router-builder.d.mts.map +1 -0
  117. package/dist/http/router-builder.mjs +67 -0
  118. package/dist/http/router-builder.mjs.map +1 -0
  119. package/dist/index-C0gbnpSg.d.mts +107 -0
  120. package/dist/index-C0gbnpSg.d.mts.map +1 -0
  121. package/dist/index-Cls52etj.d.mts +148 -0
  122. package/dist/index-Cls52etj.d.mts.map +1 -0
  123. package/dist/index.d.mts +133 -0
  124. package/dist/index.d.mts.map +1 -0
  125. package/dist/index.mjs +126 -0
  126. package/dist/index.mjs.map +1 -0
  127. package/dist/interfaces-D-48zotH.d.mts +52 -0
  128. package/dist/interfaces-D-48zotH.d.mts.map +1 -0
  129. package/dist/logger-Dzj-TF0t.d.mts +119 -0
  130. package/dist/logger-Dzj-TF0t.d.mts.map +1 -0
  131. package/dist/metadata-fmvikBA0.mjs +76 -0
  132. package/dist/metadata-fmvikBA0.mjs.map +1 -0
  133. package/dist/{core/path.d.ts → path-LmwfhfyH.d.mts} +7 -3
  134. package/dist/path-LmwfhfyH.d.mts.map +1 -0
  135. package/dist/plugin-DIoPIpSm.d.mts +95 -0
  136. package/dist/plugin-DIoPIpSm.d.mts.map +1 -0
  137. package/dist/query-7cdHF6ry.mjs +164 -0
  138. package/dist/query-7cdHF6ry.mjs.map +1 -0
  139. package/dist/{core/reactivity.d.ts → reactivity-BbS-99ow.d.mts} +21 -20
  140. package/dist/reactivity-BbS-99ow.d.mts.map +1 -0
  141. package/package.json +73 -43
  142. package/dist/chunk-DVVP7zzD.js +0 -7
  143. package/dist/core/adapter.d.ts +0 -109
  144. package/dist/core/adapter.d.ts.map +0 -1
  145. package/dist/core/adapter.js +0 -0
  146. package/dist/core/app-module.d.ts +0 -28
  147. package/dist/core/app-module.d.ts.map +0 -1
  148. package/dist/core/app-module.js +0 -0
  149. package/dist/core/cache.d.ts.map +0 -1
  150. package/dist/core/cache.js +0 -57
  151. package/dist/core/container.d.ts +0 -63
  152. package/dist/core/container.d.ts.map +0 -1
  153. package/dist/core/container.js +0 -117
  154. package/dist/core/cron.d.ts.map +0 -1
  155. package/dist/core/cron.js +0 -22
  156. package/dist/core/decorators.d.ts +0 -153
  157. package/dist/core/decorators.d.ts.map +0 -1
  158. package/dist/core/decorators.js +0 -141
  159. package/dist/core/errors.d.ts +0 -64
  160. package/dist/core/errors.d.ts.map +0 -1
  161. package/dist/core/errors.js +0 -67
  162. package/dist/core/index.d.ts +0 -14
  163. package/dist/core/index.d.ts.map +0 -1
  164. package/dist/core/interfaces.d.ts +0 -44
  165. package/dist/core/interfaces.d.ts.map +0 -1
  166. package/dist/core/interfaces.js +0 -25
  167. package/dist/core/logger.d.ts +0 -43
  168. package/dist/core/logger.d.ts.map +0 -1
  169. package/dist/core/logger.js +0 -54
  170. package/dist/core/path.d.ts.map +0 -1
  171. package/dist/core/path.js +0 -12
  172. package/dist/core/plugin.d.ts +0 -90
  173. package/dist/core/plugin.d.ts.map +0 -1
  174. package/dist/core/plugin.js +0 -0
  175. package/dist/core/reactivity.d.ts.map +0 -1
  176. package/dist/core/reactivity.js +0 -101
  177. package/dist/core-B6Okew3W.js +0 -7
  178. package/dist/http/application.d.ts +0 -103
  179. package/dist/http/application.d.ts.map +0 -1
  180. package/dist/http/application.js +0 -167
  181. package/dist/http/bootstrap.d.ts +0 -22
  182. package/dist/http/bootstrap.d.ts.map +0 -1
  183. package/dist/http/bootstrap.js +0 -40
  184. package/dist/http/context.d.ts +0 -129
  185. package/dist/http/context.d.ts.map +0 -1
  186. package/dist/http/context.js +0 -115
  187. package/dist/http/index.d.ts +0 -16
  188. package/dist/http/index.d.ts.map +0 -1
  189. package/dist/http/middleware/cors.d.ts +0 -43
  190. package/dist/http/middleware/cors.d.ts.map +0 -1
  191. package/dist/http/middleware/cors.js +0 -31
  192. package/dist/http/middleware/csrf.d.ts +0 -47
  193. package/dist/http/middleware/csrf.d.ts.map +0 -1
  194. package/dist/http/middleware/csrf.js +0 -25
  195. package/dist/http/middleware/error-handler.d.ts +0 -6
  196. package/dist/http/middleware/error-handler.d.ts.map +0 -1
  197. package/dist/http/middleware/error-handler.js +0 -37
  198. package/dist/http/middleware/helmet.d.ts +0 -36
  199. package/dist/http/middleware/helmet.d.ts.map +0 -1
  200. package/dist/http/middleware/helmet.js +0 -20
  201. package/dist/http/middleware/rate-limit.d.ts +0 -51
  202. package/dist/http/middleware/rate-limit.d.ts.map +0 -1
  203. package/dist/http/middleware/rate-limit.js +0 -46
  204. package/dist/http/middleware/request-id.d.ts +0 -5
  205. package/dist/http/middleware/request-id.d.ts.map +0 -1
  206. package/dist/http/middleware/request-id.js +0 -12
  207. package/dist/http/middleware/request-logger.d.ts +0 -27
  208. package/dist/http/middleware/request-logger.d.ts.map +0 -1
  209. package/dist/http/middleware/request-logger.js +0 -16
  210. package/dist/http/middleware/session.d.ts +0 -62
  211. package/dist/http/middleware/session.d.ts.map +0 -1
  212. package/dist/http/middleware/session.js +0 -76
  213. package/dist/http/middleware/spa.d.ts +0 -93
  214. package/dist/http/middleware/spa.d.ts.map +0 -1
  215. package/dist/http/middleware/spa.js +0 -52
  216. package/dist/http/middleware/upload.d.ts.map +0 -1
  217. package/dist/http/middleware/upload.js +0 -119
  218. package/dist/http/middleware/validate.d.ts +0 -13
  219. package/dist/http/middleware/validate.d.ts.map +0 -1
  220. package/dist/http/middleware/validate.js +0 -45
  221. package/dist/http/middleware/views.d.ts +0 -56
  222. package/dist/http/middleware/views.d.ts.map +0 -1
  223. package/dist/http/middleware/views.js +0 -18
  224. package/dist/http/query/index.d.ts +0 -4
  225. package/dist/http/query/index.d.ts.map +0 -1
  226. package/dist/http/query/index.js +0 -10
  227. package/dist/http/query/parse-query.d.ts +0 -44
  228. package/dist/http/query/parse-query.d.ts.map +0 -1
  229. package/dist/http/query/types.d.ts +0 -100
  230. package/dist/http/query/types.d.ts.map +0 -1
  231. package/dist/http/router-builder.d.ts.map +0 -1
  232. package/dist/http/router-builder.js +0 -37
  233. package/dist/index.d.ts +0 -25
  234. package/dist/index.d.ts.map +0 -1
  235. package/dist/index.js +0 -103
  236. package/dist/query-Bym31XRp.js +0 -88
@@ -1,109 +0,0 @@
1
- import type http from 'node:http';
2
- import type { Express } from 'express';
3
- import type { Container } from './container';
4
- import type { MaybePromise, Constructor } from './interfaces';
5
- /**
6
- * Where in the middleware pipeline an adapter's middleware should be inserted.
7
- *
8
- * beforeGlobal → runs before any user-defined global middleware
9
- * afterGlobal → runs after global middleware, before module routes
10
- * beforeRoutes → just before module routes are mounted
11
- * afterRoutes → after module routes but before error handlers
12
- */
13
- export type MiddlewarePhase = 'beforeGlobal' | 'afterGlobal' | 'beforeRoutes' | 'afterRoutes';
14
- /** A middleware entry contributed by an adapter */
15
- export interface AdapterMiddleware {
16
- /** Express-compatible handler: (req, res, next) => void */
17
- handler: any;
18
- /** Which phase to insert into (default: 'afterGlobal') */
19
- phase?: MiddlewarePhase;
20
- /** Optional path to scope the middleware to (e.g. '/api/v1/auth') */
21
- path?: string;
22
- }
23
- /**
24
- * Context passed to adapter lifecycle hooks.
25
- * Populated by the Application — provides access to the Express app,
26
- * DI container, http.Server, and environment info without requiring
27
- * external type imports. Cast `app` or `server` if you need specific types.
28
- *
29
- * @example
30
- * ```ts
31
- * beforeMount({ app, container }: AdapterContext) {
32
- * app.use(myMiddleware())
33
- * }
34
- * ```
35
- */
36
- export interface AdapterContext {
37
- /** Express application instance — fully typed */
38
- app: Express;
39
- /** DI container */
40
- container: Container;
41
- /** Node.js http.Server — only available in afterStart */
42
- server?: http.Server;
43
- /** Current NODE_ENV value (default: 'development') */
44
- env: string;
45
- /** true when NODE_ENV === 'production' */
46
- isProduction: boolean;
47
- }
48
- /**
49
- * Adapters plug into the Application lifecycle.
50
- * Implement this to add WebSocket, database, rate limiting, docs, etc.
51
- *
52
- * All hooks receive an `AdapterContext` populated by the framework.
53
- * No external type imports needed — the context is fully typed from KickJS internals.
54
- *
55
- * @example
56
- * ```ts
57
- * import type { AppAdapter, AdapterContext } from '@forinda/kickjs-core/adapter'
58
- *
59
- * class SentryAdapter implements AppAdapter {
60
- * name = 'SentryAdapter'
61
- *
62
- * beforeMount({ app, container }: AdapterContext) {
63
- * app.use(Sentry.expressRequestHandler())
64
- * }
65
- *
66
- * afterStart({ server }: AdapterContext) {
67
- * // server is the http.Server — available after listen()
68
- * }
69
- *
70
- * async shutdown() {
71
- * await Sentry.close(2000)
72
- * }
73
- * }
74
- * ```
75
- */
76
- export interface AppAdapter {
77
- /** Human-readable name for logging */
78
- name?: string;
79
- /**
80
- * Return middleware entries to be inserted into the pipeline.
81
- * The `phase` controls ordering relative to global middleware and routes.
82
- */
83
- middleware?(): AdapterMiddleware[];
84
- /**
85
- * Called before global middleware — register early routes (docs UI, health).
86
- * May return a Promise — async rejections are caught and logged.
87
- */
88
- beforeMount?(ctx: AdapterContext): void | Promise<void>;
89
- /**
90
- * Called for each module route that gets mounted.
91
- * Use this to collect route metadata (e.g. for OpenAPI spec generation).
92
- */
93
- onRouteMount?(controllerClass: Constructor, mountPath: string): void;
94
- /**
95
- * Called after modules registered, before HTTP server starts.
96
- * May return a Promise — async rejections are caught and logged.
97
- */
98
- beforeStart?(ctx: AdapterContext): void | Promise<void>;
99
- /**
100
- * Called after the HTTP server is listening — attach to the raw http.Server.
101
- * May return a Promise — async rejections are caught and logged.
102
- */
103
- afterStart?(ctx: AdapterContext): void | Promise<void>;
104
- /** Called on shutdown — clean up connections */
105
- shutdown?(): MaybePromise;
106
- }
107
- /** Constructor type for AppAdapter classes */
108
- export type AppAdapterClass = new () => AppAdapter;
109
- //# sourceMappingURL=adapter.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../src/core/adapter.ts"],"names":[],"mappings":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,cAAc,GAAG,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAEvD;;;OAGG;IACH,UAAU,CAAC,CAAC,GAAG,EAAE,cAAc,GAAG,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAEtD,gDAAgD;IAChD,QAAQ,CAAC,IAAI,YAAY,CAAA;CAC1B;AAED,8CAA8C;AAC9C,MAAM,MAAM,eAAe,GAAG,UAAU,UAAU,CAAA"}
File without changes
@@ -1,28 +0,0 @@
1
- import type { Container } from './container';
2
- /**
3
- * Route set returned by a module's routes() method.
4
- * Combined with versioning: /{apiPrefix}/v{version}{path}
5
- */
6
- export interface ModuleRoutes {
7
- /** URL prefix (e.g. '/users') */
8
- path: string;
9
- /** Express Router instance (from buildRoutes) */
10
- router: any;
11
- /** Optional API version override (defaults to Application.defaultVersion) */
12
- version?: number;
13
- /** Controller class for OpenAPI introspection */
14
- controller?: any;
15
- }
16
- /**
17
- * Interface that every feature module must implement.
18
- * Modules register their DI bindings and declare their routes.
19
- */
20
- export interface AppModule {
21
- /** Bind interfaces to implementations in the container */
22
- register(container: Container): void;
23
- /** Return route definitions for this module, or null for non-HTTP modules */
24
- routes(): ModuleRoutes | ModuleRoutes[] | null;
25
- }
26
- /** Constructor type for AppModule classes */
27
- export type AppModuleClass = new () => AppModule;
28
- //# sourceMappingURL=app-module.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"app-module.d.ts","sourceRoot":"","sources":["../../src/core/app-module.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAE5C;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC3B,iCAAiC;IACjC,IAAI,EAAE,MAAM,CAAA;IACZ,iDAAiD;IACjD,MAAM,EAAE,GAAG,CAAA;IACX,6EAA6E;IAC7E,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,iDAAiD;IACjD,UAAU,CAAC,EAAE,GAAG,CAAA;CACjB;AAED;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I,CAAC;IAI1D,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAI/B,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAQ1C,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;CAGhC;AAMD;;;;;;;;;;;GAWG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,aAAa,GAAG,IAAI,CAE9D;AAED,qCAAqC;AACrC,wBAAgB,gBAAgB,IAAI,aAAa,CAEhD;AAID,MAAM,WAAW,YAAY;IAC3B,4CAA4C;IAC5C,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,uDAAuD;IACvD,GAAG,CAAC,EAAE,MAAM,CAAA;CACb;AAID;;;;;;;;GAQG;AACH,wBAAgB,SAAS,CAAC,GAAG,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,eAAe,CAsBnF;AAID;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,eAAe,CAevD;AAED,OAAO,EAAE,cAAc,EAAE,CAAA"}
@@ -1,57 +0,0 @@
1
- import "reflect-metadata";
2
- var g = /* @__PURE__ */ Symbol("kick:cacheable"), d = class {
3
- store = /* @__PURE__ */ new Map();
4
- async get(e) {
5
- const t = this.store.get(e);
6
- return t ? t.expiresAt <= Date.now() ? (this.store.delete(e), null) : t.data : null;
7
- }
8
- async set(e, t, s) {
9
- this.store.set(e, {
10
- data: t,
11
- expiresAt: Date.now() + s
12
- });
13
- }
14
- async del(e) {
15
- this.store.delete(e);
16
- }
17
- async delByPrefix(e) {
18
- for (const t of this.store.keys()) t.startsWith(e) && this.store.delete(t);
19
- }
20
- async shutdown() {
21
- this.store.clear();
22
- }
23
- }, f = new d();
24
- function p(e) {
25
- f = e;
26
- }
27
- function v() {
28
- return f;
29
- }
30
- function P(e, t) {
31
- return (s, r, n) => {
32
- const i = n.value, c = (e ?? 60) * 1e3, a = t?.key ?? String(r);
33
- return n.value = async function(...o) {
34
- const l = `${a}:${JSON.stringify(o)}`, u = v(), y = await u.get(l);
35
- if (y !== null) return y;
36
- const h = await i.apply(this, o);
37
- return await u.set(l, h, c), h;
38
- }, n;
39
- };
40
- }
41
- function x(e) {
42
- return (t, s, r) => {
43
- const n = r.value;
44
- return r.value = async function(...i) {
45
- const c = await n.apply(this, i), a = v();
46
- return a.delByPrefix && await a.delByPrefix(e), c;
47
- }, r;
48
- };
49
- }
50
- export {
51
- g as CACHEABLE_META,
52
- x as CacheEvict,
53
- P as Cacheable,
54
- d as MemoryCacheProvider,
55
- v as getCacheProvider,
56
- p as setCacheProvider
57
- };
@@ -1,63 +0,0 @@
1
- import 'reflect-metadata';
2
- import { Constructor, Scope } from './interfaces';
3
- /**
4
- * Inversion-of-Control (IoC) container that manages dependency registration,
5
- * resolution, and lifecycle. Implements the Singleton pattern so all parts of
6
- * the application share a single container instance.
7
- *
8
- * Supports constructor injection, property injection (@Autowired),
9
- * factory registrations, and lifecycle hooks (@PostConstruct).
10
- */
11
- export declare class Container {
12
- private static instance;
13
- private registrations;
14
- private resolving;
15
- /** Callback set by the decorators module to flush pending registrations */
16
- static _onReady: ((container: Container) => void) | null;
17
- /** Callback invoked on reset so decorators can update their container reference */
18
- static _onReset: ((container: Container) => void) | null;
19
- /**
20
- * Environment resolver for @Value decorator. Set by @forinda/kickjs-config
21
- * to return Zod-validated, type-coerced env values instead of raw process.env strings.
22
- */
23
- static _envResolver: ((key: string) => any) | null;
24
- static getInstance(): Container;
25
- /**
26
- * Resets the container by replacing the singleton with a fresh instance.
27
- * Useful for testing to ensure a clean slate between test runs.
28
- */
29
- static reset(): void;
30
- /**
31
- * Create an isolated container instance (not the global singleton).
32
- * Useful for concurrent tests that must not share DI state.
33
- *
34
- * @example
35
- * ```ts
36
- * const container = Container.create()
37
- * container.register(UserService, UserService)
38
- * const svc = container.resolve(UserService)
39
- * ```
40
- */
41
- static create(): Container;
42
- /** Register a class constructor under the given token */
43
- register(token: any, target: Constructor, scope?: Scope): void;
44
- /** Register a factory function under the given token */
45
- registerFactory(token: any, factory: () => any, scope?: Scope): void;
46
- /** Register a pre-constructed singleton instance */
47
- registerInstance(token: any, instance: any): void;
48
- /** Check if a binding exists for the given token */
49
- has(token: any): boolean;
50
- /** Return a snapshot of all registered tokens with their scope and instantiation status */
51
- getRegistrations(): Array<{
52
- token: string;
53
- scope: string;
54
- instantiated: boolean;
55
- }>;
56
- /** Resolve a dependency by its token */
57
- resolve<T = any>(token: any): T;
58
- /** Lifecycle hook called during Application.setup() after module registration */
59
- bootstrap(): void;
60
- private createInstance;
61
- private injectProperties;
62
- }
63
- //# sourceMappingURL=container.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"container.d.ts","sourceRoot":"","sources":["../../src/core/container.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAA;AACzB,OAAO,EAAE,WAAW,EAAE,KAAK,EAAY,MAAM,cAAc,CAAA;AAgB3D;;;;;;;GAOG;AACH,qBAAa,SAAS;IACpB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAW;IAClC,OAAO,CAAC,aAAa,CAA+B;IACpD,OAAO,CAAC,SAAS,CAAiB;IAElC,2EAA2E;IAC3E,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC,SAAS,EAAE,SAAS,KAAK,IAAI,CAAC,GAAG,IAAI,CAAO;IAC/D,mFAAmF;IACnF,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC,SAAS,EAAE,SAAS,KAAK,IAAI,CAAC,GAAG,IAAI,CAAO;IAC/D;;;OAGG;IACH,MAAM,CAAC,YAAY,EAAE,CAAC,CAAC,GAAG,EAAE,MAAM,KAAK,GAAG,CAAC,GAAG,IAAI,CAAO;IAEzD,MAAM,CAAC,WAAW,IAAI,SAAS;IAY/B;;;OAGG;IACH,MAAM,CAAC,KAAK,IAAI,IAAI;IAMpB;;;;;;;;;;OAUG;IACH,MAAM,CAAC,MAAM,IAAI,SAAS;IAI1B,yDAAyD;IACzD,QAAQ,CAAC,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,WAAW,EAAE,KAAK,GAAE,KAAuB,GAAG,IAAI;IAS/E,wDAAwD;IACxD,eAAe,CAAC,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,GAAG,EAAE,KAAK,GAAE,KAAuB,GAAG,IAAI;IAIrF,oDAAoD;IACpD,gBAAgB,CAAC,KAAK,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,GAAG,IAAI;IAQjD,oDAAoD;IACpD,GAAG,CAAC,KAAK,EAAE,GAAG,GAAG,OAAO;IAIxB,2FAA2F;IAC3F,gBAAgB,IAAI,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,YAAY,EAAE,OAAO,CAAA;KAAE,CAAC;IAYlF,wCAAwC;IACxC,OAAO,CAAC,CAAC,GAAG,GAAG,EAAE,KAAK,EAAE,GAAG,GAAG,CAAC;IAyC/B,iFAAiF;IACjF,SAAS,IAAI,IAAI;IAKjB,OAAO,CAAC,cAAc;IAyBtB,OAAO,CAAC,gBAAgB;CA4CzB"}
@@ -1,117 +0,0 @@
1
- import { METADATA as a, Scope as c } from "./interfaces.js";
2
- import "reflect-metadata";
3
- function u(l) {
4
- return typeof l == "symbol" ? l.toString() : l?.name || String(l);
5
- }
6
- var v = class r {
7
- static instance;
8
- registrations = /* @__PURE__ */ new Map();
9
- resolving = /* @__PURE__ */ new Set();
10
- static _onReady = null;
11
- static _onReset = null;
12
- static _envResolver = null;
13
- static getInstance() {
14
- return r.instance || (r.instance = new r()), r._onReady && (r._onReady(r.instance), r._onReady = null), r.instance;
15
- }
16
- static reset() {
17
- r.instance = new r(), r._onReset?.(r.instance);
18
- }
19
- static create() {
20
- return new r();
21
- }
22
- register(e, t, n = c.SINGLETON) {
23
- this.registrations.set(e, {
24
- target: t,
25
- scope: n
26
- }), typeof e == "function" && e.name && this.registrations.set(`__hmr__${e.name}`, {
27
- target: t,
28
- scope: n
29
- });
30
- }
31
- registerFactory(e, t, n = c.SINGLETON) {
32
- this.registrations.set(e, {
33
- target: Object,
34
- scope: n,
35
- factory: t
36
- });
37
- }
38
- registerInstance(e, t) {
39
- this.registrations.set(e, {
40
- target: t.constructor,
41
- scope: c.SINGLETON,
42
- instance: t
43
- });
44
- }
45
- has(e) {
46
- return this.registrations.has(e);
47
- }
48
- getRegistrations() {
49
- const e = [];
50
- for (const [t, n] of this.registrations) e.push({
51
- token: u(t),
52
- scope: n.scope,
53
- instantiated: n.instance !== void 0
54
- });
55
- return e;
56
- }
57
- resolve(e) {
58
- let t = this.registrations.get(e);
59
- if (!t && typeof e == "function" && e.name && (t = this.registrations.get(`__hmr__${e.name}`)), !t) throw new Error(`No binding found for: ${u(e)}`);
60
- if (t.scope === c.SINGLETON && t.instance !== void 0) return t.instance;
61
- if (t.factory) {
62
- const n = t.factory();
63
- return t.scope === c.SINGLETON && (t.instance = n), n;
64
- }
65
- if (this.resolving.has(e)) {
66
- const n = [...this.resolving].map(u);
67
- throw n.push(u(e)), new Error(`Circular dependency detected: ${n.join(" -> ")}`);
68
- }
69
- this.resolving.add(e);
70
- try {
71
- const n = this.createInstance(t);
72
- return t.scope === c.SINGLETON && (t.instance = n), n;
73
- } finally {
74
- this.resolving.delete(e);
75
- }
76
- }
77
- bootstrap() {
78
- }
79
- createInstance(e) {
80
- const t = (Reflect.getMetadata(a.PARAM_TYPES, e.target) || []).map((o, s) => {
81
- const i = (Reflect.getMetadata(a.INJECT, e.target) || {})[s] || o;
82
- return this.resolve(i);
83
- }), n = new e.target(...t);
84
- this.injectProperties(n, e.target);
85
- const f = Reflect.getMetadata(a.POST_CONSTRUCT, e.target.prototype);
86
- return f && typeof n[f] == "function" && n[f](), n;
87
- }
88
- injectProperties(e, t) {
89
- const n = Reflect.getMetadata(a.AUTOWIRED, t.prototype) || /* @__PURE__ */ new Map();
90
- for (const [o, s] of n) {
91
- const i = s || Reflect.getMetadata(a.PROPERTY_TYPE, t.prototype, o);
92
- i && Object.defineProperty(e, o, {
93
- get: () => this.resolve(i),
94
- enumerable: !0,
95
- configurable: !0
96
- });
97
- }
98
- const f = Reflect.getMetadata(a.VALUE, t.prototype) || /* @__PURE__ */ new Map();
99
- for (const [o, s] of f) Object.defineProperty(e, o, {
100
- get() {
101
- if (r._envResolver) {
102
- const p = r._envResolver(s.envKey);
103
- if (p !== void 0) return p;
104
- }
105
- const i = process.env[s.envKey];
106
- if (i !== void 0) return i;
107
- if (s.defaultValue !== void 0) return s.defaultValue;
108
- throw new Error(`@Value('${s.envKey}'): Environment variable "${s.envKey}" is not set and no default was provided.`);
109
- },
110
- enumerable: !0,
111
- configurable: !0
112
- });
113
- }
114
- };
115
- export {
116
- v as Container
117
- };
@@ -1 +0,0 @@
1
- {"version":3,"file":"cron.d.ts","sourceRoot":"","sources":["../../src/core/cron.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAA;AAEzB,QAAA,MAAM,SAAS,eAAsB,CAAA;AAErC,MAAM,WAAW,WAAW;IAC1B,UAAU,EAAE,MAAM,CAAA;IAClB,WAAW,EAAE,MAAM,CAAA;IACnB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB;AAUD;;;;;;;;;GASG;AACH,wBAAgB,IAAI,CAClB,UAAU,EAAE,MAAM,EAClB,OAAO,CAAC,EAAE;IAAE,WAAW,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,OAAO,CAAA;CAAE,GACzE,eAAe,CAYjB;AAED,2CAA2C;AAC3C,wBAAgB,WAAW,CAAC,MAAM,EAAE,GAAG,GAAG,WAAW,EAAE,CAEtD;AAED,OAAO,EAAE,SAAS,EAAE,CAAA"}
package/dist/core/cron.js DELETED
@@ -1,22 +0,0 @@
1
- import "reflect-metadata";
2
- var n = /* @__PURE__ */ Symbol("kick:cron");
3
- function a(t, e) {
4
- return (r, o) => {
5
- const c = Reflect.getMetadata(n, r.constructor) ?? [];
6
- c.push({
7
- expression: t,
8
- handlerName: o,
9
- description: e?.description,
10
- timezone: e?.timezone,
11
- runOnInit: e?.runOnInit
12
- }), Reflect.defineMetadata(n, c, r.constructor);
13
- };
14
- }
15
- function u(t) {
16
- return Reflect.getMetadata(n, t) ?? [];
17
- }
18
- export {
19
- n as CRON_META,
20
- a as Cron,
21
- u as getCronJobs
22
- };
@@ -1,153 +0,0 @@
1
- import 'reflect-metadata';
2
- import { type ServiceOptions } from './interfaces';
3
- /** Mark a class as injectable with lifecycle scope */
4
- export declare function Injectable(options?: ServiceOptions): ClassDecorator;
5
- /** Mark a class as a service (semantic alias for Injectable) */
6
- export declare function Service(options?: ServiceOptions): ClassDecorator;
7
- /** Mark a class as a generic managed component */
8
- export declare function Component(options?: ServiceOptions): ClassDecorator;
9
- /** Mark a class as a repository */
10
- export declare function Repository(options?: ServiceOptions): ClassDecorator;
11
- /**
12
- * Mark a class as an HTTP controller and register it in the DI container.
13
- *
14
- * @param path - **Deprecated.** The path parameter is no longer used for routing.
15
- * Route prefixes are defined by the module's `routes().path` — the single source
16
- * of truth for where routes are mounted. This parameter will be removed in a
17
- * future major version.
18
- */
19
- export declare function Controller(path?: string): ClassDecorator;
20
- /** Mark a method as a lifecycle hook called after instantiation */
21
- export declare function PostConstruct(): MethodDecorator;
22
- /** Property injection — resolved lazily from the container */
23
- export declare function Autowired(token?: any): PropertyDecorator;
24
- /**
25
- * Constructor parameter injection with an explicit token.
26
- *
27
- * **Constructor parameters only** — does not work as a property decorator.
28
- * For property injection with a token, use `@Autowired(token)` instead.
29
- */
30
- export declare function Inject(token: any): ParameterDecorator;
31
- /**
32
- * Inject an environment variable value. Evaluated lazily so the env
33
- * is available at access time, not at decoration time.
34
- *
35
- * If no default is provided and the env var is missing, throws at access time
36
- * to catch misconfiguration early instead of returning undefined.
37
- *
38
- * Uses metadata + instance getter to work correctly with `useDefineForClassFields`.
39
- */
40
- export declare function Value(envKey: string, defaultValue?: any): PropertyDecorator;
41
- export interface RouteDefinition {
42
- method: string;
43
- path: string;
44
- handlerName: string;
45
- validation?: {
46
- /** JSON Schema object for validating the request body */
47
- body?: any;
48
- /** JSON Schema object for validating query parameters */
49
- query?: any;
50
- /** JSON Schema object for validating URL params */
51
- params?: any;
52
- /** Schema name in OpenAPI components/schemas for the request body. Auto-generated from handler name if omitted. */
53
- name?: string;
54
- };
55
- }
56
- export declare const Get: (path?: string, validation?: RouteDefinition["validation"]) => MethodDecorator;
57
- export declare const Post: (path?: string, validation?: RouteDefinition["validation"]) => MethodDecorator;
58
- export declare const Put: (path?: string, validation?: RouteDefinition["validation"]) => MethodDecorator;
59
- export declare const Delete: (path?: string, validation?: RouteDefinition["validation"]) => MethodDecorator;
60
- export declare const Patch: (path?: string, validation?: RouteDefinition["validation"]) => MethodDecorator;
61
- export interface ApiQueryParamsConfig {
62
- /** Fields that can be used in filter queries (e.g., `?filter=status:eq:active`) */
63
- filterable?: string[];
64
- /** Fields that can be used in sort queries (e.g., `?sort=createdAt:desc`) */
65
- sortable?: string[];
66
- /** Fields that are searched with the `?q=` parameter */
67
- searchable?: string[];
68
- }
69
- /**
70
- * Column-object-based query params config (e.g., from DrizzleQueryParamsConfig).
71
- * `Object.keys()` is used to derive field names for OpenAPI docs.
72
- */
73
- export interface ColumnApiQueryParamsConfig {
74
- columns: Record<string, any>;
75
- sortable?: Record<string, any>;
76
- searchColumns?: any[];
77
- [key: string]: any;
78
- }
79
- /**
80
- * Normalize a query params config to the string-based ApiQueryParamsConfig.
81
- * Handles both string-based and column-object-based configs.
82
- */
83
- export declare function normalizeApiQueryParamsConfig(config: ApiQueryParamsConfig | ColumnApiQueryParamsConfig): ApiQueryParamsConfig;
84
- /**
85
- * Document the query parameters accepted by a GET endpoint.
86
- * Used by SwaggerAdapter to generate `filter`, `sort`, `page`, `limit`, and `q` params
87
- * in the OpenAPI spec, with descriptions listing the allowed fields.
88
- *
89
- * Accepts both string-based configs and column-object configs (e.g., DrizzleQueryParamsConfig).
90
- *
91
- * @example
92
- * ```ts
93
- * // String-based
94
- * @ApiQueryParams({
95
- * filterable: ['status', 'category', 'price'],
96
- * sortable: ['name', 'createdAt', 'price'],
97
- * searchable: ['name', 'description'],
98
- * })
99
- *
100
- * // Column-object-based (Drizzle)
101
- * @ApiQueryParams(TASK_QUERY_CONFIG)
102
- * ```
103
- */
104
- export declare function ApiQueryParams(config: ApiQueryParamsConfig | ColumnApiQueryParamsConfig): MethodDecorator;
105
- /**
106
- * Middleware handler function.
107
- * Pass `RequestContext` as the generic for full type safety:
108
- *
109
- * ```ts
110
- * import type { MiddlewareHandler, RequestContext } from '@forinda/kickjs'
111
- *
112
- * const auth: MiddlewareHandler<RequestContext> = (ctx, next) => {
113
- * ctx.body // fully typed
114
- * next()
115
- * }
116
- * ```
117
- */
118
- export type MiddlewareHandler<TCtx = any> = (ctx: TCtx, next: () => void) => void | Promise<void>;
119
- /** Attach middleware handlers to a class or method */
120
- export declare function Middleware(...handlers: MiddlewareHandler[]): ClassDecorator & MethodDecorator;
121
- /**
122
- * File filter — accepts short extensions ('jpg'), full MIME types ('image/jpeg'),
123
- * wildcards ('image/*'), or a function `(mimetype, filename) => boolean` for full control.
124
- */
125
- export type FileTypeFilter = string[] | ((mimetype: string, filename: string) => boolean);
126
- /**
127
- * Shared upload options used by both the `@FileUpload` decorator and the
128
- * `upload.single()` / `upload.array()` / `upload.none()` middleware.
129
- */
130
- export interface BaseUploadOptions {
131
- /** Max file size in bytes (default: 5MB) */
132
- maxSize?: number;
133
- /**
134
- * Allowed file types:
135
- * - **string[]** — short extensions ('jpg'), full MIME types ('image/jpeg'), or wildcards ('image/*')
136
- * - **function** — `(mimetype, filename) => boolean` for full control
137
- */
138
- allowedTypes?: FileTypeFilter;
139
- /** Extend the built-in extension-to-MIME map */
140
- customMimeMap?: Record<string, string>;
141
- }
142
- export interface FileUploadConfig extends BaseUploadOptions {
143
- mode: 'single' | 'array' | 'none';
144
- /** Form field name (default: 'file') */
145
- fieldName?: string;
146
- /** Max files for array mode (default: 10) */
147
- maxCount?: number;
148
- }
149
- /** Configure file upload handling for a controller method */
150
- export declare function FileUpload(config: FileUploadConfig): MethodDecorator;
151
- /** Add a static builder() method for fluent construction */
152
- export declare function Builder(target: any): void;
153
- //# sourceMappingURL=decorators.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"decorators.d.ts","sourceRoot":"","sources":["../../src/core/decorators.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAA;AACzB,OAAO,EAAmB,KAAK,cAAc,EAAE,MAAM,cAAc,CAAA;AA+DnE,sDAAsD;AACtD,wBAAgB,UAAU,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,cAAc,CAInE;AAED,gEAAgE;AAChE,wBAAgB,OAAO,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,cAAc,CAIhE;AAED,kDAAkD;AAClD,wBAAgB,SAAS,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,cAAc,CAIlE;AAED,mCAAmC;AACnC,wBAAgB,UAAU,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,cAAc,CAInE;AAED;;;;;;;GAOG;AACH,wBAAgB,UAAU,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,cAAc,CAKxD;AAID,mEAAmE;AACnE,wBAAgB,aAAa,IAAI,eAAe,CAI/C;AAID,8DAA8D;AAC9D,wBAAgB,SAAS,CAAC,KAAK,CAAC,EAAE,GAAG,GAAG,iBAAiB,CAMxD;AAED;;;;;GAKG;AACH,wBAAgB,MAAM,CAAC,KAAK,EAAE,GAAG,GAAG,kBAAkB,CAMrD;AAED;;;;;;;;GAQG;AACH,wBAAgB,KAAK,CAAC,MAAM,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,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