From a4f6651578db06b6393806e90fbc4e6577a79204 Mon Sep 17 00:00:00 2001 From: Paul Irish Date: Tue, 29 Nov 2022 14:14:10 -0800 Subject: [PATCH] clients(lr): export primary api, presets from lr bundle (#14425) --- clients/lightrider/lightrider-entry.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/clients/lightrider/lightrider-entry.js b/clients/lightrider/lightrider-entry.js index 1006884cc930..927cb12ce3b6 100644 --- a/clients/lightrider/lightrider-entry.js +++ b/clients/lightrider/lightrider-entry.js @@ -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'; @@ -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'); @@ -163,4 +163,7 @@ if (typeof window !== 'undefined') { export { runLighthouseInLR, + api, + listenForStatus, + LR_PRESETS, };