pagesight 0.13.0 → 0.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/tools/ai.ts +17 -5
- package/src/tools/speed.ts +5 -0
package/package.json
CHANGED
package/src/tools/ai.ts
CHANGED
|
@@ -117,11 +117,23 @@ function formatRobotsAudit(origin: string, robots: RobotsTxt, statusCode: number
|
|
|
117
117
|
|
|
118
118
|
if (robots.groups.length > 0) {
|
|
119
119
|
lines.push("", "--- User-Agent Groups ---", "");
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
const
|
|
123
|
-
const
|
|
124
|
-
|
|
120
|
+
if (robots.groups.length > 10) {
|
|
121
|
+
// Condensed: show count and top groups only
|
|
122
|
+
const sorted = [...robots.groups].sort((a, b) => b.rules.length - a.rules.length);
|
|
123
|
+
for (const group of sorted.slice(0, 5)) {
|
|
124
|
+
const agents = group.userAgents.join(", ");
|
|
125
|
+
const allows = group.rules.filter((r) => r.type === "allow").length;
|
|
126
|
+
const disallows = group.rules.filter((r) => r.type === "disallow").length;
|
|
127
|
+
lines.push(` ${agents}: ${disallows} disallow, ${allows} allow`);
|
|
128
|
+
}
|
|
129
|
+
lines.push(` ... and ${robots.groups.length - 5} more groups`);
|
|
130
|
+
} else {
|
|
131
|
+
for (const group of robots.groups) {
|
|
132
|
+
const agents = group.userAgents.join(", ");
|
|
133
|
+
const allows = group.rules.filter((r) => r.type === "allow").length;
|
|
134
|
+
const disallows = group.rules.filter((r) => r.type === "disallow").length;
|
|
135
|
+
lines.push(` ${agents}: ${disallows} disallow, ${allows} allow`);
|
|
136
|
+
}
|
|
125
137
|
}
|
|
126
138
|
}
|
|
127
139
|
|
package/src/tools/speed.ts
CHANGED
|
@@ -549,6 +549,11 @@ const METRIC_LABELS: Record<string, string> = {
|
|
|
549
549
|
round_trip_time: "RTT",
|
|
550
550
|
navigation_types: "Navigation Types",
|
|
551
551
|
form_factors: "Form Factors",
|
|
552
|
+
largest_contentful_paint_image_element_render_delay: "LCP Image Render Delay",
|
|
553
|
+
largest_contentful_paint_image_resource_load_delay: "LCP Image Load Delay",
|
|
554
|
+
largest_contentful_paint_image_resource_load_duration: "LCP Image Load Duration",
|
|
555
|
+
largest_contentful_paint_image_time_to_first_byte: "LCP Image TTFB",
|
|
556
|
+
largest_contentful_paint_resource_type: "LCP Resource Type",
|
|
552
557
|
};
|
|
553
558
|
|
|
554
559
|
function formatDate(d: { year: number; month: number; day: number }): string {
|