@@ -45,14 +45,14 @@ export class ISRHandler {
4545 config . indexHtml ,
4646 config . commonEngine ,
4747 config . bootstrap ,
48- config . browserDistFolder
48+ config . browserDistFolder ,
4949 ) ;
5050 }
5151
5252 async invalidate (
5353 req : Request ,
5454 res : Response ,
55- config ?: InvalidateConfig
55+ config ?: InvalidateConfig ,
5656 ) : Promise < any > {
5757 const { token, urlsToInvalidate } = extractDataFromBody ( req ) ;
5858 const { indexHtml } = this . config ;
@@ -125,20 +125,21 @@ export class ISRHandler {
125125 const invalidatedUrls = variantUrlsToInvalidate
126126 . map ( ( val ) => val . cacheKey )
127127 . filter (
128- ( cacheKey ) => ! notInCache . includes ( cacheKey ) && ! urlWithErrors [ cacheKey ]
128+ ( cacheKey ) =>
129+ ! notInCache . includes ( cacheKey ) && ! urlWithErrors [ cacheKey ] ,
129130 ) ;
130131
131132 if ( notInCache . length ) {
132133 this . logger . log (
133- `Urls: ${ notInCache . join ( ', ' ) } does not exist in cache.`
134+ `Urls: ${ notInCache . join ( ', ' ) } does not exist in cache.` ,
134135 ) ;
135136 }
136137
137138 if ( Object . keys ( urlWithErrors ) . length ) {
138139 this . logger . log (
139140 `Urls: ${ Object . keys ( urlWithErrors ) . join (
140- ', '
141- ) } had errors while regenerating!`
141+ ', ' ,
142+ ) } had errors while regenerating!`,
142143 ) ;
143144 }
144145
@@ -181,7 +182,7 @@ export class ISRHandler {
181182 req : Request ,
182183 res : Response ,
183184 next : NextFunction ,
184- config ?: ServeFromCacheConfig
185+ config ?: ServeFromCacheConfig ,
185186 ) : Promise < any > {
186187 try {
187188 const variant = this . getVariant ( req ) ;
@@ -208,7 +209,7 @@ export class ISRHandler {
208209 res ,
209210 cacheData ,
210211 this . logger ,
211- config ?. providers
212+ config ?. providers ,
212213 ) ;
213214 }
214215 }
@@ -226,7 +227,7 @@ export class ISRHandler {
226227 // Cache exists. Send it.
227228 this . logger . log (
228229 `Page was retrieved from cache: ` ,
229- getCacheKey ( req . url , variant )
230+ getCacheKey ( req . url , variant ) ,
230231 ) ;
231232 return res . send ( finalHtml ) ;
232233 } catch ( error ) {
@@ -239,7 +240,7 @@ export class ISRHandler {
239240 req : Request ,
240241 res : Response ,
241242 next : NextFunction ,
242- config ?: RenderConfig
243+ config ?: RenderConfig ,
243244 ) : Promise < any > {
244245 const renderUrlConfig : RenderUrlConfig = {
245246 req,
@@ -250,6 +251,7 @@ export class ISRHandler {
250251 bootstrap : this . config . bootstrap ,
251252 commonEngine : this . config . commonEngine ,
252253 browserDistFolder : this . config . browserDistFolder ,
254+ inlineCriticalCss : this . config . inlineCriticalCss ,
253255 } ;
254256
255257 renderUrl ( renderUrlConfig ) . then ( async ( html ) => {
@@ -298,7 +300,7 @@ export class ISRHandler {
298300}
299301
300302const extractDataFromBody = (
301- req : Request
303+ req : Request ,
302304) : { token : string | null ; urlsToInvalidate : string [ ] } => {
303305 const { urlsToInvalidate, token } = req . body ;
304306 return { urlsToInvalidate, token } ;
0 commit comments