41 lines
1 KiB
TypeScript
41 lines
1 KiB
TypeScript
export default async () => {
|
|
const sitemap = await (await fetch('http://website:8081/sitemap-0.xml')).text()
|
|
const urls = sitemap.match(/<loc>(.*?)<\/loc>/g)!.map(
|
|
(loc) => loc.replace(/<\/?loc>/g, '').replace(/https:\/\/firq.dev/g, 'http://website:8081')
|
|
)
|
|
return {
|
|
lighthouseOptions: {
|
|
throttlingMethod: 'devtools',
|
|
throttling: {
|
|
cpuSlowdownMultiplier: 4,
|
|
requestLatencyMs: 150,
|
|
downloadThroughputKbps: 1638.4,
|
|
uploadThroughputKbps: 1638.4,
|
|
},
|
|
screenEmulation: {
|
|
width: 412,
|
|
height: 823,
|
|
deviceScaleFactor: 1.75,
|
|
},
|
|
lighthouseConfig: {
|
|
settings: {
|
|
skipAudits: ['is-on-https', 'redirects-http'],
|
|
},
|
|
},
|
|
},
|
|
puppeteerOptions: {
|
|
args: ['--no-sandbox', '--disable-setuid-sandbox'],
|
|
},
|
|
ci: {
|
|
budget: 50,
|
|
buildStatic: true,
|
|
},
|
|
scanner: {
|
|
sitemap: true,
|
|
dynamicSampling: false,
|
|
samples: 3,
|
|
},
|
|
outputPath: 'unlighthouse-reports',
|
|
urls
|
|
}
|
|
}
|