Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clients(lr): export primary api, presets from lr bundle #14425

Merged
merged 7 commits into from
Nov 29, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions clients/lightrider/lightrider-entry.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import log from 'lighthouse-logger';
import {CDPBrowser} from 'puppeteer-core/lib/esm/puppeteer/common/Browser.js';
import {Connection as PptrConnection} from 'puppeteer-core/lib/esm/puppeteer/common/Connection.js';

import lighthouse, {legacyNavigation} from '../../core/index.js';
import lighthouse, * as api from '../../core/index.js';
import {LighthouseError} from '../../core/lib/lh-error.js';
import {processForProto} from '../../core/lib/proto-preprocessor.js';
import * as assetSaver from '../../core/lib/asset-saver.js';
Expand Down Expand Up @@ -105,7 +105,7 @@ async function runLighthouseInLR(connection, url, flags, lrOpts) {
const page = await getPageFromConnection(connection);
runnerResult = await lighthouse(url, flags, config, page);
} else {
runnerResult = await legacyNavigation(url, flags, config, connection);
runnerResult = await api.legacyNavigation(url, flags, config, connection);
}

if (!runnerResult) throw new Error('Lighthouse finished without a runnerResult');
Expand Down Expand Up @@ -163,4 +163,7 @@ if (typeof window !== 'undefined') {

export {
runLighthouseInLR,
api,
listenForStatus,
LR_PRESETS,
};