@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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"creation-refusal.d.ts","sourceRoot":"","sources":["../../../src/store/engine/creation-refusal.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE;IAC3C,OAAO,EAAE,MAAM,CAAA;IACf,kBAAkB,EAAE,MAAM,GAAG,SAAS,CAAA;IACtC,UAAU,EAAE,MAAM,GAAG,SAAS,CAAA;CAC9B,GAAG,IAAI,CAOP"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* An engine asked for a project of another dialecte, or of another version of it - what a spawner's address
|
|
3
|
+
* pointing at another worker gives: refused `PROJECT_DIALECTE_MISMATCH` or `PROJECT_DIALECTE_VERSION_MISMATCH`,
|
|
4
|
+
* naming both. The engine refuses itself before it takes any lock or file; the realm refuses an engine that
|
|
5
|
+
* answers otherwise than it asked (ending it, as a failed open). A destroy names no version.
|
|
6
|
+
*/
|
|
7
|
+
export declare function refuseAnotherDialecte(params: {
|
|
8
|
+
project: string;
|
|
9
|
+
engine: {
|
|
10
|
+
dialecteId: string;
|
|
11
|
+
dialecteVersion: string;
|
|
12
|
+
};
|
|
13
|
+
asked: {
|
|
14
|
+
dialecteId: string;
|
|
15
|
+
dialecteVersion?: string;
|
|
16
|
+
};
|
|
17
|
+
}): void;
|
|
18
|
+
//# sourceMappingURL=dialecte-refusal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dialecte-refusal.d.ts","sourceRoot":"","sources":["../../../src/store/engine/dialecte-refusal.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE;IAC7C,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,EAAE;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,eAAe,EAAE,MAAM,CAAA;KAAE,CAAA;IACvD,KAAK,EAAE;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,eAAe,CAAC,EAAE,MAAM,CAAA;KAAE,CAAA;CACvD,GAAG,IAAI,CAmBP"}
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
import { ChangeLogEntry, ExportFileParams, ExportFileResult, ImportFileParams, ImportFileResult, Store, StoreNotice, WriteOutcome } from '../store.types';
|
|
2
|
+
import { EngineStoreParams } from './engine-store.types';
|
|
3
|
+
import { DocumentRecord, DocumentUpdates } from '../../project/types';
|
|
4
|
+
import { AnyRawRecord, BlobAttachment, BlobRecord, RecordPatch } from '../../types';
|
|
5
|
+
/**
|
|
6
|
+
* EngineStore - the store port over a project's engine (the SQLite one today), reached through a link: the engine
|
|
7
|
+
* holds the data and answers every connection of the project alike (one state per name). This
|
|
8
|
+
* adapter keeps what is per connection: `close()` refuses the operations started after it with
|
|
9
|
+
* `STORE_CLOSED` and releases the link once the running ones complete; `open()` connects again.
|
|
10
|
+
*/
|
|
11
|
+
export declare class EngineStore implements Store {
|
|
12
|
+
readonly name: string;
|
|
13
|
+
private readonly connector;
|
|
14
|
+
private link;
|
|
15
|
+
private connecting;
|
|
16
|
+
/** Set by `close()`, cleared by `open()`: a closed store refuses every operation started after it. */
|
|
17
|
+
private closed;
|
|
18
|
+
/** This store's own destroy while it runs: an operation started meanwhile connects once it has ended. */
|
|
19
|
+
private destroying;
|
|
20
|
+
/** How many times `close()` was called: an `open()` refuses when one came after it was called. */
|
|
21
|
+
private closings;
|
|
22
|
+
/** The last release of the link: what a `close()` waits for. */
|
|
23
|
+
private linkReleased;
|
|
24
|
+
/** The operations running: `close()` releases the link, `open()` and `destroy()` go on, once none is left. */
|
|
25
|
+
private readonly operations;
|
|
26
|
+
/** What `subscribe` was given: told every change of the project, through each link this store makes. */
|
|
27
|
+
private readonly listeners;
|
|
28
|
+
/** The current link's notices let go: called when the link is released, or nobody listens any more. */
|
|
29
|
+
private stopNotices;
|
|
30
|
+
/** The link whose notices this store hears now. */
|
|
31
|
+
private listenedLink;
|
|
32
|
+
/**
|
|
33
|
+
* The writes of this store refused `STORE_ENGINE_LOST`, by id: one that lands later is announced as another
|
|
34
|
+
* connection's, so whoever listens folds it in. Forgotten once told, once its outcome answers settled (`applied`,
|
|
35
|
+
* `not-applied`), at a resync (the engine gone tells nothing more) and once the link is released.
|
|
36
|
+
*/
|
|
37
|
+
private readonly lostWrites;
|
|
38
|
+
constructor(params: EngineStoreParams);
|
|
39
|
+
/** Connect to the project's engine (started when none runs: a file of another layout is refused there). */
|
|
40
|
+
open(): Promise<void>;
|
|
41
|
+
/**
|
|
42
|
+
* Refuse every operation started from now on until opened again; the link goes once the running ones
|
|
43
|
+
* end - a destroy of the name in the realm waits for them, as for its own - and the close is settled once
|
|
44
|
+
* the link is released: its engine's lock let go, or the hub told it left.
|
|
45
|
+
*/
|
|
46
|
+
close(): Promise<void>;
|
|
47
|
+
/**
|
|
48
|
+
* Delete the project, once the operations running complete - its own, and those of a store of the name
|
|
49
|
+
* closed with operations running - every store of the name then reads empty; refused
|
|
50
|
+
* `PROJECT_OPEN_ELSEWHERE` while another connection has it open.
|
|
51
|
+
*/
|
|
52
|
+
destroy(): Promise<void>;
|
|
53
|
+
private destroyOnceIdle;
|
|
54
|
+
/**
|
|
55
|
+
* Every change of the project, this store's own and its other connections', told once each (its own before the
|
|
56
|
+
* call that made it settles); a write of its own that was refused `STORE_ENGINE_LOST` and landed later is told
|
|
57
|
+
* as another's. `resync` once the store reached another engine. Kept across `close()` and `open()`.
|
|
58
|
+
*/
|
|
59
|
+
subscribe(listener: (notice: StoreNotice) => void): () => void;
|
|
60
|
+
/** The link's notices told to this store's listeners, once (a link listened to follows its next engine). */
|
|
61
|
+
private listenToLink;
|
|
62
|
+
private stopListeningToLink;
|
|
63
|
+
/** Nothing to bring in sync: the engine answers every connection from one state. */
|
|
64
|
+
reconcile(): Promise<void>;
|
|
65
|
+
/** A document is readable once registered, as on every store. */
|
|
66
|
+
isDocumentReadable(documentId: string): Promise<boolean>;
|
|
67
|
+
registerDocument(file: DocumentRecord): Promise<void>;
|
|
68
|
+
getDocument(documentId: string): Promise<DocumentRecord | undefined>;
|
|
69
|
+
getDocuments(): Promise<DocumentRecord[]>;
|
|
70
|
+
updateDocument(documentId: string, updates: DocumentUpdates): Promise<void>;
|
|
71
|
+
removeDocument(documentId: string): Promise<void>;
|
|
72
|
+
get(id: string, documentId: string): Promise<AnyRawRecord | undefined>;
|
|
73
|
+
getByDocumentId(documentId: string): Promise<AnyRawRecord[]>;
|
|
74
|
+
count(documentId: string): Promise<number>;
|
|
75
|
+
getByTagNameInDocument(tagName: string, documentId: string): Promise<AnyRawRecord[]>;
|
|
76
|
+
getMany(ids: string[], documentId: string): Promise<(AnyRawRecord | undefined)[]>;
|
|
77
|
+
/**
|
|
78
|
+
* The import runs in the engine; its progress listener stays here (the engine's ticks come back on
|
|
79
|
+
* the call's port, before its answer) and its abort crosses as a call of its own, by `writeId`: made only once the import was asked for, so the engine
|
|
80
|
+
* knows it (a signal already aborted is told at once), and the engine answers in every store's
|
|
81
|
+
* order (a store with no dialecte refuses first).
|
|
82
|
+
*/
|
|
83
|
+
importFile(params: ImportFileParams): Promise<ImportFileResult>;
|
|
84
|
+
/**
|
|
85
|
+
* The export runs in the engine; its progress listener stays here (the engine's ticks come back on
|
|
86
|
+
* the call's port, before its answer) and its abort crosses as a call of its own, by an id of this call. The engine may finish before that call reaches
|
|
87
|
+
* it: an export its caller aborted before the answer is `EXPORT_ABORTED` all the same (an export
|
|
88
|
+
* leaves nothing behind); an error the engine answered stays.
|
|
89
|
+
*/
|
|
90
|
+
exportFile(params: ExportFileParams): Promise<ExportFileResult>;
|
|
91
|
+
getWriteOutcome(params: {
|
|
92
|
+
writeId: string;
|
|
93
|
+
}): Promise<WriteOutcome>;
|
|
94
|
+
bulkWrite(documentId: string, ops: {
|
|
95
|
+
creates?: AnyRawRecord[];
|
|
96
|
+
updates?: RecordPatch[];
|
|
97
|
+
deletes?: string[];
|
|
98
|
+
}): Promise<void>;
|
|
99
|
+
/** The commit runs in the engine; its progress listener stays here, its ticks heard before the answer. */
|
|
100
|
+
commit(params: {
|
|
101
|
+
documentId: string;
|
|
102
|
+
writeId?: string;
|
|
103
|
+
creates: AnyRawRecord[];
|
|
104
|
+
updates: AnyRawRecord[];
|
|
105
|
+
deletes: string[];
|
|
106
|
+
onProgress: (current: number, total: number) => void;
|
|
107
|
+
}): Promise<void>;
|
|
108
|
+
undo(documentId: string): Promise<void>;
|
|
109
|
+
redo(documentId: string): Promise<void>;
|
|
110
|
+
getHistoryStatus(documentId: string): Promise<{
|
|
111
|
+
canUndo: boolean;
|
|
112
|
+
canRedo: boolean;
|
|
113
|
+
}>;
|
|
114
|
+
getChangeLog(documentId: string): Promise<ChangeLogEntry[]>;
|
|
115
|
+
/** No database object crosses the port: the engine owns it. */
|
|
116
|
+
getDatabaseInstance(): unknown;
|
|
117
|
+
addBlob(entry: BlobRecord, data: Blob): Promise<void>;
|
|
118
|
+
getBlob(blobId: string): Promise<{
|
|
119
|
+
entry: BlobRecord;
|
|
120
|
+
data: Blob;
|
|
121
|
+
} | undefined>;
|
|
122
|
+
getBlobsByDocument(documentId: string): Promise<BlobRecord[]>;
|
|
123
|
+
getBlobsByRecord(documentId: string, recordRef: string): Promise<BlobRecord[]>;
|
|
124
|
+
getStandaloneBlobs(): Promise<BlobRecord[]>;
|
|
125
|
+
attachBlob(blobId: string, ref: BlobAttachment): Promise<void>;
|
|
126
|
+
detachBlob(blobId: string, ref: {
|
|
127
|
+
documentId: string;
|
|
128
|
+
recordRef: string;
|
|
129
|
+
}): Promise<void>;
|
|
130
|
+
removeBlob(blobId: string): Promise<void>;
|
|
131
|
+
/**
|
|
132
|
+
* A call of the engine's `member` as one operation of the port; a read (the wire table says which,
|
|
133
|
+
* for the member this calls) whose engine ended with its host is made once more on the link's next
|
|
134
|
+
* engine. Its arguments are the member's own, forwarded as they are (not one params object).
|
|
135
|
+
*/
|
|
136
|
+
private call;
|
|
137
|
+
/**
|
|
138
|
+
* One operation of the port: refused once the store is closed; counted while it runs, so a
|
|
139
|
+
* `close()` meanwhile lets it complete and releases the link after it. `readRetried`: refused
|
|
140
|
+
* because its engine ended with its host, it is made once more, on the link's next engine. Never
|
|
141
|
+
* on `realm-dropped` (or `no-heartbeat`): a dropped view reaches no engine until its page binds it
|
|
142
|
+
* again, every call refused alike meanwhile, and a silent engine may still be running.
|
|
143
|
+
*/
|
|
144
|
+
private operation;
|
|
145
|
+
/**
|
|
146
|
+
* A change the engine announced, as this store tells it: its own when its link made it - but for a write of its own
|
|
147
|
+
* refused lost, told once as another's (its caller saw it fail), its id forgotten then.
|
|
148
|
+
*/
|
|
149
|
+
private changeOf;
|
|
150
|
+
/** A write refused `STORE_ENGINE_LOST` (its id on the refusal): its change, if it lands, is told as another's. */
|
|
151
|
+
private noteLostWrite;
|
|
152
|
+
/** Counted while it runs; the last one to end on a closed store releases the link. */
|
|
153
|
+
private tracked;
|
|
154
|
+
/** The engine through this store's link, connected on the first operation (once, however many run). */
|
|
155
|
+
private currentEngine;
|
|
156
|
+
/** A failed connection is forgotten: the next operation tries again. */
|
|
157
|
+
private connectOnce;
|
|
158
|
+
/** A link's notice told to every listener; one that throws stops no other. */
|
|
159
|
+
private tellListeners;
|
|
160
|
+
/** Called with no operation running, so no connection is under way; settled once the link counts no more. */
|
|
161
|
+
private releaseLink;
|
|
162
|
+
}
|
|
163
|
+
//# sourceMappingURL=engine-store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"engine-store.d.ts","sourceRoot":"","sources":["../../../src/store/engine/engine-store.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EACX,cAAc,EACd,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,KAAK,EAEL,WAAW,EACX,YAAY,EACZ,MAAM,gBAAgB,CAAA;AACvB,OAAO,KAAK,EAGX,iBAAiB,EAEjB,MAAM,sBAAsB,CAAA;AAI7B,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACtE,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAKpF;;;;;GAKG;AACH,qBAAa,WAAY,YAAW,KAAK;IACxC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAiB;IAC3C,OAAO,CAAC,IAAI,CAAwB;IACpC,OAAO,CAAC,UAAU,CAAiC;IACnD,sGAAsG;IACtG,OAAO,CAAC,MAAM,CAAQ;IACtB,yGAAyG;IACzG,OAAO,CAAC,UAAU,CAA2B;IAC7C,kGAAkG;IAClG,OAAO,CAAC,QAAQ,CAAI;IACpB,gEAAgE;IAChE,OAAO,CAAC,YAAY,CAAmC;IACvD,8GAA8G;IAC9G,OAAO,CAAC,QAAQ,CAAC,UAAU,CAA4B;IACvD,wGAAwG;IACxG,OAAO,CAAC,QAAQ,CAAC,SAAS,CAA2C;IACrE,uGAAuG;IACvG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AWzB,8EAA8E;IAC9E,OAAO,CAAC,aAAa;IAarB,6GAA6G;IAC7G,OAAO,CAAC,WAAW;CAUnB"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { EngineApi } from './engine.types';
|
|
2
|
+
import { EngineEventSignal } from './host/host.types';
|
|
3
|
+
/** What a link tells its store: a change the engine announced, or that changes may have been missed. */
|
|
4
|
+
export type LinkNotice = {
|
|
5
|
+
type: 'event';
|
|
6
|
+
signal: EngineEventSignal;
|
|
7
|
+
} | {
|
|
8
|
+
type: 'resync';
|
|
9
|
+
};
|
|
10
|
+
/** One connection of a store to its project's engine. */
|
|
11
|
+
export type EngineLink = {
|
|
12
|
+
/** The engine serving the project now: a later call may answer another one, started since. */
|
|
13
|
+
engine: () => Promise<EngineApi>;
|
|
14
|
+
/** The connection's id: the changes its calls make are announced tagged with it. */
|
|
15
|
+
connectionId: string;
|
|
16
|
+
/**
|
|
17
|
+
* `listener` told every change the engine announces, and `resync` once the connection reached another engine
|
|
18
|
+
* (a link with a listener follows the next engine of its project without waiting for a call). Answers the
|
|
19
|
+
* unsubscribe.
|
|
20
|
+
*/
|
|
21
|
+
onNotice: (listener: (notice: LinkNotice) => void) => () => void;
|
|
22
|
+
/**
|
|
23
|
+
* Release the connection; the engine closes once no connection is left. Settled once the connection counts
|
|
24
|
+
* no more for a destroy anywhere (its engine's lock let go, the hub told). Idempotent; the released
|
|
25
|
+
* connection reaches no engine after (`STORE_CLOSED`).
|
|
26
|
+
*/
|
|
27
|
+
close: () => Promise<void>;
|
|
28
|
+
};
|
|
29
|
+
/** What a connector's destroy is handed: the destroying store's own connection, when it has one. */
|
|
30
|
+
export type EngineDestroyParams = {
|
|
31
|
+
own?: OwnEngineLink;
|
|
32
|
+
};
|
|
33
|
+
/** The destroying store's own connection: `letGo` releases it, the store forgetting it, once the destroy goes ahead. */
|
|
34
|
+
export type OwnEngineLink = {
|
|
35
|
+
link: EngineLink;
|
|
36
|
+
letGo: () => Promise<void>;
|
|
37
|
+
};
|
|
38
|
+
/** How a store reaches its project's engine, and how the project is deleted. */
|
|
39
|
+
export type EngineConnector = {
|
|
40
|
+
connect: () => Promise<EngineLink>;
|
|
41
|
+
/**
|
|
42
|
+
* Delete the project's file, its engine closed first; the next connection starts on a new file. `own`,
|
|
43
|
+
* the destroying store's own connection, does not count against it, and is let go only once the destroy
|
|
44
|
+
* goes ahead: refused, it is kept as it was.
|
|
45
|
+
*/
|
|
46
|
+
destroy: (params?: EngineDestroyParams) => Promise<void>;
|
|
47
|
+
};
|
|
48
|
+
export type EngineStoreParams = {
|
|
49
|
+
/** The project's name. */
|
|
50
|
+
name: string;
|
|
51
|
+
connector: EngineConnector;
|
|
52
|
+
};
|
|
53
|
+
//# sourceMappingURL=engine-store.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"engine-store.types.d.ts","sourceRoot":"","sources":["../../../src/store/engine/engine-store.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC/C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AAE1D,wGAAwG;AACxG,MAAM,MAAM,UAAU,GAAG;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,iBAAiB,CAAA;CAAE,GAAG;IAAE,IAAI,EAAE,QAAQ,CAAA;CAAE,CAAA;AAE1F,yDAAyD;AACzD,MAAM,MAAM,UAAU,GAAG;IACxB,8FAA8F;IAC9F,MAAM,EAAE,MAAM,OAAO,CAAC,SAAS,CAAC,CAAA;IAChC,oFAAoF;IACpF,YAAY,EAAE,MAAM,CAAA;IACpB;;;;OAIG;IACH,QAAQ,EAAE,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,IAAI,KAAK,MAAM,IAAI,CAAA;IAChE;;;;OAIG;IACH,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;CAC1B,CAAA;AAED,oGAAoG;AACpG,MAAM,MAAM,mBAAmB,GAAG;IAAE,GAAG,CAAC,EAAE,aAAa,CAAA;CAAE,CAAA;AAEzD,wHAAwH;AACxH,MAAM,MAAM,aAAa,GAAG;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;CAAE,CAAA;AAE5E,gFAAgF;AAChF,MAAM,MAAM,eAAe,GAAG;IAC7B,OAAO,EAAE,MAAM,OAAO,CAAC,UAAU,CAAC,CAAA;IAClC;;;;OAIG;IACH,OAAO,EAAE,CAAC,MAAM,CAAC,EAAE,mBAAmB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;CACxD,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG;IAC/B,0BAA0B;IAC1B,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,EAAE,eAAe,CAAA;CAC1B,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/** The prefix of an engine's Web Lock (`engineLockNameOf`): one engine at a time holds a project's files. */
|
|
2
|
+
export declare const ENGINE_LOCK_PREFIX = "dialecte:engine:";
|
|
3
|
+
/** What the engine posts on a client port outside the calls' answers (no `id`: Comlink passes it by). */
|
|
4
|
+
export declare const ENGINE_SIGNAL: {
|
|
5
|
+
/** The engine works. */
|
|
6
|
+
readonly heartbeat: "heartbeat";
|
|
7
|
+
/** The engine runs dialecte code that may take long with nothing to tell: wait for its next message. */
|
|
8
|
+
readonly busy: "busy";
|
|
9
|
+
/** A tick of a call's progress, for the listener the client registered under its `progressId`. */
|
|
10
|
+
readonly progress: "progress";
|
|
11
|
+
/** A change of the project, posted on every client's port: who made it, and how (`EngineEventSignal`). */
|
|
12
|
+
readonly event: "event";
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=engine.constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"engine.constants.d.ts","sourceRoot":"","sources":["../../../src/store/engine/engine.constants.ts"],"names":[],"mappings":"AAAA,6GAA6G;AAC7G,eAAO,MAAM,kBAAkB,qBAAqB,CAAA;AAEpD,yGAAyG;AACzG,eAAO,MAAM,aAAa;IACzB,wBAAwB;;IAExB,wGAAwG;;IAExG,kGAAkG;;IAElG,0GAA0G;;CAEjG,CAAA"}
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import { ENGINE_SIGNAL } from './engine.constants';
|
|
2
|
+
import { ThrownData } from './wire/wire.types';
|
|
3
|
+
import { ExportControl, ExportFileOptions, ExportFileResult, ImportControl, ImportFileOptions, ImportFileResult, Store } from '../store.types';
|
|
4
|
+
import { AnyRawRecord } from '../../types';
|
|
5
|
+
/**
|
|
6
|
+
* How the engine takes its project's lock: wait for it within the open budget (a successor of an
|
|
7
|
+
* engine that ended, through the hub), or take it only if free (direct mode: a holder is another
|
|
8
|
+
* realm's engine).
|
|
9
|
+
*/
|
|
10
|
+
export type EngineLockMode = 'wait' | 'if-available';
|
|
11
|
+
/**
|
|
12
|
+
* What an engine is opened with: what every engine is told, and `settings`, what its kind of engine
|
|
13
|
+
* needs besides (the SQLite engine: the consumer's wasm file and its options), passed through as is.
|
|
14
|
+
*/
|
|
15
|
+
export type EngineOpenParams<GenericSettings = unknown> = {
|
|
16
|
+
project: string;
|
|
17
|
+
/**
|
|
18
|
+
* The dialecte and its version the realm expects the engine to run: an engine of another one refuses the
|
|
19
|
+
* open (`PROJECT_DIALECTE_MISMATCH`, `PROJECT_DIALECTE_VERSION_MISMATCH`) before it takes any lock or file.
|
|
20
|
+
*/
|
|
21
|
+
dialecteId: string;
|
|
22
|
+
dialecteVersion: string;
|
|
23
|
+
/**
|
|
24
|
+
* The creation id of the project the realm's view had open, when it comes back to it (a resume, an engine
|
|
25
|
+
* started again): none there, or another, is refused `PROJECT_DESTROYED_WHILE_AWAY`, nothing written.
|
|
26
|
+
*/
|
|
27
|
+
expectedCreationId?: string;
|
|
28
|
+
lock: EngineLockMode;
|
|
29
|
+
/**
|
|
30
|
+
* How long the engine may take to take its project: the lock, then its own checks of the files (SQLite
|
|
31
|
+
* probes its pool), from one deadline. The rest of the open (the database, the start's cleanup) is bounded
|
|
32
|
+
* by the realm's open window (`ENGINE_OPEN_WINDOW_MS`).
|
|
33
|
+
*/
|
|
34
|
+
budgetMs: number;
|
|
35
|
+
/** Measure the import's and the export's stages (`dev.perf`). */
|
|
36
|
+
perf: boolean;
|
|
37
|
+
/** How often the engine beats while it works (`ENGINE_HEARTBEAT_INTERVAL_MS` when absent). */
|
|
38
|
+
heartbeatIntervalMs?: number;
|
|
39
|
+
settings: GenericSettings;
|
|
40
|
+
};
|
|
41
|
+
/** A control message a realm sends its engine worker; each is answered once by its `requestId`. */
|
|
42
|
+
export type EngineControlRequest<GenericSettings = unknown> = ({
|
|
43
|
+
type: 'open';
|
|
44
|
+
requestId: number;
|
|
45
|
+
} & EngineOpenParams<GenericSettings>) | {
|
|
46
|
+
type: 'adopt-client';
|
|
47
|
+
requestId: number;
|
|
48
|
+
clientId: string;
|
|
49
|
+
port: MessagePort;
|
|
50
|
+
} | {
|
|
51
|
+
type: 'client-gone';
|
|
52
|
+
requestId: number;
|
|
53
|
+
clientId: string;
|
|
54
|
+
} | {
|
|
55
|
+
type: 'close';
|
|
56
|
+
requestId: number;
|
|
57
|
+
} | {
|
|
58
|
+
type: 'destroy';
|
|
59
|
+
requestId: number;
|
|
60
|
+
project: string;
|
|
61
|
+
/** The dialecte whose project it is: an engine of another one refuses (`PROJECT_DIALECTE_MISMATCH`), nothing removed. */
|
|
62
|
+
dialecteId: string;
|
|
63
|
+
/**
|
|
64
|
+
* Direct mode takes the lock only if free (a holder is another realm's engine); through the hub
|
|
65
|
+
* the destroy waits for it (the engine the hub just released may hold it a moment).
|
|
66
|
+
*/
|
|
67
|
+
lock: EngineLockMode;
|
|
68
|
+
budgetMs: number;
|
|
69
|
+
};
|
|
70
|
+
/** The engine worker's answer to a control message. */
|
|
71
|
+
export type EngineControlAnswer = {
|
|
72
|
+
type: 'opened';
|
|
73
|
+
requestId: number;
|
|
74
|
+
dialecteId: string;
|
|
75
|
+
dialecteVersion: string;
|
|
76
|
+
/** The id the project's file was created with (another one once the project is destroyed and made again). */
|
|
77
|
+
creationId: string;
|
|
78
|
+
/** The wire the engine speaks (`ENGINE_WIRE_PROTOCOL` of its copy of the library). */
|
|
79
|
+
wireProtocol: number;
|
|
80
|
+
/** Whether the engine took its files back in this worker (closed then opened again) rather than set them up. */
|
|
81
|
+
resumed: boolean;
|
|
82
|
+
} | {
|
|
83
|
+
type: 'adopted';
|
|
84
|
+
requestId: number;
|
|
85
|
+
} | {
|
|
86
|
+
type: 'released';
|
|
87
|
+
requestId: number;
|
|
88
|
+
} | {
|
|
89
|
+
type: 'closed';
|
|
90
|
+
requestId: number;
|
|
91
|
+
} | {
|
|
92
|
+
type: 'destroyed';
|
|
93
|
+
requestId: number;
|
|
94
|
+
} | {
|
|
95
|
+
type: 'failed';
|
|
96
|
+
requestId: number;
|
|
97
|
+
thrown: ThrownData;
|
|
98
|
+
};
|
|
99
|
+
/** A sign of the engine's life its worker posts to the realm running it, beside the control answers. */
|
|
100
|
+
export type EngineLifeSignal = {
|
|
101
|
+
type: (typeof ENGINE_SIGNAL)['heartbeat'] | (typeof ENGINE_SIGNAL)['busy'];
|
|
102
|
+
};
|
|
103
|
+
/** `Omit` applied to each member of a union. */
|
|
104
|
+
export type DistributiveOmit<GenericUnion, GenericKey extends PropertyKey> = GenericUnion extends unknown ? Omit<GenericUnion, GenericKey> : never;
|
|
105
|
+
/** The port members an engine serves, with the port's own signatures. */
|
|
106
|
+
export type EngineMember = 'registerDocument' | 'getDocument' | 'getDocuments' | 'updateDocument' | 'removeDocument' | 'get' | 'getByDocumentId' | 'count' | 'getByTagNameInDocument' | 'getMany' | 'bulkWrite' | 'getWriteOutcome' | 'undo' | 'redo' | 'getHistoryStatus' | 'getChangeLog';
|
|
107
|
+
/** A file to import, as a client hands it to the engine: plain data, the progress listener apart. */
|
|
108
|
+
export type EngineImportParams = {
|
|
109
|
+
file: File;
|
|
110
|
+
options?: ImportFileOptions;
|
|
111
|
+
/** The caller's id for this import, kept on the document's registry row. */
|
|
112
|
+
writeId: string;
|
|
113
|
+
};
|
|
114
|
+
/** An export as a client asks the engine for it: plain data, the progress listener apart. */
|
|
115
|
+
export type EngineExportParams = {
|
|
116
|
+
documentId: string;
|
|
117
|
+
options?: ExportFileOptions;
|
|
118
|
+
/** The caller's id for this export, by which it is aborted; one export of an id runs at a time. */
|
|
119
|
+
exportId: string;
|
|
120
|
+
};
|
|
121
|
+
/** A commit as a client hands it to the engine: plain data, the progress listener apart. */
|
|
122
|
+
export type EngineCommitParams = {
|
|
123
|
+
documentId: string;
|
|
124
|
+
/** The caller's id for this commit, kept on its history entry. */
|
|
125
|
+
writeId: string;
|
|
126
|
+
creates: AnyRawRecord[];
|
|
127
|
+
updates: AnyRawRecord[];
|
|
128
|
+
deletes: string[];
|
|
129
|
+
};
|
|
130
|
+
/** How far a commit is, as the port tells it: the operations written, out of all of them. */
|
|
131
|
+
export type CommitProgressListener = (current: number, total: number) => void;
|
|
132
|
+
/**
|
|
133
|
+
* The members whose answer says whether they changed anything (`false`: nothing to undo or redo, an unknown
|
|
134
|
+
* document or blob, an update or a bulk write changing nothing, a blob attached where it is or detached from a record
|
|
135
|
+
* it is not attached to): the engine announces no change then.
|
|
136
|
+
*/
|
|
137
|
+
export type EngineChangeMember = 'updateDocument' | 'removeDocument' | 'bulkWrite' | 'undo' | 'redo' | 'attachBlob' | 'detachBlob' | 'removeBlob';
|
|
138
|
+
/** Those members as the engine serves them: the port's arguments, an answer saying whether anything changed. */
|
|
139
|
+
export type EngineChangeMembers = {
|
|
140
|
+
[GenericMember in EngineChangeMember]: (...args: Parameters<Store[GenericMember]>) => Promise<boolean>;
|
|
141
|
+
};
|
|
142
|
+
/**
|
|
143
|
+
* The port members an engine serves alike to every client, with the port's signatures: registry,
|
|
144
|
+
* reads, bulk writes, write outcomes, history; and a commit, its progress listener an argument of its own.
|
|
145
|
+
*/
|
|
146
|
+
export type EngineMembers = Omit<Pick<Store, EngineMember> & EngineBlobMembers, EngineChangeMember> & EngineChangeMembers & {
|
|
147
|
+
commit: (params: EngineCommitParams, onProgress?: CommitProgressListener) => Promise<void>;
|
|
148
|
+
};
|
|
149
|
+
/** The blob members of the port an engine serves, with the port's signatures (a `Blob` crosses a port as it is). */
|
|
150
|
+
export type EngineBlobMember = 'addBlob' | 'getBlob' | 'getBlobsByDocument' | 'getBlobsByRecord' | 'getStandaloneBlobs' | 'attachBlob' | 'detachBlob' | 'removeBlob';
|
|
151
|
+
export type EngineBlobMembers = Pick<Store, EngineBlobMember>;
|
|
152
|
+
/** The store port as one client of an engine reaches it: an import's progress listener is an argument of its own. */
|
|
153
|
+
export type EngineApi = EngineMembers & {
|
|
154
|
+
importFile: (params: EngineImportParams, onProgress?: ImportControl['onProgress']) => Promise<ImportFileResult>;
|
|
155
|
+
/** Abort the import of that id: it is refused `IMPORT_ABORTED` and leaves nothing; an id no import runs is ignored. */
|
|
156
|
+
abortImport: (params: {
|
|
157
|
+
writeId: string;
|
|
158
|
+
}) => Promise<void>;
|
|
159
|
+
exportFile: (params: EngineExportParams, onProgress?: ExportControl['onProgress']) => Promise<ExportFileResult>;
|
|
160
|
+
/** Abort the export of that id: it is refused `EXPORT_ABORTED`; an id no export runs is ignored. */
|
|
161
|
+
abortExport: (params: {
|
|
162
|
+
exportId: string;
|
|
163
|
+
}) => Promise<void>;
|
|
164
|
+
};
|
|
165
|
+
//# sourceMappingURL=engine.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"engine.types.d.ts","sourceRoot":"","sources":["../../../src/store/engine/engine.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AACvD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,KAAK,EACX,aAAa,EACb,iBA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one client's port: one member, `call`, every call of the engine through it - a member outside
|
|
5
|
+
* the wire table refused, the values the client sent as stand-ins rebuilt, each progress tick posted on
|
|
6
|
+
* the same port without waiting (a dead port never holds the engine; one port, so every tick reaches
|
|
7
|
+
* the caller before the answer), a success announced to every client before the answer (tagged with the
|
|
8
|
+
* connection the call names, else this port's client), the answer an envelope: what the engine answered,
|
|
9
|
+
* or what it threw as data.
|
|
10
|
+
*/
|
|
11
|
+
export declare function serveClient(params: {
|
|
12
|
+
port: MessagePort;
|
|
13
|
+
clientId: string;
|
|
14
|
+
view: EngineApi;
|
|
15
|
+
events: StoreEvents;
|
|
16
|
+
/** The engine's sign of life on its ports: told busy around an answer it cannot beat inside. */
|
|
17
|
+
heartbeat: Heartbeat;
|
|
18
|
+
}): ServedClient;
|
|
19
|
+
//# sourceMappingURL=engine-wire.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"engine-wire.d.ts","sourceRoot":"","sources":["../../../../src/store/engine/host/engine-wire.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAEhD,OAAO,KAAK,EAAE,SAAS,EAAkB,YAAY,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAExF;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE;IACnC,IAAI,EAAE,WAAW,CAAA;IACjB,QAAQ,EAAE,MAAM,CAAA;IAChB,IAAI,EAAE,SAAS,CAAA;IACf,MAAM,EAAE,WAAW,CAAA;IACnB,gGAAgG;IAChG,SAAS,EAAE,SAAS,CAAA;CACpB,GAAG,YAAY,CA+Bf"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Heartbeat } from './host.types';
|
|
2
|
+
import { AnyDialecteConfig, DialecteHooks } from '../../../types';
|
|
3
|
+
/**
|
|
4
|
+
* The engine's sign of life, posted on every client port it serves (a call may still sit in the
|
|
5
|
+
* worker's queue behind the work, unknown to the engine) and to `tellControl`, the realm that runs it
|
|
6
|
+
* (which waits on it for a new client's adoption): a beat at most every `intervalMs` while it works, a
|
|
7
|
+
* `busy` before dialecte code that may run long with nothing to tell. Posted from the work itself, never
|
|
8
|
+
* from a timer: a busy engine is never taken for a lost one.
|
|
9
|
+
*/
|
|
10
|
+
export declare function createHeartbeat(params: {
|
|
11
|
+
intervalMs: number;
|
|
12
|
+
tellControl?: (message: {
|
|
13
|
+
type: string;
|
|
14
|
+
}) => void;
|
|
15
|
+
}): Heartbeat;
|
|
16
|
+
/**
|
|
17
|
+
* Work the engine cannot beat inside (one long opcode, a large answer cloned): every client is told the
|
|
18
|
+
* engine is busy before it, beaten once it is done.
|
|
19
|
+
*/
|
|
20
|
+
export declare function runToldBusy<GenericResult>(params: {
|
|
21
|
+
heartbeat: Heartbeat;
|
|
22
|
+
work: () => GenericResult;
|
|
23
|
+
}): GenericResult;
|
|
24
|
+
/**
|
|
25
|
+
* The dialecte's hooks with their opaque phases told: before the file-wide `beforeImport` and an
|
|
26
|
+
* import session's `afterImport` - dialecte code that may run for seconds with no statement - every
|
|
27
|
+
* client is told the engine is busy, then beaten once it is done.
|
|
28
|
+
*/
|
|
29
|
+
export declare function withOpaquePhases(params: {
|
|
30
|
+
hooks: DialecteHooks<AnyDialecteConfig> | undefined;
|
|
31
|
+
heartbeat: Heartbeat;
|
|
32
|
+
}): DialecteHooks<AnyDialecteConfig> | undefined;
|
|
33
|
+
//# sourceMappingURL=heartbeat.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"heartbeat.d.ts","sourceRoot":"","sources":["../../../../src/store/engine/host/heartbeat.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAC7C,OAAO,KAAK,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAE/D;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE;IACvC,UAAU,EAAE,MAAM,CAAA;IAClB,WAAW,CAAC,EAAE,CAAC,OAAO,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAA;CACjD,GAAG,SAAS,CAyCZ;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,aAAa,EAAE,MAAM,EAAE;IAClD,SAAS,EAAE,SAAS,CAAA;IACpB,IAAI,EAAE,MAAM,aAAa,CAAA;CACzB,GAAG,aAAa,CAQhB;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE;IACxC,KAAK,EAAE,aAAa,CAAC,iBAAiB,CAAC,GAAG,SAAS,CAAA;IACnD,SAAS,EAAE,SAAS,CAAA;CACpB,GAAG,aAAa,CAAC,iBAAiB,CAAC,GAAG,SAAS,CAmC/C"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/** The engine beats at most this often while it works. */
|
|
2
|
+
export declare const ENGINE_HEARTBEAT_INTERVAL_MS = 1000;
|
|
3
|
+
/**
|
|
4
|
+
* How long a closing engine lets its clients' calls answer before it closes their ports (under the
|
|
5
|
+
* realm's own close budget).
|
|
6
|
+
*/
|
|
7
|
+
export declare const CLIENT_DRAIN_BUDGET_MS = 1000;
|
|
8
|
+
/**
|
|
9
|
+
* An answer holding at least this many records is cloned onto the port in one step the engine cannot
|
|
10
|
+
* beat inside (a whole large document read): its client is told the engine is busy around it.
|
|
11
|
+
*/
|
|
12
|
+
export declare const LARGE_ANSWER_RECORDS = 10000;
|
|
13
|
+
//# sourceMappingURL=host.constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"host.constants.d.ts","sourceRoot":"","sources":["../../../../src/store/engine/host/host.constants.ts"],"names":[],"mappings":"AAAA,0DAA0D;AAC1D,eAAO,MAAM,4BAA4B,OAAQ,CAAA;AAEjD;;;GAGG;AACH,eAAO,MAAM,sBAAsB,OAAQ,CAAA;AAE3C;;;GAGG;AACH,eAAO,MAAM,oBAAoB,QAAS,CAAA"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { DistributiveOmit, EngineApi } from '../engine.types';
|
|
2
|
+
import { StoreRuntime } from '../../../project/io/store-runtime.types';
|
|
3
|
+
import { ProjectChannelMessage } from '../../../project/types';
|
|
4
|
+
/** The dialecte an engine serves, as the engine needs it: its identity and how to make its runtime. */
|
|
5
|
+
export type EngineDialecte = {
|
|
6
|
+
id: string;
|
|
7
|
+
version: string;
|
|
8
|
+
/** The configs and a fresh set of the dialecte's hooks, measured when `perf`. */
|
|
9
|
+
createRuntime: (params: {
|
|
10
|
+
perf: boolean;
|
|
11
|
+
}) => StoreRuntime;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* A change of the project as the engine posts it on every client's port: the project event, the connection whose
|
|
15
|
+
* call made it, and that call's write id (a commit's, an import's) - a write its caller saw lost is its own no more.
|
|
16
|
+
*/
|
|
17
|
+
export type EngineEventSignal = {
|
|
18
|
+
type: 'event';
|
|
19
|
+
message: ProjectChannelMessage;
|
|
20
|
+
connectionId: string;
|
|
21
|
+
writeId?: string;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* How each member's success is told (its timestamp added when posted): nothing for a member left out, nor when its
|
|
25
|
+
* answer says it changed nothing (`false`).
|
|
26
|
+
*/
|
|
27
|
+
export type StoreEventOf = Partial<Record<keyof EngineApi, (params: {
|
|
28
|
+
args: unknown[];
|
|
29
|
+
value: unknown;
|
|
30
|
+
}) => DistributiveOmit<ProjectChannelMessage, 'timestamp'> | undefined>>;
|
|
31
|
+
/** A member's success as the engine tells it: the call, and the connection it was made for. */
|
|
32
|
+
export type AnnouncedCall = {
|
|
33
|
+
member: keyof EngineApi;
|
|
34
|
+
args: unknown[];
|
|
35
|
+
value: unknown;
|
|
36
|
+
connectionId: string;
|
|
37
|
+
};
|
|
38
|
+
/** How the engine tells its clients each change. */
|
|
39
|
+
export type StoreEvents = {
|
|
40
|
+
announce: (params: AnnouncedCall) => void;
|
|
41
|
+
close: () => void;
|
|
42
|
+
};
|
|
43
|
+
/** The engine's sign of life on the ports it serves. */
|
|
44
|
+
export type Heartbeat = {
|
|
45
|
+
add: (port: MessagePort) => void;
|
|
46
|
+
remove: (port: MessagePort) => void;
|
|
47
|
+
/** A beat, unless one was posted less than the interval ago. */
|
|
48
|
+
beat: () => void;
|
|
49
|
+
/** Opaque dialecte code begins: clients wait for the engine's next message, however long. */
|
|
50
|
+
busy: () => void;
|
|
51
|
+
/** That opaque code ended: a beat now (a `busy` again while another opaque phase still runs). */
|
|
52
|
+
idle: () => void;
|
|
53
|
+
};
|
|
54
|
+
/** A client port the engine serves, and when every call it was asked has been answered. */
|
|
55
|
+
export type ServedClient = {
|
|
56
|
+
port: MessagePort;
|
|
57
|
+
drained: () => Promise<void>;
|
|
58
|
+
};
|
|
59
|
+
/** A tick of a call's progress, posted on the client's port under the call's progress id. */
|
|
60
|
+
export type ProgressSignal = {
|
|
61
|
+
type: 'progress';
|
|
62
|
+
progressId: number;
|
|
63
|
+
progress: unknown[];
|
|
64
|
+
};
|
|
65
|
+
//# sourceMappingURL=host.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"host.types.d.ts","sourceRoot":"","sources":["../../../../src/store/engine/host/host.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAClE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAA;AACpE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAA;AAE5D,uGAAuG;AACvG,MAAM,MAAM,cAAc,GAAG;IAC5B,EAAE,EAAE,MAAM,CAAA;IACV,OAAO,EAAE,MAAM,CAAA;IACf,iFAAiF;IACjF,aAAa,EAAE,CAAC,MAAM,EAAE;QAAE,IAAI,EAAE,OAAO,CAAA;KAAE,KAAK,YAAY,CAAA;CAC1D,CAAA;AAED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,CAAA;AAED,6FAA6F;AAC7F,MAAM,MAAM,cAAc,GAAG;IAC5B,IAAI,EAAE,UAAU,CAAA;IAChB,UAAU,EAAE,MAAM,CAAA;IAClB,QAAQ,EAAE,OAAO,EAAE,CAAA;CACnB,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { AnnouncedCall, EngineEventSignal, StoreEvents } from './host.types';
|
|
2
|
+
/**
|
|
3
|
+
* The change a member's success makes, as every client of the engine is told it: the project event (its timestamp
|
|
4
|
+
* now), the connection the call was made for, and the call's write id; none when it changed nothing.
|
|
5
|
+
*/
|
|
6
|
+
export declare function storeEventOf(params: AnnouncedCall): EngineEventSignal | undefined;
|
|
7
|
+
/**
|
|
8
|
+
* The engine's announcer: each change posted on every client port it serves now (`ports`), the caller's
|
|
9
|
+
* included - on the caller's port before its call's answer. A port that cannot take it (closed) is skipped.
|
|
10
|
+
*/
|
|
11
|
+
export declare function createStoreEvents(params: {
|
|
12
|
+
ports: () => Iterable<MessagePort>;
|
|
13
|
+
}): StoreEvents;
|
|
14
|
+
//# sourceMappingURL=store-events.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"store-events.d.ts","sourceRoot":"","sources":["../../../../src/store/engine/host/store-events.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,iBAAiB,EAAgB,WAAW,EAAE,MAAM,cAAc,CAAA;AAkE/F;;;GAGG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,aAAa,GAAG,iBAAiB,GAAG,SAAS,CAWjF;AAUD;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE;IAAE,KAAK,EAAE,MAAM,QAAQ,CAAC,WAAW,CAAC,CAAA;CAAE,GAAG,WAAW,CAoB7F"}
|