(url: string, options: Options = {})
| 395 | } |
| 396 | |
| 397 | async requestAllPages<T>(url: string, options: Options = {}) { |
| 398 | options = { cache: 'no-cache', ...options }; |
| 399 | const headers = await this.requestHeaders(options.headers || {}); |
| 400 | const processedURL = this.urlFor(url, options); |
| 401 | const allResponses = await getAllResponses( |
| 402 | processedURL, |
| 403 | { ...options, headers }, |
| 404 | 'next', |
| 405 | this.nextUrlProcessor(), |
| 406 | ); |
| 407 | const pages: T[][] = await Promise.all( |
| 408 | allResponses.map((res: Response) => this.parseResponse(res)), |
| 409 | ); |
| 410 | return ([] as T[]).concat(...pages); |
| 411 | } |
| 412 | |
| 413 | generateContentKey(collectionName: string, slug: string) { |
| 414 | const contentKey = generateContentKey(collectionName, slug); |
no test coverage detected