Rocky_Mountain_Vending/.pnpm-store/v10/files/e7/c449e572e2bb0aff4a2a0654ef564af2ee85ac7d1a6205070e96f82de930503ad034d99a28ab7ca6121468660e2a7a711275d57b6ce2d4094c094a1ee3eb09
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

41 lines
1.1 KiB
Text

/**
* @license
* Copyright 2021 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import BaseGatherer from '../base-gatherer.js';
import DevtoolsLogGatherer from './devtools-log.js';
/** @implements {LH.Gatherer.GathererInstance<'DevtoolsLog'>} */
class NetworkUserAgent extends BaseGatherer {
/** @type {LH.Gatherer.GathererMeta<'DevtoolsLog'>} */
meta = {
supportedModes: ['timespan', 'navigation'],
dependencies: {DevtoolsLog: DevtoolsLogGatherer.symbol},
};
/**
* @param {LH.Artifacts['DevtoolsLog']} devtoolsLog
* @return {string}
*/
static getNetworkUserAgent(devtoolsLog) {
for (const entry of devtoolsLog) {
if (entry.method !== 'Network.requestWillBeSent') continue;
const userAgent = entry.params.request.headers['User-Agent'];
if (userAgent) return userAgent;
}
return '';
}
/**
* @param {LH.Gatherer.Context<'DevtoolsLog'>} context
* @return {Promise<LH.Artifacts['NetworkUserAgent']>}
*/
async getArtifact(context) {
return NetworkUserAgent.getNetworkUserAgent(context.dependencies.DevtoolsLog);
}
}
export default NetworkUserAgent;