@agentshouse/mdmodel 0.1.0-c896b3d9398b1 → 0.1.0-cbce4f1da228f
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 +137 -133
- package/dist/blocks.d.ts.map +1 -1
- package/dist/blocks.js +33 -26
- package/dist/condition.d.ts +1 -1
- package/dist/condition.d.ts.map +1 -1
- package/dist/condition.js +16 -13
- package/dist/definition.d.ts +14 -0
- package/dist/definition.d.ts.map +1 -1
- package/dist/definition.js +217 -25
- package/dist/divide.d.ts.map +1 -1
- package/dist/divide.js +18 -8
- package/dist/document.d.ts +4 -1
- package/dist/document.d.ts.map +1 -1
- package/dist/document.js +105 -68
- 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 +10 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -4
- package/dist/links.d.ts +2 -0
- package/dist/links.d.ts.map +1 -1
- package/dist/links.js +23 -12
- package/dist/paths.d.ts +1 -0
- package/dist/paths.d.ts.map +1 -1
- package/dist/paths.js +92 -12
- package/dist/project.d.ts +1 -0
- package/dist/project.d.ts.map +1 -1
- package/dist/project.js +32 -9
- package/dist/references.d.ts +2 -2
- package/dist/references.d.ts.map +1 -1
- package/dist/schema.js +2 -2
- package/dist/types.d.ts +25 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/validate.d.ts +6 -1
- package/dist/validate.d.ts.map +1 -1
- package/dist/validate.js +163 -111
- package/dist/yaml.d.ts +7 -3
- package/dist/yaml.d.ts.map +1 -1
- package/dist/yaml.js +72 -43
- package/fixtures/README.md +1 -1
- package/package.json +4 -2
package/dist/project.js
CHANGED
|
@@ -8,17 +8,25 @@ import { bodyStartOf } from './yaml.js';
|
|
|
8
8
|
function internalEdits(content, bodyStart, file, documentTargets) {
|
|
9
9
|
const inventory = linkInventory(content.slice(bodyStart));
|
|
10
10
|
const internal = new Set();
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
for (const use of uses) {
|
|
11
|
+
const uses = inventory.uses
|
|
12
|
+
.filter((use) => {
|
|
14
13
|
const resolved = target(file, use.destination.href);
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
return resolved !== null && documentTargets.has(resolved);
|
|
15
|
+
})
|
|
16
|
+
.sort((left, right) => left.start - right.start);
|
|
17
|
+
const edits = [];
|
|
18
|
+
for (let index = uses.length - 1; index >= 0; index -= 1) {
|
|
19
|
+
const use = uses[index];
|
|
17
20
|
internal.add(use.destination.start);
|
|
18
21
|
const label = { start: bodyStart + use.labelStart, end: bodyStart + use.labelEnd };
|
|
19
|
-
const inner =
|
|
20
|
-
|
|
21
|
-
|
|
22
|
+
const inner = [];
|
|
23
|
+
for (let nested = index + 1; nested < uses.length; nested += 1) {
|
|
24
|
+
const edit = edits[uses.length - 1 - nested];
|
|
25
|
+
if (edit.start >= label.end)
|
|
26
|
+
break;
|
|
27
|
+
if (edit.start >= label.start && edit.end <= label.end)
|
|
28
|
+
inner.push(edit);
|
|
29
|
+
}
|
|
22
30
|
edits.push({
|
|
23
31
|
start: bodyStart + use.start,
|
|
24
32
|
end: bodyStart + use.end,
|
|
@@ -32,10 +40,25 @@ function internalEdits(content, bodyStart, file, documentTargets) {
|
|
|
32
40
|
}
|
|
33
41
|
return edits.sort((left, right) => left.start - right.start);
|
|
34
42
|
}
|
|
43
|
+
export function firstEditFrom(edits, start) {
|
|
44
|
+
let low = 0;
|
|
45
|
+
let high = edits.length;
|
|
46
|
+
while (low < high) {
|
|
47
|
+
const middle = (low + high) >>> 1;
|
|
48
|
+
if (edits[middle].start < start)
|
|
49
|
+
low = middle + 1;
|
|
50
|
+
else
|
|
51
|
+
high = middle;
|
|
52
|
+
}
|
|
53
|
+
return low;
|
|
54
|
+
}
|
|
35
55
|
export function rangeText(content, range, edits) {
|
|
36
56
|
let text = '';
|
|
37
57
|
let cursor = range.start;
|
|
38
|
-
for (
|
|
58
|
+
for (let index = firstEditFrom(edits, range.start); index < edits.length; index += 1) {
|
|
59
|
+
const edit = edits[index];
|
|
60
|
+
if (edit.start > range.end)
|
|
61
|
+
break;
|
|
39
62
|
if (edit.start < cursor || edit.end > range.end)
|
|
40
63
|
continue;
|
|
41
64
|
text += content.slice(cursor, edit.start) + edit.text;
|
package/dist/references.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { type Definition } from './definition.js';
|
|
2
|
-
import type {
|
|
3
|
-
export declare function references(document:
|
|
2
|
+
import type { Frontmatter, Reference } from './types.js';
|
|
3
|
+
export declare function references(document: Pick<Frontmatter, 'fields'>, definition: Definition): readonly Reference[];
|
|
4
4
|
//# sourceMappingURL=references.d.ts.map
|
package/dist/references.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"references.d.ts","sourceRoot":"","sources":["../src/references.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,UAAU,EAEhB,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"references.d.ts","sourceRoot":"","sources":["../src/references.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,UAAU,EAEhB,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAwBzD,wBAAgB,UAAU,CACxB,QAAQ,EAAE,IAAI,CAAC,WAAW,EAAE,QAAQ,CAAC,EACrC,UAAU,EAAE,UAAU,GACrB,SAAS,SAAS,EAAE,CAItB"}
|
package/dist/schema.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Validator } from '@cfworker/json-schema';
|
|
2
2
|
import { escapePointer, refTarget } from './definition.js';
|
|
3
|
-
import { MEMBER_FIELD, RECEIVED_FIELD, SITE_FIELD } from './fields.js';
|
|
3
|
+
import { MEMBER_FIELD, RECEIVED_FIELD, SITE_FIELD, TYPE_FIELD } from './fields.js';
|
|
4
4
|
import { interpretPlain, isRecord } from './yaml.js';
|
|
5
5
|
const STANDING_MAPS = ['properties', 'patternProperties'];
|
|
6
6
|
const STANDING = [
|
|
@@ -101,7 +101,7 @@ function compile(definition) {
|
|
|
101
101
|
const closedDefs = mapped(defs, (held) => closed(held, true, defs));
|
|
102
102
|
const declared = isRecord(root.properties) ? root.properties : {};
|
|
103
103
|
const properties = {
|
|
104
|
-
|
|
104
|
+
[TYPE_FIELD]: true,
|
|
105
105
|
[SITE_FIELD]: true,
|
|
106
106
|
[RECEIVED_FIELD]: true,
|
|
107
107
|
...(definition.memberDocument ? { [MEMBER_FIELD]: { type: 'string' } } : {}),
|
package/dist/types.d.ts
CHANGED
|
@@ -28,10 +28,12 @@ export type Extent = {
|
|
|
28
28
|
export type Span = Extent & {
|
|
29
29
|
readonly text: string;
|
|
30
30
|
};
|
|
31
|
-
export type
|
|
31
|
+
export type Frontmatter = {
|
|
32
32
|
readonly content: string;
|
|
33
33
|
readonly type: string | undefined;
|
|
34
34
|
readonly fields: Readonly<Record<string, unknown>>;
|
|
35
|
+
};
|
|
36
|
+
export type Document = Frontmatter & {
|
|
35
37
|
readonly preamble: string;
|
|
36
38
|
readonly sections: Readonly<Record<string, string>>;
|
|
37
39
|
};
|
|
@@ -41,6 +43,18 @@ export type Refusal = {
|
|
|
41
43
|
readonly location?: string;
|
|
42
44
|
readonly referrers?: readonly string[];
|
|
43
45
|
};
|
|
46
|
+
export type Reached = {
|
|
47
|
+
readonly target: string | null;
|
|
48
|
+
readonly to: readonly string[];
|
|
49
|
+
};
|
|
50
|
+
export type DocumentCheck = {
|
|
51
|
+
readonly ok: false;
|
|
52
|
+
} | {
|
|
53
|
+
readonly ok: true;
|
|
54
|
+
readonly type: string;
|
|
55
|
+
readonly typed: boolean;
|
|
56
|
+
readonly references: readonly Reached[];
|
|
57
|
+
};
|
|
44
58
|
export type Validation = {
|
|
45
59
|
readonly verdict: 'accept';
|
|
46
60
|
} | ({
|
|
@@ -60,6 +74,13 @@ export type Division = {
|
|
|
60
74
|
readonly ok: false;
|
|
61
75
|
readonly refusal: Refusal;
|
|
62
76
|
};
|
|
77
|
+
export type FrontmatterResult = {
|
|
78
|
+
readonly ok: true;
|
|
79
|
+
readonly frontmatter: Frontmatter;
|
|
80
|
+
} | {
|
|
81
|
+
readonly ok: false;
|
|
82
|
+
readonly refusal: Refusal;
|
|
83
|
+
};
|
|
63
84
|
export type ParseResult = {
|
|
64
85
|
readonly ok: true;
|
|
65
86
|
readonly document: Document;
|
|
@@ -71,6 +92,9 @@ export type Link = {
|
|
|
71
92
|
readonly href: string;
|
|
72
93
|
readonly target: string;
|
|
73
94
|
};
|
|
95
|
+
export type LinkOccurrence = Link & {
|
|
96
|
+
readonly start: number;
|
|
97
|
+
};
|
|
74
98
|
export type Reference = {
|
|
75
99
|
readonly pointer: string;
|
|
76
100
|
readonly value: string;
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD,MAAM,MAAM,OAAO,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;AAEvD,MAAM,MAAM,aAAa,GAAG;IAC1B,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC;CACtD,CAAC;AAEF,MAAM,MAAM,iBAAiB,GACzB;IAAE,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAA;CAAE,GAC7D;IACE,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC;IAC3B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;CAC5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AAC;IACvB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB,GACD;IACE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;CACrB,GACD;IACE,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC;IAC3B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB,CAAC;AAEN,MAAM,MAAM,WAAW,GACnB;IAAE,QAAQ,CAAC,OAAO,EAAE,SAAS,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAA;CAAE,GAC5D;IAAE,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAA;CAAE,GAC1D;IAAE,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;CAAE,CAAC;AAE9D,MAAM,MAAM,UAAU,GAClB;IAAE,QAAQ,CAAC,OAAO,EAAE,SAAS,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GACtD;IAAE,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;CAAE,CAAC"}
|
package/dist/validate.d.ts
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type Definition } from './definition.js';
|
|
2
|
+
import type { DocumentCheck, Library, ModelVerification, Reached, Validation, ValidationContext, VerifiedModel } from './types.js';
|
|
3
|
+
export declare function resolves(reference: Reached, typeOf: (path: string) => string | undefined, binary: (path: string) => boolean): boolean;
|
|
2
4
|
export declare function verify(schema: string): ModelVerification;
|
|
5
|
+
export declare function checkDocument(file: string, content: string, model: VerifiedModel): DocumentCheck;
|
|
6
|
+
export declare function sectionReferences(file: string, content: string, definition: Definition): readonly Reached[];
|
|
7
|
+
export declare function validating(library: Library, context?: ValidationContext, model?: VerifiedModel): Generator<string, Validation, void>;
|
|
3
8
|
export declare function validate(library: Library, context?: ValidationContext, model?: VerifiedModel): Validation;
|
|
4
9
|
//# sourceMappingURL=validate.d.ts.map
|
package/dist/validate.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../src/validate.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../src/validate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyC,KAAK,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAQzF,OAAO,KAAK,EAEV,aAAa,EAEb,OAAO,EACP,iBAAiB,EACjB,OAAO,EACP,UAAU,EACV,iBAAiB,EACjB,aAAa,EACd,MAAM,YAAY,CAAC;AA6CpB,wBAAgB,QAAQ,CACtB,SAAS,EAAE,OAAO,EAClB,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,EAC5C,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,GAChC,OAAO,CAET;AA8BD,wBAAgB,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,iBAAiB,CAQxD;AA2DD,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,aAAa,GAAG,aAAa,CAmBhG;AAED,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,UAAU,GACrB,SAAS,OAAO,EAAE,CAgBpB;AAED,wBAAiB,UAAU,CACzB,OAAO,EAAE,OAAO,EAChB,OAAO,GAAE,iBAAyC,EAClD,KAAK,GAAE,aAA6B,GACnC,SAAS,CAAC,MAAM,EAAE,UAAU,EAAE,IAAI,CAAC,CAyDrC;AAED,wBAAgB,QAAQ,CACtB,OAAO,EAAE,OAAO,EAChB,OAAO,GAAE,iBAAyC,EAClD,KAAK,GAAE,aAA6B,GACnC,UAAU,CAKZ"}
|
package/dist/validate.js
CHANGED
|
@@ -18,25 +18,42 @@ function instanceType(document) {
|
|
|
18
18
|
return null;
|
|
19
19
|
return raw;
|
|
20
20
|
}
|
|
21
|
-
function reaches(
|
|
22
|
-
|
|
23
|
-
if (resolved.kind !== 'path')
|
|
21
|
+
function reaches(reference, typeOf, binary) {
|
|
22
|
+
if (reference.target === null)
|
|
24
23
|
return false;
|
|
25
|
-
if (to.includes(ATTACHMENT))
|
|
24
|
+
if (reference.to.includes(ATTACHMENT))
|
|
26
25
|
return true;
|
|
27
|
-
if (
|
|
26
|
+
if (binary(reference.target))
|
|
27
|
+
return false;
|
|
28
|
+
const held = typeOf(reference.target);
|
|
29
|
+
return held === undefined || reference.to.includes(held);
|
|
30
|
+
}
|
|
31
|
+
function missing(reference, typeOf, binary) {
|
|
32
|
+
if (reference.to.includes(ATTACHMENT) || reference.target === null)
|
|
28
33
|
return false;
|
|
29
|
-
|
|
30
|
-
|
|
34
|
+
return typeOf(reference.target) === undefined && !binary(reference.target);
|
|
35
|
+
}
|
|
36
|
+
export function resolves(reference, typeOf, binary) {
|
|
37
|
+
return reaches(reference, typeOf, binary) && !missing(reference, typeOf, binary);
|
|
38
|
+
}
|
|
39
|
+
function usesIn(content) {
|
|
40
|
+
let held;
|
|
41
|
+
return () => {
|
|
42
|
+
if (held !== undefined)
|
|
43
|
+
return held;
|
|
44
|
+
const bodyStart = bodyStartOf(content);
|
|
45
|
+
held = linkInventory(content.slice(bodyStart)).uses.map((use) => ({
|
|
46
|
+
...use,
|
|
47
|
+
start: bodyStart + use.start,
|
|
48
|
+
end: bodyStart + use.end,
|
|
49
|
+
}));
|
|
50
|
+
return held;
|
|
51
|
+
};
|
|
31
52
|
}
|
|
32
|
-
function itemHrefs(content, items) {
|
|
33
|
-
const bodyStart = bodyStartOf(content);
|
|
34
|
-
const { uses } = linkInventory(content.slice(bodyStart));
|
|
53
|
+
function itemHrefs(content, items, uses) {
|
|
35
54
|
const hrefs = [];
|
|
36
55
|
for (const item of items) {
|
|
37
|
-
const link = uses.find((use) =>
|
|
38
|
-
bodyStart + use.end === item.end &&
|
|
39
|
-
content[item.start] === '[');
|
|
56
|
+
const link = uses().find((use) => use.start === item.start && use.end === item.end && content[item.start] === '[');
|
|
40
57
|
if (link === undefined)
|
|
41
58
|
return null;
|
|
42
59
|
hrefs.push(link.destination.href);
|
|
@@ -53,120 +70,155 @@ export function verify(schema) {
|
|
|
53
70
|
...(read.location === undefined ? {} : { location: read.location }),
|
|
54
71
|
};
|
|
55
72
|
}
|
|
56
|
-
|
|
73
|
+
function structure(file, content, document, definition) {
|
|
74
|
+
if (definition === undefined)
|
|
75
|
+
return { refusal: refuse(file, 'unknown-type', { location: '/type' }) };
|
|
76
|
+
const fieldFailure = frontmatterRefusal(definition, document.fields);
|
|
77
|
+
if (fieldFailure !== undefined) {
|
|
78
|
+
return { refusal: refuse(file, fieldFailure.rule, { location: fieldFailure.location }) };
|
|
79
|
+
}
|
|
80
|
+
const spans = headingSpans(content, bodyStartOf(content));
|
|
81
|
+
const uses = usesIn(content);
|
|
82
|
+
const sections = [];
|
|
83
|
+
for (const [name, spec] of Object.entries(definition.sections)) {
|
|
84
|
+
const occurrences = spans.filter((one) => one.name === name);
|
|
85
|
+
if (occurrences.length === 0 && spec.required)
|
|
86
|
+
return { refusal: refuse(file, 'required-section', { location: name }) };
|
|
87
|
+
if (spec.kind !== 'list')
|
|
88
|
+
continue;
|
|
89
|
+
for (const span of occurrences) {
|
|
90
|
+
const items = listItems(content, span.bodyStart, span.bodyEnd);
|
|
91
|
+
if (items === null ||
|
|
92
|
+
items.some((item) => !fitsItem(definition, name, content.slice(item.start, item.end))))
|
|
93
|
+
return { refusal: refuse(file, 'structured-section', { location: name }) };
|
|
94
|
+
if (spec.items.reference === undefined)
|
|
95
|
+
continue;
|
|
96
|
+
const hrefs = itemHrefs(content, items, uses);
|
|
97
|
+
if (hrefs === null)
|
|
98
|
+
return { refusal: refuse(file, 'structured-section', { location: name }) };
|
|
99
|
+
sections.push({ section: name, to: spec.items.reference, hrefs });
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
return { sections };
|
|
103
|
+
}
|
|
104
|
+
function linked(file, content) {
|
|
105
|
+
return hrefOccurrences(bodyAfterFrontmatter(content)).every((occurrence) => classifyHref(file, occurrence.href).kind !== 'invalid');
|
|
106
|
+
}
|
|
107
|
+
function reached(file, href, to) {
|
|
108
|
+
const resolved = classifyHref(file, href);
|
|
109
|
+
return { target: resolved.kind === 'path' ? resolved.path : null, to };
|
|
110
|
+
}
|
|
111
|
+
function definitionOf(document, model) {
|
|
112
|
+
const kind = instanceType(document);
|
|
113
|
+
return kind === null || !Object.hasOwn(model.types, kind) ? undefined : model.types[kind];
|
|
114
|
+
}
|
|
115
|
+
export function checkDocument(file, content, model) {
|
|
116
|
+
const parsed = parse(content, file);
|
|
117
|
+
if (!parsed.ok)
|
|
118
|
+
return { ok: false };
|
|
119
|
+
const document = parsed.document;
|
|
120
|
+
const type = document.type ?? BUILT_IN_TYPE;
|
|
121
|
+
if (instanceType(document) === BUILT_IN_TYPE)
|
|
122
|
+
return { ok: true, type, typed: false, references: [] };
|
|
123
|
+
const definition = definitionOf(document, model);
|
|
124
|
+
const read = structure(file, content, document, definition);
|
|
125
|
+
if ('refusal' in read || definition === undefined || !linked(file, content))
|
|
126
|
+
return { ok: false };
|
|
127
|
+
return {
|
|
128
|
+
ok: true,
|
|
129
|
+
type,
|
|
130
|
+
typed: true,
|
|
131
|
+
references: [
|
|
132
|
+
...references(document, definition).map(({ value, to }) => reached(file, value, to)),
|
|
133
|
+
...read.sections.flatMap(({ to, hrefs }) => hrefs.map((href) => reached(file, href, to))),
|
|
134
|
+
],
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
export function sectionReferences(file, content, definition) {
|
|
138
|
+
const referring = (name) => {
|
|
139
|
+
const spec = Object.hasOwn(definition.sections, name) ? definition.sections[name] : undefined;
|
|
140
|
+
return spec?.kind === 'list' ? spec.items.reference : undefined;
|
|
141
|
+
};
|
|
142
|
+
if (!Object.keys(definition.sections).some((name) => referring(name) !== undefined))
|
|
143
|
+
return [];
|
|
144
|
+
const uses = usesIn(content);
|
|
145
|
+
const found = [];
|
|
146
|
+
for (const span of headingSpans(content, bodyStartOf(content))) {
|
|
147
|
+
const to = referring(span.name);
|
|
148
|
+
if (to === undefined)
|
|
149
|
+
continue;
|
|
150
|
+
const items = listItems(content, span.bodyStart, span.bodyEnd);
|
|
151
|
+
const hrefs = items === null ? null : itemHrefs(content, items, uses);
|
|
152
|
+
for (const href of hrefs ?? [])
|
|
153
|
+
found.push(reached(file, href, to));
|
|
154
|
+
}
|
|
155
|
+
return found;
|
|
156
|
+
}
|
|
157
|
+
export function* validating(library, context = { binaryTargets: [] }, model = { types: {} }) {
|
|
57
158
|
const binaryTargets = new Set(context.binaryTargets);
|
|
159
|
+
const binary = (path) => binaryTargets.has(path);
|
|
58
160
|
const files = Object.keys(library).sort();
|
|
161
|
+
const types = new Map();
|
|
162
|
+
const typeOf = (path) => types.get(path);
|
|
59
163
|
const documents = new Map();
|
|
60
164
|
for (const file of files) {
|
|
61
165
|
if (binaryTargets.has(file))
|
|
62
166
|
return refuse(file, 'binary-target-document');
|
|
63
167
|
const parsed = parse(library[file], file);
|
|
64
|
-
documents.set(file, parsed);
|
|
65
168
|
if (!parsed.ok)
|
|
66
169
|
return { verdict: 'refuse', ...parsed.refusal };
|
|
170
|
+
types.set(file, parsed.document.type ?? BUILT_IN_TYPE);
|
|
171
|
+
if (instanceType(parsed.document) !== BUILT_IN_TYPE)
|
|
172
|
+
documents.set(file, parsed.document);
|
|
173
|
+
yield file;
|
|
67
174
|
}
|
|
68
|
-
const definitions = new Map(Object.entries(model.types));
|
|
69
175
|
const sectionReferences = new Map();
|
|
70
|
-
for (const file of
|
|
71
|
-
const
|
|
72
|
-
if (
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
continue;
|
|
77
|
-
const definition = kind === null ? undefined : definitions.get(kind);
|
|
78
|
-
if (definition === undefined)
|
|
79
|
-
return refuse(file, 'unknown-type', { location: '/type' });
|
|
80
|
-
const fieldFailure = frontmatterRefusal(definition, parsed.document.fields);
|
|
81
|
-
if (fieldFailure !== undefined) {
|
|
82
|
-
return refuse(file, fieldFailure.rule, { location: fieldFailure.location });
|
|
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
|
-
}
|
|
105
|
-
}
|
|
106
|
-
sectionReferences.set(file, references);
|
|
176
|
+
for (const [file, document] of documents) {
|
|
177
|
+
const read = structure(file, library[file], document, definitionOf(document, model));
|
|
178
|
+
if ('refusal' in read)
|
|
179
|
+
return read.refusal;
|
|
180
|
+
sectionReferences.set(file, read.sections);
|
|
181
|
+
yield file;
|
|
107
182
|
}
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
const
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
for (const { pointer, to, value } of references(parsed.document, definition)) {
|
|
119
|
-
if (!reaches(file, value, to, documents, binaryTargets))
|
|
120
|
-
return refuse(file, 'unresolved-reference', { location: pointer });
|
|
183
|
+
let least;
|
|
184
|
+
for (const [file, document] of documents) {
|
|
185
|
+
const definition = definitionOf(document, model);
|
|
186
|
+
const fields = references(document, definition).map(({ pointer, value, to }) => ({
|
|
187
|
+
reference: reached(file, value, to),
|
|
188
|
+
location: pointer,
|
|
189
|
+
}));
|
|
190
|
+
for (const { reference, location } of fields) {
|
|
191
|
+
if (!reaches(reference, typeOf, binary))
|
|
192
|
+
return refuse(file, 'unresolved-reference', { location });
|
|
121
193
|
}
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
194
|
+
if (!linked(file, library[file]))
|
|
195
|
+
return refuse(file, 'unresolved-link');
|
|
196
|
+
const sections = sectionReferences
|
|
197
|
+
.get(file)
|
|
198
|
+
.flatMap(({ section, to, hrefs }) => hrefs.map((href) => ({ reference: reached(file, href, to), location: section })));
|
|
199
|
+
for (const { reference, location } of sections) {
|
|
200
|
+
if (!reaches(reference, typeOf, binary))
|
|
201
|
+
return refuse(file, 'unresolved-reference', { location });
|
|
127
202
|
}
|
|
128
|
-
for (const {
|
|
129
|
-
|
|
130
|
-
if (!reaches(file, href, to, documents, binaryTargets))
|
|
131
|
-
return refuse(file, 'unresolved-reference', { location: section });
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
const missing = new Map();
|
|
136
|
-
for (const file of files) {
|
|
137
|
-
const parsed = documents.get(file);
|
|
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))
|
|
203
|
+
for (const { reference } of [...fields, ...sections]) {
|
|
204
|
+
if (!missing(reference, typeOf, binary))
|
|
154
205
|
continue;
|
|
155
|
-
const
|
|
156
|
-
if (
|
|
157
|
-
|
|
158
|
-
if (
|
|
159
|
-
|
|
160
|
-
const referrers = missing.get(resolved.path) ?? [];
|
|
161
|
-
referrers.push(file);
|
|
162
|
-
missing.set(resolved.path, referrers);
|
|
206
|
+
const path = reference.target;
|
|
207
|
+
if (least === undefined || path < least.path)
|
|
208
|
+
least = { path, referrers: [] };
|
|
209
|
+
if (path === least.path && least.referrers.at(-1) !== file)
|
|
210
|
+
least.referrers.push(file);
|
|
163
211
|
}
|
|
212
|
+
yield file;
|
|
164
213
|
}
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
const path = missingPaths[0];
|
|
168
|
-
const referrers = [...new Set(missing.get(path) ?? [])].sort();
|
|
169
|
-
return refuse(path, 'referenced-missing-file', { referrers });
|
|
170
|
-
}
|
|
214
|
+
if (least !== undefined)
|
|
215
|
+
return refuse(least.path, 'referenced-missing-file', { referrers: least.referrers });
|
|
171
216
|
return { verdict: 'accept' };
|
|
172
217
|
}
|
|
218
|
+
export function validate(library, context = { binaryTargets: [] }, model = { types: {} }) {
|
|
219
|
+
const steps = validating(library, context, model);
|
|
220
|
+
let step = steps.next();
|
|
221
|
+
while (step.done !== true)
|
|
222
|
+
step = steps.next();
|
|
223
|
+
return step.value;
|
|
224
|
+
}
|
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,GA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