@canonry/canonry 4.164.0 → 4.164.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/README.md +120 -66
- package/assets/assets/{AuditHistoryPanel-CD1GVkS9.js → AuditHistoryPanel-m4hLLnEl.js} +1 -1
- package/assets/assets/{BacklinksPage-B0Ijhntp.js → BacklinksPage-DWl04vdm.js} +1 -1
- package/assets/assets/{HistoryPage-DIKtpT_z.js → HistoryPage-BTb0MBB4.js} +1 -1
- package/assets/assets/{MeasurementPropertyPage-BfPwwIsT.js → MeasurementPropertyPage-C8c4huVf.js} +1 -1
- package/assets/assets/{ProjectPage-3czWArKE.js → ProjectPage-CEbscgtB.js} +1 -1
- package/assets/assets/{RunRow-CHyd0gQH.js → RunRow-CDzkoy89.js} +1 -1
- package/assets/assets/{RunsPage-Dujt0SQ5.js → RunsPage-CzLCTfIA.js} +1 -1
- package/assets/assets/{SettingsPage-CJE9Oeg9.js → SettingsPage-D8Vfdd2n.js} +1 -1
- package/assets/assets/{SiteHealthSection-DvuvziPJ.js → SiteHealthSection-BGmBOTo0.js} +3 -3
- package/assets/assets/{TrafficPage-B0tru9ek.js → TrafficPage-BcmemZJB.js} +1 -1
- package/assets/assets/{TrafficSourceDetailPage-DshEUtQX.js → TrafficSourceDetailPage-B9Dz1vcn.js} +1 -1
- package/assets/assets/{extract-error-message-O2dirpiH.js → extract-error-message-B5tyCXha.js} +1 -1
- package/assets/assets/{index-C_y0aGQL.js → index-CEjDqng5.js} +3 -3
- package/assets/assets/{react-sigma_core.esm.min-sVSSzmzq.js → react-sigma_core.esm.min-z4XxmpWJ.js} +1 -1
- package/assets/index.html +1 -1
- package/dist/{chunk-C4WKYU5C.js → chunk-76DCR646.js} +1 -1
- package/dist/{chunk-BFGHZ2GU.js → chunk-DCCEKIJ7.js} +13 -0
- package/dist/{chunk-GCQPFCP2.js → chunk-R6QOYKRW.js} +20 -11
- package/dist/{chunk-RULHNUBH.js → chunk-XYZMJA3L.js} +4 -4
- package/dist/cli.js +10 -5
- package/dist/index.js +4 -4
- package/dist/{intelligence-service-Z3XS2UXQ.js → intelligence-service-5UVHKSHR.js} +2 -2
- package/dist/mcp.js +2 -2
- package/package.json +8 -8
package/assets/assets/{react-sigma_core.esm.min-sVSSzmzq.js → react-sigma_core.esm.min-z4XxmpWJ.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as Bt,t as S,r as C}from"./vendor-tanstack-Dock0eH1.js";import{e as Ht,G as Wt}from"./SiteHealthSection-
|
|
1
|
+
import{g as Bt,t as S,r as C}from"./vendor-tanstack-Dock0eH1.js";import{e as Ht,G as Wt}from"./SiteHealthSection-BGmBOTo0.js";import"./index-CEjDqng5.js";import"./vendor-radix-4UOaVWza.js";import"./vendor-recharts-D8rt5lKn.js";import"./vendor-lucide-nYKv-BB7.js";import"./vendor-markdown-Bn7fRwrx.js";import"./vendor-yaml-GWJz5H2G.js";import"./ChartPrimitives-BoYe2M-i.js";function Vt(r,n){if(typeof r!="object"||!r)return r;var i=r[Symbol.toPrimitive];if(i!==void 0){var e=i.call(r,n);if(typeof e!="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(r)}function ae(r){var n=Vt(r,"string");return typeof n=="symbol"?n:n+""}function A(r,n){if(!(r instanceof n))throw new TypeError("Cannot call a class as a function")}function He(r,n){for(var i=0;i<n.length;i++){var e=n[i];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(r,ae(e.key),e)}}function L(r,n,i){return n&&He(r.prototype,n),i&&He(r,i),Object.defineProperty(r,"prototype",{writable:!1}),r}function Q(r){return Q=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Q(r)}function yt(){try{var r=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(yt=function(){return!!r})()}function jt(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function Zt(r,n){if(n&&(typeof n=="object"||typeof n=="function"))return n;if(n!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return jt(r)}function I(r,n,i){return n=Q(n),Zt(r,yt()?Reflect.construct(n,i||[],Q(r).constructor):n.apply(r,i))}function xe(r,n){return xe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,e){return i.__proto__=e,i},xe(r,n)}function G(r,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(n&&n.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),n&&xe(r,n)}function qt(r){if(Array.isArray(r))return r}function Yt(r,n){var i=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(i!=null){var e,t,a,o,s=[],l=!0,h=!1;try{if(a=(i=i.call(r)).next,n===0){if(Object(i)!==i)return;l=!1}else for(;!(l=(e=a.call(i)).done)&&(s.push(e.value),s.length!==n);l=!0);}catch(u){h=!0,t=u}finally{try{if(!l&&i.return!=null&&(o=i.return(),Object(o)!==o))return}finally{if(h)throw t}}return s}}function Se(r,n){(n==null||n>r.length)&&(n=r.length);for(var i=0,e=Array(n);i<n;i++)e[i]=r[i];return e}function Tt(r,n){if(r){if(typeof r=="string")return Se(r,n);var i={}.toString.call(r).slice(8,-1);return i==="Object"&&r.constructor&&(i=r.constructor.name),i==="Map"||i==="Set"?Array.from(r):i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?Se(r,n):void 0}}function Xt(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
2
2
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ee(r,n){return qt(r)||Yt(r,n)||Tt(r,n)||Xt()}var pe={black:"#000000",silver:"#C0C0C0",gray:"#808080",grey:"#808080",white:"#FFFFFF",maroon:"#800000",red:"#FF0000",purple:"#800080",fuchsia:"#FF00FF",green:"#008000",lime:"#00FF00",olive:"#808000",yellow:"#FFFF00",navy:"#000080",blue:"#0000FF",teal:"#008080",aqua:"#00FFFF",darkblue:"#00008B",mediumblue:"#0000CD",darkgreen:"#006400",darkcyan:"#008B8B",deepskyblue:"#00BFFF",darkturquoise:"#00CED1",mediumspringgreen:"#00FA9A",springgreen:"#00FF7F",cyan:"#00FFFF",midnightblue:"#191970",dodgerblue:"#1E90FF",lightseagreen:"#20B2AA",forestgreen:"#228B22",seagreen:"#2E8B57",darkslategray:"#2F4F4F",darkslategrey:"#2F4F4F",limegreen:"#32CD32",mediumseagreen:"#3CB371",turquoise:"#40E0D0",royalblue:"#4169E1",steelblue:"#4682B4",darkslateblue:"#483D8B",mediumturquoise:"#48D1CC",indigo:"#4B0082",darkolivegreen:"#556B2F",cadetblue:"#5F9EA0",cornflowerblue:"#6495ED",rebeccapurple:"#663399",mediumaquamarine:"#66CDAA",dimgray:"#696969",dimgrey:"#696969",slateblue:"#6A5ACD",olivedrab:"#6B8E23",slategray:"#708090",slategrey:"#708090",lightslategray:"#778899",lightslategrey:"#778899",mediumslateblue:"#7B68EE",lawngreen:"#7CFC00",chartreuse:"#7FFF00",aquamarine:"#7FFFD4",skyblue:"#87CEEB",lightskyblue:"#87CEFA",blueviolet:"#8A2BE2",darkred:"#8B0000",darkmagenta:"#8B008B",saddlebrown:"#8B4513",darkseagreen:"#8FBC8F",lightgreen:"#90EE90",mediumpurple:"#9370DB",darkviolet:"#9400D3",palegreen:"#98FB98",darkorchid:"#9932CC",yellowgreen:"#9ACD32",sienna:"#A0522D",brown:"#A52A2A",darkgray:"#A9A9A9",darkgrey:"#A9A9A9",lightblue:"#ADD8E6",greenyellow:"#ADFF2F",paleturquoise:"#AFEEEE",lightsteelblue:"#B0C4DE",powderblue:"#B0E0E6",firebrick:"#B22222",darkgoldenrod:"#B8860B",mediumorchid:"#BA55D3",rosybrown:"#BC8F8F",darkkhaki:"#BDB76B",mediumvioletred:"#C71585",indianred:"#CD5C5C",peru:"#CD853F",chocolate:"#D2691E",tan:"#D2B48C",lightgray:"#D3D3D3",lightgrey:"#D3D3D3",thistle:"#D8BFD8",orchid:"#DA70D6",goldenrod:"#DAA520",palevioletred:"#DB7093",crimson:"#DC143C",gainsboro:"#DCDCDC",plum:"#DDA0DD",burlywood:"#DEB887",lightcyan:"#E0FFFF",lavender:"#E6E6FA",darksalmon:"#E9967A",violet:"#EE82EE",palegoldenrod:"#EEE8AA",lightcoral:"#F08080",khaki:"#F0E68C",aliceblue:"#F0F8FF",honeydew:"#F0FFF0",azure:"#F0FFFF",sandybrown:"#F4A460",wheat:"#F5DEB3",beige:"#F5F5DC",whitesmoke:"#F5F5F5",mintcream:"#F5FFFA",ghostwhite:"#F8F8FF",salmon:"#FA8072",antiquewhite:"#FAEBD7",linen:"#FAF0E6",lightgoldenrodyellow:"#FAFAD2",oldlace:"#FDF5E6",magenta:"#FF00FF",deeppink:"#FF1493",orangered:"#FF4500",tomato:"#FF6347",hotpink:"#FF69B4",coral:"#FF7F50",darkorange:"#FF8C00",lightsalmon:"#FFA07A",orange:"#FFA500",lightpink:"#FFB6C1",pink:"#FFC0CB",gold:"#FFD700",peachpuff:"#FFDAB9",navajowhite:"#FFDEAD",moccasin:"#FFE4B5",bisque:"#FFE4C4",mistyrose:"#FFE4E1",blanchedalmond:"#FFEBCD",papayawhip:"#FFEFD5",lavenderblush:"#FFF0F5",seashell:"#FFF5EE",cornsilk:"#FFF8DC",lemonchiffon:"#FFFACD",floralwhite:"#FFFAF0",snow:"#FFFAFA",lightyellow:"#FFFFE0",ivory:"#FFFFF0"},Ct=new Int8Array(4),be=new Int32Array(Ct.buffer,0,1),$t=new Float32Array(Ct.buffer,0,1),Kt=/^\s*rgba?\s*\(/,Jt=/^\s*rgba?\s*\(\s*([0-9]*)\s*,\s*([0-9]*)\s*,\s*([0-9]*)(?:\s*,\s*(.*)?)?\)\s*$/;function Qt(r){var n=0,i=0,e=0,t=1;if(r[0]==="#")r.length===4?(n=parseInt(r.charAt(1)+r.charAt(1),16),i=parseInt(r.charAt(2)+r.charAt(2),16),e=parseInt(r.charAt(3)+r.charAt(3),16)):(n=parseInt(r.charAt(1)+r.charAt(2),16),i=parseInt(r.charAt(3)+r.charAt(4),16),e=parseInt(r.charAt(5)+r.charAt(6),16)),r.length===9&&(t=parseInt(r.charAt(7)+r.charAt(8),16)/255);else if(Kt.test(r)){var a=r.match(Jt);a&&(n=+a[1],i=+a[2],e=+a[3],a[4]&&(t=+a[4]))}return{r:n,g:i,b:e,a:t}}var J={};for(var le in pe)J[le]=oe(pe[le]),J[pe[le]]=J[le];function Rt(r,n,i,e,t){return be[0]=e<<24|i<<16|n<<8|r,be[0]=be[0]&4278190079,$t[0]}function oe(r){if(r=r.toLowerCase(),typeof J[r]<"u")return J[r];var n=Qt(r),i=n.r,e=n.g,t=n.b,a=n.a;a=a*255|0;var o=Rt(i,e,t,a);return J[r]=o,o}var Ee={};function _t(r){if(typeof Ee[r]<"u")return Ee[r];var n=(r&16711680)>>>16,i=(r&65280)>>>8,e=r&255,t=255,a=Rt(n,i,e,t);return Ee[r]=a,a}function We(r,n,i,e){return i+(n<<8)+(r<<16)}function Ve(r,n,i,e,t,a){var o=Math.floor(i/a*t),s=Math.floor(r.drawingBufferHeight/a-e/a*t),l=new Uint8Array(4);r.bindFramebuffer(r.FRAMEBUFFER,n),r.readPixels(o,s,1,1,r.RGBA,r.UNSIGNED_BYTE,l);var h=ee(l,4),u=h[0],d=h[1],f=h[2],g=h[3];return[u,d,f,g]}function c(r,n,i){return(n=ae(n))in r?Object.defineProperty(r,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[n]=i,r}function je(r,n){var i=Object.keys(r);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(r);n&&(e=e.filter(function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})),i.push.apply(i,e)}return i}function b(r){for(var n=1;n<arguments.length;n++){var i=arguments[n]!=null?arguments[n]:{};n%2?je(Object(i),!0).forEach(function(e){c(r,e,i[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):je(Object(i)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(i,e))})}return r}function ei(r,n){for(;!{}.hasOwnProperty.call(r,n)&&(r=Q(r))!==null;);return r}function Ae(){return Ae=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(r,n,i){var e=ei(r,n);if(e){var t=Object.getOwnPropertyDescriptor(e,n);return t.get?t.get.call(arguments.length<3?r:i):t.value}},Ae.apply(null,arguments)}function wt(r,n,i,e){var t=Ae(Q(r.prototype),n,i);return typeof t=="function"?function(a){return t.apply(i,a)}:t}function ti(r){return r.normalized?1:r.size}function ye(r){var n=0;return r.forEach(function(i){return n+=ti(i)}),n}function xt(r,n,i){var e=r==="VERTEX"?n.VERTEX_SHADER:n.FRAGMENT_SHADER,t=n.createShader(e);if(t===null)throw new Error("loadShader: error while creating the shader");n.shaderSource(t,i),n.compileShader(t);var a=n.getShaderParameter(t,n.COMPILE_STATUS);if(!a){var o=n.getShaderInfoLog(t);throw n.deleteShader(t),new Error(`loadShader: error while compiling the shader:
|
|
3
3
|
`.concat(o,`
|
|
4
4
|
`).concat(i))}return t}function ii(r,n){return xt("VERTEX",r,n)}function ri(r,n){return xt("FRAGMENT",r,n)}function ni(r,n){var i=r.createProgram();if(i===null)throw new Error("loadProgram: error while creating the program.");var e,t;for(e=0,t=n.length;e<t;e++)r.attachShader(i,n[e]);r.linkProgram(i);var a=r.getProgramParameter(i,r.LINK_STATUS);if(!a){var o=r.getProgramInfoLog(i);throw r.deleteProgram(i),new Error("loadProgram: error while linking the program: ".concat(o))}return i}function Ze(r){var n=r.gl,i=r.buffer,e=r.program,t=r.vertexShader,a=r.fragmentShader;n.deleteShader(t),n.deleteShader(a),n.deleteProgram(e),n.deleteBuffer(i)}var qe=`#define PICKING_MODE
|
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-
|
|
15
|
+
<script type="module" crossorigin src="./assets/index-CEjDqng5.js"></script>
|
|
16
16
|
<link rel="modulepreload" crossorigin href="./assets/vendor-tanstack-Dock0eH1.js">
|
|
17
17
|
<link rel="modulepreload" crossorigin href="./assets/vendor-radix-4UOaVWza.js">
|
|
18
18
|
<link rel="modulepreload" crossorigin href="./assets/vendor-recharts-D8rt5lKn.js">
|
|
@@ -11194,7 +11194,20 @@ var ga4SyncResponseDtoSchema = z34.object({
|
|
|
11194
11194
|
rowCount: z34.number().int().nonnegative(),
|
|
11195
11195
|
aiReferralCount: z34.number().int().nonnegative(),
|
|
11196
11196
|
socialReferralCount: z34.number().int().nonnegative(),
|
|
11197
|
+
/**
|
|
11198
|
+
* The window that was ACTUALLY fetched and written, in days — the request's
|
|
11199
|
+
* `days` bounded to GA4's supported sync range (1–90). Read this, not
|
|
11200
|
+
* `requestedDays`, when reporting or reasoning about coverage: a
|
|
11201
|
+
* `--days 500` sync writes 90 days, and this field says 90.
|
|
11202
|
+
*/
|
|
11197
11203
|
days: z34.number().int().nonnegative(),
|
|
11204
|
+
/** The window the caller asked for, before bounding. Equals `days` unless `clamped`. */
|
|
11205
|
+
requestedDays: z34.number().int().nonnegative(),
|
|
11206
|
+
/**
|
|
11207
|
+
* True when `requestedDays` fell outside GA4's supported range and `days`
|
|
11208
|
+
* differs from it — i.e. the synced history is not the range requested.
|
|
11209
|
+
*/
|
|
11210
|
+
clamped: z34.boolean(),
|
|
11198
11211
|
syncedAt: z34.string(),
|
|
11199
11212
|
measurement: z34.object({
|
|
11200
11213
|
acquisition: z34.object({ days: z34.number().int().nonnegative(), status: z34.enum(["ready", "error"]), rowCount: z34.number().int().nonnegative(), error: z34.string().optional() }),
|
|
@@ -581,7 +581,7 @@ import {
|
|
|
581
581
|
wordpressSchemaDeployResultDtoSchema,
|
|
582
582
|
wordpressSchemaStatusResultDtoSchema,
|
|
583
583
|
wordpressStatusDtoSchema
|
|
584
|
-
} from "./chunk-
|
|
584
|
+
} from "./chunk-DCCEKIJ7.js";
|
|
585
585
|
|
|
586
586
|
// src/intelligence-service.ts
|
|
587
587
|
import { eq as eq59, desc as desc26, asc as asc11, and as and47, ne as ne7, or as or13, inArray as inArray21, gte as gte14, lte as lte12 } from "drizzle-orm";
|
|
@@ -32985,6 +32985,7 @@ var routeCatalog = [
|
|
|
32985
32985
|
method: "post",
|
|
32986
32986
|
path: "/api/v1/projects/{name}/ga/sync",
|
|
32987
32987
|
summary: "Sync GA4 traffic and AI referral data",
|
|
32988
|
+
description: "Syncs a window of GA4 history. `days` is bounded to GA4's supported sync range (1-90); a request outside it is clamped rather than rejected. The response reports the window ACTUALLY written as `days`, the unbounded request as `requestedDays`, and sets `clamped` when the two differ.",
|
|
32988
32989
|
tags: ["ga4"],
|
|
32989
32990
|
parameters: [nameParameter],
|
|
32990
32991
|
requestBody: {
|
|
@@ -32994,7 +32995,7 @@ var routeCatalog = [
|
|
|
32994
32995
|
schema: {
|
|
32995
32996
|
type: "object",
|
|
32996
32997
|
properties: {
|
|
32997
|
-
days: integerSchema
|
|
32998
|
+
days: { ...integerSchema, description: "Days of history to sync. Clamped to 1-90; check `clamped` in the response to detect truncation. Defaults to 30." }
|
|
32998
32999
|
}
|
|
32999
33000
|
}
|
|
33000
33001
|
}
|
|
@@ -36117,6 +36118,11 @@ var GA4_SCOPE = "https://www.googleapis.com/auth/analytics.readonly";
|
|
|
36117
36118
|
var GOOGLE_TOKEN_URL2 = "https://oauth2.googleapis.com/token";
|
|
36118
36119
|
var GA4_DEFAULT_SYNC_DAYS = 30;
|
|
36119
36120
|
var GA4_MAX_SYNC_DAYS = 90;
|
|
36121
|
+
function resolveGa4SyncDays(days) {
|
|
36122
|
+
const requestedDays = days != null && Number.isFinite(days) ? Math.trunc(days) : GA4_DEFAULT_SYNC_DAYS;
|
|
36123
|
+
const effectiveDays = Math.min(Math.max(1, requestedDays), GA4_MAX_SYNC_DAYS);
|
|
36124
|
+
return { requestedDays, effectiveDays, clamped: effectiveDays !== requestedDays };
|
|
36125
|
+
}
|
|
36120
36126
|
var GA4_REQUEST_TIMEOUT_MS = 3e4;
|
|
36121
36127
|
var GA4_MAX_PAGES = 50;
|
|
36122
36128
|
var GA4_MAX_CONCURRENT_REQUESTS = 4;
|
|
@@ -36435,7 +36441,7 @@ function formatDate2(d) {
|
|
|
36435
36441
|
return d.toISOString().slice(0, 10);
|
|
36436
36442
|
}
|
|
36437
36443
|
function measurementDateRange(days) {
|
|
36438
|
-
const syncDays =
|
|
36444
|
+
const { effectiveDays: syncDays } = resolveGa4SyncDays(days);
|
|
36439
36445
|
const endDate = /* @__PURE__ */ new Date();
|
|
36440
36446
|
const startDate = /* @__PURE__ */ new Date();
|
|
36441
36447
|
startDate.setUTCDate(startDate.getUTCDate() - syncDays);
|
|
@@ -36543,7 +36549,7 @@ var AI_REFERRAL_SOURCE_FILTERS = [
|
|
|
36543
36549
|
async function fetchTrafficByLandingPage(accessToken, propertyId, days) {
|
|
36544
36550
|
validateAccessToken2(accessToken);
|
|
36545
36551
|
validatePropertyId(propertyId);
|
|
36546
|
-
const syncDays =
|
|
36552
|
+
const { effectiveDays: syncDays } = resolveGa4SyncDays(days);
|
|
36547
36553
|
const endDate = /* @__PURE__ */ new Date();
|
|
36548
36554
|
const startDate = /* @__PURE__ */ new Date();
|
|
36549
36555
|
startDate.setDate(startDate.getDate() - syncDays);
|
|
@@ -36675,7 +36681,7 @@ async function verifyConnectionWithToken(accessToken, propertyId) {
|
|
|
36675
36681
|
async function fetchAggregateSummary(accessToken, propertyId, days) {
|
|
36676
36682
|
validateAccessToken2(accessToken);
|
|
36677
36683
|
validatePropertyId(propertyId);
|
|
36678
|
-
const syncDays =
|
|
36684
|
+
const { effectiveDays: syncDays } = resolveGa4SyncDays(days);
|
|
36679
36685
|
const endDate = /* @__PURE__ */ new Date();
|
|
36680
36686
|
const startDate = /* @__PURE__ */ new Date();
|
|
36681
36687
|
startDate.setDate(startDate.getDate() - syncDays);
|
|
@@ -36725,7 +36731,7 @@ function parseOptionalCountMetric(value) {
|
|
|
36725
36731
|
async function fetchDailyTotals(accessToken, propertyId, days) {
|
|
36726
36732
|
validateAccessToken2(accessToken);
|
|
36727
36733
|
validatePropertyId(propertyId);
|
|
36728
|
-
const syncDays =
|
|
36734
|
+
const { effectiveDays: syncDays } = resolveGa4SyncDays(days);
|
|
36729
36735
|
const endDate = /* @__PURE__ */ new Date();
|
|
36730
36736
|
const startDate = /* @__PURE__ */ new Date();
|
|
36731
36737
|
startDate.setDate(startDate.getDate() - syncDays);
|
|
@@ -36818,7 +36824,7 @@ async function fetchWindowSummary(accessToken, propertyId, windowKey) {
|
|
|
36818
36824
|
async function fetchAiReferrals(accessToken, propertyId, days) {
|
|
36819
36825
|
validateAccessToken2(accessToken);
|
|
36820
36826
|
validatePropertyId(propertyId);
|
|
36821
|
-
const syncDays =
|
|
36827
|
+
const { effectiveDays: syncDays } = resolveGa4SyncDays(days);
|
|
36822
36828
|
const endDate = /* @__PURE__ */ new Date();
|
|
36823
36829
|
const startDate = /* @__PURE__ */ new Date();
|
|
36824
36830
|
startDate.setDate(startDate.getDate() - syncDays);
|
|
@@ -36911,7 +36917,7 @@ var SOCIAL_CHANNEL_GROUPS = ["Organic Social", "Paid Social"];
|
|
|
36911
36917
|
async function fetchSocialReferrals(accessToken, propertyId, days) {
|
|
36912
36918
|
validateAccessToken2(accessToken);
|
|
36913
36919
|
validatePropertyId(propertyId);
|
|
36914
|
-
const syncDays =
|
|
36920
|
+
const { effectiveDays: syncDays } = resolveGa4SyncDays(days);
|
|
36915
36921
|
const endDate = /* @__PURE__ */ new Date();
|
|
36916
36922
|
const startDate = /* @__PURE__ */ new Date();
|
|
36917
36923
|
startDate.setDate(startDate.getDate() - syncDays);
|
|
@@ -45209,7 +45215,7 @@ async function ga4Routes(app, opts) {
|
|
|
45209
45215
|
});
|
|
45210
45216
|
app.post("/projects/:name/ga/sync", async (request, _reply) => {
|
|
45211
45217
|
const project = resolveProject(app.db, request.params.name);
|
|
45212
|
-
const days = request.body?.days
|
|
45218
|
+
const { requestedDays, effectiveDays: days, clamped } = resolveGa4SyncDays(request.body?.days);
|
|
45213
45219
|
const only = request.body?.only;
|
|
45214
45220
|
const validOnlyValues = ["traffic", "ai", "social"];
|
|
45215
45221
|
if (only !== void 0 && !validOnlyValues.includes(only)) {
|
|
@@ -45220,8 +45226,8 @@ async function ga4Routes(app, opts) {
|
|
|
45220
45226
|
const syncAi = !only || only === "ai";
|
|
45221
45227
|
const syncSocial = !only || only === "social";
|
|
45222
45228
|
const measurementState = app.db.select().from(gaMeasurementSyncStates).where(eq44(gaMeasurementSyncStates.projectId, project.id)).get();
|
|
45223
|
-
const acquisitionDays = measurementState?.acquisitionSyncedAt != null ?
|
|
45224
|
-
const leadDays = measurementState?.leadSyncedAt != null ?
|
|
45229
|
+
const acquisitionDays = measurementState?.acquisitionSyncedAt != null ? days : GA4_MAX_SYNC_DAYS;
|
|
45230
|
+
const leadDays = measurementState?.leadSyncedAt != null ? days : GA4_MAX_SYNC_DAYS;
|
|
45225
45231
|
const leadEventNames = project.measurement.leadEventNames;
|
|
45226
45232
|
const startedAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
45227
45233
|
const runId = crypto35.randomUUID();
|
|
@@ -45484,6 +45490,7 @@ async function ga4Routes(app, opts) {
|
|
|
45484
45490
|
aiReferralCount: aiReferrals.length,
|
|
45485
45491
|
socialReferralCount: socialReferrals.length,
|
|
45486
45492
|
days,
|
|
45493
|
+
...clamped ? { requestedDays, clamped } : {},
|
|
45487
45494
|
totalUsers: summary.totalUsers,
|
|
45488
45495
|
...only ? { only } : {}
|
|
45489
45496
|
});
|
|
@@ -45493,6 +45500,8 @@ async function ga4Routes(app, opts) {
|
|
|
45493
45500
|
aiReferralCount: aiReferrals.length,
|
|
45494
45501
|
socialReferralCount: socialReferrals.length,
|
|
45495
45502
|
days,
|
|
45503
|
+
requestedDays,
|
|
45504
|
+
clamped,
|
|
45496
45505
|
syncedAt: now,
|
|
45497
45506
|
measurement: {
|
|
45498
45507
|
acquisition: acquisitionResult,
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
loadConfig,
|
|
11
11
|
loadConfigRaw,
|
|
12
12
|
saveConfigPatch
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-76DCR646.js";
|
|
14
14
|
import {
|
|
15
15
|
CC_CACHE_DIR,
|
|
16
16
|
DUCKDB_SPEC,
|
|
@@ -139,7 +139,7 @@ import {
|
|
|
139
139
|
siteCrawlSnapshots,
|
|
140
140
|
toAlertView,
|
|
141
141
|
usageCounters
|
|
142
|
-
} from "./chunk-
|
|
142
|
+
} from "./chunk-R6QOYKRW.js";
|
|
143
143
|
import {
|
|
144
144
|
AGENT_MEMORY_VALUE_MAX_BYTES,
|
|
145
145
|
AGENT_PROVIDER_IDS,
|
|
@@ -253,7 +253,7 @@ import {
|
|
|
253
253
|
validationError,
|
|
254
254
|
winnabilityClassLabel,
|
|
255
255
|
withRetry
|
|
256
|
-
} from "./chunk-
|
|
256
|
+
} from "./chunk-DCCEKIJ7.js";
|
|
257
257
|
|
|
258
258
|
// src/telemetry.ts
|
|
259
259
|
import crypto from "crypto";
|
|
@@ -9084,7 +9084,7 @@ function readStoredGroundingSources(rawResponse) {
|
|
|
9084
9084
|
return result;
|
|
9085
9085
|
}
|
|
9086
9086
|
async function backfillInsightsCommand(project, opts) {
|
|
9087
|
-
const { IntelligenceService: IntelligenceService2 } = await import("./intelligence-service-
|
|
9087
|
+
const { IntelligenceService: IntelligenceService2 } = await import("./intelligence-service-5UVHKSHR.js");
|
|
9088
9088
|
const config = loadConfig();
|
|
9089
9089
|
const db = createClient(config.database);
|
|
9090
9090
|
migrate(db);
|
package/dist/cli.js
CHANGED
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
showFirstRunNotice,
|
|
32
32
|
trackCliCommandFinished,
|
|
33
33
|
trackEvent
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-XYZMJA3L.js";
|
|
35
35
|
import {
|
|
36
36
|
CliError,
|
|
37
37
|
EXIT_SYSTEM_ERROR,
|
|
@@ -51,7 +51,7 @@ import {
|
|
|
51
51
|
saveConfigPatch,
|
|
52
52
|
systemError,
|
|
53
53
|
usageError
|
|
54
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-76DCR646.js";
|
|
55
55
|
import {
|
|
56
56
|
CLOUDFLARE_WORKER_BINDINGS,
|
|
57
57
|
CLOUDFLARE_WORKER_GENERATED_MARKER,
|
|
@@ -65,7 +65,7 @@ import {
|
|
|
65
65
|
projects,
|
|
66
66
|
queries,
|
|
67
67
|
renderReportHtml
|
|
68
|
-
} from "./chunk-
|
|
68
|
+
} from "./chunk-R6QOYKRW.js";
|
|
69
69
|
import {
|
|
70
70
|
AdsDeliverySnapshotStatuses,
|
|
71
71
|
AdsHistoricalCampaignRollupStatuses,
|
|
@@ -129,7 +129,7 @@ import {
|
|
|
129
129
|
providerQuotaPolicySchema,
|
|
130
130
|
resolveProviderInput,
|
|
131
131
|
winnabilityClassSchema
|
|
132
|
-
} from "./chunk-
|
|
132
|
+
} from "./chunk-DCCEKIJ7.js";
|
|
133
133
|
|
|
134
134
|
// src/cli.ts
|
|
135
135
|
import { pathToFileURL } from "url";
|
|
@@ -3947,6 +3947,11 @@ async function gaSync(project, opts) {
|
|
|
3947
3947
|
if (opts?.days) body.days = opts.days;
|
|
3948
3948
|
if (opts?.only) body.only = opts.only;
|
|
3949
3949
|
const result = await client.gaSync(project, body);
|
|
3950
|
+
if (result.clamped) {
|
|
3951
|
+
console.error(
|
|
3952
|
+
`Warning: requested ${result.requestedDays} days but synced ${result.days} \u2014 GA4's supported sync window bounded the request. Only ${result.days} days of history were written.`
|
|
3953
|
+
);
|
|
3954
|
+
}
|
|
3950
3955
|
if (isMachineFormat(opts?.format)) {
|
|
3951
3956
|
console.log(JSON.stringify(result, null, 2));
|
|
3952
3957
|
return;
|
|
@@ -3958,7 +3963,7 @@ async function gaSync(project, opts) {
|
|
|
3958
3963
|
console.log(` Page rows: ${result.rowCount}`);
|
|
3959
3964
|
console.log(` AI rows: ${result.aiReferralCount}`);
|
|
3960
3965
|
console.log(` Social rows: ${result.socialReferralCount}`);
|
|
3961
|
-
console.log(` Period: ${result.days} days`);
|
|
3966
|
+
console.log(` Period: ${result.days} days${result.clamped ? ` (requested ${result.requestedDays})` : ""}`);
|
|
3962
3967
|
console.log(` Synced at: ${result.syncedAt}`);
|
|
3963
3968
|
}
|
|
3964
3969
|
async function gaTraffic(project, opts) {
|
package/dist/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createServer
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-XYZMJA3L.js";
|
|
4
4
|
import {
|
|
5
5
|
loadConfig
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-76DCR646.js";
|
|
7
|
+
import "./chunk-R6QOYKRW.js";
|
|
8
|
+
import "./chunk-DCCEKIJ7.js";
|
|
9
9
|
export {
|
|
10
10
|
createServer,
|
|
11
11
|
loadConfig
|
package/dist/mcp.js
CHANGED
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
PACKAGE_VERSION,
|
|
4
4
|
canonryMcpTools,
|
|
5
5
|
createApiClient
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-76DCR646.js";
|
|
7
7
|
import {
|
|
8
8
|
isReadOnlyKey
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-DCCEKIJ7.js";
|
|
10
10
|
|
|
11
11
|
// src/mcp/cli.ts
|
|
12
12
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@canonry/canonry",
|
|
3
|
-
"version": "4.164.
|
|
3
|
+
"version": "4.164.1",
|
|
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",
|
|
@@ -78,21 +78,21 @@
|
|
|
78
78
|
"@ainyc/canonry-integration-bing": "0.0.0",
|
|
79
79
|
"@ainyc/canonry-integration-cloudflare-queue": "0.0.0",
|
|
80
80
|
"@ainyc/canonry-integration-openai-ads": "0.0.0",
|
|
81
|
-
"@ainyc/canonry-integration-cloudflare-worker": "0.0.0",
|
|
82
81
|
"@ainyc/canonry-integration-cloud-run": "0.0.0",
|
|
83
82
|
"@ainyc/canonry-integration-commoncrawl": "0.0.0",
|
|
83
|
+
"@ainyc/canonry-integration-cloudflare-worker": "0.0.0",
|
|
84
84
|
"@ainyc/canonry-integration-google": "0.0.0",
|
|
85
|
-
"@ainyc/canonry-integration-wordpress": "0.0.0",
|
|
86
|
-
"@ainyc/canonry-intelligence": "0.0.0",
|
|
87
|
-
"@ainyc/canonry-integration-traffic": "0.0.0",
|
|
88
85
|
"@ainyc/canonry-integration-google-business-profile": "0.0.0",
|
|
89
86
|
"@ainyc/canonry-integration-google-places": "0.0.0",
|
|
87
|
+
"@ainyc/canonry-integration-wordpress": "0.0.0",
|
|
88
|
+
"@ainyc/canonry-integration-traffic": "0.0.0",
|
|
89
|
+
"@ainyc/canonry-intelligence": "0.0.0",
|
|
90
90
|
"@ainyc/canonry-provider-cdp": "0.0.0",
|
|
91
|
+
"@ainyc/canonry-provider-local": "0.0.0",
|
|
91
92
|
"@ainyc/canonry-provider-claude": "0.0.0",
|
|
92
|
-
"@ainyc/canonry-provider-gemini": "0.0.0",
|
|
93
|
-
"@ainyc/canonry-provider-openai": "0.0.0",
|
|
94
93
|
"@ainyc/canonry-provider-perplexity": "0.0.0",
|
|
95
|
-
"@ainyc/canonry-provider-
|
|
94
|
+
"@ainyc/canonry-provider-openai": "0.0.0",
|
|
95
|
+
"@ainyc/canonry-provider-gemini": "0.0.0"
|
|
96
96
|
},
|
|
97
97
|
"scripts": {
|
|
98
98
|
"build": "tsx scripts/copy-agent-assets.ts && tsup && tsx build-web.ts",
|