damex 2.0.5 → 2.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/classes/Server.js CHANGED
@@ -9,7 +9,7 @@ const express_1 = __importDefault(require("express"));
9
9
  class Server {
10
10
  constructor() {
11
11
  this.app = (0, express_1.default)();
12
- this.setupControllers();
12
+ this.setupControllers(this.app);
13
13
  }
14
14
  start(port = 3000) {
15
15
  this.app.listen(port, () => {
@@ -19,12 +19,12 @@ class Server {
19
19
  use(...handlers) {
20
20
  this.app.use(handlers);
21
21
  }
22
- setupControllers() {
22
+ setupControllers(app) {
23
23
  const controllers = Reflect.getMetadata(enums_1.ServerConfigsParams.Controllers, Server);
24
- this.use(express_1.default.json());
24
+ app.use(express_1.default.json());
25
25
  controllers.forEach((controller) => {
26
26
  const router = Reflect.getMetadata(enums_1.ServerConfigsParams.Router, controller);
27
- this.use(router);
27
+ app.use(router);
28
28
  });
29
29
  }
30
30
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Server.js","sourceRoot":"","sources":["../../src/classes/Server.ts"],"names":[],"mappings":";;;;;;AAAA,0CAAqD;AACrD,sDAAyE;AAEzE,MAAa,MAAM;IAGf;QAFiB,QAAG,GAAgB,IAAA,iBAAO,GAAE,CAAC;QAG1C,IAAI,CAAC,gBAAgB,EAAE,CAAC;IAC5B,CAAC;IAED,KAAK,CAAC,OAAe,IAAI;QACrB,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,GAAG,EAAE;YACvB,OAAO,CAAC,GAAG,CAAC,+BAA+B,IAAI,KAAK,CAAC,CAAC;QAC1D,CAAC,CAAC,CAAC;IACP,CAAC;IAED,GAAG,CAAC,GAAG,QAA0B;QAC7B,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IAC3B,CAAC;IAEO,gBAAgB;QACpB,MAAM,WAAW,GAAG,OAAO,CAAC,WAAW,CACnC,2BAAmB,CAAC,WAA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ACb,CAAC;YACF,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QACpB,CAAC,CAAC,CAAC;IACP,CAAC;CACJ;AAlCD,wBAkCC"}
@@ -1,5 +1,5 @@
1
- export declare const Get: (path?: string) => (target: any, propertyKey: string) => void;
2
- export declare const Post: (path?: string) => (target: any, propertyKey: string) => void;
3
- export declare const Put: (path?: string) => (target: any, propertyKey: string) => void;
4
- export declare const Patch: (path?: string) => (target: any, propertyKey: string) => void;
5
- export declare const Delete: (path?: string) => (target: any, propertyKey: string) => void;
1
+ export declare const Get: (path?: string) => (target: any, propertyKey: any) => any;
2
+ export declare const Post: (path?: string) => (target: any, propertyKey: any) => any;
3
+ export declare const Put: (path?: string) => (target: any, propertyKey: any) => any;
4
+ export declare const Patch: (path?: string) => (target: any, propertyKey: any) => any;
5
+ export declare const Delete: (path?: string) => (target: any, propertyKey: any) => any;
@@ -1 +1 @@
1
- {"version":3,"file":"http-methods.decorator.js","sourceRoot":"","sources":["../../src/decorators/http-methods.decorator.ts"],"names":[],"mappings":";;;AAAA,0CAAsE;AAEtE,SAAS,gBAAgB,CAAC,MAAmB;IACzC,OAAO,UAAU,IAAa;QAC1B,OAAO,UAAU,MAAW,EAAE,WAAmB;YAC7C,OAAO,CAAC,cAAc,CAClB,WAAW,EACX,MAAM,EACN,MAAM,EACN,+BAAuB,CAAC,MAAM,CACjC,CAAC;YACF,OAAO,CAAC,cAAc,CAClB,WAAW,EACX,IAAI,EACJ,MAAM,EACN,+BAAuB,CAAC,IAAI,CAC/B,CAAC;QACN,CAAC,CAAC;IACN,CAAC,CAAC;AACN,CAAC;AAEY,QAAA,GAAG,GAAG,gBAAgB,CAAC,mBAAW,CAAC,GAAG,CAAC,CAAC;AACxC,QAAA,IAAI,GAAG,gBAAgB,CAAC,mBAAW,CAAC,IAAI,CAAC,CAAC;AAC1C,QAAA,GAAG,GAAG,gBAAgB,CAAC,mBAAW,CAAC,GAAG,CAAC,CAAC;AACxC,QAAA,KAAK,GAAG,gBAAgB,CAAC,mBAAW,CAAC,KAAK,CAAC,CAAC;AAC5C,QAAA,MAAM,GAAG,gBAAgB,CAAC,mBAAW,CAAC,MAAM,CAAC,CAAC"}
1
+ {"version":3,"file":"http-methods.decorator.js","sourceRoot":"","sources":["../../src/decorators/http-methods.decorator.ts"],"names":[],"mappings":";;;AAAA,0CAAsE;AAEtE,SAAS,gBAAgB,CAAC,MAAmB;IACzC,OAAO,UAAU,IAAa;QAC1B,OAAO,UAAU,MAAW,EAAE,WAAgB;YAC1C,OAAO,CAAC,cAAc,CAClB,WAAW,EACX,MAAM,EACN,MAAM,EACN,+BAAuB,CAAC,MAAM,CACjC,CAAC;YACF,OAAO,CAAC,cAAc,CAClB,WAAW,EACX,IAAI,EACJ,MAAM,EACN,+BAAuB,CAAC,IAAI,CAC/B,CAAC;QACN,CAAC,CAAC;IACN,CAAC,CAAC;AACN,CAAC;AAEY,QAAA,GAAG,GAAG,gBAAgB,CAAC,mBAAW,CAAC,GAAG,CAAC,CAAC;AACxC,QAAA,IAAI,GAAG,gBAAgB,CAAC,mBAAW,CAAC,IAAI,CAAC,CAAC;AAC1C,QAAA,GAAG,GAAG,gBAAgB,CAAC,mBAAW,CAAC,GAAG,CAAC,CAAC;AACxC,QAAA,KAAK,GAAG,gBAAgB,CAAC,mBAAW,CAAC,KAAK,CAAC,CAAC;AAC5C,QAAA,MAAM,GAAG,gBAAgB,CAAC,mBAAW,CAAC,MAAM,CAAC,CAAC"}
@@ -1,2 +1,2 @@
1
1
  import type { RequestHandler } from 'express';
2
- export declare function Middleware(handlers: RequestHandler[]): (target: any, propertyKey: string) => any;
2
+ export declare function Middleware(handlers: RequestHandler[]): (target: any, propertyKey: any) => any;
@@ -1 +1 @@
1
- {"version":3,"file":"middleware.decorator.js","sourceRoot":"","sources":["../../src/decorators/middleware.decorator.ts"],"names":[],"mappings":";;AAGA,gCASC;AAZD,0CAAyD;AAGzD,SAAgB,UAAU,CAAC,QAA0B;IACjD,OAAO,UAAU,MAAW,EAAE,WAAmB;QAC7C,OAAO,CAAC,cAAc,CAClB,WAAW,EACX,QAAQ,EACR,MAAM,EACN,+BAAuB,CAAC,UAAU,CACrC,CAAC;IACN,CAAC,CAAC;AACN,CAAC"}
1
+ {"version":3,"file":"middleware.decorator.js","sourceRoot":"","sources":["../../src/decorators/middleware.decorator.ts"],"names":[],"mappings":";;AAGA,gCASC;AAZD,0CAAyD;AAGzD,SAAgB,UAAU,CAAC,QAA0B;IACjD,OAAO,UAAU,MAAW,EAAE,WAAgB;QAC1C,OAAO,CAAC,cAAc,CAClB,WAAW,EACX,QAAQ,EACR,MAAM,EACN,+BAAuB,CAAC,UAAU,CACrC,CAAC;IACN,CAAC,CAAC;AACN,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "damex",
3
3
  "module": "./index.js",
4
- "version": "2.0.5",
4
+ "version": "2.0.7",
5
5
  "author": {
6
6
  "email": "matusalem.dev@gmail.com",
7
7
  "name": "Matusal3m",