@dialecte/core 0.7.0 → 0.8.1

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 (696) hide show
  1. package/dist/assets/hub.worker-B1HcVDhn.js +2 -0
  2. package/dist/diagnostics/diagnostics.d.ts +4 -0
  3. package/dist/diagnostics/diagnostics.d.ts.map +1 -1
  4. package/dist/diagnostics/types.d.ts +6 -1
  5. package/dist/diagnostics/types.d.ts.map +1 -1
  6. package/dist/dialecte/create-dialecte-project.d.ts +11 -0
  7. package/dist/dialecte/create-dialecte-project.d.ts.map +1 -0
  8. package/dist/dialecte/create-project-factory.d.ts +14 -0
  9. package/dist/dialecte/create-project-factory.d.ts.map +1 -0
  10. package/dist/dialecte/define-dialecte.d.ts +12 -0
  11. package/dist/dialecte/define-dialecte.d.ts.map +1 -0
  12. package/dist/dialecte/dialecte.constants.d.ts +4 -0
  13. package/dist/dialecte/dialecte.constants.d.ts.map +1 -0
  14. package/dist/dialecte/dialecte.types.d.ts +75 -0
  15. package/dist/dialecte/dialecte.types.d.ts.map +1 -0
  16. package/dist/dialecte/index.d.ts +4 -0
  17. package/dist/dialecte/index.d.ts.map +1 -0
  18. package/dist/{project-DIKdMMHx.js → dialecte-gIPrRzni.js} +8031 -8457
  19. package/dist/document/bind-extensions.d.ts +4 -1
  20. package/dist/document/bind-extensions.d.ts.map +1 -1
  21. package/dist/document/document.d.ts +58 -5
  22. package/dist/document/document.d.ts.map +1 -1
  23. package/dist/document/progress/progress.types.d.ts +21 -4
  24. package/dist/document/progress/progress.types.d.ts.map +1 -1
  25. package/dist/document/query/find/ancestor/find-ancestor.d.ts +2 -0
  26. package/dist/document/query/find/ancestor/find-ancestor.d.ts.map +1 -1
  27. package/dist/document/query/find/by-attribute/find-by-attributes.d.ts +4 -0
  28. package/dist/document/query/find/by-attribute/find-by-attributes.d.ts.map +1 -1
  29. package/dist/document/query/find/descendant/find-descendant.d.ts +2 -0
  30. package/dist/document/query/find/descendant/find-descendant.d.ts.map +1 -1
  31. package/dist/document/query/get/attribute/get-attribute.d.ts +4 -0
  32. package/dist/document/query/get/attribute/get-attribute.d.ts.map +1 -1
  33. package/dist/document/query/get/attribute/get-attributes.d.ts +4 -0
  34. package/dist/document/query/get/attribute/get-attributes.d.ts.map +1 -1
  35. package/dist/document/query/get/definition/get-definition.d.ts +2 -0
  36. package/dist/document/query/get/definition/get-definition.d.ts.map +1 -1
  37. package/dist/document/query/get/record/get-child.d.ts +2 -0
  38. package/dist/document/query/get/record/get-child.d.ts.map +1 -1
  39. package/dist/document/query/get/record/get-children.d.ts +2 -0
  40. package/dist/document/query/get/record/get-children.d.ts.map +1 -1
  41. package/dist/document/query/get/record/get-record.d.ts +2 -0
  42. package/dist/document/query/get/record/get-record.d.ts.map +1 -1
  43. package/dist/document/query/get/record/get-records-by-tagname.d.ts +2 -0
  44. package/dist/document/query/get/record/get-records-by-tagname.d.ts.map +1 -1
  45. package/dist/document/query/get/record/get-records.d.ts +2 -0
  46. package/dist/document/query/get/record/get-records.d.ts.map +1 -1
  47. package/dist/document/query/get/record/load-live-records.d.ts +2 -0
  48. package/dist/document/query/get/record/load-live-records.d.ts.map +1 -1
  49. package/dist/document/query/get/record/resolve-record.d.ts +2 -0
  50. package/dist/document/query/get/record/resolve-record.d.ts.map +1 -1
  51. package/dist/document/query/get/record/staged-lookup.d.ts +4 -0
  52. package/dist/document/query/get/record/staged-lookup.d.ts.map +1 -1
  53. package/dist/document/query/get/tree/get-tree.d.ts +6 -0
  54. package/dist/document/query/get/tree/get-tree.d.ts.map +1 -1
  55. package/dist/document/query/main.d.ts +50 -15
  56. package/dist/document/query/main.d.ts.map +1 -1
  57. package/dist/document/query/snapshot/collect-snapshot.d.ts +2 -0
  58. package/dist/document/query/snapshot/collect-snapshot.d.ts.map +1 -1
  59. package/dist/document/query/snapshot/get-snapshot.d.ts +2 -0
  60. package/dist/document/query/snapshot/get-snapshot.d.ts.map +1 -1
  61. package/dist/document/query/snapshot/records-to-tree.d.ts +2 -0
  62. package/dist/document/query/snapshot/records-to-tree.d.ts.map +1 -1
  63. package/dist/document/query/tree-filter/omit.d.ts +8 -0
  64. package/dist/document/query/tree-filter/omit.d.ts.map +1 -1
  65. package/dist/document/query/tree-filter/order.d.ts +5 -2
  66. package/dist/document/query/tree-filter/order.d.ts.map +1 -1
  67. package/dist/document/query/tree-filter/unwrap.d.ts +2 -0
  68. package/dist/document/query/tree-filter/unwrap.d.ts.map +1 -1
  69. package/dist/document/staged-operations.d.ts +5 -1
  70. package/dist/document/staged-operations.d.ts.map +1 -1
  71. package/dist/document/transaction/clone/clone.d.ts +2 -0
  72. package/dist/document/transaction/clone/clone.d.ts.map +1 -1
  73. package/dist/document/transaction/commit/commit.d.ts.map +1 -1
  74. package/dist/document/transaction/commit/merge-operations.d.ts +1 -1
  75. package/dist/document/transaction/commit/merge-operations.d.ts.map +1 -1
  76. package/dist/document/transaction/commit/summarize-operations.d.ts +16 -0
  77. package/dist/document/transaction/commit/summarize-operations.d.ts.map +1 -0
  78. package/dist/document/transaction/commit/summarize-operations.types.d.ts +17 -0
  79. package/dist/document/transaction/commit/summarize-operations.types.d.ts.map +1 -0
  80. package/dist/document/transaction/create/create.d.ts +2 -0
  81. package/dist/document/transaction/create/create.d.ts.map +1 -1
  82. package/dist/document/transaction/guard.d.ts +5 -0
  83. package/dist/document/transaction/guard.d.ts.map +1 -1
  84. package/dist/document/transaction/index.d.ts +2 -0
  85. package/dist/document/transaction/index.d.ts.map +1 -1
  86. package/dist/document/transaction/main.d.ts +46 -16
  87. package/dist/document/transaction/main.d.ts.map +1 -1
  88. package/dist/document/transaction/stage-operations.d.ts.map +1 -1
  89. package/dist/document/transaction/update/update.d.ts +2 -0
  90. package/dist/document/transaction/update/update.d.ts.map +1 -1
  91. package/dist/document/types.d.ts +3 -5
  92. package/dist/document/types.d.ts.map +1 -1
  93. package/dist/document/types.extensions.d.ts.map +1 -1
  94. package/dist/engine-store-CIEqgPUb.js +348 -0
  95. package/dist/engine.constants-DBMjMmV9.js +98 -0
  96. package/dist/engine.d.ts +9 -0
  97. package/dist/engine.d.ts.map +1 -0
  98. package/dist/engine.js +15805 -0
  99. package/dist/errors/codes.d.ts +451 -0
  100. package/dist/errors/codes.d.ts.map +1 -1
  101. package/dist/errors/errors.constants.d.ts +3 -0
  102. package/dist/errors/errors.constants.d.ts.map +1 -0
  103. package/dist/errors/errors.d.ts +10 -0
  104. package/dist/errors/errors.d.ts.map +1 -1
  105. package/dist/errors/types.d.ts +14 -0
  106. package/dist/errors/types.d.ts.map +1 -1
  107. package/dist/helpers/assert-fixed.d.ts +3 -1
  108. package/dist/helpers/assert-fixed.d.ts.map +1 -1
  109. package/dist/helpers/assert-xml-characters.d.ts +35 -0
  110. package/dist/helpers/assert-xml-characters.d.ts.map +1 -0
  111. package/dist/helpers/assert-xml-characters.types.d.ts +26 -0
  112. package/dist/helpers/assert-xml-characters.types.d.ts.map +1 -0
  113. package/dist/helpers/assert-xsi-type.d.ts +4 -0
  114. package/dist/helpers/assert-xsi-type.d.ts.map +1 -1
  115. package/dist/helpers/converter.d.ts +21 -6
  116. package/dist/helpers/converter.d.ts.map +1 -1
  117. package/dist/helpers/evaluate-expectations.d.ts +21 -0
  118. package/dist/helpers/evaluate-expectations.d.ts.map +1 -0
  119. package/dist/helpers/evaluate-expectations.types.d.ts +31 -0
  120. package/dist/helpers/evaluate-expectations.types.d.ts.map +1 -0
  121. package/dist/helpers/guard.d.ts +24 -4
  122. package/dist/helpers/guard.d.ts.map +1 -1
  123. package/dist/helpers/index.d.ts +2 -0
  124. package/dist/helpers/index.d.ts.map +1 -1
  125. package/dist/helpers/merge-extensions.d.ts +2 -0
  126. package/dist/helpers/merge-extensions.d.ts.map +1 -1
  127. package/dist/helpers/read-attributes.d.ts +4 -0
  128. package/dist/helpers/read-attributes.d.ts.map +1 -1
  129. package/dist/helpers/standardizing.d.ts +10 -0
  130. package/dist/helpers/standardizing.d.ts.map +1 -1
  131. package/dist/helpers/strip-attributes.d.ts +2 -0
  132. package/dist/helpers/strip-attributes.d.ts.map +1 -1
  133. package/dist/helpers-DVShv41E.js +489 -0
  134. package/dist/helpers.js +3 -439
  135. package/dist/in-process-link-DBeAOZRp.js +2791 -0
  136. package/dist/index.d.ts +1 -0
  137. package/dist/index.d.ts.map +1 -1
  138. package/dist/index.js +13 -12
  139. package/dist/perf/create-perf.d.ts +8 -1
  140. package/dist/perf/create-perf.d.ts.map +1 -1
  141. package/dist/perf/index.d.ts +1 -1
  142. package/dist/perf/index.d.ts.map +1 -1
  143. package/dist/perf/noop-perf.d.ts.map +1 -1
  144. package/dist/perf/perf.types.d.ts +65 -6
  145. package/dist/perf/perf.types.d.ts.map +1 -1
  146. package/dist/project/index.d.ts +7 -5
  147. package/dist/project/index.d.ts.map +1 -1
  148. package/dist/project/io/export-blob.d.ts +5 -2
  149. package/dist/project/io/export-blob.d.ts.map +1 -1
  150. package/dist/project/io/export-document.d.ts +5 -4
  151. package/dist/project/io/export-document.d.ts.map +1 -1
  152. package/dist/project/io/index.d.ts +1 -1
  153. package/dist/project/io/index.d.ts.map +1 -1
  154. package/dist/project/io/init-empty-document.d.ts +2 -0
  155. package/dist/project/io/init-empty-document.d.ts.map +1 -1
  156. package/dist/project/io/run-export.d.ts +19 -0
  157. package/dist/project/io/run-export.d.ts.map +1 -0
  158. package/dist/project/io/run-export.types.d.ts +45 -0
  159. package/dist/project/io/run-export.types.d.ts.map +1 -0
  160. package/dist/project/io/run-import.d.ts +15 -0
  161. package/dist/project/io/run-import.d.ts.map +1 -0
  162. package/dist/project/io/run-import.types.d.ts +19 -0
  163. package/dist/project/io/run-import.types.d.ts.map +1 -0
  164. package/dist/project/io/store-runtime.constants.d.ts +6 -0
  165. package/dist/project/io/store-runtime.constants.d.ts.map +1 -0
  166. package/dist/project/io/store-runtime.d.ts +12 -0
  167. package/dist/project/io/store-runtime.d.ts.map +1 -0
  168. package/dist/project/io/store-runtime.types.d.ts +18 -0
  169. package/dist/project/io/store-runtime.types.d.ts.map +1 -0
  170. package/dist/project/project-channel.d.ts +11 -0
  171. package/dist/project/project-channel.d.ts.map +1 -0
  172. package/dist/project/project.constants.d.ts +12 -0
  173. package/dist/project/project.constants.d.ts.map +1 -0
  174. package/dist/project/project.d.ts +315 -31
  175. package/dist/project/project.d.ts.map +1 -1
  176. package/dist/project/state/document-lifecycle.d.ts +0 -12
  177. package/dist/project/state/document-lifecycle.d.ts.map +1 -1
  178. package/dist/project/state/document-state.d.ts +4 -0
  179. package/dist/project/state/document-state.d.ts.map +1 -1
  180. package/dist/project/types.d.ts +126 -60
  181. package/dist/project/types.d.ts.map +1 -1
  182. package/dist/project-key-Ch34EtFa.js +1435 -0
  183. package/dist/rolldown-runtime-CYdcPHCu.js +12 -0
  184. package/dist/running-operations-vnijBvn7.js +76 -0
  185. package/dist/same-json-value-C6kUaoyt.js +1603 -0
  186. package/dist/sqlite.d.ts +5 -0
  187. package/dist/sqlite.d.ts.map +1 -0
  188. package/dist/sqlite.js +2671 -0
  189. package/dist/sqlite3.wasm +0 -0
  190. package/dist/store/apply-record-patch.d.ts +13 -0
  191. package/dist/store/apply-record-patch.d.ts.map +1 -0
  192. package/dist/store/closing-connections.d.ts +7 -0
  193. package/dist/store/closing-connections.d.ts.map +1 -0
  194. package/dist/store/closing-connections.types.d.ts +13 -0
  195. package/dist/store/closing-connections.types.d.ts.map +1 -0
  196. package/dist/store/commit-progress.d.ts +10 -0
  197. package/dist/store/commit-progress.d.ts.map +1 -0
  198. package/dist/store/compare-by-id.d.ts +10 -0
  199. package/dist/store/compare-by-id.d.ts.map +1 -0
  200. package/dist/store/document-path.constants.d.ts +20 -0
  201. package/dist/store/document-path.constants.d.ts.map +1 -0
  202. package/dist/store/document-path.d.ts +75 -0
  203. package/dist/store/document-path.d.ts.map +1 -0
  204. package/dist/store/document-path.types.d.ts +11 -0
  205. package/dist/store/document-path.types.d.ts.map +1 -0
  206. package/dist/store/engine/client/check-engine-wire.d.ts +8 -0
  207. package/dist/store/engine/client/check-engine-wire.d.ts.map +1 -0
  208. package/dist/store/engine/client/client.constants.d.ts +30 -0
  209. package/dist/store/engine/client/client.constants.d.ts.map +1 -0
  210. package/dist/store/engine/client/client.types.d.ts +200 -0
  211. package/dist/store/engine/client/client.types.d.ts.map +1 -0
  212. package/dist/store/engine/client/engine-client.d.ts +15 -0
  213. package/dist/store/engine/client/engine-client.d.ts.map +1 -0
  214. package/dist/store/engine/client/engine-control.d.ts +16 -0
  215. package/dist/store/engine/client/engine-control.d.ts.map +1 -0
  216. package/dist/store/engine/client/heartbeat-watch.d.ts +17 -0
  217. package/dist/store/engine/client/heartbeat-watch.d.ts.map +1 -0
  218. package/dist/store/engine/client/hub-connector.d.ts +11 -0
  219. package/dist/store/engine/client/hub-connector.d.ts.map +1 -0
  220. package/dist/store/engine/client/hub-connector.types.d.ts +25 -0
  221. package/dist/store/engine/client/hub-connector.types.d.ts.map +1 -0
  222. package/dist/store/engine/client/worker-connector.d.ts +32 -0
  223. package/dist/store/engine/client/worker-connector.d.ts.map +1 -0
  224. package/dist/store/engine/creation-refusal.d.ts +10 -0
  225. package/dist/store/engine/creation-refusal.d.ts.map +1 -0
  226. package/dist/store/engine/dialecte-refusal.d.ts +18 -0
  227. package/dist/store/engine/dialecte-refusal.d.ts.map +1 -0
  228. package/dist/store/engine/engine-store.d.ts +163 -0
  229. package/dist/store/engine/engine-store.d.ts.map +1 -0
  230. package/dist/store/engine/engine-store.types.d.ts +53 -0
  231. package/dist/store/engine/engine-store.types.d.ts.map +1 -0
  232. package/dist/store/engine/engine.constants.d.ts +14 -0
  233. package/dist/store/engine/engine.constants.d.ts.map +1 -0
  234. package/dist/store/engine/engine.types.d.ts +165 -0
  235. package/dist/store/engine/engine.types.d.ts.map +1 -0
  236. package/dist/store/engine/host/engine-wire.d.ts +19 -0
  237. package/dist/store/engine/host/engine-wire.d.ts.map +1 -0
  238. package/dist/store/engine/host/heartbeat.d.ts +33 -0
  239. package/dist/store/engine/host/heartbeat.d.ts.map +1 -0
  240. package/dist/store/engine/host/host.constants.d.ts +13 -0
  241. package/dist/store/engine/host/host.constants.d.ts.map +1 -0
  242. package/dist/store/engine/host/host.types.d.ts +65 -0
  243. package/dist/store/engine/host/host.types.d.ts.map +1 -0
  244. package/dist/store/engine/host/store-events.d.ts +14 -0
  245. package/dist/store/engine/host/store-events.d.ts.map +1 -0
  246. package/dist/store/engine/hub/hub-client.constants.d.ts +27 -0
  247. package/dist/store/engine/hub/hub-client.constants.d.ts.map +1 -0
  248. package/dist/store/engine/hub/hub-client.d.ts +46 -0
  249. package/dist/store/engine/hub/hub-client.d.ts.map +1 -0
  250. package/dist/store/engine/hub/hub-client.types.d.ts +208 -0
  251. package/dist/store/engine/hub/hub-client.types.d.ts.map +1 -0
  252. package/dist/store/engine/hub/hub-protocol.types.d.ts +193 -0
  253. package/dist/store/engine/hub/hub-protocol.types.d.ts.map +1 -0
  254. package/dist/store/engine/hub/hub-router.d.ts +9 -0
  255. package/dist/store/engine/hub/hub-router.d.ts.map +1 -0
  256. package/dist/store/engine/hub/hub-shell.d.ts +13 -0
  257. package/dist/store/engine/hub/hub-shell.d.ts.map +1 -0
  258. package/dist/store/engine/hub/hub-shell.types.d.ts +64 -0
  259. package/dist/store/engine/hub/hub-shell.types.d.ts.map +1 -0
  260. package/dist/store/engine/hub/hub.constants.d.ts +33 -0
  261. package/dist/store/engine/hub/hub.constants.d.ts.map +1 -0
  262. package/dist/store/engine/hub/hub.types.d.ts +305 -0
  263. package/dist/store/engine/hub/hub.types.d.ts.map +1 -0
  264. package/dist/store/engine/hub/hub.worker.d.ts +2 -0
  265. package/dist/store/engine/hub/hub.worker.d.ts.map +1 -0
  266. package/dist/store/engine/hub/realm-host.d.ts +10 -0
  267. package/dist/store/engine/hub/realm-host.d.ts.map +1 -0
  268. package/dist/store/engine/hub/realm-host.types.d.ts +78 -0
  269. package/dist/store/engine/hub/realm-host.types.d.ts.map +1 -0
  270. package/dist/store/engine/project-key.d.ts +15 -0
  271. package/dist/store/engine/project-key.d.ts.map +1 -0
  272. package/dist/store/engine/wire/error-envelope.d.ts +25 -0
  273. package/dist/store/engine/wire/error-envelope.d.ts.map +1 -0
  274. package/dist/store/engine/wire/wire-values.d.ts +33 -0
  275. package/dist/store/engine/wire/wire-values.d.ts.map +1 -0
  276. package/dist/store/engine/wire/wire.constants.d.ts +116 -0
  277. package/dist/store/engine/wire/wire.constants.d.ts.map +1 -0
  278. package/dist/store/engine/wire/wire.types.d.ts +119 -0
  279. package/dist/store/engine/wire/wire.types.d.ts.map +1 -0
  280. package/dist/store/hub-public.d.ts +33 -0
  281. package/dist/store/hub-public.d.ts.map +1 -0
  282. package/dist/store/ignore-destroy-outcome.d.ts +6 -0
  283. package/dist/store/ignore-destroy-outcome.d.ts.map +1 -0
  284. package/dist/store/in-memory/in-memory-state.d.ts +46 -0
  285. package/dist/store/in-memory/in-memory-state.d.ts.map +1 -0
  286. package/dist/store/in-memory/in-memory-store.constants.d.ts +7 -0
  287. package/dist/store/in-memory/in-memory-store.constants.d.ts.map +1 -0
  288. package/dist/store/in-memory/in-memory-store.d.ts +105 -17
  289. package/dist/store/in-memory/in-memory-store.d.ts.map +1 -1
  290. package/dist/store/in-memory/types.d.ts +55 -1
  291. package/dist/store/in-memory/types.d.ts.map +1 -1
  292. package/dist/store/index.d.ts +8 -2
  293. package/dist/store/index.d.ts.map +1 -1
  294. package/dist/store/json-values.constants.d.ts +18 -0
  295. package/dist/store/json-values.constants.d.ts.map +1 -0
  296. package/dist/store/json-values.d.ts +40 -0
  297. package/dist/store/json-values.d.ts.map +1 -0
  298. package/dist/store/json-values.types.d.ts +18 -0
  299. package/dist/store/json-values.types.d.ts.map +1 -0
  300. package/dist/store/local/dexie-store.constants.d.ts +20 -0
  301. package/dist/store/local/dexie-store.constants.d.ts.map +1 -0
  302. package/dist/store/local/dexie-store.d.ts +134 -5
  303. package/dist/store/local/dexie-store.d.ts.map +1 -1
  304. package/dist/store/local/types.d.ts +6 -0
  305. package/dist/store/local/types.d.ts.map +1 -1
  306. package/dist/store/lost-write.d.ts +32 -0
  307. package/dist/store/lost-write.d.ts.map +1 -0
  308. package/dist/store/lost-write.types.d.ts +4 -0
  309. package/dist/store/lost-write.types.d.ts.map +1 -0
  310. package/dist/store/open-connections.d.ts +4 -0
  311. package/dist/store/open-connections.d.ts.map +1 -0
  312. package/dist/store/open-connections.types.d.ts +17 -0
  313. package/dist/store/open-connections.types.d.ts.map +1 -0
  314. package/dist/store/own-import.d.ts +10 -0
  315. package/dist/store/own-import.d.ts.map +1 -0
  316. package/dist/store/project-name.d.ts +10 -0
  317. package/dist/store/project-name.d.ts.map +1 -0
  318. package/dist/store/resolve-store.d.ts +28 -4
  319. package/dist/store/resolve-store.d.ts.map +1 -1
  320. package/dist/store/running-operations.d.ts +7 -0
  321. package/dist/store/running-operations.d.ts.map +1 -0
  322. package/dist/store/running-operations.types.d.ts +10 -0
  323. package/dist/store/running-operations.types.d.ts.map +1 -0
  324. package/dist/store/same-json-value.d.ts +9 -0
  325. package/dist/store/same-json-value.d.ts.map +1 -0
  326. package/dist/store/sqlite/adapter/in-process-link.d.ts +20 -0
  327. package/dist/store/sqlite/adapter/in-process-link.d.ts.map +1 -0
  328. package/dist/store/sqlite/adapter/in-process-link.types.d.ts +21 -0
  329. package/dist/store/sqlite/adapter/in-process-link.types.d.ts.map +1 -0
  330. package/dist/store/sqlite/adapter/realm-storage.d.ts +10 -0
  331. package/dist/store/sqlite/adapter/realm-storage.d.ts.map +1 -0
  332. package/dist/store/sqlite/adapter/sqlite-connector.d.ts +14 -0
  333. package/dist/store/sqlite/adapter/sqlite-connector.d.ts.map +1 -0
  334. package/dist/store/sqlite/adapter/sqlite-engine-settings.d.ts +4 -0
  335. package/dist/store/sqlite/adapter/sqlite-engine-settings.d.ts.map +1 -0
  336. package/dist/store/sqlite/adapter/sqlite-hub-spawner.d.ts +8 -0
  337. package/dist/store/sqlite/adapter/sqlite-hub-spawner.d.ts.map +1 -0
  338. package/dist/store/sqlite/adapter/sqlite-hub-spawner.types.d.ts +5 -0
  339. package/dist/store/sqlite/adapter/sqlite-hub-spawner.types.d.ts.map +1 -0
  340. package/dist/store/sqlite/adapter/sqlite-worker-connector.d.ts +8 -0
  341. package/dist/store/sqlite/adapter/sqlite-worker-connector.d.ts.map +1 -0
  342. package/dist/store/sqlite/adapter/sqlite-worker-connector.types.d.ts +5 -0
  343. package/dist/store/sqlite/adapter/sqlite-worker-connector.types.d.ts.map +1 -0
  344. package/dist/store/sqlite/engine/blobs.d.ts +55 -0
  345. package/dist/store/sqlite/engine/blobs.d.ts.map +1 -0
  346. package/dist/store/sqlite/engine/bulk-insert.d.ts +31 -0
  347. package/dist/store/sqlite/engine/bulk-insert.d.ts.map +1 -0
  348. package/dist/store/sqlite/engine/commit.d.ts +20 -0
  349. package/dist/store/sqlite/engine/commit.d.ts.map +1 -0
  350. package/dist/store/sqlite/engine/device-cache.d.ts +13 -0
  351. package/dist/store/sqlite/engine/device-cache.d.ts.map +1 -0
  352. package/dist/store/sqlite/engine/engine-errors.d.ts +26 -0
  353. package/dist/store/sqlite/engine/engine-errors.d.ts.map +1 -0
  354. package/dist/store/sqlite/engine/engine.constants.d.ts +144 -0
  355. package/dist/store/sqlite/engine/engine.constants.d.ts.map +1 -0
  356. package/dist/store/sqlite/engine/engine.types.d.ts +361 -0
  357. package/dist/store/sqlite/engine/engine.types.d.ts.map +1 -0
  358. package/dist/store/sqlite/engine/history.d.ts +114 -0
  359. package/dist/store/sqlite/engine/history.d.ts.map +1 -0
  360. package/dist/store/sqlite/engine/import-queue.d.ts +7 -0
  361. package/dist/store/sqlite/engine/import-queue.d.ts.map +1 -0
  362. package/dist/store/sqlite/engine/import-target.d.ts +23 -0
  363. package/dist/store/sqlite/engine/import-target.d.ts.map +1 -0
  364. package/dist/store/sqlite/engine/import-window.d.ts +23 -0
  365. package/dist/store/sqlite/engine/import-window.d.ts.map +1 -0
  366. package/dist/store/sqlite/engine/reclaim.d.ts +13 -0
  367. package/dist/store/sqlite/engine/reclaim.d.ts.map +1 -0
  368. package/dist/store/sqlite/engine/records.d.ts +117 -0
  369. package/dist/store/sqlite/engine/records.d.ts.map +1 -0
  370. package/dist/store/sqlite/engine/registry.d.ts +76 -0
  371. package/dist/store/sqlite/engine/registry.d.ts.map +1 -0
  372. package/dist/store/sqlite/engine/schema.d.ts +57 -0
  373. package/dist/store/sqlite/engine/schema.d.ts.map +1 -0
  374. package/dist/store/sqlite/engine/sqlite-engine.d.ts +14 -0
  375. package/dist/store/sqlite/engine/sqlite-engine.d.ts.map +1 -0
  376. package/dist/store/sqlite/engine/transaction.d.ts +12 -0
  377. package/dist/store/sqlite/engine/transaction.d.ts.map +1 -0
  378. package/dist/store/sqlite/list-projects.constants.d.ts +12 -0
  379. package/dist/store/sqlite/list-projects.constants.d.ts.map +1 -0
  380. package/dist/store/sqlite/list-projects.d.ts +22 -0
  381. package/dist/store/sqlite/list-projects.d.ts.map +1 -0
  382. package/dist/store/sqlite/list-projects.types.d.ts +28 -0
  383. package/dist/store/sqlite/list-projects.types.d.ts.map +1 -0
  384. package/dist/store/sqlite/load-sqlite.d.ts +11 -0
  385. package/dist/store/sqlite/load-sqlite.d.ts.map +1 -0
  386. package/dist/store/sqlite/runtime/close-engine.d.ts +18 -0
  387. package/dist/store/sqlite/runtime/close-engine.d.ts.map +1 -0
  388. package/dist/store/sqlite/runtime/install-pool.d.ts +94 -0
  389. package/dist/store/sqlite/runtime/install-pool.d.ts.map +1 -0
  390. package/dist/store/sqlite/runtime/pool-header.d.ts +13 -0
  391. package/dist/store/sqlite/runtime/pool-header.d.ts.map +1 -0
  392. package/dist/store/sqlite/runtime/progress-beat.d.ts +13 -0
  393. package/dist/store/sqlite/runtime/progress-beat.d.ts.map +1 -0
  394. package/dist/store/sqlite/runtime/runtime.constants.d.ts +57 -0
  395. package/dist/store/sqlite/runtime/runtime.constants.d.ts.map +1 -0
  396. package/dist/store/sqlite/runtime/runtime.types.d.ts +56 -0
  397. package/dist/store/sqlite/runtime/runtime.types.d.ts.map +1 -0
  398. package/dist/store/sqlite/runtime/serve-dialecte-engine.d.ts +16 -0
  399. package/dist/store/sqlite/runtime/serve-dialecte-engine.d.ts.map +1 -0
  400. package/dist/store/sqlite/sqlite-store-of.d.ts +7 -0
  401. package/dist/store/sqlite/sqlite-store-of.d.ts.map +1 -0
  402. package/dist/store/sqlite/sqlite-text.d.ts +20 -0
  403. package/dist/store/sqlite/sqlite-text.d.ts.map +1 -0
  404. package/dist/store/sqlite/sqlite-wasm-url.d.ts +9 -0
  405. package/dist/store/sqlite/sqlite-wasm-url.d.ts.map +1 -0
  406. package/dist/store/sqlite/sqlite.constants.d.ts +15 -0
  407. package/dist/store/sqlite/sqlite.constants.d.ts.map +1 -0
  408. package/dist/store/sqlite/sqlite.types.d.ts +36 -0
  409. package/dist/store/sqlite/sqlite.types.d.ts.map +1 -0
  410. package/dist/store/sqlite-storage.constants.d.ts +14 -0
  411. package/dist/store/sqlite-storage.constants.d.ts.map +1 -0
  412. package/dist/store/sqlite-storage.d.ts +22 -0
  413. package/dist/store/sqlite-storage.d.ts.map +1 -0
  414. package/dist/store/sqlite-storage.types.d.ts +24 -0
  415. package/dist/store/sqlite-storage.types.d.ts.map +1 -0
  416. package/dist/store/store-errors.d.ts +51 -0
  417. package/dist/store/store-errors.d.ts.map +1 -0
  418. package/dist/store/store.constants.d.ts +15 -3
  419. package/dist/store/store.constants.d.ts.map +1 -1
  420. package/dist/store/store.types.d.ts +280 -16
  421. package/dist/store/store.types.d.ts.map +1 -1
  422. package/dist/store/stored-record.d.ts +16 -0
  423. package/dist/store/stored-record.d.ts.map +1 -0
  424. package/dist/store/unfinished-imports.d.ts +15 -0
  425. package/dist/store/unfinished-imports.d.ts.map +1 -0
  426. package/dist/store/write-outcome.d.ts +34 -0
  427. package/dist/store/write-outcome.d.ts.map +1 -0
  428. package/dist/test/assert-valid-xml/assert-valid-xml.constants.d.ts +7 -0
  429. package/dist/test/assert-valid-xml/assert-valid-xml.constants.d.ts.map +1 -0
  430. package/dist/test/assert-valid-xml/assert-valid-xml.d.ts +19 -18
  431. package/dist/test/assert-valid-xml/assert-valid-xml.d.ts.map +1 -1
  432. package/dist/test/assert-valid-xml/assert-valid-xml.types.d.ts +8 -4
  433. package/dist/test/assert-valid-xml/assert-valid-xml.types.d.ts.map +1 -1
  434. package/dist/test/assert-xml/assert-xml.constants.d.ts +25 -0
  435. package/dist/test/assert-xml/assert-xml.constants.d.ts.map +1 -0
  436. package/dist/test/assert-xml/assert-xml.d.ts +23 -34
  437. package/dist/test/assert-xml/assert-xml.d.ts.map +1 -1
  438. package/dist/test/assert-xml/assert-xml.types.d.ts +48 -0
  439. package/dist/test/assert-xml/assert-xml.types.d.ts.map +1 -0
  440. package/dist/test/assert-xml/describe-nearby.d.ts +16 -0
  441. package/dist/test/assert-xml/describe-nearby.d.ts.map +1 -0
  442. package/dist/test/assert-xml/describe-node-place.d.ts +15 -0
  443. package/dist/test/assert-xml/describe-node-place.d.ts.map +1 -0
  444. package/dist/test/assert-xml/index.d.ts +1 -1
  445. package/dist/test/assert-xml/index.d.ts.map +1 -1
  446. package/dist/test/assert-xml/query-failure-message.d.ts +24 -0
  447. package/dist/test/assert-xml/query-failure-message.d.ts.map +1 -0
  448. package/dist/test/assert-xml/read-xpath-step.d.ts +8 -0
  449. package/dist/test/assert-xml/read-xpath-step.d.ts.map +1 -0
  450. package/dist/test/assert-xml/xpath-parser.d.ts +2 -1
  451. package/dist/test/assert-xml/xpath-parser.d.ts.map +1 -1
  452. package/dist/test/config.d.ts +5 -0
  453. package/dist/test/config.d.ts.map +1 -1
  454. package/dist/test/constant.d.ts +2 -0
  455. package/dist/test/constant.d.ts.map +1 -1
  456. package/dist/test/create-test-dialecte.d.ts +32 -37
  457. package/dist/test/create-test-dialecte.d.ts.map +1 -1
  458. package/dist/test/create-test-dialecte.types.d.ts +99 -0
  459. package/dist/test/create-test-dialecte.types.d.ts.map +1 -0
  460. package/dist/test/create-test-helpers-internal.types.d.ts +19 -0
  461. package/dist/test/create-test-helpers-internal.types.d.ts.map +1 -0
  462. package/dist/test/create-test-helpers.d.ts +13 -0
  463. package/dist/test/create-test-helpers.d.ts.map +1 -0
  464. package/dist/test/create-test-helpers.types.d.ts +50 -0
  465. package/dist/test/create-test-helpers.types.d.ts.map +1 -0
  466. package/dist/test/fixtures/test-entry-scan-constraint.d.ts +3 -0
  467. package/dist/test/fixtures/test-entry-scan-constraint.d.ts.map +1 -0
  468. package/dist/test/fixtures/test-entry-scan-edges.types.d.ts +10 -0
  469. package/dist/test/fixtures/test-entry-scan-edges.types.d.ts.map +1 -0
  470. package/dist/test/fixtures/test-entry-scan-recursive.d.ts +4 -0
  471. package/dist/test/fixtures/test-entry-scan-recursive.d.ts.map +1 -0
  472. package/dist/test/fixtures/test-entry-scan-recursive.types.d.ts +15 -0
  473. package/dist/test/fixtures/test-entry-scan-recursive.types.d.ts.map +1 -0
  474. package/dist/test/fixtures/test-entry-scan-shapes.d.ts +14 -0
  475. package/dist/test/fixtures/test-entry-scan-shapes.d.ts.map +1 -0
  476. package/dist/test/fixtures/test-entry-scan-shapes.types.d.ts +14 -0
  477. package/dist/test/fixtures/test-entry-scan-shapes.types.d.ts.map +1 -0
  478. package/dist/test/fixtures/test-entry-scan-tree.d.ts +3 -0
  479. package/dist/test/fixtures/test-entry-scan-tree.d.ts.map +1 -0
  480. package/dist/test/fixtures/test-entry-scan.d.ts +5 -0
  481. package/dist/test/fixtures/test-entry-scan.d.ts.map +1 -0
  482. package/dist/test/fixtures/test-entry-scan.types.d.ts +5 -0
  483. package/dist/test/fixtures/test-entry-scan.types.d.ts.map +1 -0
  484. package/dist/test/generated/definition.generated.d.ts +5 -0
  485. package/dist/test/generated/definition.generated.d.ts.map +1 -1
  486. package/dist/test/in-memory-storage.setup.d.ts +2 -0
  487. package/dist/test/in-memory-storage.setup.d.ts.map +1 -0
  488. package/dist/test/index.d.ts +6 -0
  489. package/dist/test/index.d.ts.map +1 -1
  490. package/dist/test/normalize-uuids.constants.d.ts +3 -0
  491. package/dist/test/normalize-uuids.constants.d.ts.map +1 -0
  492. package/dist/test/normalize-uuids.d.ts +12 -0
  493. package/dist/test/normalize-uuids.d.ts.map +1 -1
  494. package/dist/test/run-test-cases.d.ts +30 -11
  495. package/dist/test/run-test-cases.d.ts.map +1 -1
  496. package/dist/test/run-test-cases.type.d.ts +16 -0
  497. package/dist/test/run-test-cases.type.d.ts.map +1 -1
  498. package/dist/test/sqlite-storage.setup.d.ts +1 -0
  499. package/dist/test/sqlite-storage.setup.d.ts.map +1 -0
  500. package/dist/test/test-dialecte-setup.d.ts +31 -0
  501. package/dist/test/test-dialecte-setup.d.ts.map +1 -0
  502. package/dist/test/test-dialecte-setup.types.d.ts +29 -0
  503. package/dist/test/test-dialecte-setup.types.d.ts.map +1 -0
  504. package/dist/test/test-dialecte.d.ts +2722 -0
  505. package/dist/test/test-dialecte.d.ts.map +1 -0
  506. package/dist/test/test-dialecte.types.d.ts +3 -0
  507. package/dist/test/test-dialecte.types.d.ts.map +1 -0
  508. package/dist/test/test-dialecte.worker.d.ts +2 -0
  509. package/dist/test/test-dialecte.worker.d.ts.map +1 -0
  510. package/dist/test/test-entry-environment.constants.d.ts +27 -0
  511. package/dist/test/test-entry-environment.constants.d.ts.map +1 -0
  512. package/dist/test/test-record.d.ts +49 -1
  513. package/dist/test/test-record.d.ts.map +1 -1
  514. package/dist/test/test-storage/index.d.ts +5 -0
  515. package/dist/test/test-storage/index.d.ts.map +1 -0
  516. package/dist/test/test-storage/read-test-storage.d.ts +4 -0
  517. package/dist/test/test-storage/read-test-storage.d.ts.map +1 -0
  518. package/dist/test/test-storage/resolve-test-storage.d.ts +9 -0
  519. package/dist/test/test-storage/resolve-test-storage.d.ts.map +1 -0
  520. package/dist/test/test-storage/test-storage.constants.d.ts +9 -0
  521. package/dist/test/test-storage/test-storage.constants.d.ts.map +1 -0
  522. package/dist/test/test-storage/test-storage.types.d.ts +15 -0
  523. package/dist/test/test-storage/test-storage.types.d.ts.map +1 -0
  524. package/dist/test/test-storage/test-store-for.d.ts +19 -0
  525. package/dist/test/test-storage/test-store-for.d.ts.map +1 -0
  526. package/dist/test/test-storage/use-test-storage.d.ts +14 -0
  527. package/dist/test/test-storage/use-test-storage.d.ts.map +1 -0
  528. package/dist/test/test-timing.constants.d.ts +15 -0
  529. package/dist/test/test-timing.constants.d.ts.map +1 -0
  530. package/dist/test/xml/engine-console.d.ts +6 -0
  531. package/dist/test/xml/engine-console.d.ts.map +1 -0
  532. package/dist/test/xml/engine.d.ts +3 -0
  533. package/dist/test/xml/engine.d.ts.map +1 -0
  534. package/dist/test/xml/index.d.ts +8 -0
  535. package/dist/test/xml/index.d.ts.map +1 -0
  536. package/dist/test/xml/malformed-xml-error.d.ts +5 -0
  537. package/dist/test/xml/malformed-xml-error.d.ts.map +1 -0
  538. package/dist/test/xml/print-node.d.ts +7 -0
  539. package/dist/test/xml/print-node.d.ts.map +1 -0
  540. package/dist/test/xml/select-nodes.d.ts +14 -0
  541. package/dist/test/xml/select-nodes.d.ts.map +1 -0
  542. package/dist/test/xml/with-xml-document.constants.d.ts +7 -0
  543. package/dist/test/xml/with-xml-document.constants.d.ts.map +1 -0
  544. package/dist/test/xml/with-xml-document.d.ts +14 -0
  545. package/dist/test/xml/with-xml-document.d.ts.map +1 -0
  546. package/dist/test/xml/xml-query-refused-error.d.ts +13 -0
  547. package/dist/test/xml/xml-query-refused-error.d.ts.map +1 -0
  548. package/dist/test/xml/xml.constants.d.ts +16 -0
  549. package/dist/test/xml/xml.constants.d.ts.map +1 -0
  550. package/dist/test/xml/xml.types.d.ts +31 -0
  551. package/dist/test/xml/xml.types.d.ts.map +1 -0
  552. package/dist/test/xsd/test-ext.xsd +226 -0
  553. package/dist/test/xsd/test.xsd +528 -0
  554. package/dist/test.js +3427 -406
  555. package/dist/types/dialecte-config.d.ts +6 -0
  556. package/dist/types/dialecte-config.d.ts.map +1 -1
  557. package/dist/types/io.d.ts +5 -0
  558. package/dist/types/io.d.ts.map +1 -1
  559. package/dist/utils/attribute-rules.d.ts +16 -1
  560. package/dist/utils/attribute-rules.d.ts.map +1 -1
  561. package/dist/utils/child-occurrences.constants.d.ts +4 -0
  562. package/dist/utils/child-occurrences.constants.d.ts.map +1 -0
  563. package/dist/utils/child-occurrences.d.ts +17 -0
  564. package/dist/utils/child-occurrences.d.ts.map +1 -0
  565. package/dist/utils/child-occurrences.types.d.ts +6 -0
  566. package/dist/utils/child-occurrences.types.d.ts.map +1 -0
  567. package/dist/utils/datatype.d.ts +4 -0
  568. package/dist/utils/datatype.d.ts.map +1 -1
  569. package/dist/utils/format-xml.d.ts +4 -0
  570. package/dist/utils/format-xml.d.ts.map +1 -1
  571. package/dist/utils/index.d.ts +5 -1
  572. package/dist/utils/index.d.ts.map +1 -1
  573. package/dist/utils/invariant.d.ts +2 -0
  574. package/dist/utils/invariant.d.ts.map +1 -1
  575. package/dist/utils/namespaces.d.ts +15 -1
  576. package/dist/utils/namespaces.d.ts.map +1 -1
  577. package/dist/utils/order-children.d.ts +14 -3
  578. package/dist/utils/order-children.d.ts.map +1 -1
  579. package/dist/utils/order-children.types.d.ts +10 -0
  580. package/dist/utils/order-children.types.d.ts.map +1 -0
  581. package/dist/utils/particle-occurrences.d.ts +4 -0
  582. package/dist/utils/particle-occurrences.d.ts.map +1 -0
  583. package/dist/utils/required-choices.d.ts +17 -0
  584. package/dist/utils/required-choices.d.ts.map +1 -0
  585. package/dist/utils/required-choices.types.d.ts +15 -0
  586. package/dist/utils/required-choices.types.d.ts.map +1 -0
  587. package/dist/utils/resolve-definition.d.ts +4 -0
  588. package/dist/utils/resolve-definition.d.ts.map +1 -1
  589. package/dist/utils/save-to-disk.constants.d.ts +3 -0
  590. package/dist/utils/save-to-disk.constants.d.ts.map +1 -0
  591. package/dist/utils/save-to-disk.d.ts +17 -5
  592. package/dist/utils/save-to-disk.d.ts.map +1 -1
  593. package/dist/utils/save-to-disk.types.d.ts +17 -0
  594. package/dist/utils/save-to-disk.types.d.ts.map +1 -0
  595. package/dist/utils/seeded-uuid.constants.d.ts +5 -0
  596. package/dist/utils/seeded-uuid.constants.d.ts.map +1 -0
  597. package/dist/utils/seeded-uuid.d.ts +15 -0
  598. package/dist/utils/seeded-uuid.d.ts.map +1 -0
  599. package/dist/utils/seeded-uuid.types.d.ts +8 -0
  600. package/dist/utils/seeded-uuid.types.d.ts.map +1 -0
  601. package/dist/utils/tell-listener.constants.d.ts +9 -0
  602. package/dist/utils/tell-listener.constants.d.ts.map +1 -0
  603. package/dist/utils/tell-listener.d.ts +24 -0
  604. package/dist/utils/tell-listener.d.ts.map +1 -0
  605. package/dist/utils/xml-characters.constants.d.ts +9 -0
  606. package/dist/utils/xml-characters.constants.d.ts.map +1 -0
  607. package/dist/utils/xml-characters.d.ts +8 -0
  608. package/dist/utils/xml-characters.d.ts.map +1 -0
  609. package/dist/utils/xml-whitespace.constants.d.ts +8 -0
  610. package/dist/utils/xml-whitespace.constants.d.ts.map +1 -0
  611. package/dist/utils/xml-whitespace.d.ts +19 -0
  612. package/dist/utils/xml-whitespace.d.ts.map +1 -0
  613. package/dist/utils/xsi-type.d.ts +4 -0
  614. package/dist/utils/xsi-type.d.ts.map +1 -1
  615. package/dist/utils/yield-to-queue.d.ts +6 -0
  616. package/dist/utils/yield-to-queue.d.ts.map +1 -0
  617. package/dist/utils-USNkj4sT.js +1275 -0
  618. package/dist/utils.js +1 -2
  619. package/dist/xml/build/document-root.d.ts +7 -0
  620. package/dist/xml/build/document-root.d.ts.map +1 -0
  621. package/dist/xml/build/index.d.ts +0 -5
  622. package/dist/xml/build/index.d.ts.map +1 -1
  623. package/dist/xml/build/record-element.d.ts +15 -0
  624. package/dist/xml/build/record-element.d.ts.map +1 -0
  625. package/dist/xml/build/record-element.types.d.ts +12 -0
  626. package/dist/xml/build/record-element.types.d.ts.map +1 -0
  627. package/dist/xml/build/write-xml-records.d.ts +7 -0
  628. package/dist/xml/build/write-xml-records.d.ts.map +1 -0
  629. package/dist/xml/build/write-xml-records.types.d.ts +11 -0
  630. package/dist/xml/build/write-xml-records.types.d.ts.map +1 -0
  631. package/dist/xml/build/xml-element.d.ts +79 -0
  632. package/dist/xml/build/xml-element.d.ts.map +1 -0
  633. package/dist/xml/build/xml-element.types.d.ts +34 -0
  634. package/dist/xml/build/xml-element.types.d.ts.map +1 -0
  635. package/dist/xml/build/xml-writer.constants.d.ts +24 -0
  636. package/dist/xml/build/xml-writer.constants.d.ts.map +1 -0
  637. package/dist/xml/build/xml-writer.d.ts +40 -0
  638. package/dist/xml/build/xml-writer.d.ts.map +1 -0
  639. package/dist/xml/build/xml-writer.types.d.ts +34 -0
  640. package/dist/xml/build/xml-writer.types.d.ts.map +1 -0
  641. package/dist/xml/dom/index.d.ts +3 -0
  642. package/dist/xml/dom/index.d.ts.map +1 -0
  643. package/dist/xml/dom/xml-document-from-file.d.ts +10 -0
  644. package/dist/xml/dom/xml-document-from-file.d.ts.map +1 -0
  645. package/dist/xml/dom/xml-document-from-file.types.d.ts +5 -0
  646. package/dist/xml/dom/xml-document-from-file.types.d.ts.map +1 -0
  647. package/dist/xml/index.d.ts +1 -0
  648. package/dist/xml/index.d.ts.map +1 -1
  649. package/dist/xml/inspect-xml.d.ts +2 -0
  650. package/dist/xml/inspect-xml.d.ts.map +1 -1
  651. package/dist/xml/parse/index.d.ts +1 -1
  652. package/dist/xml/parse/index.d.ts.map +1 -1
  653. package/dist/xml/parse/parse-xml-document.constants.d.ts +5 -0
  654. package/dist/xml/parse/parse-xml-document.constants.d.ts.map +1 -0
  655. package/dist/xml/parse/parse-xml-document.d.ts +13 -2
  656. package/dist/xml/parse/parse-xml-document.d.ts.map +1 -1
  657. package/dist/xml/parse/parse-xml-document.types.d.ts +7 -2
  658. package/dist/xml/parse/parse-xml-document.types.d.ts.map +1 -1
  659. package/dist/xml/parse/parser.constants.d.ts +7 -0
  660. package/dist/xml/parse/parser.constants.d.ts.map +1 -0
  661. package/dist/xml/parse/parser.d.ts.map +1 -1
  662. package/package.json +88 -10
  663. package/skills/dialecte/SKILL.md +345 -0
  664. package/skills/dialecte/references/api.json +1830 -0
  665. package/skills/dialecte/references/api.md +557 -0
  666. package/skills/dialecte/references/core-api.md +205 -0
  667. package/skills/dialecte/references/testing.md +116 -0
  668. package/skills/dialecte-contributing/SKILL.md +374 -0
  669. package/skills/dialecte-contributing/references/code-rules.md +115 -0
  670. package/skills/dialecte-contributing/references/landing-changes.md +87 -0
  671. package/skills/dialecte-contributing/references/lot-in-a-package.md +45 -0
  672. package/skills/dialecte-contributing/references/perf.md +40 -0
  673. package/skills/dialecte-contributing/references/traps.md +109 -0
  674. package/skills/dialecte-lot/SKILL.md +526 -0
  675. package/skills/dialecte-lot/references/briefs.md +161 -0
  676. package/skills/dialecte-lot/references/model-tiers.md +52 -0
  677. package/skills/dialecte-lot/references/retro.md +51 -0
  678. package/skills/dialecte-lot/references/standard-check.md +45 -0
  679. package/skills/dialecte-lot/references/stations.md +110 -0
  680. package/dist/project/io/import-document.d.ts +0 -7
  681. package/dist/project/io/import-document.d.ts.map +0 -1
  682. package/dist/test/assert-xml/types.d.ts +0 -2
  683. package/dist/test/assert-xml/types.d.ts.map +0 -1
  684. package/dist/utils-DJN0Md0v.js +0 -624
  685. package/dist/xml/build/build-xml-document.d.ts +0 -10
  686. package/dist/xml/build/build-xml-document.d.ts.map +0 -1
  687. package/dist/xml/build/build-xml-document.types.d.ts +0 -22
  688. package/dist/xml/build/build-xml-document.types.d.ts.map +0 -1
  689. package/dist/xml/build/download-file.d.ts +0 -7
  690. package/dist/xml/build/download-file.d.ts.map +0 -1
  691. package/dist/xml/build/formatter.d.ts +0 -2
  692. package/dist/xml/build/formatter.d.ts.map +0 -1
  693. package/dist/xml/build/serialize.d.ts +0 -11
  694. package/dist/xml/build/serialize.d.ts.map +0 -1
  695. package/dist/xml/build/serialize.types.d.ts +0 -12
  696. package/dist/xml/build/serialize.types.d.ts.map +0 -1
