@agentshouse/mdmodel 0.1.0-ce4af152f38d8 → 0.1.0-ce6172ed6fa4c
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 +136 -103
- package/README.md +13 -13
- 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 +18 -9
- package/dist/definition.d.ts.map +1 -1
- package/dist/definition.js +157 -111
- package/dist/divide.d.ts.map +1 -1
- package/dist/divide.js +5 -4
- package/dist/document.d.ts +13 -7
- package/dist/document.d.ts.map +1 -1
- package/dist/document.js +698 -107
- package/dist/event.d.ts +1 -2
- package/dist/event.d.ts.map +1 -1
- package/dist/event.js +1 -2
- package/dist/facts.d.ts.map +1 -1
- package/dist/facts.js +3 -0
- package/dist/fields.d.ts +1 -1
- package/dist/fields.d.ts.map +1 -1
- package/dist/fields.js +1 -1
- 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 +827 -0
- package/dist/house-model.d.ts.map +1 -0
- package/dist/house-model.js +459 -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 +19 -9
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -5
- package/dist/markdown.d.ts +75 -0
- package/dist/markdown.d.ts.map +1 -0
- package/dist/markdown.js +265 -0
- package/dist/media-type.d.ts +72 -0
- package/dist/media-type.d.ts.map +1 -0
- package/dist/media-type.js +157 -0
- package/dist/paths.d.ts +10 -1
- package/dist/paths.d.ts.map +1 -1
- package/dist/paths.js +74 -19
- package/dist/project.d.ts.map +1 -1
- package/dist/project.js +29 -54
- package/dist/refuse.d.ts +1 -0
- package/dist/refuse.d.ts.map +1 -1
- package/dist/refuse.js +1 -0
- package/dist/room-types.d.ts +7 -0
- package/dist/room-types.d.ts.map +1 -0
- package/dist/room-types.js +137 -0
- package/dist/schema.d.ts +0 -2
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +5 -68
- package/dist/types.d.ts +10 -7
- package/dist/types.d.ts.map +1 -1
- package/dist/validate.d.ts +4 -2
- package/dist/validate.d.ts.map +1 -1
- package/dist/validate.js +102 -173
- package/fixtures/README.md +40 -23
- package/fixtures/cases/absent-link-dangles/library/item.md +1 -1
- package/fixtures/cases/absent-link-dangles/schema.yaml +2 -3
- 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/absent-optional-field/schema.yaml +10 -11
- package/fixtures/cases/absolute-link/library/item.md +1 -1
- package/fixtures/cases/absolute-link/schema.yaml +2 -3
- 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-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-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/binary-any-reference/expected.json +2 -1
- package/fixtures/cases/binary-any-reference/library/notes/draft.md +1 -1
- 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-typed-reference/expected.json +2 -1
- package/fixtures/cases/binary-typed-reference/library/notes/draft.md +1 -1
- 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/boolean-field/schema.yaml +10 -11
- package/fixtures/cases/bracketed-link-definition/library/item.md +1 -1
- package/fixtures/cases/bracketed-link-definition/schema.yaml +2 -3
- 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 +10 -11
- package/fixtures/cases/composed-root-reference/library/a.md +2 -2
- 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.yaml +13 -0
- package/fixtures/cases/cross-room-link/library/clients/acme.md +1 -1
- package/fixtures/cases/cross-room-reference/library/clients/acme.md +4 -4
- package/fixtures/cases/cross-room-reference/schema.yaml +1 -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/date-time-format/schema.yaml +10 -11
- 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.yaml +10 -11
- 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.yaml +10 -11
- 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.yaml +10 -11
- package/fixtures/cases/duplicate-link-definition/library/item.md +1 -1
- package/fixtures/cases/duplicate-link-definition/schema.yaml +2 -3
- 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.yaml +10 -11
- package/fixtures/cases/equal-labels/expected.json +5 -0
- package/fixtures/cases/equal-labels/schema.yaml +4 -0
- package/fixtures/cases/fenced-link-definition/library/item.md +1 -1
- package/fixtures/cases/fenced-link-definition/schema.yaml +2 -3
- 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.yaml +3 -4
- 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.yaml +10 -11
- 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.yaml +10 -11
- package/fixtures/cases/labels-in-the-rooms-language/library/deals/atlas.md +7 -0
- package/fixtures/cases/labels-in-the-rooms-language/schema.yaml +9 -0
- package/fixtures/cases/lazy-list-item/expected.json +3 -0
- package/fixtures/cases/lazy-list-item/library/item.md +10 -0
- package/fixtures/cases/lazy-list-item/schema.yaml +3 -0
- package/fixtures/cases/link-into-a-reserved-name/library/notes/a.md +1 -1
- package/fixtures/cases/list-item-enum/expected.json +7 -0
- package/fixtures/cases/list-item-enum/library/task.md +7 -0
- package/fixtures/cases/list-item-enum/schema.yaml +3 -0
- package/fixtures/cases/list-item-kind/expected.json +7 -0
- package/fixtures/cases/list-item-kind/library/task.md +6 -0
- package/fixtures/cases/list-item-kind/schema.yaml +3 -0
- package/fixtures/cases/list-items/expected.json +1 -0
- package/fixtures/cases/list-items/library/page.md +26 -0
- package/fixtures/cases/list-items/schema.yaml +10 -0
- package/fixtures/cases/list-of-objects-closed/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.yaml +10 -11
- 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.yaml +10 -11
- 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-reference-path/expected.json +7 -0
- package/fixtures/cases/list-reference-path/library/page.md +5 -0
- package/fixtures/cases/list-reference-path/schema.yaml +3 -0
- package/fixtures/cases/list-reference-type/expected.json +7 -0
- package/fixtures/cases/list-reference-type/library/page.md +6 -0
- package/fixtures/cases/list-reference-type/schema.yaml +3 -0
- package/fixtures/cases/list-size/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.yaml +10 -11
- package/fixtures/cases/long-value-past-six-levels/expected.json +5 -0
- package/fixtures/cases/long-value-past-six-levels/schema.yaml +15 -0
- package/fixtures/cases/malformed-list/context.json +1 -0
- package/fixtures/cases/malformed-list/expected.json +7 -0
- package/fixtures/cases/{structured-section → malformed-list}/library/item.md +1 -1
- package/fixtures/cases/malformed-list/schema.yaml +6 -0
- package/fixtures/cases/member-document/library/people/ana.md +2 -2
- package/fixtures/cases/member-on-another-type/library/note.md +1 -1
- package/fixtures/cases/missing-required-field/library/item.md +1 -1
- package/fixtures/cases/missing-required-field/schema.yaml +3 -4
- 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.yaml +10 -11
- package/fixtures/cases/name-not-a-string/context.json +1 -0
- package/fixtures/cases/name-not-a-string/expected.json +5 -0
- package/fixtures/cases/name-not-a-string/schema.yaml +5 -0
- package/fixtures/cases/nested-defs/expected.json +2 -1
- package/fixtures/cases/nested-defs/library/deal.md +3 -3
- 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-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-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.yaml +10 -11
- 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.yaml +10 -11
- package/fixtures/cases/one-key-two-labels/context.json +1 -0
- package/fixtures/cases/one-key-two-labels/expected.json +5 -0
- package/fixtures/cases/one-key-two-labels/schema.yaml +5 -0
- package/fixtures/cases/one-key-two-types/context.json +1 -0
- package/fixtures/cases/one-key-two-types/expected.json +5 -0
- package/fixtures/cases/one-key-two-types/schema.yaml +4 -0
- package/fixtures/cases/one-of-variant/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.yaml +10 -11
- 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/prototype-field/expected.json +2 -1
- package/fixtures/cases/prototype-field/library/item.md +2 -2
- package/fixtures/cases/prototype-field/schema.yaml +2 -3
- package/fixtures/cases/reference-into-a-reserved-name/expected.json +2 -1
- package/fixtures/cases/reference-into-a-reserved-name/library/notes/a.md +1 -1
- package/fixtures/cases/referenced-missing-file/library/a.md +2 -2
- package/fixtures/cases/referenced-missing-file/library/b.md +2 -2
- package/fixtures/cases/referenced-missing-file/schema.yaml +3 -4
- 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 → sections-keyword-refused}/schema.yaml +1 -2
- package/fixtures/cases/shortcut-reference-link/library/item.md +1 -1
- package/fixtures/cases/shortcut-reference-link/schema.yaml +2 -3
- 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.yaml +10 -11
- package/fixtures/cases/submission-keys/library/notes/visitor.md +2 -2
- package/fixtures/cases/text-field-kind/expected.json +1 -4
- package/fixtures/cases/text-field-kind/library/page.md +1 -1
- package/fixtures/cases/thematic-break-ends-the-values/context.json +1 -0
- package/fixtures/cases/thematic-break-ends-the-values/expected.json +1 -0
- package/fixtures/cases/thematic-break-ends-the-values/library/item.md +10 -0
- package/fixtures/cases/thematic-break-ends-the-values/schema.yaml +3 -0
- package/fixtures/cases/typed-path-names-its-type/library/settings/prefs/one.md +1 -1
- package/fixtures/cases/types-folder-content/library/types/task.md +1 -1
- 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.yaml +2 -3
- package/fixtures/cases/unevaluated-items-closed/expected.json +2 -1
- package/fixtures/cases/unevaluated-items-closed/library/trip.md +13 -3
- package/fixtures/cases/unnamed-typed-path-checks-its-fields/library/rooms/team/tasks/plan.md +2 -1
- package/fixtures/cases/unnamed-typed-path-names-a-type/library/rooms/team/tasks/plan.md +3 -2
- package/fixtures/cases/unnamed-typed-path-reads-its-type/library/rooms/team/tasks/plan.md +3 -2
- package/fixtures/cases/unnamed-typed-path-without-a-body/library/rooms/team/tasks/plan.md +2 -2
- package/fixtures/cases/unresolved-link/library/item.md +1 -1
- package/fixtures/cases/unresolved-link/schema.yaml +2 -3
- 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.yaml +5 -6
- package/fixtures/division.json +85 -39
- package/fixtures/forms.json +347 -0
- package/fixtures/preamble.json +26 -5
- package/fixtures/projection.json +120 -16
- 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 -87
- package/dist/links.d.ts +0 -29
- package/dist/links.d.ts.map +0 -1
- package/dist/links.js +0 -821
- package/dist/sections.d.ts +0 -11
- package/dist/sections.d.ts.map +0 -1
- package/dist/sections.js +0 -57
- package/fixtures/cases/conditional-section/schema.yaml +0 -14
- 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/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/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/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/structured-section/expected.json +0 -6
- /package/fixtures/cases/{conditional-section → 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 → labels-in-the-rooms-language}/context.json +0 -0
- /package/fixtures/cases/{section-items → labels-in-the-rooms-language}/expected.json +0 -0
- /package/fixtures/cases/{open-map-value → lazy-list-item}/context.json +0 -0
- /package/fixtures/cases/{section-item-enum → list-item-enum}/context.json +0 -0
- /package/fixtures/cases/{section-item-kind → list-item-kind}/context.json +0 -0
- /package/fixtures/cases/{section-items → list-items}/context.json +0 -0
- /package/fixtures/cases/{section-items → list-items}/library/other.md +0 -0
- /package/fixtures/cases/{section-reference-path → list-reference-path}/context.json +0 -0
- /package/fixtures/cases/{section-reference-path → list-reference-path}/library/other.md +0 -0
- /package/fixtures/cases/{section-reference-type → list-reference-type}/context.json +0 -0
- /package/fixtures/cases/{section-reference-type → list-reference-type}/library/note.md +0 -0
- /package/fixtures/cases/{structured-section → long-value-past-six-levels}/context.json +0 -0
package/dist/paths.js
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { decodeNamedCharacterReference } from 'decode-named-character-reference';
|
|
2
2
|
import { decodeNumericCharacterReference } from 'micromark-util-decode-numeric-character-reference';
|
|
3
|
-
|
|
3
|
+
const BACKSLASH = 0x5c;
|
|
4
|
+
const PUNCTUATION = /^[!-/:-@[-`{-~]$/;
|
|
5
|
+
function escapes(text, index) {
|
|
6
|
+
return text.charCodeAt(index) === BACKSLASH && PUNCTUATION.test(text[index + 1] ?? '');
|
|
7
|
+
}
|
|
4
8
|
export function dirname(path) {
|
|
5
9
|
const index = path.lastIndexOf('/');
|
|
6
10
|
return index === -1 ? '' : path.slice(0, index);
|
|
@@ -43,19 +47,23 @@ function referenceAt(text, at) {
|
|
|
43
47
|
end,
|
|
44
48
|
};
|
|
45
49
|
}
|
|
46
|
-
function
|
|
47
|
-
let
|
|
48
|
-
let i =
|
|
50
|
+
function spelled(written, from, stops) {
|
|
51
|
+
let text = '';
|
|
52
|
+
let i = from;
|
|
49
53
|
while (i < written.length) {
|
|
50
54
|
const escaped = escapes(written, i);
|
|
51
55
|
const reference = escaped || written[i] !== '&' ? null : referenceAt(written, i);
|
|
52
|
-
const
|
|
53
|
-
if (
|
|
54
|
-
return {
|
|
55
|
-
|
|
56
|
+
const one = escaped ? written[i + 1] : (reference?.text ?? written[i]);
|
|
57
|
+
if (stops && (one.startsWith('?') || one.startsWith('#')))
|
|
58
|
+
return { text, end: i };
|
|
59
|
+
text += one;
|
|
56
60
|
i = escaped ? i + 2 : (reference?.end ?? i + 1);
|
|
57
61
|
}
|
|
58
|
-
return {
|
|
62
|
+
return { text, end: written.length };
|
|
63
|
+
}
|
|
64
|
+
function unescaped(written) {
|
|
65
|
+
const { text, end } = spelled(written, 0, true);
|
|
66
|
+
return { base: text, suffix: end };
|
|
59
67
|
}
|
|
60
68
|
function located(href) {
|
|
61
69
|
const written = href.trim();
|
|
@@ -107,18 +115,22 @@ function written(path) {
|
|
|
107
115
|
}
|
|
108
116
|
return text;
|
|
109
117
|
}
|
|
110
|
-
function
|
|
118
|
+
function roomAt(path) {
|
|
111
119
|
if (!path.startsWith(SHELL_ROOMS))
|
|
112
120
|
return null;
|
|
113
121
|
const rest = path.slice(SHELL_ROOMS.length);
|
|
114
122
|
const slash = rest.indexOf('/');
|
|
115
|
-
const handle = rest.slice(0, slash);
|
|
116
|
-
if (
|
|
123
|
+
const handle = slash === -1 ? rest : rest.slice(0, slash);
|
|
124
|
+
if (handle === '' || handle === '.' || handle === '..')
|
|
117
125
|
return null;
|
|
118
|
-
const within = normalize(rest.slice(slash + 1));
|
|
119
|
-
return within === null
|
|
126
|
+
const within = normalize(slash === -1 ? '' : rest.slice(slash + 1));
|
|
127
|
+
return within === null ? null : { handle, path: within };
|
|
120
128
|
}
|
|
121
|
-
|
|
129
|
+
function roomTargetOf(path) {
|
|
130
|
+
const room = roomAt(path);
|
|
131
|
+
return room === null || room.path === '' ? null : room;
|
|
132
|
+
}
|
|
133
|
+
function resolvedOf(from, href) {
|
|
122
134
|
const base = located(href).base;
|
|
123
135
|
if (base === '')
|
|
124
136
|
return { kind: 'skip' };
|
|
@@ -128,13 +140,15 @@ export function classifyHref(from, href) {
|
|
|
128
140
|
if (path === null)
|
|
129
141
|
return { kind: 'invalid' };
|
|
130
142
|
if (path.startsWith('/')) {
|
|
131
|
-
const room =
|
|
143
|
+
const room = roomAt(path);
|
|
132
144
|
return room === null ? { kind: 'invalid' } : { kind: 'room', ...room };
|
|
133
145
|
}
|
|
134
146
|
const resolved = normalize(join(dirname(from), path));
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
147
|
+
return resolved === null ? { kind: 'invalid' } : { kind: 'path', path: resolved };
|
|
148
|
+
}
|
|
149
|
+
export function classifyHref(from, href) {
|
|
150
|
+
const resolved = resolvedOf(from, href);
|
|
151
|
+
return 'path' in resolved && resolved.path === '' ? { kind: 'invalid' } : resolved;
|
|
138
152
|
}
|
|
139
153
|
export function roomTarget(href) {
|
|
140
154
|
const path = destinationPath(href);
|
|
@@ -148,6 +162,20 @@ export function target(from, href) {
|
|
|
148
162
|
const resolved = classifyHref(from, href);
|
|
149
163
|
return resolved.kind === 'path' ? resolved.path : null;
|
|
150
164
|
}
|
|
165
|
+
export function linkedPath(from, href) {
|
|
166
|
+
const resolved = located(href).base === '' ? { kind: 'path', path: from } : resolvedOf(from, href);
|
|
167
|
+
if (!('path' in resolved))
|
|
168
|
+
return null;
|
|
169
|
+
const written = href.trim();
|
|
170
|
+
const suffix = spelled(written, unescaped(written).suffix, false).text;
|
|
171
|
+
const hash = suffix.indexOf('#');
|
|
172
|
+
const fragment = hash === -1 ? '' : suffix.slice(hash + 1);
|
|
173
|
+
return {
|
|
174
|
+
handle: resolved.kind === 'room' ? resolved.handle : null,
|
|
175
|
+
path: resolved.path,
|
|
176
|
+
fragment: fragment === '' ? null : (decodedRun(fragment) ?? fragment),
|
|
177
|
+
};
|
|
178
|
+
}
|
|
151
179
|
export function retarget(href, to) {
|
|
152
180
|
const trimmed = href.trim();
|
|
153
181
|
return written(to) + trimmed.slice(unescaped(trimmed).suffix);
|
|
@@ -173,3 +201,30 @@ export function shellTarget(href, handle) {
|
|
|
173
201
|
const path = normalize(decoded.slice(prefix.length));
|
|
174
202
|
return path === null || path === '' ? null : path;
|
|
175
203
|
}
|
|
204
|
+
function fitsBare(to) {
|
|
205
|
+
if (to === '' || to.startsWith('<'))
|
|
206
|
+
return false;
|
|
207
|
+
let depth = 0;
|
|
208
|
+
for (const character of to) {
|
|
209
|
+
if (/[\s\u0000-\u001f\u007f]/.test(character))
|
|
210
|
+
return false;
|
|
211
|
+
if (character === '(')
|
|
212
|
+
depth += 1;
|
|
213
|
+
else if (character === ')') {
|
|
214
|
+
if (depth === 0)
|
|
215
|
+
return false;
|
|
216
|
+
depth -= 1;
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
return depth === 0;
|
|
220
|
+
}
|
|
221
|
+
function fitsBrackets(to) {
|
|
222
|
+
return to !== '' && !/[<>\n\r]/.test(to);
|
|
223
|
+
}
|
|
224
|
+
export function destinationText(to, bracketed) {
|
|
225
|
+
if (fitsBare(to))
|
|
226
|
+
return bracketed && fitsBrackets(to) ? `<${to}>` : to;
|
|
227
|
+
if (fitsBrackets(to))
|
|
228
|
+
return `<${to}>`;
|
|
229
|
+
return null;
|
|
230
|
+
}
|
package/dist/project.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project.d.ts","sourceRoot":"","sources":["../src/project.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"project.d.ts","sourceRoot":"","sources":["../src/project.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,iBAAiB,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAG3F,MAAM,MAAM,KAAK,GAAG,MAAM,GAAG;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAEvD,MAAM,MAAM,IAAI,GAAG,KAAK,CAAC;AAEzB,MAAM,MAAM,KAAK,GAAG;IAClB,QAAQ,CAAC,MAAM,EAAE,SAAS,KAAK,EAAE,CAAC;IAClC,QAAQ,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;IACnC,QAAQ,CAAC,KAAK,EAAE,SAAS,IAAI,EAAE,CAAC;CACjC,CAAC;AAEF,MAAM,MAAM,WAAW,GACnB;IAAE,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAA;CAAE,GAC5C;IAAE,QAAQ,CAAC,EAAE,EAAE,KAAK,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;CAAE,CAAC;AAqCtD,wBAAgB,aAAa,CAAC,KAAK,EAAE,SAAS,IAAI,EAAE,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAS3E;AAED,wBAAgB,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,IAAI,EAAE,GAAG,MAAM,CAWxF;AAOD,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,iBAAiB,GACzB,WAAW,CA4Bb;AAED,wBAAgB,OAAO,CACrB,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,iBAA2C,GACnD,UAAU,CAMZ"}
|
package/dist/project.js
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { frontmatter, inventoryOf } from './document.js';
|
|
1
|
+
import { bodyWith, readingOf } from './document.js';
|
|
3
2
|
import { classifyHref } from './paths.js';
|
|
4
3
|
import { refusal } from './refuse.js';
|
|
5
|
-
import { headingSpans } from './sections.js';
|
|
6
4
|
import { bodyStartOf } from './yaml.js';
|
|
7
|
-
function internalEdits(content,
|
|
5
|
+
function internalEdits(content, reading, file, documentTargets) {
|
|
8
6
|
const internal = new Set();
|
|
9
|
-
const uses =
|
|
7
|
+
const uses = reading.uses
|
|
10
8
|
.filter((use) => {
|
|
11
9
|
const resolved = classifyHref(file, use.destination.href);
|
|
12
10
|
return (resolved.kind === 'room' || (resolved.kind === 'path' && documentTargets.has(resolved.path)));
|
|
@@ -16,7 +14,7 @@ function internalEdits(content, inventory, bodyStart, file, documentTargets) {
|
|
|
16
14
|
for (let index = uses.length - 1; index >= 0; index -= 1) {
|
|
17
15
|
const use = uses[index];
|
|
18
16
|
internal.add(use.destination.start);
|
|
19
|
-
const label = { start:
|
|
17
|
+
const label = { start: use.labelStart, end: use.labelEnd };
|
|
20
18
|
const inner = [];
|
|
21
19
|
for (let nested = index + 1; nested < uses.length; nested += 1) {
|
|
22
20
|
const edit = edits[uses.length - 1 - nested];
|
|
@@ -25,16 +23,12 @@ function internalEdits(content, inventory, bodyStart, file, documentTargets) {
|
|
|
25
23
|
if (edit.end <= label.end)
|
|
26
24
|
inner.push(edit);
|
|
27
25
|
}
|
|
28
|
-
edits.push({
|
|
29
|
-
start: bodyStart + use.start,
|
|
30
|
-
end: bodyStart + use.end,
|
|
31
|
-
text: rangeText(content, label, inner),
|
|
32
|
-
});
|
|
26
|
+
edits.push({ start: use.start, end: use.end, text: rangeText(content, label, inner) });
|
|
33
27
|
}
|
|
34
|
-
for (const block of
|
|
28
|
+
for (const block of reading.definitions) {
|
|
35
29
|
if (!internal.has(block.destination.start))
|
|
36
30
|
continue;
|
|
37
|
-
edits.push({ start:
|
|
31
|
+
edits.push({ start: block.start, end: block.end, text: '' });
|
|
38
32
|
}
|
|
39
33
|
return edits.sort((left, right) => left.start - right.start);
|
|
40
34
|
}
|
|
@@ -64,57 +58,38 @@ export function rangeText(content, range, edits) {
|
|
|
64
58
|
}
|
|
65
59
|
return text + content.slice(cursor, range.end);
|
|
66
60
|
}
|
|
67
|
-
function
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
function proseValues(node, facts, values) {
|
|
71
|
-
if (facts === undefined)
|
|
72
|
-
return;
|
|
73
|
-
if (node.kind === 'scalar') {
|
|
74
|
-
if (facts.prose && typeof node.value === 'string')
|
|
75
|
-
values.push({ start: node.start, end: node.end, text: `${node.value}\n\n` });
|
|
76
|
-
return;
|
|
77
|
-
}
|
|
78
|
-
if (node.kind === 'seq') {
|
|
79
|
-
for (const item of node.items)
|
|
80
|
-
proseValues(item, facts.items, values);
|
|
81
|
-
return;
|
|
82
|
-
}
|
|
83
|
-
for (const entry of node.entries)
|
|
84
|
-
proseValues(entry.value, memberFacts(facts, entry.key), values);
|
|
85
|
-
}
|
|
86
|
-
function freeTextValues(definition, document) {
|
|
87
|
-
const root = frontmatter(document);
|
|
88
|
-
if (root === null)
|
|
89
|
-
return [];
|
|
90
|
-
const values = [];
|
|
91
|
-
proseValues(root, definition.frontmatter, values);
|
|
92
|
-
return values;
|
|
61
|
+
function linked(edits, range) {
|
|
62
|
+
const at = firstEditFrom(edits, range.start);
|
|
63
|
+
return at < edits.length && edits[at].start < range.end;
|
|
93
64
|
}
|
|
94
65
|
export function projectionInput(document, file, context) {
|
|
95
66
|
const content = document.content;
|
|
96
67
|
const bodyStart = bodyStartOf(content);
|
|
97
|
-
const
|
|
68
|
+
const reading = readingOf(document);
|
|
69
|
+
const edits = internalEdits(content, reading, file, new Set(context.documentTargets));
|
|
98
70
|
const declared = document.type;
|
|
99
|
-
|
|
71
|
+
const definition = context.definition;
|
|
72
|
+
if (definition === undefined && declared !== undefined && declared !== 'any')
|
|
73
|
+
return { ok: false, refusal: refusal(file, 'unknown-type') };
|
|
74
|
+
const body = definition === undefined ? null : bodyWith(document, definition);
|
|
75
|
+
if (body === null || !('top' in body)) {
|
|
100
76
|
return {
|
|
101
77
|
ok: true,
|
|
102
78
|
input: { values: [], ranges: [{ start: bodyStart, end: content.length }], edits },
|
|
103
79
|
};
|
|
104
80
|
}
|
|
105
|
-
const
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
}
|
|
117
|
-
return { ok: true, input: { values: freeTextValues(definition, document), ranges, edits } };
|
|
81
|
+
const values = body.prose
|
|
82
|
+
.filter((one) => !one.markdown)
|
|
83
|
+
.map((one) => ({
|
|
84
|
+
start: one.start,
|
|
85
|
+
end: one.end,
|
|
86
|
+
text: `${linked(edits, one) ? rangeText(content, one, edits) : one.text}\n\n`,
|
|
87
|
+
}));
|
|
88
|
+
const ranges = [
|
|
89
|
+
...body.prose.filter((one) => one.markdown).map(({ start, end }) => ({ start, end })),
|
|
90
|
+
...body.free,
|
|
91
|
+
].sort((left, right) => left.start - right.start);
|
|
92
|
+
return { ok: true, input: { values, ranges, edits } };
|
|
118
93
|
}
|
|
119
94
|
export function project(document, file, context = { documentTargets: [] }) {
|
|
120
95
|
const result = projectionInput(document, file, context);
|
package/dist/refuse.d.ts
CHANGED
package/dist/refuse.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"refuse.d.ts","sourceRoot":"","sources":["../src/refuse.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAE1C,wBAAgB,OAAO,CACrB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,KAAK,CAAC,EAAE;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,
|
|
1
|
+
{"version":3,"file":"refuse.d.ts","sourceRoot":"","sources":["../src/refuse.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAE1C,wBAAgB,OAAO,CACrB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,KAAK,CAAC,EAAE;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,GAC1E,OAAO,CAQT"}
|
package/dist/refuse.js
CHANGED
|
@@ -3,6 +3,7 @@ export function refusal(file, rule, extra) {
|
|
|
3
3
|
file,
|
|
4
4
|
rule,
|
|
5
5
|
...(extra?.location === undefined ? {} : { location: extra.location }),
|
|
6
|
+
...(extra?.line === undefined ? {} : { line: extra.line }),
|
|
6
7
|
...(extra?.referrers === undefined ? {} : { referrers: extra.referrers }),
|
|
7
8
|
};
|
|
8
9
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const CHAT_TYPE = "chat";
|
|
2
|
+
export declare const CHAT_MESSAGE_TYPE = "chat-message";
|
|
3
|
+
export declare const INBOX_TYPES: readonly string[];
|
|
4
|
+
export declare const INBOX_CHANNEL_KINDS: readonly ['telegram-bot', 'telegram-business', 'whatsapp', 'messenger', 'instagram', 'viber', 'tiktok'];
|
|
5
|
+
export type InboxChannelKind = (typeof INBOX_CHANNEL_KINDS)[number];
|
|
6
|
+
export declare const ROOM_TYPES_TEXT: string;
|
|
7
|
+
//# sourceMappingURL=room-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"room-types.d.ts","sourceRoot":"","sources":["../src/room-types.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,SAAS,SAAS,CAAC;AAEhC,eAAO,MAAM,iBAAiB,iBAAiB,CAAC;AAEhD,eAAO,MAAM,WAAW,EAAE,SAAS,MAAM,EAAmC,CAAC;AAE7E,eAAO,MAAM,mBAAmB,YAC9B,cAAc,EACd,mBAAmB,EACnB,UAAU,EACV,WAAW,EACX,WAAW,EACX,OAAO,EACP,QAAQ,CACA,CAAC;AAEX,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,CAAC,CAAC;AAkCpE,eAAO,MAAM,eAAe,QAiGhB,CAAC"}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import { APP_REFERENCE_PATTERN } from './house-references/patterns.js';
|
|
2
|
+
import { MEDIA_TYPES } from './media-type.js';
|
|
3
|
+
export const CHAT_TYPE = 'chat';
|
|
4
|
+
export const CHAT_MESSAGE_TYPE = 'chat-message';
|
|
5
|
+
export const INBOX_TYPES = [CHAT_TYPE, CHAT_MESSAGE_TYPE];
|
|
6
|
+
export const INBOX_CHANNEL_KINDS = [
|
|
7
|
+
'telegram-bot',
|
|
8
|
+
'telegram-business',
|
|
9
|
+
'whatsapp',
|
|
10
|
+
'messenger',
|
|
11
|
+
'instagram',
|
|
12
|
+
'viber',
|
|
13
|
+
'tiktok',
|
|
14
|
+
];
|
|
15
|
+
const WAYFINDING_MAP_TYPE = 'wayfinding-map';
|
|
16
|
+
const WAYFINDING_TICKET_TYPE = 'wayfinding-ticket';
|
|
17
|
+
const WAYFINDING_MAP_TEXTS = [
|
|
18
|
+
['destination', 'Destination'],
|
|
19
|
+
['notes', 'Notes'],
|
|
20
|
+
['decisions_so_far', 'Decisions so far'],
|
|
21
|
+
['not_yet_specified', 'Not yet specified'],
|
|
22
|
+
['out_of_scope', 'Out of scope'],
|
|
23
|
+
];
|
|
24
|
+
function markdown(title) {
|
|
25
|
+
return `{ type: string, contentMediaType: ${MEDIA_TYPES.markdown}, title: ${title} }`;
|
|
26
|
+
}
|
|
27
|
+
function identity(title) {
|
|
28
|
+
return `{ type: string, pattern: '^\\S+$', title: ${title} }`;
|
|
29
|
+
}
|
|
30
|
+
const AGENT = [
|
|
31
|
+
' agent: { type: string, format: uuid, title: Agent }',
|
|
32
|
+
' name: { type: string, title: Name }',
|
|
33
|
+
];
|
|
34
|
+
const ASSIGNEE = [
|
|
35
|
+
' type: object',
|
|
36
|
+
' properties:',
|
|
37
|
+
' user: { type: string, format: uuid, title: User }',
|
|
38
|
+
...AGENT,
|
|
39
|
+
];
|
|
40
|
+
export const ROOM_TYPES_TEXT = [
|
|
41
|
+
`${CHAT_TYPE}:`,
|
|
42
|
+
' properties:',
|
|
43
|
+
' inbox: { type: string, format: uuid, title: Inbox }',
|
|
44
|
+
` channel: { enum: [${INBOX_CHANNEL_KINDS.join(', ')}], title: Channel }`,
|
|
45
|
+
` chat: ${identity('Chat')}`,
|
|
46
|
+
' customer:',
|
|
47
|
+
' title: Customer',
|
|
48
|
+
' type: object',
|
|
49
|
+
' properties:',
|
|
50
|
+
' name: { type: string, title: Name }',
|
|
51
|
+
` username: ${identity('Username')}`,
|
|
52
|
+
` phone: ${identity('Phone')}`,
|
|
53
|
+
' assignee:',
|
|
54
|
+
' title: Assignee',
|
|
55
|
+
...ASSIGNEE,
|
|
56
|
+
' return_to:',
|
|
57
|
+
' title: Return to',
|
|
58
|
+
' type: object',
|
|
59
|
+
' properties:',
|
|
60
|
+
...AGENT,
|
|
61
|
+
' required: [chat, customer]',
|
|
62
|
+
`${CHAT_MESSAGE_TYPE}:`,
|
|
63
|
+
' properties:',
|
|
64
|
+
' direction: { enum: [in, out], title: Direction }',
|
|
65
|
+
' sender:',
|
|
66
|
+
' title: Sender',
|
|
67
|
+
...ASSIGNEE,
|
|
68
|
+
` username: ${identity('Username')}`,
|
|
69
|
+
' sent_at: { type: string, format: date-time, title: Sent at }',
|
|
70
|
+
` channel_message: ${identity('Channel message')}`,
|
|
71
|
+
' labelled: { const: true, title: Labelled }',
|
|
72
|
+
' reactions:',
|
|
73
|
+
' title: Reactions',
|
|
74
|
+
' type: array',
|
|
75
|
+
' items:',
|
|
76
|
+
' type: object',
|
|
77
|
+
' properties:',
|
|
78
|
+
' reaction: { type: string, minLength: 1, title: Reaction }',
|
|
79
|
+
' sender:',
|
|
80
|
+
' title: Sender',
|
|
81
|
+
' type: object',
|
|
82
|
+
' properties:',
|
|
83
|
+
` id: ${identity('ID')}`,
|
|
84
|
+
' name: { type: string, title: Name }',
|
|
85
|
+
` username: ${identity('Username')}`,
|
|
86
|
+
' count: { type: integer, minimum: 1, title: Count }',
|
|
87
|
+
' required: [reaction]',
|
|
88
|
+
` post: ${identity('Post')}`,
|
|
89
|
+
' assignee:',
|
|
90
|
+
' title: Assignee',
|
|
91
|
+
...ASSIGNEE,
|
|
92
|
+
' sent_outside: { const: true, title: Sent outside }',
|
|
93
|
+
' template:',
|
|
94
|
+
' title: Template',
|
|
95
|
+
' type: object',
|
|
96
|
+
' properties:',
|
|
97
|
+
' name: { type: string, minLength: 1, title: Name }',
|
|
98
|
+
' language: { type: string, minLength: 1, title: Language }',
|
|
99
|
+
' required: [name, language]',
|
|
100
|
+
' values:',
|
|
101
|
+
' title: Values',
|
|
102
|
+
' type: object',
|
|
103
|
+
' additionalProperties: { type: string }',
|
|
104
|
+
' withheld: { const: true, title: Withheld }',
|
|
105
|
+
' required: [direction]',
|
|
106
|
+
' if: { properties: { direction: { const: in } } }',
|
|
107
|
+
' then: { required: [sent_at] }',
|
|
108
|
+
`${WAYFINDING_MAP_TYPE}:`,
|
|
109
|
+
' properties:',
|
|
110
|
+
' name: { type: string, title: Name }',
|
|
111
|
+
...WAYFINDING_MAP_TEXTS.map(([key, title]) => ` ${key}: ${markdown(title)}`),
|
|
112
|
+
` required: [name, ${WAYFINDING_MAP_TEXTS.map(([key]) => key).join(', ')}]`,
|
|
113
|
+
`${WAYFINDING_TICKET_TYPE}:`,
|
|
114
|
+
' properties:',
|
|
115
|
+
' name: { type: string, title: Name }',
|
|
116
|
+
' kind: { enum: [research, prototype, grilling, task], title: Kind }',
|
|
117
|
+
' status: { enum: [open, in-progress, done, out-of-scope], title: Status }',
|
|
118
|
+
` map: { type: string, reference: ${WAYFINDING_MAP_TYPE}, title: Map }`,
|
|
119
|
+
` blocked_by: { type: array, items: { type: string, reference: ${WAYFINDING_TICKET_TYPE} }, title: Blocked by }`,
|
|
120
|
+
' assignee:',
|
|
121
|
+
' title: Assignee',
|
|
122
|
+
...ASSIGNEE,
|
|
123
|
+
' conversation: { type: string, format: uuid, title: Conversation }',
|
|
124
|
+
` app: { type: string, pattern: '${APP_REFERENCE_PATTERN.source}', title: App }`,
|
|
125
|
+
` question: ${markdown('Question')}`,
|
|
126
|
+
` answer: ${markdown('Answer')}`,
|
|
127
|
+
' required: [name, kind, status, map, blocked_by]',
|
|
128
|
+
' allOf:',
|
|
129
|
+
' - if: { properties: { status: { enum: [in-progress, done, out-of-scope] } }, required: [status] }',
|
|
130
|
+
' then: { required: [assignee] }',
|
|
131
|
+
' else: { properties: { assignee: false } }',
|
|
132
|
+
' - if: { properties: { assignee: { required: [agent] } }, required: [assignee] }',
|
|
133
|
+
' else: { properties: { conversation: false } }',
|
|
134
|
+
' - if: { properties: { status: { enum: [done, out-of-scope] } }, required: [status] }',
|
|
135
|
+
' then: { required: [answer], properties: { answer: { minLength: 1, title: Answer } } }',
|
|
136
|
+
'',
|
|
137
|
+
].join('\n');
|
package/dist/schema.d.ts
CHANGED
|
@@ -4,6 +4,4 @@ export type SchemaRefusal = {
|
|
|
4
4
|
readonly location: string;
|
|
5
5
|
};
|
|
6
6
|
export declare function frontmatterRefusal(definition: Definition, fields: Readonly<Record<string, unknown>>): SchemaRefusal | undefined;
|
|
7
|
-
export declare function conditionedSections(definition: Definition, fields: Readonly<Record<string, unknown>>): readonly string[];
|
|
8
|
-
export declare function fitsItem(definition: Definition, section: string, text: string): boolean;
|
|
9
7
|
//# sourceMappingURL=schema.d.ts.map
|
package/dist/schema.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AACA,OAAO,EAA4B,KAAK,UAAU,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AACA,OAAO,EAA4B,KAAK,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAO5E,MAAM,MAAM,aAAa,GAAG;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC;AA+JjF,wBAAgB,kBAAkB,CAChC,UAAU,EAAE,UAAU,EACtB,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GACxC,aAAa,GAAG,SAAS,CAI3B"}
|
package/dist/schema.js
CHANGED
|
@@ -2,7 +2,7 @@ import { Validator } from '@cfworker/json-schema';
|
|
|
2
2
|
import { escapePointer, refTarget } from './definition.js';
|
|
3
3
|
import { MEMBER_FIELD, RECEIVED_FIELD, SITE_FIELD, TYPE_FIELD } from './fields.js';
|
|
4
4
|
import { withLinearRegExp } from './pattern.js';
|
|
5
|
-
import {
|
|
5
|
+
import { isRecord } from './yaml.js';
|
|
6
6
|
const STANDING_MAPS = ['properties', 'patternProperties'];
|
|
7
7
|
const STANDING = [
|
|
8
8
|
'additionalProperties',
|
|
@@ -96,50 +96,11 @@ function closed(node, inPlace, defs, always = false) {
|
|
|
96
96
|
function copied(value) {
|
|
97
97
|
return JSON.parse(JSON.stringify(value));
|
|
98
98
|
}
|
|
99
|
-
function asks(asked) {
|
|
100
|
-
return asked.sections.length > 0 || asked.conditions.length > 0;
|
|
101
|
-
}
|
|
102
|
-
function branchOf(node, defs, closedDefs) {
|
|
103
|
-
if (!isRecord(node))
|
|
104
|
-
return { schema: node, asked: { sections: [], conditions: [] } };
|
|
105
|
-
const { sections, ...rest } = node;
|
|
106
|
-
const read = unconditioned(rest, defs, closedDefs);
|
|
107
|
-
const required = Object.entries(isRecord(sections) ? sections : {}).flatMap(([name, spec]) => isRecord(spec) && spec.required === true ? [name] : []);
|
|
108
|
-
return { schema: read.schema, asked: { sections: required, conditions: read.conditions } };
|
|
109
|
-
}
|
|
110
|
-
function unconditioned(node, defs, closedDefs) {
|
|
111
|
-
if (!isRecord(node))
|
|
112
|
-
return { schema: node, conditions: [] };
|
|
113
|
-
const schema = { ...node };
|
|
114
|
-
const conditions = [];
|
|
115
|
-
if (Array.isArray(node.allOf))
|
|
116
|
-
schema.allOf = node.allOf.map((entry) => {
|
|
117
|
-
const read = unconditioned(entry, defs, closedDefs);
|
|
118
|
-
conditions.push(...read.conditions);
|
|
119
|
-
return read.schema;
|
|
120
|
-
});
|
|
121
|
-
if (node.if === undefined)
|
|
122
|
-
return { schema, conditions };
|
|
123
|
-
const met = branchOf(node.then, defs, closedDefs);
|
|
124
|
-
const unmet = branchOf(node.else, defs, closedDefs);
|
|
125
|
-
if (node.then !== undefined)
|
|
126
|
-
schema.then = met.schema;
|
|
127
|
-
if (node.else !== undefined)
|
|
128
|
-
schema.else = unmet.schema;
|
|
129
|
-
if (!asks(met.asked) && !asks(unmet.asked))
|
|
130
|
-
return { schema, conditions };
|
|
131
|
-
const test = new Validator(isRecord(node.if)
|
|
132
|
-
? { ...closed(node.if, true, defs), $defs: closedDefs }
|
|
133
|
-
: node.if === true, '2020-12', false);
|
|
134
|
-
return { schema, conditions: [...conditions, { test, met: met.asked, unmet: unmet.asked }] };
|
|
135
|
-
}
|
|
136
99
|
function compile(definition) {
|
|
137
100
|
const defs = copied(definition.shape.defs);
|
|
138
|
-
const {
|
|
101
|
+
const { member_document: _mark, ...written } = copied(definition.shape.schema);
|
|
139
102
|
const closedDefs = mapped(defs, (held) => closed(held, true, defs));
|
|
140
|
-
const
|
|
141
|
-
const root = read.schema;
|
|
142
|
-
const declared = isRecord(root.properties) ? root.properties : {};
|
|
103
|
+
const declared = isRecord(written.properties) ? written.properties : {};
|
|
143
104
|
const properties = {
|
|
144
105
|
[TYPE_FIELD]: true,
|
|
145
106
|
[SITE_FIELD]: true,
|
|
@@ -147,14 +108,8 @@ function compile(definition) {
|
|
|
147
108
|
...(definition.memberDocument ? { [MEMBER_FIELD]: { type: 'string' } } : {}),
|
|
148
109
|
...declared,
|
|
149
110
|
};
|
|
150
|
-
const frontmatter = new Validator({ ...closed({ ...
|
|
151
|
-
|
|
152
|
-
for (const [name, spec] of Object.entries(isRecord(sections) ? sections : {})) {
|
|
153
|
-
if (!isRecord(spec) || spec.kind !== 'list')
|
|
154
|
-
continue;
|
|
155
|
-
lists.set(name, new Validator({ ...closed(spec.items, false, defs), $defs: closedDefs }, '2020-12', false));
|
|
156
|
-
}
|
|
157
|
-
return { frontmatter, sections: lists, conditions: read.conditions };
|
|
111
|
+
const frontmatter = new Validator({ ...closed({ ...written, properties }, false, defs, true), $defs: closedDefs }, '2020-12', false);
|
|
112
|
+
return { frontmatter };
|
|
158
113
|
}
|
|
159
114
|
function compiledOf(definition) {
|
|
160
115
|
const held = compiled.get(definition);
|
|
@@ -194,21 +149,3 @@ export function frontmatterRefusal(definition, fields) {
|
|
|
194
149
|
const result = withLinearRegExp(() => frontmatter.validate(fields));
|
|
195
150
|
return result.valid ? undefined : refusalOf(result.errors);
|
|
196
151
|
}
|
|
197
|
-
function askedOf(conditions, fields) {
|
|
198
|
-
return conditions.flatMap((condition) => {
|
|
199
|
-
const asked = condition.test.validate(fields).valid ? condition.met : condition.unmet;
|
|
200
|
-
return [...asked.sections, ...askedOf(asked.conditions, fields)];
|
|
201
|
-
});
|
|
202
|
-
}
|
|
203
|
-
export function conditionedSections(definition, fields) {
|
|
204
|
-
const { conditions } = compiledOf(definition);
|
|
205
|
-
return withLinearRegExp(() => askedOf(conditions, fields));
|
|
206
|
-
}
|
|
207
|
-
export function fitsItem(definition, section, text) {
|
|
208
|
-
const spec = definition.sections[section];
|
|
209
|
-
const validator = compiledOf(definition).sections.get(section);
|
|
210
|
-
if (spec?.kind !== 'list' || validator === undefined)
|
|
211
|
-
return false;
|
|
212
|
-
const typed = spec.items.type === 'string' ? text : interpretPlain(text);
|
|
213
|
-
return withLinearRegExp(() => validator.validate(typed).valid);
|
|
214
|
-
}
|
package/dist/types.d.ts
CHANGED
|
@@ -45,11 +45,16 @@ export type Frontmatter = {
|
|
|
45
45
|
export type Document = Frontmatter & {
|
|
46
46
|
readonly preamble: string;
|
|
47
47
|
readonly sections: Readonly<Record<string, string>>;
|
|
48
|
+
readonly text: string;
|
|
49
|
+
readonly ranges: Readonly<Record<string, Extent>>;
|
|
50
|
+
readonly listEnd: number;
|
|
48
51
|
};
|
|
52
|
+
export type DefinitionOf = (type: string | undefined) => Definition | undefined;
|
|
49
53
|
export type Refusal = {
|
|
50
54
|
readonly file: string;
|
|
51
55
|
readonly rule: string;
|
|
52
56
|
readonly location?: string;
|
|
57
|
+
readonly line?: number;
|
|
53
58
|
readonly referrers?: readonly string[];
|
|
54
59
|
};
|
|
55
60
|
export type Reached = {
|
|
@@ -123,12 +128,6 @@ export type RoomReference = {
|
|
|
123
128
|
readonly value: string;
|
|
124
129
|
readonly to: readonly string[];
|
|
125
130
|
readonly crossRoom?: true;
|
|
126
|
-
} | {
|
|
127
|
-
readonly kind: 'item';
|
|
128
|
-
readonly section: string;
|
|
129
|
-
readonly href: string;
|
|
130
|
-
readonly to: readonly string[];
|
|
131
|
-
readonly crossRoom?: true;
|
|
132
131
|
});
|
|
133
132
|
export type Change = {
|
|
134
133
|
readonly kind: 'field';
|
|
@@ -139,11 +138,15 @@ export type Change = {
|
|
|
139
138
|
readonly kind: 'section';
|
|
140
139
|
readonly name: string;
|
|
141
140
|
readonly value: string;
|
|
142
|
-
readonly prior: string;
|
|
141
|
+
readonly prior: string | undefined;
|
|
143
142
|
} | {
|
|
144
143
|
readonly kind: 'preamble';
|
|
145
144
|
readonly value: string;
|
|
146
145
|
readonly prior: string;
|
|
146
|
+
} | {
|
|
147
|
+
readonly kind: 'text';
|
|
148
|
+
readonly value: string;
|
|
149
|
+
readonly prior: string;
|
|
147
150
|
} | {
|
|
148
151
|
readonly kind: 'link';
|
|
149
152
|
readonly href: string;
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,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