@riddledc/riddle-proof 0.7.144 → 0.7.145
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/{chunk-LFFTWXLB.js → chunk-ZC6AK3D3.js} +45 -2
- package/dist/cli.cjs +61 -3
- package/dist/cli.js +17 -2
- package/dist/index.cjs +45 -2
- package/dist/index.js +1 -1
- package/dist/profile.cjs +45 -2
- package/dist/profile.js +1 -1
- package/package.json +1 -1
|
@@ -2030,11 +2030,17 @@ function summarizeRouteInventory(viewport, inventory) {
|
|
|
2030
2030
|
const clickthroughs = Array.isArray(inventory.clickthroughs) ? inventory.clickthroughs : [];
|
|
2031
2031
|
const sourceLinkCount = numberValue(inventory.source_link_count) ?? numberValue(inventory.home_game_link_count) ?? null;
|
|
2032
2032
|
const sourceUniqueLinkCount = numberValue(inventory.source_unique_link_count) ?? numberValue(inventory.home_unique_game_link_count) ?? null;
|
|
2033
|
+
const sourceCandidateCount = numberValue(inventory.source_candidate_count);
|
|
2034
|
+
const sourceCandidateUniqueLinkCount = numberValue(inventory.source_candidate_unique_link_count);
|
|
2035
|
+
const sourceLinkScope = stringValue(inventory.source_link_scope);
|
|
2033
2036
|
const duplicateSourceLinks = Array.isArray(inventory.duplicate_source_link_paths) ? inventory.duplicate_source_link_paths.map((path) => String(path)) : [];
|
|
2034
2037
|
const duplicateSourceLinkCount = numberValue(inventory.duplicate_source_link_count) ?? (sourceLinkCount !== null && sourceUniqueLinkCount !== null ? Math.max(0, sourceLinkCount - sourceUniqueLinkCount) : null);
|
|
2035
2038
|
const failures = Array.isArray(inventory.failures) ? inventory.failures : [];
|
|
2036
2039
|
return {
|
|
2037
2040
|
viewport,
|
|
2041
|
+
source_link_scope: sourceLinkScope ?? null,
|
|
2042
|
+
source_candidate_count: sourceCandidateCount ?? sourceLinkCount,
|
|
2043
|
+
source_candidate_unique_link_count: sourceCandidateUniqueLinkCount ?? sourceUniqueLinkCount,
|
|
2038
2044
|
source_link_count: sourceLinkCount,
|
|
2039
2045
|
source_unique_link_count: sourceUniqueLinkCount,
|
|
2040
2046
|
duplicate_source_link_count: duplicateSourceLinkCount,
|
|
@@ -2673,6 +2679,9 @@ function assessCheckFromEvidence(check, evidence) {
|
|
|
2673
2679
|
const clickthroughs = Array.isArray(first?.clickthroughs) ? first.clickthroughs : [];
|
|
2674
2680
|
const sourceLinkCount = numberValue(first?.source_link_count) ?? numberValue(first?.home_game_link_count) ?? null;
|
|
2675
2681
|
const sourceUniqueLinkCount = numberValue(first?.source_unique_link_count) ?? numberValue(first?.home_unique_game_link_count) ?? null;
|
|
2682
|
+
const sourceCandidateCount = numberValue(first?.source_candidate_count);
|
|
2683
|
+
const sourceCandidateUniqueLinkCount = numberValue(first?.source_candidate_unique_link_count);
|
|
2684
|
+
const sourceLinkScope = stringValue(first?.source_link_scope);
|
|
2676
2685
|
const duplicateSourceLinks = Array.isArray(first?.duplicate_source_link_paths) ? first.duplicate_source_link_paths.map((path) => String(path)) : [];
|
|
2677
2686
|
const duplicateSourceLinkCount = numberValue(first?.duplicate_source_link_count) ?? (sourceLinkCount !== null && sourceUniqueLinkCount !== null ? Math.max(0, sourceLinkCount - sourceUniqueLinkCount) : null);
|
|
2678
2687
|
const expectedRoutes = routeInventoryExpectedRouteSummaries(first?.expected_routes, check.expected_routes);
|
|
@@ -2683,6 +2692,9 @@ function assessCheckFromEvidence(check, evidence) {
|
|
|
2683
2692
|
evidence: {
|
|
2684
2693
|
expected_count: check.expected_routes?.length || 0,
|
|
2685
2694
|
expected_routes: expectedRoutes,
|
|
2695
|
+
source_link_scope: sourceLinkScope ?? null,
|
|
2696
|
+
source_candidate_count: sourceCandidateCount ?? sourceLinkCount,
|
|
2697
|
+
source_candidate_unique_link_count: sourceCandidateUniqueLinkCount ?? sourceUniqueLinkCount,
|
|
2686
2698
|
source_link_count: sourceLinkCount,
|
|
2687
2699
|
source_unique_link_count: sourceUniqueLinkCount,
|
|
2688
2700
|
duplicate_source_link_count: duplicateSourceLinkCount,
|
|
@@ -3675,11 +3687,17 @@ function summarizeRouteInventory(viewport, inventory) {
|
|
|
3675
3687
|
const clickthroughs = Array.isArray(inventory.clickthroughs) ? inventory.clickthroughs : [];
|
|
3676
3688
|
const sourceLinkCount = typeof inventory.source_link_count === "number" ? inventory.source_link_count : typeof inventory.home_game_link_count === "number" ? inventory.home_game_link_count : null;
|
|
3677
3689
|
const sourceUniqueLinkCount = typeof inventory.source_unique_link_count === "number" ? inventory.source_unique_link_count : typeof inventory.home_unique_game_link_count === "number" ? inventory.home_unique_game_link_count : null;
|
|
3690
|
+
const sourceCandidateCount = typeof inventory.source_candidate_count === "number" ? inventory.source_candidate_count : null;
|
|
3691
|
+
const sourceCandidateUniqueLinkCount = typeof inventory.source_candidate_unique_link_count === "number" ? inventory.source_candidate_unique_link_count : null;
|
|
3692
|
+
const sourceLinkScope = typeof inventory.source_link_scope === "string" ? inventory.source_link_scope : null;
|
|
3678
3693
|
const duplicateSourceLinks = Array.isArray(inventory.duplicate_source_link_paths) ? inventory.duplicate_source_link_paths.map((path) => String(path)) : [];
|
|
3679
3694
|
const duplicateSourceLinkCount = typeof inventory.duplicate_source_link_count === "number" ? inventory.duplicate_source_link_count : sourceLinkCount !== null && sourceUniqueLinkCount !== null ? Math.max(0, sourceLinkCount - sourceUniqueLinkCount) : null;
|
|
3680
3695
|
const failures = Array.isArray(inventory.failures) ? inventory.failures : [];
|
|
3681
3696
|
return {
|
|
3682
3697
|
viewport,
|
|
3698
|
+
source_link_scope: sourceLinkScope,
|
|
3699
|
+
source_candidate_count: sourceCandidateCount == null ? sourceLinkCount : sourceCandidateCount,
|
|
3700
|
+
source_candidate_unique_link_count: sourceCandidateUniqueLinkCount == null ? sourceUniqueLinkCount : sourceCandidateUniqueLinkCount,
|
|
3683
3701
|
source_link_count: sourceLinkCount,
|
|
3684
3702
|
source_unique_link_count: sourceUniqueLinkCount,
|
|
3685
3703
|
duplicate_source_link_count: duplicateSourceLinkCount,
|
|
@@ -4550,6 +4568,9 @@ function assessProfile(profile, evidence) {
|
|
|
4550
4568
|
const clickthroughs = Array.isArray(first.clickthroughs) ? first.clickthroughs : [];
|
|
4551
4569
|
const sourceLinkCount = typeof first.source_link_count === "number" ? first.source_link_count : typeof first.home_game_link_count === "number" ? first.home_game_link_count : null;
|
|
4552
4570
|
const sourceUniqueLinkCount = typeof first.source_unique_link_count === "number" ? first.source_unique_link_count : typeof first.home_unique_game_link_count === "number" ? first.home_unique_game_link_count : null;
|
|
4571
|
+
const sourceCandidateCount = typeof first.source_candidate_count === "number" ? first.source_candidate_count : null;
|
|
4572
|
+
const sourceCandidateUniqueLinkCount = typeof first.source_candidate_unique_link_count === "number" ? first.source_candidate_unique_link_count : null;
|
|
4573
|
+
const sourceLinkScope = typeof first.source_link_scope === "string" ? first.source_link_scope : null;
|
|
4553
4574
|
const duplicateSourceLinks = Array.isArray(first.duplicate_source_link_paths) ? first.duplicate_source_link_paths.map((path) => String(path)) : [];
|
|
4554
4575
|
const duplicateSourceLinkCount = typeof first.duplicate_source_link_count === "number" ? first.duplicate_source_link_count : sourceLinkCount !== null && sourceUniqueLinkCount !== null ? Math.max(0, sourceLinkCount - sourceUniqueLinkCount) : null;
|
|
4555
4576
|
const expectedRoutes = routeInventoryExpectedRouteSummaries(first.expected_routes, check.expected_routes);
|
|
@@ -4560,6 +4581,9 @@ function assessProfile(profile, evidence) {
|
|
|
4560
4581
|
evidence: {
|
|
4561
4582
|
expected_count: (check.expected_routes || []).length,
|
|
4562
4583
|
expected_routes: expectedRoutes,
|
|
4584
|
+
source_link_scope: sourceLinkScope,
|
|
4585
|
+
source_candidate_count: sourceCandidateCount == null ? sourceLinkCount : sourceCandidateCount,
|
|
4586
|
+
source_candidate_unique_link_count: sourceCandidateUniqueLinkCount == null ? sourceUniqueLinkCount : sourceCandidateUniqueLinkCount,
|
|
4563
4587
|
source_link_count: sourceLinkCount,
|
|
4564
4588
|
source_unique_link_count: sourceUniqueLinkCount,
|
|
4565
4589
|
duplicate_source_link_count: duplicateSourceLinkCount,
|
|
@@ -6731,9 +6755,15 @@ async function collectInventoryHomeLinks(check) {
|
|
|
6731
6755
|
app_path: appPath,
|
|
6732
6756
|
};
|
|
6733
6757
|
});
|
|
6734
|
-
|
|
6758
|
+
const selectedLinks = links.filter((link) => (
|
|
6735
6759
|
routePathPrefix ? link.app_path.startsWith(routePathPrefix) : expectedSet.has(link.app_path)
|
|
6736
6760
|
));
|
|
6761
|
+
return {
|
|
6762
|
+
links: selectedLinks,
|
|
6763
|
+
candidate_count: links.length,
|
|
6764
|
+
candidate_unique_link_count: Array.from(new Set(links.map((link) => link.app_path))).length,
|
|
6765
|
+
source_link_scope: routePathPrefix ? "route_path_prefix" : "expected_routes",
|
|
6766
|
+
};
|
|
6737
6767
|
}, { linkSelector, expectedPaths, routePathPrefix, targetUrl });
|
|
6738
6768
|
}
|
|
6739
6769
|
async function waitForInventoryRouteHealth(check, expectedPath) {
|
|
@@ -6874,7 +6904,11 @@ async function collectRouteInventory(check, viewport) {
|
|
|
6874
6904
|
const expectedPaths = expectedRoutes.map((route) => normalizeRoutePath(route.path));
|
|
6875
6905
|
const expectedSet = new Set(expectedPaths);
|
|
6876
6906
|
const failures = [];
|
|
6877
|
-
const
|
|
6907
|
+
const homeLinkCapture = await collectInventoryHomeLinks(check);
|
|
6908
|
+
const homeLinks = Array.isArray(homeLinkCapture) ? homeLinkCapture : Array.isArray(homeLinkCapture && homeLinkCapture.links) ? homeLinkCapture.links : [];
|
|
6909
|
+
const sourceCandidateCount = typeof homeLinkCapture?.candidate_count === "number" ? homeLinkCapture.candidate_count : homeLinks.length;
|
|
6910
|
+
const sourceCandidateUniqueLinkCount = typeof homeLinkCapture?.candidate_unique_link_count === "number" ? homeLinkCapture.candidate_unique_link_count : new Set(homeLinks.map((link) => link.app_path)).size;
|
|
6911
|
+
const sourceLinkScope = typeof homeLinkCapture?.source_link_scope === "string" ? homeLinkCapture.source_link_scope : check.route_path_prefix ? "route_path_prefix" : "expected_routes";
|
|
6878
6912
|
const homeLinkPaths = homeLinks.map((link) => link.app_path);
|
|
6879
6913
|
const uniqueHomeLinkPaths = Array.from(new Set(homeLinkPaths));
|
|
6880
6914
|
const duplicateHomeLinkPaths = homeLinkPaths.filter((path, index) => homeLinkPaths.indexOf(path) !== index);
|
|
@@ -6956,6 +6990,9 @@ async function collectRouteInventory(check, viewport) {
|
|
|
6956
6990
|
expected_routes: expectedRoutes,
|
|
6957
6991
|
link_selector: check.link_selector || "a[href]",
|
|
6958
6992
|
source_selector: check.source_selector || null,
|
|
6993
|
+
source_link_scope: sourceLinkScope,
|
|
6994
|
+
source_candidate_count: sourceCandidateCount,
|
|
6995
|
+
source_candidate_unique_link_count: sourceCandidateUniqueLinkCount,
|
|
6959
6996
|
source_link_count: homeLinkPaths.length,
|
|
6960
6997
|
source_unique_link_count: uniqueHomeLinkPaths.length,
|
|
6961
6998
|
duplicate_source_link_count: duplicateHomeLinkPaths.length,
|
|
@@ -7152,6 +7189,9 @@ async function captureViewport(viewport) {
|
|
|
7152
7189
|
expected_routes: routeInventoryCheck.expected_routes || [],
|
|
7153
7190
|
link_selector: routeInventoryCheck.link_selector || "a[href]",
|
|
7154
7191
|
source_selector: routeInventoryCheck.source_selector || null,
|
|
7192
|
+
source_link_scope: routeInventoryCheck.route_path_prefix ? "route_path_prefix" : "expected_routes",
|
|
7193
|
+
source_candidate_count: 0,
|
|
7194
|
+
source_candidate_unique_link_count: 0,
|
|
7155
7195
|
source_link_count: 0,
|
|
7156
7196
|
source_unique_link_count: 0,
|
|
7157
7197
|
duplicate_source_link_count: 0,
|
|
@@ -7278,6 +7318,9 @@ function buildProfileEvidence(currentViewports) {
|
|
|
7278
7318
|
.map((viewport) => ({
|
|
7279
7319
|
viewport: viewport.name,
|
|
7280
7320
|
expected_count: (viewport.route_inventory.expected_routes || []).length,
|
|
7321
|
+
source_link_scope: viewport.route_inventory.source_link_scope,
|
|
7322
|
+
source_candidate_count: viewport.route_inventory.source_candidate_count,
|
|
7323
|
+
source_candidate_unique_link_count: viewport.route_inventory.source_candidate_unique_link_count,
|
|
7281
7324
|
source_link_count: viewport.route_inventory.source_link_count == null ? viewport.route_inventory.home_game_link_count : viewport.route_inventory.source_link_count,
|
|
7282
7325
|
source_unique_link_count: viewport.route_inventory.source_unique_link_count == null ? viewport.route_inventory.home_unique_game_link_count : viewport.route_inventory.source_unique_link_count,
|
|
7283
7326
|
duplicate_source_link_count: viewport.route_inventory.duplicate_source_link_count,
|
package/dist/cli.cjs
CHANGED
|
@@ -8967,11 +8967,17 @@ function summarizeRouteInventory(viewport, inventory) {
|
|
|
8967
8967
|
const clickthroughs = Array.isArray(inventory.clickthroughs) ? inventory.clickthroughs : [];
|
|
8968
8968
|
const sourceLinkCount = numberValue(inventory.source_link_count) ?? numberValue(inventory.home_game_link_count) ?? null;
|
|
8969
8969
|
const sourceUniqueLinkCount = numberValue(inventory.source_unique_link_count) ?? numberValue(inventory.home_unique_game_link_count) ?? null;
|
|
8970
|
+
const sourceCandidateCount = numberValue(inventory.source_candidate_count);
|
|
8971
|
+
const sourceCandidateUniqueLinkCount = numberValue(inventory.source_candidate_unique_link_count);
|
|
8972
|
+
const sourceLinkScope = stringValue2(inventory.source_link_scope);
|
|
8970
8973
|
const duplicateSourceLinks = Array.isArray(inventory.duplicate_source_link_paths) ? inventory.duplicate_source_link_paths.map((path7) => String(path7)) : [];
|
|
8971
8974
|
const duplicateSourceLinkCount = numberValue(inventory.duplicate_source_link_count) ?? (sourceLinkCount !== null && sourceUniqueLinkCount !== null ? Math.max(0, sourceLinkCount - sourceUniqueLinkCount) : null);
|
|
8972
8975
|
const failures = Array.isArray(inventory.failures) ? inventory.failures : [];
|
|
8973
8976
|
return {
|
|
8974
8977
|
viewport,
|
|
8978
|
+
source_link_scope: sourceLinkScope ?? null,
|
|
8979
|
+
source_candidate_count: sourceCandidateCount ?? sourceLinkCount,
|
|
8980
|
+
source_candidate_unique_link_count: sourceCandidateUniqueLinkCount ?? sourceUniqueLinkCount,
|
|
8975
8981
|
source_link_count: sourceLinkCount,
|
|
8976
8982
|
source_unique_link_count: sourceUniqueLinkCount,
|
|
8977
8983
|
duplicate_source_link_count: duplicateSourceLinkCount,
|
|
@@ -9610,6 +9616,9 @@ function assessCheckFromEvidence(check, evidence) {
|
|
|
9610
9616
|
const clickthroughs = Array.isArray(first?.clickthroughs) ? first.clickthroughs : [];
|
|
9611
9617
|
const sourceLinkCount = numberValue(first?.source_link_count) ?? numberValue(first?.home_game_link_count) ?? null;
|
|
9612
9618
|
const sourceUniqueLinkCount = numberValue(first?.source_unique_link_count) ?? numberValue(first?.home_unique_game_link_count) ?? null;
|
|
9619
|
+
const sourceCandidateCount = numberValue(first?.source_candidate_count);
|
|
9620
|
+
const sourceCandidateUniqueLinkCount = numberValue(first?.source_candidate_unique_link_count);
|
|
9621
|
+
const sourceLinkScope = stringValue2(first?.source_link_scope);
|
|
9613
9622
|
const duplicateSourceLinks = Array.isArray(first?.duplicate_source_link_paths) ? first.duplicate_source_link_paths.map((path7) => String(path7)) : [];
|
|
9614
9623
|
const duplicateSourceLinkCount = numberValue(first?.duplicate_source_link_count) ?? (sourceLinkCount !== null && sourceUniqueLinkCount !== null ? Math.max(0, sourceLinkCount - sourceUniqueLinkCount) : null);
|
|
9615
9624
|
const expectedRoutes = routeInventoryExpectedRouteSummaries(first?.expected_routes, check.expected_routes);
|
|
@@ -9620,6 +9629,9 @@ function assessCheckFromEvidence(check, evidence) {
|
|
|
9620
9629
|
evidence: {
|
|
9621
9630
|
expected_count: check.expected_routes?.length || 0,
|
|
9622
9631
|
expected_routes: expectedRoutes,
|
|
9632
|
+
source_link_scope: sourceLinkScope ?? null,
|
|
9633
|
+
source_candidate_count: sourceCandidateCount ?? sourceLinkCount,
|
|
9634
|
+
source_candidate_unique_link_count: sourceCandidateUniqueLinkCount ?? sourceUniqueLinkCount,
|
|
9623
9635
|
source_link_count: sourceLinkCount,
|
|
9624
9636
|
source_unique_link_count: sourceUniqueLinkCount,
|
|
9625
9637
|
duplicate_source_link_count: duplicateSourceLinkCount,
|
|
@@ -10596,11 +10608,17 @@ function summarizeRouteInventory(viewport, inventory) {
|
|
|
10596
10608
|
const clickthroughs = Array.isArray(inventory.clickthroughs) ? inventory.clickthroughs : [];
|
|
10597
10609
|
const sourceLinkCount = typeof inventory.source_link_count === "number" ? inventory.source_link_count : typeof inventory.home_game_link_count === "number" ? inventory.home_game_link_count : null;
|
|
10598
10610
|
const sourceUniqueLinkCount = typeof inventory.source_unique_link_count === "number" ? inventory.source_unique_link_count : typeof inventory.home_unique_game_link_count === "number" ? inventory.home_unique_game_link_count : null;
|
|
10611
|
+
const sourceCandidateCount = typeof inventory.source_candidate_count === "number" ? inventory.source_candidate_count : null;
|
|
10612
|
+
const sourceCandidateUniqueLinkCount = typeof inventory.source_candidate_unique_link_count === "number" ? inventory.source_candidate_unique_link_count : null;
|
|
10613
|
+
const sourceLinkScope = typeof inventory.source_link_scope === "string" ? inventory.source_link_scope : null;
|
|
10599
10614
|
const duplicateSourceLinks = Array.isArray(inventory.duplicate_source_link_paths) ? inventory.duplicate_source_link_paths.map((path) => String(path)) : [];
|
|
10600
10615
|
const duplicateSourceLinkCount = typeof inventory.duplicate_source_link_count === "number" ? inventory.duplicate_source_link_count : sourceLinkCount !== null && sourceUniqueLinkCount !== null ? Math.max(0, sourceLinkCount - sourceUniqueLinkCount) : null;
|
|
10601
10616
|
const failures = Array.isArray(inventory.failures) ? inventory.failures : [];
|
|
10602
10617
|
return {
|
|
10603
10618
|
viewport,
|
|
10619
|
+
source_link_scope: sourceLinkScope,
|
|
10620
|
+
source_candidate_count: sourceCandidateCount == null ? sourceLinkCount : sourceCandidateCount,
|
|
10621
|
+
source_candidate_unique_link_count: sourceCandidateUniqueLinkCount == null ? sourceUniqueLinkCount : sourceCandidateUniqueLinkCount,
|
|
10604
10622
|
source_link_count: sourceLinkCount,
|
|
10605
10623
|
source_unique_link_count: sourceUniqueLinkCount,
|
|
10606
10624
|
duplicate_source_link_count: duplicateSourceLinkCount,
|
|
@@ -11471,6 +11489,9 @@ function assessProfile(profile, evidence) {
|
|
|
11471
11489
|
const clickthroughs = Array.isArray(first.clickthroughs) ? first.clickthroughs : [];
|
|
11472
11490
|
const sourceLinkCount = typeof first.source_link_count === "number" ? first.source_link_count : typeof first.home_game_link_count === "number" ? first.home_game_link_count : null;
|
|
11473
11491
|
const sourceUniqueLinkCount = typeof first.source_unique_link_count === "number" ? first.source_unique_link_count : typeof first.home_unique_game_link_count === "number" ? first.home_unique_game_link_count : null;
|
|
11492
|
+
const sourceCandidateCount = typeof first.source_candidate_count === "number" ? first.source_candidate_count : null;
|
|
11493
|
+
const sourceCandidateUniqueLinkCount = typeof first.source_candidate_unique_link_count === "number" ? first.source_candidate_unique_link_count : null;
|
|
11494
|
+
const sourceLinkScope = typeof first.source_link_scope === "string" ? first.source_link_scope : null;
|
|
11474
11495
|
const duplicateSourceLinks = Array.isArray(first.duplicate_source_link_paths) ? first.duplicate_source_link_paths.map((path) => String(path)) : [];
|
|
11475
11496
|
const duplicateSourceLinkCount = typeof first.duplicate_source_link_count === "number" ? first.duplicate_source_link_count : sourceLinkCount !== null && sourceUniqueLinkCount !== null ? Math.max(0, sourceLinkCount - sourceUniqueLinkCount) : null;
|
|
11476
11497
|
const expectedRoutes = routeInventoryExpectedRouteSummaries(first.expected_routes, check.expected_routes);
|
|
@@ -11481,6 +11502,9 @@ function assessProfile(profile, evidence) {
|
|
|
11481
11502
|
evidence: {
|
|
11482
11503
|
expected_count: (check.expected_routes || []).length,
|
|
11483
11504
|
expected_routes: expectedRoutes,
|
|
11505
|
+
source_link_scope: sourceLinkScope,
|
|
11506
|
+
source_candidate_count: sourceCandidateCount == null ? sourceLinkCount : sourceCandidateCount,
|
|
11507
|
+
source_candidate_unique_link_count: sourceCandidateUniqueLinkCount == null ? sourceUniqueLinkCount : sourceCandidateUniqueLinkCount,
|
|
11484
11508
|
source_link_count: sourceLinkCount,
|
|
11485
11509
|
source_unique_link_count: sourceUniqueLinkCount,
|
|
11486
11510
|
duplicate_source_link_count: duplicateSourceLinkCount,
|
|
@@ -13652,9 +13676,15 @@ async function collectInventoryHomeLinks(check) {
|
|
|
13652
13676
|
app_path: appPath,
|
|
13653
13677
|
};
|
|
13654
13678
|
});
|
|
13655
|
-
|
|
13679
|
+
const selectedLinks = links.filter((link) => (
|
|
13656
13680
|
routePathPrefix ? link.app_path.startsWith(routePathPrefix) : expectedSet.has(link.app_path)
|
|
13657
13681
|
));
|
|
13682
|
+
return {
|
|
13683
|
+
links: selectedLinks,
|
|
13684
|
+
candidate_count: links.length,
|
|
13685
|
+
candidate_unique_link_count: Array.from(new Set(links.map((link) => link.app_path))).length,
|
|
13686
|
+
source_link_scope: routePathPrefix ? "route_path_prefix" : "expected_routes",
|
|
13687
|
+
};
|
|
13658
13688
|
}, { linkSelector, expectedPaths, routePathPrefix, targetUrl });
|
|
13659
13689
|
}
|
|
13660
13690
|
async function waitForInventoryRouteHealth(check, expectedPath) {
|
|
@@ -13795,7 +13825,11 @@ async function collectRouteInventory(check, viewport) {
|
|
|
13795
13825
|
const expectedPaths = expectedRoutes.map((route) => normalizeRoutePath(route.path));
|
|
13796
13826
|
const expectedSet = new Set(expectedPaths);
|
|
13797
13827
|
const failures = [];
|
|
13798
|
-
const
|
|
13828
|
+
const homeLinkCapture = await collectInventoryHomeLinks(check);
|
|
13829
|
+
const homeLinks = Array.isArray(homeLinkCapture) ? homeLinkCapture : Array.isArray(homeLinkCapture && homeLinkCapture.links) ? homeLinkCapture.links : [];
|
|
13830
|
+
const sourceCandidateCount = typeof homeLinkCapture?.candidate_count === "number" ? homeLinkCapture.candidate_count : homeLinks.length;
|
|
13831
|
+
const sourceCandidateUniqueLinkCount = typeof homeLinkCapture?.candidate_unique_link_count === "number" ? homeLinkCapture.candidate_unique_link_count : new Set(homeLinks.map((link) => link.app_path)).size;
|
|
13832
|
+
const sourceLinkScope = typeof homeLinkCapture?.source_link_scope === "string" ? homeLinkCapture.source_link_scope : check.route_path_prefix ? "route_path_prefix" : "expected_routes";
|
|
13799
13833
|
const homeLinkPaths = homeLinks.map((link) => link.app_path);
|
|
13800
13834
|
const uniqueHomeLinkPaths = Array.from(new Set(homeLinkPaths));
|
|
13801
13835
|
const duplicateHomeLinkPaths = homeLinkPaths.filter((path, index) => homeLinkPaths.indexOf(path) !== index);
|
|
@@ -13877,6 +13911,9 @@ async function collectRouteInventory(check, viewport) {
|
|
|
13877
13911
|
expected_routes: expectedRoutes,
|
|
13878
13912
|
link_selector: check.link_selector || "a[href]",
|
|
13879
13913
|
source_selector: check.source_selector || null,
|
|
13914
|
+
source_link_scope: sourceLinkScope,
|
|
13915
|
+
source_candidate_count: sourceCandidateCount,
|
|
13916
|
+
source_candidate_unique_link_count: sourceCandidateUniqueLinkCount,
|
|
13880
13917
|
source_link_count: homeLinkPaths.length,
|
|
13881
13918
|
source_unique_link_count: uniqueHomeLinkPaths.length,
|
|
13882
13919
|
duplicate_source_link_count: duplicateHomeLinkPaths.length,
|
|
@@ -14073,6 +14110,9 @@ async function captureViewport(viewport) {
|
|
|
14073
14110
|
expected_routes: routeInventoryCheck.expected_routes || [],
|
|
14074
14111
|
link_selector: routeInventoryCheck.link_selector || "a[href]",
|
|
14075
14112
|
source_selector: routeInventoryCheck.source_selector || null,
|
|
14113
|
+
source_link_scope: routeInventoryCheck.route_path_prefix ? "route_path_prefix" : "expected_routes",
|
|
14114
|
+
source_candidate_count: 0,
|
|
14115
|
+
source_candidate_unique_link_count: 0,
|
|
14076
14116
|
source_link_count: 0,
|
|
14077
14117
|
source_unique_link_count: 0,
|
|
14078
14118
|
duplicate_source_link_count: 0,
|
|
@@ -14199,6 +14239,9 @@ function buildProfileEvidence(currentViewports) {
|
|
|
14199
14239
|
.map((viewport) => ({
|
|
14200
14240
|
viewport: viewport.name,
|
|
14201
14241
|
expected_count: (viewport.route_inventory.expected_routes || []).length,
|
|
14242
|
+
source_link_scope: viewport.route_inventory.source_link_scope,
|
|
14243
|
+
source_candidate_count: viewport.route_inventory.source_candidate_count,
|
|
14244
|
+
source_candidate_unique_link_count: viewport.route_inventory.source_candidate_unique_link_count,
|
|
14202
14245
|
source_link_count: viewport.route_inventory.source_link_count == null ? viewport.route_inventory.home_game_link_count : viewport.route_inventory.source_link_count,
|
|
14203
14246
|
source_unique_link_count: viewport.route_inventory.source_unique_link_count == null ? viewport.route_inventory.home_unique_game_link_count : viewport.route_inventory.source_unique_link_count,
|
|
14204
14247
|
duplicate_source_link_count: viewport.route_inventory.duplicate_source_link_count,
|
|
@@ -14881,6 +14924,12 @@ function cliRouteInventoryRouteList(routes) {
|
|
|
14881
14924
|
const omitted = routes.length > 12 ? `; ${routes.length - 12} more` : "";
|
|
14882
14925
|
return `${visible.join("; ")}${omitted}`;
|
|
14883
14926
|
}
|
|
14927
|
+
function cliRouteInventorySourceScopeLabel(value) {
|
|
14928
|
+
const scope = cliString(value);
|
|
14929
|
+
if (scope === "expected_routes") return "expected routes";
|
|
14930
|
+
if (scope === "route_path_prefix") return "route path prefix";
|
|
14931
|
+
return scope;
|
|
14932
|
+
}
|
|
14884
14933
|
function profileEnvironmentBlockerMarkdown(result) {
|
|
14885
14934
|
const blocker = cliRecord(result.environment_blocker);
|
|
14886
14935
|
if (!blocker) return [];
|
|
@@ -15109,6 +15158,9 @@ function profileRouteInventorySummaryMarkdown(result) {
|
|
|
15109
15158
|
const expectedCount = cliFiniteNumber(evidence.expected_count);
|
|
15110
15159
|
const sourceLinkCount = cliFiniteNumber(evidence.source_link_count);
|
|
15111
15160
|
const sourceUniqueLinkCount = cliFiniteNumber(evidence.source_unique_link_count);
|
|
15161
|
+
const sourceCandidateCount = cliFiniteNumber(evidence.source_candidate_count);
|
|
15162
|
+
const sourceCandidateUniqueLinkCount = cliFiniteNumber(evidence.source_candidate_unique_link_count);
|
|
15163
|
+
const sourceScopeLabel = cliRouteInventorySourceScopeLabel(evidence.source_link_scope);
|
|
15112
15164
|
const directRouteCount = cliFiniteNumber(evidence.direct_route_count);
|
|
15113
15165
|
const clickthroughCount = cliFiniteNumber(evidence.clickthrough_count);
|
|
15114
15166
|
const topLevelFailures = Array.isArray(evidence.failures) ? evidence.failures.length : void 0;
|
|
@@ -15128,15 +15180,21 @@ function profileRouteInventorySummaryMarkdown(result) {
|
|
|
15128
15180
|
if (expectedRoutes.length) {
|
|
15129
15181
|
lines.push(`- ${label} expected routes: ${cliRouteInventoryRouteList(expectedRoutes)}`);
|
|
15130
15182
|
}
|
|
15183
|
+
if (sourceScopeLabel || sourceCandidateCount !== void 0) {
|
|
15184
|
+
const candidateText = sourceCandidateCount === void 0 ? "" : `; selector candidates ${sourceCandidateCount}${sourceCandidateUniqueLinkCount === void 0 ? "" : ` (${sourceCandidateUniqueLinkCount} unique)`}`;
|
|
15185
|
+
lines.push(`- ${label} source scope: ${sourceScopeLabel || "unknown"}${candidateText}`);
|
|
15186
|
+
}
|
|
15131
15187
|
for (const viewport of viewports.slice(0, 8)) {
|
|
15132
15188
|
const viewportName = cliString(viewport.viewport) || cliString(viewport.name) || "viewport";
|
|
15133
15189
|
const viewportSourceLinkCount = cliFiniteNumber(viewport.source_link_count);
|
|
15134
15190
|
const viewportSourceUniqueLinkCount = cliFiniteNumber(viewport.source_unique_link_count);
|
|
15191
|
+
const viewportSourceCandidateCount = cliFiniteNumber(viewport.source_candidate_count);
|
|
15192
|
+
const viewportSourceCandidateUniqueLinkCount = cliFiniteNumber(viewport.source_candidate_unique_link_count);
|
|
15135
15193
|
const viewportDirectRouteCount = cliFiniteNumber(viewport.direct_route_count);
|
|
15136
15194
|
const viewportClickthroughCount = cliFiniteNumber(viewport.clickthrough_count);
|
|
15137
15195
|
const viewportFailureCount = cliFiniteNumber(viewport.failure_count) || 0;
|
|
15138
15196
|
lines.push(
|
|
15139
|
-
`- ${label} ${viewportName}: source ${viewportSourceLinkCount ?? "unknown"}${viewportSourceUniqueLinkCount === void 0 ? "" : ` (${viewportSourceUniqueLinkCount} unique)`}, direct ${viewportDirectRouteCount ?? "unknown"}, clickthrough ${viewportClickthroughCount ?? "unknown"}, failures ${viewportFailureCount}`
|
|
15197
|
+
`- ${label} ${viewportName}: source ${viewportSourceLinkCount ?? "unknown"}${viewportSourceUniqueLinkCount === void 0 ? "" : ` (${viewportSourceUniqueLinkCount} unique)`}${viewportSourceCandidateCount === void 0 ? "" : `, selector candidates ${viewportSourceCandidateCount}${viewportSourceCandidateUniqueLinkCount === void 0 ? "" : ` (${viewportSourceCandidateUniqueLinkCount} unique)`}`}, direct ${viewportDirectRouteCount ?? "unknown"}, clickthrough ${viewportClickthroughCount ?? "unknown"}, failures ${viewportFailureCount}`
|
|
15140
15198
|
);
|
|
15141
15199
|
}
|
|
15142
15200
|
if (viewports.length > 8) lines.push(`- ${label}: ${viewports.length - 8} additional viewport(s) omitted from route inventory summary.`);
|
package/dist/cli.js
CHANGED
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
profileStatusExitCode,
|
|
13
13
|
resolveRiddleProofProfileTargetUrl,
|
|
14
14
|
resolveRiddleProofProfileTimeoutSec
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-ZC6AK3D3.js";
|
|
16
16
|
import {
|
|
17
17
|
createRiddleApiClient,
|
|
18
18
|
parseRiddleViewport
|
|
@@ -590,6 +590,12 @@ function cliRouteInventoryRouteList(routes) {
|
|
|
590
590
|
const omitted = routes.length > 12 ? `; ${routes.length - 12} more` : "";
|
|
591
591
|
return `${visible.join("; ")}${omitted}`;
|
|
592
592
|
}
|
|
593
|
+
function cliRouteInventorySourceScopeLabel(value) {
|
|
594
|
+
const scope = cliString(value);
|
|
595
|
+
if (scope === "expected_routes") return "expected routes";
|
|
596
|
+
if (scope === "route_path_prefix") return "route path prefix";
|
|
597
|
+
return scope;
|
|
598
|
+
}
|
|
593
599
|
function profileEnvironmentBlockerMarkdown(result) {
|
|
594
600
|
const blocker = cliRecord(result.environment_blocker);
|
|
595
601
|
if (!blocker) return [];
|
|
@@ -818,6 +824,9 @@ function profileRouteInventorySummaryMarkdown(result) {
|
|
|
818
824
|
const expectedCount = cliFiniteNumber(evidence.expected_count);
|
|
819
825
|
const sourceLinkCount = cliFiniteNumber(evidence.source_link_count);
|
|
820
826
|
const sourceUniqueLinkCount = cliFiniteNumber(evidence.source_unique_link_count);
|
|
827
|
+
const sourceCandidateCount = cliFiniteNumber(evidence.source_candidate_count);
|
|
828
|
+
const sourceCandidateUniqueLinkCount = cliFiniteNumber(evidence.source_candidate_unique_link_count);
|
|
829
|
+
const sourceScopeLabel = cliRouteInventorySourceScopeLabel(evidence.source_link_scope);
|
|
821
830
|
const directRouteCount = cliFiniteNumber(evidence.direct_route_count);
|
|
822
831
|
const clickthroughCount = cliFiniteNumber(evidence.clickthrough_count);
|
|
823
832
|
const topLevelFailures = Array.isArray(evidence.failures) ? evidence.failures.length : void 0;
|
|
@@ -837,15 +846,21 @@ function profileRouteInventorySummaryMarkdown(result) {
|
|
|
837
846
|
if (expectedRoutes.length) {
|
|
838
847
|
lines.push(`- ${label} expected routes: ${cliRouteInventoryRouteList(expectedRoutes)}`);
|
|
839
848
|
}
|
|
849
|
+
if (sourceScopeLabel || sourceCandidateCount !== void 0) {
|
|
850
|
+
const candidateText = sourceCandidateCount === void 0 ? "" : `; selector candidates ${sourceCandidateCount}${sourceCandidateUniqueLinkCount === void 0 ? "" : ` (${sourceCandidateUniqueLinkCount} unique)`}`;
|
|
851
|
+
lines.push(`- ${label} source scope: ${sourceScopeLabel || "unknown"}${candidateText}`);
|
|
852
|
+
}
|
|
840
853
|
for (const viewport of viewports.slice(0, 8)) {
|
|
841
854
|
const viewportName = cliString(viewport.viewport) || cliString(viewport.name) || "viewport";
|
|
842
855
|
const viewportSourceLinkCount = cliFiniteNumber(viewport.source_link_count);
|
|
843
856
|
const viewportSourceUniqueLinkCount = cliFiniteNumber(viewport.source_unique_link_count);
|
|
857
|
+
const viewportSourceCandidateCount = cliFiniteNumber(viewport.source_candidate_count);
|
|
858
|
+
const viewportSourceCandidateUniqueLinkCount = cliFiniteNumber(viewport.source_candidate_unique_link_count);
|
|
844
859
|
const viewportDirectRouteCount = cliFiniteNumber(viewport.direct_route_count);
|
|
845
860
|
const viewportClickthroughCount = cliFiniteNumber(viewport.clickthrough_count);
|
|
846
861
|
const viewportFailureCount = cliFiniteNumber(viewport.failure_count) || 0;
|
|
847
862
|
lines.push(
|
|
848
|
-
`- ${label} ${viewportName}: source ${viewportSourceLinkCount ?? "unknown"}${viewportSourceUniqueLinkCount === void 0 ? "" : ` (${viewportSourceUniqueLinkCount} unique)`}, direct ${viewportDirectRouteCount ?? "unknown"}, clickthrough ${viewportClickthroughCount ?? "unknown"}, failures ${viewportFailureCount}`
|
|
863
|
+
`- ${label} ${viewportName}: source ${viewportSourceLinkCount ?? "unknown"}${viewportSourceUniqueLinkCount === void 0 ? "" : ` (${viewportSourceUniqueLinkCount} unique)`}${viewportSourceCandidateCount === void 0 ? "" : `, selector candidates ${viewportSourceCandidateCount}${viewportSourceCandidateUniqueLinkCount === void 0 ? "" : ` (${viewportSourceCandidateUniqueLinkCount} unique)`}`}, direct ${viewportDirectRouteCount ?? "unknown"}, clickthrough ${viewportClickthroughCount ?? "unknown"}, failures ${viewportFailureCount}`
|
|
849
864
|
);
|
|
850
865
|
}
|
|
851
866
|
if (viewports.length > 8) lines.push(`- ${label}: ${viewports.length - 8} additional viewport(s) omitted from route inventory summary.`);
|
package/dist/index.cjs
CHANGED
|
@@ -10763,11 +10763,17 @@ function summarizeRouteInventory(viewport, inventory) {
|
|
|
10763
10763
|
const clickthroughs = Array.isArray(inventory.clickthroughs) ? inventory.clickthroughs : [];
|
|
10764
10764
|
const sourceLinkCount = numberValue3(inventory.source_link_count) ?? numberValue3(inventory.home_game_link_count) ?? null;
|
|
10765
10765
|
const sourceUniqueLinkCount = numberValue3(inventory.source_unique_link_count) ?? numberValue3(inventory.home_unique_game_link_count) ?? null;
|
|
10766
|
+
const sourceCandidateCount = numberValue3(inventory.source_candidate_count);
|
|
10767
|
+
const sourceCandidateUniqueLinkCount = numberValue3(inventory.source_candidate_unique_link_count);
|
|
10768
|
+
const sourceLinkScope = stringValue5(inventory.source_link_scope);
|
|
10766
10769
|
const duplicateSourceLinks = Array.isArray(inventory.duplicate_source_link_paths) ? inventory.duplicate_source_link_paths.map((path6) => String(path6)) : [];
|
|
10767
10770
|
const duplicateSourceLinkCount = numberValue3(inventory.duplicate_source_link_count) ?? (sourceLinkCount !== null && sourceUniqueLinkCount !== null ? Math.max(0, sourceLinkCount - sourceUniqueLinkCount) : null);
|
|
10768
10771
|
const failures = Array.isArray(inventory.failures) ? inventory.failures : [];
|
|
10769
10772
|
return {
|
|
10770
10773
|
viewport,
|
|
10774
|
+
source_link_scope: sourceLinkScope ?? null,
|
|
10775
|
+
source_candidate_count: sourceCandidateCount ?? sourceLinkCount,
|
|
10776
|
+
source_candidate_unique_link_count: sourceCandidateUniqueLinkCount ?? sourceUniqueLinkCount,
|
|
10771
10777
|
source_link_count: sourceLinkCount,
|
|
10772
10778
|
source_unique_link_count: sourceUniqueLinkCount,
|
|
10773
10779
|
duplicate_source_link_count: duplicateSourceLinkCount,
|
|
@@ -11406,6 +11412,9 @@ function assessCheckFromEvidence(check, evidence) {
|
|
|
11406
11412
|
const clickthroughs = Array.isArray(first?.clickthroughs) ? first.clickthroughs : [];
|
|
11407
11413
|
const sourceLinkCount = numberValue3(first?.source_link_count) ?? numberValue3(first?.home_game_link_count) ?? null;
|
|
11408
11414
|
const sourceUniqueLinkCount = numberValue3(first?.source_unique_link_count) ?? numberValue3(first?.home_unique_game_link_count) ?? null;
|
|
11415
|
+
const sourceCandidateCount = numberValue3(first?.source_candidate_count);
|
|
11416
|
+
const sourceCandidateUniqueLinkCount = numberValue3(first?.source_candidate_unique_link_count);
|
|
11417
|
+
const sourceLinkScope = stringValue5(first?.source_link_scope);
|
|
11409
11418
|
const duplicateSourceLinks = Array.isArray(first?.duplicate_source_link_paths) ? first.duplicate_source_link_paths.map((path6) => String(path6)) : [];
|
|
11410
11419
|
const duplicateSourceLinkCount = numberValue3(first?.duplicate_source_link_count) ?? (sourceLinkCount !== null && sourceUniqueLinkCount !== null ? Math.max(0, sourceLinkCount - sourceUniqueLinkCount) : null);
|
|
11411
11420
|
const expectedRoutes = routeInventoryExpectedRouteSummaries(first?.expected_routes, check.expected_routes);
|
|
@@ -11416,6 +11425,9 @@ function assessCheckFromEvidence(check, evidence) {
|
|
|
11416
11425
|
evidence: {
|
|
11417
11426
|
expected_count: check.expected_routes?.length || 0,
|
|
11418
11427
|
expected_routes: expectedRoutes,
|
|
11428
|
+
source_link_scope: sourceLinkScope ?? null,
|
|
11429
|
+
source_candidate_count: sourceCandidateCount ?? sourceLinkCount,
|
|
11430
|
+
source_candidate_unique_link_count: sourceCandidateUniqueLinkCount ?? sourceUniqueLinkCount,
|
|
11419
11431
|
source_link_count: sourceLinkCount,
|
|
11420
11432
|
source_unique_link_count: sourceUniqueLinkCount,
|
|
11421
11433
|
duplicate_source_link_count: duplicateSourceLinkCount,
|
|
@@ -12408,11 +12420,17 @@ function summarizeRouteInventory(viewport, inventory) {
|
|
|
12408
12420
|
const clickthroughs = Array.isArray(inventory.clickthroughs) ? inventory.clickthroughs : [];
|
|
12409
12421
|
const sourceLinkCount = typeof inventory.source_link_count === "number" ? inventory.source_link_count : typeof inventory.home_game_link_count === "number" ? inventory.home_game_link_count : null;
|
|
12410
12422
|
const sourceUniqueLinkCount = typeof inventory.source_unique_link_count === "number" ? inventory.source_unique_link_count : typeof inventory.home_unique_game_link_count === "number" ? inventory.home_unique_game_link_count : null;
|
|
12423
|
+
const sourceCandidateCount = typeof inventory.source_candidate_count === "number" ? inventory.source_candidate_count : null;
|
|
12424
|
+
const sourceCandidateUniqueLinkCount = typeof inventory.source_candidate_unique_link_count === "number" ? inventory.source_candidate_unique_link_count : null;
|
|
12425
|
+
const sourceLinkScope = typeof inventory.source_link_scope === "string" ? inventory.source_link_scope : null;
|
|
12411
12426
|
const duplicateSourceLinks = Array.isArray(inventory.duplicate_source_link_paths) ? inventory.duplicate_source_link_paths.map((path) => String(path)) : [];
|
|
12412
12427
|
const duplicateSourceLinkCount = typeof inventory.duplicate_source_link_count === "number" ? inventory.duplicate_source_link_count : sourceLinkCount !== null && sourceUniqueLinkCount !== null ? Math.max(0, sourceLinkCount - sourceUniqueLinkCount) : null;
|
|
12413
12428
|
const failures = Array.isArray(inventory.failures) ? inventory.failures : [];
|
|
12414
12429
|
return {
|
|
12415
12430
|
viewport,
|
|
12431
|
+
source_link_scope: sourceLinkScope,
|
|
12432
|
+
source_candidate_count: sourceCandidateCount == null ? sourceLinkCount : sourceCandidateCount,
|
|
12433
|
+
source_candidate_unique_link_count: sourceCandidateUniqueLinkCount == null ? sourceUniqueLinkCount : sourceCandidateUniqueLinkCount,
|
|
12416
12434
|
source_link_count: sourceLinkCount,
|
|
12417
12435
|
source_unique_link_count: sourceUniqueLinkCount,
|
|
12418
12436
|
duplicate_source_link_count: duplicateSourceLinkCount,
|
|
@@ -13283,6 +13301,9 @@ function assessProfile(profile, evidence) {
|
|
|
13283
13301
|
const clickthroughs = Array.isArray(first.clickthroughs) ? first.clickthroughs : [];
|
|
13284
13302
|
const sourceLinkCount = typeof first.source_link_count === "number" ? first.source_link_count : typeof first.home_game_link_count === "number" ? first.home_game_link_count : null;
|
|
13285
13303
|
const sourceUniqueLinkCount = typeof first.source_unique_link_count === "number" ? first.source_unique_link_count : typeof first.home_unique_game_link_count === "number" ? first.home_unique_game_link_count : null;
|
|
13304
|
+
const sourceCandidateCount = typeof first.source_candidate_count === "number" ? first.source_candidate_count : null;
|
|
13305
|
+
const sourceCandidateUniqueLinkCount = typeof first.source_candidate_unique_link_count === "number" ? first.source_candidate_unique_link_count : null;
|
|
13306
|
+
const sourceLinkScope = typeof first.source_link_scope === "string" ? first.source_link_scope : null;
|
|
13286
13307
|
const duplicateSourceLinks = Array.isArray(first.duplicate_source_link_paths) ? first.duplicate_source_link_paths.map((path) => String(path)) : [];
|
|
13287
13308
|
const duplicateSourceLinkCount = typeof first.duplicate_source_link_count === "number" ? first.duplicate_source_link_count : sourceLinkCount !== null && sourceUniqueLinkCount !== null ? Math.max(0, sourceLinkCount - sourceUniqueLinkCount) : null;
|
|
13288
13309
|
const expectedRoutes = routeInventoryExpectedRouteSummaries(first.expected_routes, check.expected_routes);
|
|
@@ -13293,6 +13314,9 @@ function assessProfile(profile, evidence) {
|
|
|
13293
13314
|
evidence: {
|
|
13294
13315
|
expected_count: (check.expected_routes || []).length,
|
|
13295
13316
|
expected_routes: expectedRoutes,
|
|
13317
|
+
source_link_scope: sourceLinkScope,
|
|
13318
|
+
source_candidate_count: sourceCandidateCount == null ? sourceLinkCount : sourceCandidateCount,
|
|
13319
|
+
source_candidate_unique_link_count: sourceCandidateUniqueLinkCount == null ? sourceUniqueLinkCount : sourceCandidateUniqueLinkCount,
|
|
13296
13320
|
source_link_count: sourceLinkCount,
|
|
13297
13321
|
source_unique_link_count: sourceUniqueLinkCount,
|
|
13298
13322
|
duplicate_source_link_count: duplicateSourceLinkCount,
|
|
@@ -15464,9 +15488,15 @@ async function collectInventoryHomeLinks(check) {
|
|
|
15464
15488
|
app_path: appPath,
|
|
15465
15489
|
};
|
|
15466
15490
|
});
|
|
15467
|
-
|
|
15491
|
+
const selectedLinks = links.filter((link) => (
|
|
15468
15492
|
routePathPrefix ? link.app_path.startsWith(routePathPrefix) : expectedSet.has(link.app_path)
|
|
15469
15493
|
));
|
|
15494
|
+
return {
|
|
15495
|
+
links: selectedLinks,
|
|
15496
|
+
candidate_count: links.length,
|
|
15497
|
+
candidate_unique_link_count: Array.from(new Set(links.map((link) => link.app_path))).length,
|
|
15498
|
+
source_link_scope: routePathPrefix ? "route_path_prefix" : "expected_routes",
|
|
15499
|
+
};
|
|
15470
15500
|
}, { linkSelector, expectedPaths, routePathPrefix, targetUrl });
|
|
15471
15501
|
}
|
|
15472
15502
|
async function waitForInventoryRouteHealth(check, expectedPath) {
|
|
@@ -15607,7 +15637,11 @@ async function collectRouteInventory(check, viewport) {
|
|
|
15607
15637
|
const expectedPaths = expectedRoutes.map((route) => normalizeRoutePath(route.path));
|
|
15608
15638
|
const expectedSet = new Set(expectedPaths);
|
|
15609
15639
|
const failures = [];
|
|
15610
|
-
const
|
|
15640
|
+
const homeLinkCapture = await collectInventoryHomeLinks(check);
|
|
15641
|
+
const homeLinks = Array.isArray(homeLinkCapture) ? homeLinkCapture : Array.isArray(homeLinkCapture && homeLinkCapture.links) ? homeLinkCapture.links : [];
|
|
15642
|
+
const sourceCandidateCount = typeof homeLinkCapture?.candidate_count === "number" ? homeLinkCapture.candidate_count : homeLinks.length;
|
|
15643
|
+
const sourceCandidateUniqueLinkCount = typeof homeLinkCapture?.candidate_unique_link_count === "number" ? homeLinkCapture.candidate_unique_link_count : new Set(homeLinks.map((link) => link.app_path)).size;
|
|
15644
|
+
const sourceLinkScope = typeof homeLinkCapture?.source_link_scope === "string" ? homeLinkCapture.source_link_scope : check.route_path_prefix ? "route_path_prefix" : "expected_routes";
|
|
15611
15645
|
const homeLinkPaths = homeLinks.map((link) => link.app_path);
|
|
15612
15646
|
const uniqueHomeLinkPaths = Array.from(new Set(homeLinkPaths));
|
|
15613
15647
|
const duplicateHomeLinkPaths = homeLinkPaths.filter((path, index) => homeLinkPaths.indexOf(path) !== index);
|
|
@@ -15689,6 +15723,9 @@ async function collectRouteInventory(check, viewport) {
|
|
|
15689
15723
|
expected_routes: expectedRoutes,
|
|
15690
15724
|
link_selector: check.link_selector || "a[href]",
|
|
15691
15725
|
source_selector: check.source_selector || null,
|
|
15726
|
+
source_link_scope: sourceLinkScope,
|
|
15727
|
+
source_candidate_count: sourceCandidateCount,
|
|
15728
|
+
source_candidate_unique_link_count: sourceCandidateUniqueLinkCount,
|
|
15692
15729
|
source_link_count: homeLinkPaths.length,
|
|
15693
15730
|
source_unique_link_count: uniqueHomeLinkPaths.length,
|
|
15694
15731
|
duplicate_source_link_count: duplicateHomeLinkPaths.length,
|
|
@@ -15885,6 +15922,9 @@ async function captureViewport(viewport) {
|
|
|
15885
15922
|
expected_routes: routeInventoryCheck.expected_routes || [],
|
|
15886
15923
|
link_selector: routeInventoryCheck.link_selector || "a[href]",
|
|
15887
15924
|
source_selector: routeInventoryCheck.source_selector || null,
|
|
15925
|
+
source_link_scope: routeInventoryCheck.route_path_prefix ? "route_path_prefix" : "expected_routes",
|
|
15926
|
+
source_candidate_count: 0,
|
|
15927
|
+
source_candidate_unique_link_count: 0,
|
|
15888
15928
|
source_link_count: 0,
|
|
15889
15929
|
source_unique_link_count: 0,
|
|
15890
15930
|
duplicate_source_link_count: 0,
|
|
@@ -16011,6 +16051,9 @@ function buildProfileEvidence(currentViewports) {
|
|
|
16011
16051
|
.map((viewport) => ({
|
|
16012
16052
|
viewport: viewport.name,
|
|
16013
16053
|
expected_count: (viewport.route_inventory.expected_routes || []).length,
|
|
16054
|
+
source_link_scope: viewport.route_inventory.source_link_scope,
|
|
16055
|
+
source_candidate_count: viewport.route_inventory.source_candidate_count,
|
|
16056
|
+
source_candidate_unique_link_count: viewport.route_inventory.source_candidate_unique_link_count,
|
|
16014
16057
|
source_link_count: viewport.route_inventory.source_link_count == null ? viewport.route_inventory.home_game_link_count : viewport.route_inventory.source_link_count,
|
|
16015
16058
|
source_unique_link_count: viewport.route_inventory.source_unique_link_count == null ? viewport.route_inventory.home_unique_game_link_count : viewport.route_inventory.source_unique_link_count,
|
|
16016
16059
|
duplicate_source_link_count: viewport.route_inventory.duplicate_source_link_count,
|
package/dist/index.js
CHANGED
|
@@ -62,7 +62,7 @@ import {
|
|
|
62
62
|
resolveRiddleProofProfileTimeoutSec,
|
|
63
63
|
slugifyRiddleProofProfileName,
|
|
64
64
|
summarizeRiddleProofProfileResult
|
|
65
|
-
} from "./chunk-
|
|
65
|
+
} from "./chunk-ZC6AK3D3.js";
|
|
66
66
|
import {
|
|
67
67
|
DEFAULT_RIDDLE_API_BASE_URL,
|
|
68
68
|
DEFAULT_RIDDLE_API_KEY_FILE,
|
package/dist/profile.cjs
CHANGED
|
@@ -2077,11 +2077,17 @@ function summarizeRouteInventory(viewport, inventory) {
|
|
|
2077
2077
|
const clickthroughs = Array.isArray(inventory.clickthroughs) ? inventory.clickthroughs : [];
|
|
2078
2078
|
const sourceLinkCount = numberValue(inventory.source_link_count) ?? numberValue(inventory.home_game_link_count) ?? null;
|
|
2079
2079
|
const sourceUniqueLinkCount = numberValue(inventory.source_unique_link_count) ?? numberValue(inventory.home_unique_game_link_count) ?? null;
|
|
2080
|
+
const sourceCandidateCount = numberValue(inventory.source_candidate_count);
|
|
2081
|
+
const sourceCandidateUniqueLinkCount = numberValue(inventory.source_candidate_unique_link_count);
|
|
2082
|
+
const sourceLinkScope = stringValue(inventory.source_link_scope);
|
|
2080
2083
|
const duplicateSourceLinks = Array.isArray(inventory.duplicate_source_link_paths) ? inventory.duplicate_source_link_paths.map((path) => String(path)) : [];
|
|
2081
2084
|
const duplicateSourceLinkCount = numberValue(inventory.duplicate_source_link_count) ?? (sourceLinkCount !== null && sourceUniqueLinkCount !== null ? Math.max(0, sourceLinkCount - sourceUniqueLinkCount) : null);
|
|
2082
2085
|
const failures = Array.isArray(inventory.failures) ? inventory.failures : [];
|
|
2083
2086
|
return {
|
|
2084
2087
|
viewport,
|
|
2088
|
+
source_link_scope: sourceLinkScope ?? null,
|
|
2089
|
+
source_candidate_count: sourceCandidateCount ?? sourceLinkCount,
|
|
2090
|
+
source_candidate_unique_link_count: sourceCandidateUniqueLinkCount ?? sourceUniqueLinkCount,
|
|
2085
2091
|
source_link_count: sourceLinkCount,
|
|
2086
2092
|
source_unique_link_count: sourceUniqueLinkCount,
|
|
2087
2093
|
duplicate_source_link_count: duplicateSourceLinkCount,
|
|
@@ -2720,6 +2726,9 @@ function assessCheckFromEvidence(check, evidence) {
|
|
|
2720
2726
|
const clickthroughs = Array.isArray(first?.clickthroughs) ? first.clickthroughs : [];
|
|
2721
2727
|
const sourceLinkCount = numberValue(first?.source_link_count) ?? numberValue(first?.home_game_link_count) ?? null;
|
|
2722
2728
|
const sourceUniqueLinkCount = numberValue(first?.source_unique_link_count) ?? numberValue(first?.home_unique_game_link_count) ?? null;
|
|
2729
|
+
const sourceCandidateCount = numberValue(first?.source_candidate_count);
|
|
2730
|
+
const sourceCandidateUniqueLinkCount = numberValue(first?.source_candidate_unique_link_count);
|
|
2731
|
+
const sourceLinkScope = stringValue(first?.source_link_scope);
|
|
2723
2732
|
const duplicateSourceLinks = Array.isArray(first?.duplicate_source_link_paths) ? first.duplicate_source_link_paths.map((path) => String(path)) : [];
|
|
2724
2733
|
const duplicateSourceLinkCount = numberValue(first?.duplicate_source_link_count) ?? (sourceLinkCount !== null && sourceUniqueLinkCount !== null ? Math.max(0, sourceLinkCount - sourceUniqueLinkCount) : null);
|
|
2725
2734
|
const expectedRoutes = routeInventoryExpectedRouteSummaries(first?.expected_routes, check.expected_routes);
|
|
@@ -2730,6 +2739,9 @@ function assessCheckFromEvidence(check, evidence) {
|
|
|
2730
2739
|
evidence: {
|
|
2731
2740
|
expected_count: check.expected_routes?.length || 0,
|
|
2732
2741
|
expected_routes: expectedRoutes,
|
|
2742
|
+
source_link_scope: sourceLinkScope ?? null,
|
|
2743
|
+
source_candidate_count: sourceCandidateCount ?? sourceLinkCount,
|
|
2744
|
+
source_candidate_unique_link_count: sourceCandidateUniqueLinkCount ?? sourceUniqueLinkCount,
|
|
2733
2745
|
source_link_count: sourceLinkCount,
|
|
2734
2746
|
source_unique_link_count: sourceUniqueLinkCount,
|
|
2735
2747
|
duplicate_source_link_count: duplicateSourceLinkCount,
|
|
@@ -3722,11 +3734,17 @@ function summarizeRouteInventory(viewport, inventory) {
|
|
|
3722
3734
|
const clickthroughs = Array.isArray(inventory.clickthroughs) ? inventory.clickthroughs : [];
|
|
3723
3735
|
const sourceLinkCount = typeof inventory.source_link_count === "number" ? inventory.source_link_count : typeof inventory.home_game_link_count === "number" ? inventory.home_game_link_count : null;
|
|
3724
3736
|
const sourceUniqueLinkCount = typeof inventory.source_unique_link_count === "number" ? inventory.source_unique_link_count : typeof inventory.home_unique_game_link_count === "number" ? inventory.home_unique_game_link_count : null;
|
|
3737
|
+
const sourceCandidateCount = typeof inventory.source_candidate_count === "number" ? inventory.source_candidate_count : null;
|
|
3738
|
+
const sourceCandidateUniqueLinkCount = typeof inventory.source_candidate_unique_link_count === "number" ? inventory.source_candidate_unique_link_count : null;
|
|
3739
|
+
const sourceLinkScope = typeof inventory.source_link_scope === "string" ? inventory.source_link_scope : null;
|
|
3725
3740
|
const duplicateSourceLinks = Array.isArray(inventory.duplicate_source_link_paths) ? inventory.duplicate_source_link_paths.map((path) => String(path)) : [];
|
|
3726
3741
|
const duplicateSourceLinkCount = typeof inventory.duplicate_source_link_count === "number" ? inventory.duplicate_source_link_count : sourceLinkCount !== null && sourceUniqueLinkCount !== null ? Math.max(0, sourceLinkCount - sourceUniqueLinkCount) : null;
|
|
3727
3742
|
const failures = Array.isArray(inventory.failures) ? inventory.failures : [];
|
|
3728
3743
|
return {
|
|
3729
3744
|
viewport,
|
|
3745
|
+
source_link_scope: sourceLinkScope,
|
|
3746
|
+
source_candidate_count: sourceCandidateCount == null ? sourceLinkCount : sourceCandidateCount,
|
|
3747
|
+
source_candidate_unique_link_count: sourceCandidateUniqueLinkCount == null ? sourceUniqueLinkCount : sourceCandidateUniqueLinkCount,
|
|
3730
3748
|
source_link_count: sourceLinkCount,
|
|
3731
3749
|
source_unique_link_count: sourceUniqueLinkCount,
|
|
3732
3750
|
duplicate_source_link_count: duplicateSourceLinkCount,
|
|
@@ -4597,6 +4615,9 @@ function assessProfile(profile, evidence) {
|
|
|
4597
4615
|
const clickthroughs = Array.isArray(first.clickthroughs) ? first.clickthroughs : [];
|
|
4598
4616
|
const sourceLinkCount = typeof first.source_link_count === "number" ? first.source_link_count : typeof first.home_game_link_count === "number" ? first.home_game_link_count : null;
|
|
4599
4617
|
const sourceUniqueLinkCount = typeof first.source_unique_link_count === "number" ? first.source_unique_link_count : typeof first.home_unique_game_link_count === "number" ? first.home_unique_game_link_count : null;
|
|
4618
|
+
const sourceCandidateCount = typeof first.source_candidate_count === "number" ? first.source_candidate_count : null;
|
|
4619
|
+
const sourceCandidateUniqueLinkCount = typeof first.source_candidate_unique_link_count === "number" ? first.source_candidate_unique_link_count : null;
|
|
4620
|
+
const sourceLinkScope = typeof first.source_link_scope === "string" ? first.source_link_scope : null;
|
|
4600
4621
|
const duplicateSourceLinks = Array.isArray(first.duplicate_source_link_paths) ? first.duplicate_source_link_paths.map((path) => String(path)) : [];
|
|
4601
4622
|
const duplicateSourceLinkCount = typeof first.duplicate_source_link_count === "number" ? first.duplicate_source_link_count : sourceLinkCount !== null && sourceUniqueLinkCount !== null ? Math.max(0, sourceLinkCount - sourceUniqueLinkCount) : null;
|
|
4602
4623
|
const expectedRoutes = routeInventoryExpectedRouteSummaries(first.expected_routes, check.expected_routes);
|
|
@@ -4607,6 +4628,9 @@ function assessProfile(profile, evidence) {
|
|
|
4607
4628
|
evidence: {
|
|
4608
4629
|
expected_count: (check.expected_routes || []).length,
|
|
4609
4630
|
expected_routes: expectedRoutes,
|
|
4631
|
+
source_link_scope: sourceLinkScope,
|
|
4632
|
+
source_candidate_count: sourceCandidateCount == null ? sourceLinkCount : sourceCandidateCount,
|
|
4633
|
+
source_candidate_unique_link_count: sourceCandidateUniqueLinkCount == null ? sourceUniqueLinkCount : sourceCandidateUniqueLinkCount,
|
|
4610
4634
|
source_link_count: sourceLinkCount,
|
|
4611
4635
|
source_unique_link_count: sourceUniqueLinkCount,
|
|
4612
4636
|
duplicate_source_link_count: duplicateSourceLinkCount,
|
|
@@ -6778,9 +6802,15 @@ async function collectInventoryHomeLinks(check) {
|
|
|
6778
6802
|
app_path: appPath,
|
|
6779
6803
|
};
|
|
6780
6804
|
});
|
|
6781
|
-
|
|
6805
|
+
const selectedLinks = links.filter((link) => (
|
|
6782
6806
|
routePathPrefix ? link.app_path.startsWith(routePathPrefix) : expectedSet.has(link.app_path)
|
|
6783
6807
|
));
|
|
6808
|
+
return {
|
|
6809
|
+
links: selectedLinks,
|
|
6810
|
+
candidate_count: links.length,
|
|
6811
|
+
candidate_unique_link_count: Array.from(new Set(links.map((link) => link.app_path))).length,
|
|
6812
|
+
source_link_scope: routePathPrefix ? "route_path_prefix" : "expected_routes",
|
|
6813
|
+
};
|
|
6784
6814
|
}, { linkSelector, expectedPaths, routePathPrefix, targetUrl });
|
|
6785
6815
|
}
|
|
6786
6816
|
async function waitForInventoryRouteHealth(check, expectedPath) {
|
|
@@ -6921,7 +6951,11 @@ async function collectRouteInventory(check, viewport) {
|
|
|
6921
6951
|
const expectedPaths = expectedRoutes.map((route) => normalizeRoutePath(route.path));
|
|
6922
6952
|
const expectedSet = new Set(expectedPaths);
|
|
6923
6953
|
const failures = [];
|
|
6924
|
-
const
|
|
6954
|
+
const homeLinkCapture = await collectInventoryHomeLinks(check);
|
|
6955
|
+
const homeLinks = Array.isArray(homeLinkCapture) ? homeLinkCapture : Array.isArray(homeLinkCapture && homeLinkCapture.links) ? homeLinkCapture.links : [];
|
|
6956
|
+
const sourceCandidateCount = typeof homeLinkCapture?.candidate_count === "number" ? homeLinkCapture.candidate_count : homeLinks.length;
|
|
6957
|
+
const sourceCandidateUniqueLinkCount = typeof homeLinkCapture?.candidate_unique_link_count === "number" ? homeLinkCapture.candidate_unique_link_count : new Set(homeLinks.map((link) => link.app_path)).size;
|
|
6958
|
+
const sourceLinkScope = typeof homeLinkCapture?.source_link_scope === "string" ? homeLinkCapture.source_link_scope : check.route_path_prefix ? "route_path_prefix" : "expected_routes";
|
|
6925
6959
|
const homeLinkPaths = homeLinks.map((link) => link.app_path);
|
|
6926
6960
|
const uniqueHomeLinkPaths = Array.from(new Set(homeLinkPaths));
|
|
6927
6961
|
const duplicateHomeLinkPaths = homeLinkPaths.filter((path, index) => homeLinkPaths.indexOf(path) !== index);
|
|
@@ -7003,6 +7037,9 @@ async function collectRouteInventory(check, viewport) {
|
|
|
7003
7037
|
expected_routes: expectedRoutes,
|
|
7004
7038
|
link_selector: check.link_selector || "a[href]",
|
|
7005
7039
|
source_selector: check.source_selector || null,
|
|
7040
|
+
source_link_scope: sourceLinkScope,
|
|
7041
|
+
source_candidate_count: sourceCandidateCount,
|
|
7042
|
+
source_candidate_unique_link_count: sourceCandidateUniqueLinkCount,
|
|
7006
7043
|
source_link_count: homeLinkPaths.length,
|
|
7007
7044
|
source_unique_link_count: uniqueHomeLinkPaths.length,
|
|
7008
7045
|
duplicate_source_link_count: duplicateHomeLinkPaths.length,
|
|
@@ -7199,6 +7236,9 @@ async function captureViewport(viewport) {
|
|
|
7199
7236
|
expected_routes: routeInventoryCheck.expected_routes || [],
|
|
7200
7237
|
link_selector: routeInventoryCheck.link_selector || "a[href]",
|
|
7201
7238
|
source_selector: routeInventoryCheck.source_selector || null,
|
|
7239
|
+
source_link_scope: routeInventoryCheck.route_path_prefix ? "route_path_prefix" : "expected_routes",
|
|
7240
|
+
source_candidate_count: 0,
|
|
7241
|
+
source_candidate_unique_link_count: 0,
|
|
7202
7242
|
source_link_count: 0,
|
|
7203
7243
|
source_unique_link_count: 0,
|
|
7204
7244
|
duplicate_source_link_count: 0,
|
|
@@ -7325,6 +7365,9 @@ function buildProfileEvidence(currentViewports) {
|
|
|
7325
7365
|
.map((viewport) => ({
|
|
7326
7366
|
viewport: viewport.name,
|
|
7327
7367
|
expected_count: (viewport.route_inventory.expected_routes || []).length,
|
|
7368
|
+
source_link_scope: viewport.route_inventory.source_link_scope,
|
|
7369
|
+
source_candidate_count: viewport.route_inventory.source_candidate_count,
|
|
7370
|
+
source_candidate_unique_link_count: viewport.route_inventory.source_candidate_unique_link_count,
|
|
7328
7371
|
source_link_count: viewport.route_inventory.source_link_count == null ? viewport.route_inventory.home_game_link_count : viewport.route_inventory.source_link_count,
|
|
7329
7372
|
source_unique_link_count: viewport.route_inventory.source_unique_link_count == null ? viewport.route_inventory.home_unique_game_link_count : viewport.route_inventory.source_unique_link_count,
|
|
7330
7373
|
duplicate_source_link_count: viewport.route_inventory.duplicate_source_link_count,
|
package/dist/profile.js
CHANGED
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
resolveRiddleProofProfileTimeoutSec,
|
|
24
24
|
slugifyRiddleProofProfileName,
|
|
25
25
|
summarizeRiddleProofProfileResult
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-ZC6AK3D3.js";
|
|
27
27
|
export {
|
|
28
28
|
RIDDLE_PROOF_PROFILE_CHECK_TYPES,
|
|
29
29
|
RIDDLE_PROOF_PROFILE_EVIDENCE_VERSION,
|