MCPcopy Index your code
hub / github.com/code-pushup/cli / runnerConfig

Function runnerConfig

examples/plugins/src/lighthouse/src/lighthouse.plugin.ts:86–109  ·  view source on GitHub ↗
(options: LighthouseCliOptions)

Source from the content-addressed store, hash-verified

84}
85
86export function runnerConfig(options: LighthouseCliOptions): RunnerConfig {
87 const {
88 outputPath = LIGHTHOUSE_OUTPUT_FILE_DEFAULT,
89 userDataDir,
90 ...remnainingOptions
91 } = options;
92
93 // eslint-disable-next-line functional/no-let
94 let lhCliOpts: LighthouseCliOptions = {
95 ...remnainingOptions,
96 outputPath,
97 };
98 if (userDataDir !== undefined) {
99 lhCliOpts = { ...lhCliOpts, userDataDir };
100 }
101
102 return {
103 command: 'npx',
104 args: getLighthouseCliArguments(lhCliOpts),
105 outputFile: outputPath,
106 outputTransform: (lighthouseOutput: unknown) =>
107 lhrToAuditOutputs(lighthouseOutput as Result),
108 };
109}
110
111function lhrToAuditOutputs(lhr: Result): AuditOutputs {
112 return Object.values(lhr.audits).map(

Callers 2

createFunction · 0.85

Calls 2

lhrToAuditOutputsFunction · 0.85

Tested by

no test coverage detected