Rocky_Mountain_Vending/.pnpm-store/v10/files/59/dd177b52a2236985a429c3960b8056338b83e8d96ee68d1af94ad0a25ed1c8fe4fe159d325c15dff5a3c0853d39498b7d26d413cb91b2fa3667e0c637b0759
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

66 lines
2 KiB
Text
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/**
* @license
* Copyright 2021 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
/**
* @fileoverview A runner that launches Chrome and executes Lighthouse via DevTools.
*/
import {execFileSync} from 'child_process';
import {LH_ROOT} from '../../../../shared/root.js';
import {testUrlFromDevtools} from '../../../../core/scripts/pptr-run-devtools.js';
const devtoolsDir =
process.env.DEVTOOLS_PATH || `${LH_ROOT}/.tmp/chromium-web-tests/devtools/devtools-frontend`;
/**
* Download/pull latest DevTools, build Lighthouse for DevTools, roll to DevTools, and build DevTools.
*/
async function setup() {
if (process.env.CI) return;
process.env.DEVTOOLS_PATH = devtoolsDir;
execFileSync('bash',
['core/test/devtools-tests/download-devtools.sh'],
{stdio: 'inherit'}
);
execFileSync('bash',
['core/test/devtools-tests/roll-devtools.sh'],
{stdio: 'inherit'}
);
}
/**
* Launch Chrome and do a full Lighthouse run via DevTools.
* By default, the latest DevTools frontend is used (.tmp/chromium-web-tests/devtools/devtools-frontend)
* unless DEVTOOLS_PATH is set.
* CHROME_PATH determines which Chrome is usedotherwise the default is puppeteer's chrome binary.
* @param {string} url
* @param {LH.Config=} config
* @param {import('../lib/local-console.js').LocalConsole=} logger
* @param {Smokehouse.SmokehouseOptions['testRunnerOptions']=} testRunnerOptions
* @return {Promise<{lhr: LH.Result, artifacts: LH.Artifacts}>}
*/
async function runLighthouse(url, config, logger, testRunnerOptions) {
const chromeFlags = [
testRunnerOptions?.headless ? '--headless=new' : '',
`--custom-devtools-frontend=file://${devtoolsDir}/out/LighthouseIntegration/gen/front_end`,
];
// TODO: `testUrlFromDevtools` should accept a logger, so we get some output even for time outs.
const {lhr, artifacts, logs} = await testUrlFromDevtools(url, {
config,
chromeFlags,
});
if (logger) {
logger.log(logs.join('') + '\n');
}
return {lhr, artifacts};
}
export {
runLighthouse,
setup,
};