bootifyjs 0.1.1 → 1.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 (261) hide show
  1. package/dist/api.d.ts +8 -27
  2. package/dist/api.d.ts.map +1 -0
  3. package/dist/api.js +68 -134
  4. package/dist/api.js.map +1 -1
  5. package/dist/cache/bootstrap.d.ts +6 -0
  6. package/dist/cache/bootstrap.d.ts.map +1 -0
  7. package/dist/cache/bootstrap.js +23 -0
  8. package/dist/cache/bootstrap.js.map +1 -0
  9. package/dist/cache/cache.service.d.ts +9 -0
  10. package/dist/cache/cache.service.d.ts.map +1 -0
  11. package/dist/cache/cache.service.js +40 -0
  12. package/dist/cache/cache.service.js.map +1 -0
  13. package/dist/cache/cache.types.d.ts +14 -0
  14. package/dist/cache/cache.types.d.ts.map +1 -0
  15. package/dist/cache/cache.types.js +8 -0
  16. package/dist/cache/cache.types.js.map +1 -0
  17. package/dist/cache/decorators.d.ts +12 -0
  18. package/dist/cache/decorators.d.ts.map +1 -0
  19. package/dist/cache/decorators.js +53 -0
  20. package/dist/cache/decorators.js.map +1 -0
  21. package/dist/cache/in-memory-cache.store.d.ts +8 -0
  22. package/dist/cache/in-memory-cache.store.d.ts.map +1 -0
  23. package/dist/cache/in-memory-cache.store.js +39 -0
  24. package/dist/cache/in-memory-cache.store.js.map +1 -0
  25. package/dist/cache/index.d.ts +5 -0
  26. package/dist/cache/index.d.ts.map +1 -0
  27. package/dist/cache/index.js +21 -0
  28. package/dist/cache/index.js.map +1 -0
  29. package/dist/core/component-registry.d.ts +7 -0
  30. package/dist/core/component-registry.d.ts.map +1 -0
  31. package/dist/core/component-registry.js +9 -0
  32. package/dist/core/component-registry.js.map +1 -0
  33. package/dist/core/decorators.d.ts +38 -22
  34. package/dist/core/decorators.d.ts.map +1 -0
  35. package/dist/core/decorators.js +155 -174
  36. package/dist/core/decorators.js.map +1 -1
  37. package/dist/core/di-container.d.ts +31 -0
  38. package/dist/core/di-container.d.ts.map +1 -0
  39. package/dist/core/di-container.js +219 -0
  40. package/dist/core/di-container.js.map +1 -0
  41. package/dist/core/index.d.ts +5 -0
  42. package/dist/core/index.d.ts.map +1 -0
  43. package/dist/core/index.js +21 -0
  44. package/dist/core/index.js.map +1 -0
  45. package/dist/core/request-context.service.d.ts +24 -0
  46. package/dist/core/request-context.service.d.ts.map +1 -0
  47. package/dist/core/request-context.service.js +52 -0
  48. package/dist/core/request-context.service.js.map +1 -0
  49. package/dist/core/router.d.ts +4 -32
  50. package/dist/core/router.d.ts.map +1 -0
  51. package/dist/core/router.js +81 -258
  52. package/dist/core/router.js.map +1 -1
  53. package/dist/events/bootstrap.d.ts +8 -0
  54. package/dist/events/bootstrap.d.ts.map +1 -0
  55. package/dist/events/bootstrap.js +37 -0
  56. package/dist/events/bootstrap.js.map +1 -0
  57. package/dist/events/decorators.d.ts +16 -0
  58. package/dist/events/decorators.d.ts.map +1 -0
  59. package/dist/events/decorators.js +37 -0
  60. package/dist/events/decorators.js.map +1 -0
  61. package/dist/events/event-bus.service.d.ts +21 -0
  62. package/dist/events/event-bus.service.d.ts.map +1 -0
  63. package/dist/events/event-bus.service.js +78 -0
  64. package/dist/events/event-bus.service.js.map +1 -0
  65. package/dist/events/event.types.d.ts +17 -0
  66. package/dist/events/event.types.d.ts.map +1 -0
  67. package/dist/events/event.types.js.map +1 -0
  68. package/dist/events/index.d.ts +5 -13
  69. package/dist/events/index.d.ts.map +1 -0
  70. package/dist/events/index.js +4 -54
  71. package/dist/events/index.js.map +1 -1
  72. package/dist/examples/controllers/health.controller.d.ts +7 -0
  73. package/dist/examples/controllers/health.controller.d.ts.map +1 -0
  74. package/dist/{events/examples/system.events.js → examples/controllers/health.controller.js} +16 -15
  75. package/dist/examples/controllers/health.controller.js.map +1 -0
  76. package/dist/examples/controllers/todo.controller.d.ts +31 -0
  77. package/dist/examples/controllers/todo.controller.d.ts.map +1 -0
  78. package/dist/examples/controllers/todo.controller.js +102 -0
  79. package/dist/examples/controllers/todo.controller.js.map +1 -0
  80. package/dist/examples/events/TodoEventHandler.d.ts +2 -0
  81. package/dist/examples/events/TodoEventHandler.d.ts.map +1 -0
  82. package/dist/examples/events/TodoEventHandler.js +31 -0
  83. package/dist/examples/events/TodoEventHandler.js.map +1 -0
  84. package/dist/examples/events/todo.events.d.ts +16 -0
  85. package/dist/examples/events/todo.events.d.ts.map +1 -0
  86. package/dist/examples/events/todo.events.js +13 -0
  87. package/dist/examples/events/todo.events.js.map +1 -0
  88. package/dist/examples/index.d.ts +2 -0
  89. package/dist/examples/index.d.ts.map +1 -0
  90. package/dist/examples/index.js +35 -0
  91. package/dist/examples/index.js.map +1 -0
  92. package/dist/examples/repositories/todo.repository.d.ts +20 -0
  93. package/dist/examples/repositories/todo.repository.d.ts.map +1 -0
  94. package/dist/examples/repositories/todo.repository.js +33 -0
  95. package/dist/examples/repositories/todo.repository.js.map +1 -0
  96. package/dist/examples/services/todo.service.d.ts +33 -0
  97. package/dist/examples/services/todo.service.d.ts.map +1 -0
  98. package/dist/examples/services/todo.service.js +80 -0
  99. package/dist/examples/services/todo.service.js.map +1 -0
  100. package/dist/examples/todos/schema.d.ts +54 -0
  101. package/dist/examples/todos/schema.d.ts.map +1 -0
  102. package/dist/examples/todos/schema.js +20 -0
  103. package/dist/examples/todos/schema.js.map +1 -0
  104. package/dist/index.d.ts +7 -17
  105. package/dist/index.d.ts.map +1 -0
  106. package/dist/index.js +20 -95
  107. package/dist/index.js.map +1 -1
  108. package/dist/logging/config/logging.config.d.ts +31 -3
  109. package/dist/logging/config/logging.config.d.ts.map +1 -0
  110. package/dist/logging/config/logging.config.js +43 -93
  111. package/dist/logging/config/logging.config.js.map +1 -1
  112. package/dist/logging/core/decorators.d.ts +16 -0
  113. package/dist/logging/core/decorators.d.ts.map +1 -0
  114. package/dist/logging/core/decorators.js +74 -0
  115. package/dist/logging/core/decorators.js.map +1 -0
  116. package/dist/logging/core/logger.provider.d.ts +4 -0
  117. package/dist/logging/core/logger.provider.d.ts.map +1 -0
  118. package/dist/logging/core/logger.provider.js +68 -0
  119. package/dist/logging/core/logger.provider.js.map +1 -0
  120. package/dist/logging/core/logger.service.d.ts +9 -27
  121. package/dist/logging/core/logger.service.d.ts.map +1 -0
  122. package/dist/logging/core/logger.service.js +34 -164
  123. package/dist/logging/core/logger.service.js.map +1 -1
  124. package/dist/logging/core/{startup-logger.service.d.ts → startup.logger.d.ts} +4 -6
  125. package/dist/logging/core/startup.logger.d.ts.map +1 -0
  126. package/dist/logging/core/{startup-logger.service.js → startup.logger.js} +36 -42
  127. package/dist/logging/core/startup.logger.js.map +1 -0
  128. package/dist/logging/index.d.ts +7 -14
  129. package/dist/logging/index.d.ts.map +1 -0
  130. package/dist/logging/index.js +17 -28
  131. package/dist/logging/index.js.map +1 -1
  132. package/dist/middleware/auth.middleware.d.ts +3 -0
  133. package/dist/middleware/auth.middleware.d.ts.map +1 -0
  134. package/dist/middleware/auth.middleware.js +18 -0
  135. package/dist/middleware/auth.middleware.js.map +1 -0
  136. package/dist/middleware/context.middleware.d.ts +7 -0
  137. package/dist/middleware/context.middleware.d.ts.map +1 -0
  138. package/dist/middleware/context.middleware.js +25 -0
  139. package/dist/middleware/context.middleware.js.map +1 -0
  140. package/dist/middleware/index.d.ts +4 -0
  141. package/dist/middleware/index.d.ts.map +1 -0
  142. package/dist/middleware/index.js +20 -0
  143. package/dist/middleware/index.js.map +1 -0
  144. package/dist/middleware/request-logger.middleware.d.ts +4 -0
  145. package/dist/middleware/request-logger.middleware.d.ts.map +1 -0
  146. package/dist/middleware/request-logger.middleware.js +18 -0
  147. package/dist/middleware/request-logger.middleware.js.map +1 -0
  148. package/package.json +52 -47
  149. package/LICENSE +0 -21
  150. package/README.md +0 -423
  151. package/dist/config/app.config.d.ts +0 -29
  152. package/dist/config/app.config.js +0 -55
  153. package/dist/config/app.config.js.map +0 -1
  154. package/dist/controllers/config.controller.d.ts +0 -16
  155. package/dist/controllers/config.controller.js +0 -66
  156. package/dist/controllers/config.controller.js.map +0 -1
  157. package/dist/controllers/events.controller.d.ts +0 -66
  158. package/dist/controllers/events.controller.js +0 -145
  159. package/dist/controllers/events.controller.js.map +0 -1
  160. package/dist/controllers/health.controller.d.ts +0 -20
  161. package/dist/controllers/health.controller.js +0 -92
  162. package/dist/controllers/health.controller.js.map +0 -1
  163. package/dist/controllers/user.controller.d.ts +0 -13
  164. package/dist/controllers/user.controller.js +0 -209
  165. package/dist/controllers/user.controller.js.map +0 -1
  166. package/dist/core/application.d.ts +0 -21
  167. package/dist/core/application.js +0 -90
  168. package/dist/core/application.js.map +0 -1
  169. package/dist/core/config.d.ts +0 -3
  170. package/dist/core/config.js +0 -78
  171. package/dist/core/config.js.map +0 -1
  172. package/dist/core/container.d.ts +0 -17
  173. package/dist/core/container.js +0 -92
  174. package/dist/core/container.js.map +0 -1
  175. package/dist/core/errors.d.ts +0 -18
  176. package/dist/core/errors.js +0 -74
  177. package/dist/core/errors.js.map +0 -1
  178. package/dist/core/middleware.d.ts +0 -8
  179. package/dist/core/middleware.js +0 -23
  180. package/dist/core/middleware.js.map +0 -1
  181. package/dist/core/openapi.d.ts +0 -80
  182. package/dist/core/openapi.js +0 -189
  183. package/dist/core/openapi.js.map +0 -1
  184. package/dist/core/utils.d.ts +0 -7
  185. package/dist/core/utils.js +0 -75
  186. package/dist/core/utils.js.map +0 -1
  187. package/dist/core/validation.d.ts +0 -15
  188. package/dist/core/validation.js +0 -161
  189. package/dist/core/validation.js.map +0 -1
  190. package/dist/events/core/event-bus.d.ts +0 -26
  191. package/dist/events/core/event-bus.js +0 -253
  192. package/dist/events/core/event-bus.js.map +0 -1
  193. package/dist/events/core/event-registry.d.ts +0 -31
  194. package/dist/events/core/event-registry.js +0 -170
  195. package/dist/events/core/event-registry.js.map +0 -1
  196. package/dist/events/decorators/event.decorators.d.ts +0 -11
  197. package/dist/events/decorators/event.decorators.js +0 -123
  198. package/dist/events/decorators/event.decorators.js.map +0 -1
  199. package/dist/events/examples/system.events.d.ts +0 -15
  200. package/dist/events/examples/system.events.js.map +0 -1
  201. package/dist/events/examples/user.events.d.ts +0 -68
  202. package/dist/events/examples/user.events.js +0 -73
  203. package/dist/events/examples/user.events.js.map +0 -1
  204. package/dist/events/examples/user.handlers.d.ts +0 -20
  205. package/dist/events/examples/user.handlers.js +0 -157
  206. package/dist/events/examples/user.handlers.js.map +0 -1
  207. package/dist/events/middleware/logging.middleware.d.ts +0 -7
  208. package/dist/events/middleware/logging.middleware.js +0 -44
  209. package/dist/events/middleware/logging.middleware.js.map +0 -1
  210. package/dist/events/middleware/metrics.middleware.d.ts +0 -11
  211. package/dist/events/middleware/metrics.middleware.js +0 -87
  212. package/dist/events/middleware/metrics.middleware.js.map +0 -1
  213. package/dist/events/middleware/validation.middleware.d.ts +0 -8
  214. package/dist/events/middleware/validation.middleware.js +0 -63
  215. package/dist/events/middleware/validation.middleware.js.map +0 -1
  216. package/dist/events/store/memory-event-store.d.ts +0 -21
  217. package/dist/events/store/memory-event-store.js +0 -81
  218. package/dist/events/store/memory-event-store.js.map +0 -1
  219. package/dist/events/types/event.types.d.ts +0 -57
  220. package/dist/events/types/event.types.js.map +0 -1
  221. package/dist/examples/basic-api.d.ts +0 -1
  222. package/dist/examples/basic-api.js +0 -120
  223. package/dist/examples/basic-api.js.map +0 -1
  224. package/dist/logging/core/log-context.service.d.ts +0 -11
  225. package/dist/logging/core/log-context.service.js +0 -40
  226. package/dist/logging/core/log-context.service.js.map +0 -1
  227. package/dist/logging/core/startup-logger.service.js.map +0 -1
  228. package/dist/logging/decorators/log.decorator.d.ts +0 -11
  229. package/dist/logging/decorators/log.decorator.js +0 -80
  230. package/dist/logging/decorators/log.decorator.js.map +0 -1
  231. package/dist/logging/middleware/context.middleware.d.ts +0 -2
  232. package/dist/logging/middleware/context.middleware.js +0 -29
  233. package/dist/logging/middleware/context.middleware.js.map +0 -1
  234. package/dist/logging/middleware/request-logging.middleware.d.ts +0 -3
  235. package/dist/logging/middleware/request-logging.middleware.js +0 -78
  236. package/dist/logging/middleware/request-logging.middleware.js.map +0 -1
  237. package/dist/logging/types/logging.types.d.ts +0 -79
  238. package/dist/logging/types/logging.types.js +0 -3
  239. package/dist/logging/types/logging.types.js.map +0 -1
  240. package/dist/middlewares/auth.middleware.d.ts +0 -2
  241. package/dist/middlewares/auth.middleware.js +0 -20
  242. package/dist/middlewares/auth.middleware.js.map +0 -1
  243. package/dist/middlewares/cors.middleware.d.ts +0 -2
  244. package/dist/middlewares/cors.middleware.js +0 -16
  245. package/dist/middlewares/cors.middleware.js.map +0 -1
  246. package/dist/middlewares/swagger.middleware.d.ts +0 -6
  247. package/dist/middlewares/swagger.middleware.js +0 -84
  248. package/dist/middlewares/swagger.middleware.js.map +0 -1
  249. package/dist/repositories/user.repository.d.ts +0 -16
  250. package/dist/repositories/user.repository.js +0 -110
  251. package/dist/repositories/user.repository.js.map +0 -1
  252. package/dist/schemas/user.schemas.d.ts +0 -214
  253. package/dist/schemas/user.schemas.js +0 -71
  254. package/dist/schemas/user.schemas.js.map +0 -1
  255. package/dist/services/config-demo.service.d.ts +0 -10
  256. package/dist/services/config-demo.service.js +0 -88
  257. package/dist/services/config-demo.service.js.map +0 -1
  258. package/dist/services/user.service.d.ts +0 -21
  259. package/dist/services/user.service.js +0 -201
  260. package/dist/services/user.service.js.map +0 -1
  261. /package/dist/events/{types/event.types.js → event.types.js} +0 -0
