@agentshouse/mdmodel 0.1.0-c5a71fe539a49 → 0.1.0-c604cd56d599c

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (472) hide show
  1. package/API.md +311 -251
  2. package/README.md +28 -29
  3. package/dist/body.d.ts +85 -0
  4. package/dist/body.d.ts.map +1 -0
  5. package/dist/body.js +1083 -0
  6. package/dist/built-in.d.ts +4 -0
  7. package/dist/built-in.d.ts.map +1 -0
  8. package/dist/built-in.js +19 -0
  9. package/dist/definition.d.ts +49 -11
  10. package/dist/definition.d.ts.map +1 -1
  11. package/dist/definition.js +491 -106
  12. package/dist/document.d.ts +19 -13
  13. package/dist/document.d.ts.map +1 -1
  14. package/dist/document.js +1015 -213
  15. package/dist/event.d.ts +77 -0
  16. package/dist/event.d.ts.map +1 -0
  17. package/dist/event.js +200 -0
  18. package/dist/facts.d.ts +15 -0
  19. package/dist/facts.d.ts.map +1 -0
  20. package/dist/facts.js +41 -0
  21. package/dist/fields.d.ts +3 -1
  22. package/dist/fields.d.ts.map +1 -1
  23. package/dist/fields.js +8 -1
  24. package/dist/form.d.ts +4 -0
  25. package/dist/form.d.ts.map +1 -0
  26. package/dist/form.js +153 -0
  27. package/dist/house-model.d.ts +882 -0
  28. package/dist/house-model.d.ts.map +1 -0
  29. package/dist/house-model.js +479 -0
  30. package/dist/house-references/crockford.d.ts +4 -0
  31. package/dist/house-references/crockford.d.ts.map +1 -0
  32. package/dist/house-references/crockford.js +3 -0
  33. package/dist/house-references/patterns.d.ts +9 -0
  34. package/dist/house-references/patterns.d.ts.map +1 -0
  35. package/dist/house-references/patterns.js +13 -0
  36. package/dist/index.d.ts +45 -12
  37. package/dist/index.d.ts.map +1 -1
  38. package/dist/index.js +27 -9
  39. package/dist/indexed.d.ts +9 -0
  40. package/dist/indexed.d.ts.map +1 -0
  41. package/dist/indexed.js +55 -0
  42. package/dist/kinds.d.ts +21 -0
  43. package/dist/kinds.d.ts.map +1 -0
  44. package/dist/kinds.js +210 -0
  45. package/dist/markdown.d.ts +71 -0
  46. package/dist/markdown.d.ts.map +1 -0
  47. package/dist/markdown.js +232 -0
  48. package/dist/media-type.d.ts +72 -0
  49. package/dist/media-type.d.ts.map +1 -0
  50. package/dist/media-type.js +157 -0
  51. package/dist/moment.d.ts +7 -0
  52. package/dist/moment.d.ts.map +1 -0
  53. package/dist/moment.js +18 -0
  54. package/dist/not-ready.d.ts +2 -0
  55. package/dist/not-ready.d.ts.map +1 -0
  56. package/dist/not-ready.js +5 -0
  57. package/dist/paths.d.ts +26 -2
  58. package/dist/paths.d.ts.map +1 -1
  59. package/dist/paths.js +195 -16
  60. package/dist/pattern.d.ts +10 -0
  61. package/dist/pattern.d.ts.map +1 -0
  62. package/dist/pattern.js +356 -0
  63. package/dist/query/language.d.ts +255 -0
  64. package/dist/query/language.d.ts.map +1 -0
  65. package/dist/query/language.js +620 -0
  66. package/dist/query/match.d.ts +14 -0
  67. package/dist/query/match.d.ts.map +1 -0
  68. package/dist/query/match.js +150 -0
  69. package/dist/query/rows.d.ts +32 -0
  70. package/dist/query/rows.d.ts.map +1 -0
  71. package/dist/query/rows.js +158 -0
  72. package/dist/query/sql.d.ts +43 -0
  73. package/dist/query/sql.d.ts.map +1 -0
  74. package/dist/query/sql.js +285 -0
  75. package/dist/query/walk.d.ts +63 -0
  76. package/dist/query/walk.d.ts.map +1 -0
  77. package/dist/query/walk.js +263 -0
  78. package/dist/references.d.ts +1 -1
  79. package/dist/references.d.ts.map +1 -1
  80. package/dist/references.js +7 -2
  81. package/dist/refuse.d.ts +1 -0
  82. package/dist/refuse.d.ts.map +1 -1
  83. package/dist/refuse.js +1 -0
  84. package/dist/reserved.d.ts +6 -0
  85. package/dist/reserved.d.ts.map +1 -0
  86. package/dist/reserved.js +21 -0
  87. package/dist/room-types.d.ts +7 -0
  88. package/dist/room-types.d.ts.map +1 -0
  89. package/dist/room-types.js +136 -0
  90. package/dist/schema.d.ts +1 -2
  91. package/dist/schema.d.ts.map +1 -1
  92. package/dist/schema.js +11 -24
  93. package/dist/types.d.ts +60 -21
  94. package/dist/types.d.ts.map +1 -1
  95. package/dist/validate.d.ts +36 -2
  96. package/dist/validate.d.ts.map +1 -1
  97. package/dist/validate.js +387 -140
  98. package/dist/yaml.d.ts +10 -4
  99. package/dist/yaml.d.ts.map +1 -1
  100. package/dist/yaml.js +258 -82
  101. package/fixtures/README.md +90 -65
  102. package/fixtures/cases/absent-link-dangles/library/item.md +8 -0
  103. package/fixtures/cases/absent-link-dangles/schema.yaml +5 -0
  104. package/fixtures/cases/absent-optional-field/library/companies/acme.md +1 -1
  105. package/fixtures/cases/absent-optional-field/library/deals/lead.md +3 -3
  106. package/fixtures/cases/absent-optional-field/schema.yaml +10 -11
  107. package/fixtures/cases/{missing-binary-image → absolute-link}/expected.json +1 -1
  108. package/fixtures/cases/absolute-link/library/item.md +8 -0
  109. package/fixtures/cases/absolute-link/schema.yaml +5 -0
  110. package/fixtures/cases/attachment-reference-any-file/library/companies/acme.md +1 -1
  111. package/fixtures/cases/attachment-reference-any-file/library/deals/renewal.md +13 -10
  112. package/fixtures/cases/attachment-reference-any-file/library/places/depot.md +1 -1
  113. package/fixtures/cases/attachment-reference-any-file/library/products/seats.md +1 -1
  114. package/fixtures/cases/attachment-reference-any-file/library/products/support.md +1 -1
  115. package/fixtures/cases/attachment-reference-dangles/library/companies/acme.md +1 -1
  116. package/fixtures/cases/attachment-reference-dangles/library/deals/renewal.md +13 -10
  117. package/fixtures/cases/attachment-reference-dangles/library/places/depot.md +1 -1
  118. package/fixtures/cases/attachment-reference-dangles/library/products/seats.md +1 -1
  119. package/fixtures/cases/attachment-reference-dangles/library/products/support.md +1 -1
  120. package/fixtures/cases/attachment-reference-outside/expected.json +2 -1
  121. package/fixtures/cases/attachment-reference-outside/library/companies/acme.md +1 -1
  122. package/fixtures/cases/attachment-reference-outside/library/deals/renewal.md +13 -10
  123. package/fixtures/cases/attachment-reference-outside/library/places/depot.md +1 -1
  124. package/fixtures/cases/attachment-reference-outside/library/products/seats.md +1 -1
  125. package/fixtures/cases/attachment-reference-outside/library/products/support.md +1 -1
  126. package/fixtures/cases/binary-any-reference/expected.json +2 -1
  127. package/fixtures/cases/binary-any-reference/library/notes/draft.md +1 -1
  128. package/fixtures/cases/binary-image-dangles/expected.json +1 -0
  129. package/fixtures/cases/binary-link-dangles/expected.json +1 -0
  130. package/fixtures/cases/binary-prototype-reference/expected.json +2 -1
  131. package/fixtures/cases/binary-prototype-reference/library/notes/draft.md +1 -1
  132. package/fixtures/cases/binary-typed-reference/expected.json +2 -1
  133. package/fixtures/cases/binary-typed-reference/library/notes/draft.md +1 -1
  134. package/fixtures/cases/block-scalar-frontmatter/expected.json +1 -0
  135. package/fixtures/cases/block-scalar-frontmatter/library/notes/literal.md +17 -0
  136. package/fixtures/cases/block-scalar-frontmatter/library/skills/notes/SKILL.md +10 -0
  137. package/fixtures/cases/boolean-field/expected.json +2 -1
  138. package/fixtures/cases/boolean-field/library/companies/acme.md +1 -1
  139. package/fixtures/cases/boolean-field/library/deals/renewal.md +49 -24
  140. package/fixtures/cases/boolean-field/schema.yaml +10 -11
  141. package/fixtures/cases/bracketed-link-definition/library/item.md +1 -1
  142. package/fixtures/cases/bracketed-link-definition/schema.yaml +2 -3
  143. package/fixtures/cases/closed-nested-object/expected.json +2 -1
  144. package/fixtures/cases/closed-nested-object/library/companies/acme.md +1 -1
  145. package/fixtures/cases/closed-nested-object/library/deals/renewal.md +50 -25
  146. package/fixtures/cases/closed-nested-object/schema.yaml +10 -11
  147. package/fixtures/cases/composed-root-reference/library/a.md +2 -2
  148. package/fixtures/cases/conditional-long-text/expected.json +7 -0
  149. package/fixtures/cases/conditional-long-text/library/questions/hosting.md +9 -0
  150. package/fixtures/cases/conditional-long-text/library/questions/payments.md +12 -0
  151. package/fixtures/cases/conditional-long-text/schema.yaml +13 -0
  152. package/fixtures/cases/cross-room-link/expected.json +1 -0
  153. package/fixtures/cases/cross-room-link/library/clients/acme.md +6 -0
  154. package/fixtures/cases/cross-room-link/schema.yaml +3 -0
  155. package/fixtures/cases/cross-room-reference/expected.json +1 -0
  156. package/fixtures/cases/cross-room-reference/library/clients/acme.md +9 -0
  157. package/fixtures/cases/cross-room-reference/schema.yaml +8 -0
  158. package/fixtures/cases/date-time-format/expected.json +2 -1
  159. package/fixtures/cases/date-time-format/library/companies/acme.md +1 -1
  160. package/fixtures/cases/date-time-format/library/deals/renewal.md +49 -24
  161. package/fixtures/cases/date-time-format/schema.yaml +10 -11
  162. package/fixtures/cases/default-unfilled/library/companies/acme.md +1 -1
  163. package/fixtures/cases/default-unfilled/library/deals/renewal.md +47 -22
  164. package/fixtures/cases/default-unfilled/schema.yaml +10 -11
  165. package/fixtures/cases/defs-pattern/expected.json +2 -1
  166. package/fixtures/cases/defs-pattern/library/companies/acme.md +1 -1
  167. package/fixtures/cases/defs-pattern/library/deals/renewal.md +49 -24
  168. package/fixtures/cases/defs-pattern/schema.yaml +10 -11
  169. package/fixtures/cases/dependent-rule/library/companies/acme.md +1 -1
  170. package/fixtures/cases/dependent-rule/library/deals/renewal.md +48 -23
  171. package/fixtures/cases/dependent-rule/schema.yaml +10 -11
  172. package/fixtures/cases/duplicate-link-definition/library/item.md +1 -1
  173. package/fixtures/cases/duplicate-link-definition/schema.yaml +2 -3
  174. package/fixtures/cases/email-format/expected.json +2 -1
  175. package/fixtures/cases/email-format/library/companies/acme.md +1 -1
  176. package/fixtures/cases/email-format/library/deals/renewal.md +49 -24
  177. package/fixtures/cases/email-format/schema.yaml +10 -11
  178. package/fixtures/cases/equal-labels/expected.json +5 -0
  179. package/fixtures/cases/equal-labels/schema.yaml +4 -0
  180. package/fixtures/cases/fenced-link-definition/library/item.md +1 -1
  181. package/fixtures/cases/fenced-link-definition/schema.yaml +2 -3
  182. package/fixtures/cases/field-enum/expected.json +2 -1
  183. package/fixtures/cases/field-enum/library/item.md +2 -2
  184. package/fixtures/cases/field-enum/schema.yaml +3 -4
  185. package/fixtures/cases/frontmatter-construct/expected.json +7 -0
  186. package/fixtures/cases/frontmatter-construct/library/note.md +6 -0
  187. package/fixtures/cases/integer-field/expected.json +2 -1
  188. package/fixtures/cases/integer-field/library/companies/acme.md +1 -1
  189. package/fixtures/cases/integer-field/library/deals/renewal.md +49 -24
  190. package/fixtures/cases/integer-field/schema.yaml +10 -11
  191. package/fixtures/cases/json-schema-constructs/library/companies/acme.md +1 -1
  192. package/fixtures/cases/json-schema-constructs/library/deals/renewal.md +49 -24
  193. package/fixtures/cases/json-schema-constructs/schema.yaml +10 -11
  194. package/fixtures/cases/labels-in-the-rooms-language/expected.json +1 -0
  195. package/fixtures/cases/labels-in-the-rooms-language/library/deals/atlas.md +7 -0
  196. package/fixtures/cases/labels-in-the-rooms-language/schema.yaml +9 -0
  197. package/fixtures/cases/lazy-list-item/context.json +1 -0
  198. package/fixtures/cases/lazy-list-item/expected.json +3 -0
  199. package/fixtures/cases/lazy-list-item/library/item.md +10 -0
  200. package/fixtures/cases/lazy-list-item/schema.yaml +3 -0
  201. package/fixtures/cases/link-into-a-reserved-name/context.json +1 -0
  202. package/fixtures/cases/link-into-a-reserved-name/expected.json +5 -0
  203. package/fixtures/cases/link-into-a-reserved-name/library/notes/a.md +6 -0
  204. package/fixtures/cases/link-into-a-reserved-name/schema.yaml +3 -0
  205. package/fixtures/cases/link-into-a-reserved-name-from-an-untyped-document/context.json +1 -0
  206. package/fixtures/cases/{missing-binary-link → link-into-a-reserved-name-from-an-untyped-document}/expected.json +1 -1
  207. package/fixtures/cases/link-into-a-reserved-name-from-an-untyped-document/library/notes/b.md +5 -0
  208. package/fixtures/cases/list-item-enum/context.json +1 -0
  209. package/fixtures/cases/list-item-enum/expected.json +7 -0
  210. package/fixtures/cases/list-item-enum/library/task.md +7 -0
  211. package/fixtures/cases/list-item-enum/schema.yaml +3 -0
  212. package/fixtures/cases/list-item-kind/context.json +1 -0
  213. package/fixtures/cases/list-item-kind/expected.json +7 -0
  214. package/fixtures/cases/list-item-kind/library/task.md +6 -0
  215. package/fixtures/cases/list-item-kind/schema.yaml +3 -0
  216. package/fixtures/cases/list-items/context.json +1 -0
  217. package/fixtures/cases/list-items/expected.json +1 -0
  218. package/fixtures/cases/list-items/library/page.md +26 -0
  219. package/fixtures/cases/list-items/schema.yaml +10 -0
  220. package/fixtures/cases/list-of-objects-closed/expected.json +2 -1
  221. package/fixtures/cases/list-of-objects-closed/library/companies/acme.md +1 -1
  222. package/fixtures/cases/list-of-objects-closed/library/deals/renewal.md +49 -25
  223. package/fixtures/cases/list-of-objects-closed/schema.yaml +10 -11
  224. package/fixtures/cases/list-of-objects-item/expected.json +2 -1
  225. package/fixtures/cases/list-of-objects-item/library/companies/acme.md +1 -1
  226. package/fixtures/cases/list-of-objects-item/library/deals/renewal.md +49 -24
  227. package/fixtures/cases/list-of-objects-item/schema.yaml +10 -11
  228. package/fixtures/cases/list-of-objects-reference/expected.json +2 -1
  229. package/fixtures/cases/list-of-objects-reference/library/companies/acme.md +1 -1
  230. package/fixtures/cases/list-of-objects-reference/library/deals/renewal.md +12 -9
  231. package/fixtures/cases/list-of-objects-reference/library/places/depot.md +1 -1
  232. package/fixtures/cases/list-of-objects-reference/library/products/seats.md +1 -1
  233. package/fixtures/cases/list-of-objects-reference/library/products/support.md +1 -1
  234. package/fixtures/cases/list-reference-path/context.json +1 -0
  235. package/fixtures/cases/list-reference-path/expected.json +7 -0
  236. package/fixtures/cases/list-reference-path/library/page.md +5 -0
  237. package/fixtures/cases/list-reference-path/schema.yaml +3 -0
  238. package/fixtures/cases/list-reference-type/context.json +1 -0
  239. package/fixtures/cases/list-reference-type/expected.json +7 -0
  240. package/fixtures/cases/list-reference-type/library/page.md +6 -0
  241. package/fixtures/cases/list-reference-type/schema.yaml +3 -0
  242. package/fixtures/cases/list-size/expected.json +2 -1
  243. package/fixtures/cases/list-size/library/companies/acme.md +1 -1
  244. package/fixtures/cases/list-size/library/deals/renewal.md +51 -24
  245. package/fixtures/cases/list-size/schema.yaml +10 -11
  246. package/fixtures/cases/long-value-past-six-levels/context.json +1 -0
  247. package/fixtures/cases/long-value-past-six-levels/expected.json +5 -0
  248. package/fixtures/cases/long-value-past-six-levels/schema.yaml +15 -0
  249. package/fixtures/cases/malformed-list/context.json +1 -0
  250. package/fixtures/cases/malformed-list/expected.json +7 -0
  251. package/fixtures/cases/{structured-section → malformed-list}/library/item.md +1 -1
  252. package/fixtures/cases/malformed-list/schema.yaml +6 -0
  253. package/fixtures/cases/member-document/library/people/ana.md +2 -2
  254. package/fixtures/cases/member-on-an-untyped-document/context.json +1 -0
  255. package/fixtures/cases/member-on-an-untyped-document/expected.json +6 -0
  256. package/fixtures/cases/member-on-an-untyped-document/library/note.md +4 -0
  257. package/fixtures/cases/member-on-another-type/context.json +1 -0
  258. package/fixtures/cases/member-on-another-type/expected.json +6 -0
  259. package/fixtures/cases/member-on-another-type/library/note.md +4 -0
  260. package/fixtures/cases/member-on-another-type/schema.yaml +7 -0
  261. package/fixtures/cases/missing-required-field/library/item.md +1 -1
  262. package/fixtures/cases/missing-required-field/schema.yaml +3 -4
  263. package/fixtures/cases/misspelled-key/expected.json +2 -1
  264. package/fixtures/cases/misspelled-key/library/companies/acme.md +1 -1
  265. package/fixtures/cases/misspelled-key/library/deals/renewal.md +50 -25
  266. package/fixtures/cases/misspelled-key/schema.yaml +10 -11
  267. package/fixtures/cases/name-not-a-string/context.json +1 -0
  268. package/fixtures/cases/name-not-a-string/expected.json +5 -0
  269. package/fixtures/cases/name-not-a-string/schema.yaml +5 -0
  270. package/fixtures/cases/nested-defs/expected.json +2 -1
  271. package/fixtures/cases/nested-defs/library/deal.md +3 -3
  272. package/fixtures/cases/nested-object-reference/expected.json +2 -1
  273. package/fixtures/cases/nested-object-reference/library/companies/acme.md +1 -1
  274. package/fixtures/cases/nested-object-reference/library/deals/renewal.md +12 -9
  275. package/fixtures/cases/nested-object-reference/library/places/depot.md +1 -1
  276. package/fixtures/cases/nested-object-reference/library/products/seats.md +1 -1
  277. package/fixtures/cases/nested-object-reference/library/products/support.md +1 -1
  278. package/fixtures/cases/nested-reference/library/companies/acme.md +1 -1
  279. package/fixtures/cases/nested-reference/library/deals/renewal.md +13 -10
  280. package/fixtures/cases/nested-reference/library/places/depot.md +1 -1
  281. package/fixtures/cases/nested-reference/library/products/seats.md +1 -1
  282. package/fixtures/cases/nested-reference/library/products/support.md +1 -1
  283. package/fixtures/cases/nested-required-field/expected.json +2 -1
  284. package/fixtures/cases/nested-required-field/library/companies/acme.md +1 -1
  285. package/fixtures/cases/nested-required-field/library/deals/renewal.md +48 -23
  286. package/fixtures/cases/nested-required-field/schema.yaml +10 -11
  287. package/fixtures/cases/numeric-range/expected.json +2 -1
  288. package/fixtures/cases/numeric-range/library/companies/acme.md +1 -1
  289. package/fixtures/cases/numeric-range/library/deals/renewal.md +49 -24
  290. package/fixtures/cases/numeric-range/schema.yaml +10 -11
  291. package/fixtures/cases/one-key-two-labels/context.json +1 -0
  292. package/fixtures/cases/one-key-two-labels/expected.json +5 -0
  293. package/fixtures/cases/one-key-two-labels/schema.yaml +5 -0
  294. package/fixtures/cases/one-key-two-types/context.json +1 -0
  295. package/fixtures/cases/one-key-two-types/expected.json +5 -0
  296. package/fixtures/cases/one-key-two-types/schema.yaml +4 -0
  297. package/fixtures/cases/one-of-variant/expected.json +2 -1
  298. package/fixtures/cases/one-of-variant/library/companies/acme.md +1 -1
  299. package/fixtures/cases/one-of-variant/library/deals/renewal.md +49 -24
  300. package/fixtures/cases/one-of-variant/schema.yaml +10 -11
  301. package/fixtures/cases/other-room-reference/expected.json +2 -1
  302. package/fixtures/cases/other-room-reference/library/companies/acme.md +1 -1
  303. package/fixtures/cases/other-room-reference/library/deals/renewal.md +12 -9
  304. package/fixtures/cases/other-room-reference/library/places/depot.md +1 -1
  305. package/fixtures/cases/other-room-reference/library/products/seats.md +1 -1
  306. package/fixtures/cases/other-room-reference/library/products/support.md +1 -1
  307. package/fixtures/cases/prototype-field/expected.json +2 -1
  308. package/fixtures/cases/prototype-field/library/item.md +2 -2
  309. package/fixtures/cases/prototype-field/schema.yaml +2 -3
  310. package/fixtures/cases/quoted-link-definition/library/notes/draft.md +1 -1
  311. package/fixtures/cases/reference-into-a-reserved-name/context.json +1 -0
  312. package/fixtures/cases/reference-into-a-reserved-name/expected.json +7 -0
  313. package/fixtures/cases/reference-into-a-reserved-name/library/notes/a.md +4 -0
  314. package/fixtures/cases/reference-into-a-reserved-name/library/settings/brief.md +1 -0
  315. package/fixtures/cases/reference-into-a-reserved-name/schema.yaml +3 -0
  316. package/fixtures/cases/reference-to-any-file-name/context.json +1 -0
  317. package/fixtures/cases/reference-to-any-file-name/expected.json +1 -0
  318. package/fixtures/cases/reference-to-any-file-name/library/people/100%.md +4 -0
  319. package/fixtures/cases/reference-to-any-file-name/library/people/C#.md +4 -0
  320. package/fixtures/cases/reference-to-any-file-name/library/people/My notes.md +4 -0
  321. package/fixtures/cases/reference-to-any-file-name/library/people/[draft].md +4 -0
  322. package/fixtures/cases/reference-to-any-file-name/library/people/c (d).md +4 -0
  323. package/fixtures/cases/reference-to-any-file-name/library/people/caf/303/251.md +4 -0
  324. package/fixtures/cases/reference-to-any-file-name/library/people//320/236/321/202/321/207/321/221/321/202.md +4 -0
  325. package/fixtures/cases/reference-to-any-file-name/library/tasks/bracket.md +9 -0
  326. package/fixtures/cases/reference-to-any-file-name/library/tasks/cyrillic.md +9 -0
  327. package/fixtures/cases/reference-to-any-file-name/library/tasks/decomposed.md +9 -0
  328. package/fixtures/cases/reference-to-any-file-name/library/tasks/hash.md +9 -0
  329. package/fixtures/cases/reference-to-any-file-name/library/tasks/parenthesis.md +9 -0
  330. package/fixtures/cases/reference-to-any-file-name/library/tasks/percent.md +9 -0
  331. package/fixtures/cases/reference-to-any-file-name/library/tasks/spaced.md +9 -0
  332. package/fixtures/cases/reference-to-any-file-name/schema.yaml +10 -0
  333. package/fixtures/cases/referenced-missing-file/library/a.md +2 -2
  334. package/fixtures/cases/referenced-missing-file/library/b.md +2 -2
  335. package/fixtures/cases/referenced-missing-file/schema.yaml +3 -4
  336. package/fixtures/cases/referenced-missing-non-latin-file/context.json +1 -0
  337. package/fixtures/cases/referenced-missing-non-latin-file/expected.json +6 -0
  338. package/fixtures/cases/referenced-missing-non-latin-file/library/tasks/a.md +9 -0
  339. package/fixtures/cases/referenced-missing-non-latin-file/library/tasks/b.md +9 -0
  340. package/fixtures/cases/referenced-missing-non-latin-file/schema.yaml +10 -0
  341. package/fixtures/cases/room-md-declares-a-type/context.json +1 -0
  342. package/fixtures/cases/room-md-declares-a-type/expected.json +6 -0
  343. package/fixtures/cases/room-md-declares-a-type/library/ROOM.md +5 -0
  344. package/fixtures/cases/sections-keyword-refused/context.json +1 -0
  345. package/fixtures/cases/sections-keyword-refused/expected.json +5 -0
  346. package/fixtures/cases/{structured-section → sections-keyword-refused}/schema.yaml +1 -2
  347. package/fixtures/cases/shortcut-reference-link/library/item.md +2 -2
  348. package/fixtures/cases/shortcut-reference-link/schema.yaml +2 -3
  349. package/fixtures/cases/string-length/expected.json +2 -1
  350. package/fixtures/cases/string-length/library/companies/acme.md +1 -1
  351. package/fixtures/cases/string-length/library/deals/renewal.md +49 -24
  352. package/fixtures/cases/string-length/schema.yaml +10 -11
  353. package/fixtures/cases/submission-keys/library/notes/visitor.md +2 -2
  354. package/fixtures/cases/text-field-kind/expected.json +1 -4
  355. package/fixtures/cases/text-field-kind/library/page.md +1 -1
  356. package/fixtures/cases/thematic-break-ends-the-values/context.json +1 -0
  357. package/fixtures/cases/thematic-break-ends-the-values/expected.json +1 -0
  358. package/fixtures/cases/thematic-break-ends-the-values/library/item.md +10 -0
  359. package/fixtures/cases/thematic-break-ends-the-values/schema.yaml +3 -0
  360. package/fixtures/cases/truncated-link-definition/library/notes/draft.md +1 -1
  361. package/fixtures/cases/typed-path-names-another-type/context.json +11 -0
  362. package/fixtures/cases/typed-path-names-another-type/expected.json +6 -0
  363. package/fixtures/cases/typed-path-names-another-type/library/settings/prefs/one.md +3 -0
  364. package/fixtures/cases/typed-path-names-another-type/schema.yaml +6 -0
  365. package/fixtures/cases/typed-path-names-its-type/context.json +11 -0
  366. package/fixtures/cases/typed-path-names-its-type/expected.json +3 -0
  367. package/fixtures/cases/typed-path-names-its-type/library/settings/prefs/deeper/two.md +1 -0
  368. package/fixtures/cases/typed-path-names-its-type/library/settings/prefs/one.md +4 -0
  369. package/fixtures/cases/typed-path-names-its-type/schema.yaml +6 -0
  370. package/fixtures/cases/typed-path-names-no-type/context.json +11 -0
  371. package/fixtures/cases/typed-path-names-no-type/expected.json +6 -0
  372. package/fixtures/cases/typed-path-names-no-type/library/settings/prefs/one.md +1 -0
  373. package/fixtures/cases/typed-path-names-no-type/schema.yaml +6 -0
  374. package/fixtures/cases/types-folder-content/library/types/task.md +1 -1
  375. package/fixtures/cases/undeclared-field/expected.json +2 -1
  376. package/fixtures/cases/undeclared-field/library/item.md +2 -2
  377. package/fixtures/cases/undeclared-field/schema.yaml +2 -3
  378. package/fixtures/cases/unevaluated-items-closed/expected.json +2 -1
  379. package/fixtures/cases/unevaluated-items-closed/library/trip.md +13 -3
  380. package/fixtures/cases/unnamed-typed-path-checks-its-fields/context.json +11 -0
  381. package/fixtures/cases/unnamed-typed-path-checks-its-fields/expected.json +6 -0
  382. package/fixtures/cases/unnamed-typed-path-checks-its-fields/library/rooms/team/tasks/plan.md +5 -0
  383. package/fixtures/cases/unnamed-typed-path-checks-its-fields/schema.yaml +5 -0
  384. package/fixtures/cases/unnamed-typed-path-names-a-type/context.json +11 -0
  385. package/fixtures/cases/unnamed-typed-path-names-a-type/expected.json +6 -0
  386. package/fixtures/cases/unnamed-typed-path-names-a-type/library/rooms/team/tasks/plan.md +7 -0
  387. package/fixtures/cases/unnamed-typed-path-names-a-type/schema.yaml +5 -0
  388. package/fixtures/cases/unnamed-typed-path-reads-its-type/context.json +11 -0
  389. package/fixtures/cases/unnamed-typed-path-reads-its-type/expected.json +3 -0
  390. package/fixtures/cases/unnamed-typed-path-reads-its-type/library/rooms/team/plan.md +1 -0
  391. package/fixtures/cases/unnamed-typed-path-reads-its-type/library/rooms/team/tasks/plan.md +6 -0
  392. package/fixtures/cases/unnamed-typed-path-reads-its-type/schema.yaml +5 -0
  393. package/fixtures/cases/unnamed-typed-path-without-a-body/context.json +11 -0
  394. package/fixtures/cases/unnamed-typed-path-without-a-body/expected.json +5 -0
  395. package/fixtures/cases/unnamed-typed-path-without-a-body/library/rooms/team/tasks/plan.md +5 -0
  396. package/fixtures/cases/unnamed-typed-path-without-a-body/schema.yaml +5 -0
  397. package/fixtures/cases/unresolved-link/library/item.md +2 -2
  398. package/fixtures/cases/unresolved-link/schema.yaml +2 -3
  399. package/fixtures/cases/valid-typed-document/library/people/ada.md +1 -1
  400. package/fixtures/cases/valid-typed-document/library/tasks/one.md +11 -11
  401. package/fixtures/cases/valid-typed-document/schema.yaml +5 -6
  402. package/fixtures/forms.json +371 -0
  403. package/fixtures/preamble.json +29 -8
  404. package/fixtures/queries.json +1359 -0
  405. package/package.json +19 -3
  406. package/dist/blocks.d.ts +0 -11
  407. package/dist/blocks.d.ts.map +0 -1
  408. package/dist/blocks.js +0 -62
  409. package/dist/condition.d.ts +0 -137
  410. package/dist/condition.d.ts.map +0 -1
  411. package/dist/condition.js +0 -394
  412. package/dist/divide.d.ts +0 -3
  413. package/dist/divide.d.ts.map +0 -1
  414. package/dist/divide.js +0 -310
  415. package/dist/links.d.ts +0 -26
  416. package/dist/links.d.ts.map +0 -1
  417. package/dist/links.js +0 -774
  418. package/dist/profile.d.ts +0 -6
  419. package/dist/profile.d.ts.map +0 -1
  420. package/dist/profile.js +0 -5
  421. package/dist/project.d.ts +0 -21
  422. package/dist/project.d.ts.map +0 -1
  423. package/dist/project.js +0 -105
  424. package/dist/sections.d.ts +0 -11
  425. package/dist/sections.d.ts.map +0 -1
  426. package/dist/sections.js +0 -57
  427. package/fixtures/cases/missing-section-item-kind/expected.json +0 -5
  428. package/fixtures/cases/missing-section-item-kind/schema.yaml +0 -6
  429. package/fixtures/cases/null-refused/expected.json +0 -6
  430. package/fixtures/cases/null-refused/library/companies/acme.md +0 -4
  431. package/fixtures/cases/null-refused/library/deals/renewal.md +0 -31
  432. package/fixtures/cases/null-refused/schema.yaml +0 -56
  433. package/fixtures/cases/open-map-value/expected.json +0 -6
  434. package/fixtures/cases/open-map-value/library/companies/acme.md +0 -4
  435. package/fixtures/cases/open-map-value/library/deals/renewal.md +0 -31
  436. package/fixtures/cases/open-map-value/schema.yaml +0 -56
  437. package/fixtures/cases/section-item-enum/expected.json +0 -6
  438. package/fixtures/cases/section-item-enum/library/task.md +0 -8
  439. package/fixtures/cases/section-item-enum/schema.yaml +0 -3
  440. package/fixtures/cases/section-item-kind/expected.json +0 -6
  441. package/fixtures/cases/section-item-kind/library/task.md +0 -8
  442. package/fixtures/cases/section-item-kind/schema.yaml +0 -3
  443. package/fixtures/cases/section-items/library/page.md +0 -42
  444. package/fixtures/cases/section-items/schema.yaml +0 -10
  445. package/fixtures/cases/section-reference-path/expected.json +0 -6
  446. package/fixtures/cases/section-reference-path/library/page.md +0 -7
  447. package/fixtures/cases/section-reference-path/schema.yaml +0 -3
  448. package/fixtures/cases/section-reference-type/expected.json +0 -6
  449. package/fixtures/cases/section-reference-type/library/page.md +0 -7
  450. package/fixtures/cases/section-reference-type/schema.yaml +0 -3
  451. package/fixtures/cases/structured-section/expected.json +0 -6
  452. package/fixtures/division.json +0 -409
  453. package/fixtures/projection.json +0 -255
  454. /package/fixtures/cases/{missing-section-item-kind → absent-link-dangles}/context.json +0 -0
  455. /package/fixtures/cases/{section-items → absent-link-dangles}/expected.json +0 -0
  456. /package/fixtures/cases/{null-refused → absolute-link}/context.json +0 -0
  457. /package/fixtures/cases/{missing-binary-image → binary-image-dangles}/context.json +0 -0
  458. /package/fixtures/cases/{missing-binary-image → binary-image-dangles}/library/notes/draft.md +0 -0
  459. /package/fixtures/cases/{missing-binary-image → binary-image-dangles}/schema.yaml +0 -0
  460. /package/fixtures/cases/{missing-binary-link → binary-link-dangles}/context.json +0 -0
  461. /package/fixtures/cases/{missing-binary-link → binary-link-dangles}/library/notes/draft.md +0 -0
  462. /package/fixtures/cases/{missing-binary-link → binary-link-dangles}/schema.yaml +0 -0
  463. /package/fixtures/cases/{open-map-value → block-scalar-frontmatter}/context.json +0 -0
  464. /package/fixtures/cases/{section-item-enum → conditional-long-text}/context.json +0 -0
  465. /package/fixtures/cases/{section-item-kind → cross-room-link}/context.json +0 -0
  466. /package/fixtures/cases/{section-items → cross-room-reference}/context.json +0 -0
  467. /package/fixtures/cases/{section-reference-path → equal-labels}/context.json +0 -0
  468. /package/fixtures/cases/{section-reference-type → frontmatter-construct}/context.json +0 -0
  469. /package/fixtures/cases/{structured-section → labels-in-the-rooms-language}/context.json +0 -0
  470. /package/fixtures/cases/{section-items → list-items}/library/other.md +0 -0
  471. /package/fixtures/cases/{section-reference-path → list-reference-path}/library/other.md +0 -0
  472. /package/fixtures/cases/{section-reference-type → list-reference-type}/library/note.md +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentshouse/mdmodel",
