You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I've got a custom lighthouse script which runs outside of the audit service, however I would like to have it reported / tracked by the audit service.
Seeing as the other functions are exported, can this be added to the export list? It would allow me to upload the results of an independent lighthouse run to the lighthouse audit service database... Here is my relevant code snippet:
constlhAudit=require('@spotify/lighthouse-audit-service');constuuid=require('uuid');constpg=require("pg");constlighthouse=require('lighthouse');/* REDACTED */// A custom run of lighthouse using the official lighthouse packageconstresult=awaitlighthouse(url,flags,config);if(process.env.USE_DB==="true"){// Report to lhAuditServiceconstaudit=lhAudit.Audit.build({id: uuid.v4(),url: result?.lhr.requestedUrl,timeCreated: newDate(result?.lhr.fetchTime),timeCompleted: nowDate,report: result?.lhr});awaitlhAudit.persistAudit(// This is what I want to donewpg.Pool({host: process.env.DB_HOST,port: process.env.DB_PORT,database: process.env.DB_NAME,user: process.env.DB_USERNAME,password: process.env.DB_PASSWORD}),audit);}
As a workaround I've copied the source for persistAudit to this script.
The text was updated successfully, but these errors were encountered:
Hello, I've got a custom lighthouse script which runs outside of the audit service, however I would like to have it reported / tracked by the audit service.
To do this I'm installing this package as a dependency of my lighthouse script, but I need to make use of the 'persistAudit' function from the audit api module: https://github.com/spotify/lighthouse-audit-service/blob/master/src/api/audits/index.ts
Seeing as the other functions are exported, can this be added to the export list? It would allow me to upload the results of an independent lighthouse run to the lighthouse audit service database... Here is my relevant code snippet:
As a workaround I've copied the source for persistAudit to this script.
The text was updated successfully, but these errors were encountered: