pagegraph 0.5.1 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -118,5 +118,46 @@ interface BuildSeoGraphInput {
118
118
  */
119
119
  declare function buildSeoGraph(input: BuildSeoGraphInput): SeoGraph;
120
120
  //#endregion
121
- export { SeoGraph as a, SeoSource as c, Register as d, RouteSeo as f, SeoEdgeType as i, buildSeoGraph as l, SitemapPolicy as m, SeoCollection as n, SeoInstance as o, SeoKind as p, SeoEdge as r, SeoNode as s, BuildSeoGraphInput as t, PublicPath as u };
122
- //# sourceMappingURL=graph-BlLoEOw2.d.ts.map
121
+ //#region src/core/checks.d.ts
122
+ type Severity = "structural" | "editorial";
123
+ interface Violation {
124
+ severity: Severity;
125
+ rule: string;
126
+ path?: string | undefined;
127
+ message: string;
128
+ fix?: string | undefined;
129
+ }
130
+ /**
131
+ * A contextual-link coverage rule: every sitemap-eligible page matching the
132
+ * `path` glob must have at least `minInbound` incoming `related` edges. Unlike
133
+ * the static rules, these come from project policy (a CLI flag or
134
+ * `seo.config.ts`), because "which pages are money pages" is app knowledge.
135
+ */
136
+ interface CoverageRule {
137
+ /** Path glob: `*` matches within a segment, `**` matches across segments. */
138
+ readonly path: string;
139
+ /** Minimum incoming contextual (`related`) edges the matched page needs. */
140
+ readonly minInbound: number;
141
+ }
142
+ /**
143
+ * Run every static rule against the graph, then any caller-supplied
144
+ * {@link CoverageRule}s, and return the flat list of violations. With no
145
+ * `coverage` option the result is exactly the static rule set.
146
+ */
147
+ declare function checkGraph(graph: SeoGraph, options?: {
148
+ readonly coverage?: ReadonlyArray<CoverageRule> | undefined;
149
+ }): Array<Violation>;
150
+ /**
151
+ * Enforce contextual-link coverage rules: a named set of sitemap-eligible
152
+ * "money" pages each needs `minInbound` incoming `related` edges. Only
153
+ * `related` edges count — breadcrumb ancestry is navigation, not context.
154
+ *
155
+ * A rule that matches no sitemap-eligible page is itself a violation: a typo or
156
+ * a rule aimed at a noindex page would otherwise pass silently forever.
157
+ */
158
+ declare function checkCoverage(graph: SeoGraph, rules: ReadonlyArray<CoverageRule>): Array<Violation>;
159
+ /** Structural violations fail `pagegraph check`; editorial-only stays green. */
160
+ declare const hasStructuralViolations: (violations: ReadonlyArray<Violation>) => boolean;
161
+ //#endregion
162
+ export { Register as _, checkGraph as a, SitemapPolicy as b, SeoCollection as c, SeoGraph as d, SeoInstance as f, PublicPath as g, buildSeoGraph as h, checkCoverage as i, SeoEdge as l, SeoSource as m, Severity as n, hasStructuralViolations as o, SeoNode as p, Violation as r, BuildSeoGraphInput as s, CoverageRule as t, SeoEdgeType as u, RouteSeo as v, SeoKind as y };
163
+ //# sourceMappingURL=checks-BfsQtKga.d.ts.map