3
- "version": "0.1.0-c5a71fe539a49",
3
+ "version": "0.1.0-c604cd56d599c",
4
4
  "description": "MD Type language, parser, validator, structured change application, Markdown syntax profile, and conformance fixtures",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -9,7 +9,7 @@
9
9
  "access": "public"
10
10
  },
11
11
  "engines": {
12
- "node": ">=24.21.0"
12
+ "node": ">=24.22.1"
13
13
  },
14
14
  "exports": {
15
15
  ".": {
@@ -26,6 +26,22 @@
26
26
  "README.md"
27
27
  ],
28
28
  "dependencies": {
29
- "@cfworker/json-schema": "4.1.1"
29
+ "@cfworker/json-schema": "4.1.1",
30
+ "decode-named-character-reference": "1.3.0",
31
+ "mdast-util-from-markdown": "2.1.0",
32
+ "mdast-util-gfm-footnote": "2.1.0",
33
+ "mdast-util-gfm-strikethrough": "2.0.1",
34
+ "mdast-util-gfm-table": "2.0.0",
35
+ "mdast-util-gfm-task-list-item": "2.0.0",
36
+ "micromark-extension-gfm-footnote": "2.1.0",
37
+ "micromark-extension-gfm-strikethrough": "2.1.0",
38
+ "micromark-extension-gfm-table": "2.1.2",
39
+ "micromark-extension-gfm-task-list-item": "2.1.0",
40
+ "micromark-util-decode-numeric-character-reference": "2.0.2"
41
+ },
42
+ "repository": {
43
+ "type": "git",
44
+ "url": "git+https://github.com/agentshouse/core.git",
45
+ "directory": "mdmodel/packages/mdmodel"
30
46
  }
31
47
  }
