11import { PassThrough } from 'node:stream'
2- import { createReadableStreamFromReadable } from '@react-router/node' ;
3-
2+ import { createReadableStreamFromReadable } from '@react-router/node'
43
54import * as Sentry from '@sentry/remix'
65import chalk from 'chalk'
76import { isbot } from 'isbot'
87import { renderToPipeableStream } from 'react-dom/server'
9- import { ServerRouter ,
10- type LoaderFunctionArgs ,
11- type ActionFunctionArgs ,
12- type HandleDocumentRequestFunction } from 'react-router' ;
8+ import {
9+ ServerRouter ,
10+ type LoaderFunctionArgs ,
11+ type ActionFunctionArgs ,
12+ type HandleDocumentRequestFunction ,
13+ } from 'react-router'
1314import { getEnv , init } from './utils/env.server.ts'
1415import { getInstanceInfo } from './utils/litefs.server.ts'
1516import { NonceProvider } from './utils/nonce-provider.ts'
@@ -53,7 +54,11 @@ export default async function handleRequest(...args: DocRequestArgs) {
5354
5455 const { pipe, abort } = renderToPipeableStream (
5556 < NonceProvider value = { nonce } >
56- < ServerRouter nonce = { nonce } context = { reactRouterContext } url = { request . url } />
57+ < ServerRouter
58+ nonce = { nonce }
59+ context = { reactRouterContext }
60+ url = { request . url }
61+ />
5762 </ NonceProvider > ,
5863 {
5964 [ callbackName ] : ( ) => {
@@ -79,7 +84,7 @@ export default async function handleRequest(...args: DocRequestArgs) {
7984 )
8085
8186 setTimeout ( abort , streamTimeout + 5000 )
82- } ) ;
87+ } )
8388}
8489
8590export async function handleDataRequest ( response : Response ) {
@@ -103,12 +108,7 @@ export function handleError(
103108 }
104109 if ( error instanceof Error ) {
105110 console . error ( chalk . red ( error . stack ) )
106- void Sentry . captureRemixServerException (
107- error ,
108- 'remix.server' ,
109- request ,
110- true ,
111- )
111+ void Sentry . captureRemixServerException ( error , 'remix.server' , request )
112112 } else {
113113 console . error ( error )
114114 Sentry . captureException ( error )
0 commit comments