(url: string, options: Options = {})
| 271 | } |
| 272 | |
| 273 | async requestAllPages<T>(url: string, options: Options = {}) { |
| 274 | options = { cache: 'no-cache', ...options }; |
| 275 | const headers = await this.requestHeaders(options.headers || {}); |
| 276 | const processedURL = this.urlFor(url, options); |
| 277 | const allResponses = await getAllResponses( |
| 278 | processedURL, |
| 279 | { ...options, headers }, |
| 280 | 'next', |
| 281 | this.nextUrlProcessor(), |
| 282 | ); |
| 283 | const pages: T[][] = await Promise.all( |
| 284 | allResponses.map((res: Response) => this.parseResponse(res)), |
| 285 | ); |
| 286 | return ([] as T[]).concat(...pages); |
| 287 | } |
| 288 | |
| 289 | generateContentKey(collectionName: string, slug: string) { |
| 290 | const contentKey = generateContentKey(collectionName, slug); |
no test coverage detected