@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
|
@@ -1,46 +1,35 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { XmlNamespaces } from '../xml';
|
|
2
|
+
import { XmlAssertions, XmlQueriesWithNamespacesParams, XmlQueryChecks } from './assert-xml.types';
|
|
2
3
|
import { Namespace } from '../../types';
|
|
3
4
|
/**
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
5
|
+
* The query assertions of a dialecte: XPath prefixes are its config's namespace keys, mapped to their URIs
|
|
6
|
+
* once here. Made once per dialecte (e.g. in scl's test entry) and offered beside `createTestProject`.
|
|
7
|
+
*
|
|
8
|
+
* @intent make XPath assertions bound to a dialecte's namespaces, assert exported XML in tests
|
|
7
9
|
*/
|
|
8
10
|
export declare function createXmlAssertions(params: {
|
|
9
11
|
namespaces: Record<string, Namespace>;
|
|
10
|
-
}):
|
|
11
|
-
assertExpectedElementQueries(params: {
|
|
12
|
-
xmlDocument: XMLDocument;
|
|
13
|
-
queries: string[];
|
|
14
|
-
}): void;
|
|
15
|
-
assertUnexpectedElementQueries(params: {
|
|
16
|
-
xmlDocument: XMLDocument;
|
|
17
|
-
queries: string[];
|
|
18
|
-
}): void;
|
|
19
|
-
};
|
|
12
|
+
}): XmlAssertions;
|
|
20
13
|
/**
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
14
|
+
* Asserts that each XPath query selects at least one node of the XML text, parsed once for all of them.
|
|
15
|
+
* A failure names the steps that matched, the step that failed, where the last match sits, what the failing
|
|
16
|
+
* step finds there without its predicates, and the XML around it.
|
|
17
|
+
*
|
|
18
|
+
* @intent assert that XML holds the elements XPath queries select, check that an export holds an element
|
|
24
19
|
*/
|
|
25
|
-
export declare function assertExpectedElementQueries(params:
|
|
26
|
-
xmlDocument: XMLDocument;
|
|
27
|
-
queries: string[];
|
|
28
|
-
nsResolver?: NsResolver;
|
|
29
|
-
}): void;
|
|
20
|
+
export declare function assertExpectedElementQueries(params: XmlQueriesWithNamespacesParams): void;
|
|
30
21
|
/**
|
|
31
|
-
*
|
|
22
|
+
* Asserts that no XPath query selects a node of the XML text, parsed once for all of them.
|
|
32
23
|
*
|
|
33
|
-
*
|
|
34
|
-
* (
|
|
35
|
-
*
|
|
36
|
-
* because an ancestor doesn't exist (test setup bug) rather than the
|
|
37
|
-
* target element being properly absent.
|
|
24
|
+
* Every step but the last must still select a node: an absence is only meaningful when the ancestors
|
|
25
|
+
* exist, so a missing ancestor (a fixture bug) fails the assertion instead of passing it for the wrong
|
|
26
|
+
* reason.
|
|
38
27
|
*
|
|
39
|
-
*
|
|
28
|
+
* @intent assert that XML does not hold an element, check that an element was removed from an export
|
|
40
29
|
*/
|
|
41
|
-
export declare function assertUnexpectedElementQueries(params:
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
30
|
+
export declare function assertUnexpectedElementQueries(params: XmlQueriesWithNamespacesParams): void;
|
|
31
|
+
/** The expected then the unexpected queries of one text, on one parse of it. */
|
|
32
|
+
export declare function assertXmlQueries(params: XmlQueryChecks): void;
|
|
33
|
+
/** XPath prefix to namespace URI, from a config's namespaces. */
|
|
34
|
+
export declare function toXmlNamespaces(namespaces: Record<string, Namespace>): XmlNamespaces;
|
|
46
35
|
//# sourceMappingURL=assert-xml.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assert-xml.d.ts","sourceRoot":"","sources":["../../../src/test/assert-xml/assert-xml.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"assert-xml.d.ts","sourceRoot":"","sources":["../../../src/test/assert-xml/assert-xml.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAe,aAAa,EAAW,MAAM,QAAQ,CAAA;AACjE,OAAO,KAAK,EAEX,aAAa,EAEb,8BAA8B,EAC9B,cAAc,EACd,MAAM,oBAAoB,CAAA;AAC3B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAExC;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE;IAC3C,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAA;CACrC,GAAG,aAAa,CAUhB;AAED;;;;;;GAMG;AACH,wBAAgB,4BAA4B,CAAC,MAAM,EAAE,8BAA8B,GAAG,IAAI,CAGzF;AAED;;;;;;;;GAQG;AACH,wBAAgB,8BAA8B,CAAC,MAAM,EAAE,8BAA8B,GAAG,IAAI,CAG3F;AAED,gFAAgF;AAChF,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,cAAc,GAAG,IAAI,CAM7D;AAED,iEAAiE;AACjE,wBAAgB,eAAe,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,aAAa,CAIpF"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { XmlNamespaces, XmlNode } from '../xml';
|
|
2
|
+
import { Namespace } from '../../types';
|
|
3
|
+
/** XPath queries on XML text; prefixes are the dialecte config's namespace keys. */
|
|
4
|
+
export type XmlQueriesParams = {
|
|
5
|
+
xml: string;
|
|
6
|
+
queries: string[];
|
|
7
|
+
};
|
|
8
|
+
/** XPath queries on XML text, with the namespaces their prefixes stand for: without them no prefix resolves. */
|
|
9
|
+
export type XmlQueriesWithNamespacesParams = XmlQueriesParams & {
|
|
10
|
+
namespaces?: Record<string, Namespace>;
|
|
11
|
+
};
|
|
12
|
+
/** The expected then the unexpected queries of one XML text, on one parse of it. */
|
|
13
|
+
export type XmlQueryChecks = {
|
|
14
|
+
xml: string;
|
|
15
|
+
namespaces: XmlNamespaces;
|
|
16
|
+
expectedQueries?: string[];
|
|
17
|
+
unexpectedQueries?: string[];
|
|
18
|
+
};
|
|
19
|
+
/** A query's progressive steps run in order until one selects nothing. */
|
|
20
|
+
export type QueryTrace = {
|
|
21
|
+
steps: string[];
|
|
22
|
+
/** How many steps selected a node before the first that selected none. */
|
|
23
|
+
matchedSteps: number;
|
|
24
|
+
/** The first node the last matching step selected. */
|
|
25
|
+
lastMatch: XmlNode | undefined;
|
|
26
|
+
};
|
|
27
|
+
/** A location step of an XPath, read for a failure message. */
|
|
28
|
+
export type XpathStepReading = {
|
|
29
|
+
/** The step as written, its predicates left out (`//default:A[@aA="1"]` → `//default:A`). */
|
|
30
|
+
withoutPredicates: string;
|
|
31
|
+
/** The separator before the step: `/`, `//`, or nothing for a relative first step. */
|
|
32
|
+
separator: string;
|
|
33
|
+
/** The axis written before the name test (`following-sibling`); undefined for the abbreviated ones. */
|
|
34
|
+
axis: string | undefined;
|
|
35
|
+
/** The name test as a qualified name; undefined when the step tests no name (`*`, `node()`, `..`). */
|
|
36
|
+
name: {
|
|
37
|
+
prefix: string | undefined;
|
|
38
|
+
localName: string;
|
|
39
|
+
} | undefined;
|
|
40
|
+
/** The attributes the predicates name (`@aA`, `@ext:aAA_3`), as written. */
|
|
41
|
+
predicateAttributes: string[];
|
|
42
|
+
};
|
|
43
|
+
/** The query assertions a dialecte offers: what `createXmlAssertions` makes (named, so a consumer can type with it). */
|
|
44
|
+
export type XmlAssertions = {
|
|
45
|
+
assertExpectedElementQueries(params: XmlQueriesParams): void;
|
|
46
|
+
assertUnexpectedElementQueries(params: XmlQueriesParams): void;
|
|
47
|
+
};
|
|
48
|
+
//# sourceMappingURL=assert-xml.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assert-xml.types.d.ts","sourceRoot":"","sources":["../../../src/test/assert-xml/assert-xml.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAA;AACpD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAExC,oFAAoF;AACpF,MAAM,MAAM,gBAAgB,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,EAAE,CAAA;CAAE,CAAA;AAEjE,gHAAgH;AAChH,MAAM,MAAM,8BAA8B,GAAG,gBAAgB,GAAG;IAC/D,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAA;CACtC,CAAA;AAED,oFAAoF;AACpF,MAAM,MAAM,cAAc,GAAG;IAC5B,GAAG,EAAE,MAAM,CAAA;IACX,UAAU,EAAE,aAAa,CAAA;IACzB,eAAe,CAAC,EAAE,MAAM,EAAE,CAAA;IAC1B,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAA;CAC5B,CAAA;AAED,0EAA0E;AAC1E,MAAM,MAAM,UAAU,GAAG;IACxB,KAAK,EAAE,MAAM,EAAE,CAAA;IACf,0EAA0E;IAC1E,YAAY,EAAE,MAAM,CAAA;IACpB,sDAAsD;IACtD,SAAS,EAAE,OAAO,GAAG,SAAS,CAAA;CAC9B,CAAA;AAED,+DAA+D;AAC/D,MAAM,MAAM,gBAAgB,GAAG;IAC9B,6FAA6F;IAC7F,iBAAiB,EAAE,MAAM,CAAA;IACzB,sFAAsF;IACtF,SAAS,EAAE,MAAM,CAAA;IACjB,uGAAuG;IACvG,IAAI,EAAE,MAAM,GAAG,SAAS,CAAA;IACxB,sGAAsG;IACtG,IAAI,EAAE;QAAE,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,GAAG,SAAS,CAAA;IACnE,4EAA4E;IAC5E,mBAAmB,EAAE,MAAM,EAAE,CAAA;CAC7B,CAAA;AAED,wHAAwH;AACxH,MAAM,MAAM,aAAa,GAAG;IAC3B,4BAA4B,CAAC,MAAM,EAAE,gBAAgB,GAAG,IAAI,CAAA;IAC5D,8BAA8B,CAAC,MAAM,EAAE,gBAAgB,GAAG,IAAI,CAAA;CAC9D,CAAA"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { XmlDocument, XmlNamespaces, XmlNode } from '../xml';
|
|
2
|
+
/**
|
|
3
|
+
* What the failing step selects once its predicates are left out, under every node the matched prefix selects
|
|
4
|
+
* (or from the document when nothing matched): up to ten candidates, each with the attributes the predicates name
|
|
5
|
+
* and its line. When no node has the step's name there, `none: <tag> has no <name> <axis>`, and the same local
|
|
6
|
+
* name in another namespace is named with the prefix that stands for it. Undefined when the step cannot be read so,
|
|
7
|
+
* and for a union: its branches are not one step, so leaving out predicates would only repeat the query.
|
|
8
|
+
*/
|
|
9
|
+
export declare function describeNearby(params: {
|
|
10
|
+
document: XmlDocument;
|
|
11
|
+
namespaces: XmlNamespaces;
|
|
12
|
+
matchedPrefix: string | undefined;
|
|
13
|
+
firstMatch: XmlNode | undefined;
|
|
14
|
+
failedStep: string;
|
|
15
|
+
}): string | undefined;
|
|
16
|
+
//# sourceMappingURL=describe-nearby.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"describe-nearby.d.ts","sourceRoot":"","sources":["../../../src/test/assert-xml/describe-nearby.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,OAAO,EAAmB,MAAM,QAAQ,CAAA;AAGlF;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE;IACtC,QAAQ,EAAE,WAAW,CAAA;IACrB,UAAU,EAAE,aAAa,CAAA;IACzB,aAAa,EAAE,MAAM,GAAG,SAAS,CAAA;IACjC,UAAU,EAAE,OAAO,GAAG,SAAS,CAAA;IAC/B,UAAU,EAAE,MAAM,CAAA;CAClB,GAAG,MAAM,GAAG,SAAS,CAarB"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { XmlAttribute, XmlElement, XmlNode } from '../xml';
|
|
2
|
+
/**
|
|
3
|
+
* Where a node sits: its positional path from the root (`/Root[1]/A[2]/ext:B[1]`, `.../text()[1]`, each step
|
|
4
|
+
* counted among the siblings of the same name and namespace, or of the same kind) and its line, as a message
|
|
5
|
+
* says it (`line 12`; `line ≥ 65535` past the last line the engine keeps).
|
|
6
|
+
*/
|
|
7
|
+
export declare function describeNodePlace(node: XmlNode): {
|
|
8
|
+
path: string;
|
|
9
|
+
line: string;
|
|
10
|
+
};
|
|
11
|
+
/** The element's name as the document writes it: `prefix:name`, or `name` in the default namespace. */
|
|
12
|
+
export declare function qualifiedNameOf(node: XmlElement | XmlAttribute): string;
|
|
13
|
+
/** A line as a message says it: the engine keeps a line up to 65535, a later one reads as that bound. */
|
|
14
|
+
export declare function formatLine(line: number): string;
|
|
15
|
+
//# sourceMappingURL=describe-node-place.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"describe-node-place.d.ts","sourceRoot":"","sources":["../../../src/test/assert-xml/describe-node-place.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAwB,UAAU,EAAW,MAAM,QAAQ,CAAA;AAGhF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAA;AAErC;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,OAAO,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAO/E;AAED,uGAAuG;AACvG,wBAAgB,eAAe,CAAC,IAAI,EAAE,UAAU,GAAG,YAAY,GAAG,MAAM,CAEvE;AAED,yGAAyG;AACzG,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE/C"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { assertExpectedElementQueries, assertUnexpectedElementQueries, createXmlAssertions, } from './assert-xml';
|
|
2
|
-
export {
|
|
2
|
+
export type { XmlAssertions, XmlQueriesParams, XmlQueriesWithNamespacesParams, } from './assert-xml.types';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/test/assert-xml/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,4BAA4B,EAC5B,8BAA8B,EAC9B,mBAAmB,GACnB,MAAM,cAAc,CAAA;AACrB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/test/assert-xml/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,4BAA4B,EAC5B,8BAA8B,EAC9B,mBAAmB,GACnB,MAAM,cAAc,CAAA;AACrB,YAAY,EACX,aAAa,EACb,gBAAgB,EAChB,8BAA8B,GAC9B,MAAM,oBAAoB,CAAA"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { XmlDocument, XmlNamespaces, XmlNode } from '../xml';
|
|
2
|
+
import { QueryTrace } from './assert-xml.types';
|
|
3
|
+
/**
|
|
4
|
+
* A query that selects nothing, as labelled lines: the query, the steps that matched, the step that failed,
|
|
5
|
+
* where the last match sits, what the failing step finds there without its predicates, and the XML around it.
|
|
6
|
+
*/
|
|
7
|
+
export declare function describeMissingElement(params: {
|
|
8
|
+
header: string;
|
|
9
|
+
query: string;
|
|
10
|
+
trace: QueryTrace;
|
|
11
|
+
document: XmlDocument;
|
|
12
|
+
namespaces: XmlNamespaces;
|
|
13
|
+
}): string;
|
|
14
|
+
/** A query of the unexpected list that selects a node: where it sits, and the node. */
|
|
15
|
+
export declare function describeUnexpectedElement(params: {
|
|
16
|
+
query: string;
|
|
17
|
+
node: XmlNode;
|
|
18
|
+
}): string;
|
|
19
|
+
/** A query the engine refused: the query and why. */
|
|
20
|
+
export declare function describeRefusedQuery(params: {
|
|
21
|
+
query: string;
|
|
22
|
+
reason: string;
|
|
23
|
+
}): string;
|
|
24
|
+
//# sourceMappingURL=query-failure-message.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"query-failure-message.d.ts","sourceRoot":"","sources":["../../../src/test/assert-xml/query-failure-message.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAA;AACjE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAEpD;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE;IAC9C,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,UAAU,CAAA;IACjB,QAAQ,EAAE,WAAW,CAAA;IACrB,UAAU,EAAE,aAAa,CAAA;CACzB,GAAG,MAAM,CA2BT;AAED,uFAAuF;AACvF,wBAAgB,yBAAyB,CAAC,MAAM,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,OAAO,CAAA;CAAE,GAAG,MAAM,CAQ1F;AAED,qDAAqD;AACrD,wBAAgB,oBAAoB,CAAC,MAAM,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,CAOtF"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { XpathStepReading } from './assert-xml.types';
|
|
2
|
+
/**
|
|
3
|
+
* Reads one location step of an XPath as `splitXpathIntoSteps` cuts it (`/default:A[@aA="1"]`,
|
|
4
|
+
* `//ext:B`, `/following-sibling::default:C[2]`): the step without its predicates, its axis, its name
|
|
5
|
+
* test and the attributes its predicates name. Quotes and nested brackets are respected.
|
|
6
|
+
*/
|
|
7
|
+
export declare function readXpathStep(step: string): XpathStepReading;
|
|
8
|
+
//# sourceMappingURL=read-xpath-step.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"read-xpath-step.d.ts","sourceRoot":"","sources":["../../../src/test/assert-xml/read-xpath-step.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAE1D;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,gBAAgB,CAa5D"}
|
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
* - `[...]` predicates (including nested `[A[B]]` and paths inside `[@x="a/b"]`)
|
|
12
12
|
* - `(...)` grouping
|
|
13
13
|
* - Quoted strings with `/` inside (`@path="a/b/c"`)
|
|
14
|
-
* - `|` union operator
|
|
14
|
+
* - `|` union operator: a top-level union is not split (one step, the whole query); one inside `[]` or `()` is
|
|
15
|
+
* part of its step
|
|
15
16
|
* - Leading `/` or `//` (absolute paths)
|
|
16
17
|
* - Axis selectors like `following-sibling::` (not confused with `/`)
|
|
17
18
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"xpath-parser.d.ts","sourceRoot":"","sources":["../../../src/test/assert-xml/xpath-parser.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"xpath-parser.d.ts","sourceRoot":"","sources":["../../../src/test/assert-xml/xpath-parser.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAa3D"}
|
package/dist/test/config.d.ts
CHANGED
|
@@ -1918,6 +1918,7 @@ export declare const TEST_DIALECTE_CONFIG: {
|
|
|
1918
1918
|
};
|
|
1919
1919
|
readonly children: {
|
|
1920
1920
|
readonly sequence: readonly ["CCC_1", "CCC_2", "CCC_3"];
|
|
1921
|
+
readonly any: true;
|
|
1921
1922
|
readonly details: {};
|
|
1922
1923
|
};
|
|
1923
1924
|
readonly contentModel: {
|
|
@@ -1925,6 +1926,10 @@ export declare const TEST_DIALECTE_CONFIG: {
|
|
|
1925
1926
|
readonly minOccurs: 1;
|
|
1926
1927
|
readonly maxOccurs: 1;
|
|
1927
1928
|
readonly particles: readonly [{
|
|
1929
|
+
readonly kind: "any";
|
|
1930
|
+
readonly notNamespace: readonly ["", "http://dialecte.dev/XML/DEFAULT"];
|
|
1931
|
+
readonly processContents: "lax";
|
|
1932
|
+
}, {
|
|
1928
1933
|
readonly kind: "element";
|
|
1929
1934
|
readonly name: "CCC_1";
|
|
1930
1935
|
readonly minOccurs: 1;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/test/config.ts"],"names":[],"mappings":"AAiBA,eAAO,MAAM,SAAS;;CAEO,CAAA;AAG7B,eAAO,MAAM,eAAe;;;;;;;IAO3B,uEAAuE;;;;;;;CAQrC,CAAA;AAEnC,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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CAAA;AAEtC,MAAM,MAAM,kBAAkB,GAAG,OAAO,oBAAoB,CAAA"}
|
package/dist/test/constant.d.ts
CHANGED
|
@@ -19,4 +19,6 @@ export declare const DIALECTE_TEST_NAMESPACES: {
|
|
|
19
19
|
export declare const XMLNS_DEFAULT_NAMESPACE: string;
|
|
20
20
|
export declare const XMLNS_DEV_NAMESPACE: string;
|
|
21
21
|
export declare const XMLNS_EXT_NAMESPACE: string;
|
|
22
|
+
/** The config key of core's own test dialecte, and of a config given to the test helpers on its own. */
|
|
23
|
+
export declare const TEST_CONFIG_KEY = "default";
|
|
22
24
|
//# sourceMappingURL=constant.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constant.d.ts","sourceRoot":"","sources":["../../src/test/constant.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;CAUpC,CAAA;AAED,eAAO,MAAM,uBAAuB,QAAoD,CAAA;AACxF,eAAO,MAAM,mBAAmB,QAAuF,CAAA;AACvH,eAAO,MAAM,mBAAmB,QAAuF,CAAA"}
|
|
1
|
+
{"version":3,"file":"constant.d.ts","sourceRoot":"","sources":["../../src/test/constant.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;CAUpC,CAAA;AAED,eAAO,MAAM,uBAAuB,QAAoD,CAAA;AACxF,eAAO,MAAM,mBAAmB,QAAuF,CAAA;AACvH,eAAO,MAAM,mBAAmB,QAAuF,CAAA;AAEvH,wGAAwG;AACxG,eAAO,MAAM,eAAe,YAAY,CAAA"}
|
|
@@ -1,42 +1,37 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { AnyDialecteConfig
|
|
5
|
-
type TestDialecteConfig = typeof TEST_DIALECTE_CONFIG;
|
|
6
|
-
export type TestDocument<GenericConfig extends AnyDialecteConfig, GenericModules extends ExtensionModules = Record<never, never>> = {
|
|
7
|
-
documentId: string;
|
|
8
|
-
document: Document<GenericConfig, MergedExtensions<GenericModules>>;
|
|
9
|
-
};
|
|
10
|
-
export type TestProjectResult<GenericConfig extends AnyDialecteConfig, GenericModules extends ExtensionModules = Record<never, never>> = {
|
|
11
|
-
project: Project<GenericConfig, GenericModules>;
|
|
12
|
-
source: TestDocument<GenericConfig, GenericModules>;
|
|
13
|
-
target?: TestDocument<GenericConfig, GenericModules>;
|
|
14
|
-
};
|
|
1
|
+
import { TestDialecteConfig } from './config';
|
|
2
|
+
import { DeclaredTestProjectParams, LegacyTestProjectParams, TestContextParams, TestProjectResult } from './create-test-dialecte.types';
|
|
3
|
+
import { Context, ExtensionModules } from '../document';
|
|
4
|
+
import { AnyDialecteConfig } from '../types';
|
|
15
5
|
/**
|
|
16
|
-
* Spin up a Project
|
|
17
|
-
*
|
|
6
|
+
* Spin up a Project of the declared dialecte - every config, the default key, its extensions and
|
|
7
|
+
* its own hooks instance; core's own test dialecte when none is given - with the source (and
|
|
8
|
+
* optionally the target) imported under the default config. Returns project + pre-opened
|
|
9
|
+
* documents. Opened inside a running test, the project is destroyed when the test ends (after its other
|
|
10
|
+
* `onTestFinished` hooks); opened outside one (`beforeAll`), the caller destroys it.
|
|
11
|
+
*
|
|
12
|
+
* @intent open a project in a test with a fixture imported, get documents to test against
|
|
18
13
|
*/
|
|
19
|
-
export declare function createTestProject<GenericConfig extends AnyDialecteConfig = TestDialecteConfig, GenericModules extends ExtensionModules = Record<never, never
|
|
20
|
-
sourceXml: string;
|
|
21
|
-
targetXml?: string;
|
|
22
|
-
dialecteConfig?: GenericConfig;
|
|
23
|
-
extensions?: {
|
|
24
|
-
base?: ExtensionModules;
|
|
25
|
-
custom?: ExtensionModules;
|
|
26
|
-
};
|
|
27
|
-
hooks?: DialecteHooks<GenericConfig>;
|
|
28
|
-
dev?: {
|
|
29
|
-
perf?: boolean;
|
|
30
|
-
};
|
|
31
|
-
}): Promise<TestProjectResult<GenericConfig, GenericModules>>;
|
|
14
|
+
export declare function createTestProject<GenericConfig extends AnyDialecteConfig = TestDialecteConfig, GenericModules extends ExtensionModules = Record<never, never>, GenericConfigKey extends string = string>(params: DeclaredTestProjectParams<GenericConfig, GenericModules, GenericConfigKey>): Promise<TestProjectResult<GenericConfig, GenericModules>>;
|
|
32
15
|
/**
|
|
33
|
-
*
|
|
34
|
-
*
|
|
16
|
+
* Spin up a Project from a config, extensions and hooks given one by one, with the source (and
|
|
17
|
+
* optionally the target) imported under the key `default`.
|
|
18
|
+
* @deprecated Declare the dialecte with `defineDialecte` and pass it as `dialecte`.
|
|
35
19
|
*/
|
|
36
|
-
export declare function
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
20
|
+
export declare function createTestProject<GenericConfig extends AnyDialecteConfig = TestDialecteConfig, GenericModules extends ExtensionModules = Record<never, never>>(params: LegacyTestProjectParams<GenericConfig>): Promise<TestProjectResult<GenericConfig, GenericModules>>;
|
|
21
|
+
/**
|
|
22
|
+
* Create a Context directly for testing FP query functions: on `store` when given, else on the store
|
|
23
|
+
* of the project named `databaseName` - of the kind `storage` names, else the test helpers' default
|
|
24
|
+
* (`useTestStorage`), else the local store - opened to discover its tables. Opened by name, it is a
|
|
25
|
+
* connection of its own: the project cannot be destroyed while it is open - `closeTestContexts()` first.
|
|
26
|
+
*
|
|
27
|
+
* @internal test context of core's own context-level query tests
|
|
28
|
+
*/
|
|
29
|
+
export declare function createTestContext<GenericConfig extends AnyDialecteConfig>(params: TestContextParams<GenericConfig>): Promise<Context<GenericConfig>>;
|
|
30
|
+
/**
|
|
31
|
+
* Close every store `createTestContext` opened by name, so the projects they read can be destroyed: settled once
|
|
32
|
+
* they count no more.
|
|
33
|
+
*
|
|
34
|
+
* @internal cleanup of `createTestContext`
|
|
35
|
+
*/
|
|
36
|
+
export declare function closeTestContexts(): Promise<void>;
|
|
42
37
|
//# sourceMappingURL=create-test-dialecte.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-test-dialecte.d.ts","sourceRoot":"","sources":["../../src/test/create-test-dialecte.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"create-test-dialecte.d.ts","sourceRoot":"","sources":["../../src/test/create-test-dialecte.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAA;AAClD,OAAO,KAAK,EACX,yBAAyB,EACzB,uBAAuB,EACvB,iBAAiB,EACjB,iBAAiB,EACjB,MAAM,8BAA8B,CAAA;AACrC,OAAO,KAAK,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAG3D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAEhD;;;;;;;;GAQG;AACH,wBAAsB,iBAAiB,CACtC,aAAa,SAAS,iBAAiB,GAAG,kBAAkB,EAC5D,cAAc,SAAS,gBAAgB,GAAG,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,EAC9D,gBAAgB,SAAS,MAAM,GAAG,MAAM,EAExC,MAAM,EAAE,yBAAyB,CAAC,aAAa,EAAE,cAAc,EAAE,gBAAgB,CAAC,GAChF,OAAO,CAAC,iBAAiB,CAAC,aAAa,EAAE,cAAc,CAAC,CAAC,CAAA;AAC5D;;;;GAIG;AACH,wBAAsB,iBAAiB,CACtC,aAAa,SAAS,iBAAiB,GAAG,kBAAkB,EAC5D,cAAc,SAAS,gBAAgB,GAAG,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,EAE9D,MAAM,EAAE,uBAAuB,CAAC,aAAa,CAAC,GAC5C,OAAO,CAAC,iBAAiB,CAAC,aAAa,EAAE,cAAc,CAAC,CAAC,CAAA;AAoB5D;;;;;;;GAOG;AACH,wBAAsB,iBAAiB,CAAC,aAAa,SAAS,iBAAiB,EAC9E,MAAM,EAAE,iBAAiB,CAAC,aAAa,CAAC,GACtC,OAAO,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,CAoBjC;AAmCD;;;;;GAKG;AACH,wBAAsB,iBAAiB,IAAI,OAAO,CAAC,IAAI,CAAC,CAIvD"}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { DialecteDeclaration } from '../dialecte';
|
|
2
|
+
import { Document, ExtensionModules, MergedExtensions } from '../document';
|
|
3
|
+
import { Project, StorageParam } from '../project';
|
|
4
|
+
import { Store } from '../store';
|
|
5
|
+
import { AnyDialecteConfig, DialecteHooks } from '../types';
|
|
6
|
+
export type TestDocument<GenericConfig extends AnyDialecteConfig, GenericModules extends ExtensionModules = Record<never, never>> = {
|
|
7
|
+
documentId: string;
|
|
8
|
+
document: Document<GenericConfig, MergedExtensions<GenericModules>>;
|
|
9
|
+
};
|
|
10
|
+
export type TestProjectResult<GenericConfig extends AnyDialecteConfig, GenericModules extends ExtensionModules = Record<never, never>> = {
|
|
11
|
+
project: Project<GenericConfig, GenericModules>;
|
|
12
|
+
source: TestDocument<GenericConfig, GenericModules>;
|
|
13
|
+
target?: TestDocument<GenericConfig, GenericModules>;
|
|
14
|
+
};
|
|
15
|
+
/** The dialecte as declared: every config, the default key, its extensions, fresh hooks per project. */
|
|
16
|
+
export type DeclaredTestDialecteParams<GenericConfig extends AnyDialecteConfig, GenericModules extends ExtensionModules = Record<never, never>, GenericConfigKey extends string = string> = {
|
|
17
|
+
dialecte: DialecteDeclaration<GenericConfig, GenericModules, GenericConfigKey>;
|
|
18
|
+
};
|
|
19
|
+
/** The dialecte in parts: one config under the key `default`, extensions, one hooks instance. */
|
|
20
|
+
export type LegacyTestDialecteParams<GenericConfig extends AnyDialecteConfig> = {
|
|
21
|
+
dialecte?: never;
|
|
22
|
+
/**
|
|
23
|
+
* Defaults to core's own test config.
|
|
24
|
+
* @deprecated Declare the dialecte with `defineDialecte` and pass it as `dialecte`.
|
|
25
|
+
*/
|
|
26
|
+
dialecteConfig?: GenericConfig;
|
|
27
|
+
/** @deprecated The declaration's `extensions`. */
|
|
28
|
+
extensions?: {
|
|
29
|
+
base?: ExtensionModules;
|
|
30
|
+
custom?: ExtensionModules;
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* Shared by every project built from these parts.
|
|
34
|
+
* @deprecated The declaration's `createHooks`.
|
|
35
|
+
*/
|
|
36
|
+
hooks?: DialecteHooks<GenericConfig>;
|
|
37
|
+
};
|
|
38
|
+
/** `createTestProject` on a declaration; without one, core's own test dialecte. */
|
|
39
|
+
export type DeclaredTestProjectParams<GenericConfig extends AnyDialecteConfig, GenericModules extends ExtensionModules = Record<never, never>, GenericConfigKey extends string = string> = TestProjectOptions & Partial<DeclaredTestDialecteParams<GenericConfig, GenericModules, GenericConfigKey>>;
|
|
40
|
+
/** `createTestProject` on a dialecte given in parts. */
|
|
41
|
+
export type LegacyTestProjectParams<GenericConfig extends AnyDialecteConfig> = TestProjectOptions & LegacyTestDialecteParams<GenericConfig>;
|
|
42
|
+
/** `createTestRunner` on a declaration. */
|
|
43
|
+
export type DeclaredTestRunnerParams<GenericConfig extends AnyDialecteConfig, GenericModules extends ExtensionModules = Record<never, never>, GenericConfigKey extends string = string> = DeclaredTestDialecteParams<GenericConfig, GenericModules, GenericConfigKey> & {
|
|
44
|
+
/**
|
|
45
|
+
* The store the test projects run on: the test helpers' default when absent (`useTestStorage`, else the local
|
|
46
|
+
* store). `sqlite`: the SQLite engine in this process.
|
|
47
|
+
*/
|
|
48
|
+
storage?: StorageParam;
|
|
49
|
+
};
|
|
50
|
+
/** `createTestRunner` on a dialecte given in parts. */
|
|
51
|
+
export type LegacyTestRunnerParams<GenericConfig extends AnyDialecteConfig> = LegacyTestDialecteParams<GenericConfig> & {
|
|
52
|
+
dialecteConfig: GenericConfig;
|
|
53
|
+
/**
|
|
54
|
+
* The store the test projects run on: the test helpers' default when absent (`useTestStorage`, else the local
|
|
55
|
+
* store). `sqlite`: the SQLite engine in this process.
|
|
56
|
+
*/
|
|
57
|
+
storage?: StorageParam;
|
|
58
|
+
};
|
|
59
|
+
/** `createTestContext`: the store to read, or the project to open by its name and dialecte. */
|
|
60
|
+
export type TestContextParams<GenericConfig extends AnyDialecteConfig> = {
|
|
61
|
+
dialecteConfig: GenericConfig;
|
|
62
|
+
documentId: string;
|
|
63
|
+
} & ({
|
|
64
|
+
store: Store;
|
|
65
|
+
databaseName?: undefined;
|
|
66
|
+
dialecteId?: undefined;
|
|
67
|
+
storage?: undefined;
|
|
68
|
+
} | {
|
|
69
|
+
databaseName: string;
|
|
70
|
+
/**
|
|
71
|
+
* The dialecte of the project named, as the project says it (`project.dialecteId`): with the name, which
|
|
72
|
+
* project the in-memory and SQLite stores hold. `undefined` for a project made with no dialecte (refused
|
|
73
|
+
* `ASSERTION_FAILED` on `sqlite`).
|
|
74
|
+
*/
|
|
75
|
+
dialecteId: string | undefined;
|
|
76
|
+
/**
|
|
77
|
+
* The store of the project named; the test helpers' default when absent (`useTestStorage`, else the local
|
|
78
|
+
* store). `sqlite`: the SQLite engine in this process. A context reads: an import through it runs with no
|
|
79
|
+
* dialecte hooks.
|
|
80
|
+
*/
|
|
81
|
+
storage?: StorageParam;
|
|
82
|
+
store?: undefined;
|
|
83
|
+
});
|
|
84
|
+
export type TestProjectOptions = {
|
|
85
|
+
sourceXml: string;
|
|
86
|
+
targetXml?: string;
|
|
87
|
+
/** The declared config the source and target are imported under. Defaults to the default key. */
|
|
88
|
+
configKey?: string;
|
|
89
|
+
/**
|
|
90
|
+
* The store the test project runs on: the test helpers' default when absent (`useTestStorage`, else the local
|
|
91
|
+
* store). `sqlite`: the SQLite engine in this process.
|
|
92
|
+
*/
|
|
93
|
+
storage?: StorageParam;
|
|
94
|
+
/** Project dev options; `perf: true` makes `document.perf.report()` count the store reads. */
|
|
95
|
+
dev?: {
|
|
96
|
+
perf?: boolean;
|
|
97
|
+
};
|
|
98
|
+
};
|
|
99
|
+
//# sourceMappingURL=create-test-dialecte.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-test-dialecte.types.d.ts","sourceRoot":"","sources":["../../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;CACtB,CAAA;AAEF,+FAA+F;AAC/F,MAAM,MAAM,iBAAiB,CAAC,aAAa,SAAS,iBAAiB,IAAI;IACxE,cAAc,EAAE,aAAa,CAAA;IAC7B,UAAU,EAAE,MAAM,CAAA;CAClB,GAAG,CACD;IAAE,KAAK,EAAE,KAAK,CAAC;IAAC,YAAY,CAAC,EAAE,SAAS,CAAC;IAAC,UAAU,CAAC,EAAE,SAAS,CAAC;IAAC,OAAO,CAAC,EAAE,SAAS,CAAA;CAAE,GACvF;IACA,YAAY,EAAE,MAAM,CAAA;IACpB;;;;OAIG;IACH,UAAU,EAAE,MAAM,GAAG,SAAS,CAAA;IAC9B;;;;OAIG;IACH,OAAO,CAAC,EAAE,YAAY,CAAA;IACtB,KAAK,CAAC,EAAE,SAAS,CAAA;CAChB,CACH,CAAA;AAED,MAAM,MAAM,kBAAkB,GAAG;IAChC,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,iGAAiG;IACjG,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;;OAGG;IACH,OAAO,CAAC,EAAE,YAAY,CAAA;IACtB,8FAA8F;IAC9F,GAAG,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,OAAO,CAAA;KAAE,CAAA;CACxB,CAAA"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { BaseXmlTestCase, TestCases } from './run-test-cases.type';
|
|
2
|
+
import { AnyDialecteConfig } from '../types';
|
|
3
|
+
/** The schema assertions of one config, named for the violation messages. */
|
|
4
|
+
export type CreateSchemaAssertionsParams = {
|
|
5
|
+
config: AnyDialecteConfig;
|
|
6
|
+
schemaName: string;
|
|
7
|
+
};
|
|
8
|
+
/** Which schema a fixture is checked against: a case's own config, else the config under the key. */
|
|
9
|
+
export type SchemaAssertionsForParams<GenericConfig extends AnyDialecteConfig> = {
|
|
10
|
+
configKey: string | undefined;
|
|
11
|
+
caseConfig?: GenericConfig;
|
|
12
|
+
};
|
|
13
|
+
/** What a runner call gives the fixture checks. */
|
|
14
|
+
export type CheckTestCasesParams<GenericConfig extends AnyDialecteConfig> = {
|
|
15
|
+
testCases: TestCases<BaseXmlTestCase>;
|
|
16
|
+
configKey?: string;
|
|
17
|
+
dialecteConfig?: GenericConfig;
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=create-test-helpers-internal.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-test-helpers-internal.types.d.ts","sourceRoot":"","sources":["../../src/test/create-test-helpers-internal.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AACvE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAEhD,6EAA6E;AAC7E,MAAM,MAAM,4BAA4B,GAAG;IAC1C,MAAM,EAAE,iBAAiB,CAAA;IACzB,UAAU,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,qGAAqG;AACrG,MAAM,MAAM,yBAAyB,CAAC,aAAa,SAAS,iBAAiB,IAAI;IAChF,SAAS,EAAE,MAAM,GAAG,SAAS,CAAA;IAC7B,UAAU,CAAC,EAAE,aAAa,CAAA;CAC1B,CAAA;AAED,mDAAmD;AACnD,MAAM,MAAM,oBAAoB,CAAC,aAAa,SAAS,iBAAiB,IAAI;IAC3E,SAAS,EAAE,SAAS,CAAC,eAAe,CAAC,CAAA;IACrC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,cAAc,CAAC,EAAE,aAAa,CAAA;CAC9B,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { CreateTestHelpersParams, TestHelpers } from './create-test-helpers.types';
|
|
2
|
+
import { ExtensionModules } from '../document';
|
|
3
|
+
import { AnyDialecteConfig } from '../types';
|
|
4
|
+
/**
|
|
5
|
+
* Every test helper a dialecte needs, derived from its declaration: the runner, the test project,
|
|
6
|
+
* the record factory, the XPath assertions and the schema assertions. A fixture is checked against
|
|
7
|
+
* the schema of the config it is imported under, then by the dialecte's extra checks, before a
|
|
8
|
+
* case or a test project uses it.
|
|
9
|
+
*
|
|
10
|
+
* @intent get every test helper of a dialecte, set up a dialecte package's tests, check fixtures against the schema
|
|
11
|
+
*/
|
|
12
|
+
export declare function createTestHelpers<GenericConfig extends AnyDialecteConfig, GenericModules extends ExtensionModules = Record<never, never>, GenericConfigKey extends string = string>(params: CreateTestHelpersParams<GenericConfig, GenericModules, GenericConfigKey>): TestHelpers<GenericConfig, GenericModules>;
|
|
13
|
+
//# sourceMappingURL=create-test-helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-test-helpers.d.ts","sourceRoot":"","sources":["../../src/test/create-test-helpers.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EACX,uBAAuB,EAEvB,WAAW,EAEX,MAAM,6BAA6B,CAAA;AAEpC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAClD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAYhD;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAChC,aAAa,SAAS,iBAAiB,EACvC,cAAc,SAAS,gBAAgB,GAAG,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,EAC9D,gBAAgB,SAAS,MAAM,GAAG,MAAM,EAExC,MAAM,EAAE,uBAAuB,CAAC,aAAa,EAAE,cAAc,EAAE,gBAAgB,CAAC,GAC9E,WAAW,CAAC,aAAa,EAAE,cAAc,CAAC,CAkF5C"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { createXmlSchemaAssertions } from './assert-valid-xml';
|
|
2
|
+
import { XmlAssertions } from './assert-xml';
|
|
3
|
+
import { DeclaredTestRunnerParams, TestProjectOptions, TestProjectResult } from './create-test-dialecte.types';
|
|
4
|
+
import { BaseXmlTestCase, TestCases, TestRunner } from './run-test-cases.type';
|
|
5
|
+
import { createTestRecordFactory } from './test-record';
|
|
6
|
+
import { ExtensionModules } from '../document';
|
|
7
|
+
import { AnyDialecteConfig } from '../types';
|
|
8
|
+
export type XmlSchemaAssertions = ReturnType<typeof createXmlSchemaAssertions>;
|
|
9
|
+
/**
|
|
10
|
+
* A dialecte's own fixture checks, run once core's schema check has passed (scl's coherent
|
|
11
|
+
* references). Each throws to refuse.
|
|
12
|
+
*/
|
|
13
|
+
export type TestHelperExtraChecks = {
|
|
14
|
+
/** On a runner call's cases, before the suite runs. */
|
|
15
|
+
testCases?: (params: {
|
|
16
|
+
testCases: TestCases<BaseXmlTestCase>;
|
|
17
|
+
configKey: string;
|
|
18
|
+
}) => void;
|
|
19
|
+
/** On a test project's source, then its target. */
|
|
20
|
+
fixture?: (params: {
|
|
21
|
+
xml: string;
|
|
22
|
+
label: 'sourceXml' | 'targetXml';
|
|
23
|
+
configKey: string;
|
|
24
|
+
}) => void;
|
|
25
|
+
};
|
|
26
|
+
export type CreateTestHelpersParams<GenericConfig extends AnyDialecteConfig, GenericModules extends ExtensionModules = Record<never, never>, GenericConfigKey extends string = string> = DeclaredTestRunnerParams<GenericConfig, GenericModules, GenericConfigKey> & {
|
|
27
|
+
/** Names the schema in fixture violation messages. Defaults to the dialecte's id. */
|
|
28
|
+
schemaName?: string;
|
|
29
|
+
extraChecks?: TestHelperExtraChecks;
|
|
30
|
+
};
|
|
31
|
+
export type TestHelperProjectParams = TestProjectOptions & {
|
|
32
|
+
/** Why this call's fixtures skip the extra checks; core's schema check still runs. */
|
|
33
|
+
skipExtraChecks?: string;
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* Every test helper of a declared dialecte. The runner and the test project check each fixture
|
|
37
|
+
* against the schema of the config it is imported under, then run the extra checks.
|
|
38
|
+
*/
|
|
39
|
+
export type TestHelpers<GenericConfig extends AnyDialecteConfig, GenericModules extends ExtensionModules = Record<never, never>> = {
|
|
40
|
+
/**
|
|
41
|
+
* Each case's XML is checked before the suite runs, every invalid case at once: against the
|
|
42
|
+
* call's `dialecteConfig` when it passes one, else the config under its `configKey`.
|
|
43
|
+
*/
|
|
44
|
+
runTestCases: TestRunner<GenericConfig, GenericModules>;
|
|
45
|
+
/** The source and target are checked against the schema (required attributes may be left out). */
|
|
46
|
+
createTestProject: (params: TestHelperProjectParams) => Promise<TestProjectResult<GenericConfig, GenericModules>>;
|
|
47
|
+
/** Bound to the default config. */
|
|
48
|
+
createTestRecord: ReturnType<typeof createTestRecordFactory<GenericConfig>>;
|
|
49
|
+
} & XmlAssertions & XmlSchemaAssertions;
|
|
50
|
+
//# sourceMappingURL=create-test-helpers.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-test-helpers.types.d.ts","sourceRoot":"","sources":["../../src/test/create-test-helpers.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAA;AACnE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AACjD,OAAO,KAAK,EACX,wBAAwB,EACxB,kBAAkB,EAClB,iBAAiB,EACjB,MAAM,8BAA8B,CAAA;AACrC,OAAO,KAAK,EAAE,eAAe,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AACnF,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAA;AAC5D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAClD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAEhD,MAAM,MAAM,mBAAmB,GAAG,UAAU,CAAC,OAAO,yBAAyB,CAAC,CAAA;AAE9E;;;GAGG;AACH,MAAM,MAAM,qBAAqB,GAAG;IACnC,uDAAuD;IACvD,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE;QAAE,SAAS,EAAE,SAAS,CAAC,eAAe,CAAC,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,KAAK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raint.ts"],"names":[],"mappings":"AAAA,8GAA8G;AAE9G,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAA;AAG5D,wBAAgB,cAAc,CAAC,UAAU,SAAS,OAAO,KAAK,IAAI,CAEjE"}
|