@agentshouse/mdmodel 0.1.0-ca6c012c54fb0 → 0.1.0-caaa5bad9995d
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 +246 -229
- package/README.md +27 -25
- 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 +25 -11
- package/dist/definition.d.ts.map +1 -1
- package/dist/definition.js +235 -136
- package/dist/document.d.ts +16 -9
- package/dist/document.d.ts.map +1 -1
- package/dist/document.js +786 -149
- 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 +42 -0
- package/dist/fields.d.ts +1 -1
- package/dist/fields.d.ts.map +1 -1
- package/dist/fields.js +2 -2
- 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 +912 -0
- package/dist/house-model.d.ts.map +1 -0
- package/dist/house-model.js +502 -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 +13 -0
- package/dist/house-references/patterns.d.ts.map +1 -0
- package/dist/house-references/patterns.js +20 -0
- package/dist/index.d.ts +44 -18
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +27 -12
- package/dist/indexed.d.ts +10 -0
- package/dist/indexed.d.ts.map +1 -0
- package/dist/indexed.js +63 -0
- package/dist/kinds.d.ts +26 -0
- package/dist/kinds.d.ts.map +1 -0
- package/dist/kinds.js +218 -0
- package/dist/markdown.d.ts +71 -0
- package/dist/markdown.d.ts.map +1 -0
- package/dist/markdown.js +232 -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 +16 -1
- package/dist/paths.d.ts.map +1 -1
- package/dist/paths.js +107 -22
- package/dist/pattern.d.ts.map +1 -1
- package/dist/pattern.js +4 -3
- package/dist/query/language.d.ts +257 -0
- package/dist/query/language.d.ts.map +1 -0
- package/dist/query/language.js +621 -0
- package/dist/query/match.d.ts +14 -0
- package/dist/query/match.d.ts.map +1 -0
- package/dist/query/match.js +129 -0
- package/dist/query/rows.d.ts +36 -0
- package/dist/query/rows.d.ts.map +1 -0
- package/dist/query/rows.js +179 -0
- package/dist/query/sql.d.ts +45 -0
- package/dist/query/sql.d.ts.map +1 -0
- package/dist/query/sql.js +296 -0
- package/dist/query/walk.d.ts +69 -0
- package/dist/query/walk.d.ts.map +1 -0
- package/dist/query/walk.js +274 -0
- package/dist/references.d.ts +2 -2
- package/dist/references.d.ts.map +1 -1
- package/dist/references.js +1 -1
- package/dist/refuse.d.ts +1 -0
- package/dist/refuse.d.ts.map +1 -1
- package/dist/refuse.js +1 -0
- package/dist/reserved.d.ts +2 -0
- package/dist/reserved.d.ts.map +1 -1
- package/dist/reserved.js +17 -5
- package/dist/room-types.d.ts +8 -0
- package/dist/room-types.d.ts.map +1 -0
- package/dist/room-types.js +144 -0
- package/dist/schema.d.ts +1 -3
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +9 -73
- package/dist/types.d.ts +32 -43
- package/dist/types.d.ts.map +1 -1
- package/dist/validate.d.ts +14 -6
- package/dist/validate.d.ts.map +1 -1
- package/dist/validate.js +225 -187
- package/dist/view.d.ts +5 -0
- package/dist/view.d.ts.map +1 -0
- package/dist/view.js +27 -0
- package/dist/yaml.d.ts +7 -5
- package/dist/yaml.d.ts.map +1 -1
- package/dist/yaml.js +158 -44
- package/fixtures/README.md +103 -70
- package/fixtures/cases/absent-link-dangles/library/item.md +1 -1
- package/fixtures/cases/absent-link-dangles/schema.md +7 -0
- package/fixtures/cases/absent-optional-field/library/companies/acme.md +1 -1
- package/fixtures/cases/absent-optional-field/library/deals/lead.md +3 -3
- package/fixtures/cases/{date-time-format/schema.yaml → absent-optional-field/schema.md} +12 -11
- package/fixtures/cases/absolute-link/library/item.md +1 -1
- package/fixtures/cases/absolute-link/schema.md +7 -0
- package/fixtures/cases/attachment-reference-any-file/library/companies/acme.md +1 -1
- package/fixtures/cases/attachment-reference-any-file/library/deals/renewal.md +13 -10
- package/fixtures/cases/attachment-reference-any-file/library/places/depot.md +1 -1
- package/fixtures/cases/attachment-reference-any-file/library/products/seats.md +1 -1
- package/fixtures/cases/attachment-reference-any-file/library/products/support.md +1 -1
- package/fixtures/cases/attachment-reference-any-file/{schema.yaml → schema.md} +2 -0
- package/fixtures/cases/attachment-reference-dangles/library/companies/acme.md +1 -1
- package/fixtures/cases/attachment-reference-dangles/library/deals/renewal.md +13 -10
- package/fixtures/cases/attachment-reference-dangles/library/places/depot.md +1 -1
- package/fixtures/cases/attachment-reference-dangles/library/products/seats.md +1 -1
- package/fixtures/cases/attachment-reference-dangles/library/products/support.md +1 -1
- package/fixtures/cases/attachment-reference-dangles/{schema.yaml → schema.md} +2 -0
- package/fixtures/cases/attachment-reference-outside/expected.json +2 -1
- package/fixtures/cases/attachment-reference-outside/library/companies/acme.md +1 -1
- package/fixtures/cases/attachment-reference-outside/library/deals/renewal.md +13 -10
- package/fixtures/cases/attachment-reference-outside/library/places/depot.md +1 -1
- package/fixtures/cases/attachment-reference-outside/library/products/seats.md +1 -1
- package/fixtures/cases/attachment-reference-outside/library/products/support.md +1 -1
- package/fixtures/cases/attachment-reference-outside/{schema.yaml → schema.md} +2 -0
- package/fixtures/cases/binary-any-reference/expected.json +2 -1
- package/fixtures/cases/binary-any-reference/library/notes/draft.md +1 -1
- package/fixtures/cases/binary-any-reference/{schema.yaml → schema.md} +2 -0
- package/fixtures/cases/binary-document-collision/{schema.yaml → schema.md} +2 -0
- package/fixtures/cases/binary-image-dangles/{schema.yaml → schema.md} +2 -0
- package/fixtures/cases/binary-link-dangles/{schema.yaml → schema.md} +2 -0
- package/fixtures/cases/binary-link-outside-collection/{schema.yaml → schema.md} +2 -0
- package/fixtures/cases/binary-prototype-reference/expected.json +2 -1
- package/fixtures/cases/binary-prototype-reference/library/notes/draft.md +1 -1
- package/fixtures/cases/binary-prototype-reference/{schema.yaml → schema.md} +2 -0
- package/fixtures/cases/binary-typed-reference/expected.json +2 -1
- package/fixtures/cases/binary-typed-reference/library/notes/draft.md +1 -1
- package/fixtures/cases/binary-typed-reference/{schema.yaml → schema.md} +2 -0
- package/fixtures/cases/block-scalar-frontmatter/library/notes/literal.md +17 -0
- package/fixtures/cases/block-scalar-frontmatter/library/skills/notes/SKILL.md +10 -0
- package/fixtures/cases/boolean-field/expected.json +2 -1
- package/fixtures/cases/boolean-field/library/companies/acme.md +1 -1
- package/fixtures/cases/boolean-field/library/deals/renewal.md +49 -24
- package/fixtures/cases/{absent-optional-field/schema.yaml → boolean-field/schema.md} +12 -11
- package/fixtures/cases/bracketed-link-definition/library/item.md +1 -1
- package/fixtures/cases/bracketed-link-definition/schema.md +7 -0
- package/fixtures/cases/closed-nested-object/expected.json +2 -1
- package/fixtures/cases/closed-nested-object/library/companies/acme.md +1 -1
- package/fixtures/cases/closed-nested-object/library/deals/renewal.md +50 -25
- package/fixtures/cases/closed-nested-object/{schema.yaml → schema.md} +12 -11
- package/fixtures/cases/composed-root-reference/library/a.md +2 -2
- package/fixtures/cases/composed-root-reference/{schema.yaml → schema.md} +2 -0
- package/fixtures/cases/{conditional-section → conditional-long-text}/expected.json +3 -2
- package/fixtures/cases/{conditional-section → conditional-long-text}/library/questions/hosting.md +2 -2
- package/fixtures/cases/{conditional-section → conditional-long-text}/library/questions/payments.md +2 -2
- package/fixtures/cases/conditional-long-text/schema.md +15 -0
- package/fixtures/cases/cross-room-link/library/clients/acme.md +1 -1
- package/fixtures/cases/cross-room-link/{schema.yaml → schema.md} +2 -0
- package/fixtures/cases/cross-room-reference/library/clients/acme.md +4 -4
- package/fixtures/cases/cross-room-reference/{schema.yaml → schema.md} +3 -2
- package/fixtures/cases/date-time-format/expected.json +2 -1
- package/fixtures/cases/date-time-format/library/companies/acme.md +1 -1
- package/fixtures/cases/date-time-format/library/deals/renewal.md +49 -24
- package/fixtures/cases/{boolean-field/schema.yaml → date-time-format/schema.md} +12 -11
- package/fixtures/cases/declared-binary-links/schema.md +3 -0
- package/fixtures/cases/default-unfilled/library/companies/acme.md +1 -1
- package/fixtures/cases/default-unfilled/library/deals/renewal.md +47 -22
- package/fixtures/cases/default-unfilled/schema.md +57 -0
- package/fixtures/cases/defs-pattern/expected.json +2 -1
- package/fixtures/cases/defs-pattern/library/companies/acme.md +1 -1
- package/fixtures/cases/defs-pattern/library/deals/renewal.md +49 -24
- package/fixtures/cases/defs-pattern/schema.md +57 -0
- package/fixtures/cases/dependent-rule/library/companies/acme.md +1 -1
- package/fixtures/cases/dependent-rule/library/deals/renewal.md +48 -23
- package/fixtures/cases/dependent-rule/schema.md +57 -0
- package/fixtures/cases/duplicate-link-definition/library/item.md +1 -1
- package/fixtures/cases/duplicate-link-definition/schema.md +7 -0
- package/fixtures/cases/email-format/expected.json +2 -1
- package/fixtures/cases/email-format/library/companies/acme.md +1 -1
- package/fixtures/cases/email-format/library/deals/renewal.md +49 -24
- package/fixtures/cases/email-format/schema.md +57 -0
- package/fixtures/cases/equal-labels/expected.json +5 -0
- package/fixtures/cases/equal-labels/schema.md +6 -0
- package/fixtures/cases/fenced-link-definition/library/item.md +1 -1
- package/fixtures/cases/fenced-link-definition/schema.md +7 -0
- package/fixtures/cases/field-enum/expected.json +2 -1
- package/fixtures/cases/field-enum/library/item.md +2 -2
- package/fixtures/cases/field-enum/schema.md +8 -0
- package/fixtures/cases/frontmatter-construct/expected.json +7 -0
- package/fixtures/cases/frontmatter-construct/library/note.md +6 -0
- package/fixtures/cases/integer-field/expected.json +2 -1
- package/fixtures/cases/integer-field/library/companies/acme.md +1 -1
- package/fixtures/cases/integer-field/library/deals/renewal.md +49 -24
- package/fixtures/cases/integer-field/schema.md +57 -0
- package/fixtures/cases/interrupted-link-definition/schema.md +3 -0
- package/fixtures/cases/json-schema-constructs/library/companies/acme.md +1 -1
- package/fixtures/cases/json-schema-constructs/library/deals/renewal.md +49 -24
- package/fixtures/cases/json-schema-constructs/schema.md +57 -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.md +11 -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.md +5 -0
- package/fixtures/cases/link-into-a-reserved-name/library/notes/a.md +1 -1
- package/fixtures/cases/link-into-a-reserved-name/{schema.yaml → schema.md} +2 -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.md +5 -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.md +5 -0
- package/fixtures/cases/list-items/expected.json +1 -0
- package/fixtures/cases/list-items/library/page.md +26 -0
- package/fixtures/cases/list-items/schema.md +12 -0
- package/fixtures/cases/list-of-objects-closed/expected.json +2 -1
- package/fixtures/cases/list-of-objects-closed/library/companies/acme.md +1 -1
- package/fixtures/cases/list-of-objects-closed/library/deals/renewal.md +49 -25
- package/fixtures/cases/list-of-objects-closed/schema.md +57 -0
- package/fixtures/cases/list-of-objects-item/expected.json +2 -1
- package/fixtures/cases/list-of-objects-item/library/companies/acme.md +1 -1
- package/fixtures/cases/list-of-objects-item/library/deals/renewal.md +49 -24
- package/fixtures/cases/list-of-objects-item/schema.md +57 -0
- package/fixtures/cases/list-of-objects-reference/expected.json +2 -1
- package/fixtures/cases/list-of-objects-reference/library/companies/acme.md +1 -1
- package/fixtures/cases/list-of-objects-reference/library/deals/renewal.md +12 -9
- package/fixtures/cases/list-of-objects-reference/library/places/depot.md +1 -1
- package/fixtures/cases/list-of-objects-reference/library/products/seats.md +1 -1
- package/fixtures/cases/list-of-objects-reference/library/products/support.md +1 -1
- package/fixtures/cases/list-of-objects-reference/{schema.yaml → schema.md} +2 -0
- package/fixtures/cases/list-reference-path/expected.json +7 -0
- package/fixtures/cases/list-reference-path/library/page.md +5 -0
- package/fixtures/cases/list-reference-path/schema.md +5 -0
- package/fixtures/cases/list-reference-type/expected.json +7 -0
- package/fixtures/cases/list-reference-type/library/page.md +6 -0
- package/fixtures/cases/list-reference-type/schema.md +5 -0
- package/fixtures/cases/list-size/expected.json +2 -1
- package/fixtures/cases/list-size/library/companies/acme.md +1 -1
- package/fixtures/cases/list-size/library/deals/renewal.md +51 -24
- package/fixtures/cases/list-size/schema.md +57 -0
- package/fixtures/cases/long-fence-link-definition/schema.md +3 -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.md +17 -0
- package/fixtures/cases/malformed-definition/{schema.yaml → schema.md} +2 -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.md +8 -0
- package/fixtures/cases/member-document/library/people/ana.md +2 -2
- package/fixtures/cases/member-document/{schema.yaml → schema.md} +2 -0
- package/fixtures/cases/member-on-another-type/library/note.md +1 -1
- package/fixtures/cases/member-on-another-type/{schema.yaml → schema.md} +2 -0
- package/fixtures/cases/missing-required-field/library/item.md +1 -1
- package/fixtures/cases/missing-required-field/schema.md +8 -0
- package/fixtures/cases/misspelled-key/expected.json +2 -1
- package/fixtures/cases/misspelled-key/library/companies/acme.md +1 -1
- package/fixtures/cases/misspelled-key/library/deals/renewal.md +50 -25
- package/fixtures/cases/misspelled-key/schema.md +57 -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.md +7 -0
- package/fixtures/cases/nested-defs/expected.json +2 -1
- package/fixtures/cases/nested-defs/library/deal.md +3 -3
- package/fixtures/cases/nested-defs/{schema.yaml → schema.md} +2 -0
- package/fixtures/cases/nested-object-reference/expected.json +2 -1
- package/fixtures/cases/nested-object-reference/library/companies/acme.md +1 -1
- package/fixtures/cases/nested-object-reference/library/deals/renewal.md +12 -9
- package/fixtures/cases/nested-object-reference/library/places/depot.md +1 -1
- package/fixtures/cases/nested-object-reference/library/products/seats.md +1 -1
- package/fixtures/cases/nested-object-reference/library/products/support.md +1 -1
- package/fixtures/cases/nested-object-reference/schema.md +34 -0
- package/fixtures/cases/nested-reference/library/companies/acme.md +1 -1
- package/fixtures/cases/nested-reference/library/deals/renewal.md +13 -10
- package/fixtures/cases/nested-reference/library/places/depot.md +1 -1
- package/fixtures/cases/nested-reference/library/products/seats.md +1 -1
- package/fixtures/cases/nested-reference/library/products/support.md +1 -1
- package/fixtures/cases/nested-reference/schema.md +34 -0
- package/fixtures/cases/nested-required-field/expected.json +2 -1
- package/fixtures/cases/nested-required-field/library/companies/acme.md +1 -1
- package/fixtures/cases/nested-required-field/library/deals/renewal.md +48 -23
- package/fixtures/cases/nested-required-field/schema.md +57 -0
- package/fixtures/cases/numeric-range/expected.json +2 -1
- package/fixtures/cases/numeric-range/library/companies/acme.md +1 -1
- package/fixtures/cases/numeric-range/library/deals/renewal.md +49 -24
- package/fixtures/cases/numeric-range/schema.md +57 -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.md +7 -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.md +6 -0
- package/fixtures/cases/one-of-variant/expected.json +2 -1
- package/fixtures/cases/one-of-variant/library/companies/acme.md +1 -1
- package/fixtures/cases/one-of-variant/library/deals/renewal.md +49 -24
- package/fixtures/cases/one-of-variant/schema.md +57 -0
- package/fixtures/cases/other-room-reference/expected.json +2 -1
- package/fixtures/cases/other-room-reference/library/companies/acme.md +1 -1
- package/fixtures/cases/other-room-reference/library/deals/renewal.md +12 -9
- package/fixtures/cases/other-room-reference/library/places/depot.md +1 -1
- package/fixtures/cases/other-room-reference/library/products/seats.md +1 -1
- package/fixtures/cases/other-room-reference/library/products/support.md +1 -1
- package/fixtures/cases/other-room-reference/schema.md +34 -0
- package/fixtures/cases/paragraph-link-definition/schema.md +3 -0
- package/fixtures/cases/prototype-field/expected.json +2 -1
- package/fixtures/cases/prototype-field/library/item.md +2 -2
- package/fixtures/cases/prototype-field/schema.md +7 -0
- package/fixtures/cases/quoted-link-definition/schema.md +3 -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.md +5 -0
- package/fixtures/cases/reference-to-any-file-name/context.json +1 -0
- package/fixtures/cases/reference-to-any-file-name/expected.json +1 -0
- package/fixtures/cases/reference-to-any-file-name/library/people/100%.md +4 -0
- package/fixtures/cases/reference-to-any-file-name/library/people/C#.md +4 -0
- package/fixtures/cases/reference-to-any-file-name/library/people/My notes.md +4 -0
- package/fixtures/cases/reference-to-any-file-name/library/people/[draft].md +4 -0
- package/fixtures/cases/reference-to-any-file-name/library/people/c (d).md +4 -0
- package/fixtures/cases/reference-to-any-file-name/library/people/caf/303/251.md +4 -0
- package/fixtures/cases/reference-to-any-file-name/library/people//320/236/321/202/321/207/321/221/321/202.md +4 -0
- package/fixtures/cases/reference-to-any-file-name/library/tasks/bracket.md +9 -0
- package/fixtures/cases/reference-to-any-file-name/library/tasks/cyrillic.md +9 -0
- package/fixtures/cases/reference-to-any-file-name/library/tasks/decomposed.md +9 -0
- package/fixtures/cases/reference-to-any-file-name/library/tasks/hash.md +9 -0
- package/fixtures/cases/reference-to-any-file-name/library/tasks/parenthesis.md +9 -0
- package/fixtures/cases/reference-to-any-file-name/library/tasks/percent.md +9 -0
- package/fixtures/cases/reference-to-any-file-name/library/tasks/spaced.md +9 -0
- package/fixtures/cases/reference-to-any-file-name/schema.md +12 -0
- 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.md +12 -0
- package/fixtures/cases/referenced-missing-non-latin-file/context.json +1 -0
- package/fixtures/cases/referenced-missing-non-latin-file/expected.json +6 -0
- package/fixtures/cases/referenced-missing-non-latin-file/library/tasks/a.md +9 -0
- package/fixtures/cases/referenced-missing-non-latin-file/library/tasks/b.md +9 -0
- package/fixtures/cases/referenced-missing-non-latin-file/schema.md +12 -0
- package/fixtures/cases/remote-ref/{schema.yaml → schema.md} +2 -0
- package/fixtures/cases/schema-body-ignored/context.json +1 -0
- package/fixtures/cases/schema-body-ignored/expected.json +1 -0
- package/fixtures/cases/schema-body-ignored/schema.md +9 -0
- package/fixtures/cases/schema-type-named-folders/context.json +1 -0
- package/fixtures/cases/schema-type-named-folders/expected.json +5 -0
- package/fixtures/cases/schema-type-named-folders/schema.md +5 -0
- package/fixtures/cases/schema-type-named-type/context.json +1 -0
- package/fixtures/cases/schema-type-named-type/expected.json +5 -0
- package/fixtures/cases/{unknown-type/schema.yaml → schema-type-named-type/schema.md} +3 -1
- package/fixtures/cases/second-member-document/{schema.yaml → schema.md} +2 -0
- package/fixtures/cases/sections-keyword-refused/context.json +1 -0
- package/fixtures/cases/sections-keyword-refused/expected.json +5 -0
- package/fixtures/cases/{structured-section/schema.yaml → sections-keyword-refused/schema.md} +3 -2
- package/fixtures/cases/shortcut-reference-link/library/item.md +1 -1
- package/fixtures/cases/shortcut-reference-link/schema.md +7 -0
- package/fixtures/cases/string-length/expected.json +2 -1
- package/fixtures/cases/string-length/library/companies/acme.md +1 -1
- package/fixtures/cases/string-length/library/deals/renewal.md +49 -24
- package/fixtures/cases/string-length/schema.md +57 -0
- package/fixtures/cases/submission-keys/library/notes/visitor.md +2 -2
- package/fixtures/cases/submission-keys/{schema.yaml → schema.md} +2 -0
- package/fixtures/cases/text-field-kind/expected.json +1 -4
- package/fixtures/cases/text-field-kind/library/page.md +1 -1
- package/fixtures/cases/text-field-kind/{schema.yaml → schema.md} +2 -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.md +5 -0
- package/fixtures/cases/truncated-link-definition/schema.md +3 -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.md +8 -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.md +8 -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.md +8 -0
- package/fixtures/cases/types-folder-content/library/types/task.md +1 -1
- package/fixtures/cases/types-folder-content/{schema.yaml → schema.md} +2 -0
- package/fixtures/cases/undeclared-field/expected.json +2 -1
- package/fixtures/cases/undeclared-field/library/item.md +2 -2
- package/fixtures/cases/undeclared-field/schema.md +7 -0
- package/fixtures/cases/unevaluated-items-closed/expected.json +2 -1
- package/fixtures/cases/unevaluated-items-closed/library/trip.md +13 -3
- package/fixtures/cases/unevaluated-items-closed/{schema.yaml → schema.md} +2 -0
- package/fixtures/cases/unique-in-app-schema/context.json +1 -0
- package/fixtures/cases/unique-in-app-schema/expected.json +5 -0
- package/fixtures/cases/unique-in-app-schema/schema.yaml +7 -0
- package/fixtures/cases/unique-indexed-field/context.json +1 -0
- package/fixtures/cases/unique-indexed-field/expected.json +1 -0
- package/fixtures/cases/unique-indexed-field/library/tickets/first.md +8 -0
- package/fixtures/cases/unique-indexed-field/library/tickets/second.md +8 -0
- package/fixtures/cases/unique-indexed-field/schema.md +9 -0
- package/fixtures/cases/unique-off-indexed-field/context.json +1 -0
- package/fixtures/cases/unique-off-indexed-field/expected.json +5 -0
- package/fixtures/cases/unique-off-indexed-field/schema.md +9 -0
- package/fixtures/cases/unlisted-reference-type/{schema.yaml → schema.md} +2 -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.md +7 -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.md +7 -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.md +7 -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.md +7 -0
- package/fixtures/cases/unresolved-link/library/item.md +1 -1
- package/fixtures/cases/unresolved-link/schema.md +7 -0
- package/fixtures/cases/valid-typed-document/library/people/ada.md +1 -1
- package/fixtures/cases/valid-typed-document/library/tasks/one.md +11 -11
- package/fixtures/cases/valid-typed-document/schema.md +17 -0
- package/fixtures/cases/wide-item-fence-link/schema.md +3 -0
- package/fixtures/forms.json +371 -0
- package/fixtures/preamble.json +29 -8
- package/fixtures/queries.json +1562 -0
- package/fixtures/references.json +15 -0
- package/package.json +10 -1
- package/dist/blocks.d.ts +0 -11
- package/dist/blocks.d.ts.map +0 -1
- package/dist/blocks.js +0 -91
- package/dist/condition.d.ts +0 -181
- package/dist/condition.d.ts.map +0 -1
- package/dist/condition.js +0 -633
- package/dist/divide.d.ts +0 -3
- package/dist/divide.d.ts.map +0 -1
- package/dist/divide.js +0 -320
- package/dist/links.d.ts +0 -29
- package/dist/links.d.ts.map +0 -1
- package/dist/links.js +0 -831
- package/dist/profile.d.ts +0 -6
- package/dist/profile.d.ts.map +0 -1
- package/dist/profile.js +0 -5
- package/dist/project.d.ts +0 -22
- package/dist/project.d.ts.map +0 -1
- package/dist/project.js +0 -128
- package/dist/sections.d.ts +0 -11
- package/dist/sections.d.ts.map +0 -1
- package/dist/sections.js +0 -57
- package/fixtures/cases/absent-link-dangles/schema.yaml +0 -6
- package/fixtures/cases/absolute-link/schema.yaml +0 -6
- package/fixtures/cases/bracketed-link-definition/schema.yaml +0 -6
- package/fixtures/cases/conditional-section/schema.yaml +0 -14
- package/fixtures/cases/declared-binary-links/schema.yaml +0 -1
- package/fixtures/cases/default-unfilled/schema.yaml +0 -56
- package/fixtures/cases/defs-pattern/schema.yaml +0 -56
- package/fixtures/cases/dependent-rule/schema.yaml +0 -56
- package/fixtures/cases/duplicate-link-definition/schema.yaml +0 -6
- package/fixtures/cases/email-format/schema.yaml +0 -56
- package/fixtures/cases/fenced-link-definition/schema.yaml +0 -6
- package/fixtures/cases/field-enum/schema.yaml +0 -7
- package/fixtures/cases/frontmatter-schema/expected.json +0 -5
- package/fixtures/cases/integer-field/schema.yaml +0 -56
- package/fixtures/cases/interrupted-link-definition/schema.yaml +0 -1
- package/fixtures/cases/json-schema-constructs/schema.yaml +0 -56
- package/fixtures/cases/list-of-objects-closed/schema.yaml +0 -56
- package/fixtures/cases/list-of-objects-item/schema.yaml +0 -56
- package/fixtures/cases/list-size/schema.yaml +0 -56
- package/fixtures/cases/long-fence-link-definition/schema.yaml +0 -1
- package/fixtures/cases/missing-required-field/schema.yaml +0 -7
- package/fixtures/cases/missing-section-item-kind/expected.json +0 -5
- package/fixtures/cases/missing-section-item-kind/schema.yaml +0 -6
- package/fixtures/cases/misspelled-key/schema.yaml +0 -56
- package/fixtures/cases/nested-object-reference/schema.yaml +0 -32
- package/fixtures/cases/nested-reference/schema.yaml +0 -32
- package/fixtures/cases/nested-required-field/schema.yaml +0 -56
- package/fixtures/cases/null-refused/expected.json +0 -6
- package/fixtures/cases/null-refused/library/companies/acme.md +0 -4
- package/fixtures/cases/null-refused/library/deals/renewal.md +0 -31
- package/fixtures/cases/null-refused/schema.yaml +0 -56
- package/fixtures/cases/numeric-range/schema.yaml +0 -56
- package/fixtures/cases/one-of-variant/schema.yaml +0 -56
- package/fixtures/cases/open-map-value/expected.json +0 -6
- package/fixtures/cases/open-map-value/library/companies/acme.md +0 -4
- package/fixtures/cases/open-map-value/library/deals/renewal.md +0 -31
- package/fixtures/cases/open-map-value/schema.yaml +0 -56
- package/fixtures/cases/other-room-reference/schema.yaml +0 -32
- package/fixtures/cases/paragraph-link-definition/schema.yaml +0 -1
- package/fixtures/cases/prototype-field/schema.yaml +0 -6
- package/fixtures/cases/quoted-link-definition/schema.yaml +0 -1
- package/fixtures/cases/referenced-missing-file/schema.yaml +0 -11
- package/fixtures/cases/section-item-enum/expected.json +0 -6
- package/fixtures/cases/section-item-enum/library/task.md +0 -8
- package/fixtures/cases/section-item-enum/schema.yaml +0 -3
- package/fixtures/cases/section-item-kind/expected.json +0 -6
- package/fixtures/cases/section-item-kind/library/task.md +0 -8
- package/fixtures/cases/section-item-kind/schema.yaml +0 -3
- package/fixtures/cases/section-items/library/page.md +0 -42
- package/fixtures/cases/section-items/schema.yaml +0 -10
- package/fixtures/cases/section-reference-path/expected.json +0 -6
- package/fixtures/cases/section-reference-path/library/page.md +0 -7
- package/fixtures/cases/section-reference-path/schema.yaml +0 -3
- package/fixtures/cases/section-reference-type/expected.json +0 -6
- package/fixtures/cases/section-reference-type/library/page.md +0 -7
- package/fixtures/cases/section-reference-type/schema.yaml +0 -3
- package/fixtures/cases/shortcut-reference-link/schema.yaml +0 -6
- package/fixtures/cases/string-length/schema.yaml +0 -56
- package/fixtures/cases/structured-section/expected.json +0 -6
- package/fixtures/cases/truncated-link-definition/schema.yaml +0 -1
- package/fixtures/cases/undeclared-field/schema.yaml +0 -6
- package/fixtures/cases/unresolved-link/schema.yaml +0 -6
- package/fixtures/cases/valid-typed-document/schema.yaml +0 -16
- package/fixtures/cases/wide-item-fence-link/schema.yaml +0 -1
- package/fixtures/division.json +0 -409
- package/fixtures/projection.json +0 -255
- /package/fixtures/cases/{conditional-section → block-scalar-frontmatter}/context.json +0 -0
- /package/fixtures/cases/{section-items → block-scalar-frontmatter}/expected.json +0 -0
- /package/fixtures/cases/{frontmatter-schema → conditional-long-text}/context.json +0 -0
- /package/fixtures/cases/{missing-section-item-kind → equal-labels}/context.json +0 -0
- /package/fixtures/cases/{null-refused → frontmatter-construct}/context.json +0 -0
- /package/fixtures/cases/{open-map-value → labels-in-the-rooms-language}/context.json +0 -0
- /package/fixtures/cases/{section-item-enum → lazy-list-item}/context.json +0 -0
- /package/fixtures/cases/{section-item-kind → list-item-enum}/context.json +0 -0
- /package/fixtures/cases/{section-items → list-item-kind}/context.json +0 -0
- /package/fixtures/cases/{section-reference-path → list-items}/context.json +0 -0
- /package/fixtures/cases/{section-items → list-items}/library/other.md +0 -0
- /package/fixtures/cases/{section-reference-type → list-reference-path}/context.json +0 -0
- /package/fixtures/cases/{section-reference-path → list-reference-path}/library/other.md +0 -0
- /package/fixtures/cases/{structured-section → list-reference-type}/context.json +0 -0
- /package/fixtures/cases/{section-reference-type → list-reference-type}/library/note.md +0 -0
- /package/fixtures/cases/{frontmatter-schema/schema.yaml → unknown-type/schema.md} +0 -0
package/fixtures/README.md
CHANGED
|
@@ -3,13 +3,29 @@
|
|
|
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
5
|
path-to-content, an absent `library/` being the empty Library, and the
|
|
6
|
-
required `context.json` as `ValidationContext`. Cases with a `schema.
|
|
7
|
-
|
|
6
|
+
required `context.json` as `ValidationContext`. Cases with a `schema.md`, a Room
|
|
7
|
+
schema Document whose frontmatter is the schema, call `verifySchemaDocument` with
|
|
8
|
+
its text, and cases with a `schema.yaml`, an App's schema text, call `verify` with
|
|
9
|
+
it; either then compares its refusal or
|
|
8
10
|
`validate(library, context, verified.model)` against `expected.json`. Other
|
|
9
11
|
cases compare `validate(library, context)` directly. Text-only cases carry
|
|
10
12
|
`{ "binaryTargets": [] }`. Binary targets are membership declarations; the
|
|
11
13
|
corpus supplies no binary bytes or placeholder Documents.
|
|
12
14
|
|
|
15
|
+
## Forms
|
|
16
|
+
|
|
17
|
+
`forms.json` exercises how a typed Document writes its values in its body. It carries `schema`,
|
|
18
|
+
one schema text, `names`, the name each reference value's target shows, and three lists. Each of
|
|
19
|
+
`cases` carries `name`, the `type` its source declares, exact `source` and the `value` `parse`
|
|
20
|
+
reads with that type's definition, and optionally `ranges`, the exact source text of each listed
|
|
21
|
+
pointer's `Document.ranges` entry, `after`, the text `Document.listEnd` is followed by, the
|
|
22
|
+
`preamble`, `sections` and `text` it reads, `written: true` where `create(type)` with one `field`
|
|
23
|
+
change per value but `type` and a `text` change of the case's `text`, applied with the definition
|
|
24
|
+
and a `nameOf` reading `names`, serializes to `source` exactly, and `rendered`, each pointer's
|
|
25
|
+
exact text as GitHub Flavored Markdown renders it. Each of `refused` carries `name`, `type`,
|
|
26
|
+
`source` and the `refusal` `parse` answers, its `rule`, `location` and `line`. Each of `applied`
|
|
27
|
+
carries `name`, `type`, `source`, `changes` and the exact source `apply` writes.
|
|
28
|
+
|
|
13
29
|
## Preamble operations
|
|
14
30
|
|
|
15
31
|
`preamble.json` exercises the public parse/apply/serialize seam separately from
|
|
@@ -18,52 +34,40 @@ the validation Libraries. Each row carries `name`, exact `source`, expected
|
|
|
18
34
|
the source, compare `Document.preamble`, apply
|
|
19
35
|
`{ kind: 'preamble', prior: preamble, value }`, and compare the serialized result.
|
|
20
36
|
These cases cover empty and heading-free Documents, frontmatter boundaries,
|
|
21
|
-
fenced headings
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
`
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
`
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
`divide(document, file, context)` with `{ documentTargets, definition, bound }`,
|
|
56
|
-
and compare against `expected`: either `{ "ok": true, "spans": [...] }`, where
|
|
57
|
-
each span carries the exact `text` to embed and the exact `source` the returned
|
|
58
|
-
`start` and `end` address in that case's source, or `{ "ok": false, "refusal": ... }`. Then
|
|
59
|
-
check that the source is unchanged. A span's `text` and `source` differ where
|
|
60
|
-
the embedded text repeats a continuation's own heading, carries an internal
|
|
61
|
-
link's visible label, or carries a frontmatter value without the quotes the
|
|
62
|
-
author wrote, and where the addressed extent encloses a declared structured
|
|
63
|
-
section between two pieces one span packs together or the whole of a free-text
|
|
64
|
-
value one span carries part of. `start` and `end` are UTF-8 byte offsets into the case's
|
|
65
|
-
source; every source in this corpus is ASCII, so a consumer compares the
|
|
66
|
-
addressed `source` with an ordinary string slice.
|
|
37
|
+
fenced headings and a heading an HTML block holds, setext, indented and empty
|
|
38
|
+
headings that open a section, newline/source preservation, and a moved-export
|
|
39
|
+
link rewrite.
|
|
40
|
+
|
|
41
|
+
## Queries
|
|
42
|
+
|
|
43
|
+
`queries.json` is the one table of cases both query evaluators answer. It carries `schema`,
|
|
44
|
+
one schema text; `documents`, each named and carrying its `path`, the `type` a collection
|
|
45
|
+
stores for it (`any` for an untyped Markdown Document, `null` for one that is not Markdown),
|
|
46
|
+
its `fileId`, the `text` the device holds or `null`, and its `fields`; and `cases`, each with a
|
|
47
|
+
`name`, a `query` of filter parts, the `document` it names and whether it `matches`. Verify
|
|
48
|
+
the schema and plan `{ ...query, select: {} }` with `planOf` against its types. Then
|
|
49
|
+
`matches(plan, candidate)` over the named Document, given its type's definition, and the
|
|
50
|
+
condition `sql.tests` writes over a collection holding every Document of the table with the
|
|
51
|
+
values and links `indexed` derives from it, joined with `sql.hopped` for a `hop` whose targets
|
|
52
|
+
are the collection's Documents by Path, must both answer `matches`. A case that tests other
|
|
53
|
+
Documents names in `refusedInMemory` the part `matches` refuses there as `invalid-query`, since
|
|
54
|
+
one Document cannot answer it, and only the SQL condition answers `matches`. A new operator
|
|
55
|
+
adds its cases here first. With `types: ["task"]`, every `task` Document both evaluators match, in each case `matches` answers, lies within the
|
|
56
|
+
index plan `walkOf` takes for each case: among the keys of the equality or list it walks, and
|
|
57
|
+
within the runs of keys it walks an order by each indexed field in, a missing value's among
|
|
58
|
+
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
|
|
59
|
+
names `indexed` and the `order` of every `task` Document, ties by Path in code-point order in
|
|
60
|
+
either direction. The SQL order `sql.sorted` writes over that collection, `compared` over the
|
|
61
|
+
value `heldAt` reads, its instant for a date-time, and the bytes of each Document's `indexKey`,
|
|
62
|
+
a missing value and `null` placed as the clause's `nulls` asks, must each give that order.
|
|
63
|
+
|
|
64
|
+
## References
|
|
65
|
+
|
|
66
|
+
`references.json` holds House's reference forms. Each row carries `name`, one `reference` and the
|
|
67
|
+
one `pattern` that reads it, `room`, `app`, `space`, `document`, `attachment` or `revision`, or
|
|
68
|
+
`null` where none does: `ROOM_REFERENCE_PATTERN`, `APP_REFERENCE_PATTERN`,
|
|
69
|
+
`SPACE_REFERENCE_PATTERN`, `DOCUMENT_REFERENCE_PATTERN`, `ATTACHMENT_REFERENCE_PATTERN` and
|
|
70
|
+
`REVISION_REFERENCE_PATTERN` must each read exactly the rows that name it.
|
|
67
71
|
|
|
68
72
|
## Verdict format
|
|
69
73
|
|
|
@@ -79,22 +83,26 @@ Refusal:
|
|
|
79
83
|
{
|
|
80
84
|
"verdict": "refuse",
|
|
81
85
|
"file": "<library path>",
|
|
82
|
-
"location": "<JSON Pointer
|
|
86
|
+
"location": "<JSON Pointer>",
|
|
83
87
|
"rule": "<rule id>",
|
|
88
|
+
"line": 5,
|
|
84
89
|
"referrers": ["<library path>"]
|
|
85
90
|
}
|
|
86
91
|
```
|
|
87
92
|
|
|
88
|
-
`location` is the JSON Pointer of the
|
|
89
|
-
|
|
90
|
-
the
|
|
93
|
+
`location` is the JSON Pointer of the value a rule concerns, such as `/shipping/city`, and is
|
|
94
|
+
omitted when the rule concerns none. `line` is the line, from 1, of the Document's source the value
|
|
95
|
+
is written on, present when the value is written; a missing one has none. `referrers` is present only for
|
|
91
96
|
`referenced-missing-file`. A schema refusal carries no `file`; its `location`
|
|
92
97
|
is the JSON Pointer of the schema part it concerns, such as
|
|
93
|
-
`/task/properties/title/type`, or `line <n>` for `schema-yaml`.
|
|
98
|
+
`/task/properties/title/type`, or `line <n>` for `schema-yaml`. A `frontmatter-fence` refusal of a
|
|
99
|
+
fence that does not parse carries as its `location` the construct it does not take, one of those
|
|
100
|
+
under [YAML subset](#yaml-subset), and as its `line` the line that construct is written on; one of
|
|
101
|
+
an unclosed fence carries neither.
|
|
94
102
|
|
|
95
103
|
## Rule ids
|
|
96
104
|
|
|
97
|
-
A
|
|
105
|
+
A value that fails a JSON Schema keyword is refused under that
|
|
98
106
|
keyword's name, such as `required`, `type`, `enum`, `format`, `pattern`,
|
|
99
107
|
`minimum`, `maxLength`, `maxItems` or `oneOf`, at the value's JSON Pointer; a
|
|
100
108
|
missing required key is named by the Pointer it would sit at. A malformed
|
|
@@ -113,25 +121,30 @@ schema text. The model's own rules:
|
|
|
113
121
|
| `$defs` | `$defs` is not a mapping |
|
|
114
122
|
| `$ref` | A `$ref` reaches no subschema under `#/$defs/` of the same file |
|
|
115
123
|
| `reference` | `reference` is not on a string or names something but a type, `any`, `attachment` |
|
|
116
|
-
| `sections` | A section is not `{ kind: text }` or `{ kind: list, items }` over one scalar |
|
|
117
124
|
| `member_document` | The mark is not a boolean, or a second type carries it |
|
|
118
|
-
| `
|
|
125
|
+
| `indexed` | `indexed` names a field a type cannot index, or more than its caller's bounds |
|
|
126
|
+
| `unique` | `unique` is not `true`, sits on a field its type does not name in `indexed` or anywhere but a field of a type's own `properties`, or is in an App's schema text |
|
|
127
|
+
| `duplicate-label` | Two fields of one object show one label: a field's `title`, else its key |
|
|
128
|
+
| `conflicting-label` | Declarations of one key in `anyOf`, `oneOf`, `then`, `else` or a composed shape give it two `title`s |
|
|
129
|
+
| `conflicting-type` | Such declarations give one key two JSON types, integer and number counting as one |
|
|
130
|
+
| `name-type` | A type's top-level `name` is not a string |
|
|
131
|
+
| `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 |
|
|
132
|
+
| `unknown-type` | A file declares a type absent from the governing schema, or other than its typed path requires it to name |
|
|
119
133
|
| `undeclared-field` | A closed object carries a key it does not declare |
|
|
120
|
-
| `
|
|
121
|
-
| `
|
|
122
|
-
| `
|
|
134
|
+
| `malformed-value` | A value is not written in its form, or a typed Document's frontmatter holds a key that is not House's |
|
|
135
|
+
| `repeated-value` | A value is written twice: two lines, a line and a heading, or two headings |
|
|
136
|
+
| `unknown-label` | A line, heading or column of a closed object names no field |
|
|
137
|
+
| `unresolved-reference` | A reference at any depth reaches no member it admits |
|
|
123
138
|
| `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 |
|
|
124
139
|
| `room-md-type` | `ROOM.md` declares a type |
|
|
125
|
-
| `
|
|
140
|
+
| `required-body` | A file at a typed path that requires a body has a body holding no text |
|
|
126
141
|
| `referenced-missing-file` | Remaining files still reference an absent path |
|
|
127
142
|
| `unwritable-link` | No Markdown destination form can carry a new link destination |
|
|
128
|
-
| `
|
|
129
|
-
|
|
130
|
-
A `then` or `else` of an `if` on a type, in its `allOf` or in such a branch may hold
|
|
131
|
-
`sections`, naming sections the type declares as the type declares them, else `sections`.
|
|
143
|
+
| `field-section` | A section change names a field's label rather than a free section; its location is that field's key |
|
|
144
|
+
| `unwritable-section` | A section change names a section no `## ` heading reads back as itself, such as one with surrounding spaces or a closing run of `#` |
|
|
132
145
|
|
|
133
|
-
`unwritable-link
|
|
134
|
-
|
|
146
|
+
`unwritable-link`, `field-section` and `unwritable-section` are refused by `apply`, not by
|
|
147
|
+
`validate`, so no case under `cases/` carries them.
|
|
135
148
|
|
|
136
149
|
A reference that admits `attachment` reaches any path in the same Library, so
|
|
137
150
|
neither `unresolved-reference` for an absent target nor
|
|
@@ -141,7 +154,27 @@ Library is accepted too, so `unresolved-link` never names it and
|
|
|
141
154
|
|
|
142
155
|
## YAML subset
|
|
143
156
|
|
|
144
|
-
Frontmatter and a schema text are each a mapping in a closed YAML
|
|
145
|
-
block and flow sequences, a block sequence item that opens a mapping, plain
|
|
146
|
-
|
|
147
|
-
|
|
157
|
+
Frontmatter and a schema text are each a mapping in a closed subset of YAML 1.2: block and flow
|
|
158
|
+
mappings, block and flow sequences, a block sequence item that opens a mapping, plain scalars, each
|
|
159
|
+
the rest of its line before a ` #` comment, quoted scalars closed on their line (a single-quoted
|
|
160
|
+
scalar doubles its apostrophe, a double-quoted one takes JSON's escapes), literal (`|`) and folded
|
|
161
|
+
(`>`) block scalars with their chomping (`-`, `+`) and indentation (`1` to `9`) indicators, read
|
|
162
|
+
as YAML 1.2 reads them, `true`, `false`, `null`, and decimal numbers. A mapping carries each key
|
|
163
|
+
once. YAML 1.1 boolean and timestamp aliases and octal numbers read as strings, and a plain scalar
|
|
164
|
+
that begins with `&`, `*` or `!` reads as its text, never as an anchor, an alias or a tag.
|
|
165
|
+
|
|
166
|
+
A frontmatter outside the subset is refused as `frontmatter-fence` naming one construct:
|
|
167
|
+
|
|
168
|
+
| Construct | What the frontmatter writes |
|
|
169
|
+
| ---------------------- | ------------------------------------------------------------------------------------------- |
|
|
170
|
+
| `multi-line-scalar` | A plain scalar continued on a deeper line, or a quoted scalar not closed on its line |
|
|
171
|
+
| `indentation` | A line deeper or shallower than its mapping or list, or a block scalar's leading empty line deeper than its first text |
|
|
172
|
+
| `tab` | A tab where indentation or a separating space stands |
|
|
173
|
+
| `mapping-entry` | A line of a block mapping that is no `key: value`, an explicit `?` key among them |
|
|
174
|
+
| `duplicate-key` | A key its mapping already carries |
|
|
175
|
+
| `block-scalar-header` | A block scalar header holding more than its indicators and a comment |
|
|
176
|
+
| `block-scalar-in-flow` | A block scalar inside a flow mapping or sequence |
|
|
177
|
+
| `flow-collection` | A flow mapping or sequence that does not close, or an entry of one it cannot read |
|
|
178
|
+
| `escape` | A double-quoted escape JSON does not define |
|
|
179
|
+
| `unheld-character` | A NUL or an unpaired surrogate, written or escaped |
|
|
180
|
+
| `nesting` | Collections nested more than 64 deep |
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
---
|
|
1
2
|
$defs:
|
|
2
3
|
address:
|
|
3
4
|
type: object
|
|
4
5
|
properties:
|
|
5
6
|
city: { type: string }
|
|
6
7
|
country: { type: string, pattern: '^[A-Z]{2}$' }
|
|
7
|
-
required: [city]
|
|
8
|
+
required: [ city ]
|
|
8
9
|
company:
|
|
9
10
|
properties:
|
|
10
11
|
name: { type: string }
|
|
@@ -13,13 +14,13 @@ deal:
|
|
|
13
14
|
properties:
|
|
14
15
|
title: { type: string, minLength: 1, maxLength: 40 }
|
|
15
16
|
company: { type: string, reference: company }
|
|
16
|
-
stage: { enum: [lead, proposal, won, lost], default: lead }
|
|
17
|
+
stage: { enum: [ lead, proposal, won, lost ], default: lead }
|
|
17
18
|
amount: { type: integer, minimum: 0 }
|
|
18
19
|
probability: { type: number, minimum: 0, maximum: 1 }
|
|
19
20
|
open: { type: boolean }
|
|
20
21
|
closes_at: { type: string, format: date-time }
|
|
21
22
|
contact_email: { type: string, format: email }
|
|
22
|
-
note: { type: [string, 'null'] }
|
|
23
|
+
note: { type: [ string, 'null' ] }
|
|
23
24
|
shipping: { $ref: '#/$defs/address' }
|
|
24
25
|
tags: { type: array, items: { type: string }, maxItems: 3 }
|
|
25
26
|
lines:
|
|
@@ -29,7 +30,7 @@ deal:
|
|
|
29
30
|
properties:
|
|
30
31
|
product: { type: string }
|
|
31
32
|
quantity: { type: integer, minimum: 1 }
|
|
32
|
-
required: [product, quantity]
|
|
33
|
+
required: [ product, quantity ]
|
|
33
34
|
blocks:
|
|
34
35
|
type: array
|
|
35
36
|
items:
|
|
@@ -37,20 +38,20 @@ deal:
|
|
|
37
38
|
- properties:
|
|
38
39
|
kind: { const: paragraph }
|
|
39
40
|
text: { type: string }
|
|
40
|
-
required: [kind, text]
|
|
41
|
+
required: [ kind, text ]
|
|
41
42
|
- properties:
|
|
42
43
|
kind: { const: quiz }
|
|
43
44
|
question: { type: string }
|
|
44
|
-
required: [kind, question]
|
|
45
|
+
required: [ kind, question ]
|
|
45
46
|
attributes:
|
|
46
47
|
type: object
|
|
47
48
|
additionalProperties: { type: string }
|
|
48
|
-
|
|
49
|
+
description: { type: string, contentMediaType: text/markdown, title: Description }
|
|
50
|
+
required: [ title, company, stage ]
|
|
49
51
|
if:
|
|
50
52
|
properties:
|
|
51
53
|
stage: { const: won }
|
|
52
|
-
required: [stage]
|
|
54
|
+
required: [ stage ]
|
|
53
55
|
then:
|
|
54
|
-
required: [amount]
|
|
55
|
-
|
|
56
|
-
Description: { kind: text }
|
|
56
|
+
required: [ amount ]
|
|
57
|
+
---
|
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
---
|
|
2
2
|
type: deal
|
|
3
|
-
title: Renewal
|
|
4
|
-
company: ../companies/acme.md
|
|
5
|
-
shipping:
|
|
6
|
-
city: Paris
|
|
7
|
-
depot: ../places/depot.md
|
|
8
|
-
lines:
|
|
9
|
-
- product: ../products/seats.md
|
|
10
|
-
quantity: 10
|
|
11
|
-
- { product: ../products/support.md, quantity: 1 }
|
|
12
|
-
contract: ../products/seats.md
|
|
13
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)
|
|
14
10
|
|
|
15
11
|
The yearly renewal.
|
|
12
|
+
|
|
13
|
+
## lines
|
|
14
|
+
|
|
15
|
+
| product | quantity |
|
|
16
|
+
| --- | --- |
|
|
17
|
+
| [Seats](../products/seats.md) | 10 |
|
|
18
|
+
| [Support](../products/support.md) | 1 |
|
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
---
|
|
2
2
|
type: deal
|
|
3
|
-
title: Renewal
|
|
4
|
-
company: ../companies/acme.md
|
|
5
|
-
shipping:
|
|
6
|
-
city: Paris
|
|
7
|
-
depot: ../places/depot.md
|
|
8
|
-
lines:
|
|
9
|
-
- product: ../products/seats.md
|
|
10
|
-
quantity: 10
|
|
11
|
-
- { product: ../products/support.md, quantity: 1 }
|
|
12
|
-
contract: ../assets/contract.pdf
|
|
13
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)
|
|
14
10
|
|
|
15
11
|
The yearly renewal.
|
|
12
|
+
|
|
13
|
+
## lines
|
|
14
|
+
|
|
15
|
+
| product | quantity |
|
|
16
|
+
| --- | --- |
|
|
17
|
+
| [Seats](../products/seats.md) | 10 |
|
|
18
|
+
| [Support](../products/support.md) | 1 |
|
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
---
|
|
2
2
|
type: deal
|
|
3
|
-
title: Renewal
|
|
4
|
-
company: ../companies/acme.md
|
|
5
|
-
shipping:
|
|
6
|
-
city: Paris
|
|
7
|
-
depot: ../places/depot.md
|
|
8
|
-
lines:
|
|
9
|
-
- product: ../products/seats.md
|
|
10
|
-
quantity: 10
|
|
11
|
-
- { product: ../products/support.md, quantity: 1 }
|
|
12
|
-
contract: /rooms/other/assets/contract.pdf
|
|
13
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)
|
|
14
10
|
|
|
15
11
|
The yearly renewal.
|
|
12
|
+
|
|
13
|
+
## lines
|
|
14
|
+
|
|
15
|
+
| product | quantity |
|
|
16
|
+
| --- | --- |
|
|
17
|
+
| [Seats](../products/seats.md) | 10 |
|
|
18
|
+
| [Support](../products/support.md) | 1 |
|