update pagespeed

This commit is contained in:
Alex Holliday committed 2026-01-12 23:57:39 +00:00
1 parent 7a6b0d5da4
commit 25d1039376
204 files changed
+977 -343

No files matched your search

+18 -5
View File
@@ -16,6 +16,7 @@ import type {
CheckNetworkInterfaceInfo,
CheckTimings,
CheckTimingPhases,
ILighthouseAudit,
} from "@/types/check.js";
type CheckMetadataDocument = Omit<CheckMetadata, "monitorId" | "teamId"> & {
@@ -149,13 +150,25 @@ const networkInterfaceSchema = new Schema<CheckNetworkInterfaceInfo>(
{ _id: false }
);
const lighthouseAuditSchema = new Schema<ILighthouseAudit>(
{
id: { type: String },
title: { type: String },
score: { type: Number },
displayValue: { type: String },
numericValue: { type: Number },
numericUnit: { type: String },
},
{ _id: false }
);
const auditsSchema = new Schema<CheckAudits>(
{
cls: { type: Number, default: 0 },
si: { type: Number, default: 0 },
fcp: { type: Number, default: 0 },
lcp: { type: Number, default: 0 },
tbt: { type: Number, default: 0 },
cls: { type: lighthouseAuditSchema, default: undefined },
si: { type: lighthouseAuditSchema, default: undefined },
fcp: { type: lighthouseAuditSchema, default: undefined },
lcp: { type: lighthouseAuditSchema, default: undefined },
tbt: { type: lighthouseAuditSchema, default: undefined },
},
{ _id: false }
);
+1 -1
View File
@@ -22,7 +22,7 @@ class CheckModule {
createChecks = async (checks) => {
try {
await CheckModel.insertMany(checks, { ordered: false });
await CheckModel.insertMany(checks, { ordered: false, runValidators: true });
} catch (error) {
error.service = SERVICE_NAME;
error.method = "createCheck";
-1
View File
@@ -242,7 +242,6 @@ class MonitorModule {
const dateString = formatLookup[dateRange];
console.log("WTTTTFFF");
const results = await CheckModel.aggregate(buildUptimeDetailsPipeline(monitorId, dates, dateString));
const monitorData = results[0];