@@ -12,18 +12,7 @@ import {
12
12
FastifyAdapter ,
13
13
NestFastifyApplication ,
14
14
} from '@nestjs/platform-fastify' ;
15
- import type {
16
- FastifyInstance ,
17
- FastifyReply ,
18
- FastifyRequest ,
19
- HTTPMethods ,
20
- RawReplyDefaultExpression ,
21
- RawRequestDefaultExpression ,
22
- RawServerBase ,
23
- RawServerDefault ,
24
- RequestGenericInterface ,
25
- RouteOptions ,
26
- } from 'fastify' ;
15
+ import type { FastifyInstance , HTTPMethods , RouteOptions } from 'fastify' ;
27
16
import rawBody from 'fastify-raw-body' ;
28
17
import * as zlib from 'node:zlib' ;
29
18
import { uniqueDiscoveredMethods } from '~/common/discovery-unique-methods' ;
@@ -45,41 +34,8 @@ export type NestHttpApplication = NestFastifyApplication & {
45
34
46
35
export class HttpAdapterHost extends HttpAdapterHostImpl < HttpAdapter > { }
47
36
48
- type FastifyRawRequest < TServer extends RawServerBase > =
49
- RawRequestDefaultExpression < TServer > & {
50
- originalUrl ?: string ;
51
- } ;
52
-
53
37
// @ts -expect-error Convert private methods to protected
54
- class PatchedFastifyAdapter <
55
- TServer extends RawServerBase = RawServerDefault ,
56
- TRawRequest extends FastifyRawRequest < TServer > = FastifyRawRequest < TServer > ,
57
- TRawResponse extends RawReplyDefaultExpression < TServer > = RawReplyDefaultExpression < TServer > ,
58
- TRequest extends FastifyRequest <
59
- RequestGenericInterface ,
60
- TServer ,
61
- TRawRequest
62
- > = FastifyRequest < RequestGenericInterface , TServer , TRawRequest > ,
63
- TReply extends FastifyReply <
64
- RequestGenericInterface ,
65
- TServer ,
66
- TRawRequest ,
67
- TRawResponse
68
- > = FastifyReply < RequestGenericInterface , TServer , TRawRequest , TRawResponse > ,
69
- TInstance extends FastifyInstance <
70
- TServer ,
71
- TRawRequest ,
72
- TRawResponse
73
- > = FastifyInstance < TServer , TRawRequest , TRawResponse > ,
74
- > extends FastifyAdapter <
75
- TServer ,
76
- TRawRequest ,
77
- TRawResponse ,
78
- TRequest ,
79
- // @ts -expect-error they haven't upgraded to v5 signature yet.
80
- TReply ,
81
- TInstance
82
- > {
38
+ class PatchedFastifyAdapter extends FastifyAdapter {
83
39
protected injectRouteOptions (
84
40
routerMethodKey : Uppercase < HTTPMethods > ,
85
41
...args : any [ ]
0 commit comments