pagesight 0.2.2 → 0.2.3

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pagesight",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "description": "See your site the way search engines and AI see it.",
5
5
  "keywords": [
6
6
  "seo",
package/src/index.ts CHANGED
@@ -9,9 +9,11 @@ import { registerRobotsTool } from "./tools/robots.js";
9
9
  import { registerSetupTool } from "./tools/setup.js";
10
10
  import { registerSitemapsTool } from "./tools/sitemaps.js";
11
11
 
12
+ const pkg = await Bun.file(new URL("../package.json", import.meta.url)).json();
13
+
12
14
  const server = new McpServer({
13
15
  name: "pagesight",
14
- version: "0.0.0",
16
+ version: pkg.version,
15
17
  });
16
18
 
17
19
  registerCruxTool(server);
@@ -39,7 +39,7 @@ function formatPerformance(
39
39
  totalImpressions > 0 ? rows.reduce((sum, r) => sum + r.position * r.impressions, 0) / totalImpressions : 0;
40
40
 
41
41
  lines.push(
42
- "--- Totals ---",
42
+ `--- Summary (${rows.length} rows returned) ---`,
43
43
  "",
44
44
  `Clicks: ${totalClicks.toLocaleString()}`,
45
45
  `Impressions: ${totalImpressions.toLocaleString()}`,
@@ -67,9 +67,10 @@ function formatPerformance(
67
67
  }
68
68
 
69
69
  function daysAgo(n: number): string {
70
- const d = new Date();
71
- d.setDate(d.getDate() - n);
72
- return d.toISOString().split("T")[0];
70
+ // GSC dates are in PT (Pacific Time). Use UTC-8 as a stable approximation.
71
+ const now = new Date(Date.now() - 8 * 60 * 60 * 1000);
72
+ now.setDate(now.getDate() - n);
73
+ return now.toISOString().split("T")[0];
73
74
  }
74
75
 
75
76
  export function registerPerformanceTool(server: McpServer): void {