@@ -1,28 +1,44 @@
1
1
  import 'reflect-metadata';
2
- import { Scope } from './container';
3
- import { Middleware } from './middleware';
4
- import { ZodSchema } from './validation';
5
- import { OpenAPIOperation, OpenAPIResponse } from './openapi';
6
- export declare const Injectable: (scope?: Scope) => ClassDecorator;
7
- export declare const Service: (scope?: Scope) => ClassDecorator;
8
- export declare const Repository: (scope?: Scope) => ClassDecorator;
2
+ import { ZodSchema } from 'zod';
3
+ import { FastifyRequest, FastifyReply } from 'fastify';
4
+ import { ComponentOptions } from './di-container';
5
+ export declare const METADATA_KEYS: {
6
+ controllerPrefix: string;
7
+ routes: string;
8
+ validationSchema: string;
9
+ paramTypes: string;
10
+ middleware: string;
11
+ autowiredProperties: string;
12
+ autowiredParams: string;
13
+ };
14
+ export type FastifyMiddleware = (request: FastifyRequest, reply: FastifyReply) => Promise<void> | void;
15
+ export declare const Component: (options?: ComponentOptions) => ClassDecorator;
16
+ export declare const Service: (options?: ComponentOptions) => ClassDecorator;
17
+ export declare const Repository: (options?: ComponentOptions) => ClassDecorator;
9
18
  export declare const Controller: (prefix?: string) => ClassDecorator;
