@json-schema-engine/core 0.0.1

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 (143) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +50 -0
  3. package/dist/coverage.d.ts +30 -0
  4. package/dist/coverage.d.ts.map +1 -0
  5. package/dist/coverage.js +81 -0
  6. package/dist/coverage.js.map +1 -0
  7. package/dist/cursor.d.ts +16 -0
  8. package/dist/cursor.d.ts.map +1 -0
  9. package/dist/cursor.js +28 -0
  10. package/dist/cursor.js.map +1 -0
  11. package/dist/dialect.d.ts +316 -0
  12. package/dist/dialect.d.ts.map +1 -0
  13. package/dist/dialect.js +135 -0
  14. package/dist/dialect.js.map +1 -0
  15. package/dist/engine.d.ts +203 -0
  16. package/dist/engine.d.ts.map +1 -0
  17. package/dist/engine.js +493 -0
  18. package/dist/engine.js.map +1 -0
  19. package/dist/index.d.ts +182 -0
  20. package/dist/index.d.ts.map +1 -0
  21. package/dist/index.js +370 -0
  22. package/dist/index.js.map +1 -0
  23. package/dist/json.d.ts +49 -0
  24. package/dist/json.d.ts.map +1 -0
  25. package/dist/json.js +128 -0
  26. package/dist/json.js.map +1 -0
  27. package/dist/keywords/applicator.d.ts +57 -0
  28. package/dist/keywords/applicator.d.ts.map +1 -0
  29. package/dist/keywords/applicator.js +789 -0
  30. package/dist/keywords/applicator.js.map +1 -0
  31. package/dist/keywords/core.d.ts +42 -0
  32. package/dist/keywords/core.d.ts.map +1 -0
  33. package/dist/keywords/core.js +139 -0
  34. package/dist/keywords/core.js.map +1 -0
  35. package/dist/keywords/format.d.ts +43 -0
  36. package/dist/keywords/format.d.ts.map +1 -0
  37. package/dist/keywords/format.js +101 -0
  38. package/dist/keywords/format.js.map +1 -0
  39. package/dist/keywords/metaschemas2019.d.ts +3 -0
  40. package/dist/keywords/metaschemas2019.d.ts.map +1 -0
  41. package/dist/keywords/metaschemas2019.js +406 -0
  42. package/dist/keywords/metaschemas2019.js.map +1 -0
  43. package/dist/keywords/metaschemas2020.d.ts +3 -0
  44. package/dist/keywords/metaschemas2020.d.ts.map +1 -0
  45. package/dist/keywords/metaschemas2020.js +441 -0
  46. package/dist/keywords/metaschemas2020.js.map +1 -0
  47. package/dist/keywords/metaschemas6.d.ts +3 -0
  48. package/dist/keywords/metaschemas6.d.ts.map +1 -0
  49. package/dist/keywords/metaschemas6.js +221 -0
  50. package/dist/keywords/metaschemas6.js.map +1 -0
  51. package/dist/keywords/metaschemas7.d.ts +3 -0
  52. package/dist/keywords/metaschemas7.d.ts.map +1 -0
  53. package/dist/keywords/metaschemas7.js +248 -0
  54. package/dist/keywords/metaschemas7.js.map +1 -0
  55. package/dist/keywords/unevaluated.d.ts +14 -0
  56. package/dist/keywords/unevaluated.d.ts.map +1 -0
  57. package/dist/keywords/unevaluated.js +296 -0
  58. package/dist/keywords/unevaluated.js.map +1 -0
  59. package/dist/keywords/validation.d.ts +21 -0
  60. package/dist/keywords/validation.d.ts.map +1 -0
  61. package/dist/keywords/validation.js +332 -0
  62. package/dist/keywords/validation.js.map +1 -0
  63. package/dist/keywords/vocab2019.d.ts +36 -0
  64. package/dist/keywords/vocab2019.d.ts.map +1 -0
  65. package/dist/keywords/vocab2019.js +585 -0
  66. package/dist/keywords/vocab2019.js.map +1 -0
  67. package/dist/keywords/vocab2020.d.ts +20 -0
  68. package/dist/keywords/vocab2020.d.ts.map +1 -0
  69. package/dist/keywords/vocab2020.js +55 -0
  70. package/dist/keywords/vocab2020.js.map +1 -0
  71. package/dist/keywords/vocab7.d.ts +46 -0
  72. package/dist/keywords/vocab7.d.ts.map +1 -0
  73. package/dist/keywords/vocab7.js +305 -0
  74. package/dist/keywords/vocab7.js.map +1 -0
  75. package/dist/loader.d.ts +41 -0
  76. package/dist/loader.d.ts.map +1 -0
  77. package/dist/loader.js +13 -0
  78. package/dist/loader.js.map +1 -0
  79. package/dist/lowering.d.ts +371 -0
  80. package/dist/lowering.d.ts.map +1 -0
  81. package/dist/lowering.js +59 -0
  82. package/dist/lowering.js.map +1 -0
  83. package/dist/output.d.ts +251 -0
  84. package/dist/output.d.ts.map +1 -0
  85. package/dist/output.js +357 -0
  86. package/dist/output.js.map +1 -0
  87. package/dist/records.d.ts +71 -0
  88. package/dist/records.d.ts.map +1 -0
  89. package/dist/records.js +150 -0
  90. package/dist/records.js.map +1 -0
  91. package/dist/ref.d.ts +10 -0
  92. package/dist/ref.d.ts.map +1 -0
  93. package/dist/ref.js +5 -0
  94. package/dist/ref.js.map +1 -0
  95. package/dist/regex.d.ts +45 -0
  96. package/dist/regex.d.ts.map +1 -0
  97. package/dist/regex.js +163 -0
  98. package/dist/regex.js.map +1 -0
  99. package/dist/registry.d.ts +141 -0
  100. package/dist/registry.d.ts.map +1 -0
  101. package/dist/registry.js +407 -0
  102. package/dist/registry.js.map +1 -0
  103. package/dist/result.d.ts +109 -0
  104. package/dist/result.d.ts.map +1 -0
  105. package/dist/result.js +112 -0
  106. package/dist/result.js.map +1 -0
  107. package/dist/uri.d.ts +18 -0
  108. package/dist/uri.d.ts.map +1 -0
  109. package/dist/uri.js +27 -0
  110. package/dist/uri.js.map +1 -0
  111. package/dist/walk.d.ts +25 -0
  112. package/dist/walk.d.ts.map +1 -0
  113. package/dist/walk.js +65 -0
  114. package/dist/walk.js.map +1 -0
  115. package/package.json +32 -0
  116. package/src/coverage.ts +88 -0
  117. package/src/cursor.ts +42 -0
  118. package/src/dialect.ts +428 -0
  119. package/src/engine.ts +741 -0
  120. package/src/index.ts +699 -0
  121. package/src/json.ts +137 -0
  122. package/src/keywords/applicator.ts +895 -0
  123. package/src/keywords/core.ts +168 -0
  124. package/src/keywords/format.ts +143 -0
  125. package/src/keywords/metaschemas2019.ts +410 -0
  126. package/src/keywords/metaschemas2020.ts +443 -0
  127. package/src/keywords/metaschemas6.ts +226 -0
  128. package/src/keywords/metaschemas7.ts +253 -0
  129. package/src/keywords/unevaluated.ts +329 -0
  130. package/src/keywords/validation.ts +627 -0
  131. package/src/keywords/vocab2019.ts +676 -0
  132. package/src/keywords/vocab2020.ts +82 -0
  133. package/src/keywords/vocab7.ts +393 -0
  134. package/src/loader.ts +60 -0
  135. package/src/lowering.ts +414 -0
  136. package/src/output.ts +651 -0
  137. package/src/records.ts +226 -0
  138. package/src/ref.ts +14 -0
  139. package/src/regex.ts +171 -0
  140. package/src/registry.ts +481 -0
  141. package/src/result.ts +252 -0
  142. package/src/uri.ts +35 -0
  143. package/src/walk.ts +88 -0
