@dialecte/core 0.8.1 → 0.10.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-35vzG0HK.js +2 -0
- package/dist/dialecte/create-dialecte-project.d.ts +1 -2
- package/dist/dialecte/create-dialecte-project.d.ts.map +1 -1
- package/dist/dialecte/create-project-factory.d.ts +5 -5
- package/dist/dialecte/create-project-factory.d.ts.map +1 -1
- package/dist/dialecte/define-dialecte.d.ts +2 -2
- package/dist/dialecte/dialecte.types.d.ts +11 -23
- package/dist/dialecte/dialecte.types.d.ts.map +1 -1
- package/dist/{dialecte-gIPrRzni.js → dialecte-CVLWSkgW.js} +1726 -1673
- package/dist/document/document.d.ts +1 -1
- package/dist/document/query/get/record/get-record.d.ts +14 -1
- package/dist/document/query/get/record/get-record.d.ts.map +1 -1
- package/dist/document/query/get/record/get-records.d.ts +12 -2
- package/dist/document/query/get/record/get-records.d.ts.map +1 -1
- package/dist/{engine-store-CIEqgPUb.js → engine-store-Deo9XNhr.js} +21 -21
- package/dist/engine.constants-Bi4gw6BR.js +205 -0
- package/dist/errors/{codes.d.ts → codes.constants.d.ts} +33 -105
- package/dist/errors/{codes.d.ts.map → codes.constants.d.ts.map} +1 -1
- package/dist/errors/core-codes.constants.d.ts +3 -0
- package/dist/errors/core-codes.constants.d.ts.map +1 -0
- package/dist/errors/errors.constants.d.ts +5 -0
- package/dist/errors/errors.constants.d.ts.map +1 -1
- package/dist/errors/errors.d.ts.map +1 -1
- package/dist/errors/index.d.ts +1 -1
- package/dist/errors/index.d.ts.map +1 -1
- package/dist/errors/types.d.ts +1 -1
- package/dist/errors/types.d.ts.map +1 -1
- package/dist/{helpers-DVShv41E.js → helpers-D8p0KiJu.js} +1 -1
- package/dist/helpers.js +2 -2
- package/dist/{in-process-link-DBeAOZRp.js → in-process-link-B-TCHrlb.js} +996 -993
- package/dist/index.js +8 -7
- package/dist/project/index.d.ts +1 -1
- package/dist/project/index.d.ts.map +1 -1
- package/dist/project/io/store-runtime.types.d.ts +1 -3
- package/dist/project/io/store-runtime.types.d.ts.map +1 -1
- package/dist/project/project.d.ts +13 -15
- package/dist/project/project.d.ts.map +1 -1
- package/dist/project/types.d.ts +24 -19
- package/dist/project/types.d.ts.map +1 -1
- package/dist/{project-key-Ch34EtFa.js → project-key-2ccZ-0gu.js} +195 -205
- package/dist/running-operations-DCKvzlU7.js +107 -0
- package/dist/{same-json-value-C6kUaoyt.js → same-json-value-_AChwM_n.js} +41 -41
- package/dist/sqlite-engine.d.ts +7 -0
- package/dist/sqlite-engine.d.ts.map +1 -0
- package/dist/{engine.js → sqlite-engine.js} +4144 -4079
- package/dist/sqlite.d.ts +27 -2
- package/dist/sqlite.d.ts.map +1 -1
- package/dist/sqlite.js +1118 -917
- package/dist/store/in-memory/in-memory-state.constants.d.ts +14 -0
- package/dist/store/in-memory/in-memory-state.constants.d.ts.map +1 -0
- package/dist/store/in-memory/in-memory-state.d.ts +0 -4
- package/dist/store/in-memory/in-memory-state.d.ts.map +1 -1
- package/dist/store/in-memory/in-memory-store.d.ts.map +1 -1
- package/dist/store/in-memory/types.d.ts +1 -2
- package/dist/store/in-memory/types.d.ts.map +1 -1
- package/dist/store/index.d.ts +2 -1
- package/dist/store/index.d.ts.map +1 -1
- package/dist/store/lost-write.d.ts +8 -8
- package/dist/store/lost-write.d.ts.map +1 -1
- package/dist/store/lost-write.types.d.ts +1 -1
- package/dist/store/lost-write.types.d.ts.map +1 -1
- package/dist/store/{engine/project-key.d.ts → project-key.d.ts} +0 -5
- package/dist/store/project-key.d.ts.map +1 -0
- package/dist/store/resolve-store.d.ts +6 -18
- package/dist/store/resolve-store.d.ts.map +1 -1
- package/dist/store/sqlite/adapter/in-process-link.constants.d.ts +12 -0
- package/dist/store/sqlite/adapter/in-process-link.constants.d.ts.map +1 -0
- package/dist/store/sqlite/adapter/in-process-link.d.ts +1 -1
- package/dist/store/sqlite/adapter/in-process-link.d.ts.map +1 -1
- package/dist/store/sqlite/adapter/sqlite-connector.d.ts +12 -11
- package/dist/store/sqlite/adapter/sqlite-connector.d.ts.map +1 -1
- package/dist/store/sqlite/adapter/sqlite-connector.types.d.ts +7 -0
- package/dist/store/sqlite/adapter/sqlite-connector.types.d.ts.map +1 -0
- package/dist/store/sqlite/adapter/sqlite-hub-spawner.d.ts +8 -3
- package/dist/store/sqlite/adapter/sqlite-hub-spawner.d.ts.map +1 -1
- package/dist/store/sqlite/adapter/sqlite-hub-spawner.types.d.ts +12 -1
- package/dist/store/sqlite/adapter/sqlite-hub-spawner.types.d.ts.map +1 -1
- package/dist/store/sqlite/adapter/sqlite-worker-connector.d.ts +2 -2
- package/dist/store/sqlite/adapter/sqlite-worker-connector.d.ts.map +1 -1
- package/dist/store/sqlite/adapter/sqlite-worker-connector.types.d.ts +1 -1
- package/dist/store/sqlite/adapter/sqlite-worker-connector.types.d.ts.map +1 -1
- package/dist/store/sqlite/engine/engine.types.d.ts +2 -2
- package/dist/store/sqlite/engine/engine.types.d.ts.map +1 -1
- package/dist/store/sqlite/engine/schema.d.ts.map +1 -1
- package/dist/store/sqlite/engine/sqlite-engine.d.ts.map +1 -1
- package/dist/store/{hub-public.d.ts → sqlite/hub-public.d.ts} +9 -9
- package/dist/store/sqlite/hub-public.d.ts.map +1 -0
- package/dist/store/sqlite/packaging/engine-packaging.constants.d.ts +15 -0
- package/dist/store/sqlite/packaging/engine-packaging.constants.d.ts.map +1 -0
- package/dist/store/sqlite/runtime/close-engine.d.ts +5 -2
- package/dist/store/sqlite/runtime/close-engine.d.ts.map +1 -1
- package/dist/store/sqlite/runtime/engine-control-loop.d.ts +11 -0
- package/dist/store/sqlite/runtime/engine-control-loop.d.ts.map +1 -0
- package/dist/store/sqlite/runtime/install-pool.d.ts +1 -1
- package/dist/store/sqlite/runtime/install-pool.d.ts.map +1 -1
- package/dist/store/sqlite/runtime/progress-beat.d.ts +1 -1
- package/dist/store/sqlite/runtime/progress-beat.d.ts.map +1 -1
- package/dist/store/sqlite/runtime/runtime.types.d.ts +7 -4
- package/dist/store/sqlite/runtime/runtime.types.d.ts.map +1 -1
- package/dist/store/sqlite/runtime/serve-sqlite-engine.d.ts +9 -0
- package/dist/store/sqlite/runtime/serve-sqlite-engine.d.ts.map +1 -0
- package/dist/store/sqlite/runtime/serve-sqlite-engine.types.d.ts +27 -0
- package/dist/store/sqlite/runtime/serve-sqlite-engine.types.d.ts.map +1 -0
- package/dist/store/sqlite/served/client/check-engine-wire.d.ts.map +1 -0
- package/dist/store/{engine → sqlite/served}/client/client.constants.d.ts +3 -3
- package/dist/store/sqlite/served/client/client.constants.d.ts.map +1 -0
- package/dist/store/{engine → sqlite/served}/client/client.types.d.ts +13 -8
- package/dist/store/sqlite/served/client/client.types.d.ts.map +1 -0
- package/dist/store/{engine → sqlite/served}/client/engine-client.d.ts +1 -1
- package/dist/store/sqlite/served/client/engine-client.d.ts.map +1 -0
- package/dist/store/sqlite/served/client/engine-control.d.ts.map +1 -0
- package/dist/store/sqlite/served/client/heartbeat-watch.d.ts.map +1 -0
- package/dist/store/{engine → sqlite/served}/client/hub-connector.d.ts +1 -1
- package/dist/store/sqlite/served/client/hub-connector.d.ts.map +1 -0
- package/dist/store/{engine → sqlite/served}/client/hub-connector.types.d.ts +6 -7
- package/dist/store/sqlite/served/client/hub-connector.types.d.ts.map +1 -0
- package/dist/store/sqlite/served/client/worker-connector.d.ts.map +1 -0
- package/dist/store/sqlite/served/creation-refusal.d.ts.map +1 -0
- package/dist/store/sqlite/served/dialecte-refusal.d.ts +19 -0
- package/dist/store/sqlite/served/dialecte-refusal.d.ts.map +1 -0
- package/dist/store/sqlite/served/engine-lock.d.ts +6 -0
- package/dist/store/sqlite/served/engine-lock.d.ts.map +1 -0
- package/dist/store/sqlite/served/engine-store.constants.d.ts +3 -0
- package/dist/store/sqlite/served/engine-store.constants.d.ts.map +1 -0
- package/dist/store/{engine → sqlite/served}/engine-store.d.ts +6 -6
- package/dist/store/sqlite/served/engine-store.d.ts.map +1 -0
- package/dist/store/sqlite/served/engine-store.types.d.ts.map +1 -0
- package/dist/store/sqlite/served/engine.constants.d.ts.map +1 -0
- package/dist/store/{engine → sqlite/served}/engine.types.d.ts +2 -4
- package/dist/store/sqlite/served/engine.types.d.ts.map +1 -0
- package/dist/store/sqlite/served/host/changed.d.ts +5 -0
- package/dist/store/sqlite/served/host/changed.d.ts.map +1 -0
- package/dist/store/sqlite/served/host/engine-wire.d.ts.map +1 -0
- package/dist/store/{engine → sqlite/served}/host/heartbeat.d.ts +1 -1
- package/dist/store/sqlite/served/host/heartbeat.d.ts.map +1 -0
- package/dist/store/sqlite/served/host/host.constants.d.ts.map +1 -0
- package/dist/store/{engine → sqlite/served}/host/host.types.d.ts +4 -3
- package/dist/store/sqlite/served/host/host.types.d.ts.map +1 -0
- package/dist/store/sqlite/served/host/store-events.constants.d.ts +9 -0
- package/dist/store/sqlite/served/host/store-events.constants.d.ts.map +1 -0
- package/dist/store/sqlite/served/host/store-events.d.ts.map +1 -0
- package/dist/store/sqlite/served/hub/hub-client.constants.d.ts.map +1 -0
- package/dist/store/sqlite/served/hub/hub-client.d.ts.map +1 -0
- package/dist/store/{engine → sqlite/served}/hub/hub-client.types.d.ts +2 -9
- package/dist/store/sqlite/served/hub/hub-client.types.d.ts.map +1 -0
- package/dist/store/sqlite/served/hub/hub-protocol.types.d.ts.map +1 -0
- package/dist/store/sqlite/served/hub/hub-router.d.ts.map +1 -0
- package/dist/store/sqlite/served/hub/hub-shell.d.ts.map +1 -0
- package/dist/store/sqlite/served/hub/hub-shell.types.d.ts.map +1 -0
- package/dist/store/{engine → sqlite/served}/hub/hub.constants.d.ts +3 -3
- package/dist/store/sqlite/served/hub/hub.constants.d.ts.map +1 -0
- package/dist/store/{engine → sqlite/served}/hub/hub.types.d.ts +2 -2
- package/dist/store/sqlite/served/hub/hub.types.d.ts.map +1 -0
- package/dist/store/sqlite/served/hub/hub.worker.d.ts.map +1 -0
- package/dist/store/sqlite/served/hub/realm-host.d.ts.map +1 -0
- package/dist/store/{engine → sqlite/served}/hub/realm-host.types.d.ts +3 -3
- package/dist/store/sqlite/served/hub/realm-host.types.d.ts.map +1 -0
- package/dist/store/sqlite/served/wire/error-envelope.d.ts.map +1 -0
- package/dist/store/sqlite/served/wire/wire-values.d.ts.map +1 -0
- package/dist/store/sqlite/served/wire/wire.constants.d.ts.map +1 -0
- package/dist/store/{engine → sqlite/served}/wire/wire.types.d.ts +1 -1
- package/dist/store/sqlite/served/wire/wire.types.d.ts.map +1 -0
- package/dist/store/sqlite/sqlite-connector-params.d.ts +13 -0
- package/dist/store/sqlite/sqlite-connector-params.d.ts.map +1 -0
- package/dist/store/sqlite/sqlite-engine-registration.d.ts +30 -0
- package/dist/store/sqlite/sqlite-engine-registration.d.ts.map +1 -0
- package/dist/store/sqlite/sqlite-error-entry.d.ts +10 -0
- package/dist/store/sqlite/sqlite-error-entry.d.ts.map +1 -0
- package/dist/store/sqlite/sqlite-errors.constants.d.ts +110 -0
- package/dist/store/sqlite/sqlite-errors.constants.d.ts.map +1 -0
- package/dist/store/sqlite/sqlite-errors.types.d.ts +7 -0
- package/dist/store/sqlite/sqlite-errors.types.d.ts.map +1 -0
- package/dist/store/sqlite/sqlite-storage-kind.constants.d.ts +10 -0
- package/dist/store/sqlite/sqlite-storage-kind.constants.d.ts.map +1 -0
- package/dist/store/sqlite/sqlite-storage-kind.d.ts +3 -0
- package/dist/store/sqlite/sqlite-storage-kind.d.ts.map +1 -0
- package/dist/store/sqlite/sqlite-storage.constants.d.ts +24 -0
- package/dist/store/sqlite/sqlite-storage.constants.d.ts.map +1 -0
- package/dist/store/sqlite/sqlite-storage.types.d.ts +27 -0
- package/dist/store/sqlite/sqlite-storage.types.d.ts.map +1 -0
- package/dist/store/sqlite/sqlite-store-of.d.ts +8 -3
- package/dist/store/sqlite/sqlite-store-of.d.ts.map +1 -1
- package/dist/store/storage-kinds.constants.d.ts +16 -0
- package/dist/store/storage-kinds.constants.d.ts.map +1 -0
- package/dist/store/storage-kinds.d.ts +43 -0
- package/dist/store/storage-kinds.d.ts.map +1 -0
- package/dist/store/storage-kinds.types.d.ts +46 -0
- package/dist/store/storage-kinds.types.d.ts.map +1 -0
- package/dist/store/store.types.d.ts +6 -4
- package/dist/store/store.types.d.ts.map +1 -1
- package/dist/test/assert-xml/assert-xml.d.ts +4 -2
- package/dist/test/assert-xml/assert-xml.d.ts.map +1 -1
- package/dist/test/assert-xml/index.d.ts +1 -0
- package/dist/test/assert-xml/index.d.ts.map +1 -1
- package/dist/test/assert-xml/xml-assertion-error.d.ts +8 -0
- package/dist/test/assert-xml/xml-assertion-error.d.ts.map +1 -0
- package/dist/test/create-test-dialecte.constants.d.ts +4 -0
- package/dist/test/create-test-dialecte.constants.d.ts.map +1 -0
- package/dist/test/create-test-dialecte.d.ts.map +1 -1
- package/dist/test/indexeddb-storage.setup.d.ts +1 -0
- package/dist/test/indexeddb-storage.setup.d.ts.map +1 -0
- package/dist/test/test-storage/index.d.ts +1 -1
- package/dist/test/test-storage/index.d.ts.map +1 -1
- package/dist/test/test-storage/sqlite-test-store.d.ts +15 -0
- package/dist/test/test-storage/sqlite-test-store.d.ts.map +1 -0
- package/dist/test/test-storage/test-storage.types.d.ts +12 -0
- package/dist/test/test-storage/test-storage.types.d.ts.map +1 -1
- package/dist/test/test-storage/test-store-for.d.ts +18 -6
- package/dist/test/test-storage/test-store-for.d.ts.map +1 -1
- package/dist/test/test-storage/test-store-providers.constants.d.ts +8 -0
- package/dist/test/test-storage/test-store-providers.constants.d.ts.map +1 -0
- package/dist/test/test-storage/test-store-providers.d.ts +11 -0
- package/dist/test/test-storage/test-store-providers.d.ts.map +1 -0
- package/dist/test.js +805 -765
- package/dist/{utils-USNkj4sT.js → utils-Cv4oHia0.js} +63 -137
- package/dist/utils.js +1 -1
- package/package.json +40 -8
- package/skills/dialecte/SKILL.md +8 -6
- package/skills/dialecte/references/api.json +93 -66
- package/skills/dialecte/references/api.md +463 -461
- package/skills/dialecte/references/core-api.md +42 -15
- package/skills/dialecte/references/testing.md +167 -11
- package/skills/dialecte-contributing/SKILL.md +1 -1
- package/skills/dialecte-contributing/references/code-rules.md +7 -0
- package/skills/dialecte-contributing/references/landing-changes.md +4 -4
- package/skills/dialecte-lot/SKILL.md +67 -28
- package/skills/dialecte-lot/references/briefs.md +30 -6
- package/skills/dialecte-lot/references/standard-check.md +2 -2
- package/skills/dialecte-lot/references/stations.md +5 -3
- package/dist/assets/hub.worker-B1HcVDhn.js +0 -2
- package/dist/engine.constants-DBMjMmV9.js +0 -98
- package/dist/engine.d.ts +0 -9
- package/dist/engine.d.ts.map +0 -1
- package/dist/running-operations-vnijBvn7.js +0 -76
- package/dist/store/engine/client/check-engine-wire.d.ts.map +0 -1
- package/dist/store/engine/client/client.constants.d.ts.map +0 -1
- package/dist/store/engine/client/client.types.d.ts.map +0 -1
- package/dist/store/engine/client/engine-client.d.ts.map +0 -1
- package/dist/store/engine/client/engine-control.d.ts.map +0 -1
- package/dist/store/engine/client/heartbeat-watch.d.ts.map +0 -1
- package/dist/store/engine/client/hub-connector.d.ts.map +0 -1
- package/dist/store/engine/client/hub-connector.types.d.ts.map +0 -1
- package/dist/store/engine/client/worker-connector.d.ts.map +0 -1
- package/dist/store/engine/creation-refusal.d.ts.map +0 -1
- package/dist/store/engine/dialecte-refusal.d.ts +0 -18
- package/dist/store/engine/dialecte-refusal.d.ts.map +0 -1
- package/dist/store/engine/engine-store.d.ts.map +0 -1
- package/dist/store/engine/engine-store.types.d.ts.map +0 -1
- package/dist/store/engine/engine.constants.d.ts.map +0 -1
- package/dist/store/engine/engine.types.d.ts.map +0 -1
- package/dist/store/engine/host/engine-wire.d.ts.map +0 -1
- package/dist/store/engine/host/heartbeat.d.ts.map +0 -1
- package/dist/store/engine/host/host.constants.d.ts.map +0 -1
- package/dist/store/engine/host/host.types.d.ts.map +0 -1
- package/dist/store/engine/host/store-events.d.ts.map +0 -1
- package/dist/store/engine/hub/hub-client.constants.d.ts.map +0 -1
- package/dist/store/engine/hub/hub-client.d.ts.map +0 -1
- package/dist/store/engine/hub/hub-client.types.d.ts.map +0 -1
- package/dist/store/engine/hub/hub-protocol.types.d.ts.map +0 -1
- package/dist/store/engine/hub/hub-router.d.ts.map +0 -1
- package/dist/store/engine/hub/hub-shell.d.ts.map +0 -1
- package/dist/store/engine/hub/hub-shell.types.d.ts.map +0 -1
- package/dist/store/engine/hub/hub.constants.d.ts.map +0 -1
- package/dist/store/engine/hub/hub.types.d.ts.map +0 -1
- package/dist/store/engine/hub/hub.worker.d.ts.map +0 -1
- package/dist/store/engine/hub/realm-host.d.ts.map +0 -1
- package/dist/store/engine/hub/realm-host.types.d.ts.map +0 -1
- package/dist/store/engine/project-key.d.ts.map +0 -1
- package/dist/store/engine/wire/error-envelope.d.ts.map +0 -1
- package/dist/store/engine/wire/wire-values.d.ts.map +0 -1
- package/dist/store/engine/wire/wire.constants.d.ts.map +0 -1
- package/dist/store/engine/wire/wire.types.d.ts.map +0 -1
- package/dist/store/hub-public.d.ts.map +0 -1
- package/dist/store/sqlite/runtime/serve-dialecte-engine.d.ts +0 -16
- package/dist/store/sqlite/runtime/serve-dialecte-engine.d.ts.map +0 -1
- package/dist/store/sqlite-storage.constants.d.ts +0 -14
- package/dist/store/sqlite-storage.constants.d.ts.map +0 -1
- package/dist/store/sqlite-storage.d.ts +0 -22
- package/dist/store/sqlite-storage.d.ts.map +0 -1
- package/dist/store/sqlite-storage.types.d.ts +0 -24
- package/dist/store/sqlite-storage.types.d.ts.map +0 -1
- package/dist/test/test-dialecte.worker.d.ts +0 -2
- package/dist/test/test-dialecte.worker.d.ts.map +0 -1
- /package/dist/store/{engine → sqlite/served}/client/check-engine-wire.d.ts +0 -0
- /package/dist/store/{engine → sqlite/served}/client/engine-control.d.ts +0 -0
- /package/dist/store/{engine → sqlite/served}/client/heartbeat-watch.d.ts +0 -0
- /package/dist/store/{engine → sqlite/served}/client/worker-connector.d.ts +0 -0
- /package/dist/store/{engine → sqlite/served}/creation-refusal.d.ts +0 -0
- /package/dist/store/{engine → sqlite/served}/engine-store.types.d.ts +0 -0
- /package/dist/store/{engine → sqlite/served}/engine.constants.d.ts +0 -0
- /package/dist/store/{engine → sqlite/served}/host/engine-wire.d.ts +0 -0
- /package/dist/store/{engine → sqlite/served}/host/host.constants.d.ts +0 -0
- /package/dist/store/{engine → sqlite/served}/host/store-events.d.ts +0 -0
- /package/dist/store/{engine → sqlite/served}/hub/hub-client.constants.d.ts +0 -0
- /package/dist/store/{engine → sqlite/served}/hub/hub-client.d.ts +0 -0
- /package/dist/store/{engine → sqlite/served}/hub/hub-protocol.types.d.ts +0 -0
- /package/dist/store/{engine → sqlite/served}/hub/hub-router.d.ts +0 -0
- /package/dist/store/{engine → sqlite/served}/hub/hub-shell.d.ts +0 -0
- /package/dist/store/{engine → sqlite/served}/hub/hub-shell.types.d.ts +0 -0
- /package/dist/store/{engine → sqlite/served}/hub/hub.worker.d.ts +0 -0
- /package/dist/store/{engine → sqlite/served}/hub/realm-host.d.ts +0 -0
- /package/dist/store/{engine → sqlite/served}/wire/error-envelope.d.ts +0 -0
- /package/dist/store/{engine → sqlite/served}/wire/wire-values.d.ts +0 -0
- /package/dist/store/{engine → sqlite/served}/wire/wire.constants.d.ts +0 -0
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
// src/errors/errors.constants.ts
|
|
2
|
-
var e = "https://dialecte.github.io/core", t =
|
|
2
|
+
var e = "https://dialecte.github.io/core", t = /* @__PURE__ */ new Set([
|
|
3
|
+
"throwDialecteError",
|
|
4
|
+
"createDialecteError",
|
|
5
|
+
"invariant",
|
|
6
|
+
"reportFailure"
|
|
7
|
+
]), n = {
|
|
3
8
|
UNKNOWN: {
|
|
4
9
|
code: "D0001",
|
|
5
10
|
message: "An unknown error occurred",
|
|
@@ -13,7 +18,7 @@ var e = "https://dialecte.github.io/core", t = {
|
|
|
13
18
|
code: "D0002",
|
|
14
19
|
message: "Assertion failed",
|
|
15
20
|
explanation: {
|
|
16
|
-
when: "An `invariant` without its own key failed, or core met a state it never expects (a catalogue built wrong, an inconsistent export,
|
|
21
|
+
when: "An `invariant` without its own key failed, or core met a state it never expects (a catalogue built wrong, an inconsistent export, a store running on a dependency older than the one it supports).",
|
|
17
22
|
fix: "Read `detail`: it names the condition. Give `invariant` a key of its own when the failure is one a caller should handle.",
|
|
18
23
|
docs: `${e}/guide/development/state-and-errors#error-catalog`
|
|
19
24
|
}
|
|
@@ -22,8 +27,8 @@ var e = "https://dialecte.github.io/core", t = {
|
|
|
22
27
|
code: "D1001",
|
|
23
28
|
message: "Failed to open database",
|
|
24
29
|
explanation: {
|
|
25
|
-
when: "The
|
|
26
|
-
fix: "Check the browser supports the store
|
|
30
|
+
when: "The store could not open the project's data, or could not reach what serves it (its database, a worker, a server): it failed to start, was blocked, or went unanswered; the failure is the `cause` when there is one.",
|
|
31
|
+
fix: "Check the browser supports what the store needs and that no other tab holds the project; reload, or open the project with another storage. The store's own docs name what it needs.",
|
|
27
32
|
docs: `${e}/api/project#store-errors`
|
|
28
33
|
}
|
|
29
34
|
},
|
|
@@ -112,38 +117,11 @@ var e = "https://dialecte.github.io/core", t = {
|
|
|
112
117
|
code: "D1011",
|
|
113
118
|
message: "Failed to read from database",
|
|
114
119
|
explanation: {
|
|
115
|
-
when: "The
|
|
120
|
+
when: "The store's database failed under a read; the failure is the `cause`.",
|
|
116
121
|
fix: "Read `cause`; reopen the project. A lasting failure means the file is damaged: import its documents again.",
|
|
117
122
|
docs: `${e}/api/project#store-errors`
|
|
118
123
|
}
|
|
119
124
|
},
|
|
120
|
-
STORE_PROTOCOL_MISMATCH: {
|
|
121
|
-
code: "D1012",
|
|
122
|
-
message: "Another version of the library holds the shared store connection",
|
|
123
|
-
explanation: {
|
|
124
|
-
when: "Another version of the library already holds the shared store connection (another tab runs an older or newer build).",
|
|
125
|
-
fix: "Close the other tabs of the app, or reload them all on the same version.",
|
|
126
|
-
docs: `${e}/api/project#store-errors`
|
|
127
|
-
}
|
|
128
|
-
},
|
|
129
|
-
STORE_REALM_ID_TAKEN: {
|
|
130
|
-
code: "D1013",
|
|
131
|
-
message: "A view with this id is already connected to the shared store",
|
|
132
|
-
explanation: {
|
|
133
|
-
when: "A view joined the shared store with an id another connected view already uses.",
|
|
134
|
-
fix: "Give each view its own id; reload the page that reused one.",
|
|
135
|
-
docs: `${e}/api/project#store-errors`
|
|
136
|
-
}
|
|
137
|
-
},
|
|
138
|
-
STORE_REALM_UNKNOWN: {
|
|
139
|
-
code: "D1014",
|
|
140
|
-
message: "The shared store does not know this view",
|
|
141
|
-
explanation: {
|
|
142
|
-
when: "A view spoke to the shared store without having joined it, or after it left.",
|
|
143
|
-
fix: "Join (open the project) before reading or writing; reload a view that was disconnected.",
|
|
144
|
-
docs: `${e}/api/project#store-errors`
|
|
145
|
-
}
|
|
146
|
-
},
|
|
147
125
|
STORE_VALUE_NOT_JSON: {
|
|
148
126
|
code: "D1015",
|
|
149
127
|
message: "A value handed to the store is not JSON",
|
|
@@ -157,8 +135,8 @@ var e = "https://dialecte.github.io/core", t = {
|
|
|
157
135
|
code: "D1016",
|
|
158
136
|
message: "This browser gives the page no storage for a project",
|
|
159
137
|
explanation: {
|
|
160
|
-
when: "The browser gives the page
|
|
161
|
-
fix: "Open the app in a normal (not private) window of a browser that supports the
|
|
138
|
+
when: "The browser gives the page none of the storage the store needs (a private window, an API the browser lacks), so it cannot create, open or destroy the project; nothing is changed.",
|
|
139
|
+
fix: "Open the app in a normal (not private) window of a browser that supports what the project's store needs, or open the project with another storage.",
|
|
162
140
|
docs: `${e}/api/project#store-errors`
|
|
163
141
|
}
|
|
164
142
|
},
|
|
@@ -166,27 +144,27 @@ var e = "https://dialecte.github.io/core", t = {
|
|
|
166
144
|
code: "D1017",
|
|
167
145
|
message: "Not enough storage left for the project",
|
|
168
146
|
explanation: {
|
|
169
|
-
when: "The origin has too little storage left
|
|
147
|
+
when: "The origin has too little storage left for what the call needs (a new project's files, an import's room ahead of it), or the store's storage refused a write for want of space; nothing of the call applied. A store that checks the room it needs answers it; the local (IndexedDB) store answers the failing write's own error (`STORE_COMMIT_FAILED`, `STORE_BULK_ADD_FAILED`, `STORE_BULK_UPDATE_FAILED`; an import `IMPORT_FAILED`); the in-memory store has no limit.",
|
|
170
148
|
fix: "Free storage for the origin (delete projects no longer needed) or import a smaller file, then try again; `meta.needed` and `meta.available` give the sizes when known.",
|
|
171
149
|
docs: `${e}/api/project#store-errors`
|
|
172
150
|
}
|
|
173
151
|
},
|
|
174
|
-
|
|
152
|
+
STORE_CONNECTION_LOST: {
|
|
175
153
|
code: "D1018",
|
|
176
|
-
message: "The
|
|
154
|
+
message: "The store lost its connection",
|
|
177
155
|
explanation: {
|
|
178
|
-
when: "A call to a project
|
|
179
|
-
fix: "A Document's commit and a Project's import ask the outcome themselves, once: a commit that landed resolves; otherwise the refusal says `meta.outcome` - `not-applied` (make it again if wanted), `running` (
|
|
180
|
-
docs: `${e}/api/project#
|
|
156
|
+
when: "A call to a store whose project is served elsewhere (a worker, another realm, a server) lost its connection to what serves it: that went away or gave no answer within its budget, sent nothing for too long while the call waited (the call may still finish), or dropped this view. `meta.reason` is the store's own word for why, listed in its docs; a write's refusal carries `meta.writeId`.",
|
|
157
|
+
fix: "A Document's commit and a Project's import ask the outcome themselves, once: a commit that landed resolves; otherwise the refusal says `meta.outcome` - `not-applied` (make it again if wanted), `running` (what serves the store may still apply it: tell the user, read again later), `unknown` (it could not be asked), or `applied` for an import (its document is in the project; its diagnostics were lost). Elsewhere ask `getWriteOutcome({ writeId })` with `meta.writeId` before writing again; never retry a write blindly. The store's docs say what each `meta.reason` asks of the app.",
|
|
158
|
+
docs: `${e}/api/project#a-lost-connection`
|
|
181
159
|
}
|
|
182
160
|
},
|
|
183
|
-
|
|
184
|
-
code: "
|
|
185
|
-
message: "
|
|
161
|
+
STORE_KIND_TAKEN: {
|
|
162
|
+
code: "D1021",
|
|
163
|
+
message: "This storage type is registered already by another kind",
|
|
186
164
|
explanation: {
|
|
187
|
-
when: "`
|
|
188
|
-
fix: "
|
|
189
|
-
docs: `${e}/
|
|
165
|
+
when: "`registerStorageKind({ type, kind })` named a type a kind of another `id` holds already: the first registration in the realm is kept, nothing replaced (the same `id` again does nothing: a module evaluated twice, or another copy of the package). `meta`: `type`, `registered` (the id kept), `asked` (the id refused).",
|
|
166
|
+
fix: "Register each storage type once, from one package: import the entry that registers it from a single copy, or give the other kind a type of its own.",
|
|
167
|
+
docs: `${e}/guide/development/implementing-a-store#register-a-storage-kind`
|
|
190
168
|
}
|
|
191
169
|
},
|
|
192
170
|
ELEMENT_NOT_FOUND: {
|
|
@@ -477,47 +455,20 @@ var e = "https://dialecte.github.io/core", t = {
|
|
|
477
455
|
docs: `${e}/api/project#blobs`
|
|
478
456
|
}
|
|
479
457
|
},
|
|
480
|
-
PROJECT_LAYOUT_OUTDATED: {
|
|
481
|
-
code: "D7005",
|
|
482
|
-
message: "Project stored by another version of the library",
|
|
483
|
-
explanation: {
|
|
484
|
-
when: "The project file was stored by another version of the library (another layout); nothing was written to it.",
|
|
485
|
-
fix: "Delete the project and import its files again with this version.",
|
|
486
|
-
docs: `${e}/api/project#store-errors`
|
|
487
|
-
}
|
|
488
|
-
},
|
|
489
|
-
PROJECT_ENGINE_UNAVAILABLE: {
|
|
490
|
-
code: "D7006",
|
|
491
|
-
message: "No view can start the project engine",
|
|
492
|
-
explanation: {
|
|
493
|
-
when: "The project's engine could not be started or reached: its worker failed to load or never answered its open within the open budget; through the origin's hub, no open view offers an engine for the project's dialecte, or the engine never said it opened; a destroy still running past the open budget, or one asked by a page suspended before the hub granted it.",
|
|
494
|
-
fix: "Keep one tab of the app open and reload; check the dialecte's `engineUrl` points at its worker and that it loads (the console names a script that fails); a destroy refused so is asked again once the project is closed elsewhere.",
|
|
495
|
-
docs: `${e}/api/project#store-errors`
|
|
496
|
-
}
|
|
497
|
-
},
|
|
498
|
-
PROJECT_ENGINE_BUSY: {
|
|
499
|
-
code: "D7007",
|
|
500
|
-
message: "The project is still held by another engine",
|
|
501
|
-
explanation: {
|
|
502
|
-
when: "Another engine still holds the project (another tab or a worker that did not stop).",
|
|
503
|
-
fix: "Close the other tabs of the app, then open the project again.",
|
|
504
|
-
docs: `${e}/api/project#store-errors`
|
|
505
|
-
}
|
|
506
|
-
},
|
|
507
458
|
PROJECT_DIALECTE_MISMATCH: {
|
|
508
459
|
code: "D7008",
|
|
509
|
-
message: "The project's
|
|
460
|
+
message: "The project's data is of another dialecte",
|
|
510
461
|
explanation: {
|
|
511
|
-
when: "A project
|
|
512
|
-
fix: "Open the project with the dialecte it was created with;
|
|
462
|
+
when: "A project stored by another dialecte was opened (nothing of it written), or what serves the store (a worker, a server) was asked for a project of a dialecte it does not serve. Two dialectes' projects of one name are two projects: opening one never meets the other. `meta`: `project`, `realmDialecteId` (the one asked), and `projectDialecteId` (the project's), or the dialectes served, as the store's docs name them.",
|
|
463
|
+
fix: "Open the project with the dialecte it was created with; serve every dialecte the app opens projects of, as the store's docs say.",
|
|
513
464
|
docs: `${e}/api/project#store-errors`
|
|
514
465
|
}
|
|
515
466
|
},
|
|
516
467
|
PROJECT_DIALECTE_VERSION_MISMATCH: {
|
|
517
468
|
code: "D7009",
|
|
518
|
-
message: "The project
|
|
469
|
+
message: "The project's store runs another version of the dialecte",
|
|
519
470
|
explanation: {
|
|
520
|
-
when: "
|
|
471
|
+
when: "What serves the project's store (a worker, a server) runs another version of the dialecte than this view: another tab's, or one this page runs already for the project (a page runs one version of each dialecte).",
|
|
521
472
|
fix: "Reload every tab of the app so they run the same version.",
|
|
522
473
|
docs: `${e}/api/project#store-errors`
|
|
523
474
|
}
|
|
@@ -526,7 +477,7 @@ var e = "https://dialecte.github.io/core", t = {
|
|
|
526
477
|
code: "D7010",
|
|
527
478
|
message: "The project could not be deleted",
|
|
528
479
|
explanation: {
|
|
529
|
-
when: "Destroying a project left its
|
|
480
|
+
when: "Destroying a project left its data in place: another tab, window or connection still holds it.",
|
|
530
481
|
fix: "Close the other tabs or windows of the app that have the project open, then destroy it again.",
|
|
531
482
|
docs: `${e}/api/project#lifecycle`
|
|
532
483
|
}
|
|
@@ -540,20 +491,11 @@ var e = "https://dialecte.github.io/core", t = {
|
|
|
540
491
|
docs: `${e}/api/project#lifecycle`
|
|
541
492
|
}
|
|
542
493
|
},
|
|
543
|
-
PROJECT_DATABASE_LOST: {
|
|
544
|
-
code: "D7012",
|
|
545
|
-
message: "The project's database is gone",
|
|
546
|
-
explanation: {
|
|
547
|
-
when: "The project's files hold data but none of them is its database any more: the database file's header was damaged (by the disk, another program, or site data changed outside the app). Nothing is opened or changed: no empty database is made in its place. `meta.project` names the project.",
|
|
548
|
-
fix: "The project's data cannot be read back. Offer the user a reset, never automatically: `destroy()` on the same Project instance whose `open` was refused (keep it: `const project = new Project(params)`, then `await project.open(name)`) removes what the refused store holds, without opening it; `open(name)` then makes it again, empty, and its documents can be imported again.",
|
|
549
|
-
docs: `${e}/api/project#lifecycle`
|
|
550
|
-
}
|
|
551
|
-
},
|
|
552
494
|
PROJECT_DESTROYED_WHILE_AWAY: {
|
|
553
495
|
code: "D7013",
|
|
554
496
|
message: "The project was deleted while this view was away",
|
|
555
497
|
explanation: {
|
|
556
|
-
when: "A view's connection to a project came back - the page back from a freeze or the back/forward cache, its
|
|
498
|
+
when: "A view's connection to a project came back - the page back from a freeze or the back/forward cache, what serves its store started again - and the project it had open was destroyed meanwhile by another tab (and maybe made again under its name): nothing is opened in its place and nothing of it is read. `meta.project` names the project.",
|
|
557
499
|
fix: "Tell the user the project was deleted elsewhere; close it in this view (`project.close()`), then open it again by its name for what is there now, or choose another.",
|
|
558
500
|
docs: `${e}/api/project#lifecycle`
|
|
559
501
|
}
|
|
@@ -562,27 +504,18 @@ var e = "https://dialecte.github.io/core", t = {
|
|
|
562
504
|
code: "D7014",
|
|
563
505
|
message: "The project's name cannot name its files",
|
|
564
506
|
explanation: {
|
|
565
|
-
when: "A project's name or its dialecte's id is empty, `.` or `..`: every store refuses it before it is built (a
|
|
507
|
+
when: "A project's name or its dialecte's id is empty, `.` or `..`: every store refuses it before it is built (a store may name its files after both, which no file can be); nothing was opened or written. `meta.project` and `meta.dialecteId` say which.",
|
|
566
508
|
fix: "Give the project a name of its own (and the dialecte an id) other than an empty one, `.` or `..`.",
|
|
567
509
|
docs: `${e}/api/project#lifecycle`
|
|
568
510
|
}
|
|
569
511
|
},
|
|
570
|
-
|
|
571
|
-
code: "
|
|
572
|
-
message: "
|
|
512
|
+
PROJECT_STORAGE_NOT_REGISTERED: {
|
|
513
|
+
code: "D7018",
|
|
514
|
+
message: "The project's storage type is not registered",
|
|
573
515
|
explanation: {
|
|
574
|
-
when: "A project was opened
|
|
575
|
-
fix: "
|
|
576
|
-
docs: `${e}/
|
|
577
|
-
}
|
|
578
|
-
},
|
|
579
|
-
PROJECT_SQLITE_NOT_IMPORTED: {
|
|
580
|
-
code: "D7016",
|
|
581
|
-
message: "SQLite storage needs `import '@dialecte/core/sqlite'`",
|
|
582
|
-
explanation: {
|
|
583
|
-
when: "A project was opened (or destroyed by name) on `storage: { type: 'sqlite' }`, or a test asked for the `sqlite` test store, but the app never imported `@dialecte/core/sqlite`: the SQLite storage kind lives behind that entry, so an app that never imports it neither emits nor downloads the SQLite engine, its wasm or the hub. Nothing was opened.",
|
|
584
|
-
fix: "Add `import '@dialecte/core/sqlite'` once to the app's entry (for tests, to the test runner's setup file), before the first project is opened on SQLite; or open the project on another storage. Imported already? The import registers the kind for every copy of @dialecte/core of the same SQLite storage version in the realm: a copy of another one (a dialecte bringing its own core) does not see it - align the core versions.",
|
|
585
|
-
docs: `${e}/api/project#sqlite-storage`
|
|
516
|
+
when: "A project was opened (or destroyed by name), or a test asked for a test store, on a `storage.type` no kind is registered for in this realm: core serves `local`, `inMemory` and `custom` itself, every other type comes from the entry that registers it (`registerStorageKind`). Nothing was opened. `meta`: `project`, `type`.",
|
|
517
|
+
fix: "Import the entry that registers the type once in the app's entry (for tests, in the test runner's setup file), before the first project opens on it; or open the project on another storage. Imported already? A kind is shared by every copy of @dialecte/core of the same storage version in the realm: one registered by a copy of another version (a package bringing its own core) is not seen - align the core versions.",
|
|
518
|
+
docs: `${e}/guide/development/implementing-a-store#register-a-storage-kind`
|
|
586
519
|
}
|
|
587
520
|
},
|
|
588
521
|
DOCUMENT_PATH_INVALID: {
|
|
@@ -603,54 +536,47 @@ var e = "https://dialecte.github.io/core", t = {
|
|
|
603
536
|
docs: `${e}/api/project#a-document-s-path`
|
|
604
537
|
}
|
|
605
538
|
}
|
|
606
|
-
};
|
|
539
|
+
}, r = new Set(Object.values(n).map((e) => e.code));
|
|
607
540
|
// src/errors/errors.ts
|
|
608
|
-
function
|
|
609
|
-
throw
|
|
541
|
+
function i(e, t) {
|
|
542
|
+
throw a(e, t);
|
|
610
543
|
}
|
|
611
|
-
function
|
|
544
|
+
function a(e, t) {
|
|
612
545
|
let r = typeof e == "string" ? {
|
|
613
546
|
key: e,
|
|
614
|
-
...
|
|
547
|
+
...n[e]
|
|
615
548
|
} : e, i = {
|
|
616
549
|
code: r.code,
|
|
617
550
|
key: r.key,
|
|
618
|
-
message:
|
|
619
|
-
detail:
|
|
551
|
+
message: t.message ?? r.message,
|
|
552
|
+
detail: t.detail,
|
|
620
553
|
method: l((/* @__PURE__ */ Error()).stack),
|
|
621
|
-
ref:
|
|
622
|
-
meta:
|
|
623
|
-
cause:
|
|
624
|
-
}, a = Error(
|
|
554
|
+
ref: t.ref,
|
|
555
|
+
meta: t.meta,
|
|
556
|
+
cause: t.cause
|
|
557
|
+
}, a = Error(t.detail);
|
|
625
558
|
return a.cause = i, a;
|
|
626
559
|
}
|
|
627
|
-
function
|
|
628
|
-
let
|
|
560
|
+
function o(e) {
|
|
561
|
+
let t = {}, a = /* @__PURE__ */ new Map();
|
|
629
562
|
for (let [o, s] of Object.entries(e)) {
|
|
630
|
-
Object.hasOwn(
|
|
631
|
-
let e =
|
|
632
|
-
e &&
|
|
563
|
+
Object.hasOwn(n, o) && i("ASSERTION_FAILED", { detail: `defineErrors: "${o}" is a key of the core catalogue` }), r.has(s.code) && i("ASSERTION_FAILED", { detail: `defineErrors: "${o}" uses "${s.code}", a code of the core catalogue` });
|
|
564
|
+
let e = a.get(s.code);
|
|
565
|
+
e && i("ASSERTION_FAILED", { detail: `defineErrors: "${o}" uses "${s.code}", the code of "${e}"` }), a.set(s.code, o), t[o] = {
|
|
633
566
|
key: o,
|
|
634
567
|
...s
|
|
635
568
|
};
|
|
636
569
|
}
|
|
637
|
-
return
|
|
570
|
+
return t;
|
|
638
571
|
}
|
|
639
|
-
|
|
640
|
-
function o(e) {
|
|
572
|
+
function s(e) {
|
|
641
573
|
if (!(e instanceof Error)) return;
|
|
642
574
|
let t = e.cause;
|
|
643
575
|
if (!(!t || t instanceof Error) && typeof t.key == "string" && typeof t.code == "string") return t;
|
|
644
576
|
}
|
|
645
|
-
function
|
|
646
|
-
return Object.hasOwn(
|
|
577
|
+
function c(e, t) {
|
|
578
|
+
return Object.hasOwn(n, e.key) ? !0 : t.catalogues.some((t) => Object.hasOwn(t, e.key) && t[e.key]?.code === e.code);
|
|
647
579
|
}
|
|
648
|
-
var c = /* @__PURE__ */ new Set([
|
|
649
|
-
"throwDialecteError",
|
|
650
|
-
"createDialecteError",
|
|
651
|
-
"invariant",
|
|
652
|
-
"reportFailure"
|
|
653
|
-
]);
|
|
654
580
|
function l(e) {
|
|
655
581
|
if (!e) return "unknown";
|
|
656
582
|
let t = e.split("\n").slice(1).map((e) => e.match(/\bat\s+(?:async\s+)?(\S+)(?:\s+\[as\s+[^\]]+\])?\s+\(([^)]+)\)/)).find((e) => !u(e?.[1])), n = t?.[1]?.replace(/^Object\./, ""), r = t?.[2];
|
|
@@ -659,7 +585,7 @@ function l(e) {
|
|
|
659
585
|
return i ? `${i[1].replace(/\.[^/.]+$/, "")}::${n}` : n;
|
|
660
586
|
}
|
|
661
587
|
function u(e) {
|
|
662
|
-
return e ?
|
|
588
|
+
return e ? t.has(e.slice(e.lastIndexOf(".") + 1)) : !1;
|
|
663
589
|
}
|
|
664
590
|
// src/utils/xml-whitespace.constants.ts
|
|
665
591
|
var d = /[ \t\r\n]+/g;
|
|
@@ -1062,9 +988,9 @@ function le(e, t = {}) {
|
|
|
1062
988
|
// src/utils/invariant.ts
|
|
1063
989
|
function ue(e, t) {
|
|
1064
990
|
if (e) return;
|
|
1065
|
-
let { detail:
|
|
1066
|
-
|
|
1067
|
-
detail:
|
|
991
|
+
let { detail: n, key: r = "ASSERTION_FAILED", ref: a, meta: o } = t;
|
|
992
|
+
i(r, {
|
|
993
|
+
detail: n,
|
|
1068
994
|
ref: a,
|
|
1069
995
|
meta: o
|
|
1070
996
|
});
|
|
@@ -1272,4 +1198,4 @@ function Ce(e) {
|
|
|
1272
1198
|
return t;
|
|
1273
1199
|
};
|
|
1274
1200
|
}
|
|
1275
|
-
export { S as A, f as B, k as C, C as D, x as E, te as F,
|
|
1201
|
+
export { S as A, f as B, k as C, C as D, x as E, te as F, s as G, o as H, ne as I, n as K, ee as L, g as M, _ as N, w as O, b as P, y as R, ae as S, T, c as U, a as V, i as W, R as _, me as a, M as b, pe as c, fe as d, ue as f, L as g, z as h, X as i, v as j, E as k, K as l, B as m, Q as n, q as o, le as p, e as q, ye as r, J as s, Ce as t, de as u, I as v, O as w, oe as x, se as y, m as z };
|
package/dist/utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { C as admittedXsiTypes, T as canonicalXsiType, v as childOccurrences, o as compareQualifiedAttributes, t as createSeededRandomUuid, g as enumeratedValues, y as extractLocalName, p as formatEmbeddedXml, m as formatXml, b as getAttributeRules, f as invariant, s as isNamespaceAllowedByWildcard, x as isSchemaDefaultValue, c as orderAttributesBySequence, a as orderByConfigSequence, i as requiredChoices, w as resolveDefinition, l as resolveNamespaceByPrefix, u as resolveNamespaceByScope, d as resolvePrefixByNamespaceScope, S as resolveSchemaAttributeValue, D as resolveXsiType, r as saveToDisk, _ as valuePatterns } from "./utils-
|
|
1
|
+
export { C as admittedXsiTypes, T as canonicalXsiType, v as childOccurrences, o as compareQualifiedAttributes, t as createSeededRandomUuid, g as enumeratedValues, y as extractLocalName, p as formatEmbeddedXml, m as formatXml, b as getAttributeRules, f as invariant, s as isNamespaceAllowedByWildcard, x as isSchemaDefaultValue, c as orderAttributesBySequence, a as orderByConfigSequence, i as requiredChoices, w as resolveDefinition, l as resolveNamespaceByPrefix, u as resolveNamespaceByScope, d as resolvePrefixByNamespaceScope, S as resolveSchemaAttributeValue, D as resolveXsiType, r as saveToDisk, _ as valuePatterns } from "./utils-Cv4oHia0.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dialecte/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0",
|
|
4
4
|
"description": "Dialecte - Core functionality for Dialecte SDK",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -36,10 +36,6 @@
|
|
|
36
36
|
"types": "./dist/helpers.d.ts",
|
|
37
37
|
"default": "./dist/helpers.js"
|
|
38
38
|
},
|
|
39
|
-
"./engine": {
|
|
40
|
-
"types": "./dist/engine.d.ts",
|
|
41
|
-
"default": "./dist/engine.js"
|
|
42
|
-
},
|
|
43
39
|
"./sqlite": {
|
|
44
40
|
"types": "./dist/sqlite.d.ts",
|
|
45
41
|
"default": "./dist/sqlite.js"
|
|
@@ -56,9 +52,11 @@
|
|
|
56
52
|
"doc:preview": "vitepress preview",
|
|
57
53
|
"//====== TEST ======//": "",
|
|
58
54
|
"test": "npm run test:node && npm run test:browser",
|
|
59
|
-
"test:node": "vitest run --project node --project node-indexeddb --project node-sqlite",
|
|
55
|
+
"test:node": "vitest run --project node --project node-indexeddb --project node-sqlite --project node-indexeddb-documents",
|
|
56
|
+
"test:scope": "tsx scripts/test-scope/run-test-scope.ts",
|
|
60
57
|
"test:browser": "vitest run --project browser",
|
|
61
58
|
"test:browser:all": "vitest run --project browser-all",
|
|
59
|
+
"test:browser:release": "STORE_CONTRACT_FULL_TABLE=1 vitest run --project browser-all",
|
|
62
60
|
"test:perf": "VITE_BENCH=1 vitest run --project perf --mode bench --reporter=verbose",
|
|
63
61
|
"test:perf:node": "VITE_BENCH=1 vitest run --project perf-node --mode bench --reporter=verbose",
|
|
64
62
|
"test:hook": "dialecte gate --hook",
|
|
@@ -90,7 +88,7 @@
|
|
|
90
88
|
"sax": "^1.4.3"
|
|
91
89
|
},
|
|
92
90
|
"devDependencies": {
|
|
93
|
-
"@dialecte/cli": "0.
|
|
91
|
+
"@dialecte/cli": "0.4.0",
|
|
94
92
|
"@tsconfig/node24": "^24.0.4",
|
|
95
93
|
"@types/node": "^24.12.4",
|
|
96
94
|
"@typescript/native": "npm:typescript@^7.0.2",
|
|
@@ -162,8 +160,42 @@
|
|
|
162
160
|
},
|
|
163
161
|
{
|
|
164
162
|
"name": "browser tests",
|
|
165
|
-
"run": "
|
|
163
|
+
"run": "npm run test:scope",
|
|
164
|
+
"counts": "tests",
|
|
165
|
+
"scoped": true
|
|
166
|
+
}
|
|
167
|
+
],
|
|
168
|
+
"release": [
|
|
169
|
+
{
|
|
170
|
+
"name": "check",
|
|
171
|
+
"run": "npm run check"
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
"name": "skills",
|
|
175
|
+
"run": "npm run skills:check"
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
"name": "build",
|
|
179
|
+
"run": "npm run build"
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
"name": "tests",
|
|
183
|
+
"run": "npm run test:node",
|
|
166
184
|
"counts": "tests"
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
"name": "browser tests",
|
|
188
|
+
"run": "npm run test:browser:release",
|
|
189
|
+
"counts": "tests",
|
|
190
|
+
"heavy": true
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
"name": "type narrowing",
|
|
194
|
+
"run": "npm run type-narrowing"
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
"name": "type bench",
|
|
198
|
+
"run": "npm run type-bench:check"
|
|
167
199
|
}
|
|
168
200
|
]
|
|
169
201
|
}
|
package/skills/dialecte/SKILL.md
CHANGED
|
@@ -21,7 +21,7 @@ uuid/name fix-up that a hook already performs on every write. This skill exists
|
|
|
21
21
|
|
|
22
22
|
```
|
|
23
23
|
your app custom extensions, services, UI (yours)
|
|
24
|
-
dialecte package
|
|
24
|
+
a dialecte package @dialecte/<id>, @acme/widget (domain)
|
|
25
25
|
├ definition/*.generated.ts generated from the XSD - never edited by hand
|
|
26
26
|
├ config/ wires the definition into core, `namespace <Name>` types
|
|
27
27
|
├ hooks/ automatic coherence on every write and on import
|
|
@@ -237,8 +237,9 @@ doc.query.myFeature.findOrphanParts({ assembly }) // first param is bound away
|
|
|
237
237
|
(no service, store, composable, component, policy file) and carries none of your product's rules.
|
|
238
238
|
Where your product decides differently from the plain behaviour, see policies below.
|
|
239
239
|
- **Tests on the node tier**: table-driven with the package's runner (`<package>/<version>/test` →
|
|
240
|
-
`run<Name>TestCases`),
|
|
241
|
-
|
|
240
|
+
`run<Name>TestCases`), whole-document XML fixtures, one call of the unit per test (the function
|
|
241
|
+
with `source.query` / `tx`, or its bound method; never both), see references/testing.md. No test
|
|
242
|
+
names a store: the runner runs them in Node on the in-memory
|
|
242
243
|
store. See [Testing](#testing).
|
|
243
244
|
|
|
244
245
|
### Policies: your product's choices, passed per call
|
|
@@ -289,9 +290,10 @@ composable then imports them with `import type`): do not wrap a type only to re-
|
|
|
289
290
|
Each dialecte package exports table-driven runners from its `/test` entry
|
|
290
291
|
(`<package>/<version>/test` → `run<Name>TestCases`; core's own: `@dialecte/core/test`). Details
|
|
291
292
|
and the case format: [references/testing.md](references/testing.md). Short version: one table per
|
|
292
|
-
behaviour,
|
|
293
|
-
|
|
294
|
-
|
|
293
|
+
behaviour, whole-document XML fixtures (inline up to 40 lines, else a sibling `?raw` file) with
|
|
294
|
+
`dev:db-id` ids that say intent, one call of the unit per `act`, `.withExport` asserts the resulting
|
|
295
|
+
XML with hand-written XPath, `.withoutExport` asserts inside `act`, `.generic` for pure functions.
|
|
296
|
+
Refusals assert the error key and nothing staged, never a spy. Red first, one case at a time. No test names its store: the runner chooses it (in Node on the
|
|
295
297
|
in-memory store under a node vitest project whose setup file calls `useTestStorage`, core 0.8+).
|
|
296
298
|
Assertions take XML text; on a big file, check record expectations (tag, attributes, parent,
|
|
297
299
|
count) with the query API instead of XPath on the whole export.
|