Skip to content

Commit

Permalink
chore: fix broken build #3
Browse files Browse the repository at this point in the history
  • Loading branch information
harlan-zw committed Apr 13, 2024
1 parent 7329275 commit 89bad41
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions packages/core/src/unlighthouse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,15 @@ import objectHash from 'object-hash'
import { createCommonJS, resolvePath } from 'mlly'
import { $fetch } from 'ofetch'
import chalk from 'chalk'
import type { TaskFunction } from 'puppeteer-cluster/dist/Cluster'
import { version } from '../package.json'
import { WS, createApi, createBroadcastingEvents, createMockRouter } from './router'
import { createUnlighthouseWorker, inspectHtmlTask, runLighthouseTask } from './puppeteer'
import type {
Provider,
PuppeteerTaskArgs,
PuppeteerTaskReturn,
ResolvedUserConfig,
RuntimeSettings,
UnlighthouseContext,
UnlighthouseHooks,
UnlighthouseTask,
UserConfig,
} from './types'
import { generateClient } from './build'
Expand Down Expand Up @@ -138,11 +134,12 @@ export async function createUnlighthouse(userConfig: UserConfig, provider?: Prov
} as unknown as UnlighthouseContext
engineContext.set(ctx, true)

const tasks: Record<UnlighthouseTask, TaskFunction<PuppeteerTaskArgs, PuppeteerTaskReturn>> = {
const tasks = {
inspectHtmlTask,
runLighthouseTask,
}

// @ts-ignore broken types
const worker = await createUnlighthouseWorker(tasks)

if (resolvedConfig.hooks?.authenticate) {
Expand Down

0 comments on commit 89bad41

Please sign in to comment.