@ainyc/canonry 4.69.2 → 4.70.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.
- package/assets/assets/{BacklinksPage-C4PM9i3H.js → BacklinksPage-BDul_zcd.js} +1 -1
- package/assets/assets/{ChartPrimitives-nxvyoxCn.js → ChartPrimitives-Da4DNYct.js} +1 -1
- package/assets/assets/ProjectPage-CwhzpzcQ.js +6 -0
- package/assets/assets/{RunRow-DRncrtMo.js → RunRow-DHVSyNrF.js} +1 -1
- package/assets/assets/{RunsPage-cFFewGZB.js → RunsPage-qYld-J_H.js} +1 -1
- package/assets/assets/{SettingsPage-BxL_din4.js → SettingsPage-DJl9g848.js} +1 -1
- package/assets/assets/{TrafficPage-CKDv33KP.js → TrafficPage-BtjT2b4w.js} +1 -1
- package/assets/assets/{TrafficSourceDetailPage-yMUcgBbw.js → TrafficSourceDetailPage-BzhZKRVf.js} +1 -1
- package/assets/assets/{extract-error-message-D3DfO_Ep.js → extract-error-message--3QvVA4w.js} +1 -1
- package/assets/assets/{index-BUNCrWTe.css → index-3N6iFHyR.css} +1 -1
- package/assets/assets/{index-mVWwxF_h.js → index-oFcxoNUp.js} +46 -46
- package/assets/assets/{server-traffic-D4hR4Sy6.js → server-traffic-BZWmm_1l.js} +1 -1
- package/assets/assets/{trash-2-DmBrLnSR.js → trash-2-BB5gcBgS.js} +1 -1
- package/assets/index.html +2 -2
- package/dist/{chunk-WFM2O72W.js → chunk-F74QJKIP.js} +85 -41
- package/dist/{chunk-SBYA3LEJ.js → chunk-H7TJ5FQ6.js} +2 -2
- package/dist/cli.js +2 -2
- package/dist/index.js +2 -2
- package/dist/{intelligence-service-DVVSE3G7.js → intelligence-service-SCTWXI5M.js} +1 -1
- package/package.json +9 -9
- package/assets/assets/ProjectPage-C-Xn3lJ1.js +0 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as d,j as a,
|
|
1
|
+
import{c as d,j as a,bY as S,bS as l,bZ as v,ay as y,l as t,b_ as m,bT as i,b$ as T,c0 as h,c1 as p,c2 as C}from"./index-oFcxoNUp.js";import{u as c,r as g,n as s,o as u}from"./vendor-tanstack-Dq7p98wZ.js";const w=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],M=d("refresh-cw",w);function P(e){switch(e){case i.connected:return"positive";case i.paused:return"caution";case i.error:return"negative";case i.archived:return"neutral"}}function b(e){const r={};return e.kind&&e.kind!=="all"&&(r.kind=e.kind),e.sourceId&&(r.sourceId=e.sourceId),e.sinceMinutes!==void 0&&(r.since=new Date(Date.now()-e.sinceMinutes*6e4).toISOString()),e.limit!==void 0&&(r.limit=String(e.limit)),r}function o(e){e.invalidateQueries({predicate:r=>{const n=r.queryKey[0];return typeof n?._id=="string"&&n._id.startsWith("getApiV1ProjectsByNameTraffic")}})}function k(e){return c({...S({client:t,path:{name:e??""}}),enabled:!!e,staleTime:a})}function F(e){return c({...C({client:t,path:{name:e??""}}),enabled:!!e,staleTime:a})}function V(e,r){return c({...l({client:t,path:{name:e??"",id:r??""}}),enabled:!!(e&&r),staleTime:a})}function A(e,r){const n=g.useMemo(()=>b(r),[r.kind,r.sourceId,r.sinceMinutes,r.limit]);return c({...v({client:t,path:{name:e??""},query:n}),enabled:!!e,staleTime:a})}function E(e){const r=s();return u({mutationFn:n=>{if(!e)throw new Error("Project is required to connect a Cloud Run source");return p(e,n)},onSuccess:()=>{e&&o(r)}})}function I(e){const r=s();return u({mutationFn:n=>{if(!e)throw new Error("Project is required to connect a WordPress source");return T(e,n)},onSuccess:()=>{e&&o(r)}})}function Q(e){const r=s();return u({mutationFn:n=>{if(!e)throw new Error("Project is required to connect a Vercel source");return h(e,n)},onSuccess:()=>{e&&o(r)}})}function R(e,r){const n=s();return u({mutationFn:f=>{if(!e||!r)throw new Error("Project and sourceId are required to sync");return m(e,r,f??void 0)},onSuccess:()=>{e&&(o(n),n.invalidateQueries({queryKey:y({client:t})}))}})}export{M as R,I as a,Q as b,E as c,k as d,V as e,A as f,R as g,P as t,F as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c}from"./index-
|
|
1
|
+
import{c}from"./index-oFcxoNUp.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,12 +12,12 @@
|
|
|
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-
|
|
15
|
+
<script type="module" crossorigin src="./assets/index-oFcxoNUp.js"></script>
|
|
16
16
|
<link rel="modulepreload" crossorigin href="./assets/vendor-tanstack-Dq7p98wZ.js">
|
|
17
17
|
<link rel="modulepreload" crossorigin href="./assets/vendor-radix-B57xfQbP.js">
|
|
18
18
|
<link rel="modulepreload" crossorigin href="./assets/vendor-recharts-ClRVR6aX.js">
|
|
19
19
|
<link rel="modulepreload" crossorigin href="./assets/vendor-markdown-DK7fbRNb.js">
|
|
20
|
-
<link rel="stylesheet" crossorigin href="./assets/index-
|
|
20
|
+
<link rel="stylesheet" crossorigin href="./assets/index-3N6iFHyR.css">
|
|
21
21
|
</head>
|
|
22
22
|
<body>
|
|
23
23
|
<div id="root"></div>
|
|
@@ -27443,6 +27443,7 @@ var VERCEL_MAX_SUB_WINDOWS = 5e3;
|
|
|
27443
27443
|
var VERCEL_BACKFILL_CHUNK_MS = 60 * 6e4;
|
|
27444
27444
|
var MAX_TRACKED_EVENT_IDS = 1e3;
|
|
27445
27445
|
var DEFAULT_BACKFILL_DAYS = 30;
|
|
27446
|
+
var DEFAULT_TRAFFIC_SYNC_CRON = "*/30 * * * *";
|
|
27446
27447
|
var MAX_BACKFILL_DAYS = 90;
|
|
27447
27448
|
var BACKFILL_MAX_PAGES = 1e3;
|
|
27448
27449
|
var BACKFILL_SAMPLE_LIMIT = 500;
|
|
@@ -27899,49 +27900,91 @@ async function trafficRoutes(app, opts) {
|
|
|
27899
27900
|
const activeSource = app.db.select().from(trafficSources).where(eq25(trafficSources.projectId, project.id)).all().find((row) => row.sourceType === TrafficSourceTypes.vercel && row.status !== TrafficSourceStatuses.archived);
|
|
27900
27901
|
const config = { projectId, teamId, environment };
|
|
27901
27902
|
const fallbackName = displayName ?? `Vercel \xB7 ${projectId}`;
|
|
27902
|
-
|
|
27903
|
-
|
|
27904
|
-
|
|
27905
|
-
|
|
27906
|
-
|
|
27907
|
-
|
|
27908
|
-
|
|
27909
|
-
|
|
27910
|
-
|
|
27911
|
-
|
|
27912
|
-
|
|
27913
|
-
|
|
27914
|
-
|
|
27915
|
-
|
|
27903
|
+
const { sourceRow, scheduleCreated } = app.db.transaction((tx) => {
|
|
27904
|
+
let row;
|
|
27905
|
+
if (activeSource) {
|
|
27906
|
+
tx.update(trafficSources).set({
|
|
27907
|
+
displayName: fallbackName,
|
|
27908
|
+
status: TrafficSourceStatuses.connected,
|
|
27909
|
+
lastError: null,
|
|
27910
|
+
configJson: config,
|
|
27911
|
+
updatedAt: now
|
|
27912
|
+
}).where(eq25(trafficSources.id, activeSource.id)).run();
|
|
27913
|
+
row = tx.select().from(trafficSources).where(eq25(trafficSources.id, activeSource.id)).get();
|
|
27914
|
+
} else {
|
|
27915
|
+
const newId = crypto23.randomUUID();
|
|
27916
|
+
tx.insert(trafficSources).values({
|
|
27917
|
+
id: newId,
|
|
27918
|
+
projectId: project.id,
|
|
27919
|
+
sourceType: TrafficSourceTypes.vercel,
|
|
27920
|
+
displayName: fallbackName,
|
|
27921
|
+
status: TrafficSourceStatuses.connected,
|
|
27922
|
+
// Seed lastSyncedAt to NOW so the first sync uses a tight window.
|
|
27923
|
+
// Leaving this null would make the first sync fall back to
|
|
27924
|
+
// DEFAULT_SYNC_WINDOW_MINUTES (30 days) — which exceeds Vercel's
|
|
27925
|
+
// request-logs retention (~14 days), causing the first sync to
|
|
27926
|
+
// throw a retention error and leaving the source permanently
|
|
27927
|
+
// stuck before it ever drained an event. New users opt into
|
|
27928
|
+
// historical recovery via the explicit `traffic backfill` command;
|
|
27929
|
+
// they do not silently inherit a 30-day pull on connect.
|
|
27930
|
+
lastSyncedAt: now,
|
|
27931
|
+
lastCursor: null,
|
|
27932
|
+
lastError: null,
|
|
27933
|
+
archivedAt: null,
|
|
27934
|
+
configJson: config,
|
|
27935
|
+
createdAt: now,
|
|
27936
|
+
updatedAt: now
|
|
27937
|
+
}).run();
|
|
27938
|
+
row = tx.select().from(trafficSources).where(eq25(trafficSources.id, newId)).get();
|
|
27939
|
+
}
|
|
27940
|
+
const existingSchedule = tx.select().from(schedules).where(
|
|
27941
|
+
and19(
|
|
27942
|
+
eq25(schedules.projectId, project.id),
|
|
27943
|
+
eq25(schedules.kind, SchedulableRunKinds["traffic-sync"])
|
|
27944
|
+
)
|
|
27945
|
+
).get();
|
|
27946
|
+
let created = false;
|
|
27947
|
+
if (!existingSchedule) {
|
|
27948
|
+
tx.insert(schedules).values({
|
|
27949
|
+
id: crypto23.randomUUID(),
|
|
27950
|
+
projectId: project.id,
|
|
27951
|
+
kind: SchedulableRunKinds["traffic-sync"],
|
|
27952
|
+
cronExpr: DEFAULT_TRAFFIC_SYNC_CRON,
|
|
27953
|
+
preset: null,
|
|
27954
|
+
timezone: "UTC",
|
|
27955
|
+
enabled: true,
|
|
27956
|
+
providers: [],
|
|
27957
|
+
sourceId: row.id,
|
|
27958
|
+
createdAt: now,
|
|
27959
|
+
updatedAt: now
|
|
27960
|
+
}).run();
|
|
27961
|
+
created = true;
|
|
27962
|
+
}
|
|
27963
|
+
writeAuditLog(tx, {
|
|
27916
27964
|
projectId: project.id,
|
|
27917
|
-
|
|
27918
|
-
|
|
27919
|
-
|
|
27920
|
-
|
|
27921
|
-
|
|
27922
|
-
|
|
27923
|
-
|
|
27924
|
-
|
|
27925
|
-
|
|
27926
|
-
|
|
27927
|
-
|
|
27928
|
-
|
|
27929
|
-
|
|
27930
|
-
|
|
27931
|
-
|
|
27932
|
-
|
|
27933
|
-
|
|
27934
|
-
|
|
27935
|
-
}
|
|
27936
|
-
sourceRow = app.db.select().from(trafficSources).where(eq25(trafficSources.id, newId)).get();
|
|
27937
|
-
}
|
|
27938
|
-
writeAuditLog(app.db, {
|
|
27939
|
-
projectId: project.id,
|
|
27940
|
-
actor: "api",
|
|
27941
|
-
action: "traffic.vercel.connected",
|
|
27942
|
-
entityType: "traffic_source",
|
|
27943
|
-
entityId: sourceRow.id
|
|
27965
|
+
actor: "api",
|
|
27966
|
+
action: "traffic.vercel.connected",
|
|
27967
|
+
entityType: "traffic_source",
|
|
27968
|
+
entityId: row.id
|
|
27969
|
+
});
|
|
27970
|
+
if (created) {
|
|
27971
|
+
writeAuditLog(tx, {
|
|
27972
|
+
projectId: project.id,
|
|
27973
|
+
actor: "api",
|
|
27974
|
+
action: "schedule.created",
|
|
27975
|
+
entityType: "schedule",
|
|
27976
|
+
diff: {
|
|
27977
|
+
kind: SchedulableRunKinds["traffic-sync"],
|
|
27978
|
+
cronExpr: DEFAULT_TRAFFIC_SYNC_CRON,
|
|
27979
|
+
sourceId: row.id
|
|
27980
|
+
}
|
|
27981
|
+
});
|
|
27982
|
+
}
|
|
27983
|
+
return { sourceRow: row, scheduleCreated: created };
|
|
27944
27984
|
});
|
|
27985
|
+
if (scheduleCreated) {
|
|
27986
|
+
opts.onScheduleUpdated?.("upsert", project.id, SchedulableRunKinds["traffic-sync"]);
|
|
27987
|
+
}
|
|
27945
27988
|
return rowToDto(sourceRow);
|
|
27946
27989
|
});
|
|
27947
27990
|
app.post("/projects/:name/traffic/sources/:id/sync", async (request) => {
|
|
@@ -31154,6 +31197,7 @@ async function apiRoutes(app, opts) {
|
|
|
31154
31197
|
vercelTrafficCredentialStore: opts.vercelTrafficCredentialStore,
|
|
31155
31198
|
pullVercelTrafficEvents: opts.pullVercelTrafficEvents,
|
|
31156
31199
|
onTrafficSynced: opts.onTrafficSynced,
|
|
31200
|
+
onScheduleUpdated: opts.onScheduleUpdated,
|
|
31157
31201
|
allowLoopbackWebhooks: opts.allowLoopbackWebhooks
|
|
31158
31202
|
});
|
|
31159
31203
|
await api.register(backlinksRoutes, {
|
|
@@ -95,7 +95,7 @@ import {
|
|
|
95
95
|
runs,
|
|
96
96
|
schedules,
|
|
97
97
|
usageCounters
|
|
98
|
-
} from "./chunk-
|
|
98
|
+
} from "./chunk-F74QJKIP.js";
|
|
99
99
|
import {
|
|
100
100
|
AGENT_MEMORY_VALUE_MAX_BYTES,
|
|
101
101
|
AGENT_PROVIDER_IDS,
|
|
@@ -5618,7 +5618,7 @@ function readStoredGroundingSources(rawResponse) {
|
|
|
5618
5618
|
return result;
|
|
5619
5619
|
}
|
|
5620
5620
|
async function backfillInsightsCommand(project, opts) {
|
|
5621
|
-
const { IntelligenceService: IntelligenceService2 } = await import("./intelligence-service-
|
|
5621
|
+
const { IntelligenceService: IntelligenceService2 } = await import("./intelligence-service-SCTWXI5M.js");
|
|
5622
5622
|
const config = loadConfig();
|
|
5623
5623
|
const db = createClient(config.database);
|
|
5624
5624
|
migrate(db);
|
package/dist/cli.js
CHANGED
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
setTelemetrySource,
|
|
28
28
|
showFirstRunNotice,
|
|
29
29
|
trackEvent
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-H7TJ5FQ6.js";
|
|
31
31
|
import {
|
|
32
32
|
CliError,
|
|
33
33
|
EXIT_SYSTEM_ERROR,
|
|
@@ -52,7 +52,7 @@ import {
|
|
|
52
52
|
projects,
|
|
53
53
|
queries,
|
|
54
54
|
renderReportHtml
|
|
55
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-F74QJKIP.js";
|
|
56
56
|
import {
|
|
57
57
|
CcReleaseSyncStatuses,
|
|
58
58
|
CheckScopes,
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createServer
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-H7TJ5FQ6.js";
|
|
4
4
|
import {
|
|
5
5
|
loadConfig
|
|
6
6
|
} from "./chunk-ZNWMVYYU.js";
|
|
7
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-F74QJKIP.js";
|
|
8
8
|
import "./chunk-5FM7QRYD.js";
|
|
9
9
|
export {
|
|
10
10
|
createServer,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ainyc/canonry",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.70.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Agent-first open-source AEO operating platform - track how answer engines cite your domain",
|
|
6
6
|
"license": "FSL-1.1-ALv2",
|
|
@@ -63,23 +63,23 @@
|
|
|
63
63
|
"tsup": "^8.5.1",
|
|
64
64
|
"tsx": "^4.19.0",
|
|
65
65
|
"@ainyc/canonry-api-client": "0.0.0",
|
|
66
|
-
"@ainyc/canonry-api-routes": "0.0.0",
|
|
67
66
|
"@ainyc/canonry-config": "0.0.0",
|
|
68
|
-
"@ainyc/canonry-
|
|
69
|
-
"@ainyc/canonry-integration-cloud-run": "0.0.0",
|
|
67
|
+
"@ainyc/canonry-api-routes": "0.0.0",
|
|
70
68
|
"@ainyc/canonry-db": "0.0.0",
|
|
69
|
+
"@ainyc/canonry-contracts": "0.0.0",
|
|
71
70
|
"@ainyc/canonry-integration-bing": "0.0.0",
|
|
72
71
|
"@ainyc/canonry-integration-commoncrawl": "0.0.0",
|
|
72
|
+
"@ainyc/canonry-integration-cloud-run": "0.0.0",
|
|
73
73
|
"@ainyc/canonry-integration-google": "0.0.0",
|
|
74
74
|
"@ainyc/canonry-integration-google-business-profile": "0.0.0",
|
|
75
|
-
"@ainyc/canonry-integration-wordpress": "0.0.0",
|
|
76
|
-
"@ainyc/canonry-integration-google-places": "0.0.0",
|
|
77
75
|
"@ainyc/canonry-intelligence": "0.0.0",
|
|
78
|
-
"@ainyc/canonry-
|
|
76
|
+
"@ainyc/canonry-integration-google-places": "0.0.0",
|
|
77
|
+
"@ainyc/canonry-integration-wordpress": "0.0.0",
|
|
79
78
|
"@ainyc/canonry-integration-traffic": "0.0.0",
|
|
80
|
-
"@ainyc/canonry-provider-local": "0.0.0",
|
|
81
|
-
"@ainyc/canonry-provider-gemini": "0.0.0",
|
|
82
79
|
"@ainyc/canonry-provider-cdp": "0.0.0",
|
|
80
|
+
"@ainyc/canonry-provider-gemini": "0.0.0",
|
|
81
|
+
"@ainyc/canonry-provider-claude": "0.0.0",
|
|
82
|
+
"@ainyc/canonry-provider-local": "0.0.0",
|
|
83
83
|
"@ainyc/canonry-provider-openai": "0.0.0",
|
|
84
84
|
"@ainyc/canonry-provider-perplexity": "0.0.0"
|
|
85
85
|
},
|