@asapjs/router 0.10.21 → 0.10.23

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.
@@ -5,9 +5,9 @@ interface RouterControllerWithRoutes extends InstanceType<typeof RouterControlle
5
5
  routes: IDecoratorPreference[];
6
6
  [key: string]: any;
7
7
  }
8
- export declare function Get(path: string, options: IPreference): (target: RouterControllerWithRoutes, propertyKey: string, descriptor: PropertyDescriptor) => void;
9
- export declare function Post(path: string, options: IPreference): (target: RouterControllerWithRoutes, propertyKey: string, descriptor: PropertyDescriptor) => void;
10
- export declare function Put(path: string, options: IPreference): (target: RouterControllerWithRoutes, propertyKey: string, descriptor: PropertyDescriptor) => void;
11
- export declare function Delete(path: string, options: IPreference): (target: RouterControllerWithRoutes, propertyKey: string, descriptor: PropertyDescriptor) => void;
8
+ export declare function Get(path: string, options: IPreference): (target: RouterControllerWithRoutes, propertyKey: string) => void;
9
+ export declare function Post(path: string, options: IPreference): (target: RouterControllerWithRoutes, propertyKey: string) => void;
10
+ export declare function Put(path: string, options: IPreference): (target: RouterControllerWithRoutes, propertyKey: string) => void;
11
+ export declare function Delete(path: string, options: IPreference): (target: RouterControllerWithRoutes, propertyKey: string) => void;
12
12
  export {};
13
13
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/decorator/index.ts"],"names":[],"mappings":"AAAA,OAAO,gBAAgB,EAAE,EAAE,oBAAoB,EAAE,WAAW,EAAc,MAAM,mBAAmB,CAAC;AAEpG,MAAM,WAAW,QAAS,SAAQ,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC;CAAG;AAE9D,UAAU,0BAA2B,SAAQ,YAAY,CAAC,OAAO,gBAAgB,CAAC;IAChF,MAAM,EAAE,oBAAoB,EAAE,CAAC;IAC/B,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAaD,wBAAgB,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,qGAErD;AAED,wBAAgB,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,qGAEtD;AAED,wBAAgB,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,qGAErD;AAED,wBAAgB,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,qGAExD"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/decorator/index.ts"],"names":[],"mappings":"AAAA,OAAO,gBAAgB,EAAE,EAAE,oBAAoB,EAAE,WAAW,EAAc,MAAM,mBAAmB,CAAC;AAEpG,MAAM,WAAW,QAAS,SAAQ,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC;CAAG;AAE9D,UAAU,0BAA2B,SAAQ,YAAY,CAAC,OAAO,gBAAgB,CAAC;IAChF,MAAM,EAAE,oBAAoB,EAAE,CAAC;IAC/B,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAiBD,wBAAgB,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,qEAErD;AAED,wBAAgB,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,qEAEtD;AAED,wBAAgB,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,qEAErD;AAED,wBAAgB,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,qEAExD"}
@@ -2,7 +2,10 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Delete = exports.Put = exports.Post = exports.Get = void 0;
4
4
  function Route(path, method, options) {
5
- return function (target, propertyKey, descriptor) {
5
+ return function (target, propertyKey) {
6
+ if (!target.routes) {
7
+ target.routes = [];
8
+ }
6
9
  target.routes.push(Object.assign(Object.assign({ method,
7
10
  path }, options), { excute: target[propertyKey] }));
8
11
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/decorator/index.ts"],"names":[],"mappings":";;;AASA,SAAS,KAAK,CAAC,IAAY,EAAE,MAAkB,EAAE,OAAiB;IAChE,OAAO,UAAU,MAAkC,EAAE,WAAmB,EAAE,UAA8B;QACtG,MAAM,CAAC,MAAM,CAAC,IAAI,+BAChB,MAAM;YACN,IAAI,IACD,OAAO,KACV,MAAM,EAAE,MAAM,CAAC,WAAW,CAAC,IAC3B,CAAC;IACL,CAAC,CAAC;AACJ,CAAC;AAED,SAAgB,GAAG,CAAC,IAAY,EAAE,OAAoB;IACpD,OAAO,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;AACrC,CAAC;AAFD,kBAEC;AAED,SAAgB,IAAI,CAAC,IAAY,EAAE,OAAoB;IACrD,OAAO,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;AACtC,CAAC;AAFD,oBAEC;AAED,SAAgB,GAAG,CAAC,IAAY,EAAE,OAAoB;IACpD,OAAO,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;AACrC,CAAC;AAFD,kBAEC;AAED,SAAgB,MAAM,CAAC,IAAY,EAAE,OAAoB;IACvD,OAAO,KAAK,CAAC,IAAI,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;AACxC,CAAC;AAFD,wBAEC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/decorator/index.ts"],"names":[],"mappings":";;;AASA,SAAS,KAAK,CAAC,IAAY,EAAE,MAAkB,EAAE,OAAiB;IAChE,OAAO,UAAU,MAAkC,EAAE,WAAmB;QACtE,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE;YAClB,MAAM,CAAC,MAAM,GAAG,EAAE,CAAC;SACpB;QAED,MAAM,CAAC,MAAM,CAAC,IAAI,+BAChB,MAAM;YACN,IAAI,IACD,OAAO,KACV,MAAM,EAAE,MAAM,CAAC,WAAW,CAAC,IAC3B,CAAC;IACL,CAAC,CAAC;AACJ,CAAC;AAED,SAAgB,GAAG,CAAC,IAAY,EAAE,OAAoB;IACpD,OAAO,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;AACrC,CAAC;AAFD,kBAEC;AAED,SAAgB,IAAI,CAAC,IAAY,EAAE,OAAoB;IACrD,OAAO,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;AACtC,CAAC;AAFD,oBAEC;AAED,SAAgB,GAAG,CAAC,IAAY,EAAE,OAAoB;IACpD,OAAO,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;AACrC,CAAC;AAFD,kBAEC;AAED,SAAgB,MAAM,CAAC,IAAY,EAAE,OAAoB;IACvD,OAAO,KAAK,CAAC,IAAI,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;AACxC,CAAC;AAFD,wBAEC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@asapjs/router",
3
- "version": "0.10.21",
3
+ "version": "0.10.23",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -23,7 +23,7 @@
23
23
  "winston": "^3.6.0"
24
24
  },
25
25
  "devDependencies": {
26
- "@asapjs/core": "^0.10.21",
26
+ "@asapjs/core": "^0.10.23",
27
27
  "@asapjs/sequelize": "^0.10.20",
28
28
  "@types/body-parser": "^1.19.2",
29
29
  "@types/cors": "^2.8.12",
@@ -33,5 +33,5 @@
33
33
  "@types/swagger-ui-express": "^4.1.3",
34
34
  "typescript": "^4.6.2"
35
35
  },
36
- "gitHead": "ede0899f8fa9c2bb0a3d10564129f258b625baa0"
36
+ "gitHead": "e0fac7b17a6098aea837c8e6a5f47e765e431e27"
37
37
  }