@agentshouse/mdmodel 0.1.0-c0bdbbc92d020 → 0.1.0-c1b026eddaa7c
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/API.md +299 -211
- package/README.md +21 -22
- package/dist/blocks.d.ts.map +1 -1
- package/dist/blocks.js +53 -28
- package/dist/definition.d.ts +25 -1
- package/dist/definition.d.ts.map +1 -1
- package/dist/definition.js +378 -49
- package/dist/divide.d.ts.map +1 -1
- package/dist/divide.js +27 -17
- package/dist/document.d.ts +10 -10
- package/dist/document.d.ts.map +1 -1
- package/dist/document.js +366 -174
- package/dist/event.d.ts +78 -0
- package/dist/event.d.ts.map +1 -0
- package/dist/event.js +201 -0
- package/dist/facts.d.ts +15 -0
- package/dist/facts.d.ts.map +1 -0
- package/dist/facts.js +38 -0
- package/dist/fields.d.ts +2 -0
- package/dist/fields.d.ts.map +1 -1
- package/dist/fields.js +7 -0
- package/dist/index.d.ts +28 -9
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +16 -6
- package/dist/kinds.d.ts +19 -0
- package/dist/kinds.d.ts.map +1 -0
- package/dist/kinds.js +161 -0
- package/dist/links.d.ts +3 -0
- package/dist/links.d.ts.map +1 -1
- package/dist/links.js +113 -66
- package/dist/paths.d.ts +10 -1
- package/dist/paths.d.ts.map +1 -1
- package/dist/paths.js +118 -12
- package/dist/pattern.d.ts +10 -0
- package/dist/pattern.d.ts.map +1 -0
- package/dist/pattern.js +356 -0
- package/dist/project.d.ts +1 -0
- package/dist/project.d.ts.map +1 -1
- package/dist/project.js +36 -15
- package/dist/query/language.d.ts +254 -0
- package/dist/query/language.d.ts.map +1 -0
- package/dist/query/language.js +620 -0
- package/dist/query/match.d.ts +14 -0
- package/dist/query/match.d.ts.map +1 -0
- package/dist/query/match.js +150 -0
- package/dist/query/rows.d.ts +32 -0
- package/dist/query/rows.d.ts.map +1 -0
- package/dist/query/rows.js +161 -0
- package/dist/query/sql.d.ts +39 -0
- package/dist/query/sql.d.ts.map +1 -0
- package/dist/query/sql.js +285 -0
- package/dist/references.d.ts +2 -2
- package/dist/references.d.ts.map +1 -1
- package/dist/references.js +6 -1
- package/dist/reserved.d.ts +5 -0
- package/dist/reserved.d.ts.map +1 -0
- package/dist/reserved.js +20 -0
- package/dist/schema.d.ts +1 -0
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +57 -6
- package/dist/types.d.ts +68 -2
- package/dist/types.d.ts.map +1 -1
- package/dist/validate.d.ts +32 -2
- package/dist/validate.d.ts.map +1 -1
- package/dist/validate.js +438 -126
- package/dist/yaml.d.ts +7 -3
- package/dist/yaml.d.ts.map +1 -1
- package/dist/yaml.js +110 -55
- package/fixtures/README.md +27 -7
- package/fixtures/cases/conditional-section/context.json +1 -0
- package/fixtures/cases/conditional-section/expected.json +6 -0
- package/fixtures/cases/conditional-section/library/questions/hosting.md +9 -0
- package/fixtures/cases/conditional-section/library/questions/payments.md +12 -0
- package/fixtures/cases/conditional-section/schema.yaml +14 -0
- package/fixtures/cases/cross-room-link/context.json +1 -0
- package/fixtures/cases/cross-room-link/expected.json +1 -0
- package/fixtures/cases/cross-room-link/library/clients/acme.md +6 -0
- package/fixtures/cases/cross-room-link/schema.yaml +3 -0
- package/fixtures/cases/cross-room-reference/context.json +1 -0
- package/fixtures/cases/cross-room-reference/expected.json +1 -0
- package/fixtures/cases/cross-room-reference/library/clients/acme.md +9 -0
- package/fixtures/cases/cross-room-reference/schema.yaml +9 -0
- package/fixtures/cases/link-into-a-reserved-name/context.json +1 -0
- package/fixtures/cases/link-into-a-reserved-name/expected.json +5 -0
- package/fixtures/cases/link-into-a-reserved-name/library/notes/a.md +6 -0
- package/fixtures/cases/link-into-a-reserved-name/schema.yaml +3 -0
- package/fixtures/cases/link-into-a-reserved-name-from-an-untyped-document/context.json +1 -0
- package/fixtures/cases/link-into-a-reserved-name-from-an-untyped-document/expected.json +5 -0
- package/fixtures/cases/link-into-a-reserved-name-from-an-untyped-document/library/notes/b.md +5 -0
- package/fixtures/cases/member-on-an-untyped-document/context.json +1 -0
- package/fixtures/cases/member-on-an-untyped-document/expected.json +6 -0
- package/fixtures/cases/member-on-an-untyped-document/library/note.md +4 -0
- package/fixtures/cases/member-on-another-type/context.json +1 -0
- package/fixtures/cases/member-on-another-type/expected.json +6 -0
- package/fixtures/cases/member-on-another-type/library/note.md +4 -0
- package/fixtures/cases/member-on-another-type/schema.yaml +7 -0
- package/fixtures/cases/reference-into-a-reserved-name/context.json +1 -0
- package/fixtures/cases/reference-into-a-reserved-name/expected.json +6 -0
- package/fixtures/cases/reference-into-a-reserved-name/library/notes/a.md +4 -0
- package/fixtures/cases/reference-into-a-reserved-name/library/settings/brief.md +1 -0
- package/fixtures/cases/reference-into-a-reserved-name/schema.yaml +3 -0
- package/fixtures/cases/room-md-declares-a-type/context.json +1 -0
- package/fixtures/cases/room-md-declares-a-type/expected.json +6 -0
- package/fixtures/cases/room-md-declares-a-type/library/ROOM.md +5 -0
- package/fixtures/cases/typed-path-names-another-type/context.json +11 -0
- package/fixtures/cases/typed-path-names-another-type/expected.json +6 -0
- package/fixtures/cases/typed-path-names-another-type/library/settings/prefs/one.md +3 -0
- package/fixtures/cases/typed-path-names-another-type/schema.yaml +6 -0
- package/fixtures/cases/typed-path-names-its-type/context.json +11 -0
- package/fixtures/cases/typed-path-names-its-type/expected.json +3 -0
- package/fixtures/cases/typed-path-names-its-type/library/settings/prefs/deeper/two.md +1 -0
- package/fixtures/cases/typed-path-names-its-type/library/settings/prefs/one.md +4 -0
- package/fixtures/cases/typed-path-names-its-type/schema.yaml +6 -0
- package/fixtures/cases/typed-path-names-no-type/context.json +11 -0
- package/fixtures/cases/typed-path-names-no-type/expected.json +6 -0
- package/fixtures/cases/typed-path-names-no-type/library/settings/prefs/one.md +1 -0
- package/fixtures/cases/typed-path-names-no-type/schema.yaml +6 -0
- package/fixtures/cases/unnamed-typed-path-checks-its-fields/context.json +11 -0
- package/fixtures/cases/unnamed-typed-path-checks-its-fields/expected.json +6 -0
- package/fixtures/cases/unnamed-typed-path-checks-its-fields/library/rooms/team/tasks/plan.md +4 -0
- package/fixtures/cases/unnamed-typed-path-checks-its-fields/schema.yaml +5 -0
- package/fixtures/cases/unnamed-typed-path-names-a-type/context.json +11 -0
- package/fixtures/cases/unnamed-typed-path-names-a-type/expected.json +6 -0
- package/fixtures/cases/unnamed-typed-path-names-a-type/library/rooms/team/tasks/plan.md +6 -0
- package/fixtures/cases/unnamed-typed-path-names-a-type/schema.yaml +5 -0
- package/fixtures/cases/unnamed-typed-path-reads-its-type/context.json +11 -0
- package/fixtures/cases/unnamed-typed-path-reads-its-type/expected.json +3 -0
- package/fixtures/cases/unnamed-typed-path-reads-its-type/library/rooms/team/plan.md +1 -0
- package/fixtures/cases/unnamed-typed-path-reads-its-type/library/rooms/team/tasks/plan.md +5 -0
- package/fixtures/cases/unnamed-typed-path-reads-its-type/schema.yaml +5 -0
- package/fixtures/cases/unnamed-typed-path-without-a-body/context.json +11 -0
- package/fixtures/cases/unnamed-typed-path-without-a-body/expected.json +5 -0
- package/fixtures/cases/unnamed-typed-path-without-a-body/library/rooms/team/tasks/plan.md +5 -0
- package/fixtures/cases/unnamed-typed-path-without-a-body/schema.yaml +5 -0
- package/fixtures/division.json +26 -26
- package/fixtures/queries.json +964 -0
- package/package.json +10 -3
- package/dist/condition.d.ts +0 -137
- package/dist/condition.d.ts.map +0 -1
- package/dist/condition.js +0 -394
package/dist/validate.js
CHANGED
|
@@ -1,15 +1,62 @@
|
|
|
1
|
-
import { ATTACHMENT, BUILT_IN_TYPE, readSchema } from './definition.js';
|
|
2
|
-
import { parse } from './document.js';
|
|
1
|
+
import { ATTACHMENT, BUILT_IN_TYPE, readSchema, } from './definition.js';
|
|
2
|
+
import { links, parse } from './document.js';
|
|
3
|
+
import { MEMBER_FIELD } from './fields.js';
|
|
3
4
|
import { hrefOccurrences, linkInventory } from './links.js';
|
|
4
|
-
import { classifyHref } from './paths.js';
|
|
5
|
+
import { classifyHref, roomTarget } from './paths.js';
|
|
5
6
|
import { references } from './references.js';
|
|
7
|
+
import { isDocumentPath, ROOM_DESCRIPTION } from './reserved.js';
|
|
6
8
|
import { refusal } from './refuse.js';
|
|
7
|
-
import { fitsItem, frontmatterRefusal } from './schema.js';
|
|
9
|
+
import { conditionedSections, fitsItem, frontmatterRefusal } from './schema.js';
|
|
10
|
+
import { openPatternBudget, PatternTooCostly } from './pattern.js';
|
|
8
11
|
import { headingSpans, listItems } from './sections.js';
|
|
9
12
|
import { bodyAfterFrontmatter, bodyStartOf } from './yaml.js';
|
|
10
13
|
function refuse(file, rule, extra) {
|
|
11
14
|
return { verdict: 'refuse', ...refusal(file, rule, extra) };
|
|
12
15
|
}
|
|
16
|
+
function unmarkedMember(file, document, definition) {
|
|
17
|
+
return Object.hasOwn(document.fields, MEMBER_FIELD) && definition?.memberDocument !== true
|
|
18
|
+
? refuse(file, 'undeclared-field', { location: `/${MEMBER_FIELD}` })
|
|
19
|
+
: null;
|
|
20
|
+
}
|
|
21
|
+
function reservedLink(file, document, changed) {
|
|
22
|
+
return (document.type !== undefined &&
|
|
23
|
+
isDocumentPath(file) &&
|
|
24
|
+
links(document, file).some((link) => !isDocumentPath(link.target) && (changed?.has(link.target) ?? true)));
|
|
25
|
+
}
|
|
26
|
+
function describedRoom(file, document) {
|
|
27
|
+
return file === ROOM_DESCRIPTION && document.type !== undefined
|
|
28
|
+
? refuse(file, 'room-md-type', { location: '/type' })
|
|
29
|
+
: null;
|
|
30
|
+
}
|
|
31
|
+
function nameFits(pattern, name) {
|
|
32
|
+
const at = pattern.indexOf('*');
|
|
33
|
+
if (at === -1)
|
|
34
|
+
return pattern === name;
|
|
35
|
+
const head = pattern.slice(0, at);
|
|
36
|
+
const tail = pattern.slice(at + 1);
|
|
37
|
+
return name.length > head.length + tail.length && name.startsWith(head) && name.endsWith(tail);
|
|
38
|
+
}
|
|
39
|
+
function typedPathOf(file, typedPaths = []) {
|
|
40
|
+
const names = file.split('/');
|
|
41
|
+
return typedPaths.find(({ path }) => {
|
|
42
|
+
const patterns = path.split('/');
|
|
43
|
+
return (patterns.length === names.length &&
|
|
44
|
+
patterns.every((pattern, at) => nameFits(pattern, names[at])));
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
const HELD_TEXT = /\S/u;
|
|
48
|
+
function typedPathRefusal(file, content, document, typedPath) {
|
|
49
|
+
if (typedPath === undefined)
|
|
50
|
+
return null;
|
|
51
|
+
if (document.type !== (typedPath.named ? typedPath.type : undefined))
|
|
52
|
+
return refuse(file, 'unknown-type', { location: '/type' });
|
|
53
|
+
return typedPath.body && !HELD_TEXT.test(bodyAfterFrontmatter(content))
|
|
54
|
+
? refuse(file, 'required-body')
|
|
55
|
+
: null;
|
|
56
|
+
}
|
|
57
|
+
function kindOf(document, typedPath) {
|
|
58
|
+
return typedPath !== undefined && !typedPath.named ? typedPath.type : instanceType(document);
|
|
59
|
+
}
|
|
13
60
|
function instanceType(document) {
|
|
14
61
|
const raw = document.fields.type;
|
|
15
62
|
if (raw === undefined || raw === null)
|
|
@@ -18,33 +65,76 @@ function instanceType(document) {
|
|
|
18
65
|
return null;
|
|
19
66
|
return raw;
|
|
20
67
|
}
|
|
21
|
-
function reaches(
|
|
22
|
-
|
|
23
|
-
if (resolved.kind !== 'path')
|
|
68
|
+
function reaches(reference, typeOf, binary) {
|
|
69
|
+
if (reference.target === null)
|
|
24
70
|
return false;
|
|
25
|
-
if (to.includes(ATTACHMENT))
|
|
71
|
+
if (reference.to.includes(ATTACHMENT))
|
|
26
72
|
return true;
|
|
27
|
-
if (
|
|
73
|
+
if (binary(reference.target))
|
|
74
|
+
return false;
|
|
75
|
+
const held = typeOf(reference.target);
|
|
76
|
+
return held === undefined || reference.to.includes(held);
|
|
77
|
+
}
|
|
78
|
+
function missing(reference, typeOf, binary) {
|
|
79
|
+
if (reference.to.includes(ATTACHMENT) || reference.target === null)
|
|
28
80
|
return false;
|
|
29
|
-
|
|
30
|
-
return held === undefined || (held.ok && to.includes(held.document.type ?? BUILT_IN_TYPE));
|
|
81
|
+
return typeOf(reference.target) === undefined && !binary(reference.target);
|
|
31
82
|
}
|
|
32
|
-
function
|
|
33
|
-
|
|
34
|
-
|
|
83
|
+
export function resolves(reference, typeOf, binary) {
|
|
84
|
+
return reaches(reference, typeOf, binary) && !missing(reference, typeOf, binary);
|
|
85
|
+
}
|
|
86
|
+
function usesIn(content) {
|
|
87
|
+
let held;
|
|
88
|
+
return () => {
|
|
89
|
+
if (held !== undefined)
|
|
90
|
+
return held;
|
|
91
|
+
const bodyStart = bodyStartOf(content);
|
|
92
|
+
held = linkInventory(content.slice(bodyStart)).uses.map((use) => ({
|
|
93
|
+
...use,
|
|
94
|
+
start: bodyStart + use.start,
|
|
95
|
+
end: bodyStart + use.end,
|
|
96
|
+
}));
|
|
97
|
+
return held;
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
function itemHrefs(content, items, uses) {
|
|
35
101
|
const hrefs = [];
|
|
36
102
|
for (const item of items) {
|
|
37
|
-
const link = uses.find((use) =>
|
|
38
|
-
bodyStart + use.end === item.end &&
|
|
39
|
-
content[item.start] === '[');
|
|
103
|
+
const link = uses().find((use) => use.start === item.start && use.end === item.end && content[item.start] === '[');
|
|
40
104
|
if (link === undefined)
|
|
41
105
|
return null;
|
|
42
106
|
hrefs.push(link.destination.href);
|
|
43
107
|
}
|
|
44
108
|
return hrefs;
|
|
45
109
|
}
|
|
46
|
-
|
|
47
|
-
const
|
|
110
|
+
function listReads(content, definition, spans = headingSpans(content, bodyStartOf(content))) {
|
|
111
|
+
const uses = usesIn(content);
|
|
112
|
+
const reads = [];
|
|
113
|
+
for (const span of spans) {
|
|
114
|
+
const spec = Object.hasOwn(definition.sections, span.name)
|
|
115
|
+
? definition.sections[span.name]
|
|
116
|
+
: undefined;
|
|
117
|
+
if (spec?.kind !== 'list')
|
|
118
|
+
continue;
|
|
119
|
+
const listed = listItems(content, span.bodyStart, span.bodyEnd);
|
|
120
|
+
reads.push({
|
|
121
|
+
section: span.name,
|
|
122
|
+
items: spec.items,
|
|
123
|
+
listed,
|
|
124
|
+
hrefs: listed === null || spec.items.reference === undefined
|
|
125
|
+
? null
|
|
126
|
+
: itemHrefs(content, listed, uses),
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
return reads;
|
|
130
|
+
}
|
|
131
|
+
function listedReferences(reads) {
|
|
132
|
+
return reads.flatMap(({ section, items, hrefs }) => items.reference === undefined || hrefs === null
|
|
133
|
+
? []
|
|
134
|
+
: [{ section, to: items.reference, crossRoom: items.crossRoom === true, hrefs }]);
|
|
135
|
+
}
|
|
136
|
+
export function verify(schema, provided) {
|
|
137
|
+
const read = readSchema(schema, provided);
|
|
48
138
|
if ('types' in read)
|
|
49
139
|
return { verdict: 'accept', model: read };
|
|
50
140
|
return {
|
|
@@ -53,120 +143,342 @@ export function verify(schema) {
|
|
|
53
143
|
...(read.location === undefined ? {} : { location: read.location }),
|
|
54
144
|
};
|
|
55
145
|
}
|
|
56
|
-
export function
|
|
57
|
-
const
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
146
|
+
export function readTypes(schema, provided) {
|
|
147
|
+
const read = readSchema(schema, provided, false);
|
|
148
|
+
if ('types' in read)
|
|
149
|
+
return read;
|
|
150
|
+
throw new Error(`the schema reads as no types: ${read.rule} ${read.location ?? ''}`.trim());
|
|
151
|
+
}
|
|
152
|
+
function structure(file, content, document, definition) {
|
|
153
|
+
if (definition === undefined)
|
|
154
|
+
return { refusal: refuse(file, 'unknown-type', { location: '/type' }) };
|
|
155
|
+
const fieldFailure = frontmatterRefusal(definition, document.fields);
|
|
156
|
+
if (fieldFailure !== undefined) {
|
|
157
|
+
return { refusal: refuse(file, fieldFailure.rule, { location: fieldFailure.location }) };
|
|
67
158
|
}
|
|
68
|
-
const
|
|
69
|
-
const
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
if (
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
}
|
|
84
|
-
const content = library[file];
|
|
85
|
-
const spans = headingSpans(content, bodyStartOf(content));
|
|
86
|
-
const references = [];
|
|
87
|
-
for (const [name, spec] of Object.entries(definition.sections)) {
|
|
88
|
-
const occurrences = spans.filter((one) => one.name === name);
|
|
89
|
-
if (occurrences.length === 0 && spec.required)
|
|
90
|
-
return refuse(file, 'required-section', { location: name });
|
|
91
|
-
if (spec.kind !== 'list')
|
|
92
|
-
continue;
|
|
93
|
-
for (const span of occurrences) {
|
|
94
|
-
const items = listItems(content, span.bodyStart, span.bodyEnd);
|
|
95
|
-
if (items === null ||
|
|
96
|
-
items.some((item) => !fitsItem(definition, name, content.slice(item.start, item.end))))
|
|
97
|
-
return refuse(file, 'structured-section', { location: name });
|
|
98
|
-
if (spec.items.reference === undefined)
|
|
99
|
-
continue;
|
|
100
|
-
const hrefs = itemHrefs(content, items);
|
|
101
|
-
if (hrefs === null)
|
|
102
|
-
return refuse(file, 'structured-section', { location: name });
|
|
103
|
-
references.push({ section: name, to: spec.items.reference, hrefs });
|
|
104
|
-
}
|
|
159
|
+
const spans = headingSpans(content, bodyStartOf(content));
|
|
160
|
+
const reads = listReads(content, definition, spans);
|
|
161
|
+
const conditioned = conditionedSections(definition, document.fields);
|
|
162
|
+
for (const [name, spec] of Object.entries(definition.sections)) {
|
|
163
|
+
const occurrences = spans.filter((one) => one.name === name);
|
|
164
|
+
if (occurrences.length === 0 && spec.required)
|
|
165
|
+
return { refusal: refuse(file, 'required-section', { location: name }) };
|
|
166
|
+
if (conditioned.includes(name) &&
|
|
167
|
+
occurrences.every((span) => content.slice(span.bodyStart, span.bodyEnd).trim() === ''))
|
|
168
|
+
return { refusal: refuse(file, 'conditional-section', { location: name }) };
|
|
169
|
+
for (const { items, listed, hrefs } of reads.filter((read) => read.section === name)) {
|
|
170
|
+
if (listed === null ||
|
|
171
|
+
listed.some((item) => !fitsItem(definition, name, content.slice(item.start, item.end))) ||
|
|
172
|
+
(items.reference !== undefined && hrefs === null))
|
|
173
|
+
return { refusal: refuse(file, 'structured-section', { location: name }) };
|
|
105
174
|
}
|
|
106
|
-
sectionReferences.set(file, references);
|
|
107
175
|
}
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
176
|
+
const member = unmarkedMember(file, document, definition);
|
|
177
|
+
if (member !== null)
|
|
178
|
+
return { refusal: member };
|
|
179
|
+
return {
|
|
180
|
+
sections: Object.keys(definition.sections).flatMap((name) => listedReferences(reads.filter((read) => read.section === name))),
|
|
181
|
+
};
|
|
182
|
+
}
|
|
183
|
+
function linked(file, content) {
|
|
184
|
+
return hrefOccurrences(bodyAfterFrontmatter(content)).every((occurrence) => classifyHref(file, occurrence.href).kind !== 'invalid');
|
|
185
|
+
}
|
|
186
|
+
function reached(file, href, to) {
|
|
187
|
+
const resolved = classifyHref(file, href);
|
|
188
|
+
return { target: resolved.kind === 'path' ? resolved.path : null, to };
|
|
189
|
+
}
|
|
190
|
+
function referred(file, href, to) {
|
|
191
|
+
const reference = reached(file, href, to);
|
|
192
|
+
return reference.target !== null &&
|
|
193
|
+
isDocumentPath(file) &&
|
|
194
|
+
!isDocumentPath(reference.target) &&
|
|
195
|
+
!to.includes(ATTACHMENT)
|
|
196
|
+
? { target: null, to }
|
|
197
|
+
: reference;
|
|
198
|
+
}
|
|
199
|
+
function crossing(file, href, crossRoom) {
|
|
200
|
+
return crossRoom === true && classifyHref(file, href).kind === 'room';
|
|
201
|
+
}
|
|
202
|
+
function definitionOf(kind, model) {
|
|
203
|
+
return kind === null || !Object.hasOwn(model.types, kind) ? undefined : model.types[kind];
|
|
204
|
+
}
|
|
205
|
+
export function checkDocument(file, content, model, context = {}) {
|
|
206
|
+
const anyRoom = context.anyRoom === true;
|
|
207
|
+
const parsed = parse(content, file);
|
|
208
|
+
if (!parsed.ok)
|
|
209
|
+
return { ok: false };
|
|
210
|
+
const document = parsed.document;
|
|
211
|
+
const type = document.type ?? BUILT_IN_TYPE;
|
|
212
|
+
const typedPath = typedPathOf(file, context.typedPaths);
|
|
213
|
+
if (describedRoom(file, document) !== null ||
|
|
214
|
+
typedPathRefusal(file, content, document, typedPath) !== null ||
|
|
215
|
+
reservedLink(file, document))
|
|
216
|
+
return { ok: false };
|
|
217
|
+
const kind = kindOf(document, typedPath);
|
|
218
|
+
if (kind === BUILT_IN_TYPE)
|
|
219
|
+
return unmarkedMember(file, document, undefined) === null
|
|
220
|
+
? { ok: true, type, typed: false, references: [] }
|
|
221
|
+
: { ok: false };
|
|
222
|
+
const definition = definitionOf(kind, model);
|
|
223
|
+
const read = structure(file, content, document, definition);
|
|
224
|
+
if ('refusal' in read || definition === undefined || !linked(file, content))
|
|
225
|
+
return { ok: false };
|
|
226
|
+
return {
|
|
227
|
+
ok: true,
|
|
228
|
+
type,
|
|
229
|
+
typed: true,
|
|
230
|
+
references: [
|
|
231
|
+
...references(document, definition).flatMap(({ value, to, crossRoom }) => crossing(file, value, anyRoom || crossRoom) ? [] : [referred(file, value, to)]),
|
|
232
|
+
...read.sections.flatMap(({ to, crossRoom, hrefs }) => hrefs.flatMap((href) => crossing(file, href, anyRoom || crossRoom) ? [] : [referred(file, href, to)])),
|
|
233
|
+
],
|
|
234
|
+
};
|
|
235
|
+
}
|
|
236
|
+
export function bodyRoomLinks(body) {
|
|
237
|
+
const found = [];
|
|
238
|
+
for (const href of new Set(hrefOccurrences(body).map((occurrence) => occurrence.href))) {
|
|
239
|
+
const room = roomTarget(href);
|
|
240
|
+
if (room !== null)
|
|
241
|
+
found.push({ kind: 'link', href, ...room });
|
|
242
|
+
}
|
|
243
|
+
return found;
|
|
244
|
+
}
|
|
245
|
+
export function roomReferences(document, definition) {
|
|
246
|
+
const { content } = document;
|
|
247
|
+
const found = bodyRoomLinks(bodyAfterFrontmatter(content));
|
|
248
|
+
if (definition === undefined)
|
|
249
|
+
return found;
|
|
250
|
+
for (const { pointer, value, to, crossRoom } of references(document, definition)) {
|
|
251
|
+
const room = roomTarget(value);
|
|
252
|
+
if (room !== null)
|
|
253
|
+
found.push({
|
|
254
|
+
kind: 'field',
|
|
255
|
+
pointer,
|
|
256
|
+
value,
|
|
257
|
+
to,
|
|
258
|
+
...room,
|
|
259
|
+
...(crossRoom ? { crossRoom } : {}),
|
|
260
|
+
});
|
|
261
|
+
}
|
|
262
|
+
for (const { section, to, crossRoom, hrefs } of listedReferences(listReads(content, definition))) {
|
|
263
|
+
for (const href of hrefs) {
|
|
264
|
+
const room = roomTarget(href);
|
|
265
|
+
if (room !== null)
|
|
266
|
+
found.push({
|
|
267
|
+
kind: 'item',
|
|
268
|
+
section,
|
|
269
|
+
href,
|
|
270
|
+
to,
|
|
271
|
+
...room,
|
|
272
|
+
...(crossRoom ? { crossRoom: true } : {}),
|
|
273
|
+
});
|
|
127
274
|
}
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
275
|
+
}
|
|
276
|
+
return found;
|
|
277
|
+
}
|
|
278
|
+
function least(refused, file, verdict) {
|
|
279
|
+
return refused === undefined || file < refused.file ? { file, verdict } : refused;
|
|
280
|
+
}
|
|
281
|
+
export function assess(file, parsed, binary, model = { types: {} }, context = {}) {
|
|
282
|
+
const unread = { file, type: undefined, targets: [], structured: null, fields: [], sections: [] };
|
|
283
|
+
if (binary)
|
|
284
|
+
return { ...unread, read: refuse(file, 'binary-target-document'), linked: true };
|
|
285
|
+
if (!parsed.ok)
|
|
286
|
+
return { ...unread, read: { verdict: 'refuse', ...parsed.refusal }, linked: true };
|
|
287
|
+
const document = parsed.document;
|
|
288
|
+
const content = document.content;
|
|
289
|
+
const type = document.type ?? BUILT_IN_TYPE;
|
|
290
|
+
const typed = { file, type, read: null, structured: null };
|
|
291
|
+
const typedPath = typedPathOf(file, context.typedPaths);
|
|
292
|
+
const described = describedRoom(file, document) ?? typedPathRefusal(file, content, document, typedPath);
|
|
293
|
+
if (described !== null)
|
|
294
|
+
return { ...typed, targets: [], structured: described, fields: [], linked: true, sections: [] };
|
|
295
|
+
const kind = kindOf(document, typedPath);
|
|
296
|
+
if (kind === BUILT_IN_TYPE) {
|
|
297
|
+
const structured = unmarkedMember(file, document, undefined);
|
|
298
|
+
return {
|
|
299
|
+
...typed,
|
|
300
|
+
targets: [],
|
|
301
|
+
structured,
|
|
302
|
+
fields: [],
|
|
303
|
+
linked: !reservedLink(file, document),
|
|
304
|
+
sections: [],
|
|
305
|
+
};
|
|
306
|
+
}
|
|
307
|
+
const definition = definitionOf(kind, model);
|
|
308
|
+
try {
|
|
309
|
+
return structured(file, content, typed, document, definition, context);
|
|
310
|
+
}
|
|
311
|
+
catch (error) {
|
|
312
|
+
if (!(error instanceof PatternTooCostly))
|
|
313
|
+
throw error;
|
|
314
|
+
return {
|
|
315
|
+
...typed,
|
|
316
|
+
targets: [],
|
|
317
|
+
structured: refuse(file, 'pattern', { location: '' }),
|
|
318
|
+
fields: [],
|
|
319
|
+
linked: true,
|
|
320
|
+
sections: [],
|
|
321
|
+
};
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
function structured(file, content, typed, document, definition, context) {
|
|
325
|
+
const read = structure(file, content, document, definition);
|
|
326
|
+
if ('refusal' in read || definition === undefined) {
|
|
327
|
+
return {
|
|
328
|
+
...typed,
|
|
329
|
+
targets: [],
|
|
330
|
+
structured: 'refusal' in read ? read.refusal : null,
|
|
331
|
+
fields: [],
|
|
332
|
+
linked: true,
|
|
333
|
+
sections: [],
|
|
334
|
+
};
|
|
335
|
+
}
|
|
336
|
+
const anyRoom = context.anyRoom === true;
|
|
337
|
+
const fields = references(document, definition).flatMap(({ pointer, value, to, crossRoom }) => crossing(file, value, anyRoom || crossRoom)
|
|
338
|
+
? []
|
|
339
|
+
: [{ reference: referred(file, value, to), location: pointer }]);
|
|
340
|
+
const sections = read.sections.flatMap(({ section, to, crossRoom, hrefs }) => hrefs.flatMap((href) => crossing(file, href, anyRoom || crossRoom)
|
|
341
|
+
? []
|
|
342
|
+
: [{ reference: referred(file, href, to), location: section }]));
|
|
343
|
+
const targets = new Set();
|
|
344
|
+
for (const { reference } of [...fields, ...sections]) {
|
|
345
|
+
if (reference.target !== null)
|
|
346
|
+
targets.add(reference.target);
|
|
347
|
+
}
|
|
348
|
+
return {
|
|
349
|
+
...typed,
|
|
350
|
+
targets: [...targets],
|
|
351
|
+
fields,
|
|
352
|
+
linked: linked(file, content) && !reservedLink(file, document),
|
|
353
|
+
sections,
|
|
354
|
+
};
|
|
355
|
+
}
|
|
356
|
+
export function assessReferences(file, parsed, changed, model = { types: {} }, context = {}) {
|
|
357
|
+
const unread = {
|
|
358
|
+
file,
|
|
359
|
+
type: undefined,
|
|
360
|
+
targets: [],
|
|
361
|
+
read: null,
|
|
362
|
+
structured: null,
|
|
363
|
+
fields: [],
|
|
364
|
+
linked: true,
|
|
365
|
+
sections: [],
|
|
366
|
+
};
|
|
367
|
+
if (!parsed.ok)
|
|
368
|
+
return unread;
|
|
369
|
+
const { document } = parsed;
|
|
370
|
+
const definition = definitionOf(kindOf(document, typedPathOf(file, context.typedPaths)), model);
|
|
371
|
+
const placed = (href, to, location) => {
|
|
372
|
+
const resolved = classifyHref(file, href);
|
|
373
|
+
return resolved.kind === 'path' && changed.has(resolved.path)
|
|
374
|
+
? [{ reference: referred(file, href, to), location }]
|
|
375
|
+
: [];
|
|
376
|
+
};
|
|
377
|
+
const fields = definition === undefined
|
|
378
|
+
? []
|
|
379
|
+
: references(document, definition).flatMap(({ pointer, value, to }) => placed(value, to, pointer));
|
|
380
|
+
const sections = definition === undefined
|
|
381
|
+
? []
|
|
382
|
+
: listedReferences(listReads(document.content, definition)).flatMap(({ section, to, hrefs }) => hrefs.flatMap((href) => placed(href, to, section)));
|
|
383
|
+
const targets = new Set();
|
|
384
|
+
for (const { reference } of [...fields, ...sections]) {
|
|
385
|
+
if (reference.target !== null)
|
|
386
|
+
targets.add(reference.target);
|
|
387
|
+
}
|
|
388
|
+
return {
|
|
389
|
+
...unread,
|
|
390
|
+
type: document.type ?? BUILT_IN_TYPE,
|
|
391
|
+
targets: [...targets],
|
|
392
|
+
fields,
|
|
393
|
+
linked: !reservedLink(file, document, changed),
|
|
394
|
+
sections,
|
|
395
|
+
};
|
|
396
|
+
}
|
|
397
|
+
export function verdicts() {
|
|
398
|
+
let read;
|
|
399
|
+
let structured;
|
|
400
|
+
let referred;
|
|
401
|
+
let missed;
|
|
402
|
+
const unreached = (placed, typeOf, binary) => placed.find(({ reference }) => !reaches(reference, typeOf, binary));
|
|
403
|
+
return {
|
|
404
|
+
add(assessment, typeOf, binary) {
|
|
405
|
+
const { file } = assessment;
|
|
406
|
+
if (assessment.read !== null) {
|
|
407
|
+
read = least(read, file, assessment.read);
|
|
408
|
+
return 0;
|
|
409
|
+
}
|
|
410
|
+
if (assessment.structured !== null) {
|
|
411
|
+
structured = least(structured, file, assessment.structured);
|
|
412
|
+
return 0;
|
|
413
|
+
}
|
|
414
|
+
const field = unreached(assessment.fields, typeOf, binary);
|
|
415
|
+
if (field !== undefined) {
|
|
416
|
+
referred = least(referred, file, refuse(file, 'unresolved-reference', { location: field.location }));
|
|
417
|
+
return 0;
|
|
418
|
+
}
|
|
419
|
+
if (!assessment.linked) {
|
|
420
|
+
referred = least(referred, file, refuse(file, 'unresolved-link'));
|
|
421
|
+
return 0;
|
|
422
|
+
}
|
|
423
|
+
const section = unreached(assessment.sections, typeOf, binary);
|
|
424
|
+
if (section !== undefined) {
|
|
425
|
+
referred = least(referred, file, refuse(file, 'unresolved-reference', { location: section.location }));
|
|
426
|
+
return 0;
|
|
427
|
+
}
|
|
428
|
+
const all = [...assessment.fields, ...assessment.sections];
|
|
429
|
+
for (const { reference } of all) {
|
|
430
|
+
if (!missing(reference, typeOf, binary))
|
|
431
|
+
continue;
|
|
432
|
+
const path = reference.target;
|
|
433
|
+
if (missed === undefined || path < missed.path)
|
|
434
|
+
missed = { path, referrers: [] };
|
|
435
|
+
if (path === missed.path && missed.referrers.at(-1) !== file)
|
|
436
|
+
missed.referrers.push(file);
|
|
132
437
|
}
|
|
438
|
+
return all.length;
|
|
439
|
+
},
|
|
440
|
+
verdict() {
|
|
441
|
+
const refused = read ?? structured ?? referred;
|
|
442
|
+
if (refused !== undefined)
|
|
443
|
+
return refused.verdict;
|
|
444
|
+
if (missed !== undefined) {
|
|
445
|
+
return refuse(missed.path, 'referenced-missing-file', {
|
|
446
|
+
referrers: [...missed.referrers].sort(),
|
|
447
|
+
});
|
|
448
|
+
}
|
|
449
|
+
return { verdict: 'accept' };
|
|
450
|
+
},
|
|
451
|
+
};
|
|
452
|
+
}
|
|
453
|
+
export function* validating(library, context = { binaryTargets: [] }, model = { types: {} }) {
|
|
454
|
+
const binaryTargets = new Set(context.binaryTargets);
|
|
455
|
+
const binary = (path) => binaryTargets.has(path);
|
|
456
|
+
const types = new Map();
|
|
457
|
+
const assessments = [];
|
|
458
|
+
const closeBudget = openPatternBudget();
|
|
459
|
+
try {
|
|
460
|
+
for (const [file, content] of library) {
|
|
461
|
+
const assessment = assess(file, parse(content, file), binary(file), model, context);
|
|
462
|
+
if (assessment.type !== undefined)
|
|
463
|
+
types.set(file, assessment.type);
|
|
464
|
+
assessments.push(assessment);
|
|
465
|
+
yield { path: file, resolved: 0 };
|
|
133
466
|
}
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
if (parsed === undefined || !parsed.ok)
|
|
139
|
-
continue;
|
|
140
|
-
const kind = instanceType(parsed.document);
|
|
141
|
-
if (kind === null || kind === BUILT_IN_TYPE)
|
|
142
|
-
continue;
|
|
143
|
-
const definition = definitions.get(kind);
|
|
144
|
-
if (definition === undefined)
|
|
145
|
-
continue;
|
|
146
|
-
const named = [
|
|
147
|
-
...references(parsed.document, definition),
|
|
148
|
-
...sectionReferences
|
|
149
|
-
.get(file)
|
|
150
|
-
.flatMap(({ to, hrefs }) => hrefs.map((value) => ({ value, to }))),
|
|
151
|
-
];
|
|
152
|
-
for (const { value, to } of named) {
|
|
153
|
-
if (to.includes(ATTACHMENT))
|
|
154
|
-
continue;
|
|
155
|
-
const resolved = classifyHref(file, value);
|
|
156
|
-
if (resolved.kind !== 'path')
|
|
157
|
-
continue;
|
|
158
|
-
if (documents.has(resolved.path) || binaryTargets.has(resolved.path))
|
|
159
|
-
continue;
|
|
160
|
-
const referrers = missing.get(resolved.path) ?? [];
|
|
161
|
-
referrers.push(file);
|
|
162
|
-
missing.set(resolved.path, referrers);
|
|
467
|
+
const judged = verdicts();
|
|
468
|
+
for (const assessment of assessments) {
|
|
469
|
+
const resolved = judged.add(assessment, (path) => types.get(path), binary);
|
|
470
|
+
yield { path: assessment.file, resolved };
|
|
163
471
|
}
|
|
472
|
+
return judged.verdict();
|
|
164
473
|
}
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
const path = missingPaths[0];
|
|
168
|
-
const referrers = [...new Set(missing.get(path) ?? [])].sort();
|
|
169
|
-
return refuse(path, 'referenced-missing-file', { referrers });
|
|
474
|
+
finally {
|
|
475
|
+
closeBudget();
|
|
170
476
|
}
|
|
171
|
-
|
|
477
|
+
}
|
|
478
|
+
export function validate(library, context = { binaryTargets: [] }, model = { types: {} }) {
|
|
479
|
+
const steps = validating(new Map(Object.entries(library)), context, model);
|
|
480
|
+
let step = steps.next();
|
|
481
|
+
while (step.done !== true)
|
|
482
|
+
step = steps.next();
|
|
483
|
+
return step.value;
|
|
172
484
|
}
|
package/dist/yaml.d.ts
CHANGED
|
@@ -16,8 +16,7 @@ export type YamlSeq = {
|
|
|
16
16
|
};
|
|
17
17
|
export type YamlEntry = {
|
|
18
18
|
readonly key: string;
|
|
19
|
-
readonly
|
|
20
|
-
readonly keyEnd: number;
|
|
19
|
+
readonly after: number;
|
|
21
20
|
readonly value: YamlNode;
|
|
22
21
|
};
|
|
23
22
|
export type YamlMap = {
|
|
@@ -32,7 +31,12 @@ export declare function parseYamlMapping(text: string, start: number, end: numbe
|
|
|
32
31
|
export declare function jsValue(node: YamlNode): unknown;
|
|
33
32
|
export declare function mapEntry(map: YamlMap, key: string): YamlEntry | undefined;
|
|
34
33
|
export declare function isPlainSafe(text: string): boolean;
|
|
35
|
-
export
|
|
34
|
+
export type FrontmatterValue = string | number | boolean | null | readonly FrontmatterValue[] | {
|
|
35
|
+
readonly [name: string]: FrontmatterValue;
|
|
36
|
+
};
|
|
37
|
+
export declare function plain(value: unknown): value is Record<string, unknown>;
|
|
38
|
+
export declare function frontmatterValue(value: unknown): value is FrontmatterValue;
|
|
39
|
+
export declare function serializeJs(value: FrontmatterValue): string;
|
|
36
40
|
export declare function isRecord(value: unknown): value is Record<string, unknown>;
|
|
37
41
|
export declare function serializeKey(name: string): string;
|
|
38
42
|
export declare function bodyStartAfterYaml(content: string, yamlEnd: number): number;
|
package/dist/yaml.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"yaml.d.ts","sourceRoot":"","sources":["../src/yaml.ts"],"names":[],"mappings":"AAAA,qBAAa,SAAU,SAAQ,KAAK;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM;IAAnC,YAAqB,MAAM,EAAE,MAAM,EAGlC;CACF;AAED,MAAM,MAAM,UAAU,GAAG;IACvB,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IACxB,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,CAAC;IACjD,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF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