@dialecte/core 0.6.4 → 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 +30 -0
- package/dist/diagnostics/diagnostics.d.ts.map +1 -0
- package/dist/diagnostics/index.d.ts +3 -0
- package/dist/diagnostics/index.d.ts.map +1 -0
- package/dist/diagnostics/types.d.ts +77 -0
- package/dist/diagnostics/types.d.ts.map +1 -0
- 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-DGQAe9G9.js → dialecte-gIPrRzni.js} +7225 -7511
- 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 +455 -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 +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +23 -3
- 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 -4
- 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/resolve-config.d.ts +4 -0
- package/dist/project/io/resolve-config.d.ts.map +1 -0
- 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 +339 -25
- package/dist/project/project.d.ts.map +1 -1
- package/dist/project/state/document-lifecycle.d.ts +6 -0
- package/dist/project/state/document-lifecycle.d.ts.map +1 -0
- 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 +158 -48
- 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 +9 -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 +33 -25
- 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 +12 -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 +4 -2
- package/dist/xml/parse/parser.d.ts.map +1 -1
- package/dist/xml/parse/types.d.ts +2 -0
- package/dist/xml/parse/types.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-CTBHUFs9.js +0 -620
- 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
|
@@ -0,0 +1,361 @@
|
|
|
1
|
+
import { EngineApi, EngineCommitParams, EngineExportParams, EngineImportParams } from '../../engine/engine.types';
|
|
2
|
+
import { HISTORY_ENTRY_STATE, HISTORY_PART, RECORD_INDEXES } from './engine.constants';
|
|
3
|
+
import { DialecteErrorKey } from '../../../errors';
|
|
4
|
+
import { Perf } from '../../../perf';
|
|
5
|
+
import { StoreRuntime } from '../../../project/io/store-runtime.types';
|
|
6
|
+
import { DocumentStatus } from '../../../project/types';
|
|
7
|
+
import { ExportControl, ExportFileResult, ImportControl, ImportFileResult, ImportPhase, ImportProgress } from '../../store.types';
|
|
8
|
+
import { AnyRawRecord } from '../../../types';
|
|
9
|
+
import { Database, SqlValue, Sqlite3Static } from '@sqlite.org/sqlite-wasm';
|
|
10
|
+
/** How a page cache follows the device's memory: `mibPerGiB` per GiB, held between a floor and a ceiling. */
|
|
11
|
+
export type DeviceCacheRule = {
|
|
12
|
+
mibPerGiB: number;
|
|
13
|
+
floorMiB: number;
|
|
14
|
+
ceilingMiB: number;
|
|
15
|
+
};
|
|
16
|
+
/** What an engine may be told at start; a field left out takes its default. */
|
|
17
|
+
export type SqliteEngineOptions = {
|
|
18
|
+
/** The rule the steady cache and the import cache follow from the device's memory. */
|
|
19
|
+
cacheRule: DeviceCacheRule;
|
|
20
|
+
/**
|
|
21
|
+
* A steady cache of this many MiB, instead of the one the rule gives. Not a memory cap: an import
|
|
22
|
+
* raises the cache to the rule's size while it runs.
|
|
23
|
+
*/
|
|
24
|
+
steadyCacheMiB?: number;
|
|
25
|
+
/** How long an import writes in one transaction before it commits and lets other calls run. */
|
|
26
|
+
importWindowMs: number;
|
|
27
|
+
/** How long the free pages are given back before the queued calls run. */
|
|
28
|
+
reclaimSliceMs: number;
|
|
29
|
+
/** How many free pages one reclaim statement gives back. */
|
|
30
|
+
reclaimPagesPerStatement: number;
|
|
31
|
+
};
|
|
32
|
+
/** A reclaim of the file's free pages on the engine's connection. */
|
|
33
|
+
export type ReclaimParams = {
|
|
34
|
+
db: Database;
|
|
35
|
+
/** Commit the running import's window before a statement writes (as before any foreign write). */
|
|
36
|
+
settle: () => void;
|
|
37
|
+
/** Whether the engine was closed meanwhile: the reclaim stops there. */
|
|
38
|
+
isClosed: () => boolean;
|
|
39
|
+
pagesPerStatement: number;
|
|
40
|
+
sliceMs: number;
|
|
41
|
+
/** Called after each statement: the engine is alive, whoever waits on it. */
|
|
42
|
+
onStep?: () => void;
|
|
43
|
+
/**
|
|
44
|
+
* The end of the work the reclaim gives way to, when some runs (an import): no statement until it has ended.
|
|
45
|
+
* Without it, the reclaim goes on in steps whatever runs.
|
|
46
|
+
*/
|
|
47
|
+
giveWayTo?: () => Promise<void> | undefined;
|
|
48
|
+
};
|
|
49
|
+
export type OpenSqliteEngineParams = {
|
|
50
|
+
sqlite3: Sqlite3Static;
|
|
51
|
+
/** The project's database, open: the engine is its only user from now on. */
|
|
52
|
+
db: Database;
|
|
53
|
+
/** The dialecte the project belongs to, kept in a new file. */
|
|
54
|
+
dialecteId: string;
|
|
55
|
+
/**
|
|
56
|
+
* The creation id the opener knows of the project (a view coming back): a new file, or one of another id,
|
|
57
|
+
* is refused `PROJECT_DESTROYED_WHILE_AWAY`, nothing written - the project was destroyed meanwhile.
|
|
58
|
+
*/
|
|
59
|
+
expectedCreationId?: string;
|
|
60
|
+
/** The project's name, said in the engine's refusals. */
|
|
61
|
+
name: string;
|
|
62
|
+
/** What the engine imports with: without it, an import is refused (`IMPORT_FAILED`). */
|
|
63
|
+
runtime?: StoreRuntime;
|
|
64
|
+
options?: Partial<SqliteEngineOptions>;
|
|
65
|
+
/**
|
|
66
|
+
* Refuse an import, before it registers anything, when the file system cannot take `bytes` more
|
|
67
|
+
* (`STORE_QUOTA_EXCEEDED`); none: the file is in memory.
|
|
68
|
+
*/
|
|
69
|
+
ensureImportSpace?: (params: {
|
|
70
|
+
bytes: number;
|
|
71
|
+
}) => Promise<void>;
|
|
72
|
+
/**
|
|
73
|
+
* Called as an import or an export moves on (each batch) and at each step of giving free pages back:
|
|
74
|
+
* the engine is alive, whoever waits on it.
|
|
75
|
+
*/
|
|
76
|
+
onWork?: () => void;
|
|
77
|
+
/**
|
|
78
|
+
* Runs one statement that may last long in a single step, with no progress-handler call inside it
|
|
79
|
+
* (an index build's sort, a table dropped): whoever waits on the engine is told so around it.
|
|
80
|
+
*/
|
|
81
|
+
onLongStatement?: LongStatementRunner;
|
|
82
|
+
/**
|
|
83
|
+
* Says whether a write that failed with an I/O error did because the origin's storage is full: the
|
|
84
|
+
* `STORE_QUOTA_EXCEEDED` refusal to answer instead, or none (the file system knows, not SQLite).
|
|
85
|
+
*/
|
|
86
|
+
explainIoFailure?: (params: {
|
|
87
|
+
thrown: unknown;
|
|
88
|
+
}) => Promise<Error | undefined>;
|
|
89
|
+
/**
|
|
90
|
+
* Called once the engine broke: an import left its connection inside a transaction it could neither roll back
|
|
91
|
+
* nor commit (a lost handle, no memory). The engine is closed by then, every call refused `STORE_ENGINE_LOST`
|
|
92
|
+
* (`host-gone`); its host lets it go and starts the next engine on the file, which removes what the import left.
|
|
93
|
+
*/
|
|
94
|
+
onBroken?: () => void;
|
|
95
|
+
};
|
|
96
|
+
/** Runs a statement that may last long as one step of SQLite, telling who waits on the engine around it. */
|
|
97
|
+
export type LongStatementRunner = <GenericResult>(params: {
|
|
98
|
+
work: () => GenericResult;
|
|
99
|
+
}) => GenericResult;
|
|
100
|
+
/** An export as the engine runs it: the client that asked for it owns it. */
|
|
101
|
+
export type SqliteEngineExportParams = EngineExportParams & {
|
|
102
|
+
clientId: string;
|
|
103
|
+
};
|
|
104
|
+
/** A commit on the engine's file; `settle` commits the running import's window first. */
|
|
105
|
+
export type CommitRecordsParams = EngineCommitParams & {
|
|
106
|
+
sqlite3: Sqlite3Static;
|
|
107
|
+
db: Database;
|
|
108
|
+
settle: () => void;
|
|
109
|
+
};
|
|
110
|
+
/** An undo or a redo on the engine's file; `settle` commits the running import's window first. */
|
|
111
|
+
export type HistoryStepParams = {
|
|
112
|
+
sqlite3: Sqlite3Static;
|
|
113
|
+
db: Database;
|
|
114
|
+
documentId: string;
|
|
115
|
+
direction: HistoryDirection;
|
|
116
|
+
settle: () => void;
|
|
117
|
+
};
|
|
118
|
+
/** An import as the engine runs it: the client that asked for it owns it. */
|
|
119
|
+
export type SqliteEngineImportParams = EngineImportParams & {
|
|
120
|
+
clientId: string;
|
|
121
|
+
};
|
|
122
|
+
/** One project's database behind the store port: the single writer of its file, serving every client. */
|
|
123
|
+
export type SqliteEngine = Omit<EngineApi, 'importFile' | 'exportFile'> & {
|
|
124
|
+
/** An import owned by the client that asked for it; one import runs at a time, the others wait their turn. */
|
|
125
|
+
importFile: (params: SqliteEngineImportParams, onProgress?: ImportControl['onProgress']) => Promise<ImportFileResult>;
|
|
126
|
+
/** Abort every import the client owns, running or waiting: its connection is gone. */
|
|
127
|
+
abortImportsOf: (params: {
|
|
128
|
+
clientId: string;
|
|
129
|
+
}) => void;
|
|
130
|
+
/** An export owned by the client that asked for it; an id that runs already is refused (`ASSERTION_FAILED`). */
|
|
131
|
+
exportFile: (params: SqliteEngineExportParams, onProgress?: ExportControl['onProgress']) => Promise<ExportFileResult>;
|
|
132
|
+
/** Abort every export the client owns: its connection is gone. */
|
|
133
|
+
abortExportsOf: (params: {
|
|
134
|
+
clientId: string;
|
|
135
|
+
}) => void;
|
|
136
|
+
/** The id the project's file was created with: another one after the project was destroyed and made again. */
|
|
137
|
+
creationId: string;
|
|
138
|
+
/** The engine as that client reaches it: its imports owned by it, nothing more than the port. */
|
|
139
|
+
clientView: (params: {
|
|
140
|
+
clientId: string;
|
|
141
|
+
}) => EngineApi;
|
|
142
|
+
/**
|
|
143
|
+
* Abort every import and every export, then close the database; the engine refuses every call after
|
|
144
|
+
* (`STORE_CLOSED`).
|
|
145
|
+
*/
|
|
146
|
+
close: () => void;
|
|
147
|
+
};
|
|
148
|
+
/** One import in the queue: its owner, its id, the controller that aborts it. */
|
|
149
|
+
export type ImportQueueEntry = {
|
|
150
|
+
writeId: string;
|
|
151
|
+
clientId: string;
|
|
152
|
+
controller: AbortController;
|
|
153
|
+
/** Whether its turn has come (it runs, or it was aborted while it waited). */
|
|
154
|
+
hasTurn: boolean;
|
|
155
|
+
/** Whether it registered its document: its registry row says what became of it. */
|
|
156
|
+
registered: boolean;
|
|
157
|
+
/** Gives it its turn. */
|
|
158
|
+
start: () => void;
|
|
159
|
+
};
|
|
160
|
+
/** The imports of an engine, one running at a time, the others waiting their turn in order. */
|
|
161
|
+
export type ImportQueue = {
|
|
162
|
+
/** Run `work` once every import before it is done; `work` is given the import's abort signal. */
|
|
163
|
+
run: <GenericResult>(params: {
|
|
164
|
+
writeId: string;
|
|
165
|
+
clientId: string;
|
|
166
|
+
work: (signal: AbortSignal) => Promise<GenericResult>;
|
|
167
|
+
}) => Promise<GenericResult>;
|
|
168
|
+
abort: (params: {
|
|
169
|
+
writeId: string;
|
|
170
|
+
}) => void;
|
|
171
|
+
abortOwnedBy: (params: {
|
|
172
|
+
clientId: string;
|
|
173
|
+
}) => void;
|
|
174
|
+
abortAll: () => void;
|
|
175
|
+
/**
|
|
176
|
+
* Whether an import of that id has no registry row yet though it runs or will - waiting its turn, or
|
|
177
|
+
* running before its document is registered (while its space is checked): its row cannot say.
|
|
178
|
+
*/
|
|
179
|
+
awaitsRow: (params: {
|
|
180
|
+
writeId: string;
|
|
181
|
+
}) => boolean;
|
|
182
|
+
/** The import of that id registered its document: from now on its registry row says what became of it. */
|
|
183
|
+
markRegistered: (params: {
|
|
184
|
+
writeId: string;
|
|
185
|
+
}) => void;
|
|
186
|
+
/** Whether an import of that id runs or waits its turn: one that ended, however, is no longer in the queue. */
|
|
187
|
+
runs: (params: {
|
|
188
|
+
writeId: string;
|
|
189
|
+
}) => boolean;
|
|
190
|
+
};
|
|
191
|
+
/** An index of a record table. */
|
|
192
|
+
export type RecordIndex = keyof typeof RECORD_INDEXES;
|
|
193
|
+
/** A registered document's row number and its record table. */
|
|
194
|
+
export type DocumentTable = {
|
|
195
|
+
seq: number;
|
|
196
|
+
table: string;
|
|
197
|
+
};
|
|
198
|
+
/** A part of a history entry: what a commit created, each updated record before and after it, what it deleted. */
|
|
199
|
+
export type HistoryPart = keyof typeof HISTORY_PART;
|
|
200
|
+
/** Where a history entry stands. */
|
|
201
|
+
export type HistoryEntryState = keyof typeof HISTORY_ENTRY_STATE;
|
|
202
|
+
/** Which way an entry is applied: as committed (a commit, a redo), or reverted (an undo). */
|
|
203
|
+
export type HistoryDirection = 'forward' | 'back';
|
|
204
|
+
/** A history entry, by its row id. */
|
|
205
|
+
export type HistoryEntryRef = {
|
|
206
|
+
id: number;
|
|
207
|
+
};
|
|
208
|
+
/** A registered document's row number, its status, its record table and its history-rows table. */
|
|
209
|
+
export type DocumentTables = {
|
|
210
|
+
seq: number;
|
|
211
|
+
status: DocumentStatus;
|
|
212
|
+
records: string;
|
|
213
|
+
history: string;
|
|
214
|
+
};
|
|
215
|
+
/** One bind for the row sink: records already checked, into the document's table, timed on the import's perf. */
|
|
216
|
+
export type RecordSinkParams = {
|
|
217
|
+
db: Database;
|
|
218
|
+
table: string;
|
|
219
|
+
records: AnyRawRecord[];
|
|
220
|
+
perf: Perf;
|
|
221
|
+
};
|
|
222
|
+
/** What an import's window transactions run with. */
|
|
223
|
+
export type ImportWindowParams = {
|
|
224
|
+
sqlite3: Sqlite3Static;
|
|
225
|
+
db: Database;
|
|
226
|
+
perf: Perf;
|
|
227
|
+
/** How long one window transaction writes before it commits. */
|
|
228
|
+
windowMs: number;
|
|
229
|
+
/** The page cache while the import runs, and the one the engine keeps otherwise. */
|
|
230
|
+
importCacheMiB: number;
|
|
231
|
+
steadyCacheMiB: number;
|
|
232
|
+
};
|
|
233
|
+
/** Where an import's window stands. */
|
|
234
|
+
export type ImportWindowState = {
|
|
235
|
+
/** When the open transaction began; none open when undefined. */
|
|
236
|
+
openedAt: number | undefined;
|
|
237
|
+
/** Whether the connection runs with synchronous off. */
|
|
238
|
+
synchronousOff: boolean;
|
|
239
|
+
/** Whether the import cache is raised. */
|
|
240
|
+
cacheRaised: boolean;
|
|
241
|
+
/** The failure of a commit that lost the window's records, refused at the import's next window. */
|
|
242
|
+
lost: Error | undefined;
|
|
243
|
+
};
|
|
244
|
+
/**
|
|
245
|
+
* The transactions an import writes in: time-capped, synchronous off, the import cache held from the
|
|
246
|
+
* first write to the end; every other write of the engine runs between two of them, durable.
|
|
247
|
+
*/
|
|
248
|
+
export type ImportWindow = {
|
|
249
|
+
/** Run `work` in the open transaction, opened first when none is. */
|
|
250
|
+
write: <GenericResult>(work: () => GenericResult) => GenericResult;
|
|
251
|
+
/** Commit the open transaction once it has written for the window's time; answers whether it did. */
|
|
252
|
+
commitIfDue: () => boolean;
|
|
253
|
+
/** Run `work` alone in a transaction of its own (an index build: one long statement). */
|
|
254
|
+
alone: <GenericResult>(work: () => GenericResult) => GenericResult;
|
|
255
|
+
/** Commit what is open and make the connection durable for another connection's write; the import cache stays. */
|
|
256
|
+
settle: () => void;
|
|
257
|
+
/** Commit what is open and give the connection back its durable settings: the import is complete. */
|
|
258
|
+
finish: () => void;
|
|
259
|
+
/** Roll back what is open and give the connection back its durable settings; nothing to do on a closed database. */
|
|
260
|
+
end: () => void;
|
|
261
|
+
};
|
|
262
|
+
/** The import an engine runs, by its window and its end: none between two imports. */
|
|
263
|
+
export type RunningImport = {
|
|
264
|
+
window: ImportWindow | undefined;
|
|
265
|
+
/** Settled once the import has ended, however it did. */
|
|
266
|
+
ended: Promise<void> | undefined;
|
|
267
|
+
};
|
|
268
|
+
/** What an import's target writes with: the engine's connection and state, and the import's own perf, abort and file. */
|
|
269
|
+
export type ImportTargetParams = {
|
|
270
|
+
sqlite3: Sqlite3Static;
|
|
271
|
+
db: Database;
|
|
272
|
+
perf: Perf;
|
|
273
|
+
signal: AbortSignal;
|
|
274
|
+
file: File;
|
|
275
|
+
/** The engine's record count per document, kept in step by the import's writes. */
|
|
276
|
+
counts: Map<string, number>;
|
|
277
|
+
/** The engine's removal of a document (table, row, free pages in steps): what a failed import leaves goes. */
|
|
278
|
+
removeDocument: (params: {
|
|
279
|
+
documentId: string;
|
|
280
|
+
}) => Promise<void>;
|
|
281
|
+
/** The import's transactions. */
|
|
282
|
+
window: ImportWindow;
|
|
283
|
+
/** How long the import works before the engine's queue gets a turn (its window's time). */
|
|
284
|
+
windowMs: number;
|
|
285
|
+
/** Tell the caller what the import does now (`indexing` around an index build). */
|
|
286
|
+
tellPhase: (params: {
|
|
287
|
+
phase: ImportPhase;
|
|
288
|
+
}) => void;
|
|
289
|
+
/** Runs an index build: one long statement. */
|
|
290
|
+
onLongStatement: LongStatementRunner;
|
|
291
|
+
/** Told once the import's document is registered (its registry row exists). */
|
|
292
|
+
onRegistered: () => void;
|
|
293
|
+
/** Whether the file gives its own record ids (they may repeat); generated ids never do. */
|
|
294
|
+
customIds: boolean;
|
|
295
|
+
};
|
|
296
|
+
/** The import's progress as the engine relays it: the parser's told on, the last one kept to tell a phase with. */
|
|
297
|
+
export type ImportProgressRelay = {
|
|
298
|
+
onProgress: (progress: ImportProgress) => void;
|
|
299
|
+
tellPhase: (params: {
|
|
300
|
+
phase: ImportPhase;
|
|
301
|
+
}) => void;
|
|
302
|
+
};
|
|
303
|
+
/** What an import's target knows of its document: the one it registered (with its table) and the indexes built on it. */
|
|
304
|
+
/** A document's registry row as an import checks it is still its own. */
|
|
305
|
+
export type RegistryRowState = {
|
|
306
|
+
seq: number;
|
|
307
|
+
status: DocumentStatus;
|
|
308
|
+
writeId: string | undefined;
|
|
309
|
+
createdAt: number;
|
|
310
|
+
};
|
|
311
|
+
export type ImportTargetState = {
|
|
312
|
+
/** The document this import registered: its table, and what tells its row from one registered since under its id. */
|
|
313
|
+
registered: (DocumentTable & {
|
|
314
|
+
documentId: string;
|
|
315
|
+
writeId: string | undefined;
|
|
316
|
+
createdAt: number;
|
|
317
|
+
}) | undefined;
|
|
318
|
+
built: Set<RecordIndex>;
|
|
319
|
+
/**
|
|
320
|
+
* The ids stored so far when the file gives its own ids, until the id index exists: a repeated
|
|
321
|
+
* one is refused at its batch. About 100 bytes an id (0.4 GB for 4 million records): only test
|
|
322
|
+
* setups give their own ids.
|
|
323
|
+
*/
|
|
324
|
+
givenIds: Set<string> | undefined;
|
|
325
|
+
};
|
|
326
|
+
/** Reads by id on one table through one prepared statement. */
|
|
327
|
+
export type RecordReadsById = {
|
|
328
|
+
read: (ids: readonly string[]) => Map<string, AnyRawRecord>;
|
|
329
|
+
finalize: () => void;
|
|
330
|
+
};
|
|
331
|
+
/** The statement an export reads its document's records through, with what it was prepared for. */
|
|
332
|
+
export type ExportReads = {
|
|
333
|
+
current: {
|
|
334
|
+
documentId: string;
|
|
335
|
+
removals: number;
|
|
336
|
+
statement: RecordReadsById;
|
|
337
|
+
} | undefined;
|
|
338
|
+
};
|
|
339
|
+
/** An export the engine runs: its owner, its abort, the statement it reads through. */
|
|
340
|
+
export type RunningExport = {
|
|
341
|
+
clientId: string;
|
|
342
|
+
controller: AbortController;
|
|
343
|
+
reads: ExportReads;
|
|
344
|
+
};
|
|
345
|
+
/** Columns of one value on every row an insert writes, before the record's own. */
|
|
346
|
+
export type LeadColumns = {
|
|
347
|
+
columns: string[];
|
|
348
|
+
values: SqlValue[];
|
|
349
|
+
};
|
|
350
|
+
/** Records encoded as rows of a document table: JSON arrays of up to `ROWS_PER_BIND` rows each. */
|
|
351
|
+
export type EncodedRows = {
|
|
352
|
+
payloads: string[];
|
|
353
|
+
};
|
|
354
|
+
/** The store errors an engine throws a failure of SQLite as, one per kind of operation. */
|
|
355
|
+
export type StoreFailureKey = Extract<DialecteErrorKey, 'STORE_CONNECTION_FAILED' | 'STORE_READ_FAILED' | 'STORE_COMMIT_FAILED' | 'STORE_BULK_ADD_FAILED' | 'STORE_BULK_UPDATE_FAILED' | 'STORE_DELETE_FAILED'>;
|
|
356
|
+
/** A row of a project file's `_meta` table. */
|
|
357
|
+
export type MetaRow = {
|
|
358
|
+
key: string;
|
|
359
|
+
value: string;
|
|
360
|
+
};
|
|
361
|
+
//# sourceMappingURL=engine.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"engine.types.d.ts","sourceRoot":"","sources":["../../../../src/store/sqlite/engine/engine.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,SAAS,EACT,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,MAAM,2BAA2B,CAAA;AAClC,OAAO,KAAK,EAAE,mBAAmB,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AAC3F,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAChD,OAAO,KAAK,EAAE,IA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AA;AAED,uFAAuF;AACvF,MAAM,MAAM,aAAa,GAAG;IAC3B,QAAQ,EAAE,MAAM,CAAA;IAChB,UAAU,EAAE,eAAe,CAAA;IAC3B,KAAK,EAAE,WAAW,CAAA;CAClB,CAAA;AAED,mFAAmF;AACnF,MAAM,MAAM,WAAW,GAAG;IACzB,OAAO,EAAE,MAAM,EAAE,CAAA;IACjB,MAAM,EAAE,QAAQ,EAAE,CAAA;CAClB,CAAA;AAED,mGAAmG;AACnG,MAAM,MAAM,WAAW,GAAG;IACzB,QAAQ,EAAE,MAAM,EAAE,CAAA;CAClB,CAAA;AAED,2FAA2F;AAC3F,MAAM,MAAM,eAAe,GAAG,OAAO,CACpC,gBAAgB,EACd,yBAAyB,GACzB,mBAAmB,GACnB,qBAAqB,GACrB,uBAAuB,GACvB,0BAA0B,GAC1B,qBAAqB,CACvB,CAAA;AAED,+CAA+C;AAC/C,MAAM,MAAM,OAAO,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAA"}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { EncodedRows, HistoryDirection, HistoryEntryRef, HistoryEntryState, HistoryPart } from './engine.types';
|
|
2
|
+
import { ChangeLogEntry } from '../../store.types';
|
|
3
|
+
import { Database } from '@sqlite.org/sqlite-wasm';
|
|
4
|
+
/**
|
|
5
|
+
* The history of a document on the file: one `_changeLog` row per commit, and the records it touched
|
|
6
|
+
* whole in the document's history-rows table, one row per record and part, in the order given. The
|
|
7
|
+
* entries applied are the first ones in sequence; an undo leaves its entry undone until a redo applies
|
|
8
|
+
* it again or a commit discards it. Every write runs in the caller's transaction.
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* A new entry, applied, after the document's last: the entries undone before it are discarded first
|
|
12
|
+
* - their rows gone, their place freed, their write ids kept. Answers the entry.
|
|
13
|
+
*/
|
|
14
|
+
export declare function recordEntry(params: {
|
|
15
|
+
db: Database;
|
|
16
|
+
documentId: string;
|
|
17
|
+
table: string;
|
|
18
|
+
writeId: string;
|
|
19
|
+
}): HistoryEntryRef;
|
|
20
|
+
/**
|
|
21
|
+
* The records of these ids the document holds, copied whole into the entry's part, in the order of
|
|
22
|
+
* the ids (an id it does not hold is left out).
|
|
23
|
+
*/
|
|
24
|
+
export declare function copySnapshots(params: {
|
|
25
|
+
db: Database;
|
|
26
|
+
records: string;
|
|
27
|
+
table: string;
|
|
28
|
+
entry: HistoryEntryRef;
|
|
29
|
+
part: HistoryPart;
|
|
30
|
+
ids: readonly string[];
|
|
31
|
+
}): void;
|
|
32
|
+
/** Records encoded for the row sink, written as the entry's part in the order given. */
|
|
33
|
+
export declare function appendSnapshots(params: {
|
|
34
|
+
db: Database;
|
|
35
|
+
table: string;
|
|
36
|
+
entry: HistoryEntryRef;
|
|
37
|
+
part: HistoryPart;
|
|
38
|
+
rows: EncodedRows;
|
|
39
|
+
}): void;
|
|
40
|
+
/**
|
|
41
|
+
* Apply an entry to the document's records: `forward` (a redo) writes its creates and its updates as
|
|
42
|
+
* they were after it, then deletes what it deleted; `back` (an undo), in reverse, writes back what it
|
|
43
|
+
* deleted, then its updates as they were before it, then deletes its creates. Answers how many records
|
|
44
|
+
* the document gained (negative when it lost some).
|
|
45
|
+
*/
|
|
46
|
+
export declare function applyEntry(params: {
|
|
47
|
+
db: Database;
|
|
48
|
+
records: string;
|
|
49
|
+
table: string;
|
|
50
|
+
entry: HistoryEntryRef;
|
|
51
|
+
direction: HistoryDirection;
|
|
52
|
+
}): number;
|
|
53
|
+
/**
|
|
54
|
+
* The rows of the part written over the records of their ids, whatever the document holds there, in
|
|
55
|
+
* the order the entry keeps (the last of two updates of a record stands); answers how many of them the
|
|
56
|
+
* document did not hold.
|
|
57
|
+
*/
|
|
58
|
+
export declare function writePartRecords(params: {
|
|
59
|
+
db: Database;
|
|
60
|
+
records: string;
|
|
61
|
+
table: string;
|
|
62
|
+
entry: HistoryEntryRef;
|
|
63
|
+
part: HistoryPart;
|
|
64
|
+
}): number;
|
|
65
|
+
/** The records of the ids the part holds deleted; answers how many there were. */
|
|
66
|
+
export declare function deletePartRecords(params: {
|
|
67
|
+
db: Database;
|
|
68
|
+
records: string;
|
|
69
|
+
table: string;
|
|
70
|
+
entry: HistoryEntryRef;
|
|
71
|
+
part: HistoryPart;
|
|
72
|
+
}): number;
|
|
73
|
+
/** The entry an undo of the document reverts: its last applied one; none at the start of its history. */
|
|
74
|
+
export declare function entryToUndo(params: {
|
|
75
|
+
db: Database;
|
|
76
|
+
documentId: string;
|
|
77
|
+
}): HistoryEntryRef | undefined;
|
|
78
|
+
/** The entry a redo of the document applies again: its first undone one; none at the end of its history. */
|
|
79
|
+
export declare function entryToRedo(params: {
|
|
80
|
+
db: Database;
|
|
81
|
+
documentId: string;
|
|
82
|
+
}): HistoryEntryRef | undefined;
|
|
83
|
+
/** Move the entry to applied (a redo) or undone (an undo). */
|
|
84
|
+
export declare function setEntryState(params: {
|
|
85
|
+
db: Database;
|
|
86
|
+
entry: HistoryEntryRef;
|
|
87
|
+
state: HistoryEntryState;
|
|
88
|
+
}): void;
|
|
89
|
+
/** Whether the document has a commit to undo and one to redo. */
|
|
90
|
+
export declare function readHistoryStatus(params: {
|
|
91
|
+
db: Database;
|
|
92
|
+
documentId: string;
|
|
93
|
+
}): {
|
|
94
|
+
canUndo: boolean;
|
|
95
|
+
canRedo: boolean;
|
|
96
|
+
};
|
|
97
|
+
/** The document's entries in sequence order (a discarded one is not), each with its records whole, read in two statements. */
|
|
98
|
+
export declare function readChangeLog(params: {
|
|
99
|
+
db: Database;
|
|
100
|
+
documentId: string;
|
|
101
|
+
table: string;
|
|
102
|
+
}): ChangeLogEntry[];
|
|
103
|
+
/** Whether a history entry of any document carries the id, discarded or not: its commit is applied. */
|
|
104
|
+
export declare function hasCommitOf(params: {
|
|
105
|
+
db: Database;
|
|
106
|
+
writeId: string;
|
|
107
|
+
}): boolean;
|
|
108
|
+
/** A document's history gone, in the caller's transaction: its history-rows table and its entries. */
|
|
109
|
+
export declare function deleteHistoryOf(params: {
|
|
110
|
+
db: Database;
|
|
111
|
+
documentId: string;
|
|
112
|
+
table: string;
|
|
113
|
+
}): void;
|
|
114
|
+
//# sourceMappingURL=history.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"history.d.ts","sourceRoot":"","sources":["../../../../src/store/sqlite/engine/history.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EACX,WAAW,EACX,gBAAgB,EAChB,eAAe,EACf,iBAAiB,EACjB,WAAW,EACX,MAAM,gBAAgB,CAAA;AACvB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AAEzD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAA;AAEvD;;;;;GAKG;AAEH;;;GAGG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE;IACnC,EAAE,EAAE,QAAQ,CAAA;IACZ,UAAU,EAAE,MAAM,CAAA;IAClB,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,MAAM,CAAA;CACf,GAAG,eAAe,CAqBlB;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE;IACrC,EAAE,EAAE,QAAQ,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,eAAe,CAAA;IACtB,IAAI,EAAE,WAAW,CAAA;IACjB,GAAG,EAAE,SAAS,MAAM,EAAE,CAAA;CACtB,GAAG,IAAI,CAUP;AAED,wFAAwF;AACxF,wBAAgB,eAAe,CAAC,MAAM,EAAE;IACvC,EAAE,EAAE,QAAQ,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,eAAe,CAAA;IACtB,IAAI,EAAE,WAAW,CAAA;IACjB,IAAI,EAAE,WAAW,CAAA;CACjB,GAAG,IAAI,CAQP;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,C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CAAA;CAAE,GAAG;IAChF,OAAO,EAAE,OAAO,CAAA;IAChB,OAAO,EAAE,OAAO,CAAA;CAChB,CAUA;AAED,8HAA8H;AAC9H,wBAAgB,aAAa,CAAC,MAAM,EAAE;IACrC,EAAE,EAAE,QAAQ,CAAA;IACZ,UAAU,EAAE,MAAM,CAAA;IAClB,KAAK,EAAE,MAAM,CAAA;CACb,GAAG,cAAc,EAAE,CAuCnB;AAED,uGAAuG;AACvG,wBAAgB,WAAW,CAAC,MAAM,EAAE;IAAE,EAAE,EAAE,QAAQ,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAM9E;AAED,sGAAsG;AACtG,wBAAgB,eAAe,CAAC,MAAM,EAAE;IAAE,EAAE,EAAE,QAAQ,CAAC;IAAC,UAAU,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAIjG"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ImportQueue } from './engine.types';
|
|
2
|
+
/**
|
|
3
|
+
* The imports of an engine: one runs at a time (an import changes the connection's pragmas), the
|
|
4
|
+
* others wait their turn in the order they came. Each is owned by the client that asked for it.
|
|
5
|
+
*/
|
|
6
|
+
export declare function createImportQueue(): ImportQueue;
|
|
7
|
+
//# sourceMappingURL=import-queue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"import-queue.d.ts","sourceRoot":"","sources":["../../../../src/store/sqlite/engine/import-queue.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAoB,MAAM,gBAAgB,CAAA;AAEnE;;;GAGG;AACH,wBAAgB,iBAAiB,IAAI,WAAW,CA0B/C"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ImportProgressRelay, ImportTargetParams } from './engine.types';
|
|
2
|
+
import { ImportControl, ImportTarget } from '../../store.types';
|
|
3
|
+
/**
|
|
4
|
+
* What one import writes through in the engine (`runImport`'s target). The document's table starts
|
|
5
|
+
* without indexes (an index kept up by every insert of a large file slows it a lot); the id index is
|
|
6
|
+
* built at the first update or delete, the remaining ones once the file is stored, before the
|
|
7
|
+
* document is ready - a document is never ready without them. Reads of a document while it imports
|
|
8
|
+
* scan its table; nothing reads a document that is not ready.
|
|
9
|
+
*
|
|
10
|
+
* Every member checks the import's abort before it touches the database, so an import resumed after
|
|
11
|
+
* the engine closed stops there. The registry row is read again before each write: a document
|
|
12
|
+
* removed meanwhile (its number possibly taken by another one) is never written to nor marked ready.
|
|
13
|
+
*/
|
|
14
|
+
export declare function createImportTarget(params: ImportTargetParams): ImportTarget;
|
|
15
|
+
/**
|
|
16
|
+
* The import's progress relayed to the caller's listener (never awaited, its failure reported once for the import):
|
|
17
|
+
* the parser's progress told on and kept, so a phase is told with the bytes read so far.
|
|
18
|
+
*/
|
|
19
|
+
export declare function createProgressRelay(params: {
|
|
20
|
+
file: File;
|
|
21
|
+
listener: ImportControl['onProgress'];
|
|
22
|
+
}): ImportProgressRelay;
|
|
23
|
+
//# sourceMappingURL=import-target.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"import-target.d.ts","sourceRoot":"","sources":["../../../../src/store/sqlite/engine/import-target.ts"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EACX,mBAAmB,EACnB,kBAAkB,EAIlB,MAAM,gBAAgB,CAAA;AACvB,OAAO,KAAK,EAAE,aAAa,EAAkB,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAItF;;;;;;;;;;GAUG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,kBAAkB,GAAG,YAAY,CA6E3E;AA+RD;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE;IAC3C,IAAI,EAAE,IAAI,CAAA;IACV,QAAQ,EAAE,aAAa,CAAC,YAAY,CAAC,CAAA;CACrC,GAAG,mBAAmB,CAYtB"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ImportWindow, ImportWindowParams } from './engine.types';
|
|
2
|
+
/**
|
|
3
|
+
* The window transactions of one import. Its writes go into a transaction that commits after about
|
|
4
|
+
* `windowMs` of work, with synchronous off (the rollback journal kept: a failed import rolls back
|
|
5
|
+
* what is open, then its document is dropped) and the import cache, raised at its first write and
|
|
6
|
+
* held until it ends (lowering it between two transactions would read the import's pages again).
|
|
7
|
+
* Commits are tallied as `import::commit`.
|
|
8
|
+
*
|
|
9
|
+
* A write of another connection settles the window first: what is open is committed and the
|
|
10
|
+
* connection is durable again (synchronous full), so that write lands at once, on its own, and stays
|
|
11
|
+
* whatever becomes of the import; the import opens its next window at its next write. A commit that
|
|
12
|
+
* fails there loses the window's records: the import is then refused at its next window
|
|
13
|
+
* (`STORE_COMMIT_FAILED`), never ready without them.
|
|
14
|
+
*/
|
|
15
|
+
export declare function createImportWindow(params: ImportWindowParams): ImportWindow;
|
|
16
|
+
/**
|
|
17
|
+
* End the window of an import that failed: the connection durable again; a failure of the rollback is
|
|
18
|
+
* dropped (not thrown, not attached), the import's own failure is the one to report.
|
|
19
|
+
*/
|
|
20
|
+
export declare function endQuietly(params: {
|
|
21
|
+
window: ImportWindow;
|
|
22
|
+
}): void;
|
|
23
|
+
//# sourceMappingURL=import-window.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"import-window.d.ts","sourceRoot":"","sources":["../../../../src/store/sqlite/engine/import-window.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,kBAAkB,EAAqB,MAAM,gBAAgB,CAAA;AAEzF;;;;;;;;;;;;GAYG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,kBAAkB,GAAG,YAAY,CA0E3E;AAyDD;;;GAGG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE;IAAE,MAAM,EAAE,YAAY,CAAA;CAAE,GAAG,IAAI,CAMjE"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ReclaimParams } from './engine.types';
|
|
2
|
+
/**
|
|
3
|
+
* Give the file's free pages back (incremental auto-vacuum) in whole statements of
|
|
4
|
+
* `pagesPerStatement` pages, letting the queued calls run after every `sliceMs` of them: a large
|
|
5
|
+
* removal never holds the engine for long. Each statement is a write of its own, made after the
|
|
6
|
+
* running import's window is settled - or, for a reclaim that gives way (`giveWayTo`), once that import
|
|
7
|
+
* has ended; the reclaim stops once the freelist is empty or the engine is closed (what is left is given
|
|
8
|
+
* back by the next removal or start).
|
|
9
|
+
*/
|
|
10
|
+
export declare function reclaimInSteps(params: ReclaimParams): Promise<void>;
|
|
11
|
+
/** How many pages of the file are free. */
|
|
12
|
+
export declare function freePagesOf(params: Pick<ReclaimParams, 'db'>): number;
|
|
13
|
+
//# sourceMappingURL=reclaim.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reclaim.d.ts","sourceRoot":"","sources":["../../../../src/store/sqlite/engine/reclaim.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAEnD;;;;;;;GAOG;AACH,wBAAsB,cAAc,CAAC,MAAM,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAkBzE;AAED,2CAA2C;AAC3C,wBAAgB,WAAW,CAAC,MAAM,EAAE,IAAI,CAAC,aAAa,EAAE,IAAI,CAAC,GAAG,MAAM,CAErE"}
|