10
19
  export declare const Get: (path?: string) => MethodDecorator;
11
20
  export declare const Post: (path?: string) => MethodDecorator;
12
21
  export declare const Put: (path?: string) => MethodDecorator;
13
22
  export declare const Delete: (path?: string) => MethodDecorator;
14
- export declare const Req: () => ParameterDecorator;
15
- export declare const Res: () => ParameterDecorator;
16
- export declare const Body: () => ParameterDecorator;
17
- export declare const Param: (name: string) => ParameterDecorator;
18
- export declare const Query: (name?: string) => ParameterDecorator;
19
- export declare const UseMiddleware: (...middlewares: Middleware[]) => MethodDecorator & ClassDecorator;
20
- export declare const ValidateBody: (schema: ZodSchema) => MethodDecorator;
21
- export declare const ValidateQuery: (schema: ZodSchema) => MethodDecorator;
22
- export declare const ValidateParams: (schema: ZodSchema) => MethodDecorator;
23
- export declare const ValidateResponse: (schema: ZodSchema) => MethodDecorator;
24
- export declare const InjectConfig: <T>(configClass: new () => T) => ParameterDecorator;
25
- export declare const ApiTags: (...tags: string[]) => ClassDecorator;
26
- export declare const ApiSecurity: (security: any[]) => ClassDecorator & MethodDecorator;
27
- export declare const ApiResponse: (statusCode: number, response: OpenAPIResponse) => ClassDecorator & MethodDecorator;
28
- export declare const ApiOperation: (operation: OpenAPIOperation) => MethodDecorator;
23
+ export declare const Patch: (path?: string) => MethodDecorator;
24
+ export declare const Body: () => (target: any, propertyKey: string | symbol, parameterIndex: number) => void;
25
+ export declare const Query: (name?: string) => (target: any, propertyKey: string | symbol, parameterIndex: number) => void;
26
+ export declare const Param: (name: string) => (target: any, propertyKey: string | symbol, parameterIndex: number) => void;
27
+ export declare const Req: () => (target: any, propertyKey: string | symbol, parameterIndex: number) => void;
28
+ export declare const Res: () => (target: any, propertyKey: string | symbol, parameterIndex: number) => void;
29
+ export interface ValidationDecoratorOptions {
30
+ body?: ZodSchema<any>;
31
+ query?: ZodSchema<any>;
32
+ params?: ZodSchema<any>;
33
+ /**
34
+ * Define response schemas for different HTTP status codes.
35
+ * The key is the status code (e.g., 200, 201) and the value is the Zod schema.
36
+ */
37
+ responses?: {
38
+ [statusCode: number]: ZodSchema<any>;
39
+ };
40
+ }
41
+ export declare const Schema: (schema: ValidationDecoratorOptions) => MethodDecorator;
42
+ export declare const UseMiddleware: (...middlewares: FastifyMiddleware[]) => MethodDecorator & ClassDecorator;
43
+ export declare const Autowired: (token?: any) => any;
44
+ //# sourceMappingURL=decorators.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"decorators.d.ts","sourceRoot":"","sources":["../../src/core/decorators.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAA;AACzB,OAAO,EAAK,SAAS,EAAE,MAAM,KAAK,CAAA;AAClC,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AACtD,OAAO,EAAE,gBAAgB,EAAoB,MAAM,gBAAgB,CAAA;AAInE,eAAO,MAAM,aAAa;;;;;;;;CAQzB,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG,CAC9B,OAAO,EAAE,cAAc,EACvB,KAAK,EAAE,YAAY,KAChB,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAA;AAUzB,eAAO,MAAM,SAAS,GAAI,UAAS,gBAAqB,KAAG,cAuB1D,CAAA;AACD,eAAO,MAAM,OAAO,GAAI,UAAS,gBAAqB,KAAG,cAAoC,CAAA;AAG7F,eAAO,MAAM,UAAU,GAAI,UAAS,gBAAqB,KAAG,cAAoC,CAAA;AAEhG,eAAO,MAAM,UAAU,GACpB,SAAQ,MAAW,KAAG,cAItB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AAM,SAAS,GAAI,QAAQ,GAAG,KAAG,GAqCvC,CAAA"}
@@ -1,204 +1,185 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ApiOperation = exports.ApiResponse = exports.ApiSecurity = exports.ApiTags = exports.InjectConfig = exports.ValidateResponse = exports.ValidateParams = exports.ValidateQuery = exports.ValidateBody = exports.UseMiddleware = exports.Query = exports.Param = exports.Body = exports.Res = exports.Req = exports.Delete = exports.Put = exports.Post = exports.Get = exports.Controller = exports.Repository = exports.Service = exports.Injectable = void 0;
3
+ exports.Autowired = exports.UseMiddleware = exports.Schema = exports.Res = exports.Req = exports.Param = exports.Query = exports.Body = exports.Patch = exports.Delete = exports.Put = exports.Post = exports.Get = exports.Controller = exports.Repository = exports.Service = exports.Component = exports.METADATA_KEYS = void 0;
4
4
  require("reflect-metadata");
