Rocky_Mountain_Vending/.pnpm-store/v10/files/13/5281502e2bbda19a1f65f114edaff1cbee80c4a17e53d73df6d16a9b7b50f0589c0822eb25fc305288e7ebc671d9391a3dc49fc955db21b0701d51c1a845d9
DMleadgen 46d973904b
Initial commit: Rocky Mountain Vending website
Next.js website for Rocky Mountain Vending company featuring:
- Product catalog with Stripe integration
- Service areas and parts pages
- Admin dashboard with Clerk authentication
- SEO optimized pages with JSON-LD structured data

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 16:22:15 -07:00

56 lines
1.4 KiB
Text

/**
* @license
* Copyright 2016 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import BaseGatherer from '../base-gatherer.js';
/**
* @return {Promise<Array<string>>}
*/
/* c8 ignore start */
function getCacheContents() {
// Get every cache by name.
return caches.keys()
// Open each one.
.then(cacheNames => Promise.all(cacheNames.map(cacheName => caches.open(cacheName))))
.then(caches => {
/** @type {Array<string>} */
const requests = [];
// Take each cache and get any requests is contains, and bounce each one down to its URL.
return Promise.all(caches.map(cache => {
return cache.keys()
.then(reqs => {
requests.push(...reqs.map(r => r.url));
});
})).then(_ => {
return requests;
});
});
}
/* c8 ignore stop */
class CacheContents extends BaseGatherer {
/** @type {LH.Gatherer.GathererMeta} */
meta = {
supportedModes: ['snapshot', 'navigation'],
};
/**
* Creates an array of cached URLs.
* @param {LH.Gatherer.Context} passContext
* @return {Promise<LH.Artifacts['CacheContents']>}
*/
async getArtifact(passContext) {
const driver = passContext.driver;
const cacheUrls = await driver.executionContext.evaluate(getCacheContents, {args: []});
return cacheUrls;
}
}
export default CacheContents;