@hg-ts/http-controller 0.5.25 → 0.5.26

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,6 +5,6 @@ export declare const EXCEPTION_METADATA_KEY: unique symbol;
5
5
  export declare class Http {
6
6
  private constructor();
7
7
  static ExceptionStatus(exception: Class<BaseException, any[]>, statusCode: number): MethodDecorator;
8
- static ValidatedHeader<T>(headerName: string, schema: z.ZodSchema<T>): ParameterDecorator;
8
+ static ValidatedHeader<T>(headerName: string, schema: z.ZodSchema<T>): () => ParameterDecorator;
9
9
  }
10
10
  //# sourceMappingURL=decorators.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"decorators.d.ts","sourceRoot":"","sources":["../../src/decorators/decorators.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAEN,CAAC,EACD,MAAM,mBAAmB,CAAC;AAS3B,MAAM,MAAM,YAAY,GAAG,GAAG,CAAC,KAAK,CAAC,aAAa,EAAE,GAAG,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC;AAEpE,eAAO,MAAM,sBAAsB,eAAmC,CAAC;AAEvE,qBAAa,IAAI;IAChB,OAAO;WAEO,eAAe,CAAC,SAAS,EAAE,KAAK,CAAC,aAAa,EAAE,GAAG,EAAE,CAAC,EAAE,UAAU,EAAE,MAAM,GAAG,eAAe;WA4B5F,eAAe,CAAC,CAAC,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,kBAAkB;CAQhG"}
1
+ {"version":3,"file":"decorators.d.ts","sourceRoot":"","sources":["../../src/decorators/decorators.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAEN,CAAC,EACD,MAAM,mBAAmB,CAAC;AAS3B,MAAM,MAAM,YAAY,GAAG,GAAG,CAAC,KAAK,CAAC,aAAa,EAAE,GAAG,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC;AAEpE,eAAO,MAAM,sBAAsB,eAAmC,CAAC;AAEvE,qBAAa,IAAI;IAChB,OAAO;WAEO,eAAe,CAAC,SAAS,EAAE,KAAK,CAAC,aAAa,EAAE,GAAG,EAAE,CAAC,EAAE,UAAU,EAAE,MAAM,GAAG,eAAe;WA4B5F,eAAe,CAAC,CAAC,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,MAAM,kBAAkB;CAQtG"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hg-ts/http-controller",
3
- "version": "0.5.25",
3
+ "version": "0.5.26",
4
4
  "main": "dist/index.js",
5
5
  "type": "module",
6
6
  "exports": {
@@ -18,15 +18,15 @@
18
18
  "test:dev": "vitest watch"
19
19
  },
20
20
  "devDependencies": {
21
- "@hg-ts-config/typescript": "0.5.25",
22
- "@hg-ts/exception": "0.5.25",
23
- "@hg-ts/execution-mode": "0.5.25",
24
- "@hg-ts/knex": "0.5.25",
25
- "@hg-ts/linter": "0.5.25",
26
- "@hg-ts/logger": "0.5.25",
27
- "@hg-ts/tests": "0.5.25",
28
- "@hg-ts/types": "0.5.25",
29
- "@hg-ts/validation": "0.5.25",
21
+ "@hg-ts-config/typescript": "0.5.26",
22
+ "@hg-ts/exception": "0.5.26",
23
+ "@hg-ts/execution-mode": "0.5.26",
24
+ "@hg-ts/knex": "0.5.26",
25
+ "@hg-ts/linter": "0.5.26",
26
+ "@hg-ts/logger": "0.5.26",
27
+ "@hg-ts/tests": "0.5.26",
28
+ "@hg-ts/types": "0.5.26",
29
+ "@hg-ts/validation": "0.5.26",
30
30
  "@nestjs/common": "11.1.0",
31
31
  "@nestjs/core": "11.1.0",
32
32
  "@nestjs/platform-fastify": "11.1.0",
@@ -47,11 +47,11 @@
47
47
  "vitest": "4.0.14"
48
48
  },
49
49
  "peerDependencies": {
50
- "@hg-ts/exception": "0.5.25",
51
- "@hg-ts/execution-mode": "0.5.25",
52
- "@hg-ts/knex": "0.5.25",
53
- "@hg-ts/logger": "0.5.25",
54
- "@hg-ts/validation": "0.5.25",
50
+ "@hg-ts/exception": "0.5.26",
51
+ "@hg-ts/execution-mode": "0.5.26",
52
+ "@hg-ts/knex": "0.5.26",
53
+ "@hg-ts/logger": "0.5.26",
54
+ "@hg-ts/validation": "0.5.26",
55
55
  "@nestjs/common": "*",
56
56
  "@nestjs/core": "*",
57
57
  "@nestjs/platform-fastify": "*",
@@ -46,7 +46,7 @@ export class Http {
46
46
  };
47
47
  }
48
48
 
49
- public static ValidatedHeader<T>(headerName: string, schema: z.ZodSchema<T>): ParameterDecorator {
49
+ public static ValidatedHeader<T>(headerName: string, schema: z.ZodSchema<T>): () => ParameterDecorator {
50
50
  return createParamDecorator((_data: unknown, ctx): T => {
51
51
  const request = ctx.switchToHttp().getRequest<FastifyRequest>();
52
52
  const header = request.headers[headerName];