5
- const container_1 = require("./container");
6
- // Class Decorators
7
- const Injectable = (scope = container_1.Scope.SINGLETON) => {
5
+ const di_container_1 = require("./di-container");
6
+ const component_registry_1 = require("./component-registry");
7
+ // --- Metadata Keys ---
8
+ exports.METADATA_KEYS = {
9
+ controllerPrefix: 'bootify:controller-prefix',
10
+ routes: 'bootify:routes',
11
+ validationSchema: 'bootify:validation-schema',
12
+ paramTypes: 'bootify:param-types',
13
+ middleware: 'bootify:middleware',
14
+ autowiredProperties: 'bootify:autowired-properties',
15
+ autowiredParams: 'bootify:autowired-params',
16
+ };
17
+ // export interface ComponentOptions {
18
+ // scope?: Scope
19
+ // /**
20
+ // * An array of tokens that this class should be bound to in the DI container.
21
+ // * Allows this class to be injected using an interface or symbol.
22
+ // */
23
+ // bindTo?: any[]
24
+ // }
25
+ const Component = (options = {}) => {
8
26
  return (target) => {
9
- container_1.container.register(target, scope);
10
- };
11
- };
12
- exports.Injectable = Injectable;
13
- const Service = (scope = container_1.Scope.SINGLETON) => {
14
- return (target) => {
15
- container_1.container.register(target, scope);
27
+ const scope = options.scope || di_container_1.Scope.SINGLETON;
28
+ // 1. Register the class by its own type (as before)
29
+ di_container_1.container.register(target, { useClass: target, scope: scope });
30
+ // 2. Add to the global component registry (as before)
31
+ component_registry_1.registeredComponents.add(target);
32
+ // 3. NEW: Automatically handle the interface/token bindings
33
+ if (options.bindTo && Array.isArray(options.bindTo)) {
34
+ console.log(`[DI] Binding '${target.name}' to tokens: [${options.bindTo
35
+ .map((t) => String(t))
36
+ .join(', ')}]`);
37
+ for (const token of options.bindTo) {
38
+ // Map the abstract token to this concrete class
39
+ di_container_1.container.register(token, { useClass: target, scope: scope });
40
+ }
41
+ }
16
42
  };
17
43
  };
44
+ exports.Component = Component;
45
+ const Service = (options = {}) => (0, exports.Component)(options);
18
46
  exports.Service = Service;
19
- const Repository = (scope = container_1.Scope.SINGLETON) => {
20
- return (target) => {
21
- container_1.container.register(target, scope);
22
- };
23
- };
47
+ // Repository can also be updated
48
+ const Repository = (options = {}) => (0, exports.Component)(options);
24
49
  exports.Repository = Repository;
25
- const Controller = (prefix = '') => {
26
- return (target) => {
27
- Reflect.defineMetadata('controller:prefix', prefix, target);
28
- container_1.container.register(target);
29
- };
50
+ const Controller = (prefix = '') => (target) => {
51
+ Reflect.defineMetadata(exports.METADATA_KEYS.controllerPrefix, prefix, target);
52
+ di_container_1.container.register(target, { useClass: target, scope: di_container_1.Scope.SINGLETON });
30
53
  };
31
54
  exports.Controller = Controller;
32
- // HTTP Method Decorators
33
- const Get = (path = '') => {
34
- return (target, propertyKey) => {
35
- Reflect.defineMetadata('route:method', 'GET', target, propertyKey);
36
- Reflect.defineMetadata('route:path', path, target, propertyKey);
37
- };
38
- };
39
- exports.Get = Get;
40
- const Post = (path = '') => {
41
- return (target, propertyKey) => {
42
- Reflect.defineMetadata('route:method', 'POST', target, propertyKey);
43
- Reflect.defineMetadata('route:path', path, target, propertyKey);
44
- };
45
- };
46
- exports.Post = Post;
47
- const Put = (path = '') => {
48
- return (target, propertyKey) => {
49
- Reflect.defineMetadata('route:method', 'PUT', target, propertyKey);
50
- Reflect.defineMetadata('route:path', path, target, propertyKey);
51
- };
52
- };
53
- exports.Put = Put;
54
- const Delete = (path = '') => {
55
+ const createRouteDecorator = (method) => (path = '/') => {
55
56
  return (target, propertyKey) => {
56
- Reflect.defineMetadata('route:method', 'DELETE', target, propertyKey);
57
- Reflect.defineMetadata('route:path', path, target, propertyKey);
58
- };
59
- };
60
- exports.Delete = Delete;
61
- // Parameter Decorators
62
- const Req = () => {
63
- return (target, propertyKey, parameterIndex) => {
64
- Reflect.defineMetadata(`param:${parameterIndex}`, { type: 'request' }, target, propertyKey);
65
- };
66
- };
67
- exports.Req = Req;
68
- const Res = () => {
69
- return (target, propertyKey, parameterIndex) => {
70
- Reflect.defineMetadata(`param:${parameterIndex}`, { type: 'response' }, target, propertyKey);
71
- };
72
- };
73
- exports.Res = Res;
74
- const Body = () => {
75
- return (target, propertyKey, parameterIndex) => {
76
- Reflect.defineMetadata(`param:${parameterIndex}`, { type: 'body' }, target, propertyKey);
77
- };
78
- };
57
+ const routes = Reflect.getMetadata(exports.METADATA_KEYS.routes, target.constructor) || [];
58
+ routes.push({
59
+ method,
60
+ path,
61
+ handlerName: propertyKey,
62
+ });
63
+ Reflect.defineMetadata(exports.METADATA_KEYS.routes, routes, target.constructor);
64
+ };
65
+ };
66
+ exports.Get = createRouteDecorator('GET');
67
+ exports.Post = createRouteDecorator('POST');
68
+ exports.Put = createRouteDecorator('PUT');
69
+ exports.Delete = createRouteDecorator('DELETE');
70
+ exports.Patch = createRouteDecorator('PATCH');
71
+ // --- Parameter Decorators ---
72
+ const createParamDecorator = (type, name) => (target, propertyKey, parameterIndex) => {
73
+ const params = Reflect.getMetadata(exports.METADATA_KEYS.paramTypes, target, propertyKey) || [];
74
+ params[parameterIndex] = { type, name };
75
+ Reflect.defineMetadata(exports.METADATA_KEYS.paramTypes, params, target, propertyKey);
76
+ };
77
+ const Body = () => createParamDecorator('body');
79
78
  exports.Body = Body;
80
- const Param = (name) => {
81
- return (target, propertyKey, parameterIndex) => {
82
- Reflect.defineMetadata(`param:${parameterIndex}`, { type: 'param', name }, target, propertyKey);
83
- };
84
- };
79
+ const Query = (name) => createParamDecorator('query', name);
80
+ exports.Query = Query;
81
+ const Param = (name) => createParamDecorator('param', name);
85
82
  exports.Param = Param;
86
- const Query = (name) => {
87
- return (target, propertyKey, parameterIndex) => {
88
- Reflect.defineMetadata(`param:${parameterIndex}`, { type: 'query', name }, target, propertyKey);
83
+ const Req = () => createParamDecorator('request');
84
+ exports.Req = Req;
85
+ const Res = () => createParamDecorator('reply');
86
+ exports.Res = Res;
87
+ // --- Validation Decorators ---
88
+ const Validate = (schema) => {
89
+ return (target, propertyKey) => {
90
+ Reflect.defineMetadata(exports.METADATA_KEYS.validationSchema, schema, target, propertyKey);
89
91
  };
90
92
  };
91
- exports.Query = Query;
92
- // Middleware Decorators
93
+ exports.Schema = Validate;
93
94
  const UseMiddleware = (...middlewares) => {
94
95
  return (target, propertyKey) => {
96
+ const key = exports.METADATA_KEYS.middleware;
95
97
  if (propertyKey) {
96
- // Method decorator
97
- Reflect.defineMetadata('middlewares', middlewares, target, propertyKey);
98
+ // Method Decorator
99
+ Reflect.defineMetadata(key, middlewares, target, propertyKey);
98
100
  }
99
101
  else {
100
- // Class decorator
101
- Reflect.defineMetadata('middlewares', middlewares, target);
102
+ // Class Decorator
103
+ Reflect.defineMetadata(key, middlewares, target);
102
104
  }
103
105
  };
104
106
  };
105
107
  exports.UseMiddleware = UseMiddleware;
106
- // Validation Decorators
107
- const ValidateBody = (schema) => {
108
- return (target, propertyKey) => {
109
- const existingValidation = Reflect.getMetadata('validation', target, propertyKey) || {};
110
- existingValidation.body = schema;
111
- Reflect.defineMetadata('validation', existingValidation, target, propertyKey);
112
- };
113
- };
114
- exports.ValidateBody = ValidateBody;
115
- const ValidateQuery = (schema) => {
116
- return (target, propertyKey) => {
117
- const existingValidation = Reflect.getMetadata('validation', target, propertyKey) || {};
118
- existingValidation.query = schema;
119
- Reflect.defineMetadata('validation', existingValidation, target, propertyKey);
120
- };
121
- };
122
- exports.ValidateQuery = ValidateQuery;
123
- const ValidateParams = (schema) => {
124
- return (target, propertyKey) => {
125
- const existingValidation = Reflect.getMetadata('validation', target, propertyKey) || {};
126
- existingValidation.params = schema;
127
- Reflect.defineMetadata('validation', existingValidation, target, propertyKey);
128
- };
129
- };
130
- exports.ValidateParams = ValidateParams;
131
- const ValidateResponse = (schema) => {
132
- return (target, propertyKey) => {
133
- const existingValidation = Reflect.getMetadata('validation', target, propertyKey) || {};
134
- existingValidation.response = schema;
135
- Reflect.defineMetadata('validation', existingValidation, target, propertyKey);
136
- };
137
- };
138
- exports.ValidateResponse = ValidateResponse;
139
- // Configuration injection decorator
140
- const InjectConfig = (configClass) => {
108
+ // export const Autowired = (): PropertyDecorator => {
109
+ // return (target: any, propertyKey: string | symbol) => {
110
+ // // Get the type of the property being decorated (e.g., TodoService class)
111
+ // const propertyType = Reflect.getMetadata('design:type', target, propertyKey)
112
+ // if (!propertyType) {
113
+ // throw new Error(
114
+ // `Could not resolve type for property '${String(propertyKey)}' on class '${
115
+ // target.constructor.name
116
+ // }'. Make sure 'emitDecoratorMetadata' is true in your tsconfig.json and the type is not a primitive or interface.`
117
+ // )
118
+ // }
119
+ // // Get existing autowired properties for the target class or initialize a new array
120
+ // const properties =
121
+ // Reflect.getMetadata(METADATA_KEYS.autowiredProperties, target.constructor) || []
122
+ // properties.push({
123
+ // propertyKey,
124
+ // type: propertyType,
125
+ // })
126
+ // // Save the updated list of properties back to the class metadata
127
+ // Reflect.defineMetadata(METADATA_KEYS.autowiredProperties, properties, target.constructor)
128
+ // }
129
+ // }
130
+ // export const Autowired = (token?: any): any => {
131
+ // return (target: any, propertyKey: string | symbol | undefined, parameterIndex?: number) => {
132
+ // // Check if it's being used as a Parameter Decorator
133
+ // if (typeof parameterIndex === 'number') {
134
+ // const constructorParams = Reflect.getMetadata('autowired:params', target) || []
135
+ // constructorParams[parameterIndex] = token
136
+ // Reflect.defineMetadata('autowired:params', constructorParams, target)
137
+ // return
138
+ // }
139
+ // // Existing Property Decorator logic
140
+ // const propertyType = propertyKey
141
+ // ? Reflect.getMetadata('design:type', target, propertyKey)
142
+ // : undefined
143
+ // if (!propertyType) {
144
+ // /* ... error handling ... */
145
+ // }
146
+ // const properties =
147
+ // Reflect.getMetadata(METADATA_KEYS.autowiredProperties, target.constructor) || []
148
+ // properties.push({
149
+ // propertyKey,
150
+ // // Use the explicit token if provided, otherwise fall back to the type
151
+ // token: token || propertyType,
152
+ // })
153
+ // Reflect.defineMetadata(METADATA_KEYS.autowiredProperties, properties, target.constructor)
154
+ // }
155
+ // }
156
+ const Autowired = (token) => {
141
157
  return (target, propertyKey, parameterIndex) => {
142
- const existingTypes = Reflect.getMetadata('design:paramtypes', target, propertyKey) || [];
143
- const existingConfigs = Reflect.getMetadata('inject:configs', target, propertyKey) || [];
144
- existingConfigs[parameterIndex] = configClass;
145
- Reflect.defineMetadata('inject:configs', existingConfigs, target, propertyKey);
146
- };
147
- };
148
- exports.InjectConfig = InjectConfig;
149
- // OpenAPI Documentation Decorators
150
- const ApiTags = (...tags) => {
151
- return (target) => {
152
- const existingMeta = Reflect.getMetadata('openapi:controller', target) || {};
153
- existingMeta.tags = [...(existingMeta.tags || []), ...tags];
154
- Reflect.defineMetadata('openapi:controller', existingMeta, target);
155
- };
156
- };
157
- exports.ApiTags = ApiTags;
158
- const ApiSecurity = (security) => {
159
- return (target, propertyKey) => {
160
- if (propertyKey) {
161
- // Method decorator
162
- const existingMeta = Reflect.getMetadata('openapi:method', target, propertyKey) || {};
163
- existingMeta.security = security;
164
- Reflect.defineMetadata('openapi:method', existingMeta, target, propertyKey);
158
+ // Constructor Parameter Injection
159
+ if (typeof parameterIndex === 'number') {
160
+ if (!token) {
161
+ throw new Error(`[DI] @Autowired token is required for constructor parameter injection in '${target.name}'. This is needed for interfaces.`);
162
+ }
163
+ const constructorParams = Reflect.getMetadata(exports.METADATA_KEYS.autowiredParams, target) || [];
164
+ constructorParams[parameterIndex] = token;
165
+ Reflect.defineMetadata(exports.METADATA_KEYS.autowiredParams, constructorParams, target);
166
+ return;
165
167
  }
166
- else {
167
- // Class decorator
168
- const existingMeta = Reflect.getMetadata('openapi:controller', target) || {};
169
- existingMeta.security = security;
170
- Reflect.defineMetadata('openapi:controller', existingMeta, target);
168
+ // Property (Field) Injection
169
+ const propertyType = propertyKey
170
+ ? Reflect.getMetadata('design:type', target, propertyKey)
171
+ : undefined;
172
+ const properties = Reflect.getMetadata(exports.METADATA_KEYS.autowiredProperties, target.constructor) || [];
173
+ const tokenToInject = token || propertyType;
174
+ if (!tokenToInject) {
175
+ throw new Error(`[DI] Could not resolve type for property '${String(propertyKey)}' on class '${target.constructor.name}'.`);
171
176
  }
177
+ properties.push({
178
+ propertyKey,
179
+ token: tokenToInject,
180
+ });
181
+ Reflect.defineMetadata(exports.METADATA_KEYS.autowiredProperties, properties, target.constructor);
172
182
  };
173
183
  };
174
- exports.ApiSecurity = ApiSecurity;
175
- const ApiResponse = (statusCode, response) => {
176
- return (target, propertyKey) => {
177
- if (propertyKey) {
178
- // Method decorator
179
- const existingMeta = Reflect.getMetadata('openapi:method', target, propertyKey) || {};
180
- if (!existingMeta.responses)
181
- existingMeta.responses = {};
182
- existingMeta.responses[statusCode.toString()] = response;
183
- Reflect.defineMetadata('openapi:method', existingMeta, target, propertyKey);
184
- }
185
- else {
186
- // Class decorator
187
- const existingMeta = Reflect.getMetadata('openapi:controller', target) || {};
188
- if (!existingMeta.responses)
189
- existingMeta.responses = {};
190
- existingMeta.responses[statusCode.toString()] = response;
191
- Reflect.defineMetadata('openapi:controller', existingMeta, target);
192
- }
193
- };
194
- };
195
- exports.ApiResponse = ApiResponse;
196
- const ApiOperation = (operation) => {
197
- return (target, propertyKey) => {
198
- const existingMeta = Reflect.getMetadata('openapi:method', target, propertyKey) || {};
199
- existingMeta.operation = operation;
200
- Reflect.defineMetadata('openapi:method', existingMeta, target, propertyKey);
201
- };
202
- };
203
- exports.ApiOperation = ApiOperation;
184
+ exports.Autowired = Autowired;
204
185
  //# sourceMappingURL=decorators.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"decorators.js","sourceRoot":"","sources":["../../src/core/decorators.ts"],"names":[],"mappings":";;;AAAA,4BAA0B;AAC1B,2CAA+C;AAM/C,mBAAmB;AACZ,MAAM,UAAU,GAAG,CAAC,QAAe,iBAAK,CAAC,SAAS,EAAkB,EAAE;IAC3E,OAAO,CAAC,MAAW,EAAE,EAAE;QACrB,qBAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IACpC,CAAC,CAAC;AACJ,CAAC,CAAC;AAJW,QAAA,UAAU,cAIrB;AAEK,MAAM,OAAO,GAAG,CAAC,QAAe,iBAAK,CAAC,SAAS,EAAkB,EAAE;IACxE,OAAO,CAAC,MAAW,EAAE,EAAE;QACrB,qBAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IACpC,CAAC,CAAC;AACJ,CAAC,CAAC;AAJW,QAAA,OAAO,WAIlB;AAEK,MAAM,UAAU,GAAG,CAAC,QAAe,iBAAK,CAAC,SAAS,EAAkB,EAAE;IAC3E,OAAO,CAAC,MAAW,EAAE,EAAE;QACrB,qBAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IACpC,CAAC,CAAC;AACJ,CAAC,CAAC;AAJW,QAAA,UAAU,cAIrB;AAEK,MAAM,UAAU,GAAG,CAAC,SAAiB,EAAE,EAAkB,EAAE;IAChE,OAAO,CAAC,MAAW,EAAE,EAAE;QACrB,OAAO,CAAC,cAAc,CAAC,mBAAmB,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;QAC5D,qBAAS,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC7B,CAAC,CAAC;AACJ,CAAC,CAAC;AALW,QAAA,UAAU,cAKrB;AAEF,yBAAyB;AAClB,MAAM,GAAG,GAAG,CAAC,OAAe,EAAE,EAAmB,EAAE;IACxD,OAAO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AAa,CAAC,eAAe,EAAE,iBAAiB,EAAE,MAAM,CAAC,CAAA;YAChF,OAAM;QACR,CAAC;QAED,6BAA6B;QAC7B,MAAM,YAAY,GAAG,WAAW;YAC9B,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC,aAAa,EAAE,MAAM,EAAE,WAAW,CAAC;YACzD,CAAC,CAAC,SAAS,CAAA;QACb,MAAM,UAAU,GACd,OAAO,CAAC,WAAW,CAAC,qBAAa,CAAC,mBAAmB,EAAE,MAAM,CAAC,WAAW,CAAC,IAAI,EAAE,CAAA;QAElF,MAAM,aAAa,GAAG,KAAK,IAAI,YAAY,CAAA;QAC3C,IAAI,CAAC,aAAa,EAAE,CAAC;YACnB,MAAM,IAAI,KAAK,CACb,6CAA6C,MAAM,CAAC,WAAW,CAAC,eAC9D,MAAM,CAAC,WAAW,CAAC,IACrB,IAAI,CACL,CAAA;QACH,CAAC;QAED,UAAU,CAAC,IAAI,CAAC;YACd,WAAW;YACX,KAAK,EAAE,aAAa;SACrB,CAAC,CAAA;QACF,OAAO,CAAC,cAAc,CAAC,qBAAa,CAAC,mBAAmB,EAAE,UAAU,EAAE,MAAM,CAAC,WAAW,CAAC,CAAA;IAC3F,CAAC,CAAA;AACH,CAAC,CAAA;AArCY,QAAA,SAAS,aAqCrB"}
@@ -0,0 +1,31 @@
1
+ export declare enum Scope {
2
+ SINGLETON = "singleton",
3
+ TRANSIENT = "transient"
4
+ }
5
+ import 'reflect-metadata';
6
+ export type Constructor<T = any> = new (...args: any[]) => T;
7
+ export type DiToken = any;
8
+ export type BindingScope = 'Singleton' | 'Transient';
9
+ export interface ComponentOptions {
10
+ bindTo?: DiToken[];
11
+ scope?: BindingScope;
12
+ eager?: boolean;
13
+ }
14
+ export interface RegistrationOptions {
15
+ useClass?: Constructor;
16
+ useFactory?: () => any;
17
+ scope?: BindingScope;
18
+ }
19
+ export declare const eagerIdentifiers: Set<any>;
20
+ export declare class Container {
21
+ private readonly services;
22
+ private readonly resolving;
23
+ register(token: DiToken, options: RegistrationOptions): void;
24
+ resolve<T>(token: DiToken): T;
25
+ private resolveConstructorArgs;
26
+ private performPropertyInjection;
27
+ getRegisteredComponents(): Constructor[];
28
+ isRegistered(token: DiToken): boolean;
29
+ }
30
+ export declare const container: Container;
31
+ //# sourceMappingURL=di-container.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"di-container.d.ts","sourceRoot":"","sources":["../../src/core/di-container.ts"],"names":[],"mappings":"AAMA,oBAAY,KAAK;IACf,SAAS,cAAc;IACvB,SAAS,cAAc;CACxB;AAkJD,OAAO,kBAAkB,CAAA;AAIzB,MAAM,MAAM,WAAW,CAAC,CAAC,GAAG,GAAG,IAAI,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,CAAA;AAC5D,MAAM,MAAM,OAAO,GAAG,GAAG,CAAA;AACzB,MAAM,MAAM,YAAY,GAAG,WAAW,GAAG,WAAW,CAAA;AAEpD,MAAM,WAAW,gBAAgB;IAC/B,MAAM,CAAC,EAAE,OAAO,EAAE,CAAA;IAClB,KAAK,CAAC,EAAE,YAAY,CAAA;IACpB,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB;AAED,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,EAAE,WAAW,CAAA;IACtB,UAAU,CAAC,EAAE,MAAM,GAAG,CAAA;IACtB,KAAK,CAAC,EAAE,YAAY,CAAA;CACrB;AAUD,eAAO,MAAM,gBAAgB,UAAqB,CAAA;AAGlD,qBAAa,SAAS;IACpB,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAwC;IACjE,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAqB;IAExC,QAAQ,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,mBAAmB,GAAG,IAAI;IAa5D,OAAO,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,GAAG,CAAC;IA2CpC,OAAO,CAAC,sBAAsB;IAgB9B,OAAO,CAAC,wBAAwB;IAQzB,uBAAuB,IAAI,WAAW,EAAE;IAKxC,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO;CAG7C;AAED,eAAO,MAAM,SAAS,WAAkB,CAAA"}