@ainyc/canonry 4.101.0 → 4.102.0

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.
Files changed (23) hide show
  1. package/README.md +4 -1
  2. package/assets/assets/{BacklinksPage-aysk_iGy.js → BacklinksPage-lXt19SLR.js} +1 -1
  3. package/assets/assets/{ChartPrimitives-CmKqxndA.js → ChartPrimitives-C-sLgrDV.js} +1 -1
  4. package/assets/assets/{ProjectPage-dduZrrBr.js → ProjectPage-wtvaWIRA.js} +1 -1
  5. package/assets/assets/{RunRow-Ba77hJ4d.js → RunRow-Db32k-uH.js} +1 -1
  6. package/assets/assets/{RunsPage-D3IAdQMB.js → RunsPage-DwW3Mely.js} +1 -1
  7. package/assets/assets/{SettingsPage-Y54JtLw-.js → SettingsPage-gXn6OGsu.js} +1 -1
  8. package/assets/assets/{TrafficPage-DawzPWdt.js → TrafficPage-I49ci4gj.js} +1 -1
  9. package/assets/assets/{TrafficSourceDetailPage-DAhQwFVb.js → TrafficSourceDetailPage-BCvLztx9.js} +1 -1
  10. package/assets/assets/{arrow-left-NsJbgqmV.js → arrow-left-BpA06YY0.js} +1 -1
  11. package/assets/assets/{extract-error-message-u00ggxeK.js → extract-error-message-BZSIQ5iV.js} +1 -1
  12. package/assets/assets/{index-4YArcfwj.js → index-DSSLug80.js} +3 -3
  13. package/assets/assets/{trash-2-BBdbbe60.js → trash-2-CLkUNdvb.js} +1 -1
  14. package/assets/index.html +1 -1
  15. package/dist/{chunk-2YPVK75M.js → chunk-2FUODJQR.js} +1 -1
  16. package/dist/{chunk-O3SFVGDF.js → chunk-3PVCILSN.js} +38 -6
  17. package/dist/{chunk-AV3DHH6B.js → chunk-B2H2RRIT.js} +786 -611
  18. package/dist/{chunk-HUL5FUBD.js → chunk-EOQXB63S.js} +24 -2
  19. package/dist/cli.js +22 -7
  20. package/dist/index.js +4 -4
  21. package/dist/{intelligence-service-R6QJ3KC2.js → intelligence-service-RC4BY5HF.js} +2 -2
  22. package/dist/mcp.js +2 -2
  23. package/package.json +9 -9
@@ -1 +1 @@
1
- import{c}from"./index-4YArcfwj.js";const a=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],h=c("circle-check",a);const e=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],n=c("circle-question-mark",e);const o=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],s=c("download",o);const t=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],r=c("trash-2",t);export{h as C,s as D,r as T,n as a};
1
+ import{c}from"./index-DSSLug80.js";const a=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],h=c("circle-check",a);const e=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],n=c("circle-question-mark",e);const o=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],s=c("download",o);const t=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],r=c("trash-2",t);export{h as C,s as D,r as T,n as a};
package/assets/index.html CHANGED
@@ -12,7 +12,7 @@
12
12
  <link rel="icon" type="image/png" sizes="32x32" href="./favicon-32.png" />
13
13
  <link rel="apple-touch-icon" href="./apple-touch-icon.png" />
14
14
  <title>Canonry</title>
15
- <script type="module" crossorigin src="./assets/index-4YArcfwj.js"></script>
15
+ <script type="module" crossorigin src="./assets/index-DSSLug80.js"></script>
16
16
  <link rel="modulepreload" crossorigin href="./assets/vendor-tanstack-Be8JdV5M.js">
17
17
  <link rel="modulepreload" crossorigin href="./assets/vendor-radix-CQ77EO2y.js">
18
18
  <link rel="modulepreload" crossorigin href="./assets/vendor-recharts-C9EZkgbP.js">
@@ -24,7 +24,7 @@ import {
24
24
  trafficConnectVercelRequestSchema,
25
25
  trafficConnectWordpressRequestSchema,
26
26
  trafficEventKindSchema
27
- } from "./chunk-HUL5FUBD.js";
27
+ } from "./chunk-EOQXB63S.js";
28
28
 
29
29
  // src/config.ts
30
30
  import fs from "fs";
