@dialecte/core 0.6.4 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/hub.worker-B1HcVDhn.js +2 -0
- package/dist/diagnostics/diagnostics.d.ts +30 -0
- package/dist/diagnostics/diagnostics.d.ts.map +1 -0
- package/dist/diagnostics/index.d.ts +3 -0
- package/dist/diagnostics/index.d.ts.map +1 -0
- package/dist/diagnostics/types.d.ts +77 -0
- package/dist/diagnostics/types.d.ts.map +1 -0
- package/dist/dialecte/create-dialecte-project.d.ts +11 -0
- package/dist/dialecte/create-dialecte-project.d.ts.map +1 -0
- package/dist/dialecte/create-project-factory.d.ts +14 -0
- package/dist/dialecte/create-project-factory.d.ts.map +1 -0
- package/dist/dialecte/define-dialecte.d.ts +12 -0
- package/dist/dialecte/define-dialecte.d.ts.map +1 -0
- package/dist/dialecte/dialecte.constants.d.ts +4 -0
- package/dist/dialecte/dialecte.constants.d.ts.map +1 -0
- package/dist/dialecte/dialecte.types.d.ts +75 -0
- package/dist/dialecte/dialecte.types.d.ts.map +1 -0
- package/dist/dialecte/index.d.ts +4 -0
- package/dist/dialecte/index.d.ts.map +1 -0
- package/dist/{project-DGQAe9G9.js → dialecte-gIPrRzni.js} +7225 -7511
- package/dist/document/bind-extensions.d.ts +4 -1
- package/dist/document/bind-extensions.d.ts.map +1 -1
- package/dist/document/document.d.ts +58 -5
- package/dist/document/document.d.ts.map +1 -1
- package/dist/document/progress/progress.types.d.ts +21 -4
- package/dist/document/progress/progress.types.d.ts.map +1 -1
- package/dist/document/query/find/ancestor/find-ancestor.d.ts +2 -0
- package/dist/document/query/find/ancestor/find-ancestor.d.ts.map +1 -1
- package/dist/document/query/find/by-attribute/find-by-attributes.d.ts +4 -0
- package/dist/document/query/find/by-attribute/find-by-attributes.d.ts.map +1 -1
- package/dist/document/query/find/descendant/find-descendant.d.ts +2 -0
- package/dist/document/query/find/descendant/find-descendant.d.ts.map +1 -1
- package/dist/document/query/get/attribute/get-attribute.d.ts +4 -0
- package/dist/document/query/get/attribute/get-attribute.d.ts.map +1 -1
- package/dist/document/query/get/attribute/get-attributes.d.ts +4 -0
- package/dist/document/query/get/attribute/get-attributes.d.ts.map +1 -1
- package/dist/document/query/get/definition/get-definition.d.ts +2 -0
- package/dist/document/query/get/definition/get-definition.d.ts.map +1 -1
- package/dist/document/query/get/record/get-child.d.ts +2 -0
- package/dist/document/query/get/record/get-child.d.ts.map +1 -1
- package/dist/document/query/get/record/get-children.d.ts +2 -0
- package/dist/document/query/get/record/get-children.d.ts.map +1 -1
- package/dist/document/query/get/record/get-record.d.ts +2 -0
- package/dist/document/query/get/record/get-record.d.ts.map +1 -1
- package/dist/document/query/get/record/get-records-by-tagname.d.ts +2 -0
- package/dist/document/query/get/record/get-records-by-tagname.d.ts.map +1 -1
- package/dist/document/query/get/record/get-records.d.ts +2 -0
- package/dist/document/query/get/record/get-records.d.ts.map +1 -1
- package/dist/document/query/get/record/load-live-records.d.ts +2 -0
- package/dist/document/query/get/record/load-live-records.d.ts.map +1 -1
- package/dist/document/query/get/record/resolve-record.d.ts +2 -0
- package/dist/document/query/get/record/resolve-record.d.ts.map +1 -1
- package/dist/document/query/get/record/staged-lookup.d.ts +4 -0
- package/dist/document/query/get/record/staged-lookup.d.ts.map +1 -1
- package/dist/document/query/get/tree/get-tree.d.ts +6 -0
- package/dist/document/query/get/tree/get-tree.d.ts.map +1 -1
- package/dist/document/query/main.d.ts +50 -15
- package/dist/document/query/main.d.ts.map +1 -1
- package/dist/document/query/snapshot/collect-snapshot.d.ts +2 -0
- package/dist/document/query/snapshot/collect-snapshot.d.ts.map +1 -1
- package/dist/document/query/snapshot/get-snapshot.d.ts +2 -0
- package/dist/document/query/snapshot/get-snapshot.d.ts.map +1 -1
- package/dist/document/query/snapshot/records-to-tree.d.ts +2 -0
- package/dist/document/query/snapshot/records-to-tree.d.ts.map +1 -1
- package/dist/document/query/tree-filter/omit.d.ts +8 -0
- package/dist/document/query/tree-filter/omit.d.ts.map +1 -1
- package/dist/document/query/tree-filter/order.d.ts +5 -2
- package/dist/document/query/tree-filter/order.d.ts.map +1 -1
- package/dist/document/query/tree-filter/unwrap.d.ts +2 -0
- package/dist/document/query/tree-filter/unwrap.d.ts.map +1 -1
- package/dist/document/staged-operations.d.ts +5 -1
- package/dist/document/staged-operations.d.ts.map +1 -1
- package/dist/document/transaction/clone/clone.d.ts +2 -0
- package/dist/document/transaction/clone/clone.d.ts.map +1 -1
- package/dist/document/transaction/commit/commit.d.ts.map +1 -1
- package/dist/document/transaction/commit/merge-operations.d.ts +1 -1
- package/dist/document/transaction/commit/merge-operations.d.ts.map +1 -1
- package/dist/document/transaction/commit/summarize-operations.d.ts +16 -0
- package/dist/document/transaction/commit/summarize-operations.d.ts.map +1 -0
- package/dist/document/transaction/commit/summarize-operations.types.d.ts +17 -0
- package/dist/document/transaction/commit/summarize-operations.types.d.ts.map +1 -0
- package/dist/document/transaction/create/create.d.ts +2 -0
- package/dist/document/transaction/create/create.d.ts.map +1 -1
- package/dist/document/transaction/guard.d.ts +5 -0
- package/dist/document/transaction/guard.d.ts.map +1 -1
- package/dist/document/transaction/index.d.ts +2 -0
- package/dist/document/transaction/index.d.ts.map +1 -1
- package/dist/document/transaction/main.d.ts +46 -16
- package/dist/document/transaction/main.d.ts.map +1 -1
- package/dist/document/transaction/stage-operations.d.ts.map +1 -1
- package/dist/document/transaction/update/update.d.ts +2 -0
- package/dist/document/transaction/update/update.d.ts.map +1 -1
- package/dist/document/types.d.ts +3 -5
- package/dist/document/types.d.ts.map +1 -1
- package/dist/engine-store-CIEqgPUb.js +348 -0
- package/dist/engine.constants-DBMjMmV9.js +98 -0
- package/dist/engine.d.ts +9 -0
- package/dist/engine.d.ts.map +1 -0
- package/dist/engine.js +15805 -0
- package/dist/errors/codes.d.ts +455 -0
- package/dist/errors/codes.d.ts.map +1 -1
- package/dist/errors/errors.constants.d.ts +3 -0
- package/dist/errors/errors.constants.d.ts.map +1 -0
- package/dist/errors/errors.d.ts +10 -0
- package/dist/errors/errors.d.ts.map +1 -1
- package/dist/errors/types.d.ts +14 -0
- package/dist/errors/types.d.ts.map +1 -1
- package/dist/helpers/assert-fixed.d.ts +3 -1
- package/dist/helpers/assert-fixed.d.ts.map +1 -1
- package/dist/helpers/assert-xml-characters.d.ts +35 -0
- package/dist/helpers/assert-xml-characters.d.ts.map +1 -0
- package/dist/helpers/assert-xml-characters.types.d.ts +26 -0
- package/dist/helpers/assert-xml-characters.types.d.ts.map +1 -0
- package/dist/helpers/assert-xsi-type.d.ts +4 -0
- package/dist/helpers/assert-xsi-type.d.ts.map +1 -1
- package/dist/helpers/converter.d.ts +21 -6
- package/dist/helpers/converter.d.ts.map +1 -1
- package/dist/helpers/evaluate-expectations.d.ts +21 -0
- package/dist/helpers/evaluate-expectations.d.ts.map +1 -0
- package/dist/helpers/evaluate-expectations.types.d.ts +31 -0
- package/dist/helpers/evaluate-expectations.types.d.ts.map +1 -0
- package/dist/helpers/guard.d.ts +24 -4
- package/dist/helpers/guard.d.ts.map +1 -1
- package/dist/helpers/index.d.ts +2 -0
- package/dist/helpers/index.d.ts.map +1 -1
- package/dist/helpers/merge-extensions.d.ts +2 -0
- package/dist/helpers/merge-extensions.d.ts.map +1 -1
- package/dist/helpers/read-attributes.d.ts +4 -0
- package/dist/helpers/read-attributes.d.ts.map +1 -1
- package/dist/helpers/standardizing.d.ts +10 -0
- package/dist/helpers/standardizing.d.ts.map +1 -1
- package/dist/helpers/strip-attributes.d.ts +2 -0
- package/dist/helpers/strip-attributes.d.ts.map +1 -1
- package/dist/helpers-DVShv41E.js +489 -0
- package/dist/helpers.js +3 -439
- package/dist/in-process-link-DBeAOZRp.js +2791 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +23 -3
- package/dist/perf/create-perf.d.ts +8 -1
- package/dist/perf/create-perf.d.ts.map +1 -1
- package/dist/perf/index.d.ts +1 -1
- package/dist/perf/index.d.ts.map +1 -1
- package/dist/perf/noop-perf.d.ts.map +1 -1
- package/dist/perf/perf.types.d.ts +65 -6
- package/dist/perf/perf.types.d.ts.map +1 -1
- package/dist/project/index.d.ts +7 -4
- package/dist/project/index.d.ts.map +1 -1
- package/dist/project/io/export-blob.d.ts +5 -2
- package/dist/project/io/export-blob.d.ts.map +1 -1
- package/dist/project/io/export-document.d.ts +5 -4
- package/dist/project/io/export-document.d.ts.map +1 -1
- package/dist/project/io/index.d.ts +1 -1
- package/dist/project/io/index.d.ts.map +1 -1
- package/dist/project/io/init-empty-document.d.ts +2 -0
- package/dist/project/io/init-empty-document.d.ts.map +1 -1
- package/dist/project/io/resolve-config.d.ts +4 -0
- package/dist/project/io/resolve-config.d.ts.map +1 -0
- package/dist/project/io/run-export.d.ts +19 -0
- package/dist/project/io/run-export.d.ts.map +1 -0
- package/dist/project/io/run-export.types.d.ts +45 -0
- package/dist/project/io/run-export.types.d.ts.map +1 -0
- package/dist/project/io/run-import.d.ts +15 -0
- package/dist/project/io/run-import.d.ts.map +1 -0
- package/dist/project/io/run-import.types.d.ts +19 -0
- package/dist/project/io/run-import.types.d.ts.map +1 -0
- package/dist/project/io/store-runtime.constants.d.ts +6 -0
- package/dist/project/io/store-runtime.constants.d.ts.map +1 -0
- package/dist/project/io/store-runtime.d.ts +12 -0
- package/dist/project/io/store-runtime.d.ts.map +1 -0
- package/dist/project/io/store-runtime.types.d.ts +18 -0
- package/dist/project/io/store-runtime.types.d.ts.map +1 -0
- package/dist/project/project-channel.d.ts +11 -0
- package/dist/project/project-channel.d.ts.map +1 -0
- package/dist/project/project.constants.d.ts +12 -0
- package/dist/project/project.constants.d.ts.map +1 -0
- package/dist/project/project.d.ts +339 -25
- package/dist/project/project.d.ts.map +1 -1
- package/dist/project/state/document-lifecycle.d.ts +6 -0
- package/dist/project/state/document-lifecycle.d.ts.map +1 -0
- package/dist/project/state/document-state.d.ts +4 -0
- package/dist/project/state/document-state.d.ts.map +1 -1
- package/dist/project/types.d.ts +158 -48
- package/dist/project/types.d.ts.map +1 -1
- package/dist/project-key-Ch34EtFa.js +1435 -0
- package/dist/rolldown-runtime-CYdcPHCu.js +12 -0
- package/dist/running-operations-vnijBvn7.js +76 -0
- package/dist/same-json-value-C6kUaoyt.js +1603 -0
- package/dist/sqlite.d.ts +5 -0
- package/dist/sqlite.d.ts.map +1 -0
- package/dist/sqlite.js +2671 -0
- package/dist/sqlite3.wasm +0 -0
- package/dist/store/apply-record-patch.d.ts +13 -0
- package/dist/store/apply-record-patch.d.ts.map +1 -0
- package/dist/store/closing-connections.d.ts +7 -0
- package/dist/store/closing-connections.d.ts.map +1 -0
- package/dist/store/closing-connections.types.d.ts +13 -0
- package/dist/store/closing-connections.types.d.ts.map +1 -0
- package/dist/store/commit-progress.d.ts +10 -0
- package/dist/store/commit-progress.d.ts.map +1 -0
- package/dist/store/compare-by-id.d.ts +10 -0
- package/dist/store/compare-by-id.d.ts.map +1 -0
- package/dist/store/document-path.constants.d.ts +20 -0
- package/dist/store/document-path.constants.d.ts.map +1 -0
- package/dist/store/document-path.d.ts +75 -0
- package/dist/store/document-path.d.ts.map +1 -0
- package/dist/store/document-path.types.d.ts +11 -0
- package/dist/store/document-path.types.d.ts.map +1 -0
- package/dist/store/engine/client/check-engine-wire.d.ts +8 -0
- package/dist/store/engine/client/check-engine-wire.d.ts.map +1 -0
- package/dist/store/engine/client/client.constants.d.ts +30 -0
- package/dist/store/engine/client/client.constants.d.ts.map +1 -0
- package/dist/store/engine/client/client.types.d.ts +200 -0
- package/dist/store/engine/client/client.types.d.ts.map +1 -0
- package/dist/store/engine/client/engine-client.d.ts +15 -0
- package/dist/store/engine/client/engine-client.d.ts.map +1 -0
- package/dist/store/engine/client/engine-control.d.ts +16 -0
- package/dist/store/engine/client/engine-control.d.ts.map +1 -0
- package/dist/store/engine/client/heartbeat-watch.d.ts +17 -0
- package/dist/store/engine/client/heartbeat-watch.d.ts.map +1 -0
- package/dist/store/engine/client/hub-connector.d.ts +11 -0
- package/dist/store/engine/client/hub-connector.d.ts.map +1 -0
- package/dist/store/engine/client/hub-connector.types.d.ts +25 -0
- package/dist/store/engine/client/hub-connector.types.d.ts.map +1 -0
- package/dist/store/engine/client/worker-connector.d.ts +32 -0
- package/dist/store/engine/client/worker-connector.d.ts.map +1 -0
- package/dist/store/engine/creation-refusal.d.ts +10 -0
- package/dist/store/engine/creation-refusal.d.ts.map +1 -0
- package/dist/store/engine/dialecte-refusal.d.ts +18 -0
- package/dist/store/engine/dialecte-refusal.d.ts.map +1 -0
- package/dist/store/engine/engine-store.d.ts +163 -0
- package/dist/store/engine/engine-store.d.ts.map +1 -0
- package/dist/store/engine/engine-store.types.d.ts +53 -0
- package/dist/store/engine/engine-store.types.d.ts.map +1 -0
- package/dist/store/engine/engine.constants.d.ts +14 -0
- package/dist/store/engine/engine.constants.d.ts.map +1 -0
- package/dist/store/engine/engine.types.d.ts +165 -0
- package/dist/store/engine/engine.types.d.ts.map +1 -0
- package/dist/store/engine/host/engine-wire.d.ts +19 -0
- package/dist/store/engine/host/engine-wire.d.ts.map +1 -0
- package/dist/store/engine/host/heartbeat.d.ts +33 -0
- package/dist/store/engine/host/heartbeat.d.ts.map +1 -0
- package/dist/store/engine/host/host.constants.d.ts +13 -0
- package/dist/store/engine/host/host.constants.d.ts.map +1 -0
- package/dist/store/engine/host/host.types.d.ts +65 -0
- package/dist/store/engine/host/host.types.d.ts.map +1 -0
- package/dist/store/engine/host/store-events.d.ts +14 -0
- package/dist/store/engine/host/store-events.d.ts.map +1 -0
- package/dist/store/engine/hub/hub-client.constants.d.ts +27 -0
- package/dist/store/engine/hub/hub-client.constants.d.ts.map +1 -0
- package/dist/store/engine/hub/hub-client.d.ts +46 -0
- package/dist/store/engine/hub/hub-client.d.ts.map +1 -0
- package/dist/store/engine/hub/hub-client.types.d.ts +208 -0
- package/dist/store/engine/hub/hub-client.types.d.ts.map +1 -0
- package/dist/store/engine/hub/hub-protocol.types.d.ts +193 -0
- package/dist/store/engine/hub/hub-protocol.types.d.ts.map +1 -0
- package/dist/store/engine/hub/hub-router.d.ts +9 -0
- package/dist/store/engine/hub/hub-router.d.ts.map +1 -0
- package/dist/store/engine/hub/hub-shell.d.ts +13 -0
- package/dist/store/engine/hub/hub-shell.d.ts.map +1 -0
- package/dist/store/engine/hub/hub-shell.types.d.ts +64 -0
- package/dist/store/engine/hub/hub-shell.types.d.ts.map +1 -0
- package/dist/store/engine/hub/hub.constants.d.ts +33 -0
- package/dist/store/engine/hub/hub.constants.d.ts.map +1 -0
- package/dist/store/engine/hub/hub.types.d.ts +305 -0
- package/dist/store/engine/hub/hub.types.d.ts.map +1 -0
- package/dist/store/engine/hub/hub.worker.d.ts +2 -0
- package/dist/store/engine/hub/hub.worker.d.ts.map +1 -0
- package/dist/store/engine/hub/realm-host.d.ts +10 -0
- package/dist/store/engine/hub/realm-host.d.ts.map +1 -0
- package/dist/store/engine/hub/realm-host.types.d.ts +78 -0
- package/dist/store/engine/hub/realm-host.types.d.ts.map +1 -0
- package/dist/store/engine/project-key.d.ts +15 -0
- package/dist/store/engine/project-key.d.ts.map +1 -0
- package/dist/store/engine/wire/error-envelope.d.ts +25 -0
- package/dist/store/engine/wire/error-envelope.d.ts.map +1 -0
- package/dist/store/engine/wire/wire-values.d.ts +33 -0
- package/dist/store/engine/wire/wire-values.d.ts.map +1 -0
- package/dist/store/engine/wire/wire.constants.d.ts +116 -0
- package/dist/store/engine/wire/wire.constants.d.ts.map +1 -0
- package/dist/store/engine/wire/wire.types.d.ts +119 -0
- package/dist/store/engine/wire/wire.types.d.ts.map +1 -0
- package/dist/store/hub-public.d.ts +33 -0
- package/dist/store/hub-public.d.ts.map +1 -0
- package/dist/store/ignore-destroy-outcome.d.ts +6 -0
- package/dist/store/ignore-destroy-outcome.d.ts.map +1 -0
- package/dist/store/in-memory/in-memory-state.d.ts +46 -0
- package/dist/store/in-memory/in-memory-state.d.ts.map +1 -0
- package/dist/store/in-memory/in-memory-store.constants.d.ts +7 -0
- package/dist/store/in-memory/in-memory-store.constants.d.ts.map +1 -0
- package/dist/store/in-memory/in-memory-store.d.ts +105 -17
- package/dist/store/in-memory/in-memory-store.d.ts.map +1 -1
- package/dist/store/in-memory/types.d.ts +55 -1
- package/dist/store/in-memory/types.d.ts.map +1 -1
- package/dist/store/index.d.ts +8 -2
- package/dist/store/index.d.ts.map +1 -1
- package/dist/store/json-values.constants.d.ts +18 -0
- package/dist/store/json-values.constants.d.ts.map +1 -0
- package/dist/store/json-values.d.ts +40 -0
- package/dist/store/json-values.d.ts.map +1 -0
- package/dist/store/json-values.types.d.ts +18 -0
- package/dist/store/json-values.types.d.ts.map +1 -0
- package/dist/store/local/dexie-store.constants.d.ts +20 -0
- package/dist/store/local/dexie-store.constants.d.ts.map +1 -0
- package/dist/store/local/dexie-store.d.ts +134 -5
- package/dist/store/local/dexie-store.d.ts.map +1 -1
- package/dist/store/local/types.d.ts +9 -0
- package/dist/store/local/types.d.ts.map +1 -1
- package/dist/store/lost-write.d.ts +32 -0
- package/dist/store/lost-write.d.ts.map +1 -0
- package/dist/store/lost-write.types.d.ts +4 -0
- package/dist/store/lost-write.types.d.ts.map +1 -0
- package/dist/store/open-connections.d.ts +4 -0
- package/dist/store/open-connections.d.ts.map +1 -0
- package/dist/store/open-connections.types.d.ts +17 -0
- package/dist/store/open-connections.types.d.ts.map +1 -0
- package/dist/store/own-import.d.ts +10 -0
- package/dist/store/own-import.d.ts.map +1 -0
- package/dist/store/project-name.d.ts +10 -0
- package/dist/store/project-name.d.ts.map +1 -0
- package/dist/store/resolve-store.d.ts +28 -4
- package/dist/store/resolve-store.d.ts.map +1 -1
- package/dist/store/running-operations.d.ts +7 -0
- package/dist/store/running-operations.d.ts.map +1 -0
- package/dist/store/running-operations.types.d.ts +10 -0
- package/dist/store/running-operations.types.d.ts.map +1 -0
- package/dist/store/same-json-value.d.ts +9 -0
- package/dist/store/same-json-value.d.ts.map +1 -0
- package/dist/store/sqlite/adapter/in-process-link.d.ts +20 -0
- package/dist/store/sqlite/adapter/in-process-link.d.ts.map +1 -0
- package/dist/store/sqlite/adapter/in-process-link.types.d.ts +21 -0
- package/dist/store/sqlite/adapter/in-process-link.types.d.ts.map +1 -0
- package/dist/store/sqlite/adapter/realm-storage.d.ts +10 -0
- package/dist/store/sqlite/adapter/realm-storage.d.ts.map +1 -0
- package/dist/store/sqlite/adapter/sqlite-connector.d.ts +14 -0
- package/dist/store/sqlite/adapter/sqlite-connector.d.ts.map +1 -0
- package/dist/store/sqlite/adapter/sqlite-engine-settings.d.ts +4 -0
- package/dist/store/sqlite/adapter/sqlite-engine-settings.d.ts.map +1 -0
- package/dist/store/sqlite/adapter/sqlite-hub-spawner.d.ts +8 -0
- package/dist/store/sqlite/adapter/sqlite-hub-spawner.d.ts.map +1 -0
- package/dist/store/sqlite/adapter/sqlite-hub-spawner.types.d.ts +5 -0
- package/dist/store/sqlite/adapter/sqlite-hub-spawner.types.d.ts.map +1 -0
- package/dist/store/sqlite/adapter/sqlite-worker-connector.d.ts +8 -0
- package/dist/store/sqlite/adapter/sqlite-worker-connector.d.ts.map +1 -0
- package/dist/store/sqlite/adapter/sqlite-worker-connector.types.d.ts +5 -0
- package/dist/store/sqlite/adapter/sqlite-worker-connector.types.d.ts.map +1 -0
- package/dist/store/sqlite/engine/blobs.d.ts +55 -0
- package/dist/store/sqlite/engine/blobs.d.ts.map +1 -0
- package/dist/store/sqlite/engine/bulk-insert.d.ts +31 -0
- package/dist/store/sqlite/engine/bulk-insert.d.ts.map +1 -0
- package/dist/store/sqlite/engine/commit.d.ts +20 -0
- package/dist/store/sqlite/engine/commit.d.ts.map +1 -0
- package/dist/store/sqlite/engine/device-cache.d.ts +13 -0
- package/dist/store/sqlite/engine/device-cache.d.ts.map +1 -0
- package/dist/store/sqlite/engine/engine-errors.d.ts +26 -0
- package/dist/store/sqlite/engine/engine-errors.d.ts.map +1 -0
- package/dist/store/sqlite/engine/engine.constants.d.ts +144 -0
- package/dist/store/sqlite/engine/engine.constants.d.ts.map +1 -0
- package/dist/store/sqlite/engine/engine.types.d.ts +361 -0
- package/dist/store/sqlite/engine/engine.types.d.ts.map +1 -0
- package/dist/store/sqlite/engine/history.d.ts +114 -0
- package/dist/store/sqlite/engine/history.d.ts.map +1 -0
- package/dist/store/sqlite/engine/import-queue.d.ts +7 -0
- package/dist/store/sqlite/engine/import-queue.d.ts.map +1 -0
- package/dist/store/sqlite/engine/import-target.d.ts +23 -0
- package/dist/store/sqlite/engine/import-target.d.ts.map +1 -0
- package/dist/store/sqlite/engine/import-window.d.ts +23 -0
- package/dist/store/sqlite/engine/import-window.d.ts.map +1 -0
- package/dist/store/sqlite/engine/reclaim.d.ts +13 -0
- package/dist/store/sqlite/engine/reclaim.d.ts.map +1 -0
- package/dist/store/sqlite/engine/records.d.ts +117 -0
- package/dist/store/sqlite/engine/records.d.ts.map +1 -0
- package/dist/store/sqlite/engine/registry.d.ts +76 -0
- package/dist/store/sqlite/engine/registry.d.ts.map +1 -0
- package/dist/store/sqlite/engine/schema.d.ts +57 -0
- package/dist/store/sqlite/engine/schema.d.ts.map +1 -0
- package/dist/store/sqlite/engine/sqlite-engine.d.ts +14 -0
- package/dist/store/sqlite/engine/sqlite-engine.d.ts.map +1 -0
- package/dist/store/sqlite/engine/transaction.d.ts +12 -0
- package/dist/store/sqlite/engine/transaction.d.ts.map +1 -0
- package/dist/store/sqlite/list-projects.constants.d.ts +12 -0
- package/dist/store/sqlite/list-projects.constants.d.ts.map +1 -0
- package/dist/store/sqlite/list-projects.d.ts +22 -0
- package/dist/store/sqlite/list-projects.d.ts.map +1 -0
- package/dist/store/sqlite/list-projects.types.d.ts +28 -0
- package/dist/store/sqlite/list-projects.types.d.ts.map +1 -0
- package/dist/store/sqlite/load-sqlite.d.ts +11 -0
- package/dist/store/sqlite/load-sqlite.d.ts.map +1 -0
- package/dist/store/sqlite/runtime/close-engine.d.ts +18 -0
- package/dist/store/sqlite/runtime/close-engine.d.ts.map +1 -0
- package/dist/store/sqlite/runtime/install-pool.d.ts +94 -0
- package/dist/store/sqlite/runtime/install-pool.d.ts.map +1 -0
- package/dist/store/sqlite/runtime/pool-header.d.ts +13 -0
- package/dist/store/sqlite/runtime/pool-header.d.ts.map +1 -0
- package/dist/store/sqlite/runtime/progress-beat.d.ts +13 -0
- package/dist/store/sqlite/runtime/progress-beat.d.ts.map +1 -0
- package/dist/store/sqlite/runtime/runtime.constants.d.ts +57 -0
- package/dist/store/sqlite/runtime/runtime.constants.d.ts.map +1 -0
- package/dist/store/sqlite/runtime/runtime.types.d.ts +56 -0
- package/dist/store/sqlite/runtime/runtime.types.d.ts.map +1 -0
- package/dist/store/sqlite/runtime/serve-dialecte-engine.d.ts +16 -0
- package/dist/store/sqlite/runtime/serve-dialecte-engine.d.ts.map +1 -0
- package/dist/store/sqlite/sqlite-store-of.d.ts +7 -0
- package/dist/store/sqlite/sqlite-store-of.d.ts.map +1 -0
- package/dist/store/sqlite/sqlite-text.d.ts +20 -0
- package/dist/store/sqlite/sqlite-text.d.ts.map +1 -0
- package/dist/store/sqlite/sqlite-wasm-url.d.ts +9 -0
- package/dist/store/sqlite/sqlite-wasm-url.d.ts.map +1 -0
- package/dist/store/sqlite/sqlite.constants.d.ts +15 -0
- package/dist/store/sqlite/sqlite.constants.d.ts.map +1 -0
- package/dist/store/sqlite/sqlite.types.d.ts +36 -0
- package/dist/store/sqlite/sqlite.types.d.ts.map +1 -0
- package/dist/store/sqlite-storage.constants.d.ts +14 -0
- package/dist/store/sqlite-storage.constants.d.ts.map +1 -0
- package/dist/store/sqlite-storage.d.ts +22 -0
- package/dist/store/sqlite-storage.d.ts.map +1 -0
- package/dist/store/sqlite-storage.types.d.ts +24 -0
- package/dist/store/sqlite-storage.types.d.ts.map +1 -0
- package/dist/store/store-errors.d.ts +51 -0
- package/dist/store/store-errors.d.ts.map +1 -0
- package/dist/store/store.constants.d.ts +15 -3
- package/dist/store/store.constants.d.ts.map +1 -1
- package/dist/store/store.types.d.ts +280 -16
- package/dist/store/store.types.d.ts.map +1 -1
- package/dist/store/stored-record.d.ts +16 -0
- package/dist/store/stored-record.d.ts.map +1 -0
- package/dist/store/unfinished-imports.d.ts +15 -0
- package/dist/store/unfinished-imports.d.ts.map +1 -0
- package/dist/store/write-outcome.d.ts +34 -0
- package/dist/store/write-outcome.d.ts.map +1 -0
- package/dist/test/assert-valid-xml/assert-valid-xml.constants.d.ts +7 -0
- package/dist/test/assert-valid-xml/assert-valid-xml.constants.d.ts.map +1 -0
- package/dist/test/assert-valid-xml/assert-valid-xml.d.ts +19 -18
- package/dist/test/assert-valid-xml/assert-valid-xml.d.ts.map +1 -1
- package/dist/test/assert-valid-xml/assert-valid-xml.types.d.ts +8 -4
- package/dist/test/assert-valid-xml/assert-valid-xml.types.d.ts.map +1 -1
- package/dist/test/assert-xml/assert-xml.constants.d.ts +25 -0
- package/dist/test/assert-xml/assert-xml.constants.d.ts.map +1 -0
- package/dist/test/assert-xml/assert-xml.d.ts +23 -34
- package/dist/test/assert-xml/assert-xml.d.ts.map +1 -1
- package/dist/test/assert-xml/assert-xml.types.d.ts +48 -0
- package/dist/test/assert-xml/assert-xml.types.d.ts.map +1 -0
- package/dist/test/assert-xml/describe-nearby.d.ts +16 -0
- package/dist/test/assert-xml/describe-nearby.d.ts.map +1 -0
- package/dist/test/assert-xml/describe-node-place.d.ts +15 -0
- package/dist/test/assert-xml/describe-node-place.d.ts.map +1 -0
- package/dist/test/assert-xml/index.d.ts +1 -1
- package/dist/test/assert-xml/index.d.ts.map +1 -1
- package/dist/test/assert-xml/query-failure-message.d.ts +24 -0
- package/dist/test/assert-xml/query-failure-message.d.ts.map +1 -0
- package/dist/test/assert-xml/read-xpath-step.d.ts +8 -0
- package/dist/test/assert-xml/read-xpath-step.d.ts.map +1 -0
- package/dist/test/assert-xml/xpath-parser.d.ts +2 -1
- package/dist/test/assert-xml/xpath-parser.d.ts.map +1 -1
- package/dist/test/config.d.ts +5 -0
- package/dist/test/config.d.ts.map +1 -1
- package/dist/test/constant.d.ts +2 -0
- package/dist/test/constant.d.ts.map +1 -1
- package/dist/test/create-test-dialecte.d.ts +32 -37
- package/dist/test/create-test-dialecte.d.ts.map +1 -1
- package/dist/test/create-test-dialecte.types.d.ts +99 -0
- package/dist/test/create-test-dialecte.types.d.ts.map +1 -0
- package/dist/test/create-test-helpers-internal.types.d.ts +19 -0
- package/dist/test/create-test-helpers-internal.types.d.ts.map +1 -0
- package/dist/test/create-test-helpers.d.ts +13 -0
- package/dist/test/create-test-helpers.d.ts.map +1 -0
- package/dist/test/create-test-helpers.types.d.ts +50 -0
- package/dist/test/create-test-helpers.types.d.ts.map +1 -0
- package/dist/test/fixtures/test-entry-scan-constraint.d.ts +3 -0
- package/dist/test/fixtures/test-entry-scan-constraint.d.ts.map +1 -0
- package/dist/test/fixtures/test-entry-scan-edges.types.d.ts +10 -0
- package/dist/test/fixtures/test-entry-scan-edges.types.d.ts.map +1 -0
- package/dist/test/fixtures/test-entry-scan-recursive.d.ts +4 -0
- package/dist/test/fixtures/test-entry-scan-recursive.d.ts.map +1 -0
- package/dist/test/fixtures/test-entry-scan-recursive.types.d.ts +15 -0
- package/dist/test/fixtures/test-entry-scan-recursive.types.d.ts.map +1 -0
- package/dist/test/fixtures/test-entry-scan-shapes.d.ts +14 -0
- package/dist/test/fixtures/test-entry-scan-shapes.d.ts.map +1 -0
- package/dist/test/fixtures/test-entry-scan-shapes.types.d.ts +14 -0
- package/dist/test/fixtures/test-entry-scan-shapes.types.d.ts.map +1 -0
- package/dist/test/fixtures/test-entry-scan-tree.d.ts +3 -0
- package/dist/test/fixtures/test-entry-scan-tree.d.ts.map +1 -0
- package/dist/test/fixtures/test-entry-scan.d.ts +5 -0
- package/dist/test/fixtures/test-entry-scan.d.ts.map +1 -0
- package/dist/test/fixtures/test-entry-scan.types.d.ts +5 -0
- package/dist/test/fixtures/test-entry-scan.types.d.ts.map +1 -0
- package/dist/test/generated/definition.generated.d.ts +5 -0
- package/dist/test/generated/definition.generated.d.ts.map +1 -1
- package/dist/test/in-memory-storage.setup.d.ts +2 -0
- package/dist/test/in-memory-storage.setup.d.ts.map +1 -0
- package/dist/test/index.d.ts +6 -0
- package/dist/test/index.d.ts.map +1 -1
- package/dist/test/normalize-uuids.constants.d.ts +3 -0
- package/dist/test/normalize-uuids.constants.d.ts.map +1 -0
- package/dist/test/normalize-uuids.d.ts +12 -0
- package/dist/test/normalize-uuids.d.ts.map +1 -1
- package/dist/test/run-test-cases.d.ts +30 -11
- package/dist/test/run-test-cases.d.ts.map +1 -1
- package/dist/test/run-test-cases.type.d.ts +16 -0
- package/dist/test/run-test-cases.type.d.ts.map +1 -1
- package/dist/test/sqlite-storage.setup.d.ts +1 -0
- package/dist/test/sqlite-storage.setup.d.ts.map +1 -0
- package/dist/test/test-dialecte-setup.d.ts +31 -0
- package/dist/test/test-dialecte-setup.d.ts.map +1 -0
- package/dist/test/test-dialecte-setup.types.d.ts +29 -0
- package/dist/test/test-dialecte-setup.types.d.ts.map +1 -0
- package/dist/test/test-dialecte.d.ts +2722 -0
- package/dist/test/test-dialecte.d.ts.map +1 -0
- package/dist/test/test-dialecte.types.d.ts +3 -0
- package/dist/test/test-dialecte.types.d.ts.map +1 -0
- package/dist/test/test-dialecte.worker.d.ts +2 -0
- package/dist/test/test-dialecte.worker.d.ts.map +1 -0
- package/dist/test/test-entry-environment.constants.d.ts +27 -0
- package/dist/test/test-entry-environment.constants.d.ts.map +1 -0
- package/dist/test/test-record.d.ts +49 -1
- package/dist/test/test-record.d.ts.map +1 -1
- package/dist/test/test-storage/index.d.ts +5 -0
- package/dist/test/test-storage/index.d.ts.map +1 -0
- package/dist/test/test-storage/read-test-storage.d.ts +4 -0
- package/dist/test/test-storage/read-test-storage.d.ts.map +1 -0
- package/dist/test/test-storage/resolve-test-storage.d.ts +9 -0
- package/dist/test/test-storage/resolve-test-storage.d.ts.map +1 -0
- package/dist/test/test-storage/test-storage.constants.d.ts +9 -0
- package/dist/test/test-storage/test-storage.constants.d.ts.map +1 -0
- package/dist/test/test-storage/test-storage.types.d.ts +15 -0
- package/dist/test/test-storage/test-storage.types.d.ts.map +1 -0
- package/dist/test/test-storage/test-store-for.d.ts +19 -0
- package/dist/test/test-storage/test-store-for.d.ts.map +1 -0
- package/dist/test/test-storage/use-test-storage.d.ts +14 -0
- package/dist/test/test-storage/use-test-storage.d.ts.map +1 -0
- package/dist/test/test-timing.constants.d.ts +15 -0
- package/dist/test/test-timing.constants.d.ts.map +1 -0
- package/dist/test/xml/engine-console.d.ts +6 -0
- package/dist/test/xml/engine-console.d.ts.map +1 -0
- package/dist/test/xml/engine.d.ts +3 -0
- package/dist/test/xml/engine.d.ts.map +1 -0
- package/dist/test/xml/index.d.ts +8 -0
- package/dist/test/xml/index.d.ts.map +1 -0
- package/dist/test/xml/malformed-xml-error.d.ts +5 -0
- package/dist/test/xml/malformed-xml-error.d.ts.map +1 -0
- package/dist/test/xml/print-node.d.ts +7 -0
- package/dist/test/xml/print-node.d.ts.map +1 -0
- package/dist/test/xml/select-nodes.d.ts +14 -0
- package/dist/test/xml/select-nodes.d.ts.map +1 -0
- package/dist/test/xml/with-xml-document.constants.d.ts +7 -0
- package/dist/test/xml/with-xml-document.constants.d.ts.map +1 -0
- package/dist/test/xml/with-xml-document.d.ts +14 -0
- package/dist/test/xml/with-xml-document.d.ts.map +1 -0
- package/dist/test/xml/xml-query-refused-error.d.ts +13 -0
- package/dist/test/xml/xml-query-refused-error.d.ts.map +1 -0
- package/dist/test/xml/xml.constants.d.ts +16 -0
- package/dist/test/xml/xml.constants.d.ts.map +1 -0
- package/dist/test/xml/xml.types.d.ts +31 -0
- package/dist/test/xml/xml.types.d.ts.map +1 -0
- package/dist/test/xsd/test-ext.xsd +226 -0
- package/dist/test/xsd/test.xsd +528 -0
- package/dist/test.js +3427 -406
- package/dist/types/dialecte-config.d.ts +6 -0
- package/dist/types/dialecte-config.d.ts.map +1 -1
- package/dist/types/io.d.ts +33 -25
- package/dist/types/io.d.ts.map +1 -1
- package/dist/utils/attribute-rules.d.ts +16 -1
- package/dist/utils/attribute-rules.d.ts.map +1 -1
- package/dist/utils/child-occurrences.constants.d.ts +4 -0
- package/dist/utils/child-occurrences.constants.d.ts.map +1 -0
- package/dist/utils/child-occurrences.d.ts +17 -0
- package/dist/utils/child-occurrences.d.ts.map +1 -0
- package/dist/utils/child-occurrences.types.d.ts +6 -0
- package/dist/utils/child-occurrences.types.d.ts.map +1 -0
- package/dist/utils/datatype.d.ts +4 -0
- package/dist/utils/datatype.d.ts.map +1 -1
- package/dist/utils/format-xml.d.ts +4 -0
- package/dist/utils/format-xml.d.ts.map +1 -1
- package/dist/utils/index.d.ts +5 -1
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/invariant.d.ts +2 -0
- package/dist/utils/invariant.d.ts.map +1 -1
- package/dist/utils/namespaces.d.ts +15 -1
- package/dist/utils/namespaces.d.ts.map +1 -1
- package/dist/utils/order-children.d.ts +14 -3
- package/dist/utils/order-children.d.ts.map +1 -1
- package/dist/utils/order-children.types.d.ts +10 -0
- package/dist/utils/order-children.types.d.ts.map +1 -0
- package/dist/utils/particle-occurrences.d.ts +4 -0
- package/dist/utils/particle-occurrences.d.ts.map +1 -0
- package/dist/utils/required-choices.d.ts +17 -0
- package/dist/utils/required-choices.d.ts.map +1 -0
- package/dist/utils/required-choices.types.d.ts +15 -0
- package/dist/utils/required-choices.types.d.ts.map +1 -0
- package/dist/utils/resolve-definition.d.ts +4 -0
- package/dist/utils/resolve-definition.d.ts.map +1 -1
- package/dist/utils/save-to-disk.constants.d.ts +3 -0
- package/dist/utils/save-to-disk.constants.d.ts.map +1 -0
- package/dist/utils/save-to-disk.d.ts +17 -5
- package/dist/utils/save-to-disk.d.ts.map +1 -1
- package/dist/utils/save-to-disk.types.d.ts +17 -0
- package/dist/utils/save-to-disk.types.d.ts.map +1 -0
- package/dist/utils/seeded-uuid.constants.d.ts +5 -0
- package/dist/utils/seeded-uuid.constants.d.ts.map +1 -0
- package/dist/utils/seeded-uuid.d.ts +15 -0
- package/dist/utils/seeded-uuid.d.ts.map +1 -0
- package/dist/utils/seeded-uuid.types.d.ts +8 -0
- package/dist/utils/seeded-uuid.types.d.ts.map +1 -0
- package/dist/utils/tell-listener.constants.d.ts +9 -0
- package/dist/utils/tell-listener.constants.d.ts.map +1 -0
- package/dist/utils/tell-listener.d.ts +24 -0
- package/dist/utils/tell-listener.d.ts.map +1 -0
- package/dist/utils/xml-characters.constants.d.ts +9 -0
- package/dist/utils/xml-characters.constants.d.ts.map +1 -0
- package/dist/utils/xml-characters.d.ts +8 -0
- package/dist/utils/xml-characters.d.ts.map +1 -0
- package/dist/utils/xml-whitespace.constants.d.ts +8 -0
- package/dist/utils/xml-whitespace.constants.d.ts.map +1 -0
- package/dist/utils/xml-whitespace.d.ts +19 -0
- package/dist/utils/xml-whitespace.d.ts.map +1 -0
- package/dist/utils/xsi-type.d.ts +4 -0
- package/dist/utils/xsi-type.d.ts.map +1 -1
- package/dist/utils/yield-to-queue.d.ts +6 -0
- package/dist/utils/yield-to-queue.d.ts.map +1 -0
- package/dist/utils-USNkj4sT.js +1275 -0
- package/dist/utils.js +1 -2
- package/dist/xml/build/document-root.d.ts +7 -0
- package/dist/xml/build/document-root.d.ts.map +1 -0
- package/dist/xml/build/index.d.ts +0 -5
- package/dist/xml/build/index.d.ts.map +1 -1
- package/dist/xml/build/record-element.d.ts +15 -0
- package/dist/xml/build/record-element.d.ts.map +1 -0
- package/dist/xml/build/record-element.types.d.ts +12 -0
- package/dist/xml/build/record-element.types.d.ts.map +1 -0
- package/dist/xml/build/write-xml-records.d.ts +7 -0
- package/dist/xml/build/write-xml-records.d.ts.map +1 -0
- package/dist/xml/build/write-xml-records.types.d.ts +11 -0
- package/dist/xml/build/write-xml-records.types.d.ts.map +1 -0
- package/dist/xml/build/xml-element.d.ts +79 -0
- package/dist/xml/build/xml-element.d.ts.map +1 -0
- package/dist/xml/build/xml-element.types.d.ts +34 -0
- package/dist/xml/build/xml-element.types.d.ts.map +1 -0
- package/dist/xml/build/xml-writer.constants.d.ts +24 -0
- package/dist/xml/build/xml-writer.constants.d.ts.map +1 -0
- package/dist/xml/build/xml-writer.d.ts +40 -0
- package/dist/xml/build/xml-writer.d.ts.map +1 -0
- package/dist/xml/build/xml-writer.types.d.ts +34 -0
- package/dist/xml/build/xml-writer.types.d.ts.map +1 -0
- package/dist/xml/dom/index.d.ts +3 -0
- package/dist/xml/dom/index.d.ts.map +1 -0
- package/dist/xml/dom/xml-document-from-file.d.ts +10 -0
- package/dist/xml/dom/xml-document-from-file.d.ts.map +1 -0
- package/dist/xml/dom/xml-document-from-file.types.d.ts +5 -0
- package/dist/xml/dom/xml-document-from-file.types.d.ts.map +1 -0
- package/dist/xml/index.d.ts +1 -0
- package/dist/xml/index.d.ts.map +1 -1
- package/dist/xml/inspect-xml.d.ts +2 -0
- package/dist/xml/inspect-xml.d.ts.map +1 -1
- package/dist/xml/parse/index.d.ts +1 -1
- package/dist/xml/parse/index.d.ts.map +1 -1
- package/dist/xml/parse/parse-xml-document.constants.d.ts +5 -0
- package/dist/xml/parse/parse-xml-document.constants.d.ts.map +1 -0
- package/dist/xml/parse/parse-xml-document.d.ts +13 -2
- package/dist/xml/parse/parse-xml-document.d.ts.map +1 -1
- package/dist/xml/parse/parse-xml-document.types.d.ts +12 -2
- package/dist/xml/parse/parse-xml-document.types.d.ts.map +1 -1
- package/dist/xml/parse/parser.constants.d.ts +7 -0
- package/dist/xml/parse/parser.constants.d.ts.map +1 -0
- package/dist/xml/parse/parser.d.ts +4 -2
- package/dist/xml/parse/parser.d.ts.map +1 -1
- package/dist/xml/parse/types.d.ts +2 -0
- package/dist/xml/parse/types.d.ts.map +1 -1
- package/package.json +88 -8
- package/skills/dialecte/SKILL.md +276 -0
- package/skills/dialecte/references/api.json +1830 -0
- package/skills/dialecte/references/api.md +557 -0
- package/skills/dialecte/references/core-api.md +204 -0
- package/skills/dialecte/references/testing.md +116 -0
- package/skills/dialecte-contributing/SKILL.md +328 -0
- package/skills/dialecte-contributing/references/code-rules.md +108 -0
- package/skills/dialecte-contributing/references/landing-changes.md +83 -0
- package/skills/dialecte-contributing/references/perf.md +39 -0
- package/skills/dialecte-contributing/references/traps.md +89 -0
- package/skills/dialecte-lot/SKILL.md +471 -0
- package/skills/dialecte-lot/references/briefs.md +152 -0
- package/skills/dialecte-lot/references/model-tiers.md +52 -0
- package/skills/dialecte-lot/references/retro.md +51 -0
- package/dist/project/io/import-document.d.ts +0 -7
- package/dist/project/io/import-document.d.ts.map +0 -1
- package/dist/test/assert-xml/types.d.ts +0 -2
- package/dist/test/assert-xml/types.d.ts.map +0 -1
- package/dist/utils-CTBHUFs9.js +0 -620
- package/dist/xml/build/build-xml-document.d.ts +0 -10
- package/dist/xml/build/build-xml-document.d.ts.map +0 -1
- package/dist/xml/build/build-xml-document.types.d.ts +0 -22
- package/dist/xml/build/build-xml-document.types.d.ts.map +0 -1
- package/dist/xml/build/download-file.d.ts +0 -7
- package/dist/xml/build/download-file.d.ts.map +0 -1
- package/dist/xml/build/formatter.d.ts +0 -2
- package/dist/xml/build/formatter.d.ts.map +0 -1
- package/dist/xml/build/serialize.d.ts +0 -11
- package/dist/xml/build/serialize.d.ts.map +0 -1
- package/dist/xml/build/serialize.types.d.ts +0 -12
- package/dist/xml/build/serialize.types.d.ts.map +0 -1
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
# @dialecte/core API map
|
|
2
|
+
|
|
3
|
+
A map to find the right existing function, not a signature reference. Confirm the exact signature
|
|
4
|
+
in the installed `.d.ts` or the repo before calling. Paths are relative to the core package `src/`.
|
|
5
|
+
|
|
6
|
+
## Contents
|
|
7
|
+
|
|
8
|
+
- Entry points
|
|
9
|
+
- Project
|
|
10
|
+
- Document
|
|
11
|
+
- Query
|
|
12
|
+
- Transaction
|
|
13
|
+
- Records, refs, operations
|
|
14
|
+
- Hooks (signatures and rules)
|
|
15
|
+
- Extensions mechanism
|
|
16
|
+
- Helpers (`@dialecte/core/helpers`)
|
|
17
|
+
- Utils (`@dialecte/core/utils`)
|
|
18
|
+
- Errors, diagnostics, perf
|
|
19
|
+
- Stores
|
|
20
|
+
- Easy-to-duplicate list
|
|
21
|
+
|
|
22
|
+
## Entry points
|
|
23
|
+
|
|
24
|
+
| Import | What is there |
|
|
25
|
+
| ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
26
|
+
| `@dialecte/core` | Project, Document, Query, Transaction, `defineDialecte`, `createProjectFactory`, stores, XML parse/build, errors, diagnostics, perf, all types |
|
|
27
|
+
| `@dialecte/core/helpers` | record converters, guards, `readAttribute(s)`, `standardizeRecord`, `mergeExtensions`, `stripAttributes`, write-path guards, namespace constants |
|
|
28
|
+
| `@dialecte/core/utils` | attribute rules, definition resolution, xsi:type, namespaces, ordering, `invariant`, `formatXml` / `formatEmbeddedXml`, `saveToDisk` |
|
|
29
|
+
| `@dialecte/core/test` | `createTestHelpers`, `createTestRunner`, `createTestProject`, XML/XPath assertions, test dialecte, `normalizeUuids` |
|
|
30
|
+
| `@dialecte/core/sqlite` | opt-in SQLite storage: importing it registers `{ type: 'sqlite' }`; `connectHub`, `adoptHubPort`, `listProjects` |
|
|
31
|
+
|
|
32
|
+
## Project (`project/project.ts`)
|
|
33
|
+
|
|
34
|
+
- `open(name)` - must come first; opens the store, hydrates `state.documents`. `close()` is async
|
|
35
|
+
and waits for running imports. `destroy()` deletes the database; it is refused `PROJECT_OPEN_ELSEWHERE`,
|
|
36
|
+
nothing removed and the project closed, while another connection of the name is open (another project
|
|
37
|
+
or store, in this page or another tab): close that one, then call `destroy()` again. A test closes the stores
|
|
38
|
+
`createTestContext` opened by name with `closeTestContexts()` before destroying their project.
|
|
39
|
+
- `importFile(file)` → `{ documentId, fileName, recordCount, diagnostics }` or throws; `import(files)`
|
|
40
|
+
→ per-file `{ status: 'imported' | 'failed' }`, never rejects. The import runs inside the store; imports
|
|
41
|
+
are serialised per project; a document being imported is invisible until ready.
|
|
42
|
+
- `export({ documentId, indent?, withDatabaseIds?, xmlDocument?, download? })` → `{ file: Blob, filename }`
|
|
43
|
+
(+ `xmlDocument` when asked, page only). The store writes the file without a DOM, so export works in a
|
|
44
|
+
worker and in Node.
|
|
45
|
+
- `initEmptyDocument()`, `removeDocument(id)`, `getDocuments()`, `getDocument(id)`,
|
|
46
|
+
`openDocument(id)`, `getDocumentStatus(id)`, `getDocumentConfig(id)`.
|
|
47
|
+
- `undo(id)` / `redo(id)` - store-level change log.
|
|
48
|
+
- Blobs: `addBlob`, `getBlob`, `exportBlob`, `attachBlob`, `detachBlob`, `removeBlob`,
|
|
49
|
+
`getBlobsByDocument`, `getBlobsByRecord`, `getStandaloneBlobs`. `getDatabaseInstance()` for the raw DB.
|
|
50
|
+
- Cross-document: `queryFirst(fn)`, `queryAll(fn)`.
|
|
51
|
+
- `state` (documents map), `perf`, `createChannel()` (a BroadcastChannel on the project's channel: what changed,
|
|
52
|
+
this tab's changes and other tabs'). On a store that announces its changes (`Store.subscribe`: SQLite,
|
|
53
|
+
in-memory) the channel is the Project's own and reposts what the store tells; on `local` (IndexedDB) it is
|
|
54
|
+
shared by project name.
|
|
55
|
+
- `listProjects({ dialecteId? })` from `@dialecte/core/sqlite` (SQLite projects of the origin, read from the private
|
|
56
|
+
file system) and `factory.destroyProject({ name })` (delete one without opening it).
|
|
57
|
+
|
|
58
|
+
## Document (`document/document.ts`)
|
|
59
|
+
|
|
60
|
+
- `query` - getter, a new Query each access (extensions bound).
|
|
61
|
+
- `transaction(fn, { label? })` - callback → `beforeCommit` → atomic commit → broadcast → history.
|
|
62
|
+
- `prepare(fn)` → `{ operations, summary, query, commit(), discard() }` - preview before commit.
|
|
63
|
+
- `state` (`loading, error, progress, history, lastUpdate`), `subscribe(cb)`, `documentId`.
|
|
64
|
+
|
|
65
|
+
## Method index (generated from the source)
|
|
66
|
+
|
|
67
|
+
<!-- dialecte-skills:generated core-methods -->
|
|
68
|
+
|
|
69
|
+
- Query (`doc.query`, also on `tx`): `findAncestors`, `findByAttributes`, `findDescendants`, `getAttribute`, `getAttributes`, `getChild`, `getChildren`, `getDefinition`, `getDocumentInfo`, `getRecord`, `getRecords`, `getRecordsByTagName`, `getRoot`, `getSnapshot`, `getTree`
|
|
70
|
+
- Transaction only (`tx`): `addChild`, `clearRecordCache`, `clearStagedOperations`, `commit`, `deepClone`, `delete`, `ensureChild`, `finishStaging`, `getStagedOperations`, `update`
|
|
71
|
+
- Document: `close`, `destroy`, `prepare`, `subscribe`, `transaction`
|
|
72
|
+
- Project: `addBlob`, `attachBlob`, `close`, `createChannel`, `destroy`, `detachBlob`, `export`, `exportBlob`, `getBlob`, `getBlobsByDocument`, `getBlobsByRecord`, `getDatabaseInstance`, `getDocument`, `getDocumentConfig`, `getDocumentStatus`, `getDocuments`, `getStandaloneBlobs`, `import`, `importFile`, `initEmptyDocument`, `open`, `openDocument`, `queryAll`, `queryFirst`, `redo`, `removeBlob`, `removeDocument`, `undo`
|
|
73
|
+
<!-- /dialecte-skills:generated -->
|
|
74
|
+
|
|
75
|
+
## Query (`document/query/main.ts`)
|
|
76
|
+
|
|
77
|
+
| Method | Use it for |
|
|
78
|
+
| --------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
|
|
79
|
+
| `getRoot()` | the root record |
|
|
80
|
+
| `getRecord(ref)` / `getRecords(refs)` | one / many records, `undefined` when missing |
|
|
81
|
+
| `getChild(ref, tag)` / `getChildren(ref, tag)` | direct children by tag |
|
|
82
|
+
| `getRecordsByTagName(tag)` | every record of a tag in the document |
|
|
83
|
+
| `findDescendants(ref, { collect, omit })` | descendants grouped by tag (NOT document order) |
|
|
84
|
+
| `findAncestors(ref, { depth, stopAtTagName, order })` | the ancestor chain (bottom-up by default) |
|
|
85
|
+
| `findByAttributes({ tagName, attributes })` | lookup by attribute values |
|
|
86
|
+
| `getTree(ref, { select: { where, ... }, omit, unwrap, depth })` | a subtree in document order; unwraps transparent elements by default; whole-document load unless a committed read with `id` + `depth` |
|
|
87
|
+
| `getSnapshot({ ref, ancestors, siblings, depth, as: 'tree' \| 'xml' \| 'both' })` | a view with staged ops overlaid |
|
|
88
|
+
| `getAttribute(ref, { name, namespace?, fullObject?, defaults? })` | one attribute (`''` when absent) |
|
|
89
|
+
| `getAttributes(ref, { namespace?, fullObject?, defaults? })` | value object of attributes |
|
|
90
|
+
| `getDefinition(ref)` | resolved definition (parent- and xsi:type-aware) |
|
|
91
|
+
| `getDocumentInfo()` | the document's registry record |
|
|
92
|
+
| `any` | untyped escape hatch - avoid in domain code |
|
|
93
|
+
|
|
94
|
+
## Transaction (`document/transaction/main.ts`, extends Query)
|
|
95
|
+
|
|
96
|
+
| Method | Use it for |
|
|
97
|
+
| -------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
|
|
98
|
+
| `addChild(parent, { tagName, attributes, namespace?, value?, id? })` | create; standardised, hooks fire |
|
|
99
|
+
| `ensureChild(parent, params)` | get-or-create among direct children (match by attributes, then id, then tag) |
|
|
100
|
+
| `update(ref, { attributes?, value? })` | change; an `undefined`/`null` attribute value removes it; no-op updates stage nothing |
|
|
101
|
+
| `delete(ref)` | delete with cascade; root is protected |
|
|
102
|
+
| `deepClone(parent, treeRecord)` | copy a `getTree` result under a parent; always new ids; returns source→target mappings |
|
|
103
|
+
| `progress` | `plan`, `nextStep`, `endPlan` for long operations |
|
|
104
|
+
|
|
105
|
+
`finishStaging`, `commit`, `getStagedOperations`, `clear*` are internal - Document calls them.
|
|
106
|
+
|
|
107
|
+
## Records, refs, operations (`types/records.ts`, `document/types.ref.ts`, `types/operations.ts`)
|
|
108
|
+
|
|
109
|
+
- `RawRecord` `{ id, tagName, namespace, attributes[], value, parent: {id, tagName} | null, children[] }`
|
|
110
|
+
(stored shape; a root's `parent` is `null`, not `undefined`).
|
|
111
|
+
- `TrackedRecord` = raw + `status` (created/updated/deleted/unchanged) - what queries return.
|
|
112
|
+
- `TreeRecord` = tracked + `tree[]` - what `getTree` returns.
|
|
113
|
+
- `Ref` `{ tagName, id }` (id optional only for singletons). Methods accept any `RefOrRecord`.
|
|
114
|
+
- `Operation`: created(new) | updated(old, new) | deleted(old).
|
|
115
|
+
- Attribute forms: value object uses stored names (`'ext:cA'`, `'xsi:type'`); full-object form
|
|
116
|
+
takes a local `name` plus `namespace` - a prefixed name there is rejected.
|
|
117
|
+
|
|
118
|
+
## Hooks (`types/dialecte-config.ts`, `types/io.ts`)
|
|
119
|
+
|
|
120
|
+
Provided by the dialecte package (on the Project, built once per project), not by app code in
|
|
121
|
+
general. Signatures in the installed `.d.ts`; behaviour:
|
|
122
|
+
|
|
123
|
+
| Hook | Receives | Returns | Notes |
|
|
124
|
+
| ----------------------------------------------------------------------------------------------------------------- | -------------------------------------- | --------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
|
|
125
|
+
| `beforeClone` | `{ record }` (tree) | `{ shouldBeCloned, transformedRecord }` | sync, per node; false drops the subtree |
|
|
126
|
+
| `afterStandardizedRecord` | `{ record }` | record | sync, idempotent; runs on create, update, import, init |
|
|
127
|
+
| `afterCreated` | `{ childRecord, parentRecord, query }` | `Operation[]` | after child + parent staged |
|
|
128
|
+
| `afterUpdated` | `{ oldRecord, newRecord, query }` | `Operation[]` | skipped for no-op updates |
|
|
129
|
+
| `beforeDelete` | `{ record, query }` | `Operation[]` | once on the deletion root, subtree still readable |
|
|
130
|
+
| `afterDelete` | `{ record, parentRecord, query }` | `Operation[]` | subtree gone |
|
|
131
|
+
| `beforeCommit` | `{ operations, query }` | `Operation[]` | once per transaction; its ops fire no hooks |
|
|
132
|
+
| `beforeImport` | xml string | xml string | whole-file normalisation |
|
|
133
|
+
| `createImportSession` → `beforeImportRecord` (one session per file; `recordTagNames` narrows the records it sees) | `{ record, ancestry }` | void | sync, per record at its closing tag (children before parent); `ancestry` = still-open parents, not standardised; collect only |
|
|
134
|
+
| `afterImport` | - | `{ creates, updates, deletes, diagnostics }` (the diagnostics reach the app with the import result) | resolve from collected state; bulk write, no undo |
|
|
135
|
+
|
|
136
|
+
Hook-returned operations skip standardisation, guards and further hooks. A returned `deleted`
|
|
137
|
+
needs the parent's `updated` (children list) too.
|
|
138
|
+
|
|
139
|
+
## Extensions mechanism (`document/types.extensions.ts`, `helpers/merge-extensions.ts`, `document/bind-extensions.ts`)
|
|
140
|
+
|
|
141
|
+
- A module is `{ query?, transaction? }`, groups nest to any depth.
|
|
142
|
+
- `mergeExtensions({ base, custom })` merges per method at Project construction; duplicates throw
|
|
143
|
+
`EXTENSION_METHOD_COLLISION`.
|
|
144
|
+
- `bindExtensions` drops the first argument: `fn(query, params)` becomes `doc.query.<ns>.fn(params)`.
|
|
145
|
+
- Inside a transaction both query and transaction groups are bound to `tx`.
|
|
146
|
+
- Naming an augmented document: `ExtendedDocument<Config, Modules>`; do not hand-write intersections.
|
|
147
|
+
|
|
148
|
+
## Helpers (`@dialecte/core/helpers`)
|
|
149
|
+
|
|
150
|
+
- `toRef(recordOrRef)`, `toRawRecord`, `toTrackedRecord`, `toTreeRecord`, `widen`, `toFullAttributeArray`.
|
|
151
|
+
- Guards: `isRawRecord`, `isTrackedRecord`, `isTreeRecord`, `isRecordOf`, `isChildOf`, `isParentOf`,
|
|
152
|
+
`isElementOf`, `isAttributeOf`, `isFullAttributeArray`.
|
|
153
|
+
- `readAttribute` / `readAttributes` - sync, same options and results as the query methods, on a
|
|
154
|
+
record as held (no staged writes); take `dialecteConfig`. A dialecte package may export a bound
|
|
155
|
+
version - prefer it.
|
|
156
|
+
- `standardizeRecord`, `stripAttributes`, `mergeExtensions`.
|
|
157
|
+
- Write guards: `assertNoFixedViolation`, `assertXsiTypeAdmitted`, `assertXsiTypeChangeLeavesNothing`.
|
|
158
|
+
- Constants: `CUSTOM_RECORD_ID_ATTRIBUTE` (`dev:db-id`), `DIALECTE_DEV_NAMESPACE`, `XSI_NAMESPACE`, ...
|
|
159
|
+
|
|
160
|
+
## Utils (`@dialecte/core/utils`)
|
|
161
|
+
|
|
162
|
+
- `invariant(condition, { detail, key?, ref?, meta? })`.
|
|
163
|
+
- Attribute rules: `getAttributeRules`, `resolveSchemaAttributeValue`, `isSchemaDefaultValue`, `extractLocalName`.
|
|
164
|
+
- Definitions: `resolveDefinition(record)` (needs a record; for a ref use `query.getDefinition`),
|
|
165
|
+
`admittedXsiTypes`, `resolveXsiType`, `canonicalXsiType`.
|
|
166
|
+
- Datatypes: `enumeratedValues`, `valuePatterns`.
|
|
167
|
+
- Namespaces: `resolveNamespaceByPrefix`, `resolveNamespaceByScope`, `resolvePrefixByNamespaceScope`,
|
|
168
|
+
`compareQualifiedAttributes`, `orderAttributesBySequence`, `isNamespaceAllowedByWildcard`.
|
|
169
|
+
- Ordering: `orderByConfigSequence`.
|
|
170
|
+
- XML text: `formatXml` (template-tolerant, for fixtures), `formatEmbeddedXml` - only from
|
|
171
|
+
`@dialecte/core/utils`; the main entry has no `formatXml` (`project.export` formats its file).
|
|
172
|
+
|
|
173
|
+
## Errors, diagnostics, perf
|
|
174
|
+
|
|
175
|
+
- `throwDialecteError(key, { detail, ref?, meta?, cause? })`, `createDialecteError`, `toDialecteError`,
|
|
176
|
+
`isKnownDialecteError(err, { catalogues })`, `defineErrors(catalogue)` for a dialecte's own codes.
|
|
177
|
+
- Core codes by range: D0 general, D1 store, D2 records, D3 constraint violations, D4 transaction,
|
|
178
|
+
D5 IO, D6 config (extension collision), D7 project.
|
|
179
|
+
- Diagnostics (import warnings, validation): `createDiagnostic(catalogue, code, { ref, meta })`,
|
|
180
|
+
`isKnownDiagnostic`. LSP-shaped `{ code, severity, source, message, ref }`.
|
|
181
|
+
- Perf: `dev: { perf: true }` on project creation (when the package factory accepts `dev`; check its signature); `perf.start/stop/count/time/report()`; marks are
|
|
182
|
+
`dialecte::<layer>::<name>` on the standard performance timeline.
|
|
183
|
+
|
|
184
|
+
## Stores (`store/`)
|
|
185
|
+
|
|
186
|
+
- `storage` param: `{ type: 'local' }` (IndexedDB, the default), `{ type: 'sqlite' }` (the SQLite
|
|
187
|
+
engine in a worker, one per project shared by every tab through the hub; opt-in: the app imports
|
|
188
|
+
`@dialecte/core/sqlite` once, else `PROJECT_SQLITE_NOT_IMPORTED`; opened from a dialecte's project
|
|
189
|
+
factory, which names its engine worker),
|
|
190
|
+
`{ type: 'inMemory', writable? }`,
|
|
191
|
+
`{ type: 'custom', store }`. The store is a switch: results must be identical on every store,
|
|
192
|
+
only speed changes. A difference is a store bug.
|
|
193
|
+
- `Store` interface is public surface for custom stores. The patch merge every built-in store uses
|
|
194
|
+
is internal to the stores (not exported): a custom store merges a `RecordPatch` itself.
|
|
195
|
+
|
|
196
|
+
## Easy-to-duplicate list - grep these before writing
|
|
197
|
+
|
|
198
|
+
ref conversion `toRef` · record shapes `toRawRecord`/`toTreeRecord`/`widen` · attribute reads
|
|
199
|
+
`getAttributes`/`readAttributes` · lookup by attributes `findByAttributes` · canonical order
|
|
200
|
+
`orderAttributesBySequence`/`orderByConfigSequence` · definition `getDefinition`/`resolveDefinition`
|
|
201
|
+
· xsi:type `canonicalXsiType` · namespaces `utils/namespaces.ts` · errors `invariant`/`throwDialecteError`
|
|
202
|
+
· diagnostics `createDiagnostic` · binding `bindExtensions` ·
|
|
203
|
+
subtree copy `getTree` + `deepClone` (but check the dialecte for a faithful domain copy first) ·
|
|
204
|
+
XML text `formatXml`.
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
# Testing with Dialecte
|
|
2
|
+
|
|
3
|
+
Every dialecte package ships table-driven runners built on core's `createTestRunner`. Use them;
|
|
4
|
+
do not hand-roll project setup, import, export and cleanup in each test.
|
|
5
|
+
|
|
6
|
+
| Package | Import | Runner |
|
|
7
|
+
| ------------------------------ | -------------------------- | --------------------------------------------------------------------------------------------------------------------- |
|
|
8
|
+
| core (its dummy test dialecte) | `@dialecte/core/test` | `createTestHelpers({ dialecte })` → `runTestCases`, `createTestProject`, ...; the dummy dialecte's own `runTestCases` |
|
|
9
|
+
| a dialecte package | `<package>/<version>/test` | `run<Name>TestCases`, `create<Name>TestProject`, ... (see that dialecte's skill) |
|
|
10
|
+
|
|
11
|
+
## The three modes
|
|
12
|
+
|
|
13
|
+
- `.withExport({ testCases, act })` - the outcome is XML. `act` performs the write and may return
|
|
14
|
+
`{ assertOn: 'source' | 'target', withDatabaseIds? }` (default: source, ids kept) or
|
|
15
|
+
`{ assertOn: 'custom', xmlString }`; each case lists `expectedQueries` / `unexpectedQueries`.
|
|
16
|
+
XPath prefixes are the config's namespace KEYS, not the XML prefixes: `default:` for the default
|
|
17
|
+
namespace, the config key for every other one.
|
|
18
|
+
- `.withoutExport({ testCases, act })` - the outcome is a value or a call. `act` asserts with
|
|
19
|
+
`expect` itself and returns nothing.
|
|
20
|
+
- `.generic(testCases, act)` - pure synchronous functions, no XML, no database.
|
|
21
|
+
|
|
22
|
+
## Shape
|
|
23
|
+
|
|
24
|
+
```ts
|
|
25
|
+
// core's own tests, on its dummy schema (Root > A > AA_1 > AAA_1, required attributes aA, aAA_1, ...)
|
|
26
|
+
import { CUSTOM_RECORD_ID_ATTRIBUTE } from '@dialecte/core/helpers'
|
|
27
|
+
import { XMLNS_DEFAULT_NAMESPACE, XMLNS_DEV_NAMESPACE, runTestCases } from '@dialecte/core/test'
|
|
28
|
+
|
|
29
|
+
import type { ActParams, ActResult, BaseXmlTestCase, TestDialecteConfig } from '@dialecte/core/test'
|
|
30
|
+
|
|
31
|
+
type TestCase = BaseXmlTestCase & { params: { value: string } }
|
|
32
|
+
|
|
33
|
+
const testCases: Record<string, TestCase> = {
|
|
34
|
+
'A without AA_1 → AA_1 added with the value': {
|
|
35
|
+
sourceXml: /* xml */ `
|
|
36
|
+
<Root ${XMLNS_DEFAULT_NAMESPACE} ${XMLNS_DEV_NAMESPACE} ${CUSTOM_RECORD_ID_ATTRIBUTE}="root">
|
|
37
|
+
<A ${CUSTOM_RECORD_ID_ATTRIBUTE}="a-without-child" aA="one" />
|
|
38
|
+
<!-- no AA_1 yet -->
|
|
39
|
+
</Root>`,
|
|
40
|
+
params: { value: 'added' },
|
|
41
|
+
expectedQueries: ['//default:A[@aA="one"]/default:AA_1[@aAA_1="added"]'],
|
|
42
|
+
},
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
async function act({
|
|
46
|
+
testCase,
|
|
47
|
+
source,
|
|
48
|
+
}: ActParams<TestDialecteConfig, TestCase>): Promise<ActResult> {
|
|
49
|
+
await source.transaction(async (tx) => addFirstChild(tx, testCase.params))
|
|
50
|
+
return { assertOn: 'source' }
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
runTestCases.withExport({ testCases, act })
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
A dialecte package's runner has the same shape with its own types (`<Name>Test.TestCases`,
|
|
57
|
+
`<Name>Test.ActParams`) and its root element.
|
|
58
|
+
|
|
59
|
+
## Rules
|
|
60
|
+
|
|
61
|
+
- **Red first, one case at a time.** Add one case with `only: true`, run it, see it fail for the
|
|
62
|
+
right reason (an assertion, not a missing module - stub the function with the right type first),
|
|
63
|
+
write the minimum code, then the next case. Remove every `only` at the end. A table written after
|
|
64
|
+
the implementation only pins what the code happens to do.
|
|
65
|
+
- **Case keys** read `<initial state> → <outcome>`.
|
|
66
|
+
- **Fixtures are inline XML** in the test file. `dev:db-id` (`CUSTOM_RECORD_ID_ATTRIBUTE`) gives
|
|
67
|
+
records stable ids; choose ids that say intent (`orphaned-ref`, `a-without-child`). Comment the
|
|
68
|
+
elements that are deliberately absent. No `<?xml ?>` declaration in template literals.
|
|
69
|
+
- **Expectations are structural XPath with meaningful predicates.** `//default:AA_1` alone proves
|
|
70
|
+
nothing; a case can pass because ANOTHER element matched. Do not assert on `dev:db-id` in XPath.
|
|
71
|
+
Pair `unexpectedQueries` with the commented-out source when asserting a deletion.
|
|
72
|
+
- **Fixtures are validated against the schema before a case runs** by the runners `createTestHelpers`
|
|
73
|
+
builds - every dialecte package's `run<Name>TestCases` / `create<Name>TestProject` (a dialecte may
|
|
74
|
+
add its own checks, see its skill). Opt out of those extra checks only with a written reason
|
|
75
|
+
(`skipExtraChecks: '<why>'` on `createTestProject`). Core's own `runTestCases` on the dummy
|
|
76
|
+
dialecte (`createTestRunner`) validates nothing.
|
|
77
|
+
- **Test the function directly** (`fn(source.query, params)` / `fn(tx, params)`), not through the
|
|
78
|
+
bound extension method. Use public interfaces; no mocks of internal collaborators.
|
|
79
|
+
- **No test names its store: the runner chooses it.** A node vitest project whose setup file calls
|
|
80
|
+
`useTestStorage({ type: 'inMemory' })` (core 0.8+) runs your tests in Node on the in-memory store;
|
|
81
|
+
without one, the runner's default store. A second project whose setup imports
|
|
82
|
+
`@dialecte/core/sqlite` and calls `useTestStorage({ type: 'sqlite' })` (core 0.8+) runs the same
|
|
83
|
+
suites on the SQLite engine in the test's own process, no test changed. A test file never calls `useTestStorage` and passes no
|
|
84
|
+
`storage`; only a test about one store itself (an IndexedDB-only behaviour) names it. The
|
|
85
|
+
interface is the truth: a result that differs per store is a store bug, never a reason to pin one
|
|
86
|
+
store.
|
|
87
|
+
- **XML assertions take XML text.** `expectedQueries`, `assertOn: 'custom'` (`xmlString`), and the
|
|
88
|
+
`assertExpectedElementQueries({ xml, queries })` / `assertUnexpectedElementQueries({ xml, queries })`
|
|
89
|
+
that `createXmlAssertions({ namespaces })` returns, read a string, the same way in Node and in the
|
|
90
|
+
browser. Holding a DOM? Serialize it first. Never build one for a test (`xmlDocument: true`,
|
|
91
|
+
`DOMParser`, `document.evaluate`): they exist only in the page.
|
|
92
|
+
- **XPath for small exact output, record expectations for big files.** On a fixture of megabytes, a
|
|
93
|
+
`//` query over the whole export takes seconds and its failure prints too much. State what must
|
|
94
|
+
hold as record expectations - a tag, attribute values, the parent, a count - and check them on
|
|
95
|
+
the records in `.withoutExport`, with the query API:
|
|
96
|
+
|
|
97
|
+
```ts
|
|
98
|
+
// .withoutExport: the expectations read the records, no export, no XPath
|
|
99
|
+
async function act({ testCase, source }: ActParams<Config, TestCase>): Promise<void> {
|
|
100
|
+
await source.transaction(async (tx) => renameParts(tx, testCase.params))
|
|
101
|
+
const root = await source.query.getRoot()
|
|
102
|
+
const { Part = [], Assembly = [] } = await source.query.findDescendants(root, {
|
|
103
|
+
collect: ['Part', 'Assembly'],
|
|
104
|
+
})
|
|
105
|
+
expect(Part).toHaveLength(3) // count
|
|
106
|
+
for (const assembly of Assembly) {
|
|
107
|
+
const parent = await source.query.getRecord(assembly.parent) // the parent
|
|
108
|
+
expect(parent?.tagName).toBe('Line')
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
- **Green by accident** is the classic trap: last-wins indexes, id order, an XPath matching a
|
|
114
|
+
sibling. When a case passes on the first run, break the code on purpose and watch it fail.
|
|
115
|
+
- Re-indent `/* xml */` fixtures with core's `dialecte-xmlfmt "<glob>"`; the code formatter does not
|
|
116
|
+
touch them.
|