@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,119 @@
|
|
|
1
|
+
import { DialecteError } from '../../../errors';
|
|
2
|
+
/**
|
|
3
|
+
* A thrown value as a port carries it: a structured error with its record, any other `Error` with its
|
|
4
|
+
* name, or any other value as it clones (its text when it cannot).
|
|
5
|
+
*/
|
|
6
|
+
export type ThrownData = {
|
|
7
|
+
kind: 'dialecte';
|
|
8
|
+
message: string;
|
|
9
|
+
stack?: string;
|
|
10
|
+
error: DialecteErrorData;
|
|
11
|
+
} | {
|
|
12
|
+
kind: 'error';
|
|
13
|
+
name: string;
|
|
14
|
+
message: string;
|
|
15
|
+
stack?: string;
|
|
16
|
+
cause?: ThrownData;
|
|
17
|
+
} | {
|
|
18
|
+
kind: 'value';
|
|
19
|
+
value: unknown;
|
|
20
|
+
};
|
|
21
|
+
/** A structured error's record as a port carries it: its cause as data too. */
|
|
22
|
+
export type DialecteErrorData = Omit<DialecteError, 'cause'> & {
|
|
23
|
+
cause?: ThrownData;
|
|
24
|
+
};
|
|
25
|
+
/** What a value that would not cross a port as it is stands for: the store's check refuses its stand-in as it. */
|
|
26
|
+
export type WireStandInKind = 'function' | 'symbol' | 'instance' | 'raw-json' | 'to-json' | 'throwing-read' | 'throwing-inspection';
|
|
27
|
+
/**
|
|
28
|
+
* A value of an argument, at `path` under it, left out of the copy and rebuilt on the other side:
|
|
29
|
+
* `name` the class of an instance, `text` a raw JSON value's text, `message` what reading or looking
|
|
30
|
+
* into it threw.
|
|
31
|
+
*/
|
|
32
|
+
export type WireStandIn = {
|
|
33
|
+
index: number;
|
|
34
|
+
path: (string | number)[];
|
|
35
|
+
kind: WireStandInKind;
|
|
36
|
+
name?: string;
|
|
37
|
+
text?: string;
|
|
38
|
+
message?: string;
|
|
39
|
+
};
|
|
40
|
+
/** The values of a call's arguments as a port carries them: plain data, and the stand-ins to rebuild. */
|
|
41
|
+
export type WireValues = {
|
|
42
|
+
values: unknown[];
|
|
43
|
+
standIns: WireStandIn[];
|
|
44
|
+
};
|
|
45
|
+
/**
|
|
46
|
+
* Where the copy is: the argument, the path under it (one stack, copied only into a stand-in), the
|
|
47
|
+
* containers above (their copies by original), the stand-ins named so far.
|
|
48
|
+
*/
|
|
49
|
+
export type WireCopyStep = {
|
|
50
|
+
index: number;
|
|
51
|
+
path: (string | number)[];
|
|
52
|
+
ancestors: Map<object, unknown>;
|
|
53
|
+
standIns: WireStandIn[];
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* Where an argument of a call holds a value the store's JSON check reads from its root (the depth it
|
|
57
|
+
* counts starts there): the argument, or the value at a path of keys under it.
|
|
58
|
+
*/
|
|
59
|
+
export type WireJsonPlace = {
|
|
60
|
+
argument: number;
|
|
61
|
+
path?: readonly string[];
|
|
62
|
+
};
|
|
63
|
+
/**
|
|
64
|
+
* How one member of the engine crosses a port. A member marked a read is made again on the next engine:
|
|
65
|
+
* it carries no progress listener, write id or abort (the type refuses them); that it writes nothing is the
|
|
66
|
+
* wire table's word, checked by the store's own cases. An abort is only ever made from inside its import
|
|
67
|
+
* or export, never made again: a `read` flag on one would change nothing.
|
|
68
|
+
*/
|
|
69
|
+
export type WireMemberSpec = WireReadSpec | WireCallSpec;
|
|
70
|
+
/** A member that only reads: refused because its engine ended with its host, it is made once more on the next one. */
|
|
71
|
+
export type WireReadSpec = {
|
|
72
|
+
read: true;
|
|
73
|
+
/** The places of its arguments holding values the engine's JSON check reads (copied as plain data). */
|
|
74
|
+
json?: readonly WireJsonPlace[];
|
|
75
|
+
listener?: never;
|
|
76
|
+
identified?: never;
|
|
77
|
+
abortable?: never;
|
|
78
|
+
};
|
|
79
|
+
/** Any other member: never made again. */
|
|
80
|
+
export type WireCallSpec = {
|
|
81
|
+
read?: false;
|
|
82
|
+
/** The place of its progress listener among its arguments (it stays with the caller: its ticks cross as signals). */
|
|
83
|
+
listener?: number;
|
|
84
|
+
/** The places of its arguments holding values the engine's JSON check reads (copied as plain data). */
|
|
85
|
+
json?: readonly WireJsonPlace[];
|
|
86
|
+
/** It is a write its caller identifies: its first argument carries the `writeId`. */
|
|
87
|
+
identified?: boolean;
|
|
88
|
+
/** It is an export the caller can stop: its first argument carries the `exportId`. */
|
|
89
|
+
abortable?: boolean;
|
|
90
|
+
};
|
|
91
|
+
/** A call of a member of the engine as a port carries it. */
|
|
92
|
+
export type WireRequest = {
|
|
93
|
+
member: string;
|
|
94
|
+
args: unknown[];
|
|
95
|
+
standIns: WireStandIn[];
|
|
96
|
+
/**
|
|
97
|
+
* The call's progress listener, by an id of the client's: the engine posts each tick on the client's
|
|
98
|
+
* port under it (one port: every tick reaches the caller before the answer). None, no tick.
|
|
99
|
+
*/
|
|
100
|
+
progressId?: number;
|
|
101
|
+
/**
|
|
102
|
+
* The connection the call is made for, when the client's port serves several (a page's port to a project through
|
|
103
|
+
* the hub): the change it makes is told tagged with it. None: the port's own client.
|
|
104
|
+
*/
|
|
105
|
+
connectionId?: string;
|
|
106
|
+
};
|
|
107
|
+
/** What the engine answers a call: its value, or what it threw as data. */
|
|
108
|
+
export type WireAnswer = {
|
|
109
|
+
ok: true;
|
|
110
|
+
value: unknown;
|
|
111
|
+
} | {
|
|
112
|
+
ok: false;
|
|
113
|
+
thrown: ThrownData;
|
|
114
|
+
};
|
|
115
|
+
/** What the engine exposes on a client's port: one member, every call through it. */
|
|
116
|
+
export type EngineWire = {
|
|
117
|
+
call: (request: WireRequest) => Promise<WireAnswer>;
|
|
118
|
+
};
|
|
119
|
+
//# sourceMappingURL=wire.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wire.types.d.ts","sourceRoot":"","sources":["../../../../src/store/engine/wire/wire.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAE7C;;;GAGG;AACH,MAAM,MAAM,UAAU,GACnB;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,iBAAiB,CAAA;CAAE,GAC/E;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,UAAU,CAAA;CAAE,GACpF;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,OAAO,CAAA;CAAE,CAAA;AAEpC,+EAA+E;AAC/E,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAAC,aAAa,EAAE,OAAO,CAAC,GAAG;IAAE,KAAK,CAAC,EAAE,UAAU,CAAA;CAAE,CAAA;AAErF,kHAAkH;AAClH,MAAM,MAAM,eAAe,GACxB,UAAU,GACV,QAAQ,GACR,UAAU,GACV,UAAU,GACV,SAAS,GACT,eAAe,GACf,qBAAqB,CAAA;AAExB;;;;GAIG;AACH,MAAM,MAAM,WAAW,GAAG;IACzB,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,C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qF;IACrF,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,sFAAsF;IACtF,SAAS,CAAC,EAAE,OAAO,CAAA;CACnB,CAAA;AAED,6DAA6D;AAC7D,MAAM,MAAM,WAAW,GAAG;IACzB,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,OAAO,EAAE,CAAA;IACf,QAAQ,EAAE,WAAW,EAAE,CAAA;IACvB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAA;CACrB,CAAA;AAED,2EAA2E;AAC3E,MAAM,MAAM,UAAU,GAAG;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,KAAK,EAAE,OAAO,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,UAAU,CAAA;CAAE,CAAA;AAEzF,qFAAqF;AACrF,MAAM,MAAM,UAAU,GAAG;IACxB,IAAI,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,OAAO,CAAC,UAAU,CAAC,CAAA;CACnD,CAAA"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ConnectHubParams, HubRealm } from './engine/hub/hub-client.types';
|
|
2
|
+
/**
|
|
3
|
+
* Connect this page to the origin's hub, once, and get its connection (`HubRealm`: `realmId`, `createHubPort` to bind a
|
|
4
|
+
* child frame, `onRejoined`, the moment to bind child frames again after a freeze or a drop): a second call - from this copy of the library or
|
|
5
|
+
* another one of the same protocol - gets the same connection. Answers `undefined` where the browser
|
|
6
|
+
* has no SharedWorker, or the hub never welcomed the page (its script failed to load or was blocked, or
|
|
7
|
+
* it stayed silent): a later call tries again. A hub of another protocol refuses the page:
|
|
8
|
+
* `STORE_PROTOCOL_MISMATCH`; the browser refusing to make the hub's worker (a `DOMException`) is no hub,
|
|
9
|
+
* any other error thrown making it is thrown. The page registers the engines it can start whose worker is of
|
|
10
|
+
* its own origin (each dialecte's `factory.spawner`); a later call adds those it does not run yet - a project opened on `sqlite` adds its own as it opens - and one naming a dialecte the page runs at another version is
|
|
11
|
+
* refused `STORE_HUB_SPAWNERS_FIXED`, the connection kept. A document that joined through `adoptHubPort` hosts no
|
|
12
|
+
* engine: the spawners it names are not registered; neither are those of a page that cannot store (no private file
|
|
13
|
+
* system; two versions of one dialecte refused all the same): its own projects on `sqlite` are refused
|
|
14
|
+
* `STORE_UNAVAILABLE` unless its page bound it, its connection serving to hand ports to its children. An engine's
|
|
15
|
+
* files (the SQLite wasm) are fetched when the page first starts one.
|
|
16
|
+
*
|
|
17
|
+
* @intent register this page's dialecte engines with the hub before any project opens, connect a page to the origin's hub, offer a dialecte's engine to the hub (`factory.spawner`), get a port to hand a child frame of another origin
|
|
18
|
+
*/
|
|
19
|
+
export declare function connectHub(params?: ConnectHubParams): Promise<HubRealm | undefined>;
|
|
20
|
+
/**
|
|
21
|
+
* Join the hub through a port a page made with `createHubPort` (a document that cannot reach the
|
|
22
|
+
* hub's script), and get that document's connection: a client only, whose liveness is that page's. A port nobody answers fails the join
|
|
23
|
+
* `STORE_CONNECTION_FAILED` once the welcome budget has passed. A document that connected already gets
|
|
24
|
+
* its connection - `undefined` when that one found no hub. One the hub dropped with its page (its calls
|
|
25
|
+
* refused `STORE_ENGINE_LOST`, `realm-dropped`) joins again on the new port, on its own: the page makes
|
|
26
|
+
* it one from `onRejoined`, and a join that fails leaves it dropped until the next one.
|
|
27
|
+
*
|
|
28
|
+
* @intent join the hub from an iframe of another origin, open projects on SQLite storage in a child frame through its page's engine, bind a child frame again after its page rejoined the hub
|
|
29
|
+
*/
|
|
30
|
+
export declare function adoptHubPort(params: {
|
|
31
|
+
port: MessagePort;
|
|
32
|
+
}): Promise<HubRealm | undefined>;
|
|
33
|
+
//# sourceMappingURL=hub-public.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hub-public.d.ts","sourceRoot":"","sources":["../../src/store/hub-public.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,gBAAgB,EAAiB,QAAQ,EAAE,MAAM,+BAA+B,CAAA;AAG9F;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,UAAU,CAAC,MAAM,GAAE,gBAAqB,GAAG,OAAO,CAAC,QAAQ,GAAG,SAAS,CAAC,CAQ7F;AAYD;;;;;;;;;GASG;AACH,wBAAsB,YAAY,CAAC,MAAM,EAAE;IAAE,IAAI,EAAE,WAAW,CAAA;CAAE,GAAG,OAAO,CAAC,QAAQ,GAAG,SAAS,CAAC,CAG/F"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A destroy waited for, whatever it answered - refused, or failed: the operation, open or destroy waiting
|
|
3
|
+
* for it goes on all the same, and meets the store as that destroy left it.
|
|
4
|
+
*/
|
|
5
|
+
export declare function ignoreDestroyOutcome(): void;
|
|
6
|
+
//# sourceMappingURL=ignore-destroy-outcome.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ignore-destroy-outcome.d.ts","sourceRoot":"","sources":["../../src/store/ignore-destroy-outcome.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,wBAAgB,oBAAoB,IAAI,IAAI,CAAG"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { StoreNotice } from '../store.types';
|
|
2
|
+
import { InMemoryChange, InMemoryState } from './types';
|
|
3
|
+
/** The instances of each project (its key) opened and not closed since: a destroy is refused while another one is. */
|
|
4
|
+
export declare const OPEN_IN_MEMORY_CONNECTIONS: import('../open-connections.types').OpenConnections;
|
|
5
|
+
/** The instances of each project (its key) closed while operations of theirs run: a destroy lets those complete first. */
|
|
6
|
+
export declare const CLOSING_IN_MEMORY_CONNECTIONS: import('../closing-connections.types').ClosingConnections;
|
|
7
|
+
/** `listener` of the project (its key) told its changes, as `connection`; answers the unsubscribe. */
|
|
8
|
+
export declare function listenToInMemoryProject(params: {
|
|
9
|
+
key: string;
|
|
10
|
+
connection: object;
|
|
11
|
+
listener: (notice: StoreNotice) => void;
|
|
12
|
+
}): () => void;
|
|
13
|
+
/** A change of the project (its key; `name`, as a failing listener's report names it) told to every instance listening, `own` to the one that made it. */
|
|
14
|
+
export declare function announceInMemoryChange(params: {
|
|
15
|
+
key: string;
|
|
16
|
+
name: string;
|
|
17
|
+
connection: object;
|
|
18
|
+
change: InMemoryChange;
|
|
19
|
+
}): void;
|
|
20
|
+
/**
|
|
21
|
+
* Where a project's in-memory state is kept: its dialecte and its name (`projectKeyOf`), or its name alone,
|
|
22
|
+
* URI-encoded, when no dialecte is told - never a `/` in it, so it never reads as another dialecte's project.
|
|
23
|
+
*/
|
|
24
|
+
export declare function inMemoryStateKeyOf(params: {
|
|
25
|
+
project: string;
|
|
26
|
+
dialecteId?: string;
|
|
27
|
+
}): string;
|
|
28
|
+
/** The state of the project (its key), or none when nothing was written under it since it was last destroyed. */
|
|
29
|
+
export declare function findInMemoryState(params: {
|
|
30
|
+
key: string;
|
|
31
|
+
}): InMemoryState | undefined;
|
|
32
|
+
/** The state of the project (its key), started empty when there is none. */
|
|
33
|
+
export declare function ensureInMemoryState(params: {
|
|
34
|
+
key: string;
|
|
35
|
+
}): InMemoryState;
|
|
36
|
+
/** Forget the state of the project (its key): every instance of it reads empty until something is written again. */
|
|
37
|
+
export declare function dropInMemoryState(params: {
|
|
38
|
+
key: string;
|
|
39
|
+
}): void;
|
|
40
|
+
export declare function createInMemoryState(): InMemoryState;
|
|
41
|
+
/** A write landed on the document: its version moves on (in the write's synchronous section, so an export reading it sees the write). */
|
|
42
|
+
export declare function bumpVersion(params: {
|
|
43
|
+
state: InMemoryState;
|
|
44
|
+
documentId: string;
|
|
45
|
+
}): void;
|
|
46
|
+
//# sourceMappingURL=in-memory-state.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"in-memory-state.d.ts","sourceRoot":"","sources":["../../../src/store/in-memory/in-memory-state.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK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CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAGtF"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ReadonlyInMemoryState } from './types';
|
|
2
|
+
import { AnyRawRecord } from '../../types';
|
|
3
|
+
/** What a document that is not in the store reads as: no records. */
|
|
4
|
+
export declare const EMPTY_TABLE: ReadonlyMap<string, AnyRawRecord>;
|
|
5
|
+
/** What a name with no state reads as, and all a placeholder store ever reads: nothing. */
|
|
6
|
+
export declare const EMPTY_STATE: ReadonlyInMemoryState;
|
|
7
|
+
//# sourceMappingURL=in-memory-store.constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"in-memory-store.constants.d.ts","sourceRoot":"","sources":["../../../src/store/in-memory/in-memory-store.constants.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AACpD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAE3C,qEAAqE;AACrE,eAAO,MAAM,WAAW,EAAE,WAAW,CAAC,MAAM,EAAE,YAAY,CAAa,CAAA;AAEvE,2FAA2F;AAC3F,eAAO,MAAM,WAAW,EAAE,qBAA6C,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Store, ChangeLogEntry } from '../store.types';
|
|
1
|
+
import { Store, ChangeLogEntry, ExportFileParams, ExportFileResult, ImportFileParams, ImportFileResult, StoreNotice, WriteOutcome } from '../store.types';
|
|
2
2
|
import { InMemoryStoreOptions } from './types';
|
|
3
|
-
import { DocumentRecord } from '../../project/types';
|
|
3
|
+
import { DocumentRecord, DocumentUpdates } from '../../project/types';
|
|
4
4
|
import { AnyRawRecord, BlobAttachment, BlobRecord, RecordPatch } from '../../types';
|
|
5
5
|
/**
|
|
6
6
|
* InMemoryStore - Map-backed Store implementation with no persistence.
|
|
@@ -10,27 +10,54 @@ import { AnyRawRecord, BlobAttachment, BlobRecord, RecordPatch } from '../../typ
|
|
|
10
10
|
* - Test fixtures (writable: true)
|
|
11
11
|
* - Demos and playground (writable: true)
|
|
12
12
|
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
13
|
+
* Every instance of a project - its dialecte and name, or its name alone when no `dialecteId` is given -
|
|
14
|
+
* reads and writes one state, as every connection to a SQLite project does: a store closed and built
|
|
15
|
+
* again for its project finds what was written. `close` keeps it; `destroy` drops it. The state is the realm's (and the loaded copy of core's): nothing crosses
|
|
16
|
+
* realms.
|
|
17
|
+
*
|
|
18
|
+
* Records are values: the store copies what it is handed and what it hands out, so a caller changing
|
|
19
|
+
* its objects never changes the store, as with a store whose records cross a serialisation. Blob data
|
|
20
|
+
* is immutable and is not copied. List reads answer in id order, as an IndexedDB key range does.
|
|
21
|
+
*
|
|
22
|
+
* When writable is false, the store is a placeholder: any mutation throws STORE_NOT_WRITABLE, reads
|
|
23
|
+
* answer empty, and it never reads, keeps or drops the state of its project.
|
|
24
|
+
*
|
|
25
|
+
* Its imports run in its own realm, the page's: `importFile` runs `runImport` with the import
|
|
26
|
+
* runtime it was built with.
|
|
15
27
|
*/
|
|
16
28
|
export declare class InMemoryStore implements Store {
|
|
17
29
|
readonly name: string;
|
|
18
30
|
private readonly writable;
|
|
31
|
+
private readonly runtime?;
|
|
32
|
+
/** Which state of the realm this store reads and writes: its dialecte and its name, or its name alone. */
|
|
33
|
+
private readonly stateKey;
|
|
19
34
|
/** Guard so the cross-realm no-op warning is emitted at most once per session. */
|
|
20
35
|
private static reconcileWarned;
|
|
21
|
-
|
|
22
|
-
private
|
|
23
|
-
|
|
24
|
-
private
|
|
25
|
-
|
|
26
|
-
private
|
|
36
|
+
/** Set by `close()`, cleared by `open()`: a closed store refuses every operation started after it. */
|
|
37
|
+
private closed;
|
|
38
|
+
/** How many times `close()` was called: an `open()` refuses when one came after it was called. */
|
|
39
|
+
private closings;
|
|
40
|
+
/** The imports this instance runs (its only operations that span awaits): `open()` and `destroy()` wait for them. */
|
|
41
|
+
private readonly operations;
|
|
42
|
+
/** This store's own destroy while it runs: an operation started meanwhile goes on once it has ended. */
|
|
43
|
+
private destroying;
|
|
27
44
|
constructor(name: string, options?: InMemoryStoreOptions);
|
|
45
|
+
/** Open: an import found unfinished - it never outlives the store - is removed; one it runs stays. */
|
|
28
46
|
open(): Promise<void>;
|
|
29
|
-
|
|
47
|
+
/**
|
|
48
|
+
* Refuse every operation started from now on until opened again; one running completes (only an
|
|
49
|
+
* import spans more than a call), and the close is settled once it has. The project's state stays.
|
|
50
|
+
*/
|
|
51
|
+
close(): Promise<void>;
|
|
52
|
+
/**
|
|
53
|
+
* Drop the project's state, for every instance of it; refused `PROJECT_OPEN_ELSEWHERE` while another
|
|
54
|
+
* instance of the project is open. A placeholder has none to drop.
|
|
55
|
+
*/
|
|
30
56
|
destroy(): Promise<void>;
|
|
57
|
+
private destroyOnceIdle;
|
|
31
58
|
/**
|
|
32
|
-
* No-op: in-memory data is not shared across realms/tabs, so
|
|
33
|
-
* to reconcile. Warns once to flag that a cross-realm setup (e.g. iframe
|
|
59
|
+
* No-op: in-memory data is the realm's (one state per project there), not shared across realms/tabs, so
|
|
60
|
+
* there is nothing to reconcile. Warns once to flag that a cross-realm setup (e.g. iframe
|
|
34
61
|
* extensions) will not see documents imported in another realm with this store.
|
|
35
62
|
*/
|
|
36
63
|
reconcile(): Promise<void>;
|
|
@@ -39,13 +66,18 @@ export declare class InMemoryStore implements Store {
|
|
|
39
66
|
registerDocument(file: DocumentRecord): Promise<void>;
|
|
40
67
|
getDocument(documentId: string): Promise<DocumentRecord | undefined>;
|
|
41
68
|
getDocuments(): Promise<DocumentRecord[]>;
|
|
42
|
-
updateDocument(documentId: string, updates:
|
|
69
|
+
updateDocument(documentId: string, updates: DocumentUpdates): Promise<void>;
|
|
43
70
|
removeDocument(documentId: string): Promise<void>;
|
|
44
|
-
get(id: string, documentId
|
|
71
|
+
get(id: string, documentId: string): Promise<AnyRawRecord | undefined>;
|
|
45
72
|
getByDocumentId(documentId: string): Promise<AnyRawRecord[]>;
|
|
46
73
|
count(documentId: string): Promise<number>;
|
|
47
74
|
getByTagNameInDocument(tagName: string, documentId: string): Promise<AnyRawRecord[]>;
|
|
48
75
|
getMany(ids: string[], documentId: string): Promise<(AnyRawRecord | undefined)[]>;
|
|
76
|
+
importFile(params: ImportFileParams): Promise<ImportFileResult>;
|
|
77
|
+
exportFile(params: ExportFileParams): Promise<ExportFileResult>;
|
|
78
|
+
getWriteOutcome(params: {
|
|
79
|
+
writeId: string;
|
|
80
|
+
}): Promise<WriteOutcome>;
|
|
49
81
|
bulkWrite(documentId: string, ops: {
|
|
50
82
|
creates?: AnyRawRecord[];
|
|
51
83
|
updates?: RecordPatch[];
|
|
@@ -53,11 +85,13 @@ export declare class InMemoryStore implements Store {
|
|
|
53
85
|
}): Promise<void>;
|
|
54
86
|
commit(params: {
|
|
55
87
|
documentId: string;
|
|
88
|
+
writeId?: string;
|
|
56
89
|
creates: AnyRawRecord[];
|
|
57
90
|
updates: AnyRawRecord[];
|
|
58
91
|
deletes: string[];
|
|
59
92
|
onProgress: (current: number, total: number) => void;
|
|
60
93
|
}): Promise<void>;
|
|
94
|
+
/** Undo the last applied entry, its parts in reverse: the deleted records back, the befores, the creates gone. */
|
|
61
95
|
undo(documentId: string): Promise<void>;
|
|
62
96
|
redo(documentId: string): Promise<void>;
|
|
63
97
|
getHistoryStatus(documentId: string): Promise<{
|
|
@@ -80,8 +114,62 @@ export declare class InMemoryStore implements Store {
|
|
|
80
114
|
recordRef: string;
|
|
81
115
|
}): Promise<void>;
|
|
82
116
|
removeBlob(blobId: string): Promise<void>;
|
|
83
|
-
|
|
84
|
-
|
|
117
|
+
/**
|
|
118
|
+
* Every change of the project made through any in-memory store of it in this page, this store's own told `own`,
|
|
119
|
+
* before the call that made it settles; a call that changed nothing tells nothing. A placeholder (not writable)
|
|
120
|
+
* shares no state: it is told nothing.
|
|
121
|
+
*/
|
|
122
|
+
subscribe(listener: (notice: StoreNotice) => void): () => void;
|
|
123
|
+
/** A change this store made, told to every store of the project listening. */
|
|
124
|
+
private announce;
|
|
125
|
+
private registerDocumentUnguarded;
|
|
126
|
+
private getDocumentUnguarded;
|
|
127
|
+
private updateDocumentUnguarded;
|
|
128
|
+
/** An imported document ready: refused `DOCUMENT_NOT_REGISTERED` once it is no longer the import's own, `importing`. */
|
|
129
|
+
private markReadyUnguarded;
|
|
130
|
+
/** An import's records, into its own document only: refused `DOCUMENT_NOT_REGISTERED` once it is not. */
|
|
131
|
+
private bulkWriteOwnImport;
|
|
132
|
+
/** What a failed import leaves goes: its own document only, never one registered since under its id. */
|
|
133
|
+
private removeOwnImport;
|
|
134
|
+
private removeDocumentUnguarded;
|
|
135
|
+
private bulkWriteUnguarded;
|
|
136
|
+
/**
|
|
137
|
+
* The project's state to read, resolved on every operation: empty when it has none, and always
|
|
138
|
+
* for a placeholder. Read-only: a write goes through `writeState`.
|
|
139
|
+
*/
|
|
140
|
+
private readState;
|
|
141
|
+
/** The project's state to write, resolved on every operation; none when nothing is held for it. */
|
|
142
|
+
private writeState;
|
|
143
|
+
/** The records of a document; a document that is not in the store reads empty. */
|
|
144
|
+
private readTable;
|
|
145
|
+
/**
|
|
146
|
+
* The state and the records of a document to write, both of one resolution; a document that is not
|
|
147
|
+
* registered takes no write.
|
|
148
|
+
*/
|
|
149
|
+
private writeTarget;
|
|
150
|
+
/**
|
|
151
|
+
* Refused once closed; else the store counts open - again after its own destroy, as a SQLite store
|
|
152
|
+
* connects again on its next operation (a placeholder never does). One started while this store's
|
|
153
|
+
* own destroy runs goes on once it has ended: it keeps that destroy from nothing.
|
|
154
|
+
*/
|
|
155
|
+
private guardOpen;
|
|
156
|
+
/** Guarded once this store's own destroy has ended: closed meanwhile, refused, as one started after the close is. */
|
|
157
|
+
private guardOpenAfterOwnDestroy;
|
|
158
|
+
/**
|
|
159
|
+
* The target the store's own import writes through: the import is one operation, so a `close()`
|
|
160
|
+
* after it started does not refuse the calls it makes.
|
|
161
|
+
*/
|
|
162
|
+
private ownImportTarget;
|
|
163
|
+
/**
|
|
164
|
+
* The source the store's own export reads through: the export is one operation, so a `close()` after it
|
|
165
|
+
* started does not refuse the calls it makes.
|
|
166
|
+
*/
|
|
167
|
+
private ownExportSource;
|
|
168
|
+
/** How many writes a `ready` document has taken; `undefined` for one not registered or not ready. */
|
|
169
|
+
private getExportVersion;
|
|
170
|
+
private countUnguarded;
|
|
171
|
+
private getByTagNameInDocumentUnguarded;
|
|
172
|
+
private getManyUnguarded;
|
|
85
173
|
private guardWritable;
|
|
86
174
|
}
|
|
87
175
|
//# sourceMappingURL=in-memory-store.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"in-memory-store.d.ts","sourceRoot":"","sources":["../../../src/store/in-memory/in-memory-store.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"in-memory-store.d.ts","sourceRoot":"","sources":["../../../src/store/in-memory/in-memory-store.ts"],"names":[],"mappings":"AAwCA,OAAO,KAAK,EACX,KAAK,EACL,cAAc,EACd,gBAAgB,EAChB,gBAAgB,EAEhB,gBAAgB,EAChB,gBAAgB,EAEhB,WAAW,EACX,YAAY,EACZ,MAAM,gBAAgB,CAAA;AACvB,OAAO,KAAK,EAGX,oBAAoB,EAEpB,MAAM,SAAS,CAAA;AAEhB,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;AAyBpF;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,qBAAa,aAAc,YAAW,KAAK;IAC1C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAS;IAClC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAc;IACvC,0GAA0G;IAC1G,OAAO,CAAC,QAAQ,CAAC,QA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,eAAe;YAUf,uBAAuB;YAkBvB,kBAAkB;IAsChC;;;OAGG;IACH,OAAO,CAAC,SAAS;IAKjB,mGAAmG;IACnG,OAAO,CAAC,UAAU;IAIlB,kFAAkF;IAClF,OAAO,CAAC,SAAS;IAIjB;;;OAGG;IACH,OAAO,CAAC,WAAW;IAUnB;;;;OAIG;IACH,OAAO,CAAC,SAAS;IAQjB,qHAAqH;YACvG,wBAAwB;IAKtC;;;OAGG;IACH,OAAO,CAAC,eAAe;IAiBvB;;;OAGG;IACH,OAAO,CAAC,eAAe;IAWvB,qGAAqG;YACvF,gBAAgB;YAOhB,cAAc;YAId,+BAA+B;YAW/B,gBAAgB;IAQ9B,OAAO,CAAC,aAAa;CAOrB"}
|
|
@@ -1,5 +1,59 @@
|
|
|
1
|
+
import { DistributiveOmit } from '../engine/engine.types';
|
|
2
|
+
import { ChangeLogEntry, StoreNotice } from '../store.types';
|
|
3
|
+
import { StoreRuntime } from '../../project/io/store-runtime.types';
|
|
4
|
+
import { DocumentRecord, ProjectChannelMessage } from '../../project/types';
|
|
5
|
+
import { AnyRawRecord, BlobRecord } from '../../types';
|
|
1
6
|
export type InMemoryStoreOptions = {
|
|
2
|
-
/**
|
|
7
|
+
/**
|
|
8
|
+
* When false, the store is a placeholder: mutations throw STORE_NOT_WRITABLE, reads answer empty,
|
|
9
|
+
* and it never reads, keeps or removes the state of its project. Default: true
|
|
10
|
+
*/
|
|
3
11
|
writable?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* The dialecte the store imports and exports files with; without it, `importFile` throws `IMPORT_FAILED`
|
|
14
|
+
* and `exportFile` `ASSERTION_FAILED`
|
|
15
|
+
*/
|
|
16
|
+
runtime?: StoreRuntime;
|
|
17
|
+
/**
|
|
18
|
+
* The dialecte of the project: with the name, which state the store reads and writes - two dialectes' projects
|
|
19
|
+
* of one name are two projects, as on every store that keeps them. Without it, the name alone.
|
|
20
|
+
*/
|
|
21
|
+
dialecteId?: string;
|
|
4
22
|
};
|
|
23
|
+
/** What the in-memory stores of one project hold, the same for each instance of that project in a realm. */
|
|
24
|
+
export type InMemoryState = {
|
|
25
|
+
documents: Map<string, DocumentRecord>;
|
|
26
|
+
/** The records of each document, by record table name. */
|
|
27
|
+
records: Map<string, Map<string, AnyRawRecord>>;
|
|
28
|
+
changelog: Map<string, ChangeLogEntry[]>;
|
|
29
|
+
/** The sequence number of each document's last applied changelog entry. */
|
|
30
|
+
heads: Map<string, number>;
|
|
31
|
+
/** The ids of the commits each document's undone entries carried when a later commit discarded them. */
|
|
32
|
+
discardedCommits: Map<string, Set<string>>;
|
|
33
|
+
blobs: Map<string, BlobRecord>;
|
|
34
|
+
blobData: Map<string, Map<string, Blob>>;
|
|
35
|
+
/** The `writeId`s of the imports running on a store of this project: an `open` keeps their documents. */
|
|
36
|
+
runningImports: Set<string>;
|
|
37
|
+
/** How many writes each document has taken (bulk writes, commits, undos, redos): what an export checks. */
|
|
38
|
+
versions: Map<string, number>;
|
|
39
|
+
};
|
|
40
|
+
/** A state as read: what a project with no state reads as, and all a placeholder store reads. */
|
|
41
|
+
export type ReadonlyInMemoryState = {
|
|
42
|
+
documents: ReadonlyMap<string, DocumentRecord>;
|
|
43
|
+
records: ReadonlyMap<string, ReadonlyMap<string, AnyRawRecord>>;
|
|
44
|
+
changelog: ReadonlyMap<string, readonly ChangeLogEntry[]>;
|
|
45
|
+
heads: ReadonlyMap<string, number>;
|
|
46
|
+
discardedCommits: ReadonlyMap<string, ReadonlySet<string>>;
|
|
47
|
+
blobs: ReadonlyMap<string, BlobRecord>;
|
|
48
|
+
blobData: ReadonlyMap<string, ReadonlyMap<string, Blob>>;
|
|
49
|
+
runningImports: ReadonlySet<string>;
|
|
50
|
+
versions: ReadonlyMap<string, number>;
|
|
51
|
+
};
|
|
52
|
+
/** A connection of an in-memory project listening to its changes: the store it is, and its listener. */
|
|
53
|
+
export type InMemoryListener = {
|
|
54
|
+
connection: object;
|
|
55
|
+
listener: (notice: StoreNotice) => void;
|
|
56
|
+
};
|
|
57
|
+
/** A project event as an in-memory store announces it, its timestamp added when told. */
|
|
58
|
+
export type InMemoryChange = DistributiveOmit<ProjectChannelMessage, 'timestamp'>;
|
|
5
59
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/store/in-memory/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,oBAAoB,GAAG;IAClC,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/store/in-memory/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AAC9D,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AACjE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAA;AACpE,OAAO,KAAK,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAA;AAC5E,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAEvD,MAAM,MAAM,oBAAoB,GAAG;IAClC;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;;OAGG;IACH,OAAO,CAAC,EAAE,YAAY,CAAA;IACtB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAED,4GAA4G;AAC5G,MAAM,MAAM,aAAa,GAAG;IAC3B,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE,cAAc,CAAC,CAAA;IACtC,0DAA0D;IAC1D,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC,CAAA;IAC/C,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE,cAAc,EAAE,CAAC,CAAA;IACxC,2EAA2E;IAC3E,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM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I,CAAA;CAAE,CAAA;AAE9F,yFAAyF;AACzF,MAAM,MAAM,cAAc,GAAG,gBAAgB,CAAC,qBAAqB,EAAE,WAAW,CAAC,CAAA"}
|
package/dist/store/index.d.ts
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
|
-
export type { Store, ChangeLogEntry, ChangeLogMeta, RecordSchema } from './store.types';
|
|
1
|
+
export type { Store, ChangeLogEntry, ChangeLogMeta, RecordSchema, ExportControl, ExportFileOptions, ExportFileParams, ExportFileResult, ExportProgress, ExportSource, ImportControl, ImportFileOptions, ImportFileParams, ImportFileResult, ImportPhase, ImportProgress, ImportTarget, StoreChange, StoreNotice, StoreResync, WriteOutcome, } from './store.types';
|
|
2
|
+
export { importOutcomeOf, writeOutcomeOf } from './write-outcome';
|
|
3
|
+
export { applyDocumentUpdates, assertDocumentPlace, parseDocumentPath, pathHolderOf, } from './document-path';
|
|
4
|
+
export type { DocumentPathParts, PathHolderCandidate } from './document-path.types';
|
|
5
|
+
export { DOCUMENT_PATH_INVISIBLE_CHARACTER, DOCUMENT_PATH_MAX_BYTES, DOCUMENT_PATH_SEGMENT_MAX_BYTES, DOCUMENT_PATH_SEPARATOR, DOCUMENT_UPDATE_FIELDS, } from './document-path.constants';
|
|
6
|
+
export { removeUnfinishedImports } from './unfinished-imports';
|
|
7
|
+
export type { HubEngineSpawner } from './engine/hub/realm-host.types';
|
|
2
8
|
export * from './local';
|
|
3
9
|
export * from './in-memory';
|
|
4
|
-
export { TABLE_DOCUMENTS, TABLE_CHANGELOG, TABLE_META, TABLE_RECORD_PREFIX, recordTableName, TABLE_BLOBS, TABLE_BLOB_PREFIX, blobTableName, DOCUMENTS_SCHEMA, CHANGELOG_SCHEMA, META_SCHEMA, BLOBS_SCHEMA, BLOB_DATA_SCHEMA, } from './store.constants';
|
|
10
|
+
export { TABLE_DOCUMENTS, TABLE_CHANGELOG, TABLE_META, TABLE_RECORD_PREFIX, recordTableName, TABLE_BLOBS, TABLE_BLOB_PREFIX, blobTableName, DOCUMENTS_SCHEMA, CHANGELOG_SCHEMA, META_SCHEMA, BLOBS_SCHEMA, BLOB_DATA_SCHEMA, EXPORT_BATCH_SIZE, } from './store.constants';
|
|
5
11
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/store/index.ts"],"names":[],"mappings":"AAAA,YAAY,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/store/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACX,KAAK,EACL,cAAc,EACd,aAAa,EACb,YAAY,EACZ,aAAa,EACb,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,cAAc,EACd,YAAY,EACZ,aAAa,EACb,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,WAAW,EACX,cAAc,EACd,YAAY,EACZ,WAAW,EACX,WAAW,EACX,WAAW,EACX,YAAY,GACZ,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AACjE,OAAO,EACN,oBAAoB,EACpB,mBAAmB,EACnB,iBAAiB,EACjB,YAAY,GACZ,MAAM,iBAAiB,CAAA;AACxB,YAAY,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AACnF,OAAO,EACN,iCAAiC,EACjC,uBAAuB,EACvB,+BAA+B,EAC/B,uBAAuB,EACvB,sBAAsB,GACtB,MAAM,2BAA2B,CAAA;AAClC,OAAO,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAA;AAC9D,YAAY,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAA;AACrE,cAAc,SAAS,CAAA;AACvB,cAAc,aAAa,CAAA;AAC3B,OAAO,EACN,eAAe,EACf,eAAe,EACf,UAAU,EACV,mBAAmB,EACnB,eAAe,EACf,WAAW,EACX,iBAAiB,EACjB,aAAa,EACb,gBAAgB,EAChB,gBAAgB,EAChB,WAAW,EACX,YAAY,EACZ,gBAAgB,EAChB,iBAAiB,GACjB,MAAM,mBAAmB,CAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/** How a refusal names a value of a type JSON has no form for. */
|
|
2
|
+
export declare const REFUSED_TYPES: Readonly<Record<'bigint' | 'function' | 'symbol', string>>;
|
|
3
|
+
/**
|
|
4
|
+
* The most arrays and objects a value handed to a store may nest, one in the other: well under
|
|
5
|
+
* SQLite's JSON reader (1,000 levels, the row payload's own two included) and every engine's stack,
|
|
6
|
+
* so every store refuses a deeper value alike, before anything is written.
|
|
7
|
+
*/
|
|
8
|
+
export declare const JSON_MAX_DEPTH = 512;
|
|
9
|
+
/**
|
|
10
|
+
* What a text holding a lone surrogate is not, in every refusal that names one (a stored value, a key,
|
|
11
|
+
* a path).
|
|
12
|
+
*/
|
|
13
|
+
export declare const NOT_WELL_FORMED_TEXT = "not well-formed UTF-16 (a lone surrogate)";
|
|
14
|
+
/** How the walk names a string value that is not well-formed. */
|
|
15
|
+
export declare const NOT_WELL_FORMED_VALUE_KIND = "text that is not well-formed UTF-16 (a lone surrogate)";
|
|
16
|
+
/** How the walk names an object key that is not well-formed (the key itself is not printed). */
|
|
17
|
+
export declare const NOT_WELL_FORMED_KEY_KIND = "a key that is not well-formed UTF-16 (a lone surrogate)";
|
|
18
|
+
//# sourceMappingURL=json-values.constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"json-values.constants.d.ts","sourceRoot":"","sources":["../../src/store/json-values.constants.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAClE,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,MAAM,CAAC,QAAQ,GAAG,UAAU,GAAG,QAAQ,EAAE,MAAM,CAAC,CAIpF,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,cAAc,MAAM,CAAA;AAEjC;;;GAGG;AACH,eAAO,MAAM,oBAAoB,8CAA8C,CAAA;AAE/E,iEAAiE;AACjE,eAAO,MAAM,0BAA0B,2DAAyC,CAAA;AAEhF,gGAAgG;AAChG,eAAO,MAAM,wBAAwB,4DAA0C,CAAA"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Check a value a write hands the store. A store keeps plain JSON values only: well-formed strings,
|
|
3
|
+
* finite numbers, booleans, null, and arrays and plain objects of them under well-formed keys, nested
|
|
4
|
+
* at most `JSON_MAX_DEPTH` levels counted from `value` (every store hands the same: a write's list of
|
|
5
|
+
* records or patches, or the document). A field holding `undefined` is dropped, as JSON drops a symbol
|
|
6
|
+
* key and a property that is not enumerable; any other value - text or a key holding a lone surrogate
|
|
7
|
+
* (SQLite would read it back changed), a Date, a Map, a Set, NaN or Infinity, a BigInt, a function, a
|
|
8
|
+
* symbol, an instance of a class, a raw JSON value, an object with a `toJSON` method (never called),
|
|
9
|
+
* `undefined` in an array, a cycle, a value nested deeper - refuses the write with
|
|
10
|
+
* `STORE_VALUE_NOT_JSON`, before anything is written. One walk, keys in the order JSON gives them,
|
|
11
|
+
* each value read once: a value must read the same each time (a getter answering something else at
|
|
12
|
+
* each read is checked as it read first).
|
|
13
|
+
*/
|
|
14
|
+
export declare function checkJsonValues(params: {
|
|
15
|
+
value: unknown;
|
|
16
|
+
}): void;
|
|
17
|
+
/**
|
|
18
|
+
* Check the id a commit is written under: kept on its history entry, it is well-formed text, as every
|
|
19
|
+
* text a store keeps (`STORE_VALUE_NOT_JSON`, field `writeId`).
|
|
20
|
+
*/
|
|
21
|
+
export declare function checkWriteId(params: {
|
|
22
|
+
writeId: string;
|
|
23
|
+
}): void;
|
|
24
|
+
/**
|
|
25
|
+
* The store's own copy of a value a write hands it, checked as `checkJsonValues` checks it: what
|
|
26
|
+
* `JSON.parse` would make of its JSON text, built without the text (`undefined` stays `undefined`).
|
|
27
|
+
*/
|
|
28
|
+
export declare function toJsonCopy<GenericValue>(params: {
|
|
29
|
+
value: GenericValue;
|
|
30
|
+
}): GenericValue;
|
|
31
|
+
/**
|
|
32
|
+
* The prototype of an object of no class of its own: `Object.prototype` (or none) for a plain
|
|
33
|
+
* object, `Array.prototype` for a plain array, of this realm or of another one - known by its own
|
|
34
|
+
* constructor's name, so a contrived prototype carrying a constructor named `Object` passes.
|
|
35
|
+
*/
|
|
36
|
+
export declare function isRootPrototype(params: {
|
|
37
|
+
prototype: unknown;
|
|
38
|
+
name: 'Object' | 'Array';
|
|
39
|
+
}): boolean;
|
|
40
|
+
//# sourceMappingURL=json-values.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"json-values.d.ts","sourceRoot":"","sources":["../../src/store/json-values.ts"],"names":[],"mappings":"AAWA;;;;;;;;;;;;GAYG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE;IAAE,KAAK,EAAE,OAAO,CAAA;CAAE,GAAG,IAAI,CAMhE;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAE9D;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,YAAY,EAAE,MAAM,EAAE;IAAE,KAAK,EAAE,YAAY,CAAA;CAAE,GAAG,YAAY,CAMtF;AAiKD;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE;IAAE,SAAS,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,QAAQ,GAAG,OAAO,CAAA;CAAE,GAAG,OAAO,CASjG"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A value the JSON walk meets: the key or index holding it (`''` at the root), whether an array
|
|
3
|
+
* holds it, and the objects and arrays it is held under (a cycle is one of them met again).
|
|
4
|
+
*/
|
|
5
|
+
export type JsonWalkStep = {
|
|
6
|
+
value: unknown;
|
|
7
|
+
field: string | number;
|
|
8
|
+
inArray: boolean;
|
|
9
|
+
ancestors: object[];
|
|
10
|
+
};
|
|
11
|
+
/** What a value is to the walk once it is known to be JSON: kept as it is, or walked into. */
|
|
12
|
+
export type JsonKind = 'leaf' | 'array' | 'object';
|
|
13
|
+
/** `JSON` with its raw-JSON members, which the TypeScript library does not declare yet. */
|
|
14
|
+
export type JsonWithRawJson = typeof JSON & {
|
|
15
|
+
rawJSON?: (text: string) => object;
|
|
16
|
+
isRawJSON?: (value: unknown) => boolean;
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=json-values.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"json-values.types.d.ts","sourceRoot":"","sources":["../../src/store/json-values.types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG;IAC1B,KAAK,EAAE,OAAO,CAAA;IACd,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;IACtB,OAAO,EAAE,OAAO,CAAA;IAChB,SAAS,EAAE,MAAM,EAAE,CAAA;CACnB,CAAA;AAED,8FAA8F;AAC9F,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAA;AAElD,2FAA2F;AAC3F,MAAM,MAAM,eAAe,GAAG,OAAO,IAAI,GAAG;IAC3C,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAA;IAClC,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,OAAO,CAAA;CACvC,CAAA"}
|