package/dist/blocks.d.ts DELETED
@@ -1,11 +0,0 @@
1
- import type { Extent } from './types.js';
2
- export type HeadingLine = {
3
- readonly level: number;
4
- readonly name: string;
5
- readonly start: number;
6
- readonly textEnd: number;
7
- readonly next: number;
8
- };
9
- export declare function headingLines(content: string, from: number, to: number): HeadingLine[];
10
- export declare function blockRanges(content: string, from: number, to: number): Extent[];
11
- //# sourceMappingURL=blocks.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"blocks.d.ts","sourceRoot":"","sources":["../src/blocks.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAEzC,MAAM,MAAM,WAAW,GAAG;IACxB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB,CAAC;AAmCF,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,WAAW,EAAE,CAiBrF;AAED,wBAAgB,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,MAAM,EAAE,CAe/E"}
package/dist/blocks.js DELETED
@@ -1,62 +0,0 @@
1
- import { fenceSpans } from './links.js';
2
- const HEADING = /^(#{1,6})(?!#)[ \t]+(.+?)[ \t]*#*[ \t]*$/;
3
- function lineAt(content, from, to) {
4
- const nl = content.indexOf('\n', from);
5
- const end = nl === -1 || nl >= to ? to : nl;
6
- const raw = content.slice(from, end);
7
- return { text: raw.endsWith('\r') ? raw.slice(0, -1) : raw, next: end === to ? to : end + 1 };
8
- }
9
- function scan(content, from, to, visit) {
10
- const fences = fenceSpans(content.slice(from, to));
11
- let i = from;
12
- while (i < to) {
13
- const { text, next } = lineAt(content, i, to);
14
- const at = i - from;
15
- visit({
16
- text,
17
- start: i,
18
- next,
19
- fenced: fences.some(([start, end]) => at >= start && at < end),
20
- });
21
- if (next === i)
22
- break;
23
- i = next;
24
- }
25
- }
26
- export function headingLines(content, from, to) {
27
- const found = [];
28
- scan(content, from, to, (line) => {
29
- if (line.fenced)
30
- return;
31
- const match = HEADING.exec(line.text);
32
- const hashes = match?.[1];
33
- const name = match?.[2];
34
- if (hashes === undefined || name === undefined)
35
- return;
36
- found.push({
37
- level: hashes.length,
38
- name: name.trim(),
39
- start: line.start,
40
- textEnd: line.start + line.text.length,
41
- next: line.next,
42
- });
43
- });
44
- return found;
45
- }
46
- export function blockRanges(content, from, to) {
47
- const starts = [];
48
- let open = false;
49
- scan(content, from, to, (line) => {
50
- if (!line.fenced && line.text.trim() === '') {
51
- open = false;
52
- return;
53
- }
54
- if (!open)
55
- starts.push(line.start);
56
- open = true;
57
- });
58
- return starts.map((start, index) => ({
59
- start: index === 0 ? from : start,
60
- end: starts[index + 1] ?? to,
61
- }));
62
- }
@@ -1,137 +0,0 @@
1
- import type { ValueFacts } from './definition.js';
2
- import type { Document, VerifiedModel } from './types.js';
3
- export type ConditionValue = string | number | boolean | {
4
- readonly owner: true;
5
- };
6
- export type ConditionTest = {
7
- readonly all: readonly ConditionTest[];
8
- } | {
9
- readonly any: readonly ConditionTest[];
10
- } | {
11
- readonly not: ConditionTest;
12
- } | ({
13
- readonly path: string;
14
- } & ({
15
- readonly eq: ConditionValue;
16
- } | {
17
- readonly in: readonly ConditionValue[];
18
- } | {
19
- readonly exists: boolean;
20
- } | {
21
- readonly contains: ConditionValue;
22
- } | {
23
- readonly gt: number | string;
24
- } | {
25
- readonly gte: number | string;
26
- } | {
27
- readonly lt: number | string;
28
- } | {
29
- readonly lte: number | string;
30
- } | {
31
- readonly prefix: string;
32
- }));
33
- export type ConditionScope = {
34
- readonly type: string;
35
- } | {
36
- readonly folder: string;
37
- } | {
38
- readonly document: string;
39
- };
40
- type DocumentEventBase = {
41
- readonly on: 'documents';
42
- readonly scope: ConditionScope;
43
- readonly by?: ConditionTest;
44
- };
45
- export type DocumentCondition = (DocumentEventBase & {
46
- readonly mode: 'starts_matching';
47
- readonly new_documents: boolean;
48
- readonly match: ConditionTest;
49
- }) | (DocumentEventBase & {
50
- readonly mode: 'field_changes';
51
- readonly field: string;
52
- readonly from?: readonly ConditionValue[] | 'new';
53
- readonly to?: readonly ConditionValue[] | 'deleted';
54
- readonly match?: ConditionTest;
55
- });
56
- export type ItemCondition = {
57
- readonly on: 'items';
58
- readonly source?: string;
59
- readonly address?: string;
60
- readonly match?: ConditionTest;
61
- };
62
- export type CronCondition = {
63
- readonly on: 'clock';
64
- readonly cron: string;
65
- readonly time_zone: string;
66
- };
67
- export type DateCondition = {
68
- readonly on: 'clock';
69
- readonly scope: {
70
- readonly type: string;
71
- };
72
- readonly date: string;
73
- readonly days: number;
74
- readonly at: string;
75
- readonly time_zone: string;
76
- readonly match?: ConditionTest;
77
- };
78
- export type Condition = DocumentCondition | ItemCondition | CronCondition | DateCondition;
79
- export type FactKind = 'string' | 'number' | 'boolean' | 'date' | 'time' | 'enum' | 'reference';
80
- export type Fact = {
81
- readonly kind: FactKind;
82
- readonly value: Scalar | readonly Scalar[];
83
- };
84
- export type DocumentFacts = {
85
- readonly id: string;
86
- readonly path: string;
87
- readonly type: string | null;
88
- readonly fields: Readonly<Record<string, Fact>>;
89
- readonly members: Readonly<Record<string, string | readonly string[]>>;
90
- readonly prose: readonly string[];
91
- readonly unreadable: readonly string[];
92
- };
93
- export declare const WRITE_DOORS: readonly ['browser', 'agent', 'client'];
94
- export type WriteDoor = (typeof WRITE_DOORS)[number];
95
- export type Actor = {
96
- readonly user?: string;
97
- readonly site?: string;
98
- readonly door?: WriteDoor;
99
- };
100
- export type DocumentEvent = {
101
- readonly before: DocumentFacts | null;
102
- readonly after: DocumentFacts | null;
103
- readonly changed: readonly string[];
104
- readonly by: Actor;
105
- };
106
- export type ItemFacts = {
107
- readonly delivery: string;
108
- readonly source: string | null;
109
- readonly address: string | null;
110
- readonly has_attachment: boolean;
111
- readonly provider: string | null;
112
- readonly container: string | null;
113
- readonly author: string | null;
114
- readonly headers: Readonly<Record<string, string>>;
115
- readonly json: {
116
- readonly value: unknown;
117
- } | null;
118
- };
119
- export type Resolved = {
120
- readonly id: string;
121
- readonly member?: string;
122
- };
123
- type Truth = boolean | undefined;
124
- type Scalar = string | number | boolean;
125
- export declare function factKind(facts: ValueFacts): FactKind | null;
126
- export declare function facts(document: Document, at: {
127
- readonly id: string;
128
- readonly path: string;
129
- }, model: VerifiedModel, resolve: (target: string) => Resolved | undefined): DocumentFacts;
130
- export declare function dated(value: unknown): value is string;
131
- export declare function instant(value: unknown): bigint | undefined;
132
- export declare function pointed(value: unknown, pointer: string): unknown;
133
- export declare function holds(test: ConditionTest, document: DocumentFacts, owner: string): Truth;
134
- export declare function fires(condition: DocumentCondition, event: DocumentEvent, owner: string): boolean;
135
- export declare function itemFires(condition: ItemCondition, item: ItemFacts, owner: string): boolean;
136
- export {};
137
- //# sourceMappingURL=condition.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"condition.d.ts","sourceRoot":"","sources":["../src/condition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD,OAAO,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,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,KAAK,GAAG,OAAO,GAAG,SAAS,CAAC;AAEjC,KAAK,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;AAkBxC,wBAAgB,QAAQ,CAAC,KAAK,EAAE,UAAU,GAAG,QAAQ,GAAG,IAAI,CAS3D;AAgCD,wBAAgB,KAAK,CACnB,QAAQ,EAAE,QAAQ,EAClB,EAAE,EAAE;IAAE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,EAClD,KAAK,EAAE,aAAa,EACpB,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,QAAQ,GAAG,SAAS,GAChD,aAAa,CA4Cf;AAuCD,wBAAgB,KAAK,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAIrD;AAED,wBAAgB,OAAO,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAgC1D;AAED,wBAAgB,OAAO,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAehE;AAsID,wBAAgB,KAAK,CAAC,IAAI,EAAE,aAAa,EAAE,QAAQ,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,GAAG,KAAK,CAExF;AA4DD,wBAAgB,KAAK,CAAC,SAAS,EAAE,iBAAiB,EAAE,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAehG;AAED,wBAAgB,SAAS,CAAC,SAAS,EAAE,aAAa,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAO3F"}
package/dist/condition.js DELETED
@@ -1,394 +0,0 @@
1
- import { target } from './paths.js';
2
- import { isRecord } from './yaml.js';
3
- export const WRITE_DOORS = ['browser', 'agent', 'client'];
4
- const DATE = /^\d{4}-\d{2}-\d{2}$/u;
5
- const DATE_TIME = /^(\d{4})-(\d{2})-(\d{2})[Tt](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(?:[Zz]|([+-])(\d{2}):(\d{2}))$/u;
6
- const ARRAY_INDEX = /^(?:0|[1-9][0-9]*)$/u;
7
- export function factKind(facts) {
8
- if (facts.reference !== undefined)
9
- return 'reference';
10
- if (facts.values !== undefined)
11
- return 'enum';
12
- if (facts.type === 'number' || facts.type === 'integer')
13
- return 'number';
14
- if (facts.type === 'boolean')
15
- return 'boolean';
16
- if (facts.type !== 'string')
17
- return null;
18
- if (facts.format === 'date')
19
- return 'date';
20
- if (facts.format === 'date-time')
21
- return 'time';
22
- return 'string';
23
- }
24
- function referenced(model, facts) {
25
- return (facts.reference ?? []).some((to) => Object.hasOwn(model.types, to) && model.types[to].memberDocument);
26
- }
27
- function fits(kind, facts, value) {
28
- if (!scalar(value))
29
- return false;
30
- if (kind === 'enum')
31
- return (facts.values ?? []).includes(value);
32
- if (kind === 'number')
33
- return typeof value === 'number';
34
- if (kind === 'boolean')
35
- return typeof value === 'boolean';
36
- if (typeof value !== 'string')
37
- return false;
38
- if (kind === 'date')
39
- return dated(value);
40
- if (kind === 'time')
41
- return instant(value) !== undefined;
42
- return true;
43
- }
44
- function fitted(kind, facts, value, path, resolve) {
45
- if (!fits(kind, facts, value))
46
- return undefined;
47
- if (kind !== 'reference')
48
- return { value };
49
- const reached = target(path, value);
50
- return reached === null ? undefined : resolve(reached);
51
- }
52
- export function facts(document, at, model, resolve) {
53
- const type = document.type ?? null;
54
- const definition = type !== null && Object.hasOwn(model.types, type) ? model.types[type] : null;
55
- const fields = {};
56
- const members = {};
57
- const prose = Object.keys(document.sections).map((heading) => `/sections/${heading}`);
58
- const unreadable = [];
59
- for (const [name, declared] of Object.entries(definition === null ? {} : definition.fields)) {
60
- const value = document.fields[name];
61
- if (value === undefined || value === null)
62
- continue;
63
- const list = declared.type === 'array';
64
- const facts = list ? declared.items : declared;
65
- const kind = facts === undefined || facts.prose ? null : factKind(facts);
66
- if (kind === null) {
67
- prose.push(`/fields/${name}`);
68
- continue;
69
- }
70
- const items = list ? value : [value];
71
- const held = Array.isArray(items)
72
- ? items.map((item) => fitted(kind, facts, item, at.path, resolve))
73
- : [undefined];
74
- if (held.some((item) => item === undefined)) {
75
- unreadable.push(`/fields/${name}`);
76
- if (referenced(model, facts))
77
- unreadable.push(`/members/${name}`);
78
- continue;
79
- }
80
- const values = held.map((item) => ('id' in item ? item.id : item.value));
81
- fields[name] = { kind, value: list ? values : values[0] };
82
- if (!referenced(model, facts))
83
- continue;
84
- const bound = held.flatMap((item) => 'member' in item && item.member !== undefined ? [item.member] : []);
85
- if (list)
86
- members[name] = bound;
87
- else if (bound[0] !== undefined)
88
- members[name] = bound[0];
89
- }
90
- return {
91
- id: at.id,
92
- path: `/${at.path}`,
93
- type,
94
- fields,
95
- members,
96
- prose: prose.sort(),
97
- unreadable: unreadable.sort(),
98
- };
99
- }
100
- function readDocument(facts, path) {
101
- if (path === '/path')
102
- return { kind: 'path', value: facts.path };
103
- if (path === '/type')
104
- return facts.type === null ? undefined : { kind: 'string', value: facts.type };
105
- if (facts.unreadable.includes(path))
106
- return { kind: 'unreadable' };
107
- if (facts.prose.includes(path))
108
- return { kind: 'present' };
109
- if (path.startsWith('/fields/')) {
110
- const name = path.slice('/fields/'.length);
111
- return Object.hasOwn(facts.fields, name) ? facts.fields[name] : undefined;
112
- }
113
- if (path.startsWith('/members/')) {
114
- const name = path.slice('/members/'.length);
115
- return Object.hasOwn(facts.members, name)
116
- ? { kind: 'member', value: facts.members[name] }
117
- : undefined;
118
- }
119
- return undefined;
120
- }
121
- function readActor(actor, path) {
122
- const value = path === '/user'
123
- ? actor.user
124
- : path === '/site'
125
- ? actor.site
126
- : path === '/door'
127
- ? actor.door
128
- : undefined;
129
- return value === undefined ? undefined : { kind: 'actor', value };
130
- }
131
- function plain(value) {
132
- if (!isRecord(value))
133
- return false;
134
- const prototype = Object.getPrototypeOf(value);
135
- return prototype === Object.prototype || prototype === null;
136
- }
137
- export function dated(value) {
138
- return (typeof value === 'string' && DATE.test(value) && instant(`${value}T00:00:00Z`) !== undefined);
139
- }
140
- export function instant(value) {
141
- if (typeof value !== 'string')
142
- return undefined;
143
- const parts = DATE_TIME.exec(value);
144
- if (parts === null)
145
- return undefined;
146
- const [year, month, day, hour, minute, second, offsetHours, offsetMinutes] = [
147
- 1, 2, 3, 4, 5, 6, 9, 10,
148
- ].map((at) => Number(parts[at] ?? 0));
149
- const at = new Date(0);
150
- at.setUTCFullYear(year, month - 1, day);
151
- at.setUTCHours(hour, minute, second);
152
- if (at.getUTCFullYear() !== year ||
153
- at.getUTCMonth() !== month - 1 ||
154
- at.getUTCDate() !== day ||
155
- at.getUTCHours() !== hour ||
156
- at.getUTCMinutes() !== minute ||
157
- offsetHours > 23 ||
158
- offsetMinutes > 59)
159
- return undefined;
160
- const offset = (parts[8] === '-' ? -1 : 1) * (offsetHours * 60 + offsetMinutes);
161
- const fraction = (parts[7] ?? '').padEnd(9, '0').slice(0, 9);
162
- return (BigInt(at.getTime()) - BigInt(offset) * 60000n) * 1000000n + BigInt(fraction);
163
- }
164
- export function pointed(value, pointer) {
165
- if (pointer === '')
166
- return value;
167
- let reached = value;
168
- for (const part of pointer.slice(1).split('/')) {
169
- const token = part.replaceAll('~1', '/').replaceAll('~0', '~');
170
- if (Array.isArray(reached)) {
171
- if (!ARRAY_INDEX.test(token))
172
- return undefined;
173
- reached = reached[Number(token)];
174
- }
175
- else if (plain(reached) && Object.hasOwn(reached, token)) {
176
- reached = reached[token];
177
- }
178
- else {
179
- return undefined;
180
- }
181
- }
182
- return reached;
183
- }
184
- function scalar(value) {
185
- return (typeof value === 'string' ||
186
- typeof value === 'boolean' ||
187
- (typeof value === 'number' && Number.isFinite(value)));
188
- }
189
- function jsonHeld(value) {
190
- if (value === undefined)
191
- return undefined;
192
- if (typeof value === 'string')
193
- return {
194
- kind: dated(value) ? 'date' : instant(value) === undefined ? 'string' : 'time',
195
- value,
196
- };
197
- if (typeof value === 'boolean')
198
- return { kind: 'boolean', value };
199
- if (scalar(value))
200
- return { kind: 'number', value };
201
- if (Array.isArray(value))
202
- return { kind: 'list', value: value.filter(scalar) };
203
- return { kind: 'present' };
204
- }
205
- function readItem(item, path) {
206
- if (path.startsWith('/json/')) {
207
- if (item.json === null)
208
- return { kind: 'unreadable' };
209
- return jsonHeld(pointed(item.json.value, path.slice('/json'.length)));
210
- }
211
- if (path.startsWith('/headers/')) {
212
- const name = path.slice('/headers/'.length);
213
- return Object.hasOwn(item.headers, name)
214
- ? { kind: 'string', value: item.headers[name] }
215
- : undefined;
216
- }
217
- if (path === '/has_attachment')
218
- return { kind: 'boolean', value: item.has_attachment };
219
- const value = path === '/delivery'
220
- ? item.delivery
221
- : path === '/source'
222
- ? item.source
223
- : path === '/provider'
224
- ? item.provider
225
- : path === '/container'
226
- ? item.container
227
- : path === '/author'
228
- ? item.author
229
- : null;
230
- return value === null ? undefined : { kind: 'string', value };
231
- }
232
- function wanted(value, owner) {
233
- return isRecord(value) && value.owner === true ? owner : value;
234
- }
235
- function equal(held, value, owner) {
236
- if (held.kind === 'present' || Array.isArray(held.value))
237
- return undefined;
238
- const expected = wanted(value, owner);
239
- if (typeof expected !== typeof held.value)
240
- return undefined;
241
- if (held.kind !== 'time')
242
- return expected === held.value;
243
- const left = instant(held.value);
244
- const right = instant(expected);
245
- return left === undefined || right === undefined ? undefined : left === right;
246
- }
247
- function sign(left, right) {
248
- return left < right ? -1 : left > right ? 1 : 0;
249
- }
250
- function ordered(held, value, compare) {
251
- if (held.kind === 'present' || Array.isArray(held.value))
252
- return undefined;
253
- if (held.kind === 'number') {
254
- if (typeof value !== 'number' || typeof held.value !== 'number')
255
- return undefined;
256
- return compare(Math.sign(held.value - value));
257
- }
258
- if (held.kind === 'date') {
259
- if (!dated(value) || !dated(held.value))
260
- return undefined;
261
- return compare(sign(held.value, value));
262
- }
263
- if (held.kind !== 'time')
264
- return undefined;
265
- const at = instant(held.value);
266
- const wanted = instant(value);
267
- if (at === undefined || wanted === undefined)
268
- return undefined;
269
- return compare(sign(at, wanted));
270
- }
271
- function anyOf(truths) {
272
- if (truths.some((truth) => truth === true))
273
- return true;
274
- return truths.some((truth) => truth === undefined) ? undefined : false;
275
- }
276
- function allOf(truths) {
277
- if (truths.some((truth) => truth === false))
278
- return false;
279
- return truths.some((truth) => truth === undefined) ? undefined : true;
280
- }
281
- function leaf(test, held, owner) {
282
- if (held?.kind === 'unreadable')
283
- return undefined;
284
- if ('exists' in test)
285
- return (held !== undefined) === test.exists;
286
- if (held === undefined)
287
- return undefined;
288
- if ('eq' in test)
289
- return equal(held, test.eq, owner);
290
- if ('in' in test)
291
- return anyOf(test.in.map((value) => equal(held, value, owner)));
292
- if ('contains' in test) {
293
- if (held.kind === 'present' || !Array.isArray(held.value))
294
- return undefined;
295
- const expected = wanted(test.contains, owner);
296
- if (held.value.some((item) => item === expected))
297
- return true;
298
- if (held.kind === 'list')
299
- return false;
300
- return held.value.every((item) => typeof item === typeof expected) ? false : undefined;
301
- }
302
- if ('prefix' in test) {
303
- if (held.kind === 'present' || typeof held.value !== 'string')
304
- return undefined;
305
- if (held.kind === 'number' || held.kind === 'reference' || held.kind === 'member')
306
- return undefined;
307
- return held.value.startsWith(test.prefix);
308
- }
309
- if ('gt' in test)
310
- return ordered(held, test.gt, (sign) => sign > 0);
311
- if ('gte' in test)
312
- return ordered(held, test.gte, (sign) => sign >= 0);
313
- if ('lt' in test)
314
- return ordered(held, test.lt, (sign) => sign < 0);
315
- return ordered(held, test.lte, (sign) => sign <= 0);
316
- }
317
- function evaluated(test, read, owner) {
318
- if ('all' in test)
319
- return allOf(test.all.map((part) => evaluated(part, read, owner)));
320
- if ('any' in test)
321
- return anyOf(test.any.map((part) => evaluated(part, read, owner)));
322
- if ('not' in test) {
323
- const truth = evaluated(test.not, read, owner);
324
- return truth === undefined ? undefined : !truth;
325
- }
326
- return leaf(test, read(test.path), owner);
327
- }
328
- export function holds(test, document, owner) {
329
- return evaluated(test, (path) => readDocument(document, path), owner);
330
- }
331
- function inScope(scope, document) {
332
- if (document === null)
333
- return false;
334
- if ('type' in scope)
335
- return document.type === scope.type;
336
- if ('document' in scope)
337
- return document.id === scope.document;
338
- return scope.folder === '/' || document.path.startsWith(`${scope.folder}/`);
339
- }
340
- function matched(condition, test, document, owner) {
341
- if (!inScope(condition.scope, document))
342
- return false;
343
- return test === undefined || holds(test, document, owner) === true;
344
- }
345
- function sameFact(left, right) {
346
- return JSON.stringify(left) === JSON.stringify(right);
347
- }
348
- function among(values, document, field, owner) {
349
- return holds({ path: field, in: values }, document, owner) === true;
350
- }
351
- function fieldChanged(condition, event, owner) {
352
- const { field, from, to } = condition;
353
- if (from === undefined && to === undefined && event.changed.includes(field))
354
- return true;
355
- if (!field.startsWith('/fields/'))
356
- return false;
357
- const name = field.slice('/fields/'.length);
358
- const before = event.before?.fields[name];
359
- const after = event.after?.fields[name];
360
- if (before === undefined && after === undefined)
361
- return false;
362
- if (event.before !== null && event.after !== null && sameFact(before, after))
363
- return false;
364
- if (from === 'new'
365
- ? event.before !== null
366
- : from !== undefined && (event.before === null || !among(from, event.before, field, owner)))
367
- return false;
368
- if (to === 'deleted'
369
- ? event.after !== null
370
- : to !== undefined && (event.after === null || !among(to, event.after, field, owner)))
371
- return false;
372
- return true;
373
- }
374
- export function fires(condition, event, owner) {
375
- if (condition.by !== undefined &&
376
- evaluated(condition.by, (path) => readActor(event.by, path), owner) !== true)
377
- return false;
378
- if (condition.mode === 'starts_matching') {
379
- if (event.before === null && !condition.new_documents)
380
- return false;
381
- return (matched(condition, condition.match, event.after, owner) &&
382
- !matched(condition, condition.match, event.before, owner));
383
- }
384
- const side = event.after ?? event.before;
385
- return matched(condition, condition.match, side, owner) && fieldChanged(condition, event, owner);
386
- }
387
- export function itemFires(condition, item, owner) {
388
- if (condition.source !== undefined && item.source !== condition.source)
389
- return false;
390
- if (condition.address !== undefined && item.address !== condition.address)
391
- return false;
392
- return (condition.match === undefined ||
393
- evaluated(condition.match, (path) => readItem(item, path), owner) === true);
394
- }
package/dist/divide.d.ts DELETED
@@ -1,3 +0,0 @@
1
- import type { Division, DivisionContext, Document } from './types.js';
2
- export declare function divide(document: Document, file: string, context: DivisionContext): Division;
3
- //# sourceMappingURL=divide.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"divide.d.ts","sourceRoot":"","sources":["../src/divide.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,QAAQ,EAAE,eAAe,EAAE,QAAQ,EAAgB,MAAM,YAAY,CAAC;AA4WpF,wBAAgB,MAAM,CAAC,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,eAAe,GAAG,QAAQ,CAc3F"}