@heroiclands/package-build 22.4.3 → 22.4.5

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.
Files changed (48) hide show
  1. package/CHANGELOG.md +28 -18
  2. package/CONTENT.md +77 -1
  3. package/README.md +9 -0
  4. package/bin/content-build.mjs +143 -0
  5. package/bin/package-build.mjs +18 -4
  6. package/content-config.mjs +7 -0
  7. package/docs/api.md +84 -0
  8. package/docs/commands.md +182 -2
  9. package/docs/configuration.md +19 -1
  10. package/docs/content-format.md +105 -6
  11. package/docs/diagnostics.md +1 -0
  12. package/docs/project-setup.md +7 -6
  13. package/engine/changelog-group.mjs +27 -6
  14. package/engine/changelog-lint.mjs +27 -7
  15. package/engine/frontmatter-lint.mjs +11 -1
  16. package/engine/homepage.mjs +9 -1
  17. package/engine/index.mjs +18 -0
  18. package/engine/map-build.mjs +240 -0
  19. package/engine/map-dot.mjs +685 -0
  20. package/engine/map-graphviz.mjs +138 -0
  21. package/engine/map-layout.mjs +712 -0
  22. package/engine/map-places.mjs +561 -0
  23. package/engine/metadata-index.mjs +7 -0
  24. package/engine/note-vocabulary.mjs +28 -0
  25. package/engine/place-relations.mjs +637 -0
  26. package/engine/related-pages.mjs +161 -0
  27. package/engine/site-build.mjs +107 -9
  28. package/engine/site-config.mjs +1 -1
  29. package/engine/site-index.mjs +5 -1
  30. package/engine/site-root.mjs +147 -6
  31. package/engine/web-wikilinks.mjs +13 -2
  32. package/package.json +3 -2
  33. package/types/engine/changelog-lint.d.mts +9 -7
  34. package/types/engine/homepage.d.mts +8 -1
  35. package/types/engine/index.d.mts +6 -0
  36. package/types/engine/map-build.d.mts +78 -0
  37. package/types/engine/map-dot.d.mts +130 -0
  38. package/types/engine/map-graphviz.d.mts +61 -0
  39. package/types/engine/map-layout.d.mts +359 -0
  40. package/types/engine/map-places.d.mts +259 -0
  41. package/types/engine/note-vocabulary.d.mts +12 -0
  42. package/types/engine/place-relations.d.mts +95 -0
  43. package/types/engine/related-pages.d.mts +70 -0
  44. package/types/engine/site-build.d.mts +36 -3
  45. package/types/engine/site-config.d.mts +1 -1
  46. package/types/engine/site-index.d.mts +5 -1
  47. package/types/engine/site-root.d.mts +59 -7
  48. package/types/engine/web-wikilinks.d.mts +11 -2