@@ -0,0 +1,251 @@
1
+ import { ErrorParams } from "./dialect.js";
2
+ import type { KeywordTrace, RecordPredicate } from "./engine.js";
3
+ import { SourceLocation } from "./loader.js";
4
+ /** One rendered assertion failure, native field names. */
5
+ export interface ErrorUnit {
6
+ evaluationPath: string;
7
+ schemaLocation: string;
8
+ inputLocation: string;
9
+ error: string;
10
+ /**
11
+ * Failing keyword name, present with the `errorParams` option; absent when
12
+ * the schema itself was boolean `false`.
13
+ */
14
+ keyword?: string;
15
+ /** The keyword's vocabulary URI, present with `errorParams` when known. */
16
+ vocabulary?: string;
17
+ /** Structured failure data (D13), present with `errorParams`. */
18
+ params?: ErrorParams;
19
+ /** Schema-side source position, present with the `positions` option (D17). */
20
+ source?: SourceLocation;
21
+ }
22
+ /** One rendered annotation, native field names. */
23
+ export interface AnnotationUnit {
24
+ keyword: string;
25
+ /** The keyword's vocabulary URI, when known. */
26
+ vocabulary?: string;
27
+ evaluationPath: string;
28
+ schemaLocation: string;
29
+ inputLocation: string;
30
+ annotation: unknown;
31
+ /** Schema-side source position, present with the `positions` option (D17). */
32
+ source?: SourceLocation;
33
+ }
34
+ /**
35
+ * Which annotations reach output (ADR 0003): a control independent of the
36
+ * output format and level. The allow-lists are OR-ed, the deny-lists
37
+ * subtract after them, and `keep` runs last on the rendered native unit —
38
+ * the very unit the flat surface then carries.
39
+ */
40
+ export interface AnnotationSelection {
41
+ /** allow-list of keyword names; an empty array selects nothing */
42
+ keywords?: readonly string[];
43
+ /** allow-list of vocabulary URIs (OR-ed with `keywords`) */
44
+ vocabularies?: readonly string[];
45
+ /** deny-list of keyword names, subtracted after the allow-lists */
46
+ excludeKeywords?: readonly string[];
47
+ /** deny-list of vocabulary URIs, subtracted after the allow-lists */
48
+ excludeVocabularies?: readonly string[];
49
+ /** arbitrary predicate over the rendered unit, AND-ed after the lists */
50
+ keep?: (unit: AnnotationUnit) => boolean;
51
+ }
52
+ /**
53
+ * Annotation recording decision (D5): record iff the selection might render
54
+ * the annotation — `false` records nothing, `true` everything, and a
55
+ * selection object's allow/deny lists rule keywords out. The `keep`
56
+ * predicate runs only at render: recording a superset of what it keeps is
57
+ * correct, eliding on its behalf would not be. This is also the list stage
58
+ * of the interpreter's render-time selection (records.ts), so the two can
59
+ * never disagree. It applies at every output level: a deselected keyword's
60
+ * annotation is never rendered, relevant or not.
61
+ */
62
+ export declare function makeRecordPredicate(selection: boolean | AnnotationSelection): RecordPredicate;
63
+ /**
64
+ * One schema application in a located evaluation tree: what the document
65
+ * renderers need from any producer, the interpreter's trace or a compiled
66
+ * artifact. Locations are absolute strings; records are indexes into the
67
+ * owning {@link RenderInput}'s flat arrays.
68
+ *
69
+ * Producers keep three invariants: a child's `evaluationPath` equals or
70
+ * extends its parent's; a unit indexed at a node has the node's
71
+ * `evaluationPath` (a boolean `false` schema) or extends it by exactly one
72
+ * escaped segment, the keyword; `keywords` lists the node's non-structural
73
+ * keyword evaluations in evaluation order.
74
+ */
75
+ export interface RenderNode {
76
+ /** Escaped JSON Pointer of the evaluation path; `""` at the root. */
77
+ readonly evaluationPath: string;
78
+ /** Canonical schema location of the applied subschema: `baseUri#pointer`. */
79
+ readonly schemaLocation: string;
80
+ /** JSON Pointer of the input position this application evaluated. */
81
+ readonly inputLocation: string;
82
+ readonly valid: boolean;
83
+ readonly keywords: readonly KeywordTrace[];
84
+ /** Indexes into {@link RenderInput.errors} of the errors raised here. */
85
+ readonly errors: readonly number[];
86
+ /** Indexes into {@link RenderInput.droppedErrors}. */
87
+ readonly droppedErrors: readonly number[];
88
+ /** Indexes into {@link RenderInput.annotations}. */
89
+ readonly annotations: readonly number[];
90
+ /** Indexes into {@link RenderInput.droppedAnnotations}. */
91
+ readonly droppedAnnotations: readonly number[];
92
+ /** Nested applications, in evaluation order. */
93
+ readonly children: readonly RenderNode[];
94
+ }
95
+ /**
96
+ * The flat surface plus its located tree: the input of every document
97
+ * renderer. `droppedErrors` and `droppedAnnotations` are empty unless the
98
+ * producer retained irrelevant records (verbose demand); relevant-level
99
+ * renderings never read them.
100
+ */
101
+ export interface RenderInput {
102
+ /** relevant errors, encounter order (`Result.errors`) */
103
+ readonly errors: readonly ErrorUnit[];
104
+ /** errors of rejecting sub-evaluations under an accepting keyword */
105
+ readonly droppedErrors: readonly ErrorUnit[];
106
+ /** relevant annotations, already selected (`Result.annotations`) */
107
+ readonly annotations: readonly AnnotationUnit[];
108
+ /** irrelevant annotations, already selected */
109
+ readonly droppedAnnotations: readonly AnnotationUnit[];
110
+ readonly root: RenderNode;
111
+ }
112
+ /** The index list of a node without records, shared rather than allocated. */
113
+ export declare const NO_INDEXES: readonly number[];
114
+ /**
115
+ * Output unit of the machines-oriented proposal (`list`, `hierarchical`):
116
+ * errors and annotations keyed by keyword name, nested results under
117
+ * `details`. At the verbose level `droppedErrors`/`droppedAnnotations` mark
118
+ * irrelevant records (draft-03 §12.2): the proposal defines
119
+ * `droppedAnnotations` for a failed unit's own annotations, and the verbose
120
+ * level extends the marker to every irrelevant record.
121
+ */
122
+ export interface OutputUnit {
123
+ valid: boolean;
124
+ evaluationPath: string;
125
+ schemaLocation: string;
126
+ instanceLocation: string;
127
+ errors?: Record<string, string>;
128
+ annotations?: Record<string, unknown>;
129
+ droppedErrors?: Record<string, string>;
130
+ droppedAnnotations?: Record<string, unknown>;
131
+ details?: OutputUnit[];
132
+ }
133
+ /** The `list` document: a root unit carrying `valid` and the flat `details` list. */
134
+ export interface ListOutputDocument {
135
+ valid: boolean;
136
+ details: OutputUnit[];
137
+ }
138
+ /**
139
+ * How a `list`/`hierarchical` renderer treats irrelevant records: "omit"
140
+ * drops them and prunes the units left empty (the relevant level); "mark"
141
+ * keeps every unit and renders them under `droppedErrors`/
142
+ * `droppedAnnotations` (the verbose level).
143
+ */
144
+ export type IrrelevantRendering = "omit" | "mark";
145
+ /**
146
+ * HIERARCHICAL structure over the located tree. Units carry errors and
147
+ * annotations keyed by keyword name. Irrelevant records render per
148
+ * {@link IrrelevantRendering}; the root unit always remains.
149
+ */
150
+ export declare function renderHierarchical(input: RenderInput, irrelevant: IrrelevantRendering): OutputUnit;
151
+ /**
152
+ * LIST structure over the located tree: the same per-application units as
153
+ * HIERARCHICAL, flattened under a root unit that carries only `valid` and
154
+ * `details`. At the relevant level only units that report an error or an
155
+ * annotation appear (the proposal's SHOULD); the verbose level includes
156
+ * every unit.
157
+ */
158
+ export declare function renderList(input: RenderInput, irrelevant: IrrelevantRendering): ListOutputDocument;
159
+ /**
160
+ * Output unit of IETF draft-03 §13.3 for the `detailed` and `verbose`
161
+ * structures: one node per keyword evaluation or schema application, with a
162
+ * local `error`/`annotation` and nested results under `errors` (failed
163
+ * node) or `annotations` (successful node).
164
+ */
165
+ export interface DetailedOutputUnit {
166
+ valid: boolean;
167
+ keywordLocation: string;
168
+ absoluteKeywordLocation: string;
169
+ instanceLocation: string;
170
+ error?: string;
171
+ annotation?: unknown;
172
+ errors?: DetailedOutputUnit[];
173
+ annotations?: DetailedOutputUnit[];
174
+ }
175
+ /** Detailed output document (IETF draft-03 §13.4.3): the condensed keyword-level tree of relevant results. */
176
+ export declare function renderDetailed(input: RenderInput): DetailedOutputUnit;
177
+ /** Verbose output document (IETF draft-03 §13.4.4): the full keyword-level tree, irrelevant results included. */
178
+ export declare function renderVerbose(input: RenderInput): DetailedOutputUnit;
179
+ /**
180
+ * One schema application from a traced evaluation.
181
+ *
182
+ * The tree mirrors the evaluation exactly, including applications inside
183
+ * subtrees that ultimately passed — adapters need those to reconstruct
184
+ * application context (e.g. which `anyOf` branches an error competed
185
+ * against) without parsing location strings.
186
+ */
187
+ export interface TraceUnit {
188
+ /**
189
+ * Evaluation-path segments from the parent application, decoded (no JSON
190
+ * Pointer escaping). The first segment is the applying keyword
191
+ * (`"anyOf"`, `"properties"`, `"$ref"`, ...); any following segments are
192
+ * branch indexes or property/definition names. Empty at the root.
193
+ */
194
+ readonly segments: readonly string[];
195
+ /** Canonical schema location of the applied subschema: `baseUri#pointer`. */
196
+ readonly schemaLocation: string;
197
+ /** JSON Pointer of the input position this application evaluated. */
198
+ readonly inputLocation: string;
199
+ readonly valid: boolean;
200
+ /**
201
+ * Indices into `Result.errors` (same run) of the relevant errors raised
202
+ * directly at this application; a rejecting application under an
203
+ * accepting keyword has none (draft-03 §12.2). Populated only when the
204
+ * evaluation failed — `Result.errors` does not exist for a valid result.
205
+ */
206
+ readonly errorIndexes: readonly number[];
207
+ /** Nested applications, in evaluation order. */
208
+ readonly children: readonly TraceUnit[];
209
+ }
210
+ /**
211
+ * Renders the located tree into the public trace. Error correlation is
212
+ * positional: a node's `errors` indexes are its `errorIndexes`, and the
213
+ * public tree carries decoded segments so consumers never touch pointer
214
+ * escaping.
215
+ */
216
+ export declare function renderTrace(root: RenderNode): TraceUnit;
217
+ /** One error of the Basic document (IETF draft-03 §13.4.2). */
218
+ export interface BasicErrorUnit {
219
+ keywordLocation: string;
220
+ absoluteKeywordLocation: string;
221
+ instanceLocation: string;
222
+ error: string;
223
+ }
224
+ /** One annotation of the Basic document (IETF draft-03 §13.4.2). */
225
+ export interface BasicAnnotationUnit {
226
+ keywordLocation: string;
227
+ absoluteKeywordLocation: string;
228
+ instanceLocation: string;
229
+ annotation: unknown;
230
+ }
231
+ /**
232
+ * Basic output document (IETF draft-03 §13.4.2): a root unit with a flat
233
+ * `errors` array on failure or `annotations` array on success, one unit per
234
+ * record, each located at its keyword.
235
+ */
236
+ export interface BasicOutputDocument {
237
+ valid: boolean;
238
+ keywordLocation: string;
239
+ absoluteKeywordLocation: string;
240
+ instanceLocation: string;
241
+ errors?: BasicErrorUnit[];
242
+ annotations?: BasicAnnotationUnit[];
243
+ }
244
+ /**
245
+ * Basic output document from the flat surface: `rootLocation` is the root
246
+ * schema's canonical location, `errors` and `annotations` the relevant,
247
+ * already selected units. Per the suite's output-tests basic fixtures,
248
+ * `errors` is absent on success; `annotations` appears only when non-empty.
249
+ */
250
+ export declare function renderBasic(valid: boolean, rootLocation: string, errors: readonly ErrorUnit[], annotations: readonly AnnotationUnit[]): BasicOutputDocument;
251
+ //# sourceMappingURL=output.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"output.d.ts","sourceRoot":"","sources":["../src/output.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE7C,0DAA0D;AAC1D,MAAM,WAAW,SAAS;IACxB,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,2EAA2E;IAC3E,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,iEAAiE;IACjE,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,8EAA8E;IAC9E,MAAM,CAAC,EAAE,cAAc,CAAC;CACzB;AAED,mDAAmD;AACnD,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,gDAAgD;IAChD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,OAAO,CAAC;IACpB,8EAA8E;IAC9E,MAAM,CAAC,EAAE,cAAc,CAAC;CACzB;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mBAAmB;IAClC,eAAe,EAAE,MAAM,CAAC;IACxB,uBAAuB,EAAE,MAAM,CAAC;IAChC,gBAAgB,EAAE,MAAM,CAAC;IACzB,UAAU,EAAE,OAAO,CAAC;CACrB;AAED;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,OAAO,CAAC;IACf,eAAe,EAAE,MAAM,CAAC;IACxB,uBAAuB,EAAE,MAAM,CAAC;IAChC,gBAAgB,EAAE,MAAM,CAAC;IACzB,MAAM,CAAC,EAAE,cAAc,EAAE,CAAC;IAC1B,WAAW,CAAC,EAAE,mBAAmB,EAAE,CAAC;CACrC;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CACzB,KAAK,EAAE,OAAO,EACd,YAAY,EAAE,MAAM,EACpB,MAAM,EAAE,SAAS,SAAS,EAAE,EAC5B,WAAW,EAAE,SAAS,cAAc,EAAE,GACrC,mBAAmB,CAyBrB"}
package/dist/output.js ADDED
@@ -0,0 +1,357 @@
1
+ // Output rendering (DESIGN.md D6; ADR 0003): the flat surface — units with
2
+ // the engine's native field names (evaluationPath, schemaLocation,
3
+ // inputLocation) — plus a located tree of schema applications, rendered by
4
+ // format name into each documented structure: IETF draft-03 §13 for
5
+ // basic/detailed/verbose, the machines-oriented output proposal for
6
+ // list/hierarchical. Everything here consumes strings and indexes, never
7
+ // engine records, so any producer of a RenderInput — the interpreter's
8
+ // trace (records.ts) or a compiled artifact — renders through one code path.
9
+ import { escapeSegment, unescapeSegment } from "./json.js";
10
+ // Selection applies to annotation records only (§4 rule 5); dependency
11
+ // records live in a separate store, so no selection can hide one from
12
+ // ctx.visible().
13
+ /**
14
+ * Annotation recording decision (D5): record iff the selection might render
15
+ * the annotation — `false` records nothing, `true` everything, and a
16
+ * selection object's allow/deny lists rule keywords out. The `keep`
17
+ * predicate runs only at render: recording a superset of what it keeps is
18
+ * correct, eliding on its behalf would not be. This is also the list stage
19
+ * of the interpreter's render-time selection (records.ts), so the two can
20
+ * never disagree. It applies at every output level: a deselected keyword's
21
+ * annotation is never rendered, relevant or not.
22
+ */
23
+ export function makeRecordPredicate(selection) {
24
+ if (selection === false)
25
+ return () => false;
26
+ if (selection === true)
27
+ return () => true;
28
+ const allow = selection.keywords !== undefined || selection.vocabularies !== undefined
29
+ ? {
30
+ names: new Set(selection.keywords ?? []),
31
+ vocabs: new Set(selection.vocabularies ?? []),
32
+ }
33
+ : null;
34
+ const denyNames = new Set(selection.excludeKeywords ?? []);
35
+ const denyVocabs = new Set(selection.excludeVocabularies ?? []);
36
+ return (_behaviorId, keywordName, vocabularyUri) => {
37
+ if (allow !== null &&
38
+ !allow.names.has(keywordName) &&
39
+ !(vocabularyUri !== null && allow.vocabs.has(vocabularyUri))) {
40
+ return false;
41
+ }
42
+ return (!denyNames.has(keywordName) &&
43
+ !(vocabularyUri !== null && denyVocabs.has(vocabularyUri)));
44
+ };
45
+ }
46
+ /** The index list of a node without records, shared rather than allocated. */
47
+ export const NO_INDEXES = [];
48
+ // A unit at a node carries the node's path plus at most one keyword segment
49
+ // (RenderNode's invariant); the keyword name is that segment, decoded, and a
50
+ // boolean-`false` schema's error, located at the node itself, keys as "".
51
+ const keywordOf = (unit, node) => {
52
+ const rest = unit.evaluationPath.slice(node.evaluationPath.length);
53
+ return rest === "" ? "" : unescapeSegment(rest.slice(1));
54
+ };
55
+ // The evaluation-path segments of `child` below `parentPath`, decoded.
56
+ const segmentsBelow = (child, parentPath) => {
57
+ const rest = child.evaluationPath.slice(parentPath.length);
58
+ return rest === "" ? [] : rest.slice(1).split("/").map(unescapeSegment);
59
+ };
60
+ // The first of those segments, the applying keyword, without building the
61
+ // list: the draft-03 walk asks this once per child application.
62
+ const firstSegmentBelow = (child, parentPath) => {
63
+ const path = child.evaluationPath;
64
+ if (path.length === parentPath.length)
65
+ return null;
66
+ const end = path.indexOf("/", parentPath.length + 1);
67
+ return unescapeSegment(path.slice(parentPath.length + 1, end === -1 ? undefined : end));
68
+ };
69
+ // Documents project unit fields into fresh objects and never embed a unit:
70
+ // the flat units are decorated (`positions`) after every document is built,
71
+ // and their `errorParams` fields belong to the flat surface only. Most
72
+ // nodes carry no records, so an empty pick allocates nothing.
73
+ const NO_UNITS = [];
74
+ const pick = (indexes, units) => indexes.length === 0 ? NO_UNITS : indexes.map((i) => units[i]);
75
+ // Relevant records followed by dropped ones; a node's records are uniformly
76
+ // one or the other, so the concatenation is reached only by a custom
77
+ // keyword sharing its parent's node.
78
+ const withDropped = (relevant, dropped) => relevant.length === 0
79
+ ? dropped
80
+ : dropped.length === 0
81
+ ? relevant
82
+ : [...relevant, ...dropped];
83
+ // A keyword may report several errors (required's missing names); a
84
+ // one-message-per-keyword field joins them.
85
+ const joinMessages = (errs) => errs.map((e) => e.error).join("; ");
86
+ // The by-keyword records are keyed by names the schema chooses, and the
87
+ // documents stay ordinary objects (consumers compare them as plain JSON),
88
+ // so the one name an ordinary object already answers to — "__proto__",
89
+ // an accessor on Object.prototype — has to be defined as an own property:
90
+ // assigned, a primitive would be discarded and an object would replace the
91
+ // record's prototype with schema-derived data.
92
+ function setKeyed(record, key, value) {
93
+ if (key === "__proto__") {
94
+ Object.defineProperty(record, key, {
95
+ value,
96
+ enumerable: true,
97
+ writable: true,
98
+ configurable: true,
99
+ });
100
+ }
101
+ else {
102
+ record[key] = value;
103
+ }
104
+ }
105
+ function errorsByKeyword(errs, node) {
106
+ const byKeyword = {};
107
+ for (const e of errs) {
108
+ const key = keywordOf(e, node);
109
+ const prior = Object.hasOwn(byKeyword, key) ? byKeyword[key] : undefined;
110
+ setKeyed(byKeyword, key, prior === undefined ? e.error : `${prior}; ${e.error}`);
111
+ }
112
+ return byKeyword;
113
+ }
114
+ function annotationsByKeyword(anns) {
115
+ const byKeyword = {};
116
+ for (const a of anns)
117
+ setKeyed(byKeyword, a.keyword, a.annotation);
118
+ return byKeyword;
119
+ }
120
+ /**
121
+ * HIERARCHICAL structure over the located tree. Units carry errors and
122
+ * annotations keyed by keyword name. Irrelevant records render per
123
+ * {@link IrrelevantRendering}; the root unit always remains.
124
+ */
125
+ export function renderHierarchical(input, irrelevant) {
126
+ const unitOf = (node) => ({
127
+ valid: node.valid,
128
+ evaluationPath: node.evaluationPath,
129
+ schemaLocation: node.schemaLocation,
130
+ instanceLocation: node.inputLocation,
131
+ });
132
+ const toUnit = (node) => {
133
+ const details = node.children
134
+ .map(toUnit)
135
+ .filter((u) => u !== undefined);
136
+ const unit = unitOf(node);
137
+ const errs = pick(node.errors, input.errors);
138
+ if (errs.length > 0)
139
+ unit.errors = errorsByKeyword(errs, node);
140
+ if (irrelevant === "mark") {
141
+ const dropped = pick(node.droppedErrors, input.droppedErrors);
142
+ if (dropped.length > 0)
143
+ unit.droppedErrors = errorsByKeyword(dropped, node);
144
+ }
145
+ const anns = pick(node.annotations, input.annotations);
146
+ if (anns.length > 0)
147
+ unit.annotations = annotationsByKeyword(anns);
148
+ if (irrelevant === "mark") {
149
+ const dropped = pick(node.droppedAnnotations, input.droppedAnnotations);
150
+ if (dropped.length > 0) {
151
+ unit.droppedAnnotations = annotationsByKeyword(dropped);
152
+ }
153
+ }
154
+ if (details.length > 0)
155
+ unit.details = details;
156
+ // Relevant level (§13.4): a unit carrying nothing relevant is omitted.
157
+ if (irrelevant === "omit" &&
158
+ unit.errors === undefined &&
159
+ unit.annotations === undefined &&
160
+ unit.details === undefined) {
161
+ return undefined;
162
+ }
163
+ return unit;
164
+ };
165
+ return toUnit(input.root) ?? unitOf(input.root);
166
+ }
167
+ /**
168
+ * LIST structure over the located tree: the same per-application units as
169
+ * HIERARCHICAL, flattened under a root unit that carries only `valid` and
170
+ * `details`. At the relevant level only units that report an error or an
171
+ * annotation appear (the proposal's SHOULD); the verbose level includes
172
+ * every unit.
173
+ */
174
+ export function renderList(input, irrelevant) {
175
+ const nested = renderHierarchical(input, irrelevant);
176
+ const details = [];
177
+ const collect = (unit) => {
178
+ const { details: children, ...rest } = unit;
179
+ if (irrelevant === "mark" ||
180
+ rest.errors !== undefined ||
181
+ rest.annotations !== undefined) {
182
+ details.push(rest);
183
+ }
184
+ children?.forEach(collect);
185
+ };
186
+ collect(nested);
187
+ return { valid: input.root.valid, details };
188
+ }
189
+ function attachNested(unit, nested) {
190
+ if (nested.length === 0)
191
+ return;
192
+ // §13.3.5: nested results key on the node's own result.
193
+ if (unit.valid)
194
+ unit.annotations = [...nested];
195
+ else
196
+ unit.errors = [...nested];
197
+ }
198
+ const nestedOf = (unit) => unit.errors ?? unit.annotations ?? [];
199
+ /**
200
+ * The draft-03 keyword-level tree (§13.4.3–13.4.4). Every schema application
201
+ * becomes a node whose children are one node per keyword evaluation, in
202
+ * evaluation order; each keyword node carries the keyword's own error or
203
+ * annotation and the applications it performed. At the relevant level only
204
+ * relevant records appear; the verbose level includes every record and
205
+ * relies on `valid` per node as the relevance marker.
206
+ */
207
+ function buildDraft03Tree(input, level) {
208
+ const build = (node) => {
209
+ const { evaluationPath: keywordLocation, schemaLocation: absoluteKeywordLocation, inputLocation: instanceLocation, } = node;
210
+ const unit = {
211
+ valid: node.valid,
212
+ keywordLocation,
213
+ absoluteKeywordLocation,
214
+ instanceLocation,
215
+ };
216
+ const errs = level === "verbose"
217
+ ? withDropped(pick(node.errors, input.errors), pick(node.droppedErrors, input.droppedErrors))
218
+ : pick(node.errors, input.errors);
219
+ const anns = level === "verbose"
220
+ ? withDropped(pick(node.annotations, input.annotations), pick(node.droppedAnnotations, input.droppedAnnotations))
221
+ : pick(node.annotations, input.annotations);
222
+ // A boolean `false` schema's error belongs to the application itself.
223
+ const own = errs.filter((e) => e.evaluationPath === keywordLocation);
224
+ if (own.length > 0)
225
+ unit.error = joinMessages(own);
226
+ // The first evaluation-path segment of a child application below its
227
+ // parent names the applying keyword.
228
+ const childrenOf = new Map();
229
+ for (const child of node.children) {
230
+ const key = firstSegmentBelow(child, keywordLocation);
231
+ const list = childrenOf.get(key);
232
+ if (list)
233
+ list.push(child);
234
+ else
235
+ childrenOf.set(key, [child]);
236
+ }
237
+ const nested = [];
238
+ for (const k of node.keywords) {
239
+ const suffix = "/" + escapeSegment(k.name);
240
+ const kwLocation = keywordLocation + suffix;
241
+ const kwUnit = {
242
+ valid: k.valid,
243
+ keywordLocation: kwLocation,
244
+ absoluteKeywordLocation: absoluteKeywordLocation + suffix,
245
+ instanceLocation,
246
+ };
247
+ const kwErrs = errs.filter((e) => e.evaluationPath === kwLocation);
248
+ if (kwErrs.length > 0)
249
+ kwUnit.error = joinMessages(kwErrs);
250
+ const kwAnn = anns.find((a) => a.keyword === k.name);
251
+ if (kwAnn !== undefined)
252
+ kwUnit.annotation = kwAnn.annotation;
253
+ const applied = childrenOf.get(k.name);
254
+ if (applied !== undefined) {
255
+ childrenOf.delete(k.name);
256
+ attachNested(kwUnit, applied.map(build));
257
+ }
258
+ nested.push(kwUnit);
259
+ }
260
+ // Applications not attributable to a keyword entry (a custom keyword
261
+ // applying with no segment of its own) stay under the application node,
262
+ // appended one by one: a stray list holds one entry per application, and
263
+ // an argument spread over it has a native-stack ceiling.
264
+ for (const stray of childrenOf.values()) {
265
+ for (const child of stray)
266
+ nested.push(build(child));
267
+ }
268
+ attachNested(unit, nested);
269
+ return unit;
270
+ };
271
+ return build(input.root);
272
+ }
273
+ // Detailed condensation (§13.4.3): nodes with no children are removed, nodes
274
+ // with a single child are replaced by the child; the root always remains.
275
+ function condense(unit, isRoot) {
276
+ const nested = nestedOf(unit)
277
+ .map((n) => condense(n, false))
278
+ .filter((n) => n !== undefined);
279
+ const local = unit.error !== undefined || unit.annotation !== undefined;
280
+ if (!local && !isRoot) {
281
+ if (nested.length === 0)
282
+ return undefined;
283
+ if (nested.length === 1)
284
+ return nested[0];
285
+ }
286
+ const out = {
287
+ valid: unit.valid,
288
+ keywordLocation: unit.keywordLocation,
289
+ absoluteKeywordLocation: unit.absoluteKeywordLocation,
290
+ instanceLocation: unit.instanceLocation,
291
+ };
292
+ if (unit.error !== undefined)
293
+ out.error = unit.error;
294
+ if (unit.annotation !== undefined)
295
+ out.annotation = unit.annotation;
296
+ attachNested(out, nested);
297
+ return out;
298
+ }
299
+ /** Detailed output document (IETF draft-03 §13.4.3): the condensed keyword-level tree of relevant results. */
300
+ export function renderDetailed(input) {
301
+ return condense(buildDraft03Tree(input, "relevant"), true);
302
+ }
303
+ /** Verbose output document (IETF draft-03 §13.4.4): the full keyword-level tree, irrelevant results included. */
304
+ export function renderVerbose(input) {
305
+ return buildDraft03Tree(input, "verbose");
306
+ }
307
+ /**
308
+ * Renders the located tree into the public trace. Error correlation is
309
+ * positional: a node's `errors` indexes are its `errorIndexes`, and the
310
+ * public tree carries decoded segments so consumers never touch pointer
311
+ * escaping.
312
+ */
313
+ export function renderTrace(root) {
314
+ const toUnit = (node, parentPath) => ({
315
+ segments: segmentsBelow(node, parentPath),
316
+ schemaLocation: node.schemaLocation,
317
+ inputLocation: node.inputLocation,
318
+ valid: node.valid,
319
+ errorIndexes: node.errors,
320
+ children: node.children.map((c) => toUnit(c, node.evaluationPath)),
321
+ });
322
+ return toUnit(root, "");
323
+ }
324
+ /**
325
+ * Basic output document from the flat surface: `rootLocation` is the root
326
+ * schema's canonical location, `errors` and `annotations` the relevant,
327
+ * already selected units. Per the suite's output-tests basic fixtures,
328
+ * `errors` is absent on success; `annotations` appears only when non-empty.
329
+ */
330
+ export function renderBasic(valid, rootLocation, errors, annotations) {
331
+ const doc = {
332
+ valid,
333
+ keywordLocation: "",
334
+ absoluteKeywordLocation: rootLocation,
335
+ instanceLocation: "",
336
+ };
337
+ if (valid) {
338
+ if (annotations.length > 0) {
339
+ doc.annotations = annotations.map((a) => ({
340
+ keywordLocation: a.evaluationPath,
341
+ absoluteKeywordLocation: a.schemaLocation,
342
+ instanceLocation: a.inputLocation,
343
+ annotation: a.annotation,
344
+ }));
345
+ }
346
+ }
347
+ else {
348
+ doc.errors = errors.map((e) => ({
349
+ keywordLocation: e.evaluationPath,
350
+ absoluteKeywordLocation: e.schemaLocation,
351
+ instanceLocation: e.inputLocation,
352
+ error: e.error,
353
+ }));
354
+ }
355
+ return doc;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