@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
|
Binary file
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { AnyRawRecord, RecordPatch } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* A record with a bulk-write patch applied, the record given left unchanged: each field the patch
|
|
4
|
+
* gives replaces the record's (a field given as `undefined` is not given); attributes merge by name
|
|
5
|
+
* (a held one replaced in place, a new one appended), then `removeAttributes` drops the names
|
|
6
|
+
* listed; children merge by id the same way. A field the record type does not have is dropped, as a
|
|
7
|
+
* store keeps it. Every store applies a patch through this.
|
|
8
|
+
*/
|
|
9
|
+
export declare function applyRecordPatch(params: {
|
|
10
|
+
record: AnyRawRecord;
|
|
11
|
+
patch: RecordPatch;
|
|
12
|
+
}): AnyRawRecord;
|
|
13
|
+
//# sourceMappingURL=apply-record-patch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apply-record-patch.d.ts","sourceRoot":"","sources":["../../src/store/apply-record-patch.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAExD;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE;IACxC,MAAM,EAAE,YAAY,CAAA;IACpB,KAAK,EAAE,WAAW,CAAA;CAClB,GAAG,YAAY,CAsBf"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ClosingConnections } from './closing-connections.types';
|
|
2
|
+
/**
|
|
3
|
+
* The connections of each name closed while operations of theirs still run, in this realm: a closed
|
|
4
|
+
* connection counts open no more, and a destroy of the name lets its running operations complete first.
|
|
5
|
+
*/
|
|
6
|
+
export declare function createClosingConnections(): ClosingConnections;
|
|
7
|
+
//# sourceMappingURL=closing-connections.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"closing-connections.d.ts","sourceRoot":"","sources":["../../src/store/closing-connections.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAA;AAErE;;;GAGG;AACH,wBAAgB,wBAAwB,IAAI,kBAAkB,CAoB7D"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/** The connections of each project name closed while operations of theirs still run, in this realm. */
|
|
2
|
+
export type ClosingConnections = {
|
|
3
|
+
/** A connection of the name closed: its running operations settle with `until`. */
|
|
4
|
+
markClosing: (params: {
|
|
5
|
+
name: string;
|
|
6
|
+
until: Promise<unknown>;
|
|
7
|
+
}) => void;
|
|
8
|
+
/** Settles once no connection of the name closed with operations running has any left. */
|
|
9
|
+
settled: (params: {
|
|
10
|
+
name: string;
|
|
11
|
+
}) => Promise<void>;
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=closing-connections.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"closing-connections.types.d.ts","sourceRoot":"","sources":["../../src/store/closing-connections.types.ts"],"names":[],"mappings":"AAAA,uGAAuG;AACvG,MAAM,MAAM,kBAAkB,GAAG;IAChC,mFAAmF;IACnF,WAAW,EAAE,CAAC,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,OAAO,CAAC,OAAO,CAAC,CAAA;KAAE,KAAK,IAAI,CAAA;IACxE,0FAA0F;IAC1F,OAAO,EAAE,CAAC,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;CACpD,CAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A commit's progress as every store tells it, once its records are written: after its creates, its
|
|
3
|
+
* updates and its deletes, each time out of all of them. The listener is never awaited; its failure
|
|
4
|
+
* is reported on the console, once for the commit, the commit stands whole.
|
|
5
|
+
*/
|
|
6
|
+
export declare function tellCommitProgress(params: {
|
|
7
|
+
onProgress: ((current: number, total: number) => unknown) | undefined;
|
|
8
|
+
parts: readonly number[];
|
|
9
|
+
}): void;
|
|
10
|
+
//# sourceMappingURL=commit-progress.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commit-progress.d.ts","sourceRoot":"","sources":["../../src/store/commit-progress.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE;IAC1C,UAAU,EAAE,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,GAAG,SAAS,CAAA;IACrE,KAAK,EAAE,SAAS,MAAM,EAAE,CAAA;CACxB,GAAG,IAAI,CAiBP"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Id order, as an IndexedDB key range answers: strings compared by UTF-16 code unit, not by locale.
|
|
3
|
+
* Every list read of a store answers in this order.
|
|
4
|
+
*/
|
|
5
|
+
export declare function compareById(left: {
|
|
6
|
+
id: string;
|
|
7
|
+
}, right: {
|
|
8
|
+
id: string;
|
|
9
|
+
}): number;
|
|
10
|
+
//# sourceMappingURL=compare-by-id.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compare-by-id.d.ts","sourceRoot":"","sources":["../../src/store/compare-by-id.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,EAAE,KAAK,EAAE;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,CAG/E"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/** What a document's path puts between its folders and its file name. */
|
|
2
|
+
export declare const DOCUMENT_PATH_SEPARATOR = "/";
|
|
3
|
+
/** The longest folder or file name of a path, in UTF-8 bytes: what APFS, ext4 and NTFS take. */
|
|
4
|
+
export declare const DOCUMENT_PATH_SEGMENT_MAX_BYTES = 255;
|
|
5
|
+
/** The longest path, in UTF-8 bytes: macOS's `PATH_MAX`, the tightest of the desktop systems an archive is extracted on. */
|
|
6
|
+
export declare const DOCUMENT_PATH_MAX_BYTES = 1024;
|
|
7
|
+
/**
|
|
8
|
+
* The characters a path never holds, all invisible or breaking a line in a tree: controls (Cc: U+0000-U+001F,
|
|
9
|
+
* U+007F-U+009F), formats (Cf: bidi overrides and isolates, zero-width characters, the byte order mark) and line or
|
|
10
|
+
* paragraph separators (Zl, Zp). A right-to-left override would show `north\u202Edcs.xml` as `northlmx.scd`.
|
|
11
|
+
*/
|
|
12
|
+
export declare const DOCUMENT_PATH_INVISIBLE_CHARACTER: RegExp;
|
|
13
|
+
/**
|
|
14
|
+
* The fields of a document's registry entry an update may change; any other key handed is ignored. Not its `status`:
|
|
15
|
+
* only its import marks a document ready (`ImportTarget.markReady`).
|
|
16
|
+
*/
|
|
17
|
+
export declare const DOCUMENT_UPDATE_FIELDS: readonly ["name", "path", "metadata"];
|
|
18
|
+
/** The extension every dialecte reads, besides the ones its config lists: a dialecte's own extension is still XML. */
|
|
19
|
+
export declare const ALWAYS_READ_EXTENSION = ".xml";
|
|
20
|
+
//# sourceMappingURL=document-path.constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"document-path.constants.d.ts","sourceRoot":"","sources":["../../src/store/document-path.constants.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,eAAO,MAAM,uBAAuB,MAAM,CAAA;AAE1C,gGAAgG;AAChG,eAAO,MAAM,+BAA+B,MAAM,CAAA;AAElD,4HAA4H;AAC5H,eAAO,MAAM,uBAAuB,OAAO,CAAA;AAE3C;;;;GAIG;AACH,eAAO,MAAM,iCAAiC,QAAgC,CAAA;AAE9E;;;GAGG;AACH,eAAO,MAAM,sBAAsB,uCAAwC,CAAA;AAE3E,sHAAsH;AACtH,eAAO,MAAM,qBAAqB,SAAS,CAAA"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { DocumentPathParts, PathHolderCandidate } from './document-path.types';
|
|
2
|
+
import { DocumentRecord, DocumentUpdates } from '../project/types';
|
|
3
|
+
/**
|
|
4
|
+
* A document's path read apart into its folders and its file name. A path is relative and written one way only:
|
|
5
|
+
* segments joined by `/`, none empty, none `.` or `..`, no backslash, no invisible format, separator or control
|
|
6
|
+
* character, well-formed and in Unicode NFC, each segment at most 255 UTF-8 bytes and the whole at most 1024.
|
|
7
|
+
* Nothing is rewritten: a path breaking a rule is refused with `DOCUMENT_PATH_INVALID`, `detail` naming the rule,
|
|
8
|
+
* `meta.path` the path as given.
|
|
9
|
+
*
|
|
10
|
+
* @intent validate a document path, split a document path into folders and file name
|
|
11
|
+
*/
|
|
12
|
+
export declare function parseDocumentPath(params: {
|
|
13
|
+
path: string;
|
|
14
|
+
}): DocumentPathParts;
|
|
15
|
+
/**
|
|
16
|
+
* The extensions a document's config reads: the ones it lists, in their order, then `ALWAYS_READ_EXTENSION` (`.xml`)
|
|
17
|
+
* unless one of them is exactly it (a listed `.XML` matches no lower-cased file name, so `.xml` is still added). The
|
|
18
|
+
* first one is the extension core gives a document nothing names one for: the first listed, `.xml` for an empty list.
|
|
19
|
+
*/
|
|
20
|
+
export declare function readableExtensionsOf(params: {
|
|
21
|
+
extensions: readonly string[];
|
|
22
|
+
}): readonly string[];
|
|
23
|
+
/**
|
|
24
|
+
* The name and the extension of a path's file name, split at its last dot: for a document that has no extension
|
|
25
|
+
* yet (an import, a new document). A path breaking a rule, a file name without a name and an extension by that rule
|
|
26
|
+
* (`README`, `north.`, `.scd`), or - when `extensions` are given - one whose extension is not among them (compared as a
|
|
27
|
+
* file's name is: lower-cased), is refused with `DOCUMENT_PATH_INVALID`.
|
|
28
|
+
*/
|
|
29
|
+
export declare function splitFileName(params: {
|
|
30
|
+
path: string;
|
|
31
|
+
extensions?: readonly string[];
|
|
32
|
+
}): Pick<DocumentRecord, 'name' | 'extension'>;
|
|
33
|
+
/**
|
|
34
|
+
* Check the path a document is registered with: a valid path ending with the document's file name, its `name` then
|
|
35
|
+
* its own `extension` (`name` non-empty); none passes. Refused with `DOCUMENT_PATH_INVALID`.
|
|
36
|
+
*/
|
|
37
|
+
export declare function assertDocumentPath(params: {
|
|
38
|
+
document: Pick<DocumentRecord, 'name' | 'extension' | 'path'>;
|
|
39
|
+
}): void;
|
|
40
|
+
/**
|
|
41
|
+
* A document with the updates applied, its file name and its path kept one fact: a `path` moves and renames it (its
|
|
42
|
+
* `name` follows the file name, which must end with the document's own `extension`); a `name` on a document with a
|
|
43
|
+
* path rewrites the file name in it, the folders kept; both given must agree; a field given as `undefined` is left
|
|
44
|
+
* as it was, a key beyond `DOCUMENT_UPDATE_FIELDS` ignored. Refused with `DOCUMENT_PATH_INVALID` when the result breaks a rule; the document given is left as it
|
|
45
|
+
* was. Whether the place is free is the store's to check (`assertDocumentPlace`).
|
|
46
|
+
*
|
|
47
|
+
* @intent rename or move a document by its path, apply document updates in a custom store
|
|
48
|
+
*/
|
|
49
|
+
export declare function applyDocumentUpdates(params: {
|
|
50
|
+
document: DocumentRecord;
|
|
51
|
+
updates: DocumentUpdates;
|
|
52
|
+
}): DocumentRecord;
|
|
53
|
+
/**
|
|
54
|
+
* Check a document to register against the registered ones: its path valid and ending with its file name
|
|
55
|
+
* (`DOCUMENT_PATH_INVALID`), then its place free (`DOCUMENT_PATH_TAKEN`). A document without a path passes.
|
|
56
|
+
*
|
|
57
|
+
* @intent check a document path is valid and free before registering it, register documents in a custom store
|
|
58
|
+
*/
|
|
59
|
+
export declare function assertDocumentPlace(params: {
|
|
60
|
+
document: Pick<DocumentRecord, 'id' | 'name' | 'extension' | 'path'>;
|
|
61
|
+
documents: PathHolderCandidate[];
|
|
62
|
+
}): void;
|
|
63
|
+
/**
|
|
64
|
+
* The document whose path clashes with `path`, the document `documentId` excepted: one at that very place, or one
|
|
65
|
+
* whose path is a folder of the other's - a file system holds no file and folder of one name. Paths compare exactly;
|
|
66
|
+
* a document without a path holds no place. None when the place is free.
|
|
67
|
+
*
|
|
68
|
+
* @intent find which document holds a path, check whether a file or folder path is free
|
|
69
|
+
*/
|
|
70
|
+
export declare function pathHolderOf(params: {
|
|
71
|
+
path: string;
|
|
72
|
+
documents: PathHolderCandidate[];
|
|
73
|
+
documentId?: string;
|
|
74
|
+
}): string | undefined;
|
|
75
|
+
//# sourceMappingURL=document-path.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"document-path.d.ts","sourceRoot":"","sources":["../../src/store/document-path.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AACnF,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAEtE;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG,iBAAiB,CAO7E;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE;IAAE,UAAU,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,GAAG,SAAS,MAAM,EAAE,CAIjG;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE;IACrC,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;CAC9B,GAAG,IAAI,CAAC,cAAc,EAAE,MAAM,GAAG,WAAW,CAAC,CAc7C;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE;IAC1C,QAAQ,EAAE,IAAI,CAAC,cAAc,EAAE,MAAM,GAAG,WAAW,GAAG,MAAM,CAAC,CAAA;CAC7D,GAAG,IAAI,CAgBP;AAED;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE;IAC5C,QAAQ,EAAE,cAAc,CAAA;IACxB,OAAO,EAAE,eAAe,CAAA;CACxB,GAAG,cAAc,CA8BjB;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE;IAC3C,QAAQ,EAAE,IAAI,CAAC,cAAc,EAAE,IAAI,GAAG,MAAM,GAAG,WAAW,GAAG,MAAM,CAAC,CAAA;IACpE,SAAS,EAAE,mBAAmB,EAAE,CAAA;CAChC,GAAG,IAAI,CAOP;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE;IACpC,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,EAAE,mBAAmB,EAAE,CAAA;IAChC,UAAU,CAAC,EAAE,MAAM,CAAA;CACnB,GAAG,MAAM,GAAG,SAAS,CASrB"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/** A document's path read apart: the folders it sits in, outermost first, then its file name. */
|
|
2
|
+
export type DocumentPathParts = {
|
|
3
|
+
folders: string[];
|
|
4
|
+
fileName: string;
|
|
5
|
+
};
|
|
6
|
+
/** A registered document as the clash check reads it: its id and, when it has one, its path. */
|
|
7
|
+
export type PathHolderCandidate = {
|
|
8
|
+
id: string;
|
|
9
|
+
path?: string;
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=document-path.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"document-path.types.d.ts","sourceRoot":"","sources":["../../src/store/document-path.types.ts"],"names":[],"mappings":"AAAA,iGAAiG;AACjG,MAAM,MAAM,iBAAiB,GAAG;IAC/B,OAAO,EAAE,MAAM,EAAE,CAAA;IACjB,QAAQ,EAAE,MAAM,CAAA;CAChB,CAAA;AAED,gGAAgG;AAChG,MAAM,MAAM,mBAAmB,GAAG;IACjC,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,CAAC,EAAE,MAAM,CAAA;CACb,CAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* An engine of another library version speaks another wire: refused `STORE_PROTOCOL_MISMATCH`, naming
|
|
3
|
+
* both versions (its caller ends it, as a failed open).
|
|
4
|
+
*/
|
|
5
|
+
export declare function refuseAnotherWire(params: {
|
|
6
|
+
found: number;
|
|
7
|
+
}): void;
|
|
8
|
+
//# sourceMappingURL=check-engine-wire.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"check-engine-wire.d.ts","sourceRoot":"","sources":["../../../../src/store/engine/client/check-engine-wire.ts"],"names":[],"mappings":"AAIA;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAOjE"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { EngineLostReason } from './client.types';
|
|
2
|
+
/** One engine's attempt to open its project (the engine lock, then its own setup: SQLite probes and installs its pool). */
|
|
3
|
+
export declare const ENGINE_OPEN_BUDGET_MS = 10000;
|
|
4
|
+
/**
|
|
5
|
+
* The longest a realm waits for its engine's answer to an open, the hub's client as a realm running the
|
|
6
|
+
* engine itself: a slow worker start (seconds under load), the engine's own budget for its lock and its
|
|
7
|
+
* pool, then its database opened and the imports a dead view left removed. An engine silent past it is
|
|
8
|
+
* ended, the open refused `PROJECT_ENGINE_UNAVAILABLE`.
|
|
9
|
+
*/
|
|
10
|
+
export declare const ENGINE_OPEN_WINDOW_MS = 30000;
|
|
11
|
+
/** How long a realm waits for its engine to close before it ends the worker anyway. */
|
|
12
|
+
export declare const ENGINE_CLOSE_BUDGET_MS = 2000;
|
|
13
|
+
/**
|
|
14
|
+
* How long an engine a listening connection followed (no call of its own) must run before its end is followed too;
|
|
15
|
+
* doubled at each such follow up to `ENGINE_FOLLOW_REARM_MAX_MS`, back to this at a call of its own: an engine that
|
|
16
|
+
* does not last is not started again and again for a listener.
|
|
17
|
+
*/
|
|
18
|
+
export declare const ENGINE_FOLLOW_REARM_FIRST_MS = 1000;
|
|
19
|
+
export declare const ENGINE_FOLLOW_REARM_MAX_MS = 30000;
|
|
20
|
+
/**
|
|
21
|
+
* A client takes its engine for lost after this long with no message while a call waits: the engine
|
|
22
|
+
* beats every second while it works (inside its longest steps too), and says `busy` before dialecte
|
|
23
|
+
* code that may run longer.
|
|
24
|
+
*/
|
|
25
|
+
export declare const ENGINE_HEARTBEAT_TIMEOUT_MS = 10000;
|
|
26
|
+
/** What the work asked of an engine the realm ends answers once its budget passed with no answer: the engine is deaf. */
|
|
27
|
+
export declare const UNANSWERED = "unanswered";
|
|
28
|
+
/** What a call refused `STORE_ENGINE_LOST` says, for each reason its engine was lost. */
|
|
29
|
+
export declare const ENGINE_LOST_DETAILS: Record<EngineLostReason, string>;
|
|
30
|
+
//# sourceMappingURL=client.constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.constants.d.ts","sourceRoot":"","sources":["../../../../src/store/engine/client/client.constants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AAEtD,2HAA2H;AAC3H,eAAO,MAAM,qBAAqB,QAAS,CAAA;AAE3C;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,QAAS,CAAA;AAE3C,uFAAuF;AACvF,eAAO,MAAM,sBAAsB,OAAQ,CAAA;AAE3C;;;;GAIG;AACH,eAAO,MAAM,4BAA4B,OAAQ,CAAA;AACjD,eAAO,MAAM,0BAA0B,QAAS,CAAA;AAEhD;;;;GAIG;AACH,eAAO,MAAM,2BAA2B,QAAS,CAAA;AAEjD,yHAAyH;AACzH,eAAO,MAAM,UAAU,eAAe,CAAA;AAEtC,yFAAyF;AACzF,eAAO,MAAM,mBAAmB,EAAE,MAAM,CAAC,gBAAgB,EAAE,MAAM,CAKhE,CAAA"}
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
import { LinkNotice } from '../engine-store.types';
|
|
2
|
+
import { DistributiveOmit, EngineApi, EngineControlAnswer, EngineControlRequest } from '../engine.types';
|
|
3
|
+
import { EngineEventSignal } from '../host/host.types';
|
|
4
|
+
/** The engine as one client reaches it through its port. */
|
|
5
|
+
export type EngineClient = {
|
|
6
|
+
/** The engine's members, each call made for the port's own client. */
|
|
7
|
+
api: EngineApi;
|
|
8
|
+
/** The engine's members, each call made for that connection of the page (several share one port through the hub). */
|
|
9
|
+
connection: (params: {
|
|
10
|
+
connectionId: string;
|
|
11
|
+
}) => EngineApi;
|
|
12
|
+
/** `listener` told each change the engine announces on this port; answers the unsubscribe. */
|
|
13
|
+
onEvent: (listener: (signal: EngineEventSignal) => void) => () => void;
|
|
14
|
+
/** Refuse every call in flight `STORE_ENGINE_LOST` for that reason; the port stays. */
|
|
15
|
+
lose: (params: {
|
|
16
|
+
reason: EngineLostReason;
|
|
17
|
+
}) => void;
|
|
18
|
+
/** Release the port: the client reaches the engine no more; a call still waiting is refused `STORE_CLOSED`. */
|
|
19
|
+
close: (params: {
|
|
20
|
+
storeName: string;
|
|
21
|
+
}) => void;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Why an engine is lost: the view hosting it ended (its lock released), it sent nothing for too long
|
|
25
|
+
* while a call waited (busy beyond reach, paused, frozen), or the hub dropped this view with the page
|
|
26
|
+
* that bound it (it reaches the engine again once bound again).
|
|
27
|
+
*/
|
|
28
|
+
export type EngineLostReason = 'host-gone' | 'no-heartbeat' | 'realm-dropped';
|
|
29
|
+
/** A call waiting for the engine's answer: refused at once if the engine is lost. */
|
|
30
|
+
export type CallInFlight = {
|
|
31
|
+
writeId: string | undefined;
|
|
32
|
+
/** An export's id: a lost export is told to stop (its result would reach no one). */
|
|
33
|
+
exportId: string | undefined;
|
|
34
|
+
reject: (thrown: unknown) => void;
|
|
35
|
+
/** Refused lost already: its answer, if it ever comes, is dropped. */
|
|
36
|
+
lost: boolean;
|
|
37
|
+
};
|
|
38
|
+
export type WorkerConnectorParams<GenericSettings> = {
|
|
39
|
+
/** The project's name. */
|
|
40
|
+
name: string;
|
|
41
|
+
/**
|
|
42
|
+
* The dialecte of the project and the version the realm runs: with the name, what the project is - two
|
|
43
|
+
* dialectes' projects of one name never meet; an engine of another one is refused.
|
|
44
|
+
*/
|
|
45
|
+
dialecteId: string;
|
|
46
|
+
dialecteVersion: string;
|
|
47
|
+
/** The address of the dialecte's engine worker (its `?worker&url` export). */
|
|
48
|
+
engineUrl: string;
|
|
49
|
+
/** Measure the import's and the export's stages in the engine (`dev.perf`). */
|
|
50
|
+
perf?: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* The realm's budget for the project's engine (`ENGINE_OPEN_BUDGET_MS` when absent): how long its
|
|
53
|
+
* open may take in all (its lock and its own setup); how long the worker a destroy runs through has
|
|
54
|
+
* to delete the project, with the close budget besides to answer before it counts as deaf and is
|
|
55
|
+
* ended (`PROJECT_DESTROY_FAILED`); and how long the realm waits for the lock of a worker it ended
|
|
56
|
+
* deaf to close or to destroy before the next engine of the name starts, or the destroy runs.
|
|
57
|
+
*/
|
|
58
|
+
openBudgetMs?: number;
|
|
59
|
+
/**
|
|
60
|
+
* How long the realm waits for its engine's answer to an open (`ENGINE_OPEN_WINDOW_MS` when absent; never
|
|
61
|
+
* less than `openBudgetMs` and the close budget): past it the worker is ended and the open refused
|
|
62
|
+
* `PROJECT_ENGINE_UNAVAILABLE`.
|
|
63
|
+
*/
|
|
64
|
+
openWindowMs?: number;
|
|
65
|
+
/**
|
|
66
|
+
* How the engine and its clients tell a busy engine from a lost one (the defaults when absent): an engine
|
|
67
|
+
* silent for `heartbeatTimeoutMs` while a call waits, or while it adopts a new connection, is lost.
|
|
68
|
+
*/
|
|
69
|
+
liveness?: {
|
|
70
|
+
heartbeatTimeoutMs?: number;
|
|
71
|
+
heartbeatIntervalMs?: number;
|
|
72
|
+
};
|
|
73
|
+
/** What the engine's kind needs to open, handed to it as is (`EngineOpenParams.settings`). */
|
|
74
|
+
settings: GenericSettings;
|
|
75
|
+
};
|
|
76
|
+
/** A control request sent, waiting for its answer: the answer's type it expects, how it settles. */
|
|
77
|
+
export type PendingControlRequest = {
|
|
78
|
+
expect: string;
|
|
79
|
+
resolve: (answer: EngineControlAnswer) => void;
|
|
80
|
+
reject: (thrown: unknown) => void;
|
|
81
|
+
};
|
|
82
|
+
/** The engine worker a realm runs for one project in direct mode, and the connections it serves. */
|
|
83
|
+
export type RealmEngine = {
|
|
84
|
+
worker: Worker;
|
|
85
|
+
/** Counts the engines of the name in this realm: a connection adopted by another one adopts again. */
|
|
86
|
+
generation: number;
|
|
87
|
+
/** Settles once the engine opened (or failed to). */
|
|
88
|
+
opened: Promise<void>;
|
|
89
|
+
control: EngineControl;
|
|
90
|
+
links: Set<WorkerLinkState>;
|
|
91
|
+
/** Set once the realm ends it, or sees it gone: it serves nothing more. */
|
|
92
|
+
ended: boolean;
|
|
93
|
+
/** The page's request of the engine lock, granted once the worker no longer holds it (it is gone). */
|
|
94
|
+
watch: {
|
|
95
|
+
controller: AbortController;
|
|
96
|
+
settled: Promise<void>;
|
|
97
|
+
} | undefined;
|
|
98
|
+
/** The id its project's file was created with, once it opened. */
|
|
99
|
+
creationId: string | undefined;
|
|
100
|
+
};
|
|
101
|
+
/**
|
|
102
|
+
* A worker the realm ends: `ended` answers the work asked of it; `released` settles once the next engine of the
|
|
103
|
+
* name may start (its lock let go, or waited for within the budget its answer gave it).
|
|
104
|
+
*/
|
|
105
|
+
export type EngineEnding = {
|
|
106
|
+
ended: Promise<unknown>;
|
|
107
|
+
released: Promise<void>;
|
|
108
|
+
};
|
|
109
|
+
/** A destroy through a fresh worker: `done` answers it, `released` as for any worker the realm ends. */
|
|
110
|
+
export type FreshWorkerDestroy = {
|
|
111
|
+
done: Promise<void>;
|
|
112
|
+
released: Promise<void>;
|
|
113
|
+
};
|
|
114
|
+
/** One connection of the realm to its engine worker: its client, and the engine that adopted it. */
|
|
115
|
+
export type WorkerLinkState = {
|
|
116
|
+
clientId: string;
|
|
117
|
+
released: boolean;
|
|
118
|
+
/** What the connection's store listens with: each change of its engine, and each resync. */
|
|
119
|
+
listeners: Set<(notice: LinkNotice) => void>;
|
|
120
|
+
/** Reach the project's engine now (an idle connection with a listener follows the next engine of its project). */
|
|
121
|
+
follow: () => void;
|
|
122
|
+
/** Whether `follow` may start an engine: again after each call of the connection's own. */
|
|
123
|
+
mayFollow: boolean;
|
|
124
|
+
/** When the engine `follow` reached was reached: its end is followed once it ran `followRearmMs`. */
|
|
125
|
+
followedAt: number | undefined;
|
|
126
|
+
/** How long a followed engine must run before its end is followed too (doubled at each follow). */
|
|
127
|
+
followRearmMs: number;
|
|
128
|
+
/** The client the engine of that generation adopted for the connection (being adopted while pending). */
|
|
129
|
+
adoption: {
|
|
130
|
+
generation: number;
|
|
131
|
+
client: Promise<EngineClient>;
|
|
132
|
+
} | undefined;
|
|
133
|
+
/**
|
|
134
|
+
* The creation id of the project the connection first reached: an engine started later for it (the one
|
|
135
|
+
* before ended) must open that project, else the connection is refused `PROJECT_DESTROYED_WHILE_AWAY`.
|
|
136
|
+
*/
|
|
137
|
+
creationId: string | undefined;
|
|
138
|
+
/** Its project destroyed while it was away (`PROJECT_DESTROYED_WHILE_AWAY`): every later call refused with it. */
|
|
139
|
+
refusal: unknown;
|
|
140
|
+
/** Its release under way or done, once closed: a later close settles with it. */
|
|
141
|
+
releasing: Promise<void> | undefined;
|
|
142
|
+
};
|
|
143
|
+
/** The control messages of one engine worker, each answered by its request id. */
|
|
144
|
+
export type EngineControl = {
|
|
145
|
+
request: <GenericType extends EngineControlAnswer['type']>(params: {
|
|
146
|
+
message: DistributiveOmit<EngineControlRequest, 'requestId'>;
|
|
147
|
+
expect: GenericType;
|
|
148
|
+
transfer?: Transferable[];
|
|
149
|
+
}) => Promise<Extract<EngineControlAnswer, {
|
|
150
|
+
type: GenericType;
|
|
151
|
+
}>>;
|
|
152
|
+
/**
|
|
153
|
+
* The engine opened: from now on an uncaught error in its worker (a dialecte hook's timer) is no
|
|
154
|
+
* failure of the engine; before, it refuses every request waiting (`PROJECT_ENGINE_UNAVAILABLE`).
|
|
155
|
+
*/
|
|
156
|
+
opened: () => void;
|
|
157
|
+
/** The worker ended or lost: every request waiting, and every one made later, refused with `error`. */
|
|
158
|
+
end: (params: {
|
|
159
|
+
error: unknown;
|
|
160
|
+
}) => void;
|
|
161
|
+
/** Watch the engine's silence on this channel (`answeredOrSilent`), until stopped. */
|
|
162
|
+
watchSilence: (params: {
|
|
163
|
+
budgetMs: number;
|
|
164
|
+
}) => SilenceWatch;
|
|
165
|
+
};
|
|
166
|
+
/** An engine's silence watched: `silent` settles once it has said nothing for the budget while not busy. */
|
|
167
|
+
export type SilenceWatch = {
|
|
168
|
+
silent: Promise<void>;
|
|
169
|
+
stop: () => void;
|
|
170
|
+
};
|
|
171
|
+
/** How a client watches its engine's silence while calls wait. */
|
|
172
|
+
export type HeartbeatWatch = {
|
|
173
|
+
/** The silence counts from now (a call starts while none waited, the page resumed). */
|
|
174
|
+
restart: () => void;
|
|
175
|
+
stop: () => void;
|
|
176
|
+
};
|
|
177
|
+
/** The progress listeners of a client's calls in flight, each under the id its call sends the engine. */
|
|
178
|
+
export type ProgressListeners = {
|
|
179
|
+
/** Keep the listener of a call; answers the id the call sends. */
|
|
180
|
+
add: (params: {
|
|
181
|
+
listener: (...progress: unknown[]) => unknown;
|
|
182
|
+
}) => number;
|
|
183
|
+
/** The call answered: its listener let go. */
|
|
184
|
+
remove: (params: {
|
|
185
|
+
progressId: number | undefined;
|
|
186
|
+
}) => void;
|
|
187
|
+
/** The engine lost: every listener let go (their calls are refused). */
|
|
188
|
+
clear: () => void;
|
|
189
|
+
/** The client closed: nothing heard any more. */
|
|
190
|
+
stop: () => void;
|
|
191
|
+
};
|
|
192
|
+
/** The listeners of the changes an engine announces on a client's port. */
|
|
193
|
+
export type EventListeners = {
|
|
194
|
+
/** Answers the unsubscribe. */
|
|
195
|
+
add: (params: {
|
|
196
|
+
listener: (signal: EngineEventSignal) => void;
|
|
197
|
+
}) => () => void;
|
|
198
|
+
stop: () => void;
|
|
199
|
+
};
|
|
200
|
+
//# sourceMappingURL=client.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.types.d.ts","sourceRoot":"","sources":["../../../../src/store/engine/client/client.types.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { EngineClient } from './client.types';
|
|
2
|
+
/**
|
|
3
|
+
* The engine as one client reaches it through its port: a plain object of the engine's members
|
|
4
|
+
* (it answers no `then` and no symbol key, so it never looks like a promise), each call crossing as
|
|
5
|
+
* the wire table says - its JSON values copied as plain data, its progress listener kept here under an
|
|
6
|
+
* id (the engine posts each tick on this port: every tick is told before the answer), its answer an
|
|
7
|
+
* envelope: a value, or what the engine threw, rebuilt. The calls in flight are known: once the engine is lost they are refused
|
|
8
|
+
* `STORE_ENGINE_LOST` (a write with its `writeId`); a write refused so while its engine may still run
|
|
9
|
+
* it is `running` for `getWriteOutcome` until its answer arrives.
|
|
10
|
+
*/
|
|
11
|
+
export declare function createEngineClient(params: {
|
|
12
|
+
port: MessagePort;
|
|
13
|
+
heartbeatTimeoutMs?: number;
|
|
14
|
+
}): EngineClient;
|
|
15
|
+
//# sourceMappingURL=engine-client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"engine-client.d.ts","sourceRoot":"","sources":["../../../../src/store/engine/client/engine-client.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAEX,YAAY,EAIZ,MAAM,gBAAgB,CAAA;AAGvB;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE;IAC1C,IAAI,EAAE,WAAW,CAAA;IACjB,kBAAkB,CAAC,EAAE,MAAM,CAAA;CAC3B,GAAG,YAAY,CA4If"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { UNANSWERED } from './client.constants';
|
|
2
|
+
import { EngineControl } from './client.types';
|
|
3
|
+
/** The control messages of one engine worker: each request answered once, by its id. */
|
|
4
|
+
export declare function createEngineControl(params: {
|
|
5
|
+
worker: Worker;
|
|
6
|
+
}): EngineControl;
|
|
7
|
+
/**
|
|
8
|
+
* `work`'s answer, or `UNANSWERED` once the engine has been silent for `budgetMs` while not busy (a busy
|
|
9
|
+
* engine is never taken for a lost one): what a realm waits a control request with.
|
|
10
|
+
*/
|
|
11
|
+
export declare function answeredOrSilent<GenericAnswer>(params: {
|
|
12
|
+
control: EngineControl;
|
|
13
|
+
work: Promise<GenericAnswer>;
|
|
14
|
+
budgetMs: number;
|
|
15
|
+
}): Promise<GenericAnswer | typeof UNANSWERED>;
|
|
16
|
+
//# sourceMappingURL=engine-control.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"engine-control.d.ts","sourceRoot":"","sources":["../../../../src/store/engine/client/engine-control.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAM/C,OAAO,KAAK,EAAE,aAAa,EAAuC,MAAM,gBAAgB,CAAA;AAExF,wFAAwF;AACxF,wBAAgB,mBAAmB,CAAC,MAAM,EAAE;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,GAAG,aAAa,CAyE7E;AAgCD;;;GAGG;AACH,wBAAsB,gBAAgB,CAAC,aAAa,EAAE,MAAM,EAAE;IAC7D,OAAO,EAAE,aAAa,CAAA;IACtB,IAAI,EAAE,OAAO,CAAC,aAAa,CAAC,CAAA;IAC5B,QAAQ,EAAE,MAAM,CAAA;CAChB,GAAG,OAAO,CAAC,aAAa,GAAG,OAAO,UAAU,CAAC,CAW7C"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { HeartbeatWatch } from './client.types';
|
|
2
|
+
/**
|
|
3
|
+
* The engine's silence while something waits on it (a call on a client port, an adoption on the worker's
|
|
4
|
+
* control channel): any message from `source` (an answer, a beat) is a sign of life; `busy` holds the clock
|
|
5
|
+
* from the engine's busy signal to its next heartbeat - `busy` when the watch starts, if the engine said so
|
|
6
|
+
* last; none for `timeoutMs` while something waits loses the engine - once the messages queued meanwhile
|
|
7
|
+
* have gone through (a message turn: the page may have stalled, or been frozen with its worker); the
|
|
8
|
+
* document's `resume` and the page's `pageshow` restart the clock. The clock starts at the first `restart`.
|
|
9
|
+
*/
|
|
10
|
+
export declare function watchHeartbeat(params: {
|
|
11
|
+
source: EventTarget;
|
|
12
|
+
timeoutMs: number;
|
|
13
|
+
waiting: () => number;
|
|
14
|
+
lose: () => void;
|
|
15
|
+
busy?: boolean;
|
|
16
|
+
}): HeartbeatWatch;
|
|
17
|
+
//# sourceMappingURL=heartbeat-watch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"heartbeat-watch.d.ts","sourceRoot":"","sources":["../../../../src/store/engine/client/heartbeat-watch.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAEpD;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE;IACtC,MAAM,EAAE,WAAW,CAAA;IACnB,SAAS,EAAE,MAAM,CAAA;IACjB,OAAO,EAAE,MAAM,MAAM,CAAA;IACrB,IAAI,EAAE,MAAM,IAAI,CAAA;IAChB,IAAI,CAAC,EAAE,OAAO,CAAA;CACd,GAAG,cAAc,CA8DjB"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { EngineConnector } from '../engine-store.types';
|
|
2
|
+
import { HubConnectorParams } from './hub-connector.types';
|
|
3
|
+
/**
|
|
4
|
+
* A project's engine reached through the origin's hub: the hub elects the realm that hosts it and hands
|
|
5
|
+
* this realm a port to it; a call made before the hub answered waits for its answer. The connection's
|
|
6
|
+
* engine is the one the realm holds now: after its host is gone, the next one. The project is destroyed
|
|
7
|
+
* once the hub grants it (no other view uses it), by a fresh worker that waits for the lock of the
|
|
8
|
+
* engine the hub just released - in this realm, or (`deletesFiles: false`) in a view the hub picks.
|
|
9
|
+
*/
|
|
10
|
+
export declare function createHubConnector(params: HubConnectorParams): EngineConnector;
|
|
11
|
+
//# sourceMappingURL=hub-connector.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hub-connector.d.ts","sourceRoot":"","sources":["../../../../src/store/engine/client/hub-connector.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAc,MAAM,uBAAuB,CAAA;AAIxE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAA;AAK/D;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,kBAAkB,GAAG,eAAe,CAmE9E"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { HubConnection } from '../hub/hub-client.types';
|
|
2
|
+
export type HubConnectorParams = {
|
|
3
|
+
/** The project's name. */
|
|
4
|
+
name: string;
|
|
5
|
+
/** The realm's connection to the hub. */
|
|
6
|
+
connection: HubConnection;
|
|
7
|
+
dialecteId: string;
|
|
8
|
+
/** The version of the dialecte this realm runs: the hub refuses an engine of another one. */
|
|
9
|
+
dialecteVersion: string;
|
|
10
|
+
/** The address of the dialecte's engine worker: a fresh one destroys the project. */
|
|
11
|
+
engineUrl: string;
|
|
12
|
+
/**
|
|
13
|
+
* How long the destroy's fresh worker has to delete the project (`ENGINE_OPEN_BUDGET_MS` when absent),
|
|
14
|
+
* the close budget besides to answer; the hub keeps its own budget for opening engines.
|
|
15
|
+
*/
|
|
16
|
+
destroyBudgetMs?: number;
|
|
17
|
+
/** How long a call waits on a silent engine (the default when absent). */
|
|
18
|
+
heartbeatTimeoutMs?: number;
|
|
19
|
+
/**
|
|
20
|
+
* Whether this realm deletes the project's files on a destroy (a fresh worker here; the default). A realm that
|
|
21
|
+
* cannot store (`false`): the hub has a view that runs an engine of the dialecte delete them.
|
|
22
|
+
*/
|
|
23
|
+
deletesFiles?: boolean;
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=hub-connector.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hub-connector.types.d.ts","sourceRoot":"","sources":["../../../../src/store/engine/client/hub-connector.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AAE5D,MAAM,MAAM,kBAAkB,GAAG;IAChC,0BAA0B;IAC1B,IAAI,EAAE,MAAM,CAAA;IACZ,yCAAyC;IACzC,UAAU,EAAE,aAAa,CAAA;IACzB,UAAU,EAAE,MAAM,CAAA;IAClB,6FAA6F;IAC7F,eAAe,EAAE,MAAM,CAAA;IACvB,qFAAqF;IACrF,SAAS,EAAE,MAAM,CAAA;IACjB;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,0EAA0E;IAC1E,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAA;CACtB,CAAA"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { EngineConnector } from '../engine-store.types';
|
|
2
|
+
import { EngineLockMode } from '../engine.types';
|
|
3
|
+
import { WorkerConnectorParams } from './client.types';
|
|
4
|
+
/**
|
|
5
|
+
* Direct mode: the project's engine runs in a dedicated worker this realm spawns (from the dialecte's
|
|
6
|
+
* engine address), shared by every connection of the realm to the name, each through a port of its
|
|
7
|
+
* own. The engine takes the project's lock only if free: another realm holding it refuses with
|
|
8
|
+
* `PROJECT_OPEN_ELSEWHERE`. The worker is closed and ended with the last connection.
|
|
9
|
+
*/
|
|
10
|
+
export declare function createWorkerConnector<GenericSettings>(params: WorkerConnectorParams<GenericSettings>): EngineConnector;
|
|
11
|
+
/**
|
|
12
|
+
* Whether this realm runs the project's engine itself (a connection of it open in direct mode): a new connection
|
|
13
|
+
* of the realm joins that engine, whatever the hub says by then.
|
|
14
|
+
*/
|
|
15
|
+
export declare function runsDirectly(params: {
|
|
16
|
+
name: string;
|
|
17
|
+
dialecteId: string;
|
|
18
|
+
}): boolean;
|
|
19
|
+
/**
|
|
20
|
+
* A worker that opens nothing deletes the project, the lock taken as `lock` says (only if free in
|
|
21
|
+
* direct mode; waited for through the hub, whose engine just released may hold it a moment); ended
|
|
22
|
+
* after. It has the open budget to delete and the close budget to answer: one that does not is ended,
|
|
23
|
+
* and the destroy refused `PROJECT_DESTROY_FAILED` (the project may still be there).
|
|
24
|
+
*/
|
|
25
|
+
export declare function destroyFromFreshWorker(params: {
|
|
26
|
+
name: string;
|
|
27
|
+
dialecteId: string;
|
|
28
|
+
engineUrl: string;
|
|
29
|
+
budgetMs: number;
|
|
30
|
+
lock: EngineLockMode;
|
|
31
|
+
}): Promise<void>;
|
|
32
|
+
//# sourceMappingURL=worker-connector.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"worker-connector.d.ts","sourceRoot":"","sources":["../../../../src/store/engine/client/worker-connector.ts"],"names":[],"mappings":"AAyBA,OAAO,KAAK,EAAE,eAAe,EAAyC,MAAM,uBAAuB,CAAA;AACnG,OAAO,KAAK,EAAa,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAChE,OAAO,KAAK,EAMX,qBAAqB,EAErB,MAAM,gBAAgB,CAAA;AAavB;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,eAAe,EACpD,MAAM,EAAE,qBAAqB,CAAC,eAAe,CAAC,GAC5C,eAAe,CAUjB;AA8dD;;;GAGG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAElF;AAqBD;;;;;GAKG;AACH,wBAAsB,sBAAsB,CAAC,MAAM,EAAE;IACpD,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,EAAE,MAAM,CAAA;IAClB,SAAS,EAAE,MAAM,CAAA;IACjB,QAAQ,EAAE,MAAM,CAAA;IAChB,IAAI,EAAE,cAAc,CAAA;CACpB,GAAG,OAAO,CAAC,IAAI,CAAC,CAEhB"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A view coming back to its project (`expectedCreationId`) and finding none, or one created since under its name:
|
|
3
|
+
* the project was destroyed while it was away - refused `PROJECT_DESTROYED_WHILE_AWAY`, nothing written.
|
|
4
|
+
*/
|
|
5
|
+
export declare function refuseOtherCreation(params: {
|
|
6
|
+
project: string;
|
|
7
|
+
expectedCreationId: string | undefined;
|
|
8
|
+
creationId: string | undefined;
|
|
9
|
+
}): void;
|
|
10
|
+
//# sourceMappingURL=creation-refusal.d.ts.map
|