@agentshouse/mdmodel 0.1.0-alpha.8 → 0.1.0-c001b4068d4dc
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 +434 -0
- package/README.md +42 -183
- package/dist/body.d.ts +85 -0
- package/dist/body.d.ts.map +1 -0
- package/dist/body.js +1083 -0
- package/dist/built-in.d.ts +4 -0
- package/dist/built-in.d.ts.map +1 -0
- package/dist/built-in.js +19 -0
- package/dist/definition.d.ts +90 -31
- package/dist/definition.d.ts.map +1 -1
- package/dist/definition.js +859 -135
- package/dist/divide.d.ts +3 -0
- package/dist/divide.d.ts.map +1 -0
- package/dist/divide.js +321 -0
- package/dist/document.d.ts +19 -3
- package/dist/document.d.ts.map +1 -1
- package/dist/document.js +1033 -188
- package/dist/event.d.ts +77 -0
- package/dist/event.d.ts.map +1 -0
- package/dist/event.js +200 -0
- package/dist/facts.d.ts +15 -0
- package/dist/facts.d.ts.map +1 -0
- package/dist/facts.js +41 -0
- package/dist/fields.d.ts +6 -0
- package/dist/fields.d.ts.map +1 -0
- package/dist/fields.js +10 -0
- package/dist/form.d.ts +4 -0
- package/dist/form.d.ts.map +1 -0
- package/dist/form.js +153 -0
- package/dist/house-model.d.ts +870 -0
- package/dist/house-model.d.ts.map +1 -0
- package/dist/house-model.js +472 -0
- package/dist/house-references/crockford.d.ts +4 -0
- package/dist/house-references/crockford.d.ts.map +1 -0
- package/dist/house-references/crockford.js +3 -0
- package/dist/house-references/patterns.d.ts +9 -0
- package/dist/house-references/patterns.d.ts.map +1 -0
- package/dist/house-references/patterns.js +13 -0
- package/dist/index.d.ts +47 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +29 -5
- package/dist/indexed.d.ts +9 -0
- package/dist/indexed.d.ts.map +1 -0
- package/dist/indexed.js +55 -0
- package/dist/kinds.d.ts +21 -0
- package/dist/kinds.d.ts.map +1 -0
- package/dist/kinds.js +210 -0
- package/dist/markdown.d.ts +75 -0
- package/dist/markdown.d.ts.map +1 -0
- package/dist/markdown.js +265 -0
- package/dist/media-type.d.ts +72 -0
- package/dist/media-type.d.ts.map +1 -0
- package/dist/media-type.js +157 -0
- package/dist/moment.d.ts +7 -0
- package/dist/moment.d.ts.map +1 -0
- package/dist/moment.js +18 -0
- package/dist/not-ready.d.ts +2 -0
- package/dist/not-ready.d.ts.map +1 -0
- package/dist/not-ready.js +5 -0
- package/dist/paths.d.ts +30 -5
- package/dist/paths.d.ts.map +1 -1
- package/dist/paths.js +220 -35
- 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 +20 -1
- package/dist/project.d.ts.map +1 -1
- package/dist/project.js +83 -78
- package/dist/query/language.d.ts +255 -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 +158 -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/query/walk.d.ts +57 -0
- package/dist/query/walk.d.ts.map +1 -0
- package/dist/query/walk.js +183 -0
- package/dist/references.d.ts +4 -0
- package/dist/references.d.ts.map +1 -0
- package/dist/references.js +30 -0
- package/dist/refuse.d.ts +1 -0
- package/dist/refuse.d.ts.map +1 -1
- package/dist/refuse.js +3 -10
- package/dist/reserved.d.ts +6 -0
- package/dist/reserved.d.ts.map +1 -0
- package/dist/reserved.js +21 -0
- package/dist/room-types.d.ts +7 -0
- package/dist/room-types.d.ts.map +1 -0
- package/dist/room-types.js +136 -0
- package/dist/schema.d.ts +6 -5
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +143 -41
- package/dist/types.d.ts +101 -3
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +1 -3
- package/dist/validate.d.ts +37 -2
- package/dist/validate.d.ts.map +1 -1
- package/dist/validate.js +392 -153
- package/dist/version.d.ts +1 -1
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +1 -3
- package/dist/yaml.d.ts +9 -3
- package/dist/yaml.d.ts.map +1 -1
- package/dist/yaml.js +327 -202
- package/fixtures/README.md +136 -55
- package/fixtures/cases/absent-link-dangles/library/item.md +8 -0
- package/fixtures/cases/absent-link-dangles/schema.yaml +5 -0
- package/fixtures/cases/absent-optional-field/expected.json +1 -0
- package/fixtures/cases/absent-optional-field/library/companies/acme.md +4 -0
- package/fixtures/cases/absent-optional-field/library/deals/lead.md +6 -0
- package/fixtures/cases/absent-optional-field/schema.yaml +55 -0
- package/fixtures/cases/absolute-link/context.json +1 -0
- package/fixtures/cases/absolute-link/expected.json +5 -0
- package/fixtures/cases/absolute-link/library/item.md +8 -0
- package/fixtures/cases/absolute-link/schema.yaml +5 -0
- package/fixtures/cases/attachment-reference-any-file/context.json +1 -0
- package/fixtures/cases/attachment-reference-any-file/expected.json +1 -0
- package/fixtures/cases/attachment-reference-any-file/library/companies/acme.md +4 -0
- package/fixtures/cases/attachment-reference-any-file/library/deals/renewal.md +18 -0
- package/fixtures/cases/attachment-reference-any-file/library/places/depot.md +4 -0
- package/fixtures/cases/attachment-reference-any-file/library/products/seats.md +4 -0
- package/fixtures/cases/attachment-reference-any-file/library/products/support.md +4 -0
- package/fixtures/cases/attachment-reference-any-file/schema.yaml +32 -0
- package/fixtures/cases/attachment-reference-dangles/context.json +1 -0
- package/fixtures/cases/attachment-reference-dangles/expected.json +1 -0
- package/fixtures/cases/attachment-reference-dangles/library/companies/acme.md +4 -0
- package/fixtures/cases/attachment-reference-dangles/library/deals/renewal.md +18 -0
- package/fixtures/cases/attachment-reference-dangles/library/places/depot.md +4 -0
- package/fixtures/cases/attachment-reference-dangles/library/products/seats.md +4 -0
- package/fixtures/cases/attachment-reference-dangles/library/products/support.md +4 -0
- package/fixtures/cases/attachment-reference-dangles/schema.yaml +32 -0
- package/fixtures/cases/attachment-reference-outside/context.json +1 -0
- package/fixtures/cases/attachment-reference-outside/expected.json +7 -0
- package/fixtures/cases/attachment-reference-outside/library/companies/acme.md +4 -0
- package/fixtures/cases/attachment-reference-outside/library/deals/renewal.md +18 -0
- package/fixtures/cases/attachment-reference-outside/library/places/depot.md +4 -0
- package/fixtures/cases/attachment-reference-outside/library/products/seats.md +4 -0
- package/fixtures/cases/attachment-reference-outside/library/products/support.md +4 -0
- package/fixtures/cases/attachment-reference-outside/schema.yaml +32 -0
- package/fixtures/cases/binary-any-reference/expected.json +2 -2
- package/fixtures/cases/binary-any-reference/library/notes/draft.md +1 -1
- package/fixtures/cases/binary-any-reference/schema.yaml +4 -0
- package/fixtures/cases/binary-document-collision/expected.json +1 -2
- package/fixtures/cases/binary-document-collision/schema.yaml +1 -0
- package/fixtures/cases/binary-image-dangles/expected.json +1 -0
- package/fixtures/cases/binary-image-dangles/schema.yaml +1 -0
- package/fixtures/cases/binary-link-dangles/expected.json +1 -0
- package/fixtures/cases/binary-link-dangles/schema.yaml +1 -0
- package/fixtures/cases/binary-link-outside-collection/expected.json +1 -2
- package/fixtures/cases/binary-link-outside-collection/schema.yaml +1 -0
- package/fixtures/cases/binary-prototype-reference/expected.json +2 -2
- package/fixtures/cases/binary-prototype-reference/library/notes/draft.md +1 -1
- package/fixtures/cases/binary-prototype-reference/schema.yaml +4 -0
- package/fixtures/cases/binary-typed-reference/expected.json +2 -2
- package/fixtures/cases/binary-typed-reference/library/notes/draft.md +1 -1
- package/fixtures/cases/binary-typed-reference/schema.yaml +5 -0
- package/fixtures/cases/boolean-field/context.json +1 -0
- package/fixtures/cases/boolean-field/expected.json +7 -0
- package/fixtures/cases/boolean-field/library/companies/acme.md +4 -0
- package/fixtures/cases/boolean-field/library/deals/renewal.md +56 -0
- package/fixtures/cases/boolean-field/schema.yaml +55 -0
- package/fixtures/cases/bracketed-link-definition/library/item.md +1 -1
- package/fixtures/cases/bracketed-link-definition/schema.yaml +5 -0
- package/fixtures/cases/closed-nested-object/context.json +1 -0
- package/fixtures/cases/closed-nested-object/expected.json +7 -0
- package/fixtures/cases/closed-nested-object/library/companies/acme.md +4 -0
- package/fixtures/cases/closed-nested-object/library/deals/renewal.md +57 -0
- package/fixtures/cases/closed-nested-object/schema.yaml +55 -0
- package/fixtures/cases/composed-root-reference/context.json +1 -0
- package/fixtures/cases/composed-root-reference/expected.json +6 -0
- package/fixtures/cases/composed-root-reference/library/a.md +5 -0
- package/fixtures/cases/composed-root-reference/schema.yaml +13 -0
- package/fixtures/cases/conditional-long-text/context.json +1 -0
- package/fixtures/cases/conditional-long-text/expected.json +7 -0
- package/fixtures/cases/conditional-long-text/library/questions/hosting.md +9 -0
- package/fixtures/cases/conditional-long-text/library/questions/payments.md +12 -0
- package/fixtures/cases/conditional-long-text/schema.yaml +13 -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 +8 -0
- package/fixtures/cases/date-time-format/context.json +1 -0
- package/fixtures/cases/date-time-format/expected.json +7 -0
- package/fixtures/cases/date-time-format/library/companies/acme.md +4 -0
- package/fixtures/cases/date-time-format/library/deals/renewal.md +56 -0
- package/fixtures/cases/date-time-format/schema.yaml +55 -0
- package/fixtures/cases/declared-binary-links/schema.yaml +1 -0
- package/fixtures/cases/default-unfilled/context.json +1 -0
- package/fixtures/cases/default-unfilled/expected.json +6 -0
- package/fixtures/cases/default-unfilled/library/companies/acme.md +4 -0
- package/fixtures/cases/default-unfilled/library/deals/renewal.md +54 -0
- package/fixtures/cases/default-unfilled/schema.yaml +55 -0
- package/fixtures/cases/defs-pattern/context.json +1 -0
- package/fixtures/cases/defs-pattern/expected.json +7 -0
- package/fixtures/cases/defs-pattern/library/companies/acme.md +4 -0
- package/fixtures/cases/defs-pattern/library/deals/renewal.md +56 -0
- package/fixtures/cases/defs-pattern/schema.yaml +55 -0
- package/fixtures/cases/dependent-rule/context.json +1 -0
- package/fixtures/cases/dependent-rule/expected.json +6 -0
- package/fixtures/cases/dependent-rule/library/companies/acme.md +4 -0
- package/fixtures/cases/dependent-rule/library/deals/renewal.md +55 -0
- package/fixtures/cases/dependent-rule/schema.yaml +55 -0
- package/fixtures/cases/duplicate-link-definition/library/item.md +1 -1
- package/fixtures/cases/duplicate-link-definition/schema.yaml +5 -0
- package/fixtures/cases/email-format/context.json +1 -0
- package/fixtures/cases/email-format/expected.json +7 -0
- package/fixtures/cases/email-format/library/companies/acme.md +4 -0
- package/fixtures/cases/email-format/library/deals/renewal.md +56 -0
- package/fixtures/cases/email-format/schema.yaml +55 -0
- package/fixtures/cases/equal-labels/context.json +1 -0
- package/fixtures/cases/equal-labels/expected.json +5 -0
- package/fixtures/cases/equal-labels/schema.yaml +4 -0
- package/fixtures/cases/fenced-link-definition/library/item.md +1 -1
- package/fixtures/cases/fenced-link-definition/schema.yaml +5 -0
- package/fixtures/cases/field-enum/expected.json +3 -3
- package/fixtures/cases/field-enum/library/item.md +2 -2
- package/fixtures/cases/field-enum/schema.yaml +6 -0
- package/fixtures/cases/frontmatter-schema/context.json +1 -0
- package/fixtures/cases/frontmatter-schema/expected.json +5 -0
- package/fixtures/cases/frontmatter-schema/schema.yaml +5 -0
- package/fixtures/cases/integer-field/context.json +1 -0
- package/fixtures/cases/integer-field/expected.json +7 -0
- package/fixtures/cases/integer-field/library/companies/acme.md +4 -0
- package/fixtures/cases/integer-field/library/deals/renewal.md +56 -0
- package/fixtures/cases/integer-field/schema.yaml +55 -0
- package/fixtures/cases/interrupted-link-definition/schema.yaml +1 -0
- package/fixtures/cases/json-schema-constructs/context.json +1 -0
- package/fixtures/cases/json-schema-constructs/expected.json +1 -0
- package/fixtures/cases/json-schema-constructs/library/companies/acme.md +4 -0
- package/fixtures/cases/json-schema-constructs/library/deals/renewal.md +56 -0
- package/fixtures/cases/json-schema-constructs/schema.yaml +55 -0
- package/fixtures/cases/labels-in-the-rooms-language/context.json +1 -0
- package/fixtures/cases/labels-in-the-rooms-language/expected.json +1 -0
- package/fixtures/cases/labels-in-the-rooms-language/library/deals/atlas.md +7 -0
- package/fixtures/cases/labels-in-the-rooms-language/schema.yaml +9 -0
- package/fixtures/cases/lazy-list-item/context.json +1 -0
- package/fixtures/cases/lazy-list-item/expected.json +3 -0
- package/fixtures/cases/lazy-list-item/library/item.md +10 -0
- package/fixtures/cases/lazy-list-item/schema.yaml +3 -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/list-item-enum/context.json +1 -0
- package/fixtures/cases/list-item-enum/expected.json +7 -0
- package/fixtures/cases/list-item-enum/library/task.md +7 -0
- package/fixtures/cases/list-item-enum/schema.yaml +3 -0
- package/fixtures/cases/list-item-kind/context.json +1 -0
- package/fixtures/cases/list-item-kind/expected.json +7 -0
- package/fixtures/cases/list-item-kind/library/task.md +6 -0
- package/fixtures/cases/list-item-kind/schema.yaml +3 -0
- package/fixtures/cases/list-items/context.json +1 -0
- package/fixtures/cases/list-items/expected.json +1 -0
- package/fixtures/cases/list-items/library/other.md +3 -0
- package/fixtures/cases/list-items/library/page.md +26 -0
- package/fixtures/cases/list-items/schema.yaml +10 -0
- package/fixtures/cases/list-of-objects-closed/context.json +1 -0
- package/fixtures/cases/list-of-objects-closed/expected.json +7 -0
- package/fixtures/cases/list-of-objects-closed/library/companies/acme.md +4 -0
- package/fixtures/cases/list-of-objects-closed/library/deals/renewal.md +56 -0
- package/fixtures/cases/list-of-objects-closed/schema.yaml +55 -0
- package/fixtures/cases/list-of-objects-item/context.json +1 -0
- package/fixtures/cases/list-of-objects-item/expected.json +7 -0
- package/fixtures/cases/list-of-objects-item/library/companies/acme.md +4 -0
- package/fixtures/cases/list-of-objects-item/library/deals/renewal.md +56 -0
- package/fixtures/cases/list-of-objects-item/schema.yaml +55 -0
- package/fixtures/cases/list-of-objects-reference/context.json +1 -0
- package/fixtures/cases/list-of-objects-reference/expected.json +7 -0
- package/fixtures/cases/list-of-objects-reference/library/companies/acme.md +4 -0
- package/fixtures/cases/list-of-objects-reference/library/deals/renewal.md +17 -0
- package/fixtures/cases/list-of-objects-reference/library/places/depot.md +4 -0
- package/fixtures/cases/list-of-objects-reference/library/products/seats.md +4 -0
- package/fixtures/cases/list-of-objects-reference/library/products/support.md +4 -0
- package/fixtures/cases/list-of-objects-reference/schema.yaml +32 -0
- package/fixtures/cases/list-reference-path/context.json +1 -0
- package/fixtures/cases/list-reference-path/expected.json +7 -0
- package/fixtures/cases/list-reference-path/library/other.md +3 -0
- package/fixtures/cases/list-reference-path/library/page.md +5 -0
- package/fixtures/cases/list-reference-path/schema.yaml +3 -0
- package/fixtures/cases/list-reference-type/context.json +1 -0
- package/fixtures/cases/list-reference-type/expected.json +7 -0
- package/fixtures/cases/list-reference-type/library/note.md +1 -0
- package/fixtures/cases/list-reference-type/library/page.md +6 -0
- package/fixtures/cases/list-reference-type/schema.yaml +3 -0
- package/fixtures/cases/list-size/context.json +1 -0
- package/fixtures/cases/list-size/expected.json +7 -0
- package/fixtures/cases/list-size/library/companies/acme.md +4 -0
- package/fixtures/cases/list-size/library/deals/renewal.md +58 -0
- package/fixtures/cases/list-size/schema.yaml +55 -0
- package/fixtures/cases/long-fence-link-definition/schema.yaml +1 -0
- package/fixtures/cases/long-value-past-six-levels/context.json +1 -0
- package/fixtures/cases/long-value-past-six-levels/expected.json +5 -0
- package/fixtures/cases/long-value-past-six-levels/schema.yaml +15 -0
- package/fixtures/cases/malformed-definition/expected.json +2 -4
- package/fixtures/cases/malformed-definition/schema.yaml +3 -0
- package/fixtures/cases/malformed-list/context.json +1 -0
- package/fixtures/cases/malformed-list/expected.json +7 -0
- package/fixtures/cases/{structured-section → malformed-list}/library/item.md +1 -1
- package/fixtures/cases/malformed-list/schema.yaml +6 -0
- package/fixtures/cases/member-document/context.json +1 -0
- package/fixtures/cases/member-document/expected.json +1 -0
- package/fixtures/cases/member-document/library/people/ana.md +5 -0
- package/fixtures/cases/member-document/schema.yaml +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/missing-required-field/expected.json +2 -3
- package/fixtures/cases/missing-required-field/library/item.md +1 -1
- package/fixtures/cases/missing-required-field/schema.yaml +6 -0
- package/fixtures/cases/misspelled-key/context.json +1 -0
- package/fixtures/cases/misspelled-key/expected.json +7 -0
- package/fixtures/cases/misspelled-key/library/companies/acme.md +4 -0
- package/fixtures/cases/misspelled-key/library/deals/renewal.md +57 -0
- package/fixtures/cases/misspelled-key/schema.yaml +55 -0
- package/fixtures/cases/name-not-a-string/context.json +1 -0
- package/fixtures/cases/name-not-a-string/expected.json +5 -0
- package/fixtures/cases/name-not-a-string/schema.yaml +5 -0
- package/fixtures/cases/nested-defs/context.json +1 -0
- package/fixtures/cases/nested-defs/expected.json +7 -0
- package/fixtures/cases/nested-defs/library/deal.md +6 -0
- package/fixtures/cases/nested-defs/schema.yaml +11 -0
- package/fixtures/cases/nested-object-reference/context.json +1 -0
- package/fixtures/cases/nested-object-reference/expected.json +7 -0
- package/fixtures/cases/nested-object-reference/library/companies/acme.md +4 -0
- package/fixtures/cases/nested-object-reference/library/deals/renewal.md +17 -0
- package/fixtures/cases/nested-object-reference/library/places/depot.md +4 -0
- package/fixtures/cases/nested-object-reference/library/products/seats.md +4 -0
- package/fixtures/cases/nested-object-reference/library/products/support.md +4 -0
- package/fixtures/cases/nested-object-reference/schema.yaml +32 -0
- package/fixtures/cases/nested-reference/context.json +1 -0
- package/fixtures/cases/nested-reference/expected.json +1 -0
- package/fixtures/cases/nested-reference/library/companies/acme.md +4 -0
- package/fixtures/cases/nested-reference/library/deals/renewal.md +18 -0
- package/fixtures/cases/nested-reference/library/places/depot.md +4 -0
- package/fixtures/cases/nested-reference/library/products/seats.md +4 -0
- package/fixtures/cases/nested-reference/library/products/support.md +4 -0
- package/fixtures/cases/nested-reference/schema.yaml +32 -0
- package/fixtures/cases/nested-required-field/context.json +1 -0
- package/fixtures/cases/nested-required-field/expected.json +7 -0
- package/fixtures/cases/nested-required-field/library/companies/acme.md +4 -0
- package/fixtures/cases/nested-required-field/library/deals/renewal.md +55 -0
- package/fixtures/cases/nested-required-field/schema.yaml +55 -0
- package/fixtures/cases/numeric-range/context.json +1 -0
- package/fixtures/cases/numeric-range/expected.json +7 -0
- package/fixtures/cases/numeric-range/library/companies/acme.md +4 -0
- package/fixtures/cases/numeric-range/library/deals/renewal.md +56 -0
- package/fixtures/cases/numeric-range/schema.yaml +55 -0
- package/fixtures/cases/one-key-two-labels/context.json +1 -0
- package/fixtures/cases/one-key-two-labels/expected.json +5 -0
- package/fixtures/cases/one-key-two-labels/schema.yaml +5 -0
- package/fixtures/cases/one-key-two-types/context.json +1 -0
- package/fixtures/cases/one-key-two-types/expected.json +5 -0
- package/fixtures/cases/one-key-two-types/schema.yaml +4 -0
- package/fixtures/cases/one-of-variant/context.json +1 -0
- package/fixtures/cases/one-of-variant/expected.json +7 -0
- package/fixtures/cases/one-of-variant/library/companies/acme.md +4 -0
- package/fixtures/cases/one-of-variant/library/deals/renewal.md +56 -0
- package/fixtures/cases/one-of-variant/schema.yaml +55 -0
- package/fixtures/cases/other-room-reference/context.json +1 -0
- package/fixtures/cases/other-room-reference/expected.json +7 -0
- package/fixtures/cases/other-room-reference/library/companies/acme.md +4 -0
- package/fixtures/cases/other-room-reference/library/deals/renewal.md +17 -0
- package/fixtures/cases/other-room-reference/library/places/depot.md +4 -0
- package/fixtures/cases/other-room-reference/library/products/seats.md +4 -0
- package/fixtures/cases/other-room-reference/library/products/support.md +4 -0
- package/fixtures/cases/other-room-reference/schema.yaml +32 -0
- package/fixtures/cases/paragraph-link-definition/schema.yaml +1 -0
- package/fixtures/cases/prototype-field/context.json +1 -0
- package/fixtures/cases/prototype-field/expected.json +7 -0
- package/fixtures/cases/prototype-field/library/item.md +9 -0
- package/fixtures/cases/prototype-field/schema.yaml +5 -0
- package/fixtures/cases/quoted-link-definition/expected.json +1 -2
- package/fixtures/cases/quoted-link-definition/library/notes/draft.md +1 -1
- package/fixtures/cases/quoted-link-definition/schema.yaml +1 -0
- package/fixtures/cases/reference-into-a-reserved-name/context.json +1 -0
- package/fixtures/cases/reference-into-a-reserved-name/expected.json +7 -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/referenced-missing-file/expected.json +0 -1
- package/fixtures/cases/referenced-missing-file/library/a.md +2 -2
- package/fixtures/cases/referenced-missing-file/library/b.md +2 -2
- package/fixtures/cases/referenced-missing-file/schema.yaml +10 -0
- package/fixtures/cases/remote-ref/context.json +1 -0
- package/fixtures/cases/remote-ref/expected.json +5 -0
- package/fixtures/cases/remote-ref/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/second-member-document/context.json +1 -0
- package/fixtures/cases/second-member-document/expected.json +5 -0
- package/fixtures/cases/second-member-document/schema.yaml +4 -0
- package/fixtures/cases/sections-keyword-refused/context.json +1 -0
- package/fixtures/cases/sections-keyword-refused/expected.json +5 -0
- package/fixtures/cases/sections-keyword-refused/schema.yaml +6 -0
- package/fixtures/cases/shortcut-reference-link/context.json +1 -0
- package/fixtures/cases/shortcut-reference-link/expected.json +5 -0
- package/fixtures/cases/shortcut-reference-link/library/item.md +10 -0
- package/fixtures/cases/shortcut-reference-link/schema.yaml +5 -0
- package/fixtures/cases/string-length/context.json +1 -0
- package/fixtures/cases/string-length/expected.json +7 -0
- package/fixtures/cases/string-length/library/companies/acme.md +4 -0
- package/fixtures/cases/string-length/library/deals/renewal.md +56 -0
- package/fixtures/cases/string-length/schema.yaml +55 -0
- package/fixtures/cases/submission-keys/context.json +1 -0
- package/fixtures/cases/submission-keys/expected.json +1 -0
- package/fixtures/cases/submission-keys/library/notes/visitor.md +8 -0
- package/fixtures/cases/submission-keys/schema.yaml +4 -0
- package/fixtures/cases/text-field-kind/context.json +1 -0
- package/fixtures/cases/text-field-kind/expected.json +3 -0
- package/fixtures/cases/text-field-kind/library/page.md +4 -0
- package/fixtures/cases/text-field-kind/schema.yaml +4 -0
- package/fixtures/cases/thematic-break-ends-the-values/context.json +1 -0
- package/fixtures/cases/thematic-break-ends-the-values/expected.json +1 -0
- package/fixtures/cases/thematic-break-ends-the-values/library/item.md +10 -0
- package/fixtures/cases/thematic-break-ends-the-values/schema.yaml +3 -0
- package/fixtures/cases/truncated-link-definition/expected.json +1 -2
- package/fixtures/cases/truncated-link-definition/library/notes/draft.md +1 -1
- package/fixtures/cases/truncated-link-definition/schema.yaml +1 -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/types-folder-content/context.json +1 -0
- package/fixtures/cases/types-folder-content/expected.json +1 -0
- package/fixtures/cases/types-folder-content/library/types/task.md +4 -0
- package/fixtures/cases/types-folder-content/schema.yaml +4 -0
- package/fixtures/cases/unclosed-frontmatter/expected.json +1 -2
- package/fixtures/cases/undeclared-field/context.json +1 -0
- package/fixtures/cases/undeclared-field/expected.json +7 -0
- package/fixtures/cases/undeclared-field/library/item.md +9 -0
- package/fixtures/cases/undeclared-field/schema.yaml +5 -0
- package/fixtures/cases/unevaluated-items-closed/context.json +1 -0
- package/fixtures/cases/unevaluated-items-closed/expected.json +7 -0
- package/fixtures/cases/unevaluated-items-closed/library/trip.md +16 -0
- package/fixtures/cases/unevaluated-items-closed/schema.yaml +10 -0
- package/fixtures/cases/unknown-type/context.json +1 -0
- package/fixtures/cases/unknown-type/expected.json +6 -0
- package/fixtures/cases/unknown-type/library/item.md +3 -0
- package/fixtures/cases/unknown-type/schema.yaml +3 -0
- package/fixtures/cases/unlisted-reference-type/context.json +1 -0
- package/fixtures/cases/unlisted-reference-type/expected.json +5 -0
- package/fixtures/cases/unlisted-reference-type/schema.yaml +3 -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 +5 -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 +7 -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 +6 -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/cases/unresolved-link/expected.json +1 -2
- package/fixtures/cases/unresolved-link/library/item.md +2 -2
- package/fixtures/cases/unresolved-link/schema.yaml +5 -0
- package/fixtures/cases/valid-typed-document/library/people/ada.md +1 -1
- package/fixtures/cases/valid-typed-document/library/tasks/one.md +11 -10
- package/fixtures/cases/valid-typed-document/schema.yaml +15 -0
- package/fixtures/cases/wide-item-fence-link/schema.yaml +1 -0
- package/fixtures/division.json +454 -0
- package/fixtures/forms.json +347 -0
- package/fixtures/preamble.json +29 -8
- package/fixtures/projection.json +216 -32
- package/fixtures/queries.json +1359 -0
- package/package.json +20 -13
- package/dist/definition.js.map +0 -1
- package/dist/document.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/links.d.ts +0 -25
- package/dist/links.d.ts.map +0 -1
- package/dist/links.js +0 -380
- package/dist/links.js.map +0 -1
- package/dist/paths.js.map +0 -1
- package/dist/profile.d.ts +0 -6
- package/dist/profile.d.ts.map +0 -1
- package/dist/profile.js +0 -7
- package/dist/profile.js.map +0 -1
- package/dist/project.js.map +0 -1
- package/dist/refuse.js.map +0 -1
- package/dist/schema.js.map +0 -1
- package/dist/sections.d.ts +0 -10
- package/dist/sections.d.ts.map +0 -1
- package/dist/sections.js +0 -79
- package/dist/sections.js.map +0 -1
- package/dist/types.js.map +0 -1
- package/dist/validate.js.map +0 -1
- package/dist/version.js.map +0 -1
- package/dist/yaml.js.map +0 -1
- package/fixtures/cases/binary-any-reference/library/types/note.md +0 -5
- package/fixtures/cases/binary-document-collision/library/types/note.md +0 -3
- package/fixtures/cases/binary-link-outside-collection/library/types/note.md +0 -3
- package/fixtures/cases/binary-prototype-reference/library/types/note.md +0 -5
- package/fixtures/cases/binary-typed-reference/library/types/note.md +0 -5
- package/fixtures/cases/binary-typed-reference/library/types/person.md +0 -3
- package/fixtures/cases/bracketed-link-definition/library/types/task.md +0 -7
- package/fixtures/cases/declared-binary-links/library/types/note.md +0 -3
- package/fixtures/cases/duplicate-link-definition/library/types/task.md +0 -7
- package/fixtures/cases/fenced-link-definition/library/types/task.md +0 -7
- package/fixtures/cases/field-enum/library/types/task.md +0 -8
- package/fixtures/cases/interrupted-link-definition/library/types/note.md +0 -3
- package/fixtures/cases/long-fence-link-definition/library/types/note.md +0 -3
- package/fixtures/cases/malformed-definition/library/types/task.md +0 -5
- package/fixtures/cases/missing-binary-image/expected.json +0 -6
- package/fixtures/cases/missing-binary-image/library/types/note.md +0 -3
- package/fixtures/cases/missing-binary-link/expected.json +0 -6
- package/fixtures/cases/missing-binary-link/library/types/note.md +0 -3
- package/fixtures/cases/missing-required-field/library/types/task.md +0 -8
- package/fixtures/cases/paragraph-link-definition/library/types/note.md +0 -3
- package/fixtures/cases/prd-definition/library/types/task.md +0 -15
- package/fixtures/cases/quoted-link-definition/library/types/note.md +0 -3
- package/fixtures/cases/referenced-missing-file/library/types/person.md +0 -5
- package/fixtures/cases/referenced-missing-file/library/types/task.md +0 -8
- package/fixtures/cases/structured-section/expected.json +0 -7
- package/fixtures/cases/structured-section/library/types/task.md +0 -8
- package/fixtures/cases/truncated-link-definition/library/types/note.md +0 -3
- package/fixtures/cases/unresolved-link/library/types/task.md +0 -7
- package/fixtures/cases/valid-typed-document/library/types/person.md +0 -5
- package/fixtures/cases/valid-typed-document/library/types/task.md +0 -12
- package/fixtures/cases/wide-item-fence-link/library/types/note.md +0 -3
- package/markdown-syntax-profile.md +0 -9
- /package/fixtures/cases/{prd-definition → absent-link-dangles}/context.json +0 -0
- /package/fixtures/cases/{prd-definition → absent-link-dangles}/expected.json +0 -0
- /package/fixtures/cases/{structured-section → absent-optional-field}/context.json +0 -0
- /package/fixtures/cases/{missing-binary-image → binary-image-dangles}/context.json +0 -0
- /package/fixtures/cases/{missing-binary-image → binary-image-dangles}/library/notes/draft.md +0 -0
- /package/fixtures/cases/{missing-binary-link → binary-link-dangles}/context.json +0 -0
- /package/fixtures/cases/{missing-binary-link → binary-link-dangles}/library/notes/draft.md +0 -0
package/fixtures/README.md
CHANGED
|
@@ -2,10 +2,27 @@
|
|
|
2
2
|
|
|
3
3
|
Each directory under `cases/` is one text Library, one validation context,
|
|
4
4
|
and one expected verdict. Consumers load the files under `library/` as
|
|
5
|
-
path-to-content,
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
path-to-content, an absent `library/` being the empty Library, and the
|
|
6
|
+
required `context.json` as `ValidationContext`. Cases with a `schema.yaml` call
|
|
7
|
+
`verify` with its text, then compare its refusal or
|
|
8
|
+
`validate(library, context, verified.model)` against `expected.json`. Other
|
|
9
|
+
cases compare `validate(library, context)` directly. Text-only cases carry
|
|
10
|
+
`{ "binaryTargets": [] }`. Binary targets are membership declarations; the
|
|
11
|
+
corpus supplies no binary bytes or placeholder Documents.
|
|
12
|
+
|
|
13
|
+
## Forms
|
|
14
|
+
|
|
15
|
+
`forms.json` exercises how a typed Document writes its values in its body. It carries `schema`,
|
|
16
|
+
one schema text, `names`, the name each reference value's target shows, and three lists. Each of
|
|
17
|
+
`cases` carries `name`, the `type` its source declares, exact `source` and the `value` `parse`
|
|
18
|
+
reads with that type's definition, and optionally `ranges`, the exact source text of each listed
|
|
19
|
+
pointer's `Document.ranges` entry, `after`, the text `Document.listEnd` is followed by, the
|
|
20
|
+
`preamble`, `sections` and `text` it reads, `written: true` where `create(type)` with one `field`
|
|
21
|
+
change per value but `type` and a `text` change of the case's `text`, applied with the definition
|
|
22
|
+
and a `nameOf` reading `names`, serializes to `source` exactly, and `rendered`, each pointer's
|
|
23
|
+
exact text as GitHub Flavored Markdown renders it. Each of `refused` carries `name`, `type`,
|
|
24
|
+
`source` and the `refusal` `parse` answers, its `rule`, `location` and `line`. Each of `applied`
|
|
25
|
+
carries `name`, `type`, `source`, `changes` and the exact source `apply` writes.
|
|
9
26
|
|
|
10
27
|
## Preamble operations
|
|
11
28
|
|
|
@@ -15,29 +32,72 @@ the validation Libraries. Each row carries `name`, exact `source`, expected
|
|
|
15
32
|
the source, compare `Document.preamble`, apply
|
|
16
33
|
`{ kind: 'preamble', prior: preamble, value }`, and compare the serialized result.
|
|
17
34
|
These cases cover empty and heading-free Documents, frontmatter boundaries,
|
|
18
|
-
fenced headings
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
bundle, also checking stale priors, immutable Documents, and conversion of the
|
|
22
|
-
Runtime link rewrite into a preamble operation through public APIs.
|
|
35
|
+
fenced headings and a heading an HTML block holds, setext, indented and empty
|
|
36
|
+
headings that open a section, newline/source preservation, and a moved-export
|
|
37
|
+
link rewrite.
|
|
23
38
|
|
|
24
39
|
## Projection
|
|
25
40
|
|
|
26
41
|
`projection.json` exercises the public `project` seam separately from the
|
|
27
|
-
validation Libraries. It carries `
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
42
|
+
validation Libraries. It carries `schema`, one schema text, and `cases`. Each
|
|
43
|
+
case carries `name`, the `file` the Document sits at, exact `source`, the
|
|
44
|
+
`documentTargets` the collection holds as Markdown documents, the `definition`
|
|
45
|
+
type name or `null`, an optional `move`, an optional `links` inventory, an
|
|
46
|
+
optional `relabel`, an optional `filtered`, and `expected`.
|
|
31
47
|
A case carrying a `move` lists both the Path its target sits at and the Path the
|
|
32
48
|
move takes it to, because the collection holds that target either way.
|
|
33
49
|
|
|
34
|
-
|
|
35
|
-
`
|
|
36
|
-
|
|
50
|
+
Verify the schema, parse the source with the verified type `definition` names, call
|
|
51
|
+
`project(document, file, context)` with `documentTargets` and that definition, and compare against `expected`. Where
|
|
52
|
+
`links` is present, compare `links(document, file)` against it. Then check
|
|
37
53
|
that the source is unchanged. Where `move` is present, apply
|
|
38
54
|
`{ kind: 'link', href, to }`, confirm the serialized Document changed, and
|
|
39
55
|
confirm the projection of the moved Document is still exactly `expected`: a
|
|
40
|
-
moved Path rewrites destinations and leaves the projection alone.
|
|
56
|
+
moved Path rewrites destinations and leaves the projection alone. Where
|
|
57
|
+
`relabel` is present, split the source at its `from`, which the source carries
|
|
58
|
+
exactly once, join the pieces with its `to`, parse the result, and confirm its
|
|
59
|
+
projection is exactly the relabel's own `expected` and differs from the case's:
|
|
60
|
+
a changed visible label changes the projection. Where `filtered` is present,
|
|
61
|
+
apply `{ kind: 'field', name: field, value, prior }` with its `field` and
|
|
62
|
+
`value` and the Document's current value as `prior` with the definition, confirm the serialized
|
|
63
|
+
Document changed, and confirm its projection is still exactly `expected`: a
|
|
64
|
+
change to a value that is not prose leaves the projection alone.
|
|
65
|
+
|
|
66
|
+
## Division
|
|
67
|
+
|
|
68
|
+
`division.json` exercises the public `divide` seam separately from the
|
|
69
|
+
validation Libraries. It carries `schema` and `cases` like `projection.json`,
|
|
70
|
+
and each case adds the `bound` the division runs under. Parse the source, call
|
|
71
|
+
`divide(document, file, context)` with `{ documentTargets, definition, bound }`,
|
|
72
|
+
and compare against `expected`: either `{ "ok": true, "spans": [...] }`, where
|
|
73
|
+
each span carries the exact `text` to embed and the exact `source` the returned
|
|
74
|
+
`start` and `end` address in that case's source, or `{ "ok": false, "refusal": ... }`. Then
|
|
75
|
+
check that the source is unchanged. A span's `text` and `source` differ where
|
|
76
|
+
the embedded text repeats a continuation's own heading, carries an internal
|
|
77
|
+
link's visible label or carries a value without the escape the author wrote, and where the
|
|
78
|
+
addressed extent encloses a value list or a label between two pieces one span packs together. `start` and `end` are UTF-8 byte offsets into the case's
|
|
79
|
+
source; every source in this corpus is ASCII, so a consumer compares the
|
|
80
|
+
addressed `source` with an ordinary string slice.
|
|
81
|
+
|
|
82
|
+
## Queries
|
|
83
|
+
|
|
84
|
+
`queries.json` is the one table of cases both query evaluators answer. It carries `schema`,
|
|
85
|
+
one schema text; `documents`, each named and carrying its `path`, the `type` a collection
|
|
86
|
+
stores for it (`any` for an untyped Markdown Document, `null` for one that is not Markdown),
|
|
87
|
+
its `fileId`, the `text` the device holds or `null`, and its `fields`; and `cases`, each with a
|
|
88
|
+
`name`, a `query` of filter parts, the `document` it names and whether it `matches`. Verify
|
|
89
|
+
the schema and plan `{ ...query, select: {} }` with `planOf` against its types. Then
|
|
90
|
+
`matches(plan, candidate)` over the named Document, given its type's definition, and the
|
|
91
|
+
condition `sql.tests` writes over a collection holding every Document of the table with the
|
|
92
|
+
values `indexed` derives from it must both answer `matches`. A new operator adds its cases
|
|
93
|
+
here first. With `types: ["task"]`, every `task` Document both evaluators match lies within the
|
|
94
|
+
index plan `walkOf` takes for each case: among the keys of the equality or list it walks, and
|
|
95
|
+
within the runs of keys it walks an order by each indexed field in, a missing value's among
|
|
96
|
+
them, so a new driving test adds its cases here too. Each of `orders` carries a `name`, one `orderBy` clause on a field the `task` type
|
|
97
|
+
names `indexed` and the `order` of every `task` Document, ties by Path in code-point order in
|
|
98
|
+
either direction. The SQL order `sql.sorted` writes over that collection, `compared` over the
|
|
99
|
+
value `heldAt` reads, its instant for a date-time, and the bytes of each Document's `indexKey`,
|
|
100
|
+
a missing value and `null` placed as the clause's `nulls` asks, must each give that order.
|
|
41
101
|
|
|
42
102
|
## Verdict format
|
|
43
103
|
|
|
@@ -53,53 +113,74 @@ Refusal:
|
|
|
53
113
|
{
|
|
54
114
|
"verdict": "refuse",
|
|
55
115
|
"file": "<library path>",
|
|
56
|
-
"location": "<
|
|
116
|
+
"location": "<JSON Pointer>",
|
|
57
117
|
"rule": "<rule id>",
|
|
58
|
-
"
|
|
118
|
+
"line": 5,
|
|
59
119
|
"referrers": ["<library path>"]
|
|
60
120
|
}
|
|
61
121
|
```
|
|
62
122
|
|
|
63
|
-
`location` is
|
|
64
|
-
`
|
|
65
|
-
|
|
66
|
-
|
|
123
|
+
`location` is the JSON Pointer of the value a rule concerns, such as `/shipping/city`, and is
|
|
124
|
+
omitted when the rule concerns none. `line` is the line, from 1, of the Document's source the value
|
|
125
|
+
is written on, present when the value is written; a missing one has none. `referrers` is present only for
|
|
126
|
+
`referenced-missing-file`. A schema refusal carries no `file`; its `location`
|
|
127
|
+
is the JSON Pointer of the schema part it concerns, such as
|
|
128
|
+
`/task/properties/title/type`, or `line <n>` for `schema-yaml`.
|
|
67
129
|
|
|
68
130
|
## Rule ids
|
|
69
131
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
|
78
|
-
|
|
|
79
|
-
| `
|
|
80
|
-
| `
|
|
81
|
-
| `
|
|
82
|
-
| `
|
|
83
|
-
| `
|
|
84
|
-
| `
|
|
85
|
-
| `
|
|
86
|
-
| `
|
|
87
|
-
| `
|
|
88
|
-
| `
|
|
89
|
-
| `
|
|
90
|
-
| `
|
|
91
|
-
| `
|
|
92
|
-
| `
|
|
93
|
-
| `
|
|
94
|
-
| `
|
|
95
|
-
| `
|
|
96
|
-
|
|
97
|
-
`
|
|
98
|
-
`
|
|
132
|
+
A value that fails a JSON Schema keyword is refused under that
|
|
133
|
+
keyword's name, such as `required`, `type`, `enum`, `format`, `pattern`,
|
|
134
|
+
`minimum`, `maxLength`, `maxItems` or `oneOf`, at the value's JSON Pointer; a
|
|
135
|
+
missing required key is named by the Pointer it would sit at. A malformed
|
|
136
|
+
schema keyword is refused under that keyword's name at its Pointer in the
|
|
137
|
+
schema text. The model's own rules:
|
|
138
|
+
|
|
139
|
+
| Rule | When |
|
|
140
|
+
| ------------------------- | --------------------------------------------------------------------------------- |
|
|
141
|
+
| `binary-target-document` | A path is declared as both a text Document and a binary target |
|
|
142
|
+
| `frontmatter-fence` | A present frontmatter fence does not parse as the accepted YAML subset |
|
|
143
|
+
| `schema-yaml` | A schema text is not a mapping in the accepted YAML subset |
|
|
144
|
+
| `schema-type-name` | A type name is empty, starts with `$`, or is `any` or `attachment` |
|
|
145
|
+
| `provided-type` | A schema names a type its caller provides with a key but its two role keywords |
|
|
146
|
+
| `schema` | A type or subschema is neither a mapping nor a boolean |
|
|
147
|
+
| `schema-keyword` | A schema carries a key that is no JSON Schema 2020-12 keyword the model admits |
|
|
148
|
+
| `$defs` | `$defs` is not a mapping |
|
|
149
|
+
| `$ref` | A `$ref` reaches no subschema under `#/$defs/` of the same file |
|
|
150
|
+
| `reference` | `reference` is not on a string or names something but a type, `any`, `attachment` |
|
|
151
|
+
| `member_document` | The mark is not a boolean, or a second type carries it |
|
|
152
|
+
| `indexed` | `indexed` names a field a type cannot index, or more than its caller's bounds |
|
|
153
|
+
| `duplicate-label` | Two fields of one object show one label: a field's `title`, else its key |
|
|
154
|
+
| `conflicting-label` | Declarations of one key in `anyOf`, `oneOf`, `then`, `else` or a composed shape give it two `title`s |
|
|
155
|
+
| `conflicting-type` | Such declarations give one key two JSON types, integer and number counting as one |
|
|
156
|
+
| `name-type` | A type's top-level `name` is not a string |
|
|
157
|
+
| `heading-depth` | A value written under a heading sits past `######`: `##` at the top, a level deeper per property or list item, none inside a `json` block |
|
|
158
|
+
| `unknown-type` | A file declares a type absent from the governing schema, or other than its typed path requires it to name |
|
|
159
|
+
| `undeclared-field` | A closed object carries a key it does not declare |
|
|
160
|
+
| `malformed-value` | A value is not written in its form, or a typed Document's frontmatter holds a key that is not House's |
|
|
161
|
+
| `repeated-value` | A value is written twice: two lines, a line and a heading, or two headings |
|
|
162
|
+
| `unknown-label` | A line, heading or column of a closed object names no field |
|
|
163
|
+
| `unresolved-reference` | A reference at any depth reaches no member it admits |
|
|
164
|
+
| `unresolved-link` | A body link is an absolute path, leaves the collection or, from a typed Document at a document path, reaches a reserved name |
|
|
165
|
+
| `room-md-type` | `ROOM.md` declares a type |
|
|
166
|
+
| `required-body` | A file at a typed path that requires a body has a body holding no text |
|
|
167
|
+
| `referenced-missing-file` | Remaining files still reference an absent path |
|
|
168
|
+
| `unwritable-link` | No Markdown destination form can carry a new link destination |
|
|
169
|
+
| `required-section` | A section change names no free section of the Document |
|
|
170
|
+
| `division-bound` | A division bound is not a whole number of at least 2 |
|
|
171
|
+
|
|
172
|
+
`unwritable-link` and `required-section` are refused by `apply` and `division-bound` by
|
|
173
|
+
`divide`, not by `validate`, so no case under `cases/` carries them.
|
|
174
|
+
|
|
175
|
+
A reference that admits `attachment` reaches any path in the same Library, so
|
|
176
|
+
neither `unresolved-reference` for an absent target nor
|
|
177
|
+
`referenced-missing-file` ever names it. A body link to an absent path in the
|
|
178
|
+
Library is accepted too, so `unresolved-link` never names it and
|
|
179
|
+
`referenced-missing-file` never counts it.
|
|
99
180
|
|
|
100
181
|
## YAML subset
|
|
101
182
|
|
|
102
|
-
Frontmatter
|
|
103
|
-
block and flow sequences, plain and quoted scalars, `true`, `false`, `null`,
|
|
183
|
+
Frontmatter and a schema text are each a mapping in a closed YAML subset: block and flow mappings,
|
|
184
|
+
block and flow sequences, a block sequence item that opens a mapping, plain and quoted scalars (a single-quoted scalar doubles its apostrophe, a double-quoted one takes JSON's escapes), `true`, `false`, `null`,
|
|
104
185
|
and decimal numbers. It does not take YAML 1.1 boolean or timestamp aliases,
|
|
105
|
-
octal numbers, anchors, tags, or block scalars.
|
|
186
|
+
octal numbers, anchors, tags, or block scalars. A mapping carries each key once.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{ "verdict": "accept" }
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
$defs:
|
|
2
|
+
address:
|
|
3
|
+
type: object
|
|
4
|
+
properties:
|
|
5
|
+
city: { type: string }
|
|
6
|
+
country: { type: string, pattern: '^[A-Z]{2}$' }
|
|
7
|
+
required: [ city ]
|
|
8
|
+
company:
|
|
9
|
+
properties:
|
|
10
|
+
name: { type: string }
|
|
11
|
+
deal:
|
|
12
|
+
type: object
|
|
13
|
+
properties:
|
|
14
|
+
title: { type: string, minLength: 1, maxLength: 40 }
|
|
15
|
+
company: { type: string, reference: company }
|
|
16
|
+
stage: { enum: [ lead, proposal, won, lost ], default: lead }
|
|
17
|
+
amount: { type: integer, minimum: 0 }
|
|
18
|
+
probability: { type: number, minimum: 0, maximum: 1 }
|
|
19
|
+
open: { type: boolean }
|
|
20
|
+
closes_at: { type: string, format: date-time }
|
|
21
|
+
contact_email: { type: string, format: email }
|
|
22
|
+
note: { type: [ string, 'null' ] }
|
|
23
|
+
shipping: { $ref: '#/$defs/address' }
|
|
24
|
+
tags: { type: array, items: { type: string }, maxItems: 3 }
|
|
25
|
+
lines:
|
|
26
|
+
type: array
|
|
27
|
+
items:
|
|
28
|
+
type: object
|
|
29
|
+
properties:
|
|
30
|
+
product: { type: string }
|
|
31
|
+
quantity: { type: integer, minimum: 1 }
|
|
32
|
+
required: [ product, quantity ]
|
|
33
|
+
blocks:
|
|
34
|
+
type: array
|
|
35
|
+
items:
|
|
36
|
+
oneOf:
|
|
37
|
+
- properties:
|
|
38
|
+
kind: { const: paragraph }
|
|
39
|
+
text: { type: string }
|
|
40
|
+
required: [ kind, text ]
|
|
41
|
+
- properties:
|
|
42
|
+
kind: { const: quiz }
|
|
43
|
+
question: { type: string }
|
|
44
|
+
required: [ kind, question ]
|
|
45
|
+
attributes:
|
|
46
|
+
type: object
|
|
47
|
+
additionalProperties: { type: string }
|
|
48
|
+
description: { type: string, contentMediaType: text/markdown, title: Description }
|
|
49
|
+
required: [ title, company, stage ]
|
|
50
|
+
if:
|
|
51
|
+
properties:
|
|
52
|
+
stage: { const: won }
|
|
53
|
+
required: [ stage ]
|
|
54
|
+
then:
|
|
55
|
+
required: [ amount ]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{ "binaryTargets": [] }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{ "binaryTargets": [] }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{ "verdict": "accept" }
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: deal
|
|
3
|
+
---
|
|
4
|
+
- **title**: Renewal
|
|
5
|
+
- **company**: [Acme](../companies/acme.md)
|
|
6
|
+
- **shipping**:
|
|
7
|
+
- **city**: Paris
|
|
8
|
+
- **depot**: [Depot](../places/depot.md)
|
|
9
|
+
- **contract**: [Seats](../products/seats.md)
|
|
10
|
+
|
|
11
|
+
The yearly renewal.
|
|
12
|
+
|
|
13
|
+
## lines
|
|
14
|
+
|
|
15
|
+
| product | quantity |
|
|
16
|
+
| --- | --- |
|
|
17
|
+
| [Seats](../products/seats.md) | 10 |
|
|
18
|
+
| [Support](../products/support.md) | 1 |
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
$defs:
|
|
2
|
+
address:
|
|
3
|
+
type: object
|
|
4
|
+
properties:
|
|
5
|
+
city: { type: string }
|
|
6
|
+
depot: { type: string, reference: place }
|
|
7
|
+
required: [city]
|
|
8
|
+
company:
|
|
9
|
+
properties:
|
|
10
|
+
name: { type: string }
|
|
11
|
+
product:
|
|
12
|
+
properties:
|
|
13
|
+
name: { type: string }
|
|
14
|
+
place:
|
|
15
|
+
properties:
|
|
16
|
+
name: { type: string }
|
|
17
|
+
deal:
|
|
18
|
+
type: object
|
|
19
|
+
properties:
|
|
20
|
+
title: { type: string }
|
|
21
|
+
company: { type: string, reference: company }
|
|
22
|
+
shipping: { $ref: '#/$defs/address' }
|
|
23
|
+
lines:
|
|
24
|
+
type: array
|
|
25
|
+
items:
|
|
26
|
+
type: object
|
|
27
|
+
properties:
|
|
28
|
+
product: { type: string, reference: product }
|
|
29
|
+
quantity: { type: integer, minimum: 1 }
|
|
30
|
+
required: [product, quantity]
|
|
31
|
+
contract: { type: string, reference: attachment }
|
|
32
|
+
required: [title, company]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{ "binaryTargets": [] }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{ "verdict": "accept" }
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: deal
|
|
3
|
+
---
|
|
4
|
+
- **title**: Renewal
|
|
5
|
+
- **company**: [Acme](../companies/acme.md)
|
|
6
|
+
- **shipping**:
|
|
7
|
+
- **city**: Paris
|
|
8
|
+
- **depot**: [Depot](../places/depot.md)
|
|
9
|
+
- **contract**: [contract.pdf](../assets/contract.pdf)
|
|
10
|
+
|
|
11
|
+
The yearly renewal.
|
|
12
|
+
|
|
13
|
+
## lines
|
|
14
|
+
|
|
15
|
+
| product | quantity |
|
|
16
|
+
| --- | --- |
|
|
17
|
+
| [Seats](../products/seats.md) | 10 |
|
|
18
|
+
| [Support](../products/support.md) | 1 |
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
$defs:
|
|
2
|
+
address:
|
|
3
|
+
type: object
|
|
4
|
+
properties:
|
|
5
|
+
city: { type: string }
|
|
6
|
+
depot: { type: string, reference: place }
|
|
7
|
+
required: [city]
|
|
8
|
+
company:
|
|
9
|
+
properties:
|
|
10
|
+
name: { type: string }
|
|
11
|
+
product:
|
|
12
|
+
properties:
|
|
13
|
+
name: { type: string }
|
|
14
|
+
place:
|
|
15
|
+
properties:
|
|
16
|
+
name: { type: string }
|
|
17
|
+
deal:
|
|
18
|
+
type: object
|
|
19
|
+
properties:
|
|
20
|
+
title: { type: string }
|
|
21
|
+
company: { type: string, reference: company }
|
|
22
|
+
shipping: { $ref: '#/$defs/address' }
|
|
23
|
+
lines:
|
|
24
|
+
type: array
|
|
25
|
+
items:
|
|
26
|
+
type: object
|
|
27
|
+
properties:
|
|
28
|
+
product: { type: string, reference: product }
|
|
29
|
+
quantity: { type: integer, minimum: 1 }
|
|
30
|
+
required: [product, quantity]
|
|
31
|
+
contract: { type: string, reference: attachment }
|
|
32
|
+
required: [title, company]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{ "binaryTargets": [] }
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: deal
|
|
3
|
+
---
|
|
4
|
+
- **title**: Renewal
|
|
5
|
+
- **company**: [Acme](../companies/acme.md)
|
|
6
|
+
- **shipping**:
|
|
7
|
+
- **city**: Paris
|
|
8
|
+
- **depot**: [Depot](../places/depot.md)
|
|
9
|
+
- **contract**: [contract.pdf](/rooms/other/assets/contract.pdf)
|
|
10
|
+
|
|
11
|
+
The yearly renewal.
|
|
12
|
+
|
|
13
|
+
## lines
|
|
14
|
+
|
|
15
|
+
| product | quantity |
|
|
16
|
+
| --- | --- |
|
|
17
|
+
| [Seats](../products/seats.md) | 10 |
|
|
18
|
+
| [Support](../products/support.md) | 1 |
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
$defs:
|
|
2
|
+
address:
|
|
3
|
+
type: object
|
|
4
|
+
properties:
|
|
5
|
+
city: { type: string }
|
|
6
|
+
depot: { type: string, reference: place }
|
|
7
|
+
required: [city]
|
|
8
|
+
company:
|
|
9
|
+
properties:
|
|
10
|
+
name: { type: string }
|
|
11
|
+
product:
|
|
12
|
+
properties:
|
|
13
|
+
name: { type: string }
|
|
14
|
+
place:
|
|
15
|
+
properties:
|
|
16
|
+
name: { type: string }
|
|
17
|
+
deal:
|
|
18
|
+
type: object
|
|
19
|
+
properties:
|
|
20
|
+
title: { type: string }
|
|
21
|
+
company: { type: string, reference: company }
|
|
22
|
+
shipping: { $ref: '#/$defs/address' }
|
|
23
|
+
lines:
|
|
24
|
+
type: array
|
|
25
|
+
items:
|
|
26
|
+
type: object
|
|
27
|
+
properties:
|
|
28
|
+
product: { type: string, reference: product }
|
|
29
|
+
quantity: { type: integer, minimum: 1 }
|
|
30
|
+
required: [product, quantity]
|
|
31
|
+
contract: { type: string, reference: attachment }
|
|
32
|
+
required: [title, company]
|