@agentshouse/mdmodel 0.1.0-alpha.9 → 0.1.0-c00ddc0c7ef71
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 +374 -0
- package/README.md +41 -197
- 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 +91 -34
- package/dist/definition.d.ts.map +1 -1
- package/dist/definition.js +889 -144
- package/dist/document.d.ts +20 -3
- package/dist/document.d.ts.map +1 -1
- package/dist/document.js +1042 -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 +42 -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 +920 -0
- package/dist/house-model.d.ts.map +1 -0
- package/dist/house-model.js +504 -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 +46 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +28 -6
- 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 +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 +31 -5
- package/dist/paths.d.ts.map +1 -1
- package/dist/paths.js +236 -35
- package/dist/pattern.d.ts +10 -0
- package/dist/pattern.d.ts.map +1 -0
- package/dist/pattern.js +356 -0
- 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 +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 +7 -0
- package/dist/reserved.d.ts.map +1 -0
- package/dist/reserved.js +32 -0
- 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 +6 -5
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +143 -41
- package/dist/types.d.ts +90 -11
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +1 -3
- package/dist/validate.d.ts +39 -2
- package/dist/validate.d.ts.map +1 -1
- package/dist/validate.js +419 -158
- package/dist/version.d.ts +1 -1
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +1 -3
- 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 +12 -4
- package/dist/yaml.d.ts.map +1 -1
- package/dist/yaml.js +455 -209
- package/fixtures/README.md +131 -67
- package/fixtures/cases/absent-link-dangles/library/item.md +8 -0
- package/fixtures/cases/absent-link-dangles/schema.md +7 -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.md +57 -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.md +7 -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.md +34 -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.md +34 -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.md +34 -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.md +6 -0
- package/fixtures/cases/binary-document-collision/expected.json +1 -2
- package/fixtures/cases/binary-document-collision/schema.md +3 -0
- package/fixtures/cases/binary-image-dangles/expected.json +1 -0
- package/fixtures/cases/binary-image-dangles/schema.md +3 -0
- package/fixtures/cases/binary-link-dangles/expected.json +1 -0
- package/fixtures/cases/binary-link-dangles/schema.md +3 -0
- package/fixtures/cases/binary-link-outside-collection/expected.json +1 -2
- package/fixtures/cases/binary-link-outside-collection/schema.md +3 -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.md +6 -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.md +7 -0
- package/fixtures/cases/block-scalar-frontmatter/context.json +1 -0
- package/fixtures/cases/block-scalar-frontmatter/expected.json +1 -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/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.md +57 -0
- 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/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.md +57 -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.md +15 -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.md +15 -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.md +5 -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.md +10 -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.md +57 -0
- package/fixtures/cases/declared-binary-links/schema.md +3 -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.md +57 -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.md +57 -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.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/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.md +57 -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.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 +3 -3
- package/fixtures/cases/field-enum/library/item.md +2 -2
- package/fixtures/cases/field-enum/schema.md +8 -0
- package/fixtures/cases/frontmatter-construct/context.json +1 -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/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.md +57 -0
- package/fixtures/cases/interrupted-link-definition/schema.md +3 -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.md +57 -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.md +11 -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.md +5 -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.md +5 -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.md +5 -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.md +5 -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.md +12 -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.md +57 -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.md +57 -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.md +34 -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.md +5 -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.md +5 -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.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/expected.json +2 -4
- package/fixtures/cases/malformed-definition/schema.md +5 -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/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.md +7 -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.md +9 -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.md +8 -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.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/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.md +13 -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.md +34 -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.md +34 -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.md +57 -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.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/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.md +57 -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.md +34 -0
- package/fixtures/cases/paragraph-link-definition/schema.md +3 -0
- package/fixtures/cases/prototype-field/expected.json +3 -3
- 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/expected.json +1 -2
- package/fixtures/cases/quoted-link-definition/library/notes/draft.md +1 -1
- 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/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.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/context.json +1 -0
- package/fixtures/cases/remote-ref/expected.json +5 -0
- package/fixtures/cases/remote-ref/schema.md +5 -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/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/schema-type-named-type/schema.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.md +6 -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.md +8 -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.md +7 -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.md +57 -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.md +6 -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.md +6 -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/expected.json +1 -2
- package/fixtures/cases/truncated-link-definition/library/notes/draft.md +1 -1
- 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/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.md +6 -0
- package/fixtures/cases/unclosed-frontmatter/expected.json +1 -2
- package/fixtures/cases/undeclared-field/expected.json +3 -3
- 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/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.md +12 -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.md +5 -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.md +5 -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/expected.json +1 -2
- package/fixtures/cases/unresolved-link/library/item.md +2 -2
- 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/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.d.ts +0 -3
- package/dist/project.d.ts.map +0 -1
- package/dist/project.js +0 -122
- 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/missing-section-item-kind/expected.json +0 -7
- package/fixtures/cases/missing-section-item-kind/library/types/task.md +0 -7
- package/fixtures/cases/paragraph-link-definition/library/types/note.md +0 -3
- package/fixtures/cases/prd-definition/library/types/task.md +0 -16
- package/fixtures/cases/prototype-field/library/types/task.md +0 -7
- 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/undeclared-field/library/types/task.md +0 -7
- 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 -13
- package/fixtures/cases/wide-item-fence-link/library/types/note.md +0 -3
- package/fixtures/projection.json +0 -186
- package/markdown-syntax-profile.md +0 -9
- /package/fixtures/cases/{missing-section-item-kind → absent-link-dangles}/context.json +0 -0
- /package/fixtures/cases/{prd-definition → absent-link-dangles}/expected.json +0 -0
- /package/fixtures/cases/{prd-definition → absent-optional-field}/context.json +0 -0
- /package/fixtures/cases/{structured-section → absolute-link}/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/dist/pattern.js
ADDED
|
@@ -0,0 +1,356 @@
|
|
|
1
|
+
const NativeRegExp = RegExp;
|
|
2
|
+
export const PATTERN_STATES = 1_000;
|
|
3
|
+
const VISIT_BUDGET = 100_000_000;
|
|
4
|
+
const HELD_PATTERNS = 512;
|
|
5
|
+
export class PatternTooCostly extends Error {
|
|
6
|
+
}
|
|
7
|
+
let scope = null;
|
|
8
|
+
const ASCII = 128;
|
|
9
|
+
class Unsupported extends Error {
|
|
10
|
+
}
|
|
11
|
+
const ATOM = 0;
|
|
12
|
+
const SPLIT = 1;
|
|
13
|
+
const ASSERT = 2;
|
|
14
|
+
const MATCH = 3;
|
|
15
|
+
class Atom {
|
|
16
|
+
literal;
|
|
17
|
+
ascii = new Int8Array(ASCII);
|
|
18
|
+
matcher;
|
|
19
|
+
constructor(source, literal) {
|
|
20
|
+
this.literal = literal;
|
|
21
|
+
this.matcher = new NativeRegExp(`^(?:${source})$`, 'u');
|
|
22
|
+
}
|
|
23
|
+
holds(point) {
|
|
24
|
+
if (this.literal !== null)
|
|
25
|
+
return point === this.literal;
|
|
26
|
+
if (point >= ASCII)
|
|
27
|
+
return this.matcher.test(String.fromCodePoint(point));
|
|
28
|
+
const known = this.ascii[point];
|
|
29
|
+
if (known !== 0)
|
|
30
|
+
return known > 0;
|
|
31
|
+
const held = this.matcher.test(String.fromCharCode(point));
|
|
32
|
+
this.ascii[point] = held ? 1 : -1;
|
|
33
|
+
return held;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
class Reader {
|
|
37
|
+
source;
|
|
38
|
+
at = 0;
|
|
39
|
+
constructor(source) {
|
|
40
|
+
this.source = source;
|
|
41
|
+
}
|
|
42
|
+
peek(offset = 0) {
|
|
43
|
+
return this.source[this.at + offset];
|
|
44
|
+
}
|
|
45
|
+
starts(text) {
|
|
46
|
+
return this.source.startsWith(text, this.at);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
function digits(reader) {
|
|
50
|
+
const from = reader.at;
|
|
51
|
+
while (/[0-9]/.test(reader.peek() ?? ''))
|
|
52
|
+
reader.at += 1;
|
|
53
|
+
return reader.at === from ? null : Number(reader.source.slice(from, reader.at));
|
|
54
|
+
}
|
|
55
|
+
function escapeEnd(source, at) {
|
|
56
|
+
const next = source[at + 1];
|
|
57
|
+
if (next === 'c')
|
|
58
|
+
return at + 3;
|
|
59
|
+
if (next === 'x')
|
|
60
|
+
return at + 4;
|
|
61
|
+
if ((next === 'u' && source[at + 2] === '{') || next === 'p' || next === 'P')
|
|
62
|
+
return source.indexOf('}', at + 2) + 1;
|
|
63
|
+
if (next !== 'u')
|
|
64
|
+
return at + 2;
|
|
65
|
+
const end = at + 6;
|
|
66
|
+
const lead = Number.parseInt(source.slice(at + 2, end), 16);
|
|
67
|
+
const trail = /^\\u([0-9a-fA-F]{4})$/.exec(source.slice(end, end + 6))?.[1];
|
|
68
|
+
const paired = lead >= 0xd800 &&
|
|
69
|
+
lead <= 0xdbff &&
|
|
70
|
+
trail !== undefined &&
|
|
71
|
+
Number.parseInt(trail, 16) >= 0xdc00 &&
|
|
72
|
+
Number.parseInt(trail, 16) <= 0xdfff;
|
|
73
|
+
return paired ? end + 6 : end;
|
|
74
|
+
}
|
|
75
|
+
function classEnd(source, at) {
|
|
76
|
+
let i = at + 1;
|
|
77
|
+
while (source[i] !== ']')
|
|
78
|
+
i += source[i] === '\\' ? 2 : 1;
|
|
79
|
+
return i + 1;
|
|
80
|
+
}
|
|
81
|
+
function escaped(reader) {
|
|
82
|
+
const next = reader.peek(1);
|
|
83
|
+
if (next === 'b' || next === 'B') {
|
|
84
|
+
reader.at += 2;
|
|
85
|
+
return { kind: 'assert', assertion: next === 'b' ? 'boundary' : 'inside' };
|
|
86
|
+
}
|
|
87
|
+
if (/[1-9k]/.test(next))
|
|
88
|
+
throw new Unsupported();
|
|
89
|
+
const end = escapeEnd(reader.source, reader.at);
|
|
90
|
+
const source = reader.source.slice(reader.at, end);
|
|
91
|
+
reader.at = end;
|
|
92
|
+
return { kind: 'atom', source, literal: false };
|
|
93
|
+
}
|
|
94
|
+
function group(reader) {
|
|
95
|
+
reader.at += 1;
|
|
96
|
+
if (reader.starts('?:'))
|
|
97
|
+
reader.at += 2;
|
|
98
|
+
else if (reader.starts('?<') && !reader.starts('?<=') && !reader.starts('?<!'))
|
|
99
|
+
reader.at = reader.source.indexOf('>', reader.at) + 1;
|
|
100
|
+
else if (reader.peek() === '?')
|
|
101
|
+
throw new Unsupported();
|
|
102
|
+
const alternatives = disjunction(reader);
|
|
103
|
+
reader.at += 1;
|
|
104
|
+
return { kind: 'group', alternatives };
|
|
105
|
+
}
|
|
106
|
+
function atom(reader) {
|
|
107
|
+
const character = reader.peek();
|
|
108
|
+
if (character === '^' || character === '$') {
|
|
109
|
+
reader.at += 1;
|
|
110
|
+
return { kind: 'assert', assertion: character === '^' ? 'start' : 'end' };
|
|
111
|
+
}
|
|
112
|
+
if (character === '\\')
|
|
113
|
+
return escaped(reader);
|
|
114
|
+
if (character === '(')
|
|
115
|
+
return group(reader);
|
|
116
|
+
if (character === '[' || character === '.') {
|
|
117
|
+
const end = character === '[' ? classEnd(reader.source, reader.at) : reader.at + 1;
|
|
118
|
+
const source = reader.source.slice(reader.at, end);
|
|
119
|
+
reader.at = end;
|
|
120
|
+
return { kind: 'atom', source, literal: false };
|
|
121
|
+
}
|
|
122
|
+
const source = String.fromCodePoint(reader.source.codePointAt(reader.at));
|
|
123
|
+
reader.at += source.length;
|
|
124
|
+
return { kind: 'atom', source, literal: true };
|
|
125
|
+
}
|
|
126
|
+
function quantified(reader, node) {
|
|
127
|
+
const sign = reader.peek();
|
|
128
|
+
let least = 1;
|
|
129
|
+
let most = 1;
|
|
130
|
+
if (sign === '*' || sign === '+' || sign === '?') {
|
|
131
|
+
reader.at += 1;
|
|
132
|
+
least = sign === '+' ? 1 : 0;
|
|
133
|
+
most = sign === '?' ? 1 : Infinity;
|
|
134
|
+
}
|
|
135
|
+
else if (sign === '{') {
|
|
136
|
+
reader.at += 1;
|
|
137
|
+
least = digits(reader);
|
|
138
|
+
most = least;
|
|
139
|
+
if (reader.peek() === ',') {
|
|
140
|
+
reader.at += 1;
|
|
141
|
+
most = digits(reader) ?? Infinity;
|
|
142
|
+
}
|
|
143
|
+
reader.at += 1;
|
|
144
|
+
}
|
|
145
|
+
else
|
|
146
|
+
return { node, least, most };
|
|
147
|
+
if (reader.peek() === '?')
|
|
148
|
+
reader.at += 1;
|
|
149
|
+
if (least > PATTERN_STATES || (Number.isFinite(most) && most > PATTERN_STATES))
|
|
150
|
+
throw new Unsupported();
|
|
151
|
+
return { node, least, most };
|
|
152
|
+
}
|
|
153
|
+
function disjunction(reader) {
|
|
154
|
+
const alternatives = [[]];
|
|
155
|
+
while (reader.at < reader.source.length && reader.peek() !== ')') {
|
|
156
|
+
if (reader.peek() === '|') {
|
|
157
|
+
reader.at += 1;
|
|
158
|
+
alternatives.push([]);
|
|
159
|
+
continue;
|
|
160
|
+
}
|
|
161
|
+
alternatives.at(-1).push(quantified(reader, atom(reader)));
|
|
162
|
+
}
|
|
163
|
+
return alternatives;
|
|
164
|
+
}
|
|
165
|
+
class Machine {
|
|
166
|
+
kinds = [];
|
|
167
|
+
outs = [];
|
|
168
|
+
alternates = [];
|
|
169
|
+
atoms = [];
|
|
170
|
+
assertions = [];
|
|
171
|
+
atomed = new Map();
|
|
172
|
+
state(kind, out, alternate = -1) {
|
|
173
|
+
if (this.kinds.length >= PATTERN_STATES)
|
|
174
|
+
throw new Unsupported();
|
|
175
|
+
this.kinds.push(kind);
|
|
176
|
+
this.outs.push(out);
|
|
177
|
+
this.alternates.push(alternate);
|
|
178
|
+
return this.kinds.length - 1;
|
|
179
|
+
}
|
|
180
|
+
atom(source, literal) {
|
|
181
|
+
const known = this.atomed.get(source);
|
|
182
|
+
if (known !== undefined)
|
|
183
|
+
return known;
|
|
184
|
+
this.atoms.push(new Atom(source, literal ? source.codePointAt(0) : null));
|
|
185
|
+
this.atomed.set(source, this.atoms.length - 1);
|
|
186
|
+
return this.atoms.length - 1;
|
|
187
|
+
}
|
|
188
|
+
node(node, next) {
|
|
189
|
+
if (node.kind === 'atom')
|
|
190
|
+
return this.state(ATOM, next, this.atom(node.source, node.literal));
|
|
191
|
+
if (node.kind === 'assert') {
|
|
192
|
+
this.assertions.push(node.assertion);
|
|
193
|
+
return this.state(ASSERT, next, this.assertions.length - 1);
|
|
194
|
+
}
|
|
195
|
+
return this.alternatives(node.alternatives, next);
|
|
196
|
+
}
|
|
197
|
+
alternatives(alternatives, next) {
|
|
198
|
+
let entry = this.sequence(alternatives.at(-1), next);
|
|
199
|
+
for (let index = alternatives.length - 2; index >= 0; index -= 1)
|
|
200
|
+
entry = this.state(SPLIT, this.sequence(alternatives[index], next), entry);
|
|
201
|
+
return entry;
|
|
202
|
+
}
|
|
203
|
+
sequence(terms, next) {
|
|
204
|
+
let entry = next;
|
|
205
|
+
for (let index = terms.length - 1; index >= 0; index -= 1)
|
|
206
|
+
entry = this.term(terms[index], entry);
|
|
207
|
+
return entry;
|
|
208
|
+
}
|
|
209
|
+
term({ node, least, most }, next) {
|
|
210
|
+
if (least === 1 && most === 1)
|
|
211
|
+
return this.node(node, next);
|
|
212
|
+
let entry = next;
|
|
213
|
+
if (most === Infinity) {
|
|
214
|
+
const loop = this.state(SPLIT, -1, next);
|
|
215
|
+
const body = this.node(node, loop);
|
|
216
|
+
if (body === loop)
|
|
217
|
+
return next;
|
|
218
|
+
this.outs[loop] = body;
|
|
219
|
+
entry = loop;
|
|
220
|
+
}
|
|
221
|
+
else
|
|
222
|
+
for (let copy = least; copy < most; copy += 1) {
|
|
223
|
+
const body = this.node(node, entry);
|
|
224
|
+
if (body === entry)
|
|
225
|
+
return next;
|
|
226
|
+
entry = this.state(SPLIT, body, entry);
|
|
227
|
+
}
|
|
228
|
+
for (let copy = 0; copy < least; copy += 1) {
|
|
229
|
+
const body = this.node(node, entry);
|
|
230
|
+
if (body === entry)
|
|
231
|
+
return next;
|
|
232
|
+
entry = body;
|
|
233
|
+
}
|
|
234
|
+
return entry;
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
function word(point) {
|
|
238
|
+
return ((point >= 0x30 && point <= 0x39) ||
|
|
239
|
+
(point >= 0x41 && point <= 0x5a) ||
|
|
240
|
+
(point >= 0x61 && point <= 0x7a) ||
|
|
241
|
+
point === 0x5f);
|
|
242
|
+
}
|
|
243
|
+
function holds(assertion, at, point, across) {
|
|
244
|
+
if (assertion === 'start')
|
|
245
|
+
return at === 0;
|
|
246
|
+
if (assertion === 'end')
|
|
247
|
+
return point === -1;
|
|
248
|
+
return assertion === 'boundary' ? across : !across;
|
|
249
|
+
}
|
|
250
|
+
class Linear {
|
|
251
|
+
machine;
|
|
252
|
+
start;
|
|
253
|
+
marks;
|
|
254
|
+
generation = 0;
|
|
255
|
+
constructor(machine, start) {
|
|
256
|
+
this.machine = machine;
|
|
257
|
+
this.start = start;
|
|
258
|
+
this.marks = new Float64Array(machine.kinds.length);
|
|
259
|
+
}
|
|
260
|
+
test(text) {
|
|
261
|
+
const { kinds, outs, alternates, atoms, assertions } = this.machine;
|
|
262
|
+
const marks = this.marks;
|
|
263
|
+
const budget = scope ?? { left: VISIT_BUDGET };
|
|
264
|
+
let seeds = [];
|
|
265
|
+
let wordBefore = false;
|
|
266
|
+
for (let at = 0;;) {
|
|
267
|
+
const point = at < text.length ? text.codePointAt(at) : -1;
|
|
268
|
+
const wordAt = word(point);
|
|
269
|
+
const across = wordBefore !== wordAt;
|
|
270
|
+
const generation = (this.generation += 1);
|
|
271
|
+
const active = [];
|
|
272
|
+
seeds.push(this.start);
|
|
273
|
+
while (seeds.length > 0) {
|
|
274
|
+
const state = seeds.pop();
|
|
275
|
+
if (marks[state] === generation)
|
|
276
|
+
continue;
|
|
277
|
+
marks[state] = generation;
|
|
278
|
+
if ((budget.left -= 1) < 0)
|
|
279
|
+
throw new PatternTooCostly();
|
|
280
|
+
const kind = kinds[state];
|
|
281
|
+
if (kind === MATCH)
|
|
282
|
+
return true;
|
|
283
|
+
if (kind === ATOM)
|
|
284
|
+
active.push(state);
|
|
285
|
+
else if (kind === SPLIT)
|
|
286
|
+
seeds.push(alternates[state], outs[state]);
|
|
287
|
+
else if (holds(assertions[alternates[state]], at, point, across))
|
|
288
|
+
seeds.push(outs[state]);
|
|
289
|
+
}
|
|
290
|
+
if (point === -1)
|
|
291
|
+
return false;
|
|
292
|
+
for (const state of active)
|
|
293
|
+
if (atoms[alternates[state]].holds(point))
|
|
294
|
+
seeds.push(outs[state]);
|
|
295
|
+
wordBefore = wordAt;
|
|
296
|
+
at += point > 0xffff ? 2 : 1;
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
function compiled(source) {
|
|
301
|
+
try {
|
|
302
|
+
new NativeRegExp(source, 'u');
|
|
303
|
+
}
|
|
304
|
+
catch {
|
|
305
|
+
return null;
|
|
306
|
+
}
|
|
307
|
+
try {
|
|
308
|
+
const alternatives = disjunction(new Reader(source));
|
|
309
|
+
const machine = new Machine();
|
|
310
|
+
const start = machine.alternatives(alternatives, machine.state(MATCH, -1));
|
|
311
|
+
return new Linear(machine, start);
|
|
312
|
+
}
|
|
313
|
+
catch (error) {
|
|
314
|
+
if (error instanceof Unsupported)
|
|
315
|
+
return null;
|
|
316
|
+
throw error;
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
const held = new Map();
|
|
320
|
+
export function linearPattern(source) {
|
|
321
|
+
if (held.has(source))
|
|
322
|
+
return held.get(source);
|
|
323
|
+
const made = compiled(source);
|
|
324
|
+
if (held.size >= HELD_PATTERNS)
|
|
325
|
+
held.delete(held.keys().next().value);
|
|
326
|
+
held.set(source, made);
|
|
327
|
+
return made;
|
|
328
|
+
}
|
|
329
|
+
export function withLinearRegExp(run) {
|
|
330
|
+
const native = globalThis.RegExp;
|
|
331
|
+
function LinearRegExp(source) {
|
|
332
|
+
new NativeRegExp(source, 'u');
|
|
333
|
+
return {
|
|
334
|
+
test(text) {
|
|
335
|
+
const pattern = linearPattern(source);
|
|
336
|
+
if (pattern === null)
|
|
337
|
+
throw new SyntaxError(`the pattern ${source} is not linear`);
|
|
338
|
+
return pattern.test(text);
|
|
339
|
+
},
|
|
340
|
+
};
|
|
341
|
+
}
|
|
342
|
+
globalThis.RegExp = LinearRegExp;
|
|
343
|
+
try {
|
|
344
|
+
return run();
|
|
345
|
+
}
|
|
346
|
+
finally {
|
|
347
|
+
globalThis.RegExp = native;
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
export function openPatternBudget() {
|
|
351
|
+
const outer = scope;
|
|
352
|
+
scope = outer ?? { left: VISIT_BUDGET };
|
|
353
|
+
return () => {
|
|
354
|
+
scope = outer;
|
|
355
|
+
};
|
|
356
|
+
}
|
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
import { type Definition, type ValueFacts } from '../definition.js';
|
|
2
|
+
export type Value = string | number | boolean | null;
|
|
3
|
+
export type Predicate = Value | {
|
|
4
|
+
$eq: Value;
|
|
5
|
+
} | {
|
|
6
|
+
$ne: Value;
|
|
7
|
+
} | {
|
|
8
|
+
$in: readonly Value[];
|
|
9
|
+
} | {
|
|
10
|
+
$nin: readonly Value[];
|
|
11
|
+
} | {
|
|
12
|
+
$gt?: Value;
|
|
13
|
+
$gte?: Value;
|
|
14
|
+
$lt?: Value;
|
|
15
|
+
$lte?: Value;
|
|
16
|
+
} | {
|
|
17
|
+
$all: readonly Value[];
|
|
18
|
+
} | {
|
|
19
|
+
$size: number;
|
|
20
|
+
} | {
|
|
21
|
+
$exists: boolean;
|
|
22
|
+
} | {
|
|
23
|
+
$prefix: string;
|
|
24
|
+
};
|
|
25
|
+
export type Where = {
|
|
26
|
+
$and?: readonly Where[];
|
|
27
|
+
$or?: readonly Where[];
|
|
28
|
+
[field: string]: Predicate | readonly Where[] | undefined;
|
|
29
|
+
};
|
|
30
|
+
export type Related = {
|
|
31
|
+
types?: readonly string[];
|
|
32
|
+
where?: Where;
|
|
33
|
+
pathPrefix?: string;
|
|
34
|
+
};
|
|
35
|
+
export type Filter = {
|
|
36
|
+
rooms?: readonly string[];
|
|
37
|
+
types?: readonly string[];
|
|
38
|
+
where?: Where;
|
|
39
|
+
pathPrefix?: string;
|
|
40
|
+
outside?: readonly string[];
|
|
41
|
+
folder?: string;
|
|
42
|
+
paths?: readonly string[];
|
|
43
|
+
fileIds?: readonly string[];
|
|
44
|
+
hop?: Related & {
|
|
45
|
+
field: string;
|
|
46
|
+
none?: true;
|
|
47
|
+
};
|
|
48
|
+
backlinks?: Related & {
|
|
49
|
+
field?: string;
|
|
50
|
+
};
|
|
51
|
+
text?: string;
|
|
52
|
+
};
|
|
53
|
+
export type Key = 'room' | 'path' | 'type' | 'folder' | 'size' | 'created' | 'updated' | {
|
|
54
|
+
field: string;
|
|
55
|
+
};
|
|
56
|
+
export type GroupKey = 'room' | 'type' | 'folder' | 'subfolder' | {
|
|
57
|
+
field: string;
|
|
58
|
+
};
|
|
59
|
+
export type Select = 'all' | {
|
|
60
|
+
fields?: 'all' | readonly string[];
|
|
61
|
+
sections?: 'all' | readonly string[];
|
|
62
|
+
preamble?: true;
|
|
63
|
+
markdown?: true;
|
|
64
|
+
backlinks?: true;
|
|
65
|
+
change?: true;
|
|
66
|
+
fileId?: true;
|
|
67
|
+
revision?: true;
|
|
68
|
+
size?: true;
|
|
69
|
+
created?: true;
|
|
70
|
+
};
|
|
71
|
+
export type GroupSelect = {
|
|
72
|
+
size?: true;
|
|
73
|
+
updated?: true;
|
|
74
|
+
greatest?: {
|
|
75
|
+
field: string;
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
export type GroupOrder = 'count' | 'size' | 'updated' | 'greatest';
|
|
79
|
+
export type OrderOptions = {
|
|
80
|
+
nulls?: 'first' | 'last';
|
|
81
|
+
stringSort?: 'lexical' | 'locale';
|
|
82
|
+
locale?: string;
|
|
83
|
+
localeOptions?: Readonly<Record<string, unknown>>;
|
|
84
|
+
};
|
|
85
|
+
export type Direction = 'asc' | 'desc';
|
|
86
|
+
export type DocumentQuery = Filter & {
|
|
87
|
+
select: Select;
|
|
88
|
+
orderBy?: readonly ({
|
|
89
|
+
by: Key;
|
|
90
|
+
direction?: Direction;
|
|
91
|
+
} & OrderOptions)[];
|
|
92
|
+
limit?: number;
|
|
93
|
+
after?: string;
|
|
94
|
+
total?: true;
|
|
95
|
+
};
|
|
96
|
+
export type GroupQuery = Filter & {
|
|
97
|
+
groupBy: readonly GroupKey[];
|
|
98
|
+
select?: GroupSelect;
|
|
99
|
+
orderBy?: readonly {
|
|
100
|
+
by: GroupOrder | GroupKey;
|
|
101
|
+
direction?: Direction;
|
|
102
|
+
nulls?: 'first' | 'last';
|
|
103
|
+
}[];
|
|
104
|
+
limit?: number;
|
|
105
|
+
after?: string;
|
|
106
|
+
total?: true;
|
|
107
|
+
};
|
|
108
|
+
export type LocalQuery = DocumentQuery | GroupQuery;
|
|
109
|
+
export type QueryErrorCode = 'invalid-query' | 'unknown-type' | 'unknown-field' | 'wrong-kind';
|
|
110
|
+
export type RoomFacts = {
|
|
111
|
+
locator: string;
|
|
112
|
+
available: boolean;
|
|
113
|
+
types: readonly Definition[];
|
|
114
|
+
};
|
|
115
|
+
export type HeldRooms = {
|
|
116
|
+
listed: boolean;
|
|
117
|
+
rooms: readonly RoomFacts[];
|
|
118
|
+
};
|
|
119
|
+
export type Test = {
|
|
120
|
+
op: 'eq';
|
|
121
|
+
value: Value;
|
|
122
|
+
} | {
|
|
123
|
+
op: 'ne';
|
|
124
|
+
value: Value;
|
|
125
|
+
} | {
|
|
126
|
+
op: 'in';
|
|
127
|
+
values: readonly Value[];
|
|
128
|
+
} | {
|
|
129
|
+
op: 'nin';
|
|
130
|
+
values: readonly Value[];
|
|
131
|
+
} | {
|
|
132
|
+
op: 'range';
|
|
133
|
+
bounds: readonly (readonly ['gt' | 'gte' | 'lt' | 'lte', Value])[];
|
|
134
|
+
} | {
|
|
135
|
+
op: 'all';
|
|
136
|
+
values: readonly Value[];
|
|
137
|
+
} | {
|
|
138
|
+
op: 'size';
|
|
139
|
+
size: number;
|
|
140
|
+
} | {
|
|
141
|
+
op: 'exists';
|
|
142
|
+
exists: boolean;
|
|
143
|
+
} | {
|
|
144
|
+
op: 'prefix';
|
|
145
|
+
prefix: string;
|
|
146
|
+
};
|
|
147
|
+
export type Clause = {
|
|
148
|
+
every: readonly Clause[];
|
|
149
|
+
} | {
|
|
150
|
+
some: readonly Clause[];
|
|
151
|
+
} | {
|
|
152
|
+
field: string;
|
|
153
|
+
test: Test;
|
|
154
|
+
};
|
|
155
|
+
export type Scope = {
|
|
156
|
+
types: readonly string[] | null;
|
|
157
|
+
where: Clause | null;
|
|
158
|
+
pathPrefix: string | null;
|
|
159
|
+
};
|
|
160
|
+
export type KeyPlan = {
|
|
161
|
+
of: 'room';
|
|
162
|
+
} | {
|
|
163
|
+
of: 'path';
|
|
164
|
+
} | {
|
|
165
|
+
of: 'type';
|
|
166
|
+
} | {
|
|
167
|
+
of: 'folder';
|
|
168
|
+
} | {
|
|
169
|
+
of: 'subfolder';
|
|
170
|
+
} | {
|
|
171
|
+
of: 'size';
|
|
172
|
+
} | {
|
|
173
|
+
of: 'created';
|
|
174
|
+
} | {
|
|
175
|
+
of: 'updated';
|
|
176
|
+
} | {
|
|
177
|
+
of: 'field';
|
|
178
|
+
field: string;
|
|
179
|
+
};
|
|
180
|
+
export type DocumentShape = {
|
|
181
|
+
kind: 'documents';
|
|
182
|
+
fields: 'all' | readonly string[] | null;
|
|
183
|
+
sections: 'all' | readonly string[] | null;
|
|
184
|
+
preamble: boolean;
|
|
185
|
+
markdown: boolean;
|
|
186
|
+
backlinks: boolean;
|
|
187
|
+
change: boolean;
|
|
188
|
+
fileId: boolean;
|
|
189
|
+
revision: boolean;
|
|
190
|
+
size: boolean;
|
|
191
|
+
created: boolean;
|
|
192
|
+
orderBy: readonly {
|
|
193
|
+
key: KeyPlan;
|
|
194
|
+
options: OrderOptions & {
|
|
195
|
+
direction: Direction;
|
|
196
|
+
};
|
|
197
|
+
}[];
|
|
198
|
+
};
|
|
199
|
+
export type GroupShape = {
|
|
200
|
+
kind: 'groups';
|
|
201
|
+
groupBy: readonly KeyPlan[];
|
|
202
|
+
size: boolean;
|
|
203
|
+
updated: boolean;
|
|
204
|
+
greatest: string | null;
|
|
205
|
+
orderBy: readonly {
|
|
206
|
+
by: GroupOrder | number;
|
|
207
|
+
direction: Direction;
|
|
208
|
+
nulls: 'first' | 'last' | null;
|
|
209
|
+
}[];
|
|
210
|
+
};
|
|
211
|
+
export type Continuation = {
|
|
212
|
+
text: string;
|
|
213
|
+
values: readonly unknown[] | null;
|
|
214
|
+
};
|
|
215
|
+
export type QueryPlan = {
|
|
216
|
+
key: string;
|
|
217
|
+
rooms: readonly string[] | null;
|
|
218
|
+
root: Scope;
|
|
219
|
+
outside: readonly string[] | null;
|
|
220
|
+
folder: string | null;
|
|
221
|
+
paths: readonly string[] | null;
|
|
222
|
+
fileIds: readonly string[] | null;
|
|
223
|
+
hop: (Scope & {
|
|
224
|
+
field: string;
|
|
225
|
+
none: boolean;
|
|
226
|
+
}) | null;
|
|
227
|
+
backlinks: (Scope & {
|
|
228
|
+
field: string | null;
|
|
229
|
+
}) | null;
|
|
230
|
+
text: string | null;
|
|
231
|
+
shape: DocumentShape | GroupShape;
|
|
232
|
+
limit: number | null;
|
|
233
|
+
after: Continuation | null;
|
|
234
|
+
total: boolean;
|
|
235
|
+
};
|
|
236
|
+
export type Place = readonly (string | number)[];
|
|
237
|
+
type At = Place | string;
|
|
238
|
+
export declare class QueryError extends Error {
|
|
239
|
+
readonly code: QueryErrorCode;
|
|
240
|
+
readonly place: Place;
|
|
241
|
+
readonly accepts: readonly string[];
|
|
242
|
+
readonly retryable = false;
|
|
243
|
+
constructor(code: QueryErrorCode, at: At, problem: string, accepts?: readonly string[]);
|
|
244
|
+
}
|
|
245
|
+
type Entries = Readonly<Record<string, unknown>>;
|
|
246
|
+
export declare function bodied(shape: DocumentShape): boolean;
|
|
247
|
+
export declare function invalid(at: At, problem: string, accepts?: readonly string[]): never;
|
|
248
|
+
export declare function placeText(at: Place): string;
|
|
249
|
+
export declare function known(value: Entries, allowed: readonly string[], at: At): void;
|
|
250
|
+
export declare function textless(facts: ValueFacts): boolean;
|
|
251
|
+
export declare function planOf(input: unknown, facts: HeldRooms): QueryPlan;
|
|
252
|
+
export declare function cursorOf(values: readonly unknown[]): string;
|
|
253
|
+
export declare function decodedCursor(text: string): readonly unknown[] | null;
|
|
254
|
+
export declare function queryKey(query: unknown): string;
|
|
255
|
+
export declare function identityOf(plan: QueryPlan): string;
|
|
256
|
+
export {};
|
|
257
|
+
//# sourceMappingURL=language.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"language.d.ts","sourceRoot":"","sources":["../../src/query/language.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,UAAU,EAEf,KAAK,UAAU,EAChB,MAAM,kBAAkB,CAAC;AAK1B,MAAM,MAAM,KAAK,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,CAAC;AAErD,MAAM,MAAM,SAAS,GACjB,KAAK,GACL;IAAE,GAAG,EAAE,KAAK,CAAA;CAAE,GACd;IAAE,GAAG,EAAE,KAAK,CAAA;CAAE,GACd;IAAE,GAAG,EAAE,SAAS,KAAK,EAAE,CAAA;CAAE,GACzB;IAAE,IAAI,EAAE,SAAS,KAAK,EAAE,CAAA;CAAE,GAC1B;IAAE,GAAG,CAAC,EAAE,KAAK,CAAC;IAAC,IAAI,CAAC,EAAE,KAAK,CAAC;IAAC,GAAG,CAAC,EAAE,KAAK,CAAC;IAAC,IAAI,CAAC,EAAE,KAAK,CAAA;CAAE,GACxD;IAAE,IAAI,EAAE,SAAS,KAAK,EAAE,CAAA;CAAE,GAC1B;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GACjB;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,GACpB;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAExB,MAAM,MAAM,KAAK,GAAG;IAClB,IAAI,CAAC,EAAE,SAAS,KAAK,EAAE,CAAC;IACxB,GAAG,CAAC,EAAE,SAAS,KAAK,EAAE,CAAC;IACvB,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,KAAK,EAAE,GAAG,SAAS,CAAC;CAC3D,CAAC;AAEF,MAAM,MAAM,OAAO,GAAG;IAAE,KAAK,CAAC,EAAE,SAAS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