@dialecte/core 0.8.0 → 0.9.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-oAXwOG-Q.js} +1182 -1203
- package/dist/document/document.d.ts +1 -1
- package/dist/document/types.extensions.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} +4136 -4075
- 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/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 +4 -2
- 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/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/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 +797 -763
- package/dist/types/dialecte-config.d.ts.map +1 -1
- package/dist/{utils-USNkj4sT.js → utils-Cv4oHia0.js} +63 -137
- package/dist/utils.js +1 -1
- package/package.json +16 -22
- package/skills/dialecte/SKILL.md +84 -15
- package/skills/dialecte/references/api.json +88 -61
- package/skills/dialecte/references/api.md +461 -459
- package/skills/dialecte/references/core-api.md +43 -15
- package/skills/dialecte-contributing/SKILL.md +94 -48
- package/skills/dialecte-contributing/references/code-rules.md +7 -0
- package/skills/dialecte-contributing/references/landing-changes.md +10 -6
- package/skills/dialecte-contributing/references/lot-in-a-package.md +45 -0
- package/skills/dialecte-contributing/references/perf.md +2 -1
- package/skills/dialecte-contributing/references/traps.md +20 -0
- package/skills/dialecte-lot/SKILL.md +106 -51
- package/skills/dialecte-lot/references/briefs.md +18 -9
- package/skills/dialecte-lot/references/model-tiers.md +3 -3
- package/skills/dialecte-lot/references/standard-check.md +45 -0
- package/skills/dialecte-lot/references/stations.md +110 -0
- 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
|
@@ -107,7 +107,7 @@ export declare class Document<GenericConfig extends AnyDialecteConfig, GenericEx
|
|
|
107
107
|
label?: string;
|
|
108
108
|
}): Promise<T>;
|
|
109
109
|
/**
|
|
110
|
-
* A commit refused with its
|
|
110
|
+
* A commit refused with its connection lost may have landed (its outcome `running` or `unknown`): the document's
|
|
111
111
|
* history is read again and the change the store told of it posted. One known not to have landed changed nothing.
|
|
112
112
|
*/
|
|
113
113
|
private readAgainAfterLoss;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.extensions.d.ts","sourceRoot":"","sources":["../../src/document/types.extensions.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;GAWG;AAEH,MAAM,MAAM,gBAAgB,CAAC,YAAY,GAAG,GAAG,IAAI,CAAC,KAAK,EAAE,YAAY,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;AAE/F;;;GAGG;AAEH,MAAM,MAAM,sBAAsB,CAAC,kBAAkB,GAAG,GAAG,IAAI,CAC9D,EAAE,EAAE,kBAAkB,EACtB,GAAG,IAAI,EAAE,GAAG,EAAE,KACV,GAAG,CAAA;AAIR;;;;;GAKG;AACH,MAAM,MAAM,cAAc,CAAC,EAAE,IAAI;IAAE,CAAC,GAAG,EAAE,M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WAAW,EAAE,MAAM,CAAC,SAAS,YAAY,CAAC,sBAAsB,CAAC,CAAA;CAAE,GAC/E,iBAAiB,CAAC,CAAC,CAAC,GACpB,EAAE,CAAC,CAAA;AAEP;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAA;AAE9D;;;;GAIG;AACH,MAAM,MAAM,gBAAgB,CAAC,OAAO,SAAS,gBAAgB,IAAI;IAChE,KAAK,EAAE;SAEL,CAAC,IAAI,MAAM,OAAO,IAAI,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,SAAS,cAAc,CAAC,gBAAgB,CAAC,GAAG,CAAC,GAAG,KAAK,GAC5F,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,SAAS,cAAc,CAAC,gBAAgB,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,KAAK;KAC7F,CAAA;IACD,WAAW,EAAE;SAEX,CAAC,IAAI,MAAM,OAAO,IAAI,OAAO,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,SAAS,cAAc,CAAC,sBAAsB,CAAC,GAC3F,CAAC,GACD,KAAK,GACN,OAAO,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,SAAS,cAAc,CAAC,sBAAsB,CAAC,GACxE,OAAO,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,GACzB,KAAK;KACR,CAAA;CACD,CAAA"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { i as e, r as t, t as n } from "./running-operations-
|
|
2
|
-
import {
|
|
3
|
-
import { G as c } from "./utils-
|
|
4
|
-
// src/store/
|
|
5
|
-
var l = {
|
|
1
|
+
import { i as e, r as t, t as n } from "./running-operations-DCKvzlU7.js";
|
|
2
|
+
import { G as r, N as i, h as a, j as o, r as s } from "./project-key-2ccZ-0gu.js";
|
|
3
|
+
import { G as c } from "./utils-Cv4oHia0.js";
|
|
4
|
+
// src/store/sqlite/served/engine-store.constants.ts
|
|
5
|
+
var l = e(), u = {
|
|
6
6
|
registerDocument: { json: [{ argument: 0 }] },
|
|
7
7
|
getDocument: { read: !0 },
|
|
8
8
|
getDocuments: { read: !0 },
|
|
@@ -58,9 +58,9 @@ var l = {
|
|
|
58
58
|
attachBlob: { json: [{ argument: 1 }] },
|
|
59
59
|
detachBlob: {},
|
|
60
60
|
removeBlob: {}
|
|
61
|
-
},
|
|
61
|
+
}, d = class {
|
|
62
62
|
constructor(e) {
|
|
63
|
-
this.closed = !1, this.closings = 0, this.linkReleased = Promise.resolve(), this.operations = n(), this.listeners = /* @__PURE__ */ new Set(), this.stopNotices = m, this.lostWrites = /* @__PURE__ */ new Set(),
|
|
63
|
+
this.closed = !1, this.closings = 0, this.linkReleased = Promise.resolve(), this.operations = n(), this.listeners = /* @__PURE__ */ new Set(), this.stopNotices = m, this.lostWrites = /* @__PURE__ */ new Set(), a({ project: e.name }), this.name = e.name, this.connector = e.connector;
|
|
64
64
|
}
|
|
65
65
|
async open() {
|
|
66
66
|
let e = this.closings;
|
|
@@ -72,7 +72,7 @@ var l = {
|
|
|
72
72
|
async close() {
|
|
73
73
|
if (this.closed = !0, this.closings += 1, this.operations.count === 0) return this.releaseLink();
|
|
74
74
|
let e = this.operations.whenIdle();
|
|
75
|
-
|
|
75
|
+
l.markClosing({
|
|
76
76
|
name: this.name,
|
|
77
77
|
until: e
|
|
78
78
|
}), await e, await this.linkReleased;
|
|
@@ -88,7 +88,7 @@ var l = {
|
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
90
|
async destroyOnceIdle() {
|
|
91
|
-
await this.operations.whenIdle(), await
|
|
91
|
+
await this.operations.whenIdle(), await l.settled({ name: this.name });
|
|
92
92
|
let e = this.link && {
|
|
93
93
|
link: this.link,
|
|
94
94
|
letGo: this.releaseLink.bind(this)
|
|
@@ -173,23 +173,23 @@ var l = {
|
|
|
173
173
|
});
|
|
174
174
|
}
|
|
175
175
|
async exportFile(e) {
|
|
176
|
-
let { documentId: t, options: n, onProgress: r, signal: i } = e,
|
|
176
|
+
let { documentId: t, options: n, onProgress: r, signal: i } = e, a = crypto.randomUUID();
|
|
177
177
|
return this.operation({
|
|
178
178
|
readRetried: !1,
|
|
179
179
|
run: async (e) => {
|
|
180
|
-
let
|
|
180
|
+
let o = e.exportFile({
|
|
181
181
|
documentId: t,
|
|
182
182
|
options: n,
|
|
183
|
-
exportId:
|
|
183
|
+
exportId: a
|
|
184
184
|
}, r), c = f({
|
|
185
185
|
signal: i,
|
|
186
186
|
abort: function() {
|
|
187
|
-
return e.abortExport({ exportId:
|
|
187
|
+
return e.abortExport({ exportId: a });
|
|
188
188
|
}
|
|
189
189
|
});
|
|
190
190
|
try {
|
|
191
|
-
let e = await
|
|
192
|
-
return
|
|
191
|
+
let e = await o;
|
|
192
|
+
return s({
|
|
193
193
|
signal: i,
|
|
194
194
|
documentId: t
|
|
195
195
|
}), e;
|
|
@@ -256,7 +256,7 @@ var l = {
|
|
|
256
256
|
await this.call("removeBlob", e);
|
|
257
257
|
}
|
|
258
258
|
async call(e, ...t) {
|
|
259
|
-
let n =
|
|
259
|
+
let n = u[e];
|
|
260
260
|
return this.operation({
|
|
261
261
|
readRetried: n.read === !0,
|
|
262
262
|
run: function(n) {
|
|
@@ -291,7 +291,7 @@ var l = {
|
|
|
291
291
|
}
|
|
292
292
|
noteLostWrite(e) {
|
|
293
293
|
let t = c(e.thrown), n = t?.meta?.writeId;
|
|
294
|
-
t?.key === "
|
|
294
|
+
t?.key === "STORE_CONNECTION_LOST" && typeof n == "string" && this.lostWrites.add(n);
|
|
295
295
|
}
|
|
296
296
|
async tracked(e) {
|
|
297
297
|
this.operations.start();
|
|
@@ -319,10 +319,10 @@ var l = {
|
|
|
319
319
|
signal: t.signal,
|
|
320
320
|
link: n
|
|
321
321
|
});
|
|
322
|
-
|
|
322
|
+
i({
|
|
323
323
|
listeners: this.listeners,
|
|
324
324
|
value: r,
|
|
325
|
-
of:
|
|
325
|
+
of: o({ name: this.name })
|
|
326
326
|
});
|
|
327
327
|
}
|
|
328
328
|
releaseLink() {
|
|
@@ -341,8 +341,8 @@ function f(e) {
|
|
|
341
341
|
}
|
|
342
342
|
function p(e) {
|
|
343
343
|
let t = c(e.thrown);
|
|
344
|
-
return t?.key === "
|
|
344
|
+
return t?.key === "STORE_CONNECTION_LOST" && t.meta?.reason === "host-gone";
|
|
345
345
|
}
|
|
346
346
|
function m() {}
|
|
347
347
|
function h() {}
|
|
348
|
-
export {
|
|
348
|
+
export { u as n, d as t };
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
import { H as e, W as t, q as n } from "./utils-Cv4oHia0.js";
|
|
2
|
+
// src/store/sqlite/sqlite-errors.constants.ts
|
|
3
|
+
var r = e({
|
|
4
|
+
STORE_PROTOCOL_MISMATCH: {
|
|
5
|
+
code: "D1012",
|
|
6
|
+
message: "Another version of the library holds the shared store connection",
|
|
7
|
+
explanation: {
|
|
8
|
+
when: "Another version of the library already holds the origin's hub, or an engine worker speaks another wire than the page (another tab runs an older or newer build, or the worker file was built from another copy).",
|
|
9
|
+
fix: "Close the other tabs of the app, or reload them all on the same version; build the engine worker file from the copy of `@dialecte/core` the page uses.",
|
|
10
|
+
docs: `${n}/api/project#sqlite-errors`
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
STORE_REALM_ID_TAKEN: {
|
|
14
|
+
code: "D1013",
|
|
15
|
+
message: "A view with this id is already connected to the shared store",
|
|
16
|
+
explanation: {
|
|
17
|
+
when: "A view joined the origin's hub with an id another connected view already uses.",
|
|
18
|
+
fix: "Give each view its own id; reload the page that reused one.",
|
|
19
|
+
docs: `${n}/api/project#sqlite-errors`
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
STORE_REALM_UNKNOWN: {
|
|
23
|
+
code: "D1014",
|
|
24
|
+
message: "The shared store does not know this view",
|
|
25
|
+
explanation: {
|
|
26
|
+
when: "A view spoke to the origin's hub without having joined it, or after it left; or a child view was bound by a page the hub no longer knows.",
|
|
27
|
+
fix: "Join (open the project) before reading or writing; reload a view that was disconnected; a child is bound again by its page (`createHubPort`, then `adoptHubPort`).",
|
|
28
|
+
docs: `${n}/api/project#sqlite-errors`
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
STORE_HUB_SPAWNERS_FIXED: {
|
|
32
|
+
code: "D1019",
|
|
33
|
+
message: "The page's hub connection runs another version of this dialecte's engine",
|
|
34
|
+
explanation: {
|
|
35
|
+
when: "`registerSqliteEngine({ url, dialectes })` named two versions of one dialecte (nothing kept), or the engines the app registered name a dialecte the page's connection already runs at another version, as `connectHub()` or a project opening on `sqlite` offers them to the hub: a page runs one version of each dialecte's engine (two would split a project's views between two engines). `meta.spawners` names the dialectes (id and version) refused; nothing of the call was added, nothing opened.",
|
|
36
|
+
fix: "Ship one version of each dialecte in the app, and name it once in `registerSqliteEngine({ url, dialectes })` and in `serveSqliteEngine({ dialectes })`, from the copy the app opens its projects with.",
|
|
37
|
+
docs: `${n}/api/project#sqlite-errors`
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
STORE_SQLITE_ENGINE_FIXED: {
|
|
41
|
+
code: "D1020",
|
|
42
|
+
message: "This page's SQLite engine is registered already",
|
|
43
|
+
explanation: {
|
|
44
|
+
when: "A second `registerSqliteEngine({ url, dialectes })` named another URL or other dialectes than the first (the same URL and the same dialectes, in any order, do nothing: a module evaluated twice). There is no additive call. `meta`: `registered` (kept), `asked` (refused), each `{ url, dialectes }`.",
|
|
45
|
+
fix: "Name all the dialectes of the app in one call, once, before the first project opens; the worker file serves them all (`serveSqliteEngine({ dialectes })`).",
|
|
46
|
+
docs: `${n}/api/dialecte#the-engine-worker-and-its-packaging`
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
PROJECT_LAYOUT_OUTDATED: {
|
|
50
|
+
code: "D7005",
|
|
51
|
+
message: "Project stored by another version of the library",
|
|
52
|
+
explanation: {
|
|
53
|
+
when: "The project's SQLite file was stored by another version of the library (another layout); nothing was written to it.",
|
|
54
|
+
fix: "Delete the project (the dialecte factory's `destroyProject({ name, storage: { type: 'sqlite' } })`) and import its files again with this version.",
|
|
55
|
+
docs: `${n}/api/project#sqlite-errors`
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
PROJECT_ENGINE_UNAVAILABLE: {
|
|
59
|
+
code: "D7006",
|
|
60
|
+
message: "No view can start the project engine",
|
|
61
|
+
explanation: {
|
|
62
|
+
when: "The project's SQLite engine could not be started or reached: its worker failed to load, could not load the engine's chunk (a build or a precache list that leaves it out), 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.",
|
|
63
|
+
fix: "Keep one tab of the app open and reload; check the `url` given to `registerSqliteEngine` points at the app's engine worker file and that it loads (the console names a script that fails); a destroy refused so is asked again once the project is closed elsewhere.",
|
|
64
|
+
docs: `${n}/api/project#sqlite-errors`
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
PROJECT_ENGINE_BUSY: {
|
|
68
|
+
code: "D7007",
|
|
69
|
+
message: "The project is still held by another engine",
|
|
70
|
+
explanation: {
|
|
71
|
+
when: "Another SQLite engine still holds the project's files (another tab or a worker that did not stop).",
|
|
72
|
+
fix: "Close the other tabs of the app, then open the project again.",
|
|
73
|
+
docs: `${n}/api/project#sqlite-errors`
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
PROJECT_DATABASE_LOST: {
|
|
77
|
+
code: "D7012",
|
|
78
|
+
message: "The project's database is gone",
|
|
79
|
+
explanation: {
|
|
80
|
+
when: "The project's files hold data but none of them is its SQLite 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.",
|
|
81
|
+
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.",
|
|
82
|
+
docs: `${n}/api/project#lifecycle`
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
PROJECT_ENGINE_NOT_DECLARED: {
|
|
86
|
+
code: "D7015",
|
|
87
|
+
message: "This project has no engine to open it on SQLite",
|
|
88
|
+
explanation: {
|
|
89
|
+
when: "A project was opened on `storage: { type: 'sqlite' }` but made by no dialecte's project factory: its dialecte's id or version is known to no one, so no engine can be asked for it. Nothing was opened.",
|
|
90
|
+
fix: "Make the project with the dialecte's project factory (`createProjectFactory({ dialecte })`, as a dialecte package exports it), or open it on another storage.",
|
|
91
|
+
docs: `${n}/api/project#sqlite-storage`
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
PROJECT_SQLITE_ENGINE_NOT_REGISTERED: {
|
|
95
|
+
code: "D7017",
|
|
96
|
+
message: "SQLite storage needs the engine registered for this dialecte",
|
|
97
|
+
explanation: {
|
|
98
|
+
when: "A project was opened (or destroyed by name) on `storage: { type: 'sqlite' }` in a realm that can store, but the app told the page of no engine for its dialecte: no `registerSqliteEngine` call, or one that does not name it. Nothing was started. A child its page bound through `adoptHubPort` is not refused: it goes through its page's engine. `meta`: `project`, `dialecteId`.",
|
|
99
|
+
fix: "Write the app's one worker file (`serveSqliteEngine({ dialectes })`) and call `registerSqliteEngine({ url, dialectes })` from `@dialecte/core/sqlite` once, before the first project opens, naming every dialecte of the app; `url` is a `?worker&url` import of that file. The registration is the page's: a frame of the same origin joining the hub on its own registers too (or is bound by its page); a frame of another origin never registers - it joins through `adoptHubPort` before it opens a project. Registered already? The registration is shared by every copy of @dialecte/core of the same SQLite version in the realm: one made by a copy of another version (a dialecte bringing its own core) is not seen - align the core versions.",
|
|
100
|
+
docs: `${n}/api/dialecte#the-engine-worker-and-its-packaging`
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
// src/store/sqlite/served/creation-refusal.ts
|
|
105
|
+
function i(e) {
|
|
106
|
+
let { project: n, expectedCreationId: r, creationId: i } = e;
|
|
107
|
+
r !== void 0 && i !== r && t("PROJECT_DESTROYED_WHILE_AWAY", {
|
|
108
|
+
detail: `Project "${n}" was destroyed while this view was away${i === void 0 ? "" : ", and made again since"}: nothing of it was opened`,
|
|
109
|
+
meta: { project: n }
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
// src/store/sqlite/served/engine.constants.ts
|
|
113
|
+
var a = "dialecte:engine:", o = {
|
|
114
|
+
heartbeat: "heartbeat",
|
|
115
|
+
busy: "busy",
|
|
116
|
+
progress: "progress",
|
|
117
|
+
event: "event"
|
|
118
|
+
}, s = new URL(new URL("sqlite3.wasm", import.meta.url).href, "" + import.meta.url).href;
|
|
119
|
+
function c() {
|
|
120
|
+
return typeof globalThis.process?.versions?.node == "string" ? void 0 : s;
|
|
121
|
+
}
|
|
122
|
+
// src/store/sqlite/engine/engine.constants.ts
|
|
123
|
+
var l = {
|
|
124
|
+
cacheRule: {
|
|
125
|
+
mibPerGiB: 64,
|
|
126
|
+
floorMiB: 64,
|
|
127
|
+
ceilingMiB: 512
|
|
128
|
+
},
|
|
129
|
+
importWindowMs: 1e3,
|
|
130
|
+
reclaimSliceMs: 50,
|
|
131
|
+
reclaimPagesPerStatement: 256
|
|
132
|
+
}, u = {
|
|
133
|
+
dialecteId: "dialecteId",
|
|
134
|
+
layoutVersion: "layoutVersion",
|
|
135
|
+
creationId: "creationId"
|
|
136
|
+
}, d = {
|
|
137
|
+
offsetBasis: 2166136261,
|
|
138
|
+
prime: 16777619
|
|
139
|
+
}, f = {
|
|
140
|
+
id: "TEXT NOT NULL UNIQUE",
|
|
141
|
+
name: "TEXT NOT NULL",
|
|
142
|
+
extension: "TEXT NOT NULL",
|
|
143
|
+
configKey: "TEXT NOT NULL",
|
|
144
|
+
createdAt: "INTEGER NOT NULL",
|
|
145
|
+
metadata: "TEXT",
|
|
146
|
+
status: "TEXT NOT NULL",
|
|
147
|
+
writeId: "TEXT",
|
|
148
|
+
path: "TEXT UNIQUE"
|
|
149
|
+
}, p = {
|
|
150
|
+
id: "INTEGER PRIMARY KEY AUTOINCREMENT",
|
|
151
|
+
documentId: "TEXT NOT NULL",
|
|
152
|
+
sequenceNumber: "INTEGER",
|
|
153
|
+
timestamp: "INTEGER NOT NULL",
|
|
154
|
+
writeId: "TEXT NOT NULL",
|
|
155
|
+
state: "INTEGER NOT NULL"
|
|
156
|
+
}, m = {
|
|
157
|
+
applied: 1,
|
|
158
|
+
undone: 0,
|
|
159
|
+
discarded: -1
|
|
160
|
+
}, h = {
|
|
161
|
+
id: "TEXT PRIMARY KEY",
|
|
162
|
+
documentId: "TEXT NOT NULL",
|
|
163
|
+
entry: "TEXT NOT NULL"
|
|
164
|
+
}, g = {
|
|
165
|
+
id: "TEXT PRIMARY KEY",
|
|
166
|
+
type: "TEXT NOT NULL",
|
|
167
|
+
bytes: "BLOB NOT NULL"
|
|
168
|
+
}, _ = {
|
|
169
|
+
id: "TEXT NOT NULL",
|
|
170
|
+
tagName: "TEXT NOT NULL",
|
|
171
|
+
nsPrefix: "TEXT",
|
|
172
|
+
nsUri: "TEXT",
|
|
173
|
+
value: "TEXT",
|
|
174
|
+
parentId: "TEXT",
|
|
175
|
+
parentTagName: "TEXT",
|
|
176
|
+
attributes: "TEXT",
|
|
177
|
+
children: "TEXT"
|
|
178
|
+
}, v = {
|
|
179
|
+
id: {
|
|
180
|
+
column: "id",
|
|
181
|
+
unique: !0
|
|
182
|
+
},
|
|
183
|
+
tag: {
|
|
184
|
+
column: "tagName",
|
|
185
|
+
unique: !1
|
|
186
|
+
}
|
|
187
|
+
}, y = {
|
|
188
|
+
create: 0,
|
|
189
|
+
before: 1,
|
|
190
|
+
after: 2,
|
|
191
|
+
delete: 3
|
|
192
|
+
}, b = "xch_", x = "_blobData", S = 1e3, C = ["attributes", "children"], w = Object.keys(_), T = w.join(", "), E = Object.keys(f).join(", "), D = Object.keys(_).map((e, t) => C.includes(e) ? `e.value->${t}` : `e.value->>${t}`), O = Object.keys(_).slice(1).map((e, t) => `${e} = u.c${t + 1}`).join(", "), k = D.map((e, t) => `${e} AS c${t}`).join(", "), A = 1048576, j = [
|
|
193
|
+
"registerDocument",
|
|
194
|
+
"updateDocument",
|
|
195
|
+
"removeDocument",
|
|
196
|
+
"bulkWrite",
|
|
197
|
+
"commit",
|
|
198
|
+
"undo",
|
|
199
|
+
"redo",
|
|
200
|
+
"addBlob",
|
|
201
|
+
"attachBlob",
|
|
202
|
+
"detachBlob",
|
|
203
|
+
"removeBlob"
|
|
204
|
+
];
|
|
205
|
+
export { s as C, i as D, o as E, r as O, b as S, a as T, O as _, l as a, D as b, j as c, A as d, u as f, v as g, w as h, p as i, m as l, T as m, h as n, f as o, _ as p, g as r, E as s, d as t, y as u, S as v, c as w, x, k as y };
|
|
@@ -12,7 +12,7 @@ export declare const ERROR_CATALOG: {
|
|
|
12
12
|
readonly code: "D0002";
|
|
13
13
|
readonly message: "Assertion failed";
|
|
14
14
|
readonly explanation: {
|
|
15
|
-
readonly when: "An `invariant` without its own key failed, or core met a state it never expects (a catalogue built wrong, an inconsistent export,
|
|
15
|
+
readonly 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).";
|
|
16
16
|
readonly fix: "Read `detail`: it names the condition. Give `invariant` a key of its own when the failure is one a caller should handle.";
|
|
17
17
|
readonly docs: "https://dialecte.github.io/core/guide/development/state-and-errors#error-catalog";
|
|
18
18
|
};
|
|
@@ -21,8 +21,8 @@ export declare const ERROR_CATALOG: {
|
|
|
21
21
|
readonly code: "D1001";
|
|
22
22
|
readonly message: "Failed to open database";
|
|
23
23
|
readonly explanation: {
|
|
24
|
-
readonly when: "The
|
|
25
|
-
readonly fix: "Check the browser supports the store
|
|
24
|
+
readonly 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.";
|
|
25
|
+
readonly 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.";
|
|
26
26
|
readonly docs: "https://dialecte.github.io/core/api/project#store-errors";
|
|
27
27
|
};
|
|
28
28
|
};
|
|
@@ -111,38 +111,11 @@ export declare const ERROR_CATALOG: {
|
|
|
111
111
|
readonly code: "D1011";
|
|
112
112
|
readonly message: "Failed to read from database";
|
|
113
113
|
readonly explanation: {
|
|
114
|
-
readonly when: "The
|
|
114
|
+
readonly when: "The store's database failed under a read; the failure is the `cause`.";
|
|
115
115
|
readonly fix: "Read `cause`; reopen the project. A lasting failure means the file is damaged: import its documents again.";
|
|
116
116
|
readonly docs: "https://dialecte.github.io/core/api/project#store-errors";
|
|
117
117
|
};
|
|
118
118
|
};
|
|
119
|
-
readonly STORE_PROTOCOL_MISMATCH: {
|
|
120
|
-
readonly code: "D1012";
|
|
121
|
-
readonly message: "Another version of the library holds the shared store connection";
|
|
122
|
-
readonly explanation: {
|
|
123
|
-
readonly when: "Another version of the library already holds the shared store connection (another tab runs an older or newer build).";
|
|
124
|
-
readonly fix: "Close the other tabs of the app, or reload them all on the same version.";
|
|
125
|
-
readonly docs: "https://dialecte.github.io/core/api/project#store-errors";
|
|
126
|
-
};
|
|
127
|
-
};
|
|
128
|
-
readonly STORE_REALM_ID_TAKEN: {
|
|
129
|
-
readonly code: "D1013";
|
|
130
|
-
readonly message: "A view with this id is already connected to the shared store";
|
|
131
|
-
readonly explanation: {
|
|
132
|
-
readonly when: "A view joined the shared store with an id another connected view already uses.";
|
|
133
|
-
readonly fix: "Give each view its own id; reload the page that reused one.";
|
|
134
|
-
readonly docs: "https://dialecte.github.io/core/api/project#store-errors";
|
|
135
|
-
};
|
|
136
|
-
};
|
|
137
|
-
readonly STORE_REALM_UNKNOWN: {
|
|
138
|
-
readonly code: "D1014";
|
|
139
|
-
readonly message: "The shared store does not know this view";
|
|
140
|
-
readonly explanation: {
|
|
141
|
-
readonly when: "A view spoke to the shared store without having joined it, or after it left.";
|
|
142
|
-
readonly fix: "Join (open the project) before reading or writing; reload a view that was disconnected.";
|
|
143
|
-
readonly docs: "https://dialecte.github.io/core/api/project#store-errors";
|
|
144
|
-
};
|
|
145
|
-
};
|
|
146
119
|
readonly STORE_VALUE_NOT_JSON: {
|
|
147
120
|
readonly code: "D1015";
|
|
148
121
|
readonly message: "A value handed to the store is not JSON";
|
|
@@ -156,8 +129,8 @@ export declare const ERROR_CATALOG: {
|
|
|
156
129
|
readonly code: "D1016";
|
|
157
130
|
readonly message: "This browser gives the page no storage for a project";
|
|
158
131
|
readonly explanation: {
|
|
159
|
-
readonly when: "The browser gives the page
|
|
160
|
-
readonly fix: "Open the app in a normal (not private) window of a browser that supports the
|
|
132
|
+
readonly 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.";
|
|
133
|
+
readonly 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.";
|
|
161
134
|
readonly docs: "https://dialecte.github.io/core/api/project#store-errors";
|
|
162
135
|
};
|
|
163
136
|
};
|
|
@@ -165,27 +138,27 @@ export declare const ERROR_CATALOG: {
|
|
|
165
138
|
readonly code: "D1017";
|
|
166
139
|
readonly message: "Not enough storage left for the project";
|
|
167
140
|
readonly explanation: {
|
|
168
|
-
readonly when: "The origin has too little storage left
|
|
141
|
+
readonly 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.";
|
|
169
142
|
readonly 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.";
|
|
170
143
|
readonly docs: "https://dialecte.github.io/core/api/project#store-errors";
|
|
171
144
|
};
|
|
172
145
|
};
|
|
173
|
-
readonly
|
|
146
|
+
readonly STORE_CONNECTION_LOST: {
|
|
174
147
|
readonly code: "D1018";
|
|
175
|
-
readonly message: "The
|
|
148
|
+
readonly message: "The store lost its connection";
|
|
176
149
|
readonly explanation: {
|
|
177
|
-
readonly when: "A call to a project
|
|
178
|
-
readonly 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` (
|
|
179
|
-
readonly docs: "https://dialecte.github.io/core/api/project#
|
|
150
|
+
readonly 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`.";
|
|
151
|
+
readonly 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.";
|
|
152
|
+
readonly docs: "https://dialecte.github.io/core/api/project#a-lost-connection";
|
|
180
153
|
};
|
|
181
154
|
};
|
|
182
|
-
readonly
|
|
183
|
-
readonly code: "
|
|
184
|
-
readonly message: "
|
|
155
|
+
readonly STORE_KIND_TAKEN: {
|
|
156
|
+
readonly code: "D1021";
|
|
157
|
+
readonly message: "This storage type is registered already by another kind";
|
|
185
158
|
readonly explanation: {
|
|
186
|
-
readonly when: "`
|
|
187
|
-
readonly fix: "
|
|
188
|
-
readonly docs: "https://dialecte.github.io/core/
|
|
159
|
+
readonly 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).";
|
|
160
|
+
readonly 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.";
|
|
161
|
+
readonly docs: "https://dialecte.github.io/core/guide/development/implementing-a-store#register-a-storage-kind";
|
|
189
162
|
};
|
|
190
163
|
};
|
|
191
164
|
readonly ELEMENT_NOT_FOUND: {
|
|
@@ -476,47 +449,20 @@ export declare const ERROR_CATALOG: {
|
|
|
476
449
|
readonly docs: "https://dialecte.github.io/core/api/project#blobs";
|
|
477
450
|
};
|
|
478
451
|
};
|
|
479
|
-
readonly PROJECT_LAYOUT_OUTDATED: {
|
|
480
|
-
readonly code: "D7005";
|
|
481
|
-
readonly message: "Project stored by another version of the library";
|
|
482
|
-
readonly explanation: {
|
|
483
|
-
readonly when: "The project file was stored by another version of the library (another layout); nothing was written to it.";
|
|
484
|
-
readonly fix: "Delete the project and import its files again with this version.";
|
|
485
|
-
readonly docs: "https://dialecte.github.io/core/api/project#store-errors";
|
|
486
|
-
};
|
|
487
|
-
};
|
|
488
|
-
readonly PROJECT_ENGINE_UNAVAILABLE: {
|
|
489
|
-
readonly code: "D7006";
|
|
490
|
-
readonly message: "No view can start the project engine";
|
|
491
|
-
readonly explanation: {
|
|
492
|
-
readonly 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.";
|
|
493
|
-
readonly 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.";
|
|
494
|
-
readonly docs: "https://dialecte.github.io/core/api/project#store-errors";
|
|
495
|
-
};
|
|
496
|
-
};
|
|
497
|
-
readonly PROJECT_ENGINE_BUSY: {
|
|
498
|
-
readonly code: "D7007";
|
|
499
|
-
readonly message: "The project is still held by another engine";
|
|
500
|
-
readonly explanation: {
|
|
501
|
-
readonly when: "Another engine still holds the project (another tab or a worker that did not stop).";
|
|
502
|
-
readonly fix: "Close the other tabs of the app, then open the project again.";
|
|
503
|
-
readonly docs: "https://dialecte.github.io/core/api/project#store-errors";
|
|
504
|
-
};
|
|
505
|
-
};
|
|
506
452
|
readonly PROJECT_DIALECTE_MISMATCH: {
|
|
507
453
|
readonly code: "D7008";
|
|
508
|
-
readonly message: "The project's
|
|
454
|
+
readonly message: "The project's data is of another dialecte";
|
|
509
455
|
readonly explanation: {
|
|
510
|
-
readonly when: "A project
|
|
511
|
-
readonly fix: "Open the project with the dialecte it was created with;
|
|
456
|
+
readonly 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.";
|
|
457
|
+
readonly 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.";
|
|
512
458
|
readonly docs: "https://dialecte.github.io/core/api/project#store-errors";
|
|
513
459
|
};
|
|
514
460
|
};
|
|
515
461
|
readonly PROJECT_DIALECTE_VERSION_MISMATCH: {
|
|
516
462
|
readonly code: "D7009";
|
|
517
|
-
readonly message: "The project
|
|
463
|
+
readonly message: "The project's store runs another version of the dialecte";
|
|
518
464
|
readonly explanation: {
|
|
519
|
-
readonly when: "
|
|
465
|
+
readonly 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).";
|
|
520
466
|
readonly fix: "Reload every tab of the app so they run the same version.";
|
|
521
467
|
readonly docs: "https://dialecte.github.io/core/api/project#store-errors";
|
|
522
468
|
};
|
|
@@ -525,7 +471,7 @@ export declare const ERROR_CATALOG: {
|
|
|
525
471
|
readonly code: "D7010";
|
|
526
472
|
readonly message: "The project could not be deleted";
|
|
527
473
|
readonly explanation: {
|
|
528
|
-
readonly when: "Destroying a project left its
|
|
474
|
+
readonly when: "Destroying a project left its data in place: another tab, window or connection still holds it.";
|
|
529
475
|
readonly fix: "Close the other tabs or windows of the app that have the project open, then destroy it again.";
|
|
530
476
|
readonly docs: "https://dialecte.github.io/core/api/project#lifecycle";
|
|
531
477
|
};
|
|
@@ -539,20 +485,11 @@ export declare const ERROR_CATALOG: {
|
|
|
539
485
|
readonly docs: "https://dialecte.github.io/core/api/project#lifecycle";
|
|
540
486
|
};
|
|
541
487
|
};
|
|
542
|
-
readonly PROJECT_DATABASE_LOST: {
|
|
543
|
-
readonly code: "D7012";
|
|
544
|
-
readonly message: "The project's database is gone";
|
|
545
|
-
readonly explanation: {
|
|
546
|
-
readonly 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.";
|
|
547
|
-
readonly 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.";
|
|
548
|
-
readonly docs: "https://dialecte.github.io/core/api/project#lifecycle";
|
|
549
|
-
};
|
|
550
|
-
};
|
|
551
488
|
readonly PROJECT_DESTROYED_WHILE_AWAY: {
|
|
552
489
|
readonly code: "D7013";
|
|
553
490
|
readonly message: "The project was deleted while this view was away";
|
|
554
491
|
readonly explanation: {
|
|
555
|
-
readonly when: "A view's connection to a project came back - the page back from a freeze or the back/forward cache, its
|
|
492
|
+
readonly 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.";
|
|
556
493
|
readonly 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.";
|
|
557
494
|
readonly docs: "https://dialecte.github.io/core/api/project#lifecycle";
|
|
558
495
|
};
|
|
@@ -561,27 +498,18 @@ export declare const ERROR_CATALOG: {
|
|
|
561
498
|
readonly code: "D7014";
|
|
562
499
|
readonly message: "The project's name cannot name its files";
|
|
563
500
|
readonly explanation: {
|
|
564
|
-
readonly when: "A project's name or its dialecte's id is empty, `.` or `..`: every store refuses it before it is built (a
|
|
501
|
+
readonly 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.";
|
|
565
502
|
readonly fix: "Give the project a name of its own (and the dialecte an id) other than an empty one, `.` or `..`.";
|
|
566
503
|
readonly docs: "https://dialecte.github.io/core/api/project#lifecycle";
|
|
567
504
|
};
|
|
568
505
|
};
|
|
569
|
-
readonly
|
|
570
|
-
readonly code: "
|
|
571
|
-
readonly message: "
|
|
572
|
-
readonly explanation: {
|
|
573
|
-
readonly when: "A project was opened on `storage: { type: 'sqlite' }` but made by no dialecte's project factory: its engine (the dialecte's id, its version and its engine worker's URL) is known to no one, so nothing can start it. Nothing was opened.";
|
|
574
|
-
readonly fix: "Make the project with the dialecte's project factory (`createProjectFactory({ dialecte, engineUrl })`, as a dialecte package exports it), or open it on another storage.";
|
|
575
|
-
readonly docs: "https://dialecte.github.io/core/api/project#sqlite-storage";
|
|
576
|
-
};
|
|
577
|
-
};
|
|
578
|
-
readonly PROJECT_SQLITE_NOT_IMPORTED: {
|
|
579
|
-
readonly code: "D7016";
|
|
580
|
-
readonly message: "SQLite storage needs `import '@dialecte/core/sqlite'`";
|
|
506
|
+
readonly PROJECT_STORAGE_NOT_REGISTERED: {
|
|
507
|
+
readonly code: "D7018";
|
|
508
|
+
readonly message: "The project's storage type is not registered";
|
|
581
509
|
readonly explanation: {
|
|
582
|
-
readonly when: "A project was opened (or destroyed by name)
|
|
583
|
-
readonly fix: "
|
|
584
|
-
readonly docs: "https://dialecte.github.io/core/
|
|
510
|
+
readonly 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`.";
|
|
511
|
+
readonly 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.";
|
|
512
|
+
readonly docs: "https://dialecte.github.io/core/guide/development/implementing-a-store#register-a-storage-kind";
|
|
585
513
|
};
|
|
586
514
|
};
|
|
587
515
|
readonly DOCUMENT_PATH_INVALID: {
|
|
@@ -603,4 +531,4 @@ export declare const ERROR_CATALOG: {
|
|
|
603
531
|
};
|
|
604
532
|
};
|
|
605
533
|
};
|
|
606
|
-
//# sourceMappingURL=codes.d.ts.map
|
|
534
|
+
//# sourceMappingURL=codes.constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codes.d.ts","sourceRoot":"","sources":["../../src/errors/codes.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa
|
|
1
|
+
{"version":3,"file":"codes.constants.d.ts","sourceRoot":"","sources":["../../src/errors/codes.constants.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsiBhB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"core-codes.constants.d.ts","sourceRoot":"","sources":["../../src/errors/core-codes.constants.ts"],"names":[],"mappings":"AAEA,+EAA+E;AAC/E,eAAO,MAAM,UAAU,aAA2E,CAAA"}
|
|
@@ -1,3 +1,8 @@
|
|
|
1
1
|
/** Where core's published docs live: an explanation's `docs` page is under it. */
|
|
2
2
|
export declare const CORE_DOCS_URL = "https://dialecte.github.io/core";
|
|
3
|
+
/**
|
|
4
|
+
* The functions that only raise or report an error: the method is the first frame that is none of
|
|
5
|
+
* them. Matched on the function name only — a frame's file path may well contain one of these words.
|
|
6
|
+
*/
|
|
7
|
+
export declare const RAISING_FUNCTIONS: Set<string>;
|
|
3
8
|
//# sourceMappingURL=errors.constants.d.ts.map
|