@dogsbay/commands 0.2.0-beta.114 → 0.2.0-beta.116

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.
@@ -1,243 +0,0 @@
1
- /**
2
- * What page frontmatter MEANS — the vocabulary `validate` checks against
3
- * (plans/frontmatter-validation.md).
4
- *
5
- * Three sources, in order of how much the writer had to declare:
6
- *
7
- * 1. WELL-KNOWN FIELDS. `docs/metadata.md` is the field reference and the
8
- * emitters read exactly these; the table below mirrors it. A bare
9
- * directory with no config gets type checking for free.
10
- * 2. `taxonomies:` in `dogsbay.config.*` — already carries `values` (the
11
- * allowed terms) and `hierarchical` (whether `api/rest` is legal). No
12
- * new config surface: if you declared the taxonomy, you declared the
13
- * check.
14
- * 3. `content.frontmatter` — opt-in strictness: `required` (globs → fields
15
- * that must be present) and `unknown` (ignore | warn | error).
16
- *
17
- * Unknown keys are silent unless (3) asks for them: free-form keys are
18
- * legitimate, and a checker that cries wolf on them gets switched off.
19
- *
20
- * The nine fields `parseMeta` owns are checked against the rules IT applies
21
- * (it silently drops what it cannot use), and `tests/meta-parity.test.ts`
22
- * asserts the two agree value-by-value — the anti-drift device, since a
23
- * checker that disagrees with the parser is worse than no checker.
24
- */
25
- import { STATUS_VALUES } from "@dogsbay/types";
26
- /**
27
- * The well-known fields. Anything not listed is free-form as far as the
28
- * engine is concerned (see `unknown` above).
29
- */
30
- export const WELL_KNOWN_FIELDS = {
31
- title: { type: "string" },
32
- description: { type: "string" },
33
- // parseMeta coerces a single string ("tags: api"), so a scalar is correct authoring
34
- tags: { type: "string|string[]" },
35
- category: { type: "string|string[]" },
36
- type: { type: "string" },
37
- status: { type: "string", values: [...STATUS_VALUES] },
38
- audience: { type: "string|string[]" },
39
- weight: { type: "number" },
40
- updated: { type: "date" },
41
- created: { type: "date" },
42
- lastUpdated: { type: "date" },
43
- lastmod: { type: "date" },
44
- date: { type: "date" },
45
- props: { type: "object" },
46
- keyword: { type: "string" },
47
- targetKeyword: { type: "string" },
48
- // visibility / build behaviour the emitters read
49
- draft: { type: "boolean" },
50
- noindex: { type: "boolean" },
51
- nofollow: { type: "boolean" },
52
- excludeFromSearch: { type: "boolean" },
53
- pagefindExclude: { type: "boolean" },
54
- ogImage: { type: "string" },
55
- ogType: { type: "string" },
56
- canonicalUrl: { type: "string" },
57
- slug: { type: "string" },
58
- // every reader casts/checks `redirect` as a STRING: a list would validate and then be ignored
59
- redirect: { type: "string" },
60
- // Old paths that should forward TO this page. A list, unlike `redirect`,
61
- // because a page accumulates former URLs and they are deleted with it.
62
- aliases: { type: "string[]" },
63
- llmActions: { type: "boolean|object" },
64
- preprocess: { type: "boolean" },
65
- autoH1: { type: "boolean" },
66
- autoLede: { type: "boolean" },
67
- fragment: { type: "boolean" },
68
- _fragment: { type: "boolean" },
69
- "single-page": { type: "string", values: ["yes", "children", "no"] },
70
- // chunk facet keys (@dogsbay/chunk facets.ts TAXONOMY_KEYS) — consumed even without a
71
- // `taxonomies:` declaration, so reporting them as unknown would be a false positive
72
- product: { type: "scalar|scalar[]" },
73
- platform: { type: "scalar|scalar[]" },
74
- edition: { type: "scalar|scalar[]" },
75
- // DITA profiling attributes carried through the pipeline
76
- rev: { type: "scalar|scalar[]" },
77
- otherprops: { type: "scalar|scalar[]" },
78
- // stamped by the single-page (book) emitter on the pages it generates
79
- granularity: { type: "string" },
80
- };
81
- /**
82
- * Fields the pipeline ACCEPTS but does not act on: they are here so imported
83
- * content does not light up as "unknown", not because setting them does
84
- * anything. Kept in one list so the docs can say so honestly.
85
- */
86
- export const INERT_FIELDS = new Set(["canonicalUrl", "ogType", "autoH1", "autoLede", "date", "fragment", "_fragment", "slug"]);
87
- /**
88
- * Keys the AGGREGATOR owns: the multi-source build writes them, and a writer
89
- * setting one by hand is a mistake that shows up as a page routed to the
90
- * wrong namespace/version (documented in the frontmatter-fields skill).
91
- */
92
- export const AGGREGATOR_OWNED = ["multiSource"];
93
- export const EMPTY_POLICY = { taxonomies: {}, propSchema: {}, required: [], unknown: "ignore", roots: [""] };
94
- /* ───────────────────────────── type checking ───────────────────────────── */
95
- // `2026`, `2026-08` and RFC-1123 are all valid to the consumers (sitemap lastmod, `new Date()`),
96
- // so the check is "a date this system can read", not one spelling of it
97
- const isDateString = (v) => /^\d{4}(-\d{2}(-\d{2}([T ].*)?)?)?$/.test(v.trim()) || !Number.isNaN(Date.parse(v));
98
- const isStringArray = (v) => Array.isArray(v) && v.every((x) => typeof x === "string");
99
- /** The type name to SHOW for a value the writer got wrong. */
100
- export const typeOf = (v) => {
101
- if (v === null)
102
- return "null";
103
- if (typeof v === "number" && !Number.isFinite(v))
104
- return Number.isNaN(v) ? "NaN" : "infinity";
105
- if (Array.isArray(v))
106
- return v.every((x) => typeof x === "string") ? "string[]" : "list";
107
- if (v instanceof Date)
108
- return "date";
109
- return typeof v;
110
- };
111
- export function matchesType(value, type) {
112
- switch (type) {
113
- case "string": return typeof value === "string";
114
- case "number": return typeof value === "number" && Number.isFinite(value);
115
- case "boolean": return typeof value === "boolean";
116
- // js-yaml turns an unquoted ISO date into a Date; a quoted one stays a string
117
- case "date": return value instanceof Date || (typeof value === "string" && isDateString(value));
118
- case "string[]": return isStringArray(value);
119
- case "string|string[]": return typeof value === "string" || isStringArray(value);
120
- case "object": return typeof value === "object" && value !== null && !Array.isArray(value) && !(value instanceof Date);
121
- case "boolean|object": return typeof value === "boolean" || (typeof value === "object" && value !== null && !Array.isArray(value));
122
- // the facet/profiling axes: the chunker stringifies scalars and splits a string on
123
- // whitespace/commas, so `rev: 2` and `product: a, b` are both real authoring
124
- case "scalar|scalar[]": {
125
- const scalar = (v) => v !== null && typeof v !== "object";
126
- return scalar(value) || (Array.isArray(value) && value.every(scalar));
127
- }
128
- }
129
- }
130
- /**
131
- * The near-miss values for a bad enum entry: a case-only difference first
132
- * (the overwhelmingly common typo), then a one-edit neighbour. A fix is
133
- * offered only when exactly one candidate comes back.
134
- */
135
- export function nearMisses(value, allowed) {
136
- const lower = value.toLowerCase().trim();
137
- const caseOnly = allowed.filter((a) => a.toLowerCase() === lower);
138
- if (caseOnly.length)
139
- return caseOnly;
140
- return allowed.filter((a) => editDistanceAtMost(a.toLowerCase(), lower, 2));
141
- }
142
- /**
143
- * Whether a near miss may be APPLIED with one click, as opposed to merely
144
- * listed. Only a case difference qualifies: at edit distance 2 the single
145
- * candidate for `unstable` is `stable`, and for `review` it is `preview` —
146
- * a one-click fix that inverts the writer's meaning is worse than no fix.
147
- */
148
- export const isSafeAutoFix = (value, candidate) => value.trim().toLowerCase() === candidate.toLowerCase();
149
- /** Bounded Levenshtein: true when `a` and `b` are within `max` edits. */
150
- function editDistanceAtMost(a, b, max) {
151
- if (Math.abs(a.length - b.length) > max)
152
- return false;
153
- let prev = Array.from({ length: b.length + 1 }, (_, i) => i);
154
- for (let i = 1; i <= a.length; i++) {
155
- const row = [i];
156
- let best = i;
157
- for (let j = 1; j <= b.length; j++) {
158
- const cost = a[i - 1] === b[j - 1] ? 0 : 1;
159
- const v = Math.min(prev[j] + 1, row[j - 1] + 1, prev[j - 1] + cost);
160
- row.push(v);
161
- best = Math.min(best, v);
162
- }
163
- if (best > max)
164
- return false;
165
- prev = row;
166
- }
167
- return prev[b.length] <= max;
168
- }
169
- /* ───────────────────────────── key positions ───────────────────────────── */
170
- /**
171
- * The 1-based line of a top-level key inside the frontmatter block, so a
172
- * finding can be revealed where the writer wrote it. Only the block is
173
- * scanned (the body may contain a line that looks like a key).
174
- */
175
- export function frontmatterKeyLines(source) {
176
- const out = new Map();
177
- const lines = source.split("\n");
178
- if (lines[0]?.trim() !== "---")
179
- return out;
180
- for (let i = 1; i < lines.length; i++) {
181
- const line = lines[i];
182
- // the closer is at COLUMN 0 (what splitFrontmatter matches) — an indented `---` inside a
183
- // block scalar is content, and breaking on it lost the line of every key after it
184
- if (/^(---|\.\.\.)[ \t]*\r?$/.test(line))
185
- break;
186
- const m = /^(?:"([^"]+)"|'([^']+)'|([A-Za-z_][\w.-]*))\s*:/.exec(line); // top level only: no leading space
187
- const key = m?.[1] ?? m?.[2] ?? m?.[3];
188
- if (key && !out.has(key))
189
- out.set(key, i + 1);
190
- }
191
- return out;
192
- }
193
- /* ─────────────────────────────── globs ─────────────────────────────────── */
194
- /**
195
- * `content/guides/**` / `*.md` / `content/*​/index.md`. Deliberately small:
196
- * `**` crosses directories, `*` does not, everything else is literal.
197
- */
198
- export function globMatches(glob, path) {
199
- const escaped = glob
200
- .split("**")
201
- .map((part) => part.split("*").map((lit) => lit.replace(/[.+^${}()|[\]\\?]/g, "\\$&")).join("[^/]*"))
202
- .join(".*");
203
- return new RegExp(`^${escaped}$`).test(path);
204
- }
205
- /**
206
- * The path a glob is matched against: relative to the content root the doc
207
- * lives under, so `guides/**` means what the writer means when their content
208
- * is `content/guides/…`. A doc outside every declared root is not content.
209
- */
210
- export function contentRelativePath(policy, path) {
211
- const roots = policy.roots.length ? policy.roots : [""];
212
- let best = null;
213
- for (const root of roots) {
214
- if (root === "") {
215
- if (best === null)
216
- best = path;
217
- continue;
218
- }
219
- const prefix = root.replace(/\/+$/, "") + "/";
220
- if (path.startsWith(prefix)) {
221
- const rel = path.slice(prefix.length);
222
- if (best === null || rel.length < best.length)
223
- best = rel;
224
- }
225
- }
226
- return best;
227
- }
228
- /** Fields required for a path by the declared globs (deduped, in declaration order). */
229
- export function requiredFieldsFor(policy, path) {
230
- const rel = contentRelativePath(policy, path);
231
- if (rel === null)
232
- return [];
233
- const out = [];
234
- for (const rule of policy.required) {
235
- if (!globMatches(rule.glob, rel))
236
- continue;
237
- for (const f of rule.fields)
238
- if (!out.includes(f))
239
- out.push(f);
240
- }
241
- return out;
242
- }
243
- //# sourceMappingURL=frontmatter-schema.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"frontmatter-schema.js","sourceRoot":"","sources":["../src/frontmatter-schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CA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