File tree Expand file tree Collapse file tree 7 files changed +24
-334
lines changed 
test/integration/test/server/utils Expand file tree Collapse file tree 7 files changed +24
-334
lines changed Original file line number Diff line number Diff line change 7070  "devDependencies" : {
7171    "@remix-run/node" : " ^1.4.3" 
7272    "@remix-run/react" : " ^1.4.3" 
73-     "@types/express" : " ^4.17.14" 
74-     "fastify" : " ^4.26.2" 
75-     "typescript" : " ^5.4.4" 
73+     "@types/express" : " ^4.17.14" 
7674  },
7775  "peerDependencies" : {
7876    "@remix-run/node" : " 1.x || 2.x" 
Original file line number Diff line number Diff line change 1- import  {  type  ExpressCreateHandlerWrapper  }  from  '../vendor/types' ; 
21import  {  SupportedFramework ,  prepareWrapCreateRequestHandler  }  from  './shared' ; 
32
43/** 
54 * Instruments `createRequestHandler` from `@remix-run/express` 
65 */ 
7- export  const  wrapExpressCreateRequestHandler  =  prepareWrapCreateRequestHandler ( SupportedFramework . Express )   as   ExpressCreateHandlerWrapper ; 
6+ export  const  wrapExpressCreateRequestHandler  =  prepareWrapCreateRequestHandler ( SupportedFramework . Express ) ; 
Original file line number Diff line number Diff line change 1- import  {  type  FastifyCreateHandlerWrapper  }  from  '../vendor/types' ; 
21import  {  SupportedFramework ,  prepareWrapCreateRequestHandler  }  from  './shared' ; 
32
43/** 
54 * Instruments `createRequestHandler` from `@mcansh/remix-fastify` 
65 */ 
7- export  const  wrapFastifyCreateRequestHandler  =  prepareWrapCreateRequestHandler ( SupportedFramework . Fastify )   as   FastifyCreateHandlerWrapper ; 
6+ export  const  wrapFastifyCreateRequestHandler  =  prepareWrapCreateRequestHandler ( SupportedFramework . Fastify ) ; 
Original file line number Diff line number Diff line change @@ -15,8 +15,6 @@ import type { PolymorphicRequest } from '@sentry/types';
1515import  type  *  as  Express  from  'express' ; 
1616import  type  {  ComponentType  }  from  'react' ; 
1717
18- import  type  *  as  Fastify  from  'fastify' 
19- 
2018type  Dev  =  { 
2119  command ?: string ; 
2220  scheme ?: string ; 
@@ -240,9 +238,8 @@ export interface AssetsManifest {
240238} 
241239
242240export  type  GenericRequestHandler  =  ( req : any ,  res : any ,  next : any )  =>  Promise < void > ; 
241+ 
243242export  type  CreateGenericRequestHandler  =  ( this : unknown ,  options : any )  =>  GenericRequestHandler ; 
244- export  type  ExpressCreateHandlerWrapper  =  ( createHandler : CreateGenericRequestHandler )  =>  ( opts : CreateRequestHandlerOptions )  =>  Express . RequestHandler 
245- export  type  FastifyCreateHandlerWrapper  =  ( createHandler : CreateGenericRequestHandler )  =>  ( opts : CreateRequestHandlerOptions )  =>  Fastify . RouteHandlerMethod ; 
246243
247244export  interface  CreateRequestHandlerOptions  { 
248245  build : ServerBuild  |  ( ( )  =>  ServerBuild )  |  ( ( )  =>  Promise < ServerBuild > ) ; 
Original file line number Diff line number Diff line change @@ -31,11 +31,11 @@ const runExpressApp = (adapter: Adapter.Builtin | Adapter.Express): Promise<http
3131  } 
3232) 
3333
34- const  runFastifyApp  =  ( ) : Promise < http . Server >  =>  new  Promise ( async   res  =>  { 
34+ const  runFastifyApp  =  ( ) : Promise < http . Server >  =>  new  Promise ( res  =>  { 
3535  const  app  =  fastify ( ) ; 
36-   await   app . register ( formBody ) ; 
37-   const   handler   =   adapters [ Adapter . Fastify ] ( {   build :  require ( '../../../build' )   } ) ; 
38-   app . all ( '*' ,  handler ) ; 
36+   app . register ( formBody ) ; 
37+   //  @ts -ignore 
38+   app . all ( '*' ,  adapters [ Adapter . Fastify ] ( {   build :  require ( '../../../build' )   } ) ) ; 
3939  app . listen ( { port : 0 } ,  ( _err ,  _addr )  =>  { 
4040    res ( app . server ) 
4141  } ) ; 
Original file line number Diff line number Diff line change 55
66  "compilerOptions" : {
77    "jsx" : " react" 
8-     "module" : " es2020" 
9-     "ignoreDeprecations" : " 5.0" 
8+     "module" : " es2020" 
109  }
1110}
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments