@canonry/canonry 7.83.0 → 7.83.2
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/dist/{backfill-NMHO3AIW.js → backfill-PZBLCRPI.js} +3 -3
- package/dist/{chunk-33EHXZDH.js → chunk-3GXAL3F7.js} +3 -3
- package/dist/{chunk-4XM3T65L.js → chunk-4D2QHIRS.js} +1 -1
- package/dist/{chunk-OIHR2BDK.js → chunk-5AGYH5PX.js} +25 -4
- package/dist/{chunk-S5Y633HH.js → chunk-IJQJSNOZ.js} +1 -1
- package/dist/{chunk-FICCBAAY.js → chunk-IQTMHY23.js} +4007 -632
- package/dist/{chunk-DRZDOL3P.js → chunk-KVSCEZBR.js} +5 -5
- package/dist/{chunk-4PPF3SIU.js → chunk-QHUCHZA3.js} +1 -1
- package/dist/{chunk-JECDHS6M.js → chunk-UGUON7IK.js} +1 -1
- package/dist/{chunk-N3PYCQYT.js → chunk-V52KSHH7.js} +30 -30
- package/dist/{cli-commands-7UXIHESS.js → cli-commands-KNMPQFQO.js} +1 -1
- package/dist/cli.js +2 -2
- package/dist/{dashboard-72QZZ5Q6.js → dashboard-SMI6A6OF.js} +2 -2
- package/dist/{demo-KD2SLCIP.js → demo-DIP5JBEI.js} +1 -1
- package/dist/{demo-server-7EYKEN23.js → demo-server-EWOBWWV4.js} +3 -3
- package/dist/index.d.ts +32 -32
- package/dist/index.js +6 -6
- package/dist/{init-R2OT2EC7.js → init-UZPL4H55.js} +1 -1
- package/dist/{intelligence-service-4D34S2P6.js → intelligence-service-AMXDCTS2.js} +3 -3
- package/dist/{serve-HWLAUXAU.js → serve-KGZW5WPA.js} +7 -7
- package/dist/{session-LBMTUPPY.js → session-BY2FSRYU.js} +4 -4
- package/dist/{tools-LROEIKWI.js → tools-5YRH5NEI.js} +3 -3
- package/dist/{traffic-ZJHB2TWF.js → traffic-CE47IFFI.js} +1 -1
- package/package.json +1 -1
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
backfillSnapshotAttributionCommand,
|
|
11
11
|
backfillTrafficClassificationCommand,
|
|
12
12
|
replayQueryAuditLog
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-3GXAL3F7.js";
|
|
14
14
|
import "./chunk-OMNS42ZQ.js";
|
|
15
15
|
import "./chunk-WA4FD5Y6.js";
|
|
16
16
|
import "./chunk-HGMYEDAQ.js";
|
|
@@ -18,8 +18,8 @@ import "./chunk-LZGVQSZL.js";
|
|
|
18
18
|
import {
|
|
19
19
|
backfillProjectAnswerMentions,
|
|
20
20
|
backfillProjectAnswerMentionsInChunks
|
|
21
|
-
} from "./chunk-
|
|
22
|
-
import "./chunk-
|
|
21
|
+
} from "./chunk-5AGYH5PX.js";
|
|
22
|
+
import "./chunk-IQTMHY23.js";
|
|
23
23
|
import "./chunk-WDEDEEWA.js";
|
|
24
24
|
import "./chunk-3UFQI4KL.js";
|
|
25
25
|
import "./chunk-PHVIMUAQ.js";
|
|
@@ -24,11 +24,11 @@ import {
|
|
|
24
24
|
createRunCompetitorResolver,
|
|
25
25
|
readMarketCompetitorNames,
|
|
26
26
|
refreshSnapshotMentionIdentity
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-5AGYH5PX.js";
|
|
28
28
|
import {
|
|
29
29
|
classifyAiUserFetch,
|
|
30
30
|
classifyCrawler
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-IQTMHY23.js";
|
|
32
32
|
import {
|
|
33
33
|
RawEventSampleEventTypes,
|
|
34
34
|
aiUserFetchEventsHourly,
|
|
@@ -439,7 +439,7 @@ No DB writes performed. Re-run without --dry-run to apply.`);
|
|
|
439
439
|
}
|
|
440
440
|
}
|
|
441
441
|
async function backfillInsightsCommand(project, opts) {
|
|
442
|
-
const { IntelligenceService } = await import("./intelligence-service-
|
|
442
|
+
const { IntelligenceService } = await import("./intelligence-service-AMXDCTS2.js");
|
|
443
443
|
const config = loadConfig();
|
|
444
444
|
const db = createClient(config.database);
|
|
445
445
|
migrate(db);
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
normalizeCloudflareWorkerEvent,
|
|
11
11
|
sessionizeJourneyRequests,
|
|
12
12
|
verifyRequestSignature
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-IQTMHY23.js";
|
|
14
14
|
import {
|
|
15
15
|
currentOutcomeAttribution,
|
|
16
16
|
getRequestContext,
|
|
@@ -49501,9 +49501,10 @@ async function googleRoutes(app, opts) {
|
|
|
49501
49501
|
});
|
|
49502
49502
|
const conditions = [eq70(gbpReviews.projectId, project.id)];
|
|
49503
49503
|
if (locationName) conditions.push(eq70(gbpReviews.locationName, locationName));
|
|
49504
|
-
|
|
49505
|
-
const
|
|
49506
|
-
const
|
|
49504
|
+
const scoped = app.db.select().from(gbpReviews).where(and58(...conditions)).orderBy(desc31(gbpReviews.updateTime), gbpReviews.reviewName).all();
|
|
49505
|
+
const listed = withoutRepeatedPlacesReviews(app.db, project.id, scoped).filter((r) => !negativeOnly || isNegativeReviewRating(r.starRating, negativeMaxStars));
|
|
49506
|
+
const total = listed.length;
|
|
49507
|
+
const reviews = listed.slice(0, limit).map((r) => ({
|
|
49507
49508
|
locationName: r.locationName,
|
|
49508
49509
|
origin: r.origin,
|
|
49509
49510
|
reviewName: r.reviewName,
|
|
@@ -49579,6 +49580,26 @@ function parseReviewNegativeFlag(value) {
|
|
|
49579
49580
|
if (value === "true" || value === "1") return true;
|
|
49580
49581
|
throw validationError('"negative" must be "true" or "false"');
|
|
49581
49582
|
}
|
|
49583
|
+
function withoutRepeatedPlacesReviews(db, projectId, rows) {
|
|
49584
|
+
if (!rows.some((r) => r.origin === "places")) return rows;
|
|
49585
|
+
const v4Locations = new Set(db.select({ locationName: gbpReviewRatings.locationName }).from(gbpReviewRatings).where(and58(eq70(gbpReviewRatings.projectId, projectId), eq70(gbpReviewRatings.origin, "gbp"))).all().map((row) => row.locationName));
|
|
49586
|
+
const covered = new Set(db.select({ locationName: gbpLocations.locationName, reviewsAccess: gbpLocations.reviewsAccess }).from(gbpLocations).where(eq70(gbpLocations.projectId, projectId)).all().filter((loc) => businessProfileReviewsCover(loc.reviewsAccess ?? null, v4Locations.has(loc.locationName))).map((loc) => loc.locationName));
|
|
49587
|
+
const v4Copies = new Set(db.select({ locationName: gbpReviews.locationName, reviewerName: gbpReviews.reviewerName, createTime: gbpReviews.createTime }).from(gbpReviews).where(and58(eq70(gbpReviews.projectId, projectId), eq70(gbpReviews.origin, "gbp"))).all().map(reviewIdentity).filter((key) => key !== null));
|
|
49588
|
+
return rows.filter((r) => {
|
|
49589
|
+
if (r.origin !== "places") return true;
|
|
49590
|
+
if (covered.has(r.locationName)) return false;
|
|
49591
|
+
const identity = reviewIdentity(r);
|
|
49592
|
+
return identity === null || !v4Copies.has(identity);
|
|
49593
|
+
});
|
|
49594
|
+
}
|
|
49595
|
+
function reviewIdentity(review) {
|
|
49596
|
+
const reviewer = review.reviewerName?.trim().toLowerCase();
|
|
49597
|
+
const created = review.createTime === null ? Number.NaN : Date.parse(review.createTime);
|
|
49598
|
+
if (!reviewer || !Number.isFinite(created)) return null;
|
|
49599
|
+
return `${review.locationName}
|
|
49600
|
+
${reviewer}
|
|
49601
|
+
${Math.floor(created / 1e3)}`;
|
|
49602
|
+
}
|
|
49582
49603
|
function parseReviewLimit(value) {
|
|
49583
49604
|
if (value === void 0 || value === "") return REVIEW_LIST_DEFAULT_LIMIT;
|
|
49584
49605
|
const parsed = Number(value);
|
|
@@ -47,7 +47,7 @@ function queueServeHandoff() {
|
|
|
47
47
|
async function runPendingServeHandoff(format) {
|
|
48
48
|
if (!pendingServeHandoff) return;
|
|
49
49
|
pendingServeHandoff = false;
|
|
50
|
-
const { serveCommand } = await import("./serve-
|
|
50
|
+
const { serveCommand } = await import("./serve-KGZW5WPA.js");
|
|
51
51
|
await serveCommand(format);
|
|
52
52
|
}
|
|
53
53
|
|