@dialecte/core 0.7.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/hub.worker-B1HcVDhn.js +2 -0
- package/dist/diagnostics/diagnostics.d.ts +4 -0
- package/dist/diagnostics/diagnostics.d.ts.map +1 -1
- package/dist/diagnostics/types.d.ts +6 -1
- package/dist/diagnostics/types.d.ts.map +1 -1
- package/dist/dialecte/create-dialecte-project.d.ts +11 -0
- package/dist/dialecte/create-dialecte-project.d.ts.map +1 -0
- package/dist/dialecte/create-project-factory.d.ts +14 -0
- package/dist/dialecte/create-project-factory.d.ts.map +1 -0
- package/dist/dialecte/define-dialecte.d.ts +12 -0
- package/dist/dialecte/define-dialecte.d.ts.map +1 -0
- package/dist/dialecte/dialecte.constants.d.ts +4 -0
- package/dist/dialecte/dialecte.constants.d.ts.map +1 -0
- package/dist/dialecte/dialecte.types.d.ts +75 -0
- package/dist/dialecte/dialecte.types.d.ts.map +1 -0
- package/dist/dialecte/index.d.ts +4 -0
- package/dist/dialecte/index.d.ts.map +1 -0
- package/dist/{project-DIKdMMHx.js → dialecte-gIPrRzni.js} +8031 -8457
- package/dist/document/bind-extensions.d.ts +4 -1
- package/dist/document/bind-extensions.d.ts.map +1 -1
- package/dist/document/document.d.ts +58 -5
- package/dist/document/document.d.ts.map +1 -1
- package/dist/document/progress/progress.types.d.ts +21 -4
- package/dist/document/progress/progress.types.d.ts.map +1 -1
- package/dist/document/query/find/ancestor/find-ancestor.d.ts +2 -0
- package/dist/document/query/find/ancestor/find-ancestor.d.ts.map +1 -1
- package/dist/document/query/find/by-attribute/find-by-attributes.d.ts +4 -0
- package/dist/document/query/find/by-attribute/find-by-attributes.d.ts.map +1 -1
- package/dist/document/query/find/descendant/find-descendant.d.ts +2 -0
- package/dist/document/query/find/descendant/find-descendant.d.ts.map +1 -1
- package/dist/document/query/get/attribute/get-attribute.d.ts +4 -0
- package/dist/document/query/get/attribute/get-attribute.d.ts.map +1 -1
- package/dist/document/query/get/attribute/get-attributes.d.ts +4 -0
- package/dist/document/query/get/attribute/get-attributes.d.ts.map +1 -1
- package/dist/document/query/get/definition/get-definition.d.ts +2 -0
- package/dist/document/query/get/definition/get-definition.d.ts.map +1 -1
- package/dist/document/query/get/record/get-child.d.ts +2 -0
- package/dist/document/query/get/record/get-child.d.ts.map +1 -1
- package/dist/document/query/get/record/get-children.d.ts +2 -0
- package/dist/document/query/get/record/get-children.d.ts.map +1 -1
- package/dist/document/query/get/record/get-record.d.ts +2 -0
- package/dist/document/query/get/record/get-record.d.ts.map +1 -1
- package/dist/document/query/get/record/get-records-by-tagname.d.ts +2 -0
- package/dist/document/query/get/record/get-records-by-tagname.d.ts.map +1 -1
- package/dist/document/query/get/record/get-records.d.ts +2 -0
- package/dist/document/query/get/record/get-records.d.ts.map +1 -1
- package/dist/document/query/get/record/load-live-records.d.ts +2 -0
- package/dist/document/query/get/record/load-live-records.d.ts.map +1 -1
- package/dist/document/query/get/record/resolve-record.d.ts +2 -0
- package/dist/document/query/get/record/resolve-record.d.ts.map +1 -1
- package/dist/document/query/get/record/staged-lookup.d.ts +4 -0
- package/dist/document/query/get/record/staged-lookup.d.ts.map +1 -1
- package/dist/document/query/get/tree/get-tree.d.ts +6 -0
- package/dist/document/query/get/tree/get-tree.d.ts.map +1 -1
- package/dist/document/query/main.d.ts +50 -15
- package/dist/document/query/main.d.ts.map +1 -1
- package/dist/document/query/snapshot/collect-snapshot.d.ts +2 -0
- package/dist/document/query/snapshot/collect-snapshot.d.ts.map +1 -1
- package/dist/document/query/snapshot/get-snapshot.d.ts +2 -0
- package/dist/document/query/snapshot/get-snapshot.d.ts.map +1 -1
- package/dist/document/query/snapshot/records-to-tree.d.ts +2 -0
- package/dist/document/query/snapshot/records-to-tree.d.ts.map +1 -1
- package/dist/document/query/tree-filter/omit.d.ts +8 -0
- package/dist/document/query/tree-filter/omit.d.ts.map +1 -1
- package/dist/document/query/tree-filter/order.d.ts +5 -2
- package/dist/document/query/tree-filter/order.d.ts.map +1 -1
- package/dist/document/query/tree-filter/unwrap.d.ts +2 -0
- package/dist/document/query/tree-filter/unwrap.d.ts.map +1 -1
- package/dist/document/staged-operations.d.ts +5 -1
- package/dist/document/staged-operations.d.ts.map +1 -1
- package/dist/document/transaction/clone/clone.d.ts +2 -0
- package/dist/document/transaction/clone/clone.d.ts.map +1 -1
- package/dist/document/transaction/commit/commit.d.ts.map +1 -1
- package/dist/document/transaction/commit/merge-operations.d.ts +1 -1
- package/dist/document/transaction/commit/merge-operations.d.ts.map +1 -1
- package/dist/document/transaction/commit/summarize-operations.d.ts +16 -0
- package/dist/document/transaction/commit/summarize-operations.d.ts.map +1 -0
- package/dist/document/transaction/commit/summarize-operations.types.d.ts +17 -0
- package/dist/document/transaction/commit/summarize-operations.types.d.ts.map +1 -0
- package/dist/document/transaction/create/create.d.ts +2 -0
- package/dist/document/transaction/create/create.d.ts.map +1 -1
- package/dist/document/transaction/guard.d.ts +5 -0
- package/dist/document/transaction/guard.d.ts.map +1 -1
- package/dist/document/transaction/index.d.ts +2 -0
- package/dist/document/transaction/index.d.ts.map +1 -1
- package/dist/document/transaction/main.d.ts +46 -16
- package/dist/document/transaction/main.d.ts.map +1 -1
- package/dist/document/transaction/stage-operations.d.ts.map +1 -1
- package/dist/document/transaction/update/update.d.ts +2 -0
- package/dist/document/transaction/update/update.d.ts.map +1 -1
- package/dist/document/types.d.ts +3 -5
- package/dist/document/types.d.ts.map +1 -1
- package/dist/engine-store-CIEqgPUb.js +348 -0
- package/dist/engine.constants-DBMjMmV9.js +98 -0
- package/dist/engine.d.ts +9 -0
- package/dist/engine.d.ts.map +1 -0
- package/dist/engine.js +15805 -0
- package/dist/errors/codes.d.ts +451 -0
- package/dist/errors/codes.d.ts.map +1 -1
- package/dist/errors/errors.constants.d.ts +3 -0
- package/dist/errors/errors.constants.d.ts.map +1 -0
- package/dist/errors/errors.d.ts +10 -0
- package/dist/errors/errors.d.ts.map +1 -1
- package/dist/errors/types.d.ts +14 -0
- package/dist/errors/types.d.ts.map +1 -1
- package/dist/helpers/assert-fixed.d.ts +3 -1
- package/dist/helpers/assert-fixed.d.ts.map +1 -1
- package/dist/helpers/assert-xml-characters.d.ts +35 -0
- package/dist/helpers/assert-xml-characters.d.ts.map +1 -0
- package/dist/helpers/assert-xml-characters.types.d.ts +26 -0
- package/dist/helpers/assert-xml-characters.types.d.ts.map +1 -0
- package/dist/helpers/assert-xsi-type.d.ts +4 -0
- package/dist/helpers/assert-xsi-type.d.ts.map +1 -1
- package/dist/helpers/converter.d.ts +21 -6
- package/dist/helpers/converter.d.ts.map +1 -1
- package/dist/helpers/evaluate-expectations.d.ts +21 -0
- package/dist/helpers/evaluate-expectations.d.ts.map +1 -0
- package/dist/helpers/evaluate-expectations.types.d.ts +31 -0
- package/dist/helpers/evaluate-expectations.types.d.ts.map +1 -0
- package/dist/helpers/guard.d.ts +24 -4
- package/dist/helpers/guard.d.ts.map +1 -1
- package/dist/helpers/index.d.ts +2 -0
- package/dist/helpers/index.d.ts.map +1 -1
- package/dist/helpers/merge-extensions.d.ts +2 -0
- package/dist/helpers/merge-extensions.d.ts.map +1 -1
- package/dist/helpers/read-attributes.d.ts +4 -0
- package/dist/helpers/read-attributes.d.ts.map +1 -1
- package/dist/helpers/standardizing.d.ts +10 -0
- package/dist/helpers/standardizing.d.ts.map +1 -1
- package/dist/helpers/strip-attributes.d.ts +2 -0
- package/dist/helpers/strip-attributes.d.ts.map +1 -1
- package/dist/helpers-DVShv41E.js +489 -0
- package/dist/helpers.js +3 -439
- package/dist/in-process-link-DBeAOZRp.js +2791 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +13 -12
- package/dist/perf/create-perf.d.ts +8 -1
- package/dist/perf/create-perf.d.ts.map +1 -1
- package/dist/perf/index.d.ts +1 -1
- package/dist/perf/index.d.ts.map +1 -1
- package/dist/perf/noop-perf.d.ts.map +1 -1
- package/dist/perf/perf.types.d.ts +65 -6
- package/dist/perf/perf.types.d.ts.map +1 -1
- package/dist/project/index.d.ts +7 -5
- package/dist/project/index.d.ts.map +1 -1
- package/dist/project/io/export-blob.d.ts +5 -2
- package/dist/project/io/export-blob.d.ts.map +1 -1
- package/dist/project/io/export-document.d.ts +5 -4
- package/dist/project/io/export-document.d.ts.map +1 -1
- package/dist/project/io/index.d.ts +1 -1
- package/dist/project/io/index.d.ts.map +1 -1
- package/dist/project/io/init-empty-document.d.ts +2 -0
- package/dist/project/io/init-empty-document.d.ts.map +1 -1
- package/dist/project/io/run-export.d.ts +19 -0
- package/dist/project/io/run-export.d.ts.map +1 -0
- package/dist/project/io/run-export.types.d.ts +45 -0
- package/dist/project/io/run-export.types.d.ts.map +1 -0
- package/dist/project/io/run-import.d.ts +15 -0
- package/dist/project/io/run-import.d.ts.map +1 -0
- package/dist/project/io/run-import.types.d.ts +19 -0
- package/dist/project/io/run-import.types.d.ts.map +1 -0
- package/dist/project/io/store-runtime.constants.d.ts +6 -0
- package/dist/project/io/store-runtime.constants.d.ts.map +1 -0
- package/dist/project/io/store-runtime.d.ts +12 -0
- package/dist/project/io/store-runtime.d.ts.map +1 -0
- package/dist/project/io/store-runtime.types.d.ts +18 -0
- package/dist/project/io/store-runtime.types.d.ts.map +1 -0
- package/dist/project/project-channel.d.ts +11 -0
- package/dist/project/project-channel.d.ts.map +1 -0
- package/dist/project/project.constants.d.ts +12 -0
- package/dist/project/project.constants.d.ts.map +1 -0
- package/dist/project/project.d.ts +315 -31
- package/dist/project/project.d.ts.map +1 -1
- package/dist/project/state/document-lifecycle.d.ts +0 -12
- package/dist/project/state/document-lifecycle.d.ts.map +1 -1
- package/dist/project/state/document-state.d.ts +4 -0
- package/dist/project/state/document-state.d.ts.map +1 -1
- package/dist/project/types.d.ts +126 -60
- package/dist/project/types.d.ts.map +1 -1
- package/dist/project-key-Ch34EtFa.js +1435 -0
- package/dist/rolldown-runtime-CYdcPHCu.js +12 -0
- package/dist/running-operations-vnijBvn7.js +76 -0
- package/dist/same-json-value-C6kUaoyt.js +1603 -0
- package/dist/sqlite.d.ts +5 -0
- package/dist/sqlite.d.ts.map +1 -0
- package/dist/sqlite.js +2671 -0
- package/dist/sqlite3.wasm +0 -0
- package/dist/store/apply-record-patch.d.ts +13 -0
- package/dist/store/apply-record-patch.d.ts.map +1 -0
- package/dist/store/closing-connections.d.ts +7 -0
- package/dist/store/closing-connections.d.ts.map +1 -0
- package/dist/store/closing-connections.types.d.ts +13 -0
- package/dist/store/closing-connections.types.d.ts.map +1 -0
- package/dist/store/commit-progress.d.ts +10 -0
- package/dist/store/commit-progress.d.ts.map +1 -0
- package/dist/store/compare-by-id.d.ts +10 -0
- package/dist/store/compare-by-id.d.ts.map +1 -0
- package/dist/store/document-path.constants.d.ts +20 -0
- package/dist/store/document-path.constants.d.ts.map +1 -0
- package/dist/store/document-path.d.ts +75 -0
- package/dist/store/document-path.d.ts.map +1 -0
- package/dist/store/document-path.types.d.ts +11 -0
- package/dist/store/document-path.types.d.ts.map +1 -0
- package/dist/store/engine/client/check-engine-wire.d.ts +8 -0
- package/dist/store/engine/client/check-engine-wire.d.ts.map +1 -0
- package/dist/store/engine/client/client.constants.d.ts +30 -0
- package/dist/store/engine/client/client.constants.d.ts.map +1 -0
- package/dist/store/engine/client/client.types.d.ts +200 -0
- package/dist/store/engine/client/client.types.d.ts.map +1 -0
- package/dist/store/engine/client/engine-client.d.ts +15 -0
- package/dist/store/engine/client/engine-client.d.ts.map +1 -0
- package/dist/store/engine/client/engine-control.d.ts +16 -0
- package/dist/store/engine/client/engine-control.d.ts.map +1 -0
- package/dist/store/engine/client/heartbeat-watch.d.ts +17 -0
- package/dist/store/engine/client/heartbeat-watch.d.ts.map +1 -0
- package/dist/store/engine/client/hub-connector.d.ts +11 -0
- package/dist/store/engine/client/hub-connector.d.ts.map +1 -0
- package/dist/store/engine/client/hub-connector.types.d.ts +25 -0
- package/dist/store/engine/client/hub-connector.types.d.ts.map +1 -0
- package/dist/store/engine/client/worker-connector.d.ts +32 -0
- package/dist/store/engine/client/worker-connector.d.ts.map +1 -0
- package/dist/store/engine/creation-refusal.d.ts +10 -0
- package/dist/store/engine/creation-refusal.d.ts.map +1 -0
- package/dist/store/engine/dialecte-refusal.d.ts +18 -0
- package/dist/store/engine/dialecte-refusal.d.ts.map +1 -0
- package/dist/store/engine/engine-store.d.ts +163 -0
- package/dist/store/engine/engine-store.d.ts.map +1 -0
- package/dist/store/engine/engine-store.types.d.ts +53 -0
- package/dist/store/engine/engine-store.types.d.ts.map +1 -0
- package/dist/store/engine/engine.constants.d.ts +14 -0
- package/dist/store/engine/engine.constants.d.ts.map +1 -0
- package/dist/store/engine/engine.types.d.ts +165 -0
- package/dist/store/engine/engine.types.d.ts.map +1 -0
- package/dist/store/engine/host/engine-wire.d.ts +19 -0
- package/dist/store/engine/host/engine-wire.d.ts.map +1 -0
- package/dist/store/engine/host/heartbeat.d.ts +33 -0
- package/dist/store/engine/host/heartbeat.d.ts.map +1 -0
- package/dist/store/engine/host/host.constants.d.ts +13 -0
- package/dist/store/engine/host/host.constants.d.ts.map +1 -0
- package/dist/store/engine/host/host.types.d.ts +65 -0
- package/dist/store/engine/host/host.types.d.ts.map +1 -0
- package/dist/store/engine/host/store-events.d.ts +14 -0
- package/dist/store/engine/host/store-events.d.ts.map +1 -0
- package/dist/store/engine/hub/hub-client.constants.d.ts +27 -0
- package/dist/store/engine/hub/hub-client.constants.d.ts.map +1 -0
- package/dist/store/engine/hub/hub-client.d.ts +46 -0
- package/dist/store/engine/hub/hub-client.d.ts.map +1 -0
- package/dist/store/engine/hub/hub-client.types.d.ts +208 -0
- package/dist/store/engine/hub/hub-client.types.d.ts.map +1 -0
- package/dist/store/engine/hub/hub-protocol.types.d.ts +193 -0
- package/dist/store/engine/hub/hub-protocol.types.d.ts.map +1 -0
- package/dist/store/engine/hub/hub-router.d.ts +9 -0
- package/dist/store/engine/hub/hub-router.d.ts.map +1 -0
- package/dist/store/engine/hub/hub-shell.d.ts +13 -0
- package/dist/store/engine/hub/hub-shell.d.ts.map +1 -0
- package/dist/store/engine/hub/hub-shell.types.d.ts +64 -0
- package/dist/store/engine/hub/hub-shell.types.d.ts.map +1 -0
- package/dist/store/engine/hub/hub.constants.d.ts +33 -0
- package/dist/store/engine/hub/hub.constants.d.ts.map +1 -0
- package/dist/store/engine/hub/hub.types.d.ts +305 -0
- package/dist/store/engine/hub/hub.types.d.ts.map +1 -0
- package/dist/store/engine/hub/hub.worker.d.ts +2 -0
- package/dist/store/engine/hub/hub.worker.d.ts.map +1 -0
- package/dist/store/engine/hub/realm-host.d.ts +10 -0
- package/dist/store/engine/hub/realm-host.d.ts.map +1 -0
- package/dist/store/engine/hub/realm-host.types.d.ts +78 -0
- package/dist/store/engine/hub/realm-host.types.d.ts.map +1 -0
- package/dist/store/engine/project-key.d.ts +15 -0
- package/dist/store/engine/project-key.d.ts.map +1 -0
- package/dist/store/engine/wire/error-envelope.d.ts +25 -0
- package/dist/store/engine/wire/error-envelope.d.ts.map +1 -0
- package/dist/store/engine/wire/wire-values.d.ts +33 -0
- package/dist/store/engine/wire/wire-values.d.ts.map +1 -0
- package/dist/store/engine/wire/wire.constants.d.ts +116 -0
- package/dist/store/engine/wire/wire.constants.d.ts.map +1 -0
- package/dist/store/engine/wire/wire.types.d.ts +119 -0
- package/dist/store/engine/wire/wire.types.d.ts.map +1 -0
- package/dist/store/hub-public.d.ts +33 -0
- package/dist/store/hub-public.d.ts.map +1 -0
- package/dist/store/ignore-destroy-outcome.d.ts +6 -0
- package/dist/store/ignore-destroy-outcome.d.ts.map +1 -0
- package/dist/store/in-memory/in-memory-state.d.ts +46 -0
- package/dist/store/in-memory/in-memory-state.d.ts.map +1 -0
- package/dist/store/in-memory/in-memory-store.constants.d.ts +7 -0
- package/dist/store/in-memory/in-memory-store.constants.d.ts.map +1 -0
- package/dist/store/in-memory/in-memory-store.d.ts +105 -17
- package/dist/store/in-memory/in-memory-store.d.ts.map +1 -1
- package/dist/store/in-memory/types.d.ts +55 -1
- package/dist/store/in-memory/types.d.ts.map +1 -1
- package/dist/store/index.d.ts +8 -2
- package/dist/store/index.d.ts.map +1 -1
- package/dist/store/json-values.constants.d.ts +18 -0
- package/dist/store/json-values.constants.d.ts.map +1 -0
- package/dist/store/json-values.d.ts +40 -0
- package/dist/store/json-values.d.ts.map +1 -0
- package/dist/store/json-values.types.d.ts +18 -0
- package/dist/store/json-values.types.d.ts.map +1 -0
- package/dist/store/local/dexie-store.constants.d.ts +20 -0
- package/dist/store/local/dexie-store.constants.d.ts.map +1 -0
- package/dist/store/local/dexie-store.d.ts +134 -5
- package/dist/store/local/dexie-store.d.ts.map +1 -1
- package/dist/store/local/types.d.ts +6 -0
- package/dist/store/local/types.d.ts.map +1 -1
- package/dist/store/lost-write.d.ts +32 -0
- package/dist/store/lost-write.d.ts.map +1 -0
- package/dist/store/lost-write.types.d.ts +4 -0
- package/dist/store/lost-write.types.d.ts.map +1 -0
- package/dist/store/open-connections.d.ts +4 -0
- package/dist/store/open-connections.d.ts.map +1 -0
- package/dist/store/open-connections.types.d.ts +17 -0
- package/dist/store/open-connections.types.d.ts.map +1 -0
- package/dist/store/own-import.d.ts +10 -0
- package/dist/store/own-import.d.ts.map +1 -0
- package/dist/store/project-name.d.ts +10 -0
- package/dist/store/project-name.d.ts.map +1 -0
- package/dist/store/resolve-store.d.ts +28 -4
- package/dist/store/resolve-store.d.ts.map +1 -1
- package/dist/store/running-operations.d.ts +7 -0
- package/dist/store/running-operations.d.ts.map +1 -0
- package/dist/store/running-operations.types.d.ts +10 -0
- package/dist/store/running-operations.types.d.ts.map +1 -0
- package/dist/store/same-json-value.d.ts +9 -0
- package/dist/store/same-json-value.d.ts.map +1 -0
- package/dist/store/sqlite/adapter/in-process-link.d.ts +20 -0
- package/dist/store/sqlite/adapter/in-process-link.d.ts.map +1 -0
- package/dist/store/sqlite/adapter/in-process-link.types.d.ts +21 -0
- package/dist/store/sqlite/adapter/in-process-link.types.d.ts.map +1 -0
- package/dist/store/sqlite/adapter/realm-storage.d.ts +10 -0
- package/dist/store/sqlite/adapter/realm-storage.d.ts.map +1 -0
- package/dist/store/sqlite/adapter/sqlite-connector.d.ts +14 -0
- package/dist/store/sqlite/adapter/sqlite-connector.d.ts.map +1 -0
- package/dist/store/sqlite/adapter/sqlite-engine-settings.d.ts +4 -0
- package/dist/store/sqlite/adapter/sqlite-engine-settings.d.ts.map +1 -0
- package/dist/store/sqlite/adapter/sqlite-hub-spawner.d.ts +8 -0
- package/dist/store/sqlite/adapter/sqlite-hub-spawner.d.ts.map +1 -0
- package/dist/store/sqlite/adapter/sqlite-hub-spawner.types.d.ts +5 -0
- package/dist/store/sqlite/adapter/sqlite-hub-spawner.types.d.ts.map +1 -0
- package/dist/store/sqlite/adapter/sqlite-worker-connector.d.ts +8 -0
- package/dist/store/sqlite/adapter/sqlite-worker-connector.d.ts.map +1 -0
- package/dist/store/sqlite/adapter/sqlite-worker-connector.types.d.ts +5 -0
- package/dist/store/sqlite/adapter/sqlite-worker-connector.types.d.ts.map +1 -0
- package/dist/store/sqlite/engine/blobs.d.ts +55 -0
- package/dist/store/sqlite/engine/blobs.d.ts.map +1 -0
- package/dist/store/sqlite/engine/bulk-insert.d.ts +31 -0
- package/dist/store/sqlite/engine/bulk-insert.d.ts.map +1 -0
- package/dist/store/sqlite/engine/commit.d.ts +20 -0
- package/dist/store/sqlite/engine/commit.d.ts.map +1 -0
- package/dist/store/sqlite/engine/device-cache.d.ts +13 -0
- package/dist/store/sqlite/engine/device-cache.d.ts.map +1 -0
- package/dist/store/sqlite/engine/engine-errors.d.ts +26 -0
- package/dist/store/sqlite/engine/engine-errors.d.ts.map +1 -0
- package/dist/store/sqlite/engine/engine.constants.d.ts +144 -0
- package/dist/store/sqlite/engine/engine.constants.d.ts.map +1 -0
- package/dist/store/sqlite/engine/engine.types.d.ts +361 -0
- package/dist/store/sqlite/engine/engine.types.d.ts.map +1 -0
- package/dist/store/sqlite/engine/history.d.ts +114 -0
- package/dist/store/sqlite/engine/history.d.ts.map +1 -0
- package/dist/store/sqlite/engine/import-queue.d.ts +7 -0
- package/dist/store/sqlite/engine/import-queue.d.ts.map +1 -0
- package/dist/store/sqlite/engine/import-target.d.ts +23 -0
- package/dist/store/sqlite/engine/import-target.d.ts.map +1 -0
- package/dist/store/sqlite/engine/import-window.d.ts +23 -0
- package/dist/store/sqlite/engine/import-window.d.ts.map +1 -0
- package/dist/store/sqlite/engine/reclaim.d.ts +13 -0
- package/dist/store/sqlite/engine/reclaim.d.ts.map +1 -0
- package/dist/store/sqlite/engine/records.d.ts +117 -0
- package/dist/store/sqlite/engine/records.d.ts.map +1 -0
- package/dist/store/sqlite/engine/registry.d.ts +76 -0
- package/dist/store/sqlite/engine/registry.d.ts.map +1 -0
- package/dist/store/sqlite/engine/schema.d.ts +57 -0
- package/dist/store/sqlite/engine/schema.d.ts.map +1 -0
- package/dist/store/sqlite/engine/sqlite-engine.d.ts +14 -0
- package/dist/store/sqlite/engine/sqlite-engine.d.ts.map +1 -0
- package/dist/store/sqlite/engine/transaction.d.ts +12 -0
- package/dist/store/sqlite/engine/transaction.d.ts.map +1 -0
- package/dist/store/sqlite/list-projects.constants.d.ts +12 -0
- package/dist/store/sqlite/list-projects.constants.d.ts.map +1 -0
- package/dist/store/sqlite/list-projects.d.ts +22 -0
- package/dist/store/sqlite/list-projects.d.ts.map +1 -0
- package/dist/store/sqlite/list-projects.types.d.ts +28 -0
- package/dist/store/sqlite/list-projects.types.d.ts.map +1 -0
- package/dist/store/sqlite/load-sqlite.d.ts +11 -0
- package/dist/store/sqlite/load-sqlite.d.ts.map +1 -0
- package/dist/store/sqlite/runtime/close-engine.d.ts +18 -0
- package/dist/store/sqlite/runtime/close-engine.d.ts.map +1 -0
- package/dist/store/sqlite/runtime/install-pool.d.ts +94 -0
- package/dist/store/sqlite/runtime/install-pool.d.ts.map +1 -0
- package/dist/store/sqlite/runtime/pool-header.d.ts +13 -0
- package/dist/store/sqlite/runtime/pool-header.d.ts.map +1 -0
- package/dist/store/sqlite/runtime/progress-beat.d.ts +13 -0
- package/dist/store/sqlite/runtime/progress-beat.d.ts.map +1 -0
- package/dist/store/sqlite/runtime/runtime.constants.d.ts +57 -0
- package/dist/store/sqlite/runtime/runtime.constants.d.ts.map +1 -0
- package/dist/store/sqlite/runtime/runtime.types.d.ts +56 -0
- package/dist/store/sqlite/runtime/runtime.types.d.ts.map +1 -0
- package/dist/store/sqlite/runtime/serve-dialecte-engine.d.ts +16 -0
- package/dist/store/sqlite/runtime/serve-dialecte-engine.d.ts.map +1 -0
- package/dist/store/sqlite/sqlite-store-of.d.ts +7 -0
- package/dist/store/sqlite/sqlite-store-of.d.ts.map +1 -0
- package/dist/store/sqlite/sqlite-text.d.ts +20 -0
- package/dist/store/sqlite/sqlite-text.d.ts.map +1 -0
- package/dist/store/sqlite/sqlite-wasm-url.d.ts +9 -0
- package/dist/store/sqlite/sqlite-wasm-url.d.ts.map +1 -0
- package/dist/store/sqlite/sqlite.constants.d.ts +15 -0
- package/dist/store/sqlite/sqlite.constants.d.ts.map +1 -0
- package/dist/store/sqlite/sqlite.types.d.ts +36 -0
- package/dist/store/sqlite/sqlite.types.d.ts.map +1 -0
- package/dist/store/sqlite-storage.constants.d.ts +14 -0
- package/dist/store/sqlite-storage.constants.d.ts.map +1 -0
- package/dist/store/sqlite-storage.d.ts +22 -0
- package/dist/store/sqlite-storage.d.ts.map +1 -0
- package/dist/store/sqlite-storage.types.d.ts +24 -0
- package/dist/store/sqlite-storage.types.d.ts.map +1 -0
- package/dist/store/store-errors.d.ts +51 -0
- package/dist/store/store-errors.d.ts.map +1 -0
- package/dist/store/store.constants.d.ts +15 -3
- package/dist/store/store.constants.d.ts.map +1 -1
- package/dist/store/store.types.d.ts +280 -16
- package/dist/store/store.types.d.ts.map +1 -1
- package/dist/store/stored-record.d.ts +16 -0
- package/dist/store/stored-record.d.ts.map +1 -0
- package/dist/store/unfinished-imports.d.ts +15 -0
- package/dist/store/unfinished-imports.d.ts.map +1 -0
- package/dist/store/write-outcome.d.ts +34 -0
- package/dist/store/write-outcome.d.ts.map +1 -0
- package/dist/test/assert-valid-xml/assert-valid-xml.constants.d.ts +7 -0
- package/dist/test/assert-valid-xml/assert-valid-xml.constants.d.ts.map +1 -0
- package/dist/test/assert-valid-xml/assert-valid-xml.d.ts +19 -18
- package/dist/test/assert-valid-xml/assert-valid-xml.d.ts.map +1 -1
- package/dist/test/assert-valid-xml/assert-valid-xml.types.d.ts +8 -4
- package/dist/test/assert-valid-xml/assert-valid-xml.types.d.ts.map +1 -1
- package/dist/test/assert-xml/assert-xml.constants.d.ts +25 -0
- package/dist/test/assert-xml/assert-xml.constants.d.ts.map +1 -0
- package/dist/test/assert-xml/assert-xml.d.ts +23 -34
- package/dist/test/assert-xml/assert-xml.d.ts.map +1 -1
- package/dist/test/assert-xml/assert-xml.types.d.ts +48 -0
- package/dist/test/assert-xml/assert-xml.types.d.ts.map +1 -0
- package/dist/test/assert-xml/describe-nearby.d.ts +16 -0
- package/dist/test/assert-xml/describe-nearby.d.ts.map +1 -0
- package/dist/test/assert-xml/describe-node-place.d.ts +15 -0
- package/dist/test/assert-xml/describe-node-place.d.ts.map +1 -0
- package/dist/test/assert-xml/index.d.ts +1 -1
- package/dist/test/assert-xml/index.d.ts.map +1 -1
- package/dist/test/assert-xml/query-failure-message.d.ts +24 -0
- package/dist/test/assert-xml/query-failure-message.d.ts.map +1 -0
- package/dist/test/assert-xml/read-xpath-step.d.ts +8 -0
- package/dist/test/assert-xml/read-xpath-step.d.ts.map +1 -0
- package/dist/test/assert-xml/xpath-parser.d.ts +2 -1
- package/dist/test/assert-xml/xpath-parser.d.ts.map +1 -1
- package/dist/test/config.d.ts +5 -0
- package/dist/test/config.d.ts.map +1 -1
- package/dist/test/constant.d.ts +2 -0
- package/dist/test/constant.d.ts.map +1 -1
- package/dist/test/create-test-dialecte.d.ts +32 -37
- package/dist/test/create-test-dialecte.d.ts.map +1 -1
- package/dist/test/create-test-dialecte.types.d.ts +99 -0
- package/dist/test/create-test-dialecte.types.d.ts.map +1 -0
- package/dist/test/create-test-helpers-internal.types.d.ts +19 -0
- package/dist/test/create-test-helpers-internal.types.d.ts.map +1 -0
- package/dist/test/create-test-helpers.d.ts +13 -0
- package/dist/test/create-test-helpers.d.ts.map +1 -0
- package/dist/test/create-test-helpers.types.d.ts +50 -0
- package/dist/test/create-test-helpers.types.d.ts.map +1 -0
- package/dist/test/fixtures/test-entry-scan-constraint.d.ts +3 -0
- package/dist/test/fixtures/test-entry-scan-constraint.d.ts.map +1 -0
- package/dist/test/fixtures/test-entry-scan-edges.types.d.ts +10 -0
- package/dist/test/fixtures/test-entry-scan-edges.types.d.ts.map +1 -0
- package/dist/test/fixtures/test-entry-scan-recursive.d.ts +4 -0
- package/dist/test/fixtures/test-entry-scan-recursive.d.ts.map +1 -0
- package/dist/test/fixtures/test-entry-scan-recursive.types.d.ts +15 -0
- package/dist/test/fixtures/test-entry-scan-recursive.types.d.ts.map +1 -0
- package/dist/test/fixtures/test-entry-scan-shapes.d.ts +14 -0
- package/dist/test/fixtures/test-entry-scan-shapes.d.ts.map +1 -0
- package/dist/test/fixtures/test-entry-scan-shapes.types.d.ts +14 -0
- package/dist/test/fixtures/test-entry-scan-shapes.types.d.ts.map +1 -0
- package/dist/test/fixtures/test-entry-scan-tree.d.ts +3 -0
- package/dist/test/fixtures/test-entry-scan-tree.d.ts.map +1 -0
- package/dist/test/fixtures/test-entry-scan.d.ts +5 -0
- package/dist/test/fixtures/test-entry-scan.d.ts.map +1 -0
- package/dist/test/fixtures/test-entry-scan.types.d.ts +5 -0
- package/dist/test/fixtures/test-entry-scan.types.d.ts.map +1 -0
- package/dist/test/generated/definition.generated.d.ts +5 -0
- package/dist/test/generated/definition.generated.d.ts.map +1 -1
- package/dist/test/in-memory-storage.setup.d.ts +2 -0
- package/dist/test/in-memory-storage.setup.d.ts.map +1 -0
- package/dist/test/index.d.ts +6 -0
- package/dist/test/index.d.ts.map +1 -1
- package/dist/test/normalize-uuids.constants.d.ts +3 -0
- package/dist/test/normalize-uuids.constants.d.ts.map +1 -0
- package/dist/test/normalize-uuids.d.ts +12 -0
- package/dist/test/normalize-uuids.d.ts.map +1 -1
- package/dist/test/run-test-cases.d.ts +30 -11
- package/dist/test/run-test-cases.d.ts.map +1 -1
- package/dist/test/run-test-cases.type.d.ts +16 -0
- package/dist/test/run-test-cases.type.d.ts.map +1 -1
- package/dist/test/sqlite-storage.setup.d.ts +1 -0
- package/dist/test/sqlite-storage.setup.d.ts.map +1 -0
- package/dist/test/test-dialecte-setup.d.ts +31 -0
- package/dist/test/test-dialecte-setup.d.ts.map +1 -0
- package/dist/test/test-dialecte-setup.types.d.ts +29 -0
- package/dist/test/test-dialecte-setup.types.d.ts.map +1 -0
- package/dist/test/test-dialecte.d.ts +2722 -0
- package/dist/test/test-dialecte.d.ts.map +1 -0
- package/dist/test/test-dialecte.types.d.ts +3 -0
- package/dist/test/test-dialecte.types.d.ts.map +1 -0
- package/dist/test/test-dialecte.worker.d.ts +2 -0
- package/dist/test/test-dialecte.worker.d.ts.map +1 -0
- package/dist/test/test-entry-environment.constants.d.ts +27 -0
- package/dist/test/test-entry-environment.constants.d.ts.map +1 -0
- package/dist/test/test-record.d.ts +49 -1
- package/dist/test/test-record.d.ts.map +1 -1
- package/dist/test/test-storage/index.d.ts +5 -0
- package/dist/test/test-storage/index.d.ts.map +1 -0
- package/dist/test/test-storage/read-test-storage.d.ts +4 -0
- package/dist/test/test-storage/read-test-storage.d.ts.map +1 -0
- package/dist/test/test-storage/resolve-test-storage.d.ts +9 -0
- package/dist/test/test-storage/resolve-test-storage.d.ts.map +1 -0
- package/dist/test/test-storage/test-storage.constants.d.ts +9 -0
- package/dist/test/test-storage/test-storage.constants.d.ts.map +1 -0
- package/dist/test/test-storage/test-storage.types.d.ts +15 -0
- package/dist/test/test-storage/test-storage.types.d.ts.map +1 -0
- package/dist/test/test-storage/test-store-for.d.ts +19 -0
- package/dist/test/test-storage/test-store-for.d.ts.map +1 -0
- package/dist/test/test-storage/use-test-storage.d.ts +14 -0
- package/dist/test/test-storage/use-test-storage.d.ts.map +1 -0
- package/dist/test/test-timing.constants.d.ts +15 -0
- package/dist/test/test-timing.constants.d.ts.map +1 -0
- package/dist/test/xml/engine-console.d.ts +6 -0
- package/dist/test/xml/engine-console.d.ts.map +1 -0
- package/dist/test/xml/engine.d.ts +3 -0
- package/dist/test/xml/engine.d.ts.map +1 -0
- package/dist/test/xml/index.d.ts +8 -0
- package/dist/test/xml/index.d.ts.map +1 -0
- package/dist/test/xml/malformed-xml-error.d.ts +5 -0
- package/dist/test/xml/malformed-xml-error.d.ts.map +1 -0
- package/dist/test/xml/print-node.d.ts +7 -0
- package/dist/test/xml/print-node.d.ts.map +1 -0
- package/dist/test/xml/select-nodes.d.ts +14 -0
- package/dist/test/xml/select-nodes.d.ts.map +1 -0
- package/dist/test/xml/with-xml-document.constants.d.ts +7 -0
- package/dist/test/xml/with-xml-document.constants.d.ts.map +1 -0
- package/dist/test/xml/with-xml-document.d.ts +14 -0
- package/dist/test/xml/with-xml-document.d.ts.map +1 -0
- package/dist/test/xml/xml-query-refused-error.d.ts +13 -0
- package/dist/test/xml/xml-query-refused-error.d.ts.map +1 -0
- package/dist/test/xml/xml.constants.d.ts +16 -0
- package/dist/test/xml/xml.constants.d.ts.map +1 -0
- package/dist/test/xml/xml.types.d.ts +31 -0
- package/dist/test/xml/xml.types.d.ts.map +1 -0
- package/dist/test/xsd/test-ext.xsd +226 -0
- package/dist/test/xsd/test.xsd +528 -0
- package/dist/test.js +3427 -406
- package/dist/types/dialecte-config.d.ts +6 -0
- package/dist/types/dialecte-config.d.ts.map +1 -1
- package/dist/types/io.d.ts +5 -0
- package/dist/types/io.d.ts.map +1 -1
- package/dist/utils/attribute-rules.d.ts +16 -1
- package/dist/utils/attribute-rules.d.ts.map +1 -1
- package/dist/utils/child-occurrences.constants.d.ts +4 -0
- package/dist/utils/child-occurrences.constants.d.ts.map +1 -0
- package/dist/utils/child-occurrences.d.ts +17 -0
- package/dist/utils/child-occurrences.d.ts.map +1 -0
- package/dist/utils/child-occurrences.types.d.ts +6 -0
- package/dist/utils/child-occurrences.types.d.ts.map +1 -0
- package/dist/utils/datatype.d.ts +4 -0
- package/dist/utils/datatype.d.ts.map +1 -1
- package/dist/utils/format-xml.d.ts +4 -0
- package/dist/utils/format-xml.d.ts.map +1 -1
- package/dist/utils/index.d.ts +5 -1
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/invariant.d.ts +2 -0
- package/dist/utils/invariant.d.ts.map +1 -1
- package/dist/utils/namespaces.d.ts +15 -1
- package/dist/utils/namespaces.d.ts.map +1 -1
- package/dist/utils/order-children.d.ts +14 -3
- package/dist/utils/order-children.d.ts.map +1 -1
- package/dist/utils/order-children.types.d.ts +10 -0
- package/dist/utils/order-children.types.d.ts.map +1 -0
- package/dist/utils/particle-occurrences.d.ts +4 -0
- package/dist/utils/particle-occurrences.d.ts.map +1 -0
- package/dist/utils/required-choices.d.ts +17 -0
- package/dist/utils/required-choices.d.ts.map +1 -0
- package/dist/utils/required-choices.types.d.ts +15 -0
- package/dist/utils/required-choices.types.d.ts.map +1 -0
- package/dist/utils/resolve-definition.d.ts +4 -0
- package/dist/utils/resolve-definition.d.ts.map +1 -1
- package/dist/utils/save-to-disk.constants.d.ts +3 -0
- package/dist/utils/save-to-disk.constants.d.ts.map +1 -0
- package/dist/utils/save-to-disk.d.ts +17 -5
- package/dist/utils/save-to-disk.d.ts.map +1 -1
- package/dist/utils/save-to-disk.types.d.ts +17 -0
- package/dist/utils/save-to-disk.types.d.ts.map +1 -0
- package/dist/utils/seeded-uuid.constants.d.ts +5 -0
- package/dist/utils/seeded-uuid.constants.d.ts.map +1 -0
- package/dist/utils/seeded-uuid.d.ts +15 -0
- package/dist/utils/seeded-uuid.d.ts.map +1 -0
- package/dist/utils/seeded-uuid.types.d.ts +8 -0
- package/dist/utils/seeded-uuid.types.d.ts.map +1 -0
- package/dist/utils/tell-listener.constants.d.ts +9 -0
- package/dist/utils/tell-listener.constants.d.ts.map +1 -0
- package/dist/utils/tell-listener.d.ts +24 -0
- package/dist/utils/tell-listener.d.ts.map +1 -0
- package/dist/utils/xml-characters.constants.d.ts +9 -0
- package/dist/utils/xml-characters.constants.d.ts.map +1 -0
- package/dist/utils/xml-characters.d.ts +8 -0
- package/dist/utils/xml-characters.d.ts.map +1 -0
- package/dist/utils/xml-whitespace.constants.d.ts +8 -0
- package/dist/utils/xml-whitespace.constants.d.ts.map +1 -0
- package/dist/utils/xml-whitespace.d.ts +19 -0
- package/dist/utils/xml-whitespace.d.ts.map +1 -0
- package/dist/utils/xsi-type.d.ts +4 -0
- package/dist/utils/xsi-type.d.ts.map +1 -1
- package/dist/utils/yield-to-queue.d.ts +6 -0
- package/dist/utils/yield-to-queue.d.ts.map +1 -0
- package/dist/utils-USNkj4sT.js +1275 -0
- package/dist/utils.js +1 -2
- package/dist/xml/build/document-root.d.ts +7 -0
- package/dist/xml/build/document-root.d.ts.map +1 -0
- package/dist/xml/build/index.d.ts +0 -5
- package/dist/xml/build/index.d.ts.map +1 -1
- package/dist/xml/build/record-element.d.ts +15 -0
- package/dist/xml/build/record-element.d.ts.map +1 -0
- package/dist/xml/build/record-element.types.d.ts +12 -0
- package/dist/xml/build/record-element.types.d.ts.map +1 -0
- package/dist/xml/build/write-xml-records.d.ts +7 -0
- package/dist/xml/build/write-xml-records.d.ts.map +1 -0
- package/dist/xml/build/write-xml-records.types.d.ts +11 -0
- package/dist/xml/build/write-xml-records.types.d.ts.map +1 -0
- package/dist/xml/build/xml-element.d.ts +79 -0
- package/dist/xml/build/xml-element.d.ts.map +1 -0
- package/dist/xml/build/xml-element.types.d.ts +34 -0
- package/dist/xml/build/xml-element.types.d.ts.map +1 -0
- package/dist/xml/build/xml-writer.constants.d.ts +24 -0
- package/dist/xml/build/xml-writer.constants.d.ts.map +1 -0
- package/dist/xml/build/xml-writer.d.ts +40 -0
- package/dist/xml/build/xml-writer.d.ts.map +1 -0
- package/dist/xml/build/xml-writer.types.d.ts +34 -0
- package/dist/xml/build/xml-writer.types.d.ts.map +1 -0
- package/dist/xml/dom/index.d.ts +3 -0
- package/dist/xml/dom/index.d.ts.map +1 -0
- package/dist/xml/dom/xml-document-from-file.d.ts +10 -0
- package/dist/xml/dom/xml-document-from-file.d.ts.map +1 -0
- package/dist/xml/dom/xml-document-from-file.types.d.ts +5 -0
- package/dist/xml/dom/xml-document-from-file.types.d.ts.map +1 -0
- package/dist/xml/index.d.ts +1 -0
- package/dist/xml/index.d.ts.map +1 -1
- package/dist/xml/inspect-xml.d.ts +2 -0
- package/dist/xml/inspect-xml.d.ts.map +1 -1
- package/dist/xml/parse/index.d.ts +1 -1
- package/dist/xml/parse/index.d.ts.map +1 -1
- package/dist/xml/parse/parse-xml-document.constants.d.ts +5 -0
- package/dist/xml/parse/parse-xml-document.constants.d.ts.map +1 -0
- package/dist/xml/parse/parse-xml-document.d.ts +13 -2
- package/dist/xml/parse/parse-xml-document.d.ts.map +1 -1
- package/dist/xml/parse/parse-xml-document.types.d.ts +7 -2
- package/dist/xml/parse/parse-xml-document.types.d.ts.map +1 -1
- package/dist/xml/parse/parser.constants.d.ts +7 -0
- package/dist/xml/parse/parser.constants.d.ts.map +1 -0
- package/dist/xml/parse/parser.d.ts.map +1 -1
- package/package.json +88 -8
- package/skills/dialecte/SKILL.md +276 -0
- package/skills/dialecte/references/api.json +1830 -0
- package/skills/dialecte/references/api.md +557 -0
- package/skills/dialecte/references/core-api.md +204 -0
- package/skills/dialecte/references/testing.md +116 -0
- package/skills/dialecte-contributing/SKILL.md +328 -0
- package/skills/dialecte-contributing/references/code-rules.md +108 -0
- package/skills/dialecte-contributing/references/landing-changes.md +83 -0
- package/skills/dialecte-contributing/references/perf.md +39 -0
- package/skills/dialecte-contributing/references/traps.md +89 -0
- package/skills/dialecte-lot/SKILL.md +471 -0
- package/skills/dialecte-lot/references/briefs.md +152 -0
- package/skills/dialecte-lot/references/model-tiers.md +52 -0
- package/skills/dialecte-lot/references/retro.md +51 -0
- package/dist/project/io/import-document.d.ts +0 -7
- package/dist/project/io/import-document.d.ts.map +0 -1
- package/dist/test/assert-xml/types.d.ts +0 -2
- package/dist/test/assert-xml/types.d.ts.map +0 -1
- package/dist/utils-DJN0Md0v.js +0 -624
- package/dist/xml/build/build-xml-document.d.ts +0 -10
- package/dist/xml/build/build-xml-document.d.ts.map +0 -1
- package/dist/xml/build/build-xml-document.types.d.ts +0 -22
- package/dist/xml/build/build-xml-document.types.d.ts.map +0 -1
- package/dist/xml/build/download-file.d.ts +0 -7
- package/dist/xml/build/download-file.d.ts.map +0 -1
- package/dist/xml/build/formatter.d.ts +0 -2
- package/dist/xml/build/formatter.d.ts.map +0 -1
- package/dist/xml/build/serialize.d.ts +0 -11
- package/dist/xml/build/serialize.d.ts.map +0 -1
- package/dist/xml/build/serialize.types.d.ts +0 -12
- package/dist/xml/build/serialize.types.d.ts.map +0 -1
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { Diagnostic } from '../diagnostics';
|
|
2
|
+
import { PerfSnapshot } from '../perf';
|
|
3
|
+
import { DocumentRecord, DocumentUpdates, ProjectChannelMessage } from '../project/types';
|
|
4
|
+
import { AnyRawRecord, BlobAttachment, BlobRecord, ChunkOptions, RecordPatch } from '../types';
|
|
3
5
|
/**
|
|
4
6
|
* RecordSchema — backend-agnostic index declaration for record tables.
|
|
5
7
|
*
|
|
@@ -27,16 +29,71 @@ export type RecordSchema = {
|
|
|
27
29
|
* All record operations are document-scoped via documentId.
|
|
28
30
|
* Not generic on Config — stores raw records as-is.
|
|
29
31
|
* Type narrowing lives in Document/Transaction, not here.
|
|
32
|
+
*
|
|
33
|
+
* What every store answers to, whichever its backend (the store contract suite checks it): a name is
|
|
34
|
+
* one state for every store of that name in its scope - a store built again under the name finds
|
|
35
|
+
* what was written, until a store of that name is destroyed. The scope is the backend's: an IndexedDB
|
|
36
|
+
* database is the origin's, an in-memory state the realm's. Records are values: once a write or a read
|
|
37
|
+
* returns, the caller's objects and the store are apart - changing one never changes the other
|
|
38
|
+
* (documents, records, changelog entries, blob entries; Blob data is immutable). List reads answer in
|
|
39
|
+
* id order - `getDocuments`, `getByDocumentId`, `getByTagNameInDocument`, the blob lists - ids compared
|
|
40
|
+
* by UTF-16 code unit, as an IndexedDB key range orders them; `getMany` answers in the order asked,
|
|
41
|
+
* `getChangeLog` in sequence order.
|
|
42
|
+
*
|
|
43
|
+
* A store holds JSON values only, in records, in document metadata and in blob entries (an added
|
|
44
|
+
* entry, an attached reference): well-formed strings, finite numbers, booleans, null, and arrays
|
|
45
|
+
* and plain objects of them under well-formed keys, nested at most 512 levels counted from what a
|
|
46
|
+
* write hands (its list of records or patches, or the document; a record's attribute value may then
|
|
47
|
+
* nest 508 levels, a metadata field's 510). A record is kept as its type has it: a field it carries
|
|
48
|
+
* beyond the type's - at its top, in its namespace or in its parent - is dropped. A field holding
|
|
49
|
+
* `undefined` is dropped: a record or a document created with one reads back without it, and an
|
|
50
|
+
* update leaves that field as it was. Any other value - a string or an object key holding a lone
|
|
51
|
+
* surrogate (SQLite would read it back changed), a Date, a Map, a Set, NaN or Infinity, a BigInt, a
|
|
52
|
+
* function, a symbol, an instance of a class, a raw JSON value, an object with a `toJSON` method,
|
|
53
|
+
* `undefined` in an array, a cycle, a value nested deeper - refuses the write whole with
|
|
54
|
+
* `STORE_VALUE_NOT_JSON`, nothing of it written; each write says where that comes in its order.
|
|
55
|
+
* Every store keeps well-formed text as written, code unit for code unit; an id or a tag name a
|
|
56
|
+
* call looks up that holds a lone surrogate names nothing (no store holds one). Hand values that
|
|
57
|
+
* read the same each time: one that does not (a getter answering something new) is kept as it read
|
|
58
|
+
* for one store and may be read again by another.
|
|
30
59
|
*/
|
|
31
60
|
export interface Store {
|
|
32
|
-
/**
|
|
61
|
+
/** The name of the state this store reads and writes; also scopes the BroadcastChannel */
|
|
33
62
|
readonly name: string;
|
|
34
|
-
/**
|
|
63
|
+
/**
|
|
64
|
+
* Open the connection (if not already open), once the operations still running have completed;
|
|
65
|
+
* refused with `STORE_CLOSED` when a `close()` was called after it (the close wins)
|
|
66
|
+
*/
|
|
35
67
|
open(): Promise<void>;
|
|
36
|
-
/**
|
|
37
|
-
|
|
38
|
-
|
|
68
|
+
/**
|
|
69
|
+
* Close this connection: every operation started through it from now on is refused with
|
|
70
|
+
* `STORE_CLOSED` until `open()` again (`destroy()` excepted); an operation already running
|
|
71
|
+
* completes. Settled once the connection counts no more - its running operations ended, and a
|
|
72
|
+
* destroy of the name asked after it, from this page or another tab, is not refused for it. The
|
|
73
|
+
* state of the name stays for the next store of that name and its other connections. Never await it
|
|
74
|
+
* inside an operation of the store (a hook, a transaction callback): it waits for that operation.
|
|
75
|
+
*/
|
|
76
|
+
close(): Promise<void>;
|
|
77
|
+
/**
|
|
78
|
+
* Delete the state of the name entirely (the database, not just its content), once the operations
|
|
79
|
+
* still running have completed - this store's, and those of a store of the name closed while they
|
|
80
|
+
* ran: every store of the name then reads empty, until something is registered again. Refused
|
|
81
|
+
* `PROJECT_OPEN_ELSEWHERE`, nothing removed, while another connection - a store of the name in this
|
|
82
|
+
* page or in another tab - has it open. A store closed counts open no more (a store of another tab
|
|
83
|
+
* only once the operations it still runs have ended), and neither does one destroyed, until its
|
|
84
|
+
* next operation.
|
|
85
|
+
*/
|
|
39
86
|
destroy(): Promise<void>;
|
|
87
|
+
/**
|
|
88
|
+
* Tell `listener` every change of the project, made by this connection or another one, in this page or
|
|
89
|
+
* another tab: a store several connections share announces their changes itself (a project on it posts what the
|
|
90
|
+
* store tells, nothing else). A call that changed nothing announces nothing. The change a call of this connection
|
|
91
|
+
* made is told before that call settles - a store that implements this must keep that order. `resync`: changes
|
|
92
|
+
* may have been missed (the connection reached another engine): read the project again. A closed store is told
|
|
93
|
+
* nothing until opened again. Answers the unsubscribe. A store without it (IndexedDB, a custom one) leaves the
|
|
94
|
+
* announcing to the project's BroadcastChannel.
|
|
95
|
+
*/
|
|
96
|
+
subscribe?(listener: (notice: StoreNotice) => void): () => void;
|
|
40
97
|
/**
|
|
41
98
|
* Bring this connection in sync with the shared persisted state (document
|
|
42
99
|
* registry + schema) so a subsequent read sees documents imported/removed by
|
|
@@ -54,18 +111,36 @@ export interface Store {
|
|
|
54
111
|
* connection.
|
|
55
112
|
*/
|
|
56
113
|
isDocumentReadable(documentId: string): Promise<boolean>;
|
|
57
|
-
/**
|
|
114
|
+
/**
|
|
115
|
+
* Register a new document — creates its backing storage partition. An id already registered is
|
|
116
|
+
* refused with `STORE_DUPLICATE_ID`, the registered document left as it was; then a value that is
|
|
117
|
+
* not JSON with `STORE_VALUE_NOT_JSON`; then a `path` that is not valid or does not end with the
|
|
118
|
+
* document's file name (`name` + `extension`) with `DOCUMENT_PATH_INVALID`; then a place another
|
|
119
|
+
* document holds - the same path, or one a folder of the other's - with `DOCUMENT_PATH_TAKEN`. A
|
|
120
|
+
* document registered `importing` stays so (no update makes it ready): a store of the project opening
|
|
121
|
+
* again removes it, as what an import left.
|
|
122
|
+
*/
|
|
58
123
|
registerDocument(file: DocumentRecord): Promise<void>;
|
|
59
124
|
/** Get a document record by id */
|
|
60
125
|
getDocument(documentId: string): Promise<DocumentRecord | undefined>;
|
|
61
126
|
/** Get all registered documents */
|
|
62
127
|
getDocuments(): Promise<DocumentRecord[]>;
|
|
63
|
-
/**
|
|
64
|
-
|
|
65
|
-
|
|
128
|
+
/**
|
|
129
|
+
* Update a document's name, path or metadata (not its status: only its import marks it ready, through
|
|
130
|
+
* `ImportTarget.markReady`; a `status` given is ignored): a value that is not JSON is refused
|
|
131
|
+
* first (`STORE_VALUE_NOT_JSON`); a field given as `undefined` is left as it was; a document that is
|
|
132
|
+
* not registered is then left alone. Its file name and its path stay one fact: a `path` moves and
|
|
133
|
+
* renames it (the name follows the file name, which must end with the document's extension), a
|
|
134
|
+
* `name` on a document with a path renames the file name in it; a result breaking a path rule, or
|
|
135
|
+
* a `name` and a `path` that disagree, is refused with `DOCUMENT_PATH_INVALID`, then a place another
|
|
136
|
+
* document holds with `DOCUMENT_PATH_TAKEN` - nothing changed (`applyDocumentUpdates`,
|
|
137
|
+
* `assertDocumentPlace`).
|
|
138
|
+
*/
|
|
139
|
+
updateDocument(documentId: string, updates: DocumentUpdates): Promise<void>;
|
|
140
|
+
/** Remove a document, all its records, its history entries and the blobs it owns (O(1) table clear) */
|
|
66
141
|
removeDocument(documentId: string): Promise<void>;
|
|
67
|
-
/** Get a single record by primary key.
|
|
68
|
-
get(id: string, documentId
|
|
142
|
+
/** Get a single record of a document by primary key. */
|
|
143
|
+
get(id: string, documentId: string): Promise<AnyRawRecord | undefined>;
|
|
69
144
|
/** Get all records belonging to a document */
|
|
70
145
|
getByDocumentId(documentId: string): Promise<AnyRawRecord[]>;
|
|
71
146
|
/**
|
|
@@ -78,15 +153,61 @@ export interface Store {
|
|
|
78
153
|
getByTagNameInDocument(tagName: string, documentId: string): Promise<AnyRawRecord[]>;
|
|
79
154
|
/** Get many records by id in one call, ordered like `ids`; a missing id yields `undefined`. */
|
|
80
155
|
getMany(ids: string[], documentId: string): Promise<(AnyRawRecord | undefined)[]>;
|
|
81
|
-
/**
|
|
156
|
+
/**
|
|
157
|
+
* Import one file next to the data: register the document `importing`, parse it with the
|
|
158
|
+
* dialecte's import session, store its records batch by batch, apply the session's writes, mark
|
|
159
|
+
* it `ready`. Answers the document, its record count and its diagnostics. Whatever fails, or an
|
|
160
|
+
* abort, leaves nothing of the file and throws the structured error (`PARSE_ERROR`,
|
|
161
|
+
* `IMPORT_ABORTED`, a store's refusal as it is - `STORE_VALUE_NOT_JSON` for a file, a `writeId`
|
|
162
|
+
* or `metadata` holding a value a store does not keep - `IMPORT_FAILED` wrapping anything else).
|
|
163
|
+
* `onProgress` is never awaited; `writeId` is generated when absent. A store that opens finds no
|
|
164
|
+
* import of a previous run: an unfinished import is removed when the store opens.
|
|
165
|
+
*/
|
|
166
|
+
importFile(params: ImportFileParams): Promise<ImportFileResult>;
|
|
167
|
+
/**
|
|
168
|
+
* Export one document next to the data: its records read in batches, written as formatted XML (or compact with `indent: false`), answered as one UTF-8 `Blob` and its filename.
|
|
169
|
+
* Never reads the whole document in one call. A write on the document while it is exported restarts
|
|
170
|
+
* the export once from the start; a second one fails it with `EXPORT_CONFLICT`. An abort fails it with
|
|
171
|
+
* `EXPORT_ABORTED`; nothing is left either way. A document that is not registered, or still
|
|
172
|
+
* `importing`, is refused with `DOCUMENT_NOT_REGISTERED`. `onProgress` is never awaited.
|
|
173
|
+
*/
|
|
174
|
+
exportFile(params: ExportFileParams): Promise<ExportFileResult>;
|
|
175
|
+
/**
|
|
176
|
+
* What became of a write - an import or a commit - asked by its id, after a lost connection, before
|
|
177
|
+
* reading again: `running` (an import still under way), `applied` (an import whose document is
|
|
178
|
+
* ready; a commit once committed - also after its undo, and after a later commit discarded it) or
|
|
179
|
+
* `not-applied` (it was refused, failed, was aborted or never started; or its document was removed
|
|
180
|
+
* since).
|
|
181
|
+
*/
|
|
182
|
+
getWriteOutcome(params: {
|
|
183
|
+
writeId: string;
|
|
184
|
+
}): Promise<WriteOutcome>;
|
|
185
|
+
/**
|
|
186
|
+
* Bulk write - atomic creates/updates/deletes bypassing changelog. For import pipeline. Refused
|
|
187
|
+
* whole, in this order: a document not registered (`DOCUMENT_NOT_REGISTERED`), a create that is
|
|
188
|
+
* not JSON (`STORE_VALUE_NOT_JSON`), a create of an id the document holds or the batch holds twice
|
|
189
|
+
* (`STORE_DUPLICATE_ID`, `meta.recordIds`), an update patch that is not JSON. An update patch of an
|
|
190
|
+
* absent record (whatever it holds) and a delete of an absent id are ignored.
|
|
191
|
+
*/
|
|
82
192
|
bulkWrite(documentId: string, ops: {
|
|
83
193
|
creates?: AnyRawRecord[];
|
|
84
194
|
updates?: RecordPatch[];
|
|
85
195
|
deletes?: string[];
|
|
86
196
|
}): Promise<void>;
|
|
87
|
-
/**
|
|
197
|
+
/**
|
|
198
|
+
* Atomic commit — all-or-nothing write scoped to a document, one undoable history entry holding
|
|
199
|
+
* the whole records before and after. Refused whole, nothing written and no entry kept: a document
|
|
200
|
+
* not registered or still importing (`DOCUMENT_NOT_REGISTERED`), then a `writeId` that is not
|
|
201
|
+
* well-formed text (`STORE_VALUE_NOT_JSON`), then an update of a record the document does not hold
|
|
202
|
+
* (`STORE_RECORD_NOT_FOUND`, `meta.recordId`), then a create that is not JSON
|
|
203
|
+
* (`STORE_VALUE_NOT_JSON`), then a create of an id the document holds or the commit holds twice
|
|
204
|
+
* (`STORE_DUPLICATE_ID`, `meta.recordIds`), then an update that is not JSON. A delete of an absent
|
|
205
|
+
* id is ignored. `writeId` is the caller's id for the commit, kept on its history entry and asked by
|
|
206
|
+
* `getWriteOutcome`; generated when absent.
|
|
207
|
+
*/
|
|
88
208
|
commit(params: {
|
|
89
209
|
documentId: string;
|
|
210
|
+
writeId?: string;
|
|
90
211
|
creates: AnyRawRecord[];
|
|
91
212
|
updates: AnyRawRecord[];
|
|
92
213
|
deletes: string[];
|
|
@@ -135,12 +256,109 @@ export interface Store {
|
|
|
135
256
|
*/
|
|
136
257
|
getDatabaseInstance(): unknown;
|
|
137
258
|
}
|
|
259
|
+
/** What a file's import is asked to do: plain data, it crosses a worker boundary as is. */
|
|
260
|
+
export type ImportFileOptions = {
|
|
261
|
+
/** Key into the dialecte's configs. Defaults to its default key. */
|
|
262
|
+
configKey?: string;
|
|
263
|
+
/** Extensible per-file metadata */
|
|
264
|
+
metadata?: Record<string, unknown>;
|
|
265
|
+
/** Override chunking defaults for SAX streaming */
|
|
266
|
+
chunkOptions?: Partial<ChunkOptions>;
|
|
267
|
+
/** Use custom record IDs from XML attributes instead of generating UUIDs */
|
|
268
|
+
useCustomRecordsIds?: boolean;
|
|
269
|
+
/**
|
|
270
|
+
* Where the document sits in the project (`substations/north.scd`): it takes its name and its extension from the
|
|
271
|
+
* path's file name, not from the file's, and the extension must be one its config reads (`.xml` always read besides
|
|
272
|
+
* its list). Refused before anything is registered: `DOCUMENT_PATH_INVALID` for a path breaking a rule or of another
|
|
273
|
+
* extension, `DOCUMENT_PATH_TAKEN` for a place another document holds.
|
|
274
|
+
*/
|
|
275
|
+
path?: string;
|
|
276
|
+
};
|
|
277
|
+
/**
|
|
278
|
+
* What an import is doing: `storing` while it reads the file and stores it (the edits of other views
|
|
279
|
+
* are served between its transactions), `indexing` while it builds an index of the document (they
|
|
280
|
+
* wait until it is built). A store that builds no index only ever says `storing`.
|
|
281
|
+
*/
|
|
282
|
+
export type ImportPhase = 'storing' | 'indexing';
|
|
283
|
+
/** How far an import is: what it is doing, and the bytes of the file parsed so far, out of its size. */
|
|
284
|
+
export type ImportProgress = {
|
|
285
|
+
phase: ImportPhase;
|
|
286
|
+
bytesRead: number;
|
|
287
|
+
totalBytes: number;
|
|
288
|
+
};
|
|
289
|
+
/**
|
|
290
|
+
* What a caller holds over an import that runs: kept apart from the import's data, as a worker call
|
|
291
|
+
* carries the listener as an argument of its own and the abort as a call of its own.
|
|
292
|
+
*/
|
|
293
|
+
export type ImportControl = {
|
|
294
|
+
/** Told after each stored batch; never awaited, its failure ignored. */
|
|
295
|
+
onProgress?: (progress: ImportProgress) => void;
|
|
296
|
+
/** Aborts the import at the next batch: nothing of the file remains, `IMPORT_ABORTED` thrown. */
|
|
297
|
+
signal?: AbortSignal;
|
|
298
|
+
};
|
|
299
|
+
export type ImportFileParams = ImportControl & {
|
|
300
|
+
file: File;
|
|
301
|
+
options?: ImportFileOptions;
|
|
302
|
+
/** The caller's id for this import, asked by `getWriteOutcome`; generated when absent. */
|
|
303
|
+
writeId?: string;
|
|
304
|
+
};
|
|
305
|
+
/** A file the store imported. */
|
|
306
|
+
export type ImportFileResult = {
|
|
307
|
+
/** The document, `ready` */
|
|
308
|
+
record: DocumentRecord;
|
|
309
|
+
recordCount: number;
|
|
310
|
+
/** What the import session had to say about the file; `[]` when nothing */
|
|
311
|
+
diagnostics: Diagnostic[];
|
|
312
|
+
/** The timings of the import's stages, on the clock of the realm that ran it; with perf on only */
|
|
313
|
+
perf?: PerfSnapshot;
|
|
314
|
+
};
|
|
315
|
+
/** How a document is written: plain data, it crosses a worker boundary as is. */
|
|
316
|
+
export type ExportFileOptions = {
|
|
317
|
+
/** Formatted (4 spaces, CRLF, a text value on its element's line); `false` = compact. Default `true`. */
|
|
318
|
+
indent?: boolean;
|
|
319
|
+
/** The record id as `_temp-idb-id` on every element. Default `false`. */
|
|
320
|
+
withDatabaseIds?: boolean;
|
|
321
|
+
/** Records read per call and written per batch. Default `EXPORT_BATCH_SIZE`. */
|
|
322
|
+
batchSize?: number;
|
|
323
|
+
};
|
|
324
|
+
/** How far an export is: the records written so far, out of the document's. */
|
|
325
|
+
export type ExportProgress = {
|
|
326
|
+
recordsWritten: number;
|
|
327
|
+
totalRecords: number;
|
|
328
|
+
};
|
|
329
|
+
/** What a caller holds over an export that runs, kept apart from its data as for an import. */
|
|
330
|
+
export type ExportControl = {
|
|
331
|
+
/**
|
|
332
|
+
* Told after each written batch; never awaited, its failure ignored. An export restarted by a write on its
|
|
333
|
+
* document tells its progress from the start again.
|
|
334
|
+
*/
|
|
335
|
+
onProgress?: (progress: ExportProgress) => void;
|
|
336
|
+
/** Aborts the export at the next batch: `EXPORT_ABORTED`, nothing answered. */
|
|
337
|
+
signal?: AbortSignal;
|
|
338
|
+
};
|
|
339
|
+
export type ExportFileParams = ExportControl & {
|
|
340
|
+
documentId: string;
|
|
341
|
+
options?: ExportFileOptions;
|
|
342
|
+
};
|
|
343
|
+
/** A document the store exported. */
|
|
344
|
+
export type ExportFileResult = {
|
|
345
|
+
/** The document as UTF-8 XML (`application/xml`) */
|
|
346
|
+
file: Blob;
|
|
347
|
+
/** The document's name and extension */
|
|
348
|
+
filename: string;
|
|
349
|
+
/** The timings of the export's stages, on the clock of the realm that ran it; with perf on only */
|
|
350
|
+
perf?: PerfSnapshot;
|
|
351
|
+
};
|
|
352
|
+
/** What became of a write asked by its id. */
|
|
353
|
+
export type WriteOutcome = 'applied' | 'running' | 'not-applied';
|
|
138
354
|
export type ChangeLogEntry = {
|
|
139
|
-
/** Auto-increment primary key
|
|
355
|
+
/** Auto-increment primary key, assigned by the store */
|
|
140
356
|
id: number;
|
|
141
357
|
documentId: string;
|
|
142
358
|
sequenceNumber: number;
|
|
143
359
|
timestamp: number;
|
|
360
|
+
/** The id of the commit that wrote the entry */
|
|
361
|
+
writeId: string;
|
|
144
362
|
operations: {
|
|
145
363
|
creates: AnyRawRecord[];
|
|
146
364
|
updates: {
|
|
@@ -155,4 +373,50 @@ export type ChangeLogMeta = {
|
|
|
155
373
|
key: string;
|
|
156
374
|
value: number;
|
|
157
375
|
};
|
|
376
|
+
/**
|
|
377
|
+
* What an import writes through: the store operations `runImport` calls, the ones the parser writes through
|
|
378
|
+
* (`ParseTarget`) among them. A store runs
|
|
379
|
+
* its own import against a target of its own, which a `close()` after the import started does not
|
|
380
|
+
* refuse - the import is one operation and completes.
|
|
381
|
+
*/
|
|
382
|
+
export type ImportTarget = Pick<Store, 'registerDocument' | 'getDocument' | 'removeDocument' | 'bulkWrite'> & {
|
|
383
|
+
/**
|
|
384
|
+
* The imported document ready, once every record and write of its session is stored: the one way a document
|
|
385
|
+
* becomes ready (`updateDocument` takes no `status`). Refused `DOCUMENT_NOT_REGISTERED` when the document is no
|
|
386
|
+
* longer there `importing` (removed meanwhile, or another one registered since under its id).
|
|
387
|
+
*/
|
|
388
|
+
markReady(documentId: string): Promise<void>;
|
|
389
|
+
/**
|
|
390
|
+
* The writes of the import's session, once every record of the file is stored (`bulkWrite` takes the file's):
|
|
391
|
+
* checked as `bulkWrite` checks them, a create of an id the file gave refused `STORE_DUPLICATE_ID` as one the
|
|
392
|
+
* document holds. A store whose import keeps no list of the ids it made looks them up here.
|
|
393
|
+
*/
|
|
394
|
+
writeSession(documentId: string, ops: {
|
|
395
|
+
creates?: AnyRawRecord[];
|
|
396
|
+
updates?: RecordPatch[];
|
|
397
|
+
deletes?: string[];
|
|
398
|
+
}): Promise<void>;
|
|
399
|
+
};
|
|
400
|
+
/**
|
|
401
|
+
* What an export reads through: the store's reads, and the version of a document - how many writes it
|
|
402
|
+
* has taken, `undefined` once it is not registered or not `ready`. A store runs its own export against a
|
|
403
|
+
* source of its own, which a `close()` after the export started does not refuse.
|
|
404
|
+
*/
|
|
405
|
+
export type ExportSource = Pick<Store, 'getDocument' | 'count' | 'getMany' | 'getByTagNameInDocument'> & {
|
|
406
|
+
getExportVersion(params: {
|
|
407
|
+
documentId: string;
|
|
408
|
+
}): Promise<number | undefined>;
|
|
409
|
+
};
|
|
410
|
+
/** A change of the project, told to a connection: the project event, and whether this connection made it. */
|
|
411
|
+
export type StoreChange = {
|
|
412
|
+
type: 'change';
|
|
413
|
+
message: ProjectChannelMessage;
|
|
414
|
+
own: boolean;
|
|
415
|
+
};
|
|
416
|
+
/** Changes may have been missed (the connection reached another engine): read the project again. */
|
|
417
|
+
export type StoreResync = {
|
|
418
|
+
type: 'resync';
|
|
419
|
+
};
|
|
420
|
+
/** What a store that announces tells its connections. */
|
|
421
|
+
export type StoreNotice = StoreChange | StoreResync;
|
|
158
422
|
//# sourceMappingURL=store.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store.types.d.ts","sourceRoot":"","sources":["../../src/store/store.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;
|
|
1
|
+
{"version":3,"file":"store.types.d.ts","sourceRoot":"","sources":["../../src/store/store.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC/C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAA;AAC1C,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAA;AAC7F,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,UAAU,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,SAAS,CAA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AAC,IAAI,CAAC,CAAA;CAChB,CAAA;AAED;;;;GAIG;AACH,MAAM,MAAM,YAAY,GAAG,IAAI,CAC9B,KAAK,EACL,aAAa,GAAG,OAAO,GAAG,SAAS,GAAG,wBAAwB,CAC9D,GAAG;IACH,gBAAgB,CAAC,MAAM,EAAE;QAAE,UAAU,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAA;CAC7E,CAAA;AAED,6GAA6G;AAC7G,MAAM,MAAM,WAAW,GAAG;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,OAAO,EAAE,qBAAqB,CAAC;IAAC,GAAG,EAAE,OAAO,CAAA;CAAE,CAAA;AAE1F,oGAAoG;AACpG,MAAM,MAAM,WAAW,GAAG;IAAE,IAAI,EAAE,QAAQ,CAAA;CAAE,CAAA;AAE5C,yDAAyD;AACzD,MAAM,MAAM,WAAW,GAAG,WAAW,GAAG,WAAW,CAAA"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { AnyRawRecord } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* A record as every store keeps it: the fields of the record type - its id, tag name, namespace (prefix
|
|
4
|
+
* and uri), attributes, value, parent (id and tag name, or none) and children - and nothing else the
|
|
5
|
+
* object carries, at its top, in its namespace or in its parent (attributes and children are kept as
|
|
6
|
+
* given). A store checks the whole record as JSON first, so a value that is not JSON is refused even
|
|
7
|
+
* in a field it then drops.
|
|
8
|
+
*/
|
|
9
|
+
export declare function storedRecordOf(params: {
|
|
10
|
+
record: AnyRawRecord;
|
|
11
|
+
}): AnyRawRecord;
|
|
12
|
+
/** A store's own copies of records a write hands it: checked whole as JSON values, kept as the record type has them. */
|
|
13
|
+
export declare function toStoredRecords(params: {
|
|
14
|
+
records: AnyRawRecord[];
|
|
15
|
+
}): AnyRawRecord[];
|
|
16
|
+
//# sourceMappingURL=stored-record.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stored-record.d.ts","sourceRoot":"","sources":["../../src/store/stored-record.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAE3C;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE;IAAE,MAAM,EAAE,YAAY,CAAA;CAAE,GAAG,YAAY,CAY7E;AAED,wHAAwH;AACxH,wBAAgB,eAAe,CAAC,MAAM,EAAE;IAAE,OAAO,EAAE,YAAY,EAAE,CAAA;CAAE,GAAG,YAAY,EAAE,CAEnF"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Store } from './store.types';
|
|
2
|
+
import { DocumentRecord } from '../project/types';
|
|
3
|
+
/**
|
|
4
|
+
* Remove every document an import left `importing`: an import never outlives the store that ran
|
|
5
|
+
* it, so what a store finds `importing` when it opens is a leftover - a closed tab, a crash. A store
|
|
6
|
+
* shared by several connections names the imports still running (`isRunning`): they are kept. A row
|
|
7
|
+
* is read again before it goes, so an import that ended since the registry was listed stays.
|
|
8
|
+
*
|
|
9
|
+
* @intent clean up the imports a closed tab or a crash left behind, clean up leftover imports when a custom store opens
|
|
10
|
+
*/
|
|
11
|
+
export declare function removeUnfinishedImports(params: {
|
|
12
|
+
store: Pick<Store, 'getDocuments' | 'getDocument' | 'removeDocument'>;
|
|
13
|
+
isRunning?: (document: DocumentRecord) => boolean | Promise<boolean>;
|
|
14
|
+
}): Promise<void>;
|
|
15
|
+
//# sourceMappingURL=unfinished-imports.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unfinished-imports.d.ts","sourceRoot":"","sources":["../../src/store/unfinished-imports.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAC1C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAErD;;;;;;;GAOG;AACH,wBAAsB,uBAAuB,CAAC,MAAM,EAAE;IACrD,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,cAAc,GAAG,aAAa,GAAG,gBAAgB,CAAC,CAAA;IACrE,SAAS,CAAC,EAAE,CAAC,QAAQ,EAAE,cAAc,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAA;CACpE,GAAG,OAAO,CAAC,IAAI,CAAC,CAShB"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { WriteOutcome } from './store.types';
|
|
2
|
+
import { DocumentRecord } from '../project/types';
|
|
3
|
+
/**
|
|
4
|
+
* What became of an import, read from the registry: the document its `writeId` is on is `running`
|
|
5
|
+
* while `importing`, `applied` once `ready`; no document carries it after a failure, an abort or a
|
|
6
|
+
* removal - `not-applied`. A store that knows which imports run says so (`isRunning`): a document
|
|
7
|
+
* `importing` whose import does not run is what a failed import left when its removal failed too -
|
|
8
|
+
* `not-applied`, removed when a store of the project next opens.
|
|
9
|
+
*
|
|
10
|
+
* @intent tell whether an import is running, applied or not applied, recover after a connection lost during an import
|
|
11
|
+
*/
|
|
12
|
+
export declare function importOutcomeOf(params: {
|
|
13
|
+
documents: readonly DocumentRecord[];
|
|
14
|
+
writeId: string;
|
|
15
|
+
isRunning?: (params: {
|
|
16
|
+
writeId: string;
|
|
17
|
+
}) => boolean;
|
|
18
|
+
}): WriteOutcome;
|
|
19
|
+
/**
|
|
20
|
+
* What became of a write - an import or a commit - read from the registry first, then from the
|
|
21
|
+
* history: `committed` says whether a history entry carries the id (a commit is applied whole or not
|
|
22
|
+
* at all, never running).
|
|
23
|
+
*
|
|
24
|
+
* @intent tell whether an import or a commit was applied, recover after a connection lost during a write
|
|
25
|
+
*/
|
|
26
|
+
export declare function writeOutcomeOf(params: {
|
|
27
|
+
documents: readonly DocumentRecord[];
|
|
28
|
+
writeId: string;
|
|
29
|
+
committed: boolean;
|
|
30
|
+
isRunning?: (params: {
|
|
31
|
+
writeId: string;
|
|
32
|
+
}) => boolean;
|
|
33
|
+
}): WriteOutcome;
|
|
34
|
+
//# sourceMappingURL=write-outcome.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"write-outcome.d.ts","sourceRoot":"","sources":["../../src/store/write-outcome.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AACjD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAErD;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE;IACvC,SAAS,EAAE,SAAS,cAAc,EAAE,CAAA;IACpC,OAAO,EAAE,MAAM,CAAA;IACf,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,KAAK,OAAO,CAAA;CACpD,GAAG,YAAY,CAMf;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE;IACtC,SAAS,EAAE,SAAS,cAAc,EAAE,CAAA;IACpC,OAAO,EAAE,MAAM,CAAA;IACf,SAAS,EAAE,OAAO,CAAA;IAClB,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,KAAK,OAAO,CAAA;CACpD,GAAG,YAAY,CAKf"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** Attributes any element may carry: namespace declarations, `xsi:*`, and the test record id. */
|
|
2
|
+
export declare const ALWAYS_ALLOWED_NAMESPACE_URIS: readonly string[];
|
|
3
|
+
/** The local name of `xsi:type`, in the XSI namespace. */
|
|
4
|
+
export declare const XSI_TYPE_ATTRIBUTE_NAME = "type";
|
|
5
|
+
/** What an XML declaration begins with. */
|
|
6
|
+
export declare const XML_DECLARATION_START = "<?xml";
|
|
7
|
+
//# sourceMappingURL=assert-valid-xml.constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assert-valid-xml.constants.d.ts","sourceRoot":"","sources":["../../../src/test/assert-valid-xml/assert-valid-xml.constants.ts"],"names":[],"mappings":"AAEA,iGAAiG;AACjG,eAAO,MAAM,6BAA6B,EAAE,SAAS,MAAM,EAI1D,CAAA;AAED,0DAA0D;AAC1D,eAAO,MAAM,uBAAuB,SAAS,CAAA;AAE7C,2CAA2C;AAC3C,eAAO,MAAM,qBAAqB,UAAU,CAAA"}
|
|
@@ -1,26 +1,27 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AssertValidXmlParams, AssertValidXmlTestCasesParams, CreateXmlSchemaAssertionsParams } from './assert-valid-xml.types';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
* and
|
|
5
|
-
*
|
|
3
|
+
* Structural schema assertions for tests, bound to a dialecte's generated `definition` and declared `namespaces`:
|
|
4
|
+
* `assertValidXml` (and its table form `assertValidXmlTestCases`) fails when an XML text holds an element in the
|
|
5
|
+
* wrong namespace, an element its parent may not hold, an unknown attribute or, with `requireComplete`, a missing
|
|
6
|
+
* required attribute. It is not a full XSD validation: it does not check the order of children, how many times a
|
|
7
|
+
* child occurs (min/max, a missing required child), attribute values (patterns, enumerations, datatypes) nor
|
|
8
|
+
* constraints across elements (unique keys, key references). Made once per dialecte (e.g. in scl's
|
|
9
|
+
* test entry) and offered beside `createTestProject`, like `createXmlAssertions`.
|
|
6
10
|
*
|
|
7
|
-
*
|
|
8
|
-
* parent
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* a
|
|
14
|
-
* a schema element. An element in NO namespace is not foreign — it is a schema
|
|
15
|
-
* element the snippet forgot to put in its namespace, and stays validated.
|
|
11
|
+
* What it checks: every element's namespace matches its parent context, every element is an allowed child of its
|
|
12
|
+
* parent, and every attribute is a known attribute of its element - in whatever namespace: declared by the element
|
|
13
|
+
* (a dialecte namespace under any prefix the document binds), or allowed by its attribute wildcard. Namespace
|
|
14
|
+
* declarations, `xsi:*` and the test record id are always allowed. Elements unknown to the schema are skipped
|
|
15
|
+
* (bespoke content under a transparent `Private`), and so is any element in a namespace the dialecte does not
|
|
16
|
+
* declare - even when its local name collides with a schema element. An element in NO namespace is not foreign - it
|
|
17
|
+
* is a schema element the snippet forgot to put in its namespace, and stays validated.
|
|
16
18
|
*
|
|
17
|
-
* `requireComplete` (default `true`) additionally requires every schema-required
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
* constraints (unique keys, keyref resolution).
|
|
19
|
+
* `requireComplete` (default `true`) additionally requires every schema-required attribute to be present.
|
|
20
|
+
*
|
|
21
|
+
* @intent validate an exported XML file against the schema in a test, check exported XML against the XSD structure (namespaces, allowed children, known and required attributes), assert in a test that a document is structurally valid for its schema
|
|
21
22
|
*/
|
|
22
23
|
export declare function createXmlSchemaAssertions(params: CreateXmlSchemaAssertionsParams): {
|
|
23
|
-
assertValidXml: (
|
|
24
|
+
assertValidXml: (params: AssertValidXmlParams) => void;
|
|
24
25
|
assertValidXmlTestCases: (params: AssertValidXmlTestCasesParams) => void;
|
|
25
26
|
};
|
|
26
27
|
//# sourceMappingURL=assert-valid-xml.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assert-valid-xml.d.ts","sourceRoot":"","sources":["../../../src/test/assert-valid-xml/assert-valid-xml.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"assert-valid-xml.d.ts","sourceRoot":"","sources":["../../../src/test/assert-valid-xml/assert-valid-xml.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EACX,oBAAoB,EACpB,6BAA6B,EAG7B,+BAA+B,EAE/B,MAAM,0BAA0B,CAAA;AAGjC;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,+BAA+B;6BAoPhD,oBAAoB,KAAG,IAAI;sCAWlB,6BAA6B,KAAG,IAAI;EAqB7E"}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
+
import { XmlElement } from '../xml';
|
|
1
2
|
import { AnyDefinition, AnyDialecteConfig, AnyTypes, ResolvedDefinition } from '../../types';
|
|
2
|
-
/**
|
|
3
|
-
export type
|
|
3
|
+
/** One XML string to validate, how it is named in the messages and how strict the validation is. */
|
|
4
|
+
export type AssertValidXmlParams = {
|
|
5
|
+
xml: string;
|
|
6
|
+
/** Names the XML in the messages. Default `'test XML'`. */
|
|
7
|
+
label?: string;
|
|
4
8
|
/**
|
|
5
9
|
* Also require every schema-required attribute to be present. Default `true`;
|
|
6
10
|
* minimal fixtures legitimately omit required attributes (a bare `<SCL>` without
|
|
@@ -19,7 +23,7 @@ export type CreateXmlSchemaAssertionsParams = {
|
|
|
19
23
|
schemaName?: string;
|
|
20
24
|
};
|
|
21
25
|
export type CollectElementViolationsParams = {
|
|
22
|
-
element:
|
|
26
|
+
element: XmlElement;
|
|
23
27
|
/** The parent element's definition as it applies there; `undefined` at the root or under a foreign element. */
|
|
24
28
|
parent: {
|
|
25
29
|
localName: string;
|
|
@@ -28,7 +32,7 @@ export type CollectElementViolationsParams = {
|
|
|
28
32
|
requireComplete: boolean;
|
|
29
33
|
};
|
|
30
34
|
export type CollectAttributeViolationsParams = {
|
|
31
|
-
element:
|
|
35
|
+
element: XmlElement;
|
|
32
36
|
elementDefinition: ResolvedDefinition;
|
|
33
37
|
requireComplete: boolean;
|
|
34
38
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assert-valid-xml.types.d.ts","sourceRoot":"","sources":["../../../src/test/assert-valid-xml/assert-valid-xml.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,iBAAiB,EAAE,QAAQ,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAA;AAE7F,
|
|
1
|
+
{"version":3,"file":"assert-valid-xml.types.d.ts","sourceRoot":"","sources":["../../../src/test/assert-valid-xml/assert-valid-xml.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAA;AACxC,OAAO,KAAK,EAAE,aAAa,EA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"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/** The label of the queried text in a malformed-XML message. */
|
|
2
|
+
export declare const QUERIED_XML_LABEL = "queried XML";
|
|
3
|
+
/** How many lines of context a failure message prints. */
|
|
4
|
+
export declare const FAILURE_CONTEXT_MAX_LINES = 200;
|
|
5
|
+
/** How many candidates the `nearby` line lists. */
|
|
6
|
+
export declare const NEARBY_CANDIDATE_LIMIT = 10;
|
|
7
|
+
/** The width of a message line's label column. */
|
|
8
|
+
export declare const MESSAGE_LABEL_WIDTH = 9;
|
|
9
|
+
/** The indentation of a message line, and of the XML printed under `context` or `element`. */
|
|
10
|
+
export declare const MESSAGE_LINE_INDENT = " ";
|
|
11
|
+
export declare const MESSAGE_XML_INDENT = " ";
|
|
12
|
+
/** The first line of each failure message. */
|
|
13
|
+
export declare const FAILURE_HEADERS: {
|
|
14
|
+
readonly expectedNotFound: "Expected element not found";
|
|
15
|
+
readonly unexpectedFound: "Unexpected element found";
|
|
16
|
+
readonly refused: "Query refused";
|
|
17
|
+
readonly unreliable: "Unexpected element check unreliable";
|
|
18
|
+
};
|
|
19
|
+
/** The last line the engine keeps for a node: a node on a later line reads as this one. */
|
|
20
|
+
export declare const LAST_KEPT_LINE = 65535;
|
|
21
|
+
/** The axis an abbreviated step separator stands for. */
|
|
22
|
+
export declare const ABBREVIATED_AXES: Record<string, string>;
|
|
23
|
+
/** The XPath union operator. */
|
|
24
|
+
export declare const UNION_OPERATOR = "|";
|
|
25
|
+
//# sourceMappingURL=assert-xml.constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assert-xml.constants.d.ts","sourceRoot":"","sources":["../../../src/test/assert-xml/assert-xml.constants.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAChE,eAAO,MAAM,iBAAiB,gBAAgB,CAAA;AAE9C,0DAA0D;AAC1D,eAAO,MAAM,yBAAyB,MAAM,CAAA;AAE5C,mDAAmD;AACnD,eAAO,MAAM,sBAAsB,KAAK,CAAA;AAExC,kDAAkD;AAClD,eAAO,MAAM,mBAAmB,IAAI,CAAA;AAEpC,8FAA8F;AAC9F,eAAO,MAAM,mBAAmB,OAAO,CAAA;AACvC,eAAO,MAAM,kBAAkB,SAAS,CAAA;AAExC,8CAA8C;AAC9C,eAAO,MAAM,eAAe;;;;;CAKlB,CAAA;AAEV,2FAA2F;AAC3F,eAAO,MAAM,cAAc,QAAQ,CAAA;AAEnC,yDAAyD;AACzD,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAGnD,CAAA;AAED,gCAAgC;AAChC,eAAO,MAAM,cAAc,MAAM,CAAA"}
|