@@ -45,14 +45,14 @@ export class ISRHandler {
45
45
config . indexHtml ,
46
46
config . commonEngine ,
47
47
config . bootstrap ,
48
- config . browserDistFolder
48
+ config . browserDistFolder ,
49
49
) ;
50
50
}
51
51
52
52
async invalidate (
53
53
req : Request ,
54
54
res : Response ,
55
- config ?: InvalidateConfig
55
+ config ?: InvalidateConfig ,
56
56
) : Promise < any > {
57
57
const { token, urlsToInvalidate } = extractDataFromBody ( req ) ;
58
58
const { indexHtml } = this . config ;
@@ -125,20 +125,21 @@ export class ISRHandler {
125
125
const invalidatedUrls = variantUrlsToInvalidate
126
126
. map ( ( val ) => val . cacheKey )
127
127
. filter (
128
- ( cacheKey ) => ! notInCache . includes ( cacheKey ) && ! urlWithErrors [ cacheKey ]
128
+ ( cacheKey ) =>
129
+ ! notInCache . includes ( cacheKey ) && ! urlWithErrors [ cacheKey ] ,
129
130
) ;
130
131
131
132
if ( notInCache . length ) {
132
133
this . logger . log (
133
- `Urls: ${ notInCache . join ( ', ' ) } does not exist in cache.`
134
+ `Urls: ${ notInCache . join ( ', ' ) } does not exist in cache.` ,
134
135
) ;
135
136
}
136
137
137
138
if ( Object . keys ( urlWithErrors ) . length ) {
138
139
this . logger . log (
139
140
`Urls: ${ Object . keys ( urlWithErrors ) . join (
140
- ', '
141
- ) } had errors while regenerating!`
141
+ ', ' ,
142
+ ) } had errors while regenerating!`,
142
143
) ;
143
144
}
144
145
@@ -181,7 +182,7 @@ export class ISRHandler {
181
182
req : Request ,
182
183
res : Response ,
183
184
next : NextFunction ,
184
- config ?: ServeFromCacheConfig
185
+ config ?: ServeFromCacheConfig ,
185
186
) : Promise < any > {
186
187
try {
187
188
const variant = this . getVariant ( req ) ;
@@ -208,7 +209,7 @@ export class ISRHandler {
208
209
res ,
209
210
cacheData ,
210
211
this . logger ,
211
- config ?. providers
212
+ config ?. providers ,
212
213
) ;
213
214
}
214
215
}
@@ -226,7 +227,7 @@ export class ISRHandler {
226
227
// Cache exists. Send it.
227
228
this . logger . log (
228
229
`Page was retrieved from cache: ` ,
229
- getCacheKey ( req . url , variant )
230
+ getCacheKey ( req . url , variant ) ,
230
231
) ;
231
232
return res . send ( finalHtml ) ;
232
233
} catch ( error ) {
@@ -239,7 +240,7 @@ export class ISRHandler {
239
240
req : Request ,
240
241
res : Response ,
241
242
next : NextFunction ,
242
- config ?: RenderConfig
243
+ config ?: RenderConfig ,
243
244
) : Promise < any > {
244
245
const renderUrlConfig : RenderUrlConfig = {
245
246
req,
@@ -250,6 +251,7 @@ export class ISRHandler {
250
251
bootstrap : this . config . bootstrap ,
251
252
commonEngine : this . config . commonEngine ,
252
253
browserDistFolder : this . config . browserDistFolder ,
254
+ inlineCriticalCss : this . config . inlineCriticalCss ,
253
255
} ;
254
256
255
257
renderUrl ( renderUrlConfig ) . then ( async ( html ) => {
@@ -298,7 +300,7 @@ export class ISRHandler {
298
300
}
299
301
300
302
const extractDataFromBody = (
301
- req : Request
303
+ req : Request ,
302
304
) : { token : string | null ; urlsToInvalidate : string [ ] } => {
303
305
const { urlsToInvalidate, token } = req . body ;
304
306
return { urlsToInvalidate, token } ;
0 commit comments