@@ -0,0 +1,27 @@
1
+ /** Where a realm keeps its hub connection: shared by every copy of the library speaking this protocol. */
2
+ export declare const HUB_REGISTRY_KEY: unique symbol;
3
+ /**
4
+ * How long a realm waits for the hub's welcome once it said hello: a hub that does not answer (its
5
+ * script failed to load, or was blocked; a parent that unbound the port meanwhile) fails the join
6
+ * instead of keeping the realm waiting.
7
+ */
8
+ export declare const HUB_WELCOME_BUDGET_MS = 10000;
9
+ /**
10
+ * A port connected to the hub that says no hello within this long is let go: past a realm's own join budget
11
+ * (`HUB_WELCOME_BUDGET_MS`, its lock wait included) its hello no longer comes. A child's bound port is kept: its
12
+ * document may load later, and its parent unbinds it.
13
+ */
14
+ export declare const HUB_HELLO_BUDGET_MS: number;
15
+ /**
16
+ * A page back from a freeze whose hub cannot be reached tries again after this long, the delay doubling
17
+ * up to `HUB_REJOIN_MAX_DELAY_MS` (a hub restarting on a loaded machine, a deploy that moved its chunk).
18
+ */
19
+ export declare const HUB_REJOIN_FIRST_DELAY_MS = 1000;
20
+ export declare const HUB_REJOIN_MAX_DELAY_MS = 30000;
21
+ /**
22
+ * How many times in a row a view joins the next hub at once after a hub that lasted was lost, its calls waiting for an
23
+ * engine kept waiting: past it (hubs that keep ending), they are refused and the next hub is joined after the delay -
24
+ * the bound on how long a call waits across hub restarts. Counted again from zero after a quiet while.
25
+ */
26
+ export declare const HUB_REJOIN_AT_ONCE_MAX = 3;
27
+ //# sourceMappingURL=hub-client.constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hub-client.constants.d.ts","sourceRoot":"","sources":["../../../../src/store/engine/hub/hub-client.constants.ts"],"names":[],"mappings":"AAEA,0GAA0G;AAC1G,eAAO,MAAM,gBAAgB,eAA4D,CAAA;AAEzF;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,QAAS,CAAA;AAE3C;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,QAA4B,CAAA;AAE5D;;;GAGG;AACH,eAAO,MAAM,yBAAyB,OAAQ,CAAA;AAE9C,eAAO,MAAM,uBAAuB,QAAS,CAAA;AAE7C;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,IAAI,CAAA"}
@@ -0,0 +1,46 @@
1
+ import { HubConnection, HubConnectionOptions, HubConnectionParams, SpawnerRealm } from './hub-client.types';
2
+ import { HubEngineSpawner } from './realm-host.types';
3
+ /**
4
+ * Connect this realm to the origin's hub, once: a second call - from this copy of the library or
5
+ * another one of the same protocol - gets the first connection. Answers `undefined` where the browser
6
+ * has no SharedWorker, or the hub never welcomed the realm (its script failed to load or was blocked,
7
+ * or it stayed silent past the welcome budget): the caller then runs the engine itself, and a later
8
+ * call tries again. The realm registers the engines it can start whose worker is of its own origin: a
9
+ * later call adds those the connection does not run yet (`addSpawners`); one naming a dialecte the
10
+ * connection runs at another version, or two versions of one dialecte, is refused `STORE_HUB_SPAWNERS_FIXED`,
11
+ * the connection kept. A realm that cannot store (`hostsNoEngine`) registers none, its spawners checked all the same.
12
+ */
13
+ export declare function openHubConnection(params?: HubConnectionOptions): Promise<HubConnection | undefined>;
14
+ /** The realm's hub connection made or under way, if any: none is started for asking (a bound child has its own). */
15
+ export declare function keptHubConnection(): Promise<HubConnection | undefined> | undefined;
16
+ /**
17
+ * Join the hub through a port another realm made with `createHubPort` (a document that cannot reach
18
+ * the hub's script): a client only, whose liveness is its parent's. A port nobody answers (its parent
19
+ * unbound it) fails the join `STORE_CONNECTION_FAILED` once the welcome budget has passed. The realm's
20
+ * connection made or under way already, if any, is answered instead - `undefined` when that attempt
21
+ * found no hub - and it takes the new port as the one it joins on once the hub drops it (at once if it
22
+ * has): that join runs on its own, its calls waiting for the welcome; failed, the realm stays dropped
23
+ * until the next port.
24
+ */
25
+ export declare function adoptHubConnection(params: {
26
+ port: MessagePort;
27
+ }): Promise<HubConnection | undefined>;
28
+ /**
29
+ * The spawners this realm can run: a worker of another origin is refused by the browser. The URL
30
+ * resolves as `new Worker` resolves it, against the document's base URL (in a srcdoc document
31
+ * `location` resolves nothing), and is compared with this realm's origin.
32
+ */
33
+ export declare function sameOriginSpawners<GenericSpawner extends HubEngineSpawner>(params: {
34
+ spawners: GenericSpawner[];
35
+ realm?: SpawnerRealm;
36
+ }): GenericSpawner[];
37
+ /**
38
+ * A realm's connection over the ports `openPort` gives: its lock held before it says hello, the hub's
39
+ * answers routed to its project links and to the engines it hosts. What it says before it is welcomed
40
+ * waits for the welcome. A page that freezes or enters the back/forward cache ends its engines and lets
41
+ * its lock go (the hub elects other hosts); back, it joins as a new realm instance and asks for every
42
+ * project again. A hub refusing its hello (another protocol) ends it: its lock let go, everything
43
+ * waiting on it refused.
44
+ */
45
+ export declare function startHubConnection(params: HubConnectionParams): Promise<HubConnection>;
46
+ //# sourceMappingURL=hub-client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hub-client.d.ts","sourceRoot":"","sources":["../../../../src/store/engine/hub/hub-client.ts"],"names":[],"mappings":"AA4BA,OAAO,KAAK,EAEX,aAAa,EACb,oBAAoB,EACpB,mBAAmB,EAanB,YAAY,EACZ,MAAM,oBAAoB,CAAA;AAG3B,OAAO,KAAK,EAAE,gBAAgB,EAAiC,MAAM,oBAAoB,CAAA;AAEzF;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAChC,MAAM,GAAE,oBAAyB,GAC/B,OAAO,CAAC,aAAa,GAAG,SAAS,CAAC,CAmBpC;AAED,oHAAoH;AACpH,wBAAgB,iBAAiB,IAAI,OAAO,CAAC,aAAa,GAAG,SAAS,CAAC,GAAG,SAAS,CAElF;AAqCD;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE;IAC1C,IAAI,EAAE,WAAW,CAAA;CACjB,GAAG,OAAO,CAAC,aAAa,GAAG,SAAS,CAAC,CA6BrC;AAoFD;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,cAAc,SAAS,gBAAgB,EAAE,MAAM,EAAE;IACnF,QAAQ,EAAE,cAAc,EAAE,CAAA;IAC1B,KAAK,CAAC,EAAE,YAAY,CAAA;CACpB,GAAG,cAAc,EAAE,CAUnB;AAED;;;;;;;GAOG;AACH,wBAAsB,kBAAkB,CAAC,MAAM,EAAE,mBAAmB,GAAG,OAAO,CAAC,aAAa,CAAC,CAs2B5F"}
@@ -0,0 +1,208 @@
1
+ import { EngineClient } from '../client/client.types';
2
+ import { LinkNotice } from '../engine-store.types';
3
+ import { RealmToHubMessage } from './hub-protocol.types';
4
+ import { HubEngineSpawner, RealmEngineSpawner } from './realm-host.types';
5
+ export type ConnectHubParams = {
6
+ /**
7
+ * The engines this page can start for the hub: each dialecte's `factory.spawner` (a spawner whose worker is of
8
+ * another origin is left out). A later call adds the engines the page does not run yet.
9
+ */
10
+ spawners?: HubEngineSpawner[];
11
+ };
12
+ /** How the realm connects: the engines it can start, with what each opens with. */
13
+ export type HubConnectionOptions = {
14
+ spawners?: RealmEngineSpawner[];
15
+ /**
16
+ * The realm cannot store (no private file system): its spawners are checked - two versions of one dialecte
17
+ * refused - but none registered: elected to host an engine, it could not open it.
18
+ */
19
+ hostsNoEngine?: boolean;
20
+ };
21
+ /** The realm's global object as the hub connection is kept on it, under the protocol's key. */
22
+ export type HubRegistry = Partial<Record<symbol, Promise<HubConnection | undefined>>>;
23
+ /**
24
+ * What a page holds of its connection to the hub: its realm id, ports for the documents that cannot
25
+ * reach the hub themselves, and a call each time it is welcomed back. A child bound to a page that
26
+ * freezes is dropped by the hub with the page and told: its calls are refused `STORE_ENGINE_LOST`
27
+ * (`realm-dropped`) until the page, welcomed back (`onRejoined`), hands it a new port from
28
+ * `createHubPort` and the child calls `adoptHubPort` with it.
29
+ */
30
+ export type HubRealm = Pick<HubConnection, 'realmId' | 'createHubPort' | 'onRejoined'>;
31
+ /** This realm's connection to the origin's hub, shared by every copy of the library in the realm. */
32
+ export type HubConnection = {
33
+ /** This realm instance's id (a new one after the page came back from a freeze or the cache). */
34
+ realmId: () => string;
35
+ /** Joined through a port its page made (`adoptHubPort`): a client only, hosting no engine. */
36
+ readonly bound: boolean;
37
+ /**
38
+ * Engines the realm can start from now on, beside those it runs: the hub told at once when welcomed (else in the
39
+ * next hello). A dialecte it runs at another version is refused `STORE_HUB_SPAWNERS_FIXED`, nothing added; one it
40
+ * runs already, or any for a child bound through `adoptHubPort` (it hosts none), adds nothing.
41
+ */
42
+ addSpawners: (params: {
43
+ spawners: RealmEngineSpawner[];
44
+ }) => void;
45
+ /** The realm's link to a project's engine: one per project, shared by the realm's connections to it. */
46
+ openProject: (params: HubProjectParams) => HubProjectLink;
47
+ /**
48
+ * Destroy a project once the hub grants it (no other view uses it): `destroy` deletes the files. Without
49
+ * `destroy` (a view that cannot store), the hub has a view that runs an engine of the dialecte delete them, and
50
+ * answers once it has. `own`, the destroying connection's link, does not count, and is let go once the destroy
51
+ * goes ahead.
52
+ */
53
+ destroyProject: (params: {
54
+ project: string;
55
+ dialecteId: string;
56
+ /** The version this realm runs: a view at that version deletes the files for it (no `destroy`) when one runs. */
57
+ dialecteVersion: string;
58
+ destroy?: () => Promise<void>;
59
+ own?: OwnHubLink;
60
+ }) => Promise<void>;
61
+ /** A port for a child realm that cannot reach the hub: it joins through it with `adoptHubPort`. */
62
+ createHubPort: () => HubPortHandle;
63
+ /**
64
+ * Ends the connection for good: its engines ended, its lock let go, everything waiting on it and every
65
+ * later call refused `STORE_CLOSED`; the realm's registry forgets it.
66
+ */
67
+ close: () => void;
68
+ /** Settles once the connection ended for good, with why. */
69
+ ended: Promise<unknown>;
70
+ /**
71
+ * `listener` called each time the realm is welcomed back after a freeze, the back/forward cache or
72
+ * being dropped - not on its first join: the moment to bind its children again (`createHubPort`).
73
+ * Answers its unsubscribe.
74
+ */
75
+ onRejoined: (listener: () => void) => () => void;
76
+ /**
77
+ * A child realm takes `port` as the one it joins on next, as a new realm instance, its links kept: at
78
+ * once if the hub has dropped it with the page that bound it, else once it does (that page may be back
79
+ * first); a port it held for that is let go. Answers whether it took it: a page, or a connection ended
80
+ * for good, takes none.
81
+ */
82
+ adoptPort: (params: {
83
+ port: MessagePort;
84
+ }) => boolean;
85
+ };
86
+ export type HubProjectParams = {
87
+ project: string;
88
+ dialecteId: string;
89
+ dialecteVersion: string;
90
+ /** How long a call waits on a silent engine (the default when absent). */
91
+ heartbeatTimeoutMs?: number;
92
+ };
93
+ /** One connection's use of the realm's link to a project. */
94
+ export type HubProjectLink = {
95
+ /** The project's engine client now: waits for the hub's answer, rejects with its refusal. */
96
+ engine: () => Promise<EngineClient>;
97
+ /**
98
+ * `listener` told every change the project's engine announces to the realm, and `resync` once the realm reached
99
+ * another engine of it; until released. Answers the unsubscribe.
100
+ */
101
+ onNotice: (listener: (notice: LinkNotice) => void) => () => void;
102
+ /**
103
+ * This connection done with the project; the realm leaves it with its last connection, settled once the hub
104
+ * acknowledged the leave - from then on no destroy is refused for this realm (at once when another connection of
105
+ * the realm still uses it, or the hub was never asked).
106
+ */
107
+ release: () => Promise<void>;
108
+ };
109
+ /** The destroying connection's own link, and how to let it go (its store forgetting it). */
110
+ export type OwnHubLink = {
111
+ link: HubProjectLink;
112
+ letGo: () => Promise<void>;
113
+ };
114
+ /** A port bound to this realm for a child realm, and how to say the child is gone. */
115
+ export type HubPortHandle = {
116
+ port: MessagePort;
117
+ /** The child is gone (its iframe removed): the hub ends what it started. */
118
+ unbind: () => void;
119
+ };
120
+ /** A call waiting for the project's engine. */
121
+ export type EngineWaiter = {
122
+ resolve: (client: EngineClient) => void;
123
+ reject: (thrown: unknown) => void;
124
+ };
125
+ /** The realm's link to one project: the connections using it, the engine client now, the calls waiting. */
126
+ export type ProjectEntry = HubProjectParams & {
127
+ users: number;
128
+ /** What the realm's links of the project listen with: each change of its engine, and each resync. */
129
+ listeners: Set<(notice: LinkNotice) => void>;
130
+ /** An engine was reached once already: the next one is announced with a resync. */
131
+ reached: boolean;
132
+ /** The hub was asked for the project and has not refused it since. */
133
+ asked: boolean;
134
+ current: {
135
+ generation: number;
136
+ client: EngineClient;
137
+ } | undefined;
138
+ waiters: EngineWaiter[];
139
+ /** A refusal that holds for the rest of the link. */
140
+ refusal: unknown;
141
+ /**
142
+ * The id the project's file was created with, from the first engine the link reached: every later engine
143
+ * (the realm back from a freeze, a host gone) must run that project, else the link is refused.
144
+ */
145
+ creationId: string | undefined;
146
+ };
147
+ /**
148
+ * Where the realm instance stands with the hub: saying hello (its lock, then the welcome), welcomed (it
149
+ * may ask for projects and host engines), suspended (frozen, or in the back/forward cache), or refused
150
+ * by the hub (another protocol): done for good.
151
+ */
152
+ export type RealmPhase = 'joining' | 'joined' | 'suspended' | 'dropped' | 'refused';
153
+ /** A message for the hub kept until the realm instance is welcomed (one sent before is dropped). */
154
+ export type QueuedMessage = {
155
+ message: RealmToHubMessage;
156
+ transfer: Transferable[];
157
+ };
158
+ /** Where a realm hears its page's lifecycle: `freeze` / `resume` on the document, `pagehide` / `pageshow` on the window. */
159
+ export type HubLifecycleTargets = {
160
+ page: EventTarget;
161
+ window: EventTarget;
162
+ };
163
+ /** A destroy asked of the hub, waiting for its grant. */
164
+ export type PendingDestroy = {
165
+ granted: () => void;
166
+ refused: (thrown: unknown) => void;
167
+ };
168
+ /** A port to the hub, and what settles if what serves it failed to start (a SharedWorker's `error`). */
169
+ export type HubPortOpening = {
170
+ port: MessagePort;
171
+ failed?: Promise<unknown>;
172
+ };
173
+ /** The realm whose spawners are checked: where its scripts resolve from, and its origin. */
174
+ export type SpawnerRealm = {
175
+ document?: {
176
+ baseURI: string;
177
+ };
178
+ location?: {
179
+ href: string;
180
+ };
181
+ origin: string;
182
+ };
183
+ /** How a realm's connection reaches the hub: a port, a new one for each realm instance. */
184
+ export type HubConnectionParams = {
185
+ openPort: () => HubPortOpening;
186
+ /** How long the realm waits for the hub's welcome (the default when absent). */
187
+ welcomeBudgetMs?: number;
188
+ topLevel: boolean;
189
+ spawners: RealmEngineSpawner[];
190
+ /** Whether the realm holds a lock of its own (a child realm's liveness is its parent's). */
191
+ holdsLock: boolean;
192
+ /** The page's lifecycle to watch (freeze, the back/forward cache, the page going away); none for a child realm. */
193
+ lifecycle: HubLifecycleTargets | undefined;
194
+ /**
195
+ * Joined through a port its parent made (`adoptHubPort`), not on its own: dropped with its parent, it
196
+ * waits for the next port its page hands it. A realm that connected itself, top-level or not, is not. A bound
197
+ * realm watches no hub lock (a child of another origin shares no locks with the hub): a port its page hands it
198
+ * while it is still welcomed settles the leaves it waits for (the hub forgets it with its page); it joins on that
199
+ * port once the hub drops it.
200
+ */
201
+ bound?: boolean;
202
+ };
203
+ /** A join's budget, from its start: `expired` rejects once it has passed; `clear` stops it. */
204
+ export type JoinBudget = {
205
+ expired: Promise<never>;
206
+ clear: () => void;
207
+ };
208
+ //# sourceMappingURL=hub-client.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hub-client.types.d.ts","sourceRoot":"","sources":["../../../../src/store/engine/hub/hub-client.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AAC1D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AACvD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AAC7D,OAAO,KAAK,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAA;AAE9E,MAAM,MAAM,gBAAgB,GAAG;IAC9B;;;OAGG;IACH,QAAQ,CAAC,EAAE,gBAAgB,EAAE,CAAA;CAC7B,CAAA;AAED,mFAAmF;AACnF,MAAM,MAAM,oBAAoB,GAAG;IAClC,QAAQ,CAAC,EAAE,kBAAkB,EAAE,CAAA;IAC/B;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAA;CACvB,CAAA;AAED,+FAA+F;AAC/F,MAAM,MAAM,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,aAAa,GAAG,SAAS,CAAC,CAAC,CAAC,CAAA;AAErF;;;;;;GAMG;AACH,MAAM,MAAM,QAAQ,GAAG,IAAI,CAAC,aAAa,EAAE,SAAS,GAAG,eAAe,GAAG,YAAY,CAA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;;;;OAMG;IACH,KAAK,CAAC,EAAE,OAAO,CAAA;CACf,CAAA;AAED,+FAA+F;AAC/F,MAAM,MAAM,UAAU,GAAG;IAAE,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;IAAC,KAAK,EAAE,MAAM,IAAI,CAAA;CAAE,CAAA"}
@@ -0,0 +1,193 @@
1
+ import { ThrownData } from '../wire/wire.types';
2
+ import { HubSpawner } from './hub.types';
3
+ /** What a realm sends the hub. */
4
+ export type RealmToHubMessage = {
5
+ type: 'hello';
6
+ protocol: number;
7
+ realmId: string;
8
+ topLevel: boolean;
9
+ spawners: HubSpawner[];
10
+ }
11
+ /** Engines the realm can start from now on, beside those of its hello (a child realm's are ignored). */
12
+ | {
13
+ type: 'spawners';
14
+ spawners: HubSpawner[];
15
+ } | {
16
+ type: 'open';
17
+ project: string;
18
+ dialecteId: string;
19
+ dialecteVersion: string;
20
+ /** The creation id of the project the realm had, coming back to it. */
21
+ expectedCreationId?: string;
22
+ } | {
23
+ type: 'leave';
24
+ project: string;
25
+ dialecteId: string;
26
+ } | {
27
+ type: 'destroy';
28
+ project: string;
29
+ dialecteId: string;
30
+ } | {
31
+ type: 'destroyed';
32
+ project: string;
33
+ dialecteId: string;
34
+ }
35
+ /** A realm that cannot store destroys the project: the hub has a realm that can delete its files. */
36
+ | {
37
+ type: 'destroy-elsewhere';
38
+ project: string;
39
+ dialecteId: string;
40
+ dialecteVersion: string;
41
+ }
42
+ /** A bound child asking whether its hub lives (it holds no lock to watch it): a hub answers `pong`. */
43
+ | {
44
+ type: 'ping';
45
+ }
46
+ /** The project's files deleted as the hub asked (`delete-files`), or what failed. */
47
+ | {
48
+ type: 'files-deleted';
49
+ project: string;
50
+ dialecteId: string;
51
+ error?: ThrownData;
52
+ }
53
+ /**
54
+ * Said on a port a parent bound for a child, before any hello, when the child lets it go unused (a newer one
55
+ * handed to it): the hub forgets that binding. A hub of the same protocol that does not know it ignores it.
56
+ */
57
+ | {
58
+ type: 'port-unused';
59
+ }
60
+ /** A port for a child realm (one with no hub of its own), bound to this realm under `bindingId`. */
61
+ | {
62
+ type: 'bind-child';
63
+ bindingId: string;
64
+ port: MessagePort;
65
+ }
66
+ /** The child realm bound under `bindingId` is gone (its iframe removed): the hub treats it as dead. */
67
+ | {
68
+ type: 'unbind-child';
69
+ bindingId: string;
70
+ } | {
71
+ type: 'engine-opened';
72
+ project: string;
73
+ dialecteId: string;
74
+ generation: number;
75
+ creationId: string;
76
+ } | {
77
+ type: 'engine-open-failed';
78
+ project: string;
79
+ dialecteId: string;
80
+ generation: number;
81
+ /** The error's catalog key, when it has one (`undefined` for a spawn that failed in the host). */
82
+ key: string | undefined;
83
+ error: ThrownData;
84
+ } | {
85
+ type: 'engine-ended';
86
+ project: string;
87
+ dialecteId: string;
88
+ generation: number;
89
+ } | {
90
+ type: 'client-adopted';
91
+ adoptionId: number;
92
+ } | {
93
+ type: 'client-adopt-failed';
94
+ adoptionId: number;
95
+ };
96
+ /** What the hub sends a realm. */
97
+ export type HubToRealmMessage =
98
+ /** Welcomed: `hubLock` names the lock the hub holds for its life - granted to a realm, the hub is gone. */
99
+ {
100
+ type: 'welcome';
101
+ realmId: string;
102
+ hubLock: string;
103
+ }
104
+ /** The hello refused: the realm is not connected. */
105
+ | {
106
+ type: 'hello-refused';
107
+ error: ThrownData;
108
+ } | {
109
+ type: 'engine-ready';
110
+ project: string;
111
+ dialecteId: string;
112
+ generation: number;
113
+ port: MessagePort;
114
+ /** The id the engine's project was created with. */
115
+ creationId: string;
116
+ } | {
117
+ type: 'engine-lost';
118
+ project: string;
119
+ dialecteId: string;
120
+ generation: number;
121
+ } | {
122
+ type: 'open-refused';
123
+ project: string;
124
+ dialecteId: string;
125
+ error: ThrownData;
126
+ } | {
127
+ type: 'destroy-granted';
128
+ project: string;
129
+ dialecteId: string;
130
+ }
131
+ /** The realm's leave of the project handled: it counts no more for it. */
132
+ | {
133
+ type: 'left';
134
+ project: string;
135
+ dialecteId: string;
136
+ } | {
137
+ type: 'destroy-refused';
138
+ project: string;
139
+ dialecteId: string;
140
+ error: ThrownData;
141
+ }
142
+ /** The hub lives: the answer to a `ping`. */
143
+ | {
144
+ type: 'pong';
145
+ }
146
+ /** The project this realm asked to destroy elsewhere is deleted. */
147
+ | {
148
+ type: 'destroyed-elsewhere';
149
+ project: string;
150
+ dialecteId: string;
151
+ }
152
+ /** Delete the project's files for a realm that cannot store; answer `files-deleted`. */
153
+ | {
154
+ type: 'delete-files';
155
+ project: string;
156
+ dialecteId: string;
157
+ }
158
+ /**
159
+ * Said to a child realm before its port closes, when the hub drops it with the page that bound it (that
160
+ * page gone, frozen, or unbinding it): its calls are refused until a new port binds it again. A realm
161
+ * of the same protocol that does not know it ignores it.
162
+ */
163
+ | {
164
+ type: 'dropped';
165
+ } | {
166
+ type: 'spawn-engine';
167
+ project: string;
168
+ dialecteId: string;
169
+ generation: number;
170
+ openBudgetMs: number;
171
+ expectedCreationId?: string;
172
+ } | {
173
+ type: 'adopt-client';
174
+ project: string;
175
+ dialecteId: string;
176
+ generation: number;
177
+ adoptionId: number;
178
+ /** The client's id in the engine: its realm id. */
179
+ clientId: string;
180
+ port: MessagePort;
181
+ } | {
182
+ type: 'client-gone';
183
+ project: string;
184
+ dialecteId: string;
185
+ generation: number;
186
+ clientId: string;
187
+ } | {
188
+ type: 'release-engine';
189
+ project: string;
190
+ dialecteId: string;
191
+ generation: number;
192
+ };
193
+ //# sourceMappingURL=hub-protocol.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hub-protocol.types.d.ts","sourceRoot":"","sources":["../../../../src/store/engine/hub/hub-protocol.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AACpD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAQ7C,kCAAkC;AAClC,MAAM,MAAM,iBAAiB,GAC1B;IACA,IAAI,EAAE,OAAO,CAAA;IACb,QAAQ,EAAE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AM,CAAA;IAClB,UAAU,EAAE,MAAM,CAAA;IAClB,UAAU,EAAE,MAAM,CAAA;IAClB,mDAAmD;IACnD,QAAQ,EAAE,MAAM,CAAA;IAChB,IAAI,EAAE,WAAW,CAAA;CAChB,GACD;IACA,IAAI,EAAE,aAAa,CAAA;IACnB,OAAO,EAAE,MAAM,CAAA;IACf,UAAU,EAAE,MAAM,CAAA;IAClB,UAAU,EAAE,MAAM,CAAA;IAClB,QAAQ,EAAE,MAAM,CAAA;CACf,GACD;IAAE,IAAI,EAAE,gBAAgB,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,CAAA"}
@@ -0,0 +1,9 @@
1
+ import { HubRouter } from './hub.types';
2
+ /**
3
+ * The hub's decisions as a state machine: which realm hosts each project's engine, which client
4
+ * gets a port, who is refused and why. Time, ports and locks stay outside: every event carries the
5
+ * hub clock, every command names realms by id and engines by project and generation, and the
6
+ * output says when to wake the router next.
7
+ */
8
+ export declare function createHubRouter(): HubRouter;
9
+ //# sourceMappingURL=hub-router.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hub-router.d.ts","sourceRoot":"","sources":["../../../../src/store/engine/hub/hub-router.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EASX,SAAS,EAGT,MAAM,aAAa,CAAA;AAGpB;;;;;GAKG;AACH,wBAAgB,eAAe,IAAI,SAAS,CAe3C"}
@@ -0,0 +1,13 @@
1
+ import { HubShell, ServeHubParams } from './hub-shell.types';
2
+ /**
3
+ * The hub as the browser runs it: the router's decisions carried out on ports and locks. Each realm
4
+ * speaks on its control port; the hub watches each realm's lock (its grant: the realm is gone), keeps
5
+ * one timer for the router's next deadline, and never relays a call: a client's port to its engine is
6
+ * one end of a channel whose other end the host hands its engine. A client gets its port only once the
7
+ * host says the engine adopted the other end; an adoption that fails ends that engine.
8
+ *
9
+ * The hub holds a Web Lock of its own for its life, named in each welcome (a realm granted it knows the hub is
10
+ * gone): a hub served in a page holds it as long as the page lives. No realm is heard before the hub holds it.
11
+ */
12
+ export declare function serveHub(params?: ServeHubParams): HubShell;
13
+ //# sourceMappingURL=hub-shell.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hub-shell.d.ts","sourceRoot":"","sources":["../../../../src/store/engine/hub/hub-shell.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAEX,QAAQ,EAER,cAAc,EAEd,MAAM,mBAAmB,CAAA;AAG1B;;;;;;;;;GASG;AACH,wBAAgB,QAAQ,CAAC,MAAM,GAAE,cAAmB,GAAG,QAAQ,CA0M9D"}
@@ -0,0 +1,64 @@
1
+ import { HubEvent } from './hub.types';
2
+ /** The hub as its worker serves it: every realm's control port connected to it. */
3
+ export type HubShell = {
4
+ connect: (params: {
5
+ port: MessagePort;
6
+ }) => void;
7
+ };
8
+ export type ServeHubParams = {
9
+ /** How long a port connected to the hub (not a child's binding) may stay without a hello. */
10
+ helloBudgetMs?: number;
11
+ };
12
+ /** The scope of the hub's SharedWorker, as far as the hub reads it. */
13
+ export type SharedWorkerScope = {
14
+ onconnect: ((event: MessageEvent) => void) | null;
15
+ };
16
+ /** A realm the hub welcomed: its control port, and the watch of its lock (none for a child realm). */
17
+ export type ShellRealm = {
18
+ realmId: string;
19
+ port: MessagePort;
20
+ watch: AbortController | undefined;
21
+ };
22
+ /** A client's port handed to its engine's host, kept until the host says the engine adopted it. */
23
+ export type PendingAdoption = {
24
+ /** The realm asked to adopt: only its answer counts. */
25
+ hostRealmId: string;
26
+ clientRealmId: string;
27
+ project: string;
28
+ dialecteId: string;
29
+ generation: number;
30
+ /** The id the engine's project was created with, told the client with its port. */
31
+ creationId: string;
32
+ port: MessagePort;
33
+ };
34
+ /** A child realm's port bound by its parent: the child's realm id once it said hello. */
35
+ export type ChildBinding = {
36
+ port: MessagePort;
37
+ /** The realm that bound it: gone, it takes a child that never said hello with it. */
38
+ parentRealmId: string;
39
+ realmId: string | undefined;
40
+ };
41
+ /** What the hub keeps beside the router: ports, lock watches, adoptions under way, its one timer. */
42
+ export type HubShellState = {
43
+ realms: Map<string, ShellRealm>;
44
+ /** `<project>#<generation>` -> the realm hosting that engine. */
45
+ hosts: Map<string, string>;
46
+ adoptions: Map<number, PendingAdoption>;
47
+ nextAdoptionId: number;
48
+ /** Binding id -> the child realm bound under it. */
49
+ bindings: Map<string, ChildBinding>;
50
+ timer: ReturnType<typeof setTimeout> | undefined;
51
+ /** The lock this hub holds for its life, told each realm it welcomes. */
52
+ hubLock: string;
53
+ };
54
+ /** The port a hello came on, while the router decides on it (welcomed, or refused on that port). */
55
+ export type HelloContext = {
56
+ port: MessagePort;
57
+ bindingId: string | undefined;
58
+ };
59
+ /** One event fed to the router, with the port of a hello when it is one. */
60
+ export type ShellFeed = {
61
+ event: HubEvent;
62
+ hello?: HelloContext;
63
+ };
64
+ //# sourceMappingURL=hub-shell.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hub-shell.types.d.ts","sourceRoot":"","sources":["../../../../src/store/engine/hub/hub-shell.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAE3C,mFAAmF;AACnF,MAAM,MAAM,QAAQ,GAAG;IACtB,OAAO,EAAE,CAAC,MAAM,EAAE;QAAE,IAAI,EAAE,WAAW,CAAA;KAAE,KAAK,IAAI,CAAA;CAChD,CAAA;AAED,MAAM,MAAM,cAAc,GAAG;IAC5B,6FAA6F;IAC7F,aAAa,CAAC,EAAE,MAAM,CAAA;CACtB,CAAA;AAED,uEAAuE;AACvE,MAAM,MAAM,iBAAiB,GAAG;IAC/B,SAAS,EAAE,CAAC,CAAC,KAAK,EAAE,YAAY,KAAK,IAAI,CAAC,GAAG,IAAI,CAAA;CACjD,CAAA;AAED,sGAAsG;AACtG,MAAM,MAAM,UAAU,GAAG;IACxB,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE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AE,YAAY,CAAA;CAAE,CAAA"}
@@ -0,0 +1,33 @@
1
+ import { DialecteErrorKey } from '../../../errors';
2
+ /**
3
+ * The wire protocol a realm and the hub speak; a realm speaking another one is refused. It also keys the connection
4
+ * every copy of the library in a realm shares (`HubRegistry`). Bumped with any change of either: `shared-shapes.test.ts`
5
+ * fails until it is, the shape recorded per version in `src/store/__shapes__/hub-protocol-v<version>.txt`.
6
+ */
7
+ export declare const HUB_PROTOCOL_VERSION = 5;
8
+ /** An engine left without client is told to close after this long; an open meanwhile keeps it. */
9
+ export declare const ENGINE_IDLE_CLOSE_MS = 5000;
10
+ /**
11
+ * An engine is started again (a busy retry, a new host) only with at least this much of the open
12
+ * window left; with less, the waiting clients get their answer.
13
+ */
14
+ export declare const ENGINE_OPEN_MIN_BUDGET_MS = 1000;
15
+ /**
16
+ * The longest a client waits for the hub's answer to an open, as long as a realm waits for an engine it
17
+ * runs itself: a slow worker start plus one whole engine attempt, with room to retry an engine that
18
+ * answers busy early.
19
+ */
20
+ export declare const HUB_OPEN_BUDGET_MS = 30000;
21
+ /** The prefix of the hub's own Web Lock, held for the hub's life: a realm granted it knows the hub is gone. */
22
+ export declare const HUB_LOCK_PREFIX = "dialecte:hub:";
23
+ /** The prefix of a realm's Web Lock, held for the realm's life: the hub's grant of it means the realm is gone. */
24
+ export declare const REALM_LOCK_PREFIX = "dialecte:realm:";
25
+ /** The name of the origin's hub SharedWorker. */
26
+ export declare const HUB_WORKER_NAME = "dialecte-hub";
27
+ /**
28
+ * The refusals that hold for the rest of a project's link (another dialecte, another version, another
29
+ * wire, its project destroyed while the realm was away); any other refusal answers the calls waiting, and
30
+ * the next call asks the hub again.
31
+ */
32
+ export declare const LASTING_REFUSALS: readonly DialecteErrorKey[];
33
+ //# sourceMappingURL=hub.constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hub.constants.d.ts","sourceRoot":"","sources":["../../../../src/store/engine/hub/hub.constants.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAEhD;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,IAAI,CAAA;AAErC,kGAAkG;AAClG,eAAO,MAAM,oBAAoB,OAAQ,CAAA;AAEzC;;;GAGG;AACH,eAAO,MAAM,yBAAyB,OAAQ,CAAA;AAE9C;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,QAAwB,CAAA;AAEvD,+GAA+G;AAC/G,eAAO,MAAM,eAAe,kBAAkB,CAAA;AAE9C,kHAAkH;AAClH,eAAO,MAAM,iBAAiB,oBAAoB,CAAA;AAElD,iDAAiD;AACjD,eAAO,MAAM,eAAe,iBAAiB,CAAA;AAE7C;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,EAAE,SAAS,gBAAgB,EAMvD,CAAA"}