@@ -10,7 +10,7 @@ import {
10
10
  loadConfig,
11
11
  loadConfigRaw,
12
12
  saveConfigPatch
13
- } from "./chunk-2YPVK75M.js";
13
+ } from "./chunk-2FUODJQR.js";
14
14
  import {
15
15
  CC_CACHE_DIR,
16
16
  DUCKDB_SPEC,
@@ -76,6 +76,7 @@ import {
76
76
  getUrlLinks,
77
77
  groupRunsByCreatedAt,
78
78
  gscCoverageSnapshots,
79
+ gscDailyTotals,
79
80
  gscSearchData,
80
81
  gscUrlInspections,
81
82
  hashAttributes,
@@ -114,7 +115,7 @@ import {
114
115
  siteAuditPages,
115
116
  siteAuditSnapshots,
116
117
  usageCounters
117
- } from "./chunk-AV3DHH6B.js";
118
+ } from "./chunk-B2H2RRIT.js";
118
119
  import {
119
120
  AGENT_MEMORY_VALUE_MAX_BYTES,
120
121
  AGENT_PROVIDER_IDS,
@@ -162,6 +163,7 @@ import {
162
163
  hostOf,
163
164
  isAgentProviderId,
164
165
  isBrowserProvider,
166
+ isGhostTelemetryEvent,
165
167
  isRetryableHttpError,
166
168
  normalizeUrlPath,
167
169
  notFound,
@@ -174,7 +176,7 @@ import {
174
176
  validationError,
175
177
  winnabilityClassLabel,
176
178
  withRetry
177
- } from "./chunk-HUL5FUBD.js";
179
+ } from "./chunk-EOQXB63S.js";
178
180
 
179
181
  // src/telemetry.ts
180
182
  import crypto from "crypto";
@@ -182,10 +184,13 @@ import os from "os";
182
184
  import { createRequire } from "module";
183
185
  var _require = createRequire(import.meta.url);
184
186
  var { version: VERSION } = _require("../package.json");
185
- var TELEMETRY_ENDPOINT = "https://ainyc.ai/api/telemetry";
187
+ var TELEMETRY_ENDPOINT = "https://canonry.ai/api/telemetry";
186
188
  var TIMEOUT_MS = 3e3;
187
189
  var ANON_ID_ENV_VAR = "CANONRY_ANONYMOUS_ID";
188
190
  var ANON_ID_PATTERN = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
191
+ function shouldDropTelemetryEvent(event, properties) {
192
+ return isGhostTelemetryEvent(event, properties);
193
+ }
189
194
  var SESSION_ID = crypto.randomUUID();
190
195
  var CURRENT_SOURCE = "cli";
191
196
  function setTelemetrySource(source) {
@@ -275,7 +280,7 @@ function isFirstRun() {
275
280
  }
276
281
  function showFirstRunNotice() {
277
282
  process.stderr.write(
278
- "\nCanonry collects anonymous telemetry to prioritize features.\nDisable any time: canonry telemetry disable\nLearn more: https://ainyc.ai/telemetry\n\n"
283
+ "\nCanonry collects anonymous telemetry to prioritize features.\nDisable any time: canonry telemetry disable\nLearn more: https://canonry.ai/telemetry\n\n"
279
284
  );
280
285
  }
281
286
  function detectAndTrackUpgrade() {
@@ -299,6 +304,7 @@ function detectAndTrackUpgrade() {
299
304
  }
300
305
  function trackEvent(event, properties, options) {
301
306
  if (!isTelemetryEnabled()) return;
307
+ if (shouldDropTelemetryEvent(event, properties)) return;
302
308
  const anonymousId = getOrCreateAnonymousId();
303
309
  if (!anonymousId) return;
304
310
  const payload = {
@@ -3793,6 +3799,32 @@ async function executeGscSync(db, runId, projectId, opts) {
3793
3799
  }).run();
3794
3800
  }
3795
3801
  }
3802
+ const totalRows = await fetchSearchAnalytics(accessToken, propertyId, {
3803
+ startDate,
3804
+ endDate,
3805
+ dimensions: ["date"]
3806
+ });
3807
+ db.delete(gscDailyTotals).where(
3808
+ and2(
3809
+ eq2(gscDailyTotals.projectId, projectId),
3810
+ sql2`${gscDailyTotals.date} >= ${startDate}`,
3811
+ sql2`${gscDailyTotals.date} <= ${endDate}`
3812
+ )
3813
+ ).run();
3814
+ const dailyTotalsNow = (/* @__PURE__ */ new Date()).toISOString();
3815
+ for (const row of totalRows) {
3816
+ const [date] = row.keys;
3817
+ db.insert(gscDailyTotals).values({
3818
+ id: crypto4.randomUUID(),
3819
+ projectId,
3820
+ date: date ?? "",
3821
+ clicks: row.clicks,
3822
+ impressions: row.impressions,
3823
+ position: String(row.position),
3824
+ createdAt: dailyTotalsNow
3825
+ }).run();
3826
+ }
3827
+ log2.info("daily-totals.complete", { runId, projectId, rowCount: totalRows.length });
3796
3828
  const pageClicks = /* @__PURE__ */ new Map();
3797
3829
  for (const row of rows) {
3798
3830
  const page = row.keys[1];
@@ -6406,7 +6438,7 @@ function readStoredGroundingSources(rawResponse) {
6406
6438
  return result;
6407
6439
  }
6408
6440
  async function backfillInsightsCommand(project, opts) {
6409
- const { IntelligenceService: IntelligenceService2 } = await import("./intelligence-service-R6QJ3KC2.js");
6441
+ const { IntelligenceService: IntelligenceService2 } = await import("./intelligence-service-RC4BY5HF.js");
6410
6442
  const config = loadConfig();
6411
6443
  const db = createClient(config.database);
6412
6444
  migrate(db);