Skip to content

Commit

Permalink
core: add flow methods to cjs entry
Browse files Browse the repository at this point in the history
  • Loading branch information
adamraine committed May 4, 2023
1 parent 40c1608 commit b79829d
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions core/index.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,33 @@ const legacyNavigation = async function legacyNavigation(...args) {
return legacyNavigation(...args);
};

/** @type {import('./index.js')['startFlow']} */
const startFlow = async function startFlow(...args) {
const {startFlow} = await import('./index.js');
return startFlow(...args);
};

/** @type {import('./index.js')['navigation']} */
const navigation = async function navigation(...args) {
const {navigation} = await import('./index.js');
return navigation(...args);
};

/** @type {import('./index.js')['startTimespan']} */
const startTimespan = async function startTimespan(...args) {
const {startTimespan} = await import('./index.js');
return startTimespan(...args);
};

/** @type {import('./index.js')['snapshot']} */
const snapshot = async function snapshot(...args) {
const {snapshot} = await import('./index.js');
return snapshot(...args);
};

module.exports = lighthouse;
module.exports.legacyNavigation = legacyNavigation;
module.exports.startFlow = startFlow;
module.exports.navigation = navigation;
module.exports.startTimespan = startTimespan;
module.exports.snapshot = snapshot;

0 comments on commit b79829d

Please sign in to comment.