(url: string, options: Options = {})
| 370 | } |
| 371 | |
| 372 | async requestAllPages<T>(url: string, options: Options = {}) { |
| 373 | options = { cache: 'no-cache', ...options }; |
| 374 | const headers = await this.requestHeaders(options.headers || {}); |
| 375 | const processedURL = this.urlFor(url, options); |
| 376 | const allResponses = await getAllResponses( |
| 377 | processedURL, |
| 378 | { ...options, headers }, |
| 379 | 'next', |
| 380 | this.nextUrlProcessor(), |
| 381 | ); |
| 382 | const pages: T[][] = await Promise.all( |
| 383 | allResponses.map((res: Response) => this.parseResponse(res)), |
| 384 | ); |
| 385 | return ([] as T[]).concat(...pages); |
| 386 | } |
| 387 | |
| 388 | generateContentKey(collectionName: string, slug: string) { |
| 389 | const contentKey = generateContentKey(collectionName, slug); |
no test coverage detected