@@ -0,0 +1,359 @@
1
+ /**
2
+ * The angle of a bearing in degrees, counter-clockwise from east, so north
3
+ * is up and east is right on a page whose `y` grows upward — GraphViz's
4
+ * coordinate system for a pinned position.
5
+ *
6
+ * @param {unknown} bearing - A bearing.
7
+ * @returns {number|undefined} `N` is 90, `E` 0, `S` -90, `W` 180; `undefined`
8
+ * for a value that is not a bearing.
9
+ */
10
+ export function bearingAngle(bearing: unknown): number | undefined;
11
+ /**
12
+ * The unit vector of a bearing.
13
+ *
14
+ * @param {unknown} bearing - A bearing.
15
+ * @returns {{x: number, y: number}|undefined} The vector, or `undefined` for a
16
+ * value that is not a bearing.
17
+ */
18
+ export function bearingVector(bearing: unknown): {
19
+ x: number;
20
+ y: number;
21
+ } | undefined;
22
+ /**
23
+ * How many steps around the compass separate two bearings, the shorter way:
24
+ * 0 for the same bearing, 1 for adjacent ones, 4 for opposites.
25
+ *
26
+ * @param {unknown} a - A bearing.
27
+ * @param {unknown} b - A bearing.
28
+ * @returns {number|undefined} The steps, or `undefined` when either is not a
29
+ * bearing.
30
+ */
31
+ export function bearingSteps(a: unknown, b: unknown): number | undefined;
32
+ /**
33
+ * The radius of the rim — where a place beyond the horizon, or one whose
34
+ * days nobody stated, is named. One log step beyond the horizon, so the rim
35
+ * reads as the next ring rather than a margin.
36
+ *
37
+ * @returns {number} Points.
38
+ */
39
+ export function rimRadius(): number;
40
+ /**
41
+ * The radius of the ring a days value sits on.
42
+ *
43
+ * Logarithmic in days, so equal ratios of days are equal steps of radius: a
44
+ * day to two days is the same step as five to ten. Any value beyond the
45
+ * horizon, and no value at all, is the rim.
46
+ *
47
+ * @param {number|undefined} days - A days value, on the scale or not.
48
+ * @returns {number} Points.
49
+ */
50
+ export function ringRadius(days: number | undefined): number;
51
+ /**
52
+ * The rings, inside out — one per marker up to the horizon.
53
+ *
54
+ * @returns {Array<{days: number, radius: number}>} Each marker and its radius.
55
+ */
56
+ export function rings(): Array<{
57
+ days: number;
58
+ radius: number;
59
+ }>;
60
+ /**
61
+ * The smallest marker of the scale that covers a total of days, or `undefined`
62
+ * beyond the scale's end or for no total at all.
63
+ *
64
+ * A two-hop journey adds two markers, and the sum is rarely a marker itself;
65
+ * the ring it belongs on is the first one no shorter than it — "about this,
66
+ * under normal conditions", rounded the pessimistic way.
67
+ *
68
+ * @param {number|undefined} total - Days, on the scale or not.
69
+ * @returns {number|undefined} The marker.
70
+ */
71
+ export function daysMarker(total: number | undefined): number | undefined;
72
+ /**
73
+ * The length a route's edge asks of `neato` in the whole route graph, in
74
+ * inches — the same log scale as the rings, so the god's-eye view and the
75
+ * itinerary agree about what a day and a month look like.
76
+ *
77
+ * @param {number|undefined} days - The route's days, or none for a border.
78
+ * @returns {number} Inches.
79
+ */
80
+ export function edgeLength(days: number | undefined): number;
81
+ /**
82
+ * One hop of a journey: a bearing and, for a route, its days.
83
+ *
84
+ * @typedef {object} Hop
85
+ * @property {string} bearing - Where the far end lies from the near end.
86
+ * @property {number} [days] - The route's marker; absent for a border.
87
+ */
88
+ /**
89
+ * Two hops composed into one bearing and one total, or nothing where they
90
+ * disagree.
91
+ *
92
+ * Two hops agree when their bearings are the same or adjacent; then the
93
+ * composed direction is that of the two hops added as vectors weighted by
94
+ * their days, and the total is their sum. A hop with no days — a border —
95
+ * makes the total unknown, because a frontier states no distance, and then
96
+ * the two hops weigh the same, because nothing says which is the longer.
97
+ * Hops two or more steps apart do not compose:
98
+ * a place east and then north of here is not in any one direction, and the
99
+ * map omits it rather than guess.
100
+ *
101
+ * @param {Hop} first - The hop from the centre.
102
+ * @param {Hop} second - The hop onward.
103
+ * @returns {{angle: number, days: number|undefined}|undefined} The composed
104
+ * bearing in degrees and the total days, or `undefined` where the hops
105
+ * disagree or either bearing is not one.
106
+ */
107
+ export function composeHops(first: Hop, second: Hop): {
108
+ angle: number;
109
+ days: number | undefined;
110
+ } | undefined;
111
+ /**
112
+ * Every relation touching one place, read from both ends.
113
+ *
114
+ * A border or a route is one fact stated from each end, and a note that
115
+ * states one side of it does not make the fact untrue — so the map reads what
116
+ * the place states *and* what every other place states about it, inverting
117
+ * the bearing on the way back. The place's own statement wins where both
118
+ * exist, and a target no place declares is returned separately so the caller
119
+ * can name it. The lint is where a missing reciprocal is reported; here it is
120
+ * simply drawn.
121
+ *
122
+ * @param {Map<string, MapPlace>} places - Every place, by shortcode.
123
+ * @param {string} shortcode - The place asked about.
124
+ * @returns {{relations: Relation[], unresolved: Array<{from: string, to: string}>}}
125
+ * The relations, own statements first, and the targets that resolved to
126
+ * nothing.
127
+ */
128
+ export function relationsOf(places: Map<string, MapPlace>, shortcode: string): {
129
+ relations: Relation[];
130
+ unresolved: Array<{
131
+ from: string;
132
+ to: string;
133
+ }>;
134
+ };
135
+ /**
136
+ * Lay out the map from a place.
137
+ *
138
+ * The centre at the origin. Every neighbour it states, or that states it, at
139
+ * the angle of its bearing and on the ring of its days — the innermost ring
140
+ * for a border with no route, the shortest route where several modes reach
141
+ * one neighbour. Beyond each neighbour, every place a second hop reaches, at
142
+ * the composed bearing where the two hops agree and on the ring of their
143
+ * total; on the rim, marked unknown, where either hop states no days; omitted
144
+ * where the hops disagree. A place reachable by several second hops takes
145
+ * the one with known days, then the shortest. Nodes sharing a ring and a
146
+ * bearing are fanned apart.
147
+ *
148
+ * @param {Map<string, MapPlace>} places - Every place, by shortcode.
149
+ * @param {string} centre - The place the map is from.
150
+ * @returns {{centre: string, nodes: FromNode[], edges: FromEdge[],
151
+ * rings: Array<{days: number, radius: number}>, rim: number,
152
+ * unresolved: Array<{from: string, to: string}>}} The layout, in points.
153
+ * @throws {Error} When `centre` is not a place.
154
+ */
155
+ export function layoutFrom(places: Map<string, MapPlace>, centre: string): {
156
+ centre: string;
157
+ nodes: FromNode[];
158
+ edges: FromEdge[];
159
+ rings: Array<{
160
+ days: number;
161
+ radius: number;
162
+ }>;
163
+ rim: number;
164
+ unresolved: Array<{
165
+ from: string;
166
+ to: string;
167
+ }>;
168
+ };
169
+ /**
170
+ * One edge of the whole route graph.
171
+ *
172
+ * @typedef {object} TravelEdge
173
+ * @property {string} from
174
+ * @property {string} to
175
+ * @property {"border"|"route"} kind
176
+ * @property {string} bearing - Where `to` lies from `from`.
177
+ * @property {number} [days]
178
+ * @property {string} [mode]
179
+ * @property {number} len - The length asked of `neato`, in inches.
180
+ */
181
+ /**
182
+ * The whole route graph: one edge per pair of places, however many ends and
183
+ * modes state it, with a length from its days.
184
+ *
185
+ * A pair reached by several modes takes the shortest; a pair that both
186
+ * borders and travels takes the route, since the days are what the length
187
+ * is from. The end that states the relation is `from`, so a one-sided entry
188
+ * is drawn from the note that carries it.
189
+ *
190
+ * @param {Map<string, MapPlace>} places - Every place, by shortcode.
191
+ * @returns {{edges: TravelEdge[], unresolved: Array<{from: string, to: string}>}}
192
+ * The edges, in a stable order.
193
+ */
194
+ export function travelGraph(places: Map<string, MapPlace>): {
195
+ edges: TravelEdge[];
196
+ unresolved: Array<{
197
+ from: string;
198
+ to: string;
199
+ }>;
200
+ };
201
+ /**
202
+ * The horizon of the map from a place, in days. A place farther than this
203
+ * is a name at the rim rather than a node on a ring.
204
+ *
205
+ * @type {number}
206
+ */
207
+ export const HORIZON_DAYS: number;
208
+ /**
209
+ * The days markers that are rings — every marker of the scale up to the
210
+ * horizon.
211
+ *
212
+ * @type {readonly number[]}
213
+ */
214
+ export const RING_DAYS: readonly number[];
215
+ /**
216
+ * One hop of a journey: a bearing and, for a route, its days.
217
+ */
218
+ export type Hop = {
219
+ /**
220
+ * - Where the far end lies from the near end.
221
+ */
222
+ bearing: string;
223
+ /**
224
+ * - The route's marker; absent for a border.
225
+ */
226
+ days?: number | undefined;
227
+ };
228
+ /**
229
+ * A place as the map reads it. The shape {@link module :engine/map-places}
230
+ * builds from the content index; only the relation fields matter here.
231
+ */
232
+ export type MapPlace = {
233
+ shortcode: string;
234
+ name: string;
235
+ subType?: string | undefined;
236
+ parents: string[];
237
+ borders: Array<{
238
+ to: string;
239
+ bearing: string;
240
+ }>;
241
+ routes: Array<{
242
+ to: string;
243
+ bearing: string;
244
+ mode?: string;
245
+ days?: number;
246
+ }>;
247
+ url?: string | undefined;
248
+ address?: string | undefined;
249
+ };
250
+ /**
251
+ * A relation between two places, read from whichever end states it.
252
+ */
253
+ export type Relation = {
254
+ from: string;
255
+ to: string;
256
+ /**
257
+ * - Where `to` lies from `from`.
258
+ */
259
+ bearing: string;
260
+ kind: "border" | "route";
261
+ days?: number | undefined;
262
+ mode?: string | undefined;
263
+ /**
264
+ * - Whether `from` states it, as opposed to `to`.
265
+ */
266
+ stated: boolean;
267
+ };
268
+ /**
269
+ * One edge of the whole route graph.
270
+ */
271
+ export type TravelEdge = {
272
+ from: string;
273
+ to: string;
274
+ kind: "border" | "route";
275
+ /**
276
+ * - Where `to` lies from `from`.
277
+ */
278
+ bearing: string;
279
+ days?: number | undefined;
280
+ mode?: string | undefined;
281
+ /**
282
+ * - The length asked of `neato`, in inches.
283
+ */
284
+ len: number;
285
+ };
286
+ /**
287
+ * One place on the map from a place.
288
+ */
289
+ export type FromNode = {
290
+ shortcode: string;
291
+ /**
292
+ * - 0 for the centre, 1 for a neighbour, 2 beyond.
293
+ */
294
+ hop: number;
295
+ /**
296
+ * - Points, east positive.
297
+ */
298
+ x: number;
299
+ /**
300
+ * - Points, north positive.
301
+ */
302
+ y: number;
303
+ /**
304
+ * - Degrees, counter-clockwise from east.
305
+ */
306
+ angle: number;
307
+ /**
308
+ * - Points from the centre.
309
+ */
310
+ radius: number;
311
+ /**
312
+ * - The days the ring was chosen by, or none.
313
+ */
314
+ days?: number | undefined;
315
+ /**
316
+ * - Reached by a border alone.
317
+ */
318
+ border: boolean;
319
+ /**
320
+ * - On the rim because nobody stated its days.
321
+ */
322
+ unknown: boolean;
323
+ /**
324
+ * - The neighbour a second hop is reached through.
325
+ */
326
+ via?: string | undefined;
327
+ };
328
+ /**
329
+ * One edge on the map from a place.
330
+ */
331
+ export type FromEdge = {
332
+ from: string;
333
+ to: string;
334
+ /**
335
+ * - A route where any route reaches `to`.
336
+ */
337
+ kind: "border" | "route";
338
+ bearing: string;
339
+ /**
340
+ * - The shortest route's.
341
+ */
342
+ days?: number | undefined;
343
+ /**
344
+ * - The shortest route's.
345
+ */
346
+ mode?: string | undefined;
347
+ /**
348
+ * - Every
349
+ * route that reaches `to`, for the label.
350
+ */
351
+ routes: Array<{
352
+ mode: string;
353
+ days: number | undefined;
354
+ }>;
355
+ /**
356
+ * - 1 from the centre, 2 onward.
357
+ */
358
+ hop: number;
359
+ };
@@ -0,0 +1,259 @@
1
+ /**
2
+ * Read this package's places and polities out of its index records.
3
+ *
4
+ * @param {Array<Record<string, any>>} records - Index records, as
5
+ * {@link module:engine/content-index.indexRecordsFor} returns them.
6
+ * @param {object} opts
7
+ * @param {string} opts.contentBase - The content root the records were read from.
8
+ * @param {string} [opts.base] - The site base the package's pages are served
9
+ * under, ending in a slash. Absent, no place carries a URL.
10
+ * @returns {MapWorld} The world, with no dependency's places.
11
+ */
12
+ export function placesFromRecords(records: Array<Record<string, any>>, { contentBase, base }: {
13
+ contentBase: string;
14
+ base?: string | undefined;
15
+ }): MapWorld;
16
+ /**
17
+ * Load the world a map is drawn from: this package's index, and the indexes
18
+ * of every dependency it declares.
19
+ *
20
+ * @param {object} opts
21
+ * @param {object} opts.config - The resolved configuration.
22
+ * @param {string} [opts.contentBase] - The content root, defaulting to the
23
+ * configured one.
24
+ * @param {string} [opts.base] - The site base this package's pages are served
25
+ * under. Absent, no local place carries a URL; a dependency's places carry
26
+ * the URL their index resolved to regardless.
27
+ * @param {object[]} [opts.problems] - Collects the notes the index cannot
28
+ * record, as diagnostics, instead of throwing on the first.
29
+ * @returns {MapWorld} The world.
30
+ */
31
+ export function loadMapWorld({ config, contentBase, base, problems }: {
32
+ config: object;
33
+ contentBase?: string | undefined;
34
+ base?: string | undefined;
35
+ problems?: object[] | undefined;
36
+ }): MapWorld;
37
+ /**
38
+ * Analyse the containment tree.
39
+ *
40
+ * @param {Map<string, MapPlace>} places - Every place.
41
+ * @param {MapPolity[]} [polities] - Every polity.
42
+ * @returns {Containment} The analysis.
43
+ */
44
+ export function analyzeContainment(places: Map<string, MapPlace>, polities?: MapPolity[]): Containment;
45
+ /**
46
+ * Every place beneath one, by following `parents` downward — the place
47
+ * itself included.
48
+ *
49
+ * @param {Containment} analysis - The analysis, for its children map.
50
+ * @param {string} root - The place at the top.
51
+ * @returns {Set<string>} The subtree.
52
+ */
53
+ export function subtreeOf(analysis: Containment, root: string): Set<string>;
54
+ /**
55
+ * The anomalies as findings, in the toolchain's form.
56
+ *
57
+ * A finding about a `parents` entry is located at that entry in the note; a
58
+ * finding about the note as a whole at its `data` block, or the file alone;
59
+ * a finding about a fetched place at the cached index that supplied it. A
60
+ * place with no parent, a parent no place declares, and a cycle are errors —
61
+ * the tree cannot reach the place, or cannot be a tree. Two parents, a region
62
+ * with no `packFolder` and a polity beside no region are legal and worth a
63
+ * look, so they are warnings.
64
+ *
65
+ * @param {Containment} analysis - The analysis.
66
+ * @param {Map<string, MapPlace>} places - Every place.
67
+ * @param {object} opts
68
+ * @param {string} opts.contentBase - The content root the local notes sit under.
69
+ * @param {object} [opts.config] - The configuration, for naming a cached index.
70
+ * @returns {Array<{file: string, line?: number, column?: number,
71
+ * severity: "error"|"warning", message: string}>} The findings.
72
+ */
73
+ export function containmentFindings(analysis: Containment, places: Map<string, MapPlace>, { contentBase, config }: {
74
+ contentBase: string;
75
+ config?: object | undefined;
76
+ }): Array<{
77
+ file: string;
78
+ line?: number;
79
+ column?: number;
80
+ severity: "error" | "warning";
81
+ message: string;
82
+ }>;
83
+ /**
84
+ * A place as the map reads it, from either source.
85
+ */
86
+ export type MapPlace = {
87
+ /**
88
+ * - Lower case.
89
+ */
90
+ shortcode: string;
91
+ /**
92
+ * - `name.full`, or the shortcode where a note has none.
93
+ */
94
+ name: string;
95
+ /**
96
+ * - `place`.
97
+ */
98
+ type: string;
99
+ subType?: string | undefined;
100
+ /**
101
+ * - Shortcodes, lower case, empty where none.
102
+ */
103
+ parents: string[];
104
+ borders: Array<{
105
+ to: string;
106
+ bearing: string;
107
+ }>;
108
+ routes: Array<{
109
+ to: string;
110
+ bearing: string;
111
+ mode?: string;
112
+ days?: number;
113
+ }>;
114
+ /**
115
+ * - The canonical address.
116
+ */
117
+ address?: string | undefined;
118
+ /**
119
+ * - The page, where a site base is known.
120
+ */
121
+ url?: string | undefined;
122
+ /**
123
+ * - The note's path below the content root; local only.
124
+ */
125
+ file?: string | undefined;
126
+ /**
127
+ * - The note's directory below the content root; local only.
128
+ */
129
+ folder?: string | undefined;
130
+ /**
131
+ * - The package that publishes it.
132
+ */
133
+ package: string;
134
+ /**
135
+ * - Whether it is this package's own.
136
+ */
137
+ local: boolean;
138
+ /**
139
+ * - Whether the note declares
140
+ * `packFolder`; unknown for a fetched entry.
141
+ */
142
+ hasPackFolder: boolean | undefined;
143
+ };
144
+ /**
145
+ * A polity — an `affiliation` note of `subType: polity` — drawn beside the
146
+ * region notes that share its directory.
147
+ */
148
+ export type MapPolity = {
149
+ shortcode: string;
150
+ name: string;
151
+ address?: string | undefined;
152
+ url?: string | undefined;
153
+ file: string;
154
+ folder: string;
155
+ };
156
+ /**
157
+ * The world a map is drawn from: every place, every polity, and where the
158
+ * notes are for locating a finding.
159
+ */
160
+ export type MapWorld = {
161
+ /**
162
+ * - By shortcode, lower case.
163
+ */
164
+ places: Map<string, MapPlace>;
165
+ /**
166
+ * - In path order.
167
+ */
168
+ polities: MapPolity[];
169
+ /**
170
+ * - The content root the local notes sit under.
171
+ */
172
+ contentBase: string;
173
+ /**
174
+ * - The resolved configuration, where one was used.
175
+ */
176
+ config?: object | undefined;
177
+ /**
178
+ * - Dependency
179
+ * indexes that could not be read.
180
+ */
181
+ stale: Array<{
182
+ package: string;
183
+ reason: string;
184
+ }>;
185
+ };
186
+ /**
187
+ * What `parents` says about the world's shape.
188
+ */
189
+ export type Containment = {
190
+ /**
191
+ * - The one `subType: world` place.
192
+ */
193
+ world: string | undefined;
194
+ /**
195
+ * - Regions parented directly on the world,
196
+ * in name order.
197
+ */
198
+ continents: string[];
199
+ /**
200
+ * - Each place's continent, for
201
+ * the places that reach one by walking `parents` upward.
202
+ */
203
+ continentOf: Map<string, string>;
204
+ /**
205
+ * - Each place's children.
206
+ */
207
+ children: Map<string, string[]>;
208
+ /**
209
+ * - Each cycle as a chain that returns to its
210
+ * first place.
211
+ */
212
+ cycles: string[][];
213
+ /**
214
+ * - Every place on any cycle.
215
+ */
216
+ cycleNodes: Set<string>;
217
+ /**
218
+ * - The local region places
219
+ * in each directory, for placing polities.
220
+ */
221
+ regionsByFolder: Map<string, string[]>;
222
+ /**
223
+ * - The polities analysed.
224
+ */
225
+ polities: MapPolity[];
226
+ anomalies: Anomalies;
227
+ };
228
+ /**
229
+ * Everything the containment tree can get wrong.
230
+ */
231
+ export type Anomalies = {
232
+ /**
233
+ * - Places with no parent, the world excluded.
234
+ */
235
+ noParent: string[];
236
+ /**
237
+ * -
238
+ * `parents` entries no place declares.
239
+ */
240
+ unresolved: Array<{
241
+ place: string;
242
+ parent: string;
243
+ index: number;
244
+ }>;
245
+ cycles: string[][];
246
+ /**
247
+ * - Places with more than one parent.
248
+ */
249
+ multiParent: string[];
250
+ /**
251
+ * - Polity shortcodes whose directory
252
+ * holds no region note.
253
+ */
254
+ polityNoRegion: string[];
255
+ /**
256
+ * - Local regions with no `packFolder`.
257
+ */
258
+ regionNoPackFolder: string[];
259
+ };
@@ -305,6 +305,18 @@ export type DataFieldSpec = {
305
305
  * is a finding of its own: it addresses a hierarchy nothing will ever read.
306
306
  */
307
307
  keys?: "pack" | undefined;
308
+ /**
309
+ * - A
310
+ * check of the value beyond its shape, run by the frontmatter lint with the
311
+ * link index once the container has been checked. The lint stays
312
+ * vocabulary-agnostic this way: the rule lives beside the field that needs
313
+ * it, and the linter calls whatever it is handed. A place's `borders` and
314
+ * `routes` carry one, because what they state is checked against the note
315
+ * at the other end.
316
+ */
317
+ check?: ((note: object, opts: {
318
+ index?: object;
319
+ }) => object[]) | undefined;
308
320
  /**
309
321
  * - One line, for the author-facing reference.
310
322
  */