@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
|
@@ -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,5 +1,5 @@
|
|
|
1
1
|
import { Context, RefOrRecord } from '../../..';
|
|
2
|
-
import { AnyDialecteConfig, ElementsOf, TrackedRecord } from '../../../../types';
|
|
2
|
+
import { AnyDialecteConfig, ElementsOf, RawRecord, TrackedRecord } from '../../../../types';
|
|
3
3
|
/**
|
|
4
4
|
* Fetch a single record by ref.
|
|
5
5
|
*
|
|
@@ -18,4 +18,17 @@ export declare function getRecord<GenericConfig extends AnyDialecteConfig, Gener
|
|
|
18
18
|
context: Context<GenericConfig>;
|
|
19
19
|
ref: RefOrRecord<GenericConfig, GenericElement>;
|
|
20
20
|
}): Promise<TrackedRecord<GenericConfig, GenericElement> | undefined>;
|
|
21
|
+
/**
|
|
22
|
+
* A record read from the store or the transaction cache, as a read hands it back: a copy with
|
|
23
|
+
* status `unchanged`.
|
|
24
|
+
*
|
|
25
|
+
* @internal shared by `getRecord` and `getRecords`
|
|
26
|
+
*
|
|
27
|
+
* @throws {@link DialecteError} `ELEMENT_TAGNAME_MISMATCH` when the record's tagName differs from
|
|
28
|
+
* `ref.tagName`.
|
|
29
|
+
*/
|
|
30
|
+
export declare function trackStoredRecord<GenericConfig extends AnyDialecteConfig, GenericElement extends ElementsOf<GenericConfig>>(params: {
|
|
31
|
+
raw: RawRecord<GenericConfig, ElementsOf<GenericConfig>>;
|
|
32
|
+
ref: RefOrRecord<GenericConfig, GenericElement>;
|
|
33
|
+
}): TrackedRecord<GenericConfig, GenericElement>;
|
|
21
34
|
//# sourceMappingURL=get-record.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-record.d.ts","sourceRoot":"","sources":["../../../../../src/document/query/get/record/get-record.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AACzC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAC7C,OAAO,KAAK,EAAE,iBAAiB,EAAE,UAAU,
|
|
1
|
+
{"version":3,"file":"get-record.d.ts","sourceRoot":"","sources":["../../../../../src/document/query/get/record/get-record.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AACzC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAC7C,OAAO,KAAK,EAAE,iBAAiB,EAAE,UAAU,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAEtF;;;;;;;;;;;;;GAaG;AACH,wBAAsB,SAAS,CAC9B,aAAa,SAAS,iBAAiB,EACvC,cAAc,SAAS,UAAU,CAAC,aAAa,CAAC,EAC/C,MAAM,EAAE;IACT,OAAO,EAAE,OAAO,CAAC,aAAa,CAAC,CAAA;IAC/B,GAAG,EAAE,WAAW,CAAC,aAAa,EAAE,cAAc,CAAC,CAAA;CAC/C,GAAG,OAAO,CAAC,aAAa,CAAC,aAAa,EAAE,cAAc,CAAC,GAAG,SAAS,CAAC,CAsDpE;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAChC,aAAa,SAAS,iBAAiB,EACvC,cAAc,SAAS,UAAU,CAAC,aAAa,CAAC,EAC/C,MAAM,EAAE;IACT,GAAG,EAAE,SAAS,CAAC,aAAa,EAAE,UAAU,CAAC,aAAa,CAAC,CAAC,CAAA;IACxD,GAAG,EAAE,WAAW,CAAC,aAAa,EAAE,cAAc,CAAC,CAAA;CAC/C,GAAG,aAAa,CAAC,aAAa,EAAE,cAAc,CAAC,CAU/C"}
|
|
@@ -1,10 +1,20 @@
|
|
|
1
1
|
import { Context, RefOrRecord } from '../../..';
|
|
2
2
|
import { AnyDialecteConfig, ElementsOf, TrackedRecord } from '../../../../types';
|
|
3
3
|
/**
|
|
4
|
-
* Batch lookup
|
|
5
|
-
*
|
|
4
|
+
* Batch lookup: the records of several refs, in the order given; a missing record yields `undefined`.
|
|
5
|
+
*
|
|
6
|
+
* Each ref resolves as with `getRecord`: staged operations first, then the transaction cache, a ref
|
|
7
|
+
* without id by its tag name. The refs left are read from the store in one `getMany` (each id once,
|
|
8
|
+
* however often it is given), and a transaction caches every record it read. Positions naming the
|
|
9
|
+
* same stored record get their own copy of it, sharing its nested arrays (as cache hits do).
|
|
10
|
+
*
|
|
11
|
+
* Perf: counts `core::store::getMany` once per call that reads the store by id, and
|
|
12
|
+
* `core::query::getRecord.miss` once per id it reads.
|
|
6
13
|
*
|
|
7
14
|
* @internal the context-level read behind `doc.query.getRecords`; callers use the query
|
|
15
|
+
*
|
|
16
|
+
* @throws {@link DialecteError} `ELEMENT_TAGNAME_MISMATCH` when a ref names another tag than its
|
|
17
|
+
* record: a staged or cached one before any store read, else the first in input order.
|
|
8
18
|
*/
|
|
9
19
|
export declare function getRecords<GenericConfig extends AnyDialecteConfig, GenericElement extends ElementsOf<GenericConfig>>(params: {
|
|
10
20
|
context: Context<GenericConfig>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-records.d.ts","sourceRoot":"","sources":["../../../../../src/document/query/get/record/get-records.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"get-records.d.ts","sourceRoot":"","sources":["../../../../../src/document/query/get/record/get-records.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AACtD,OAAO,KAAK,EAAE,iBAAiB,EAAE,UAAU,EAAa,aAAa,EAAE,MAAM,SAAS,CAAA;AAEtF;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,UAAU,CAC/B,aAAa,SAAS,iBAAiB,EACvC,cAAc,SAAS,UAAU,CAAC,aAAa,CAAC,EAC/C,MAAM,EAAE;IACT,OAAO,EAAE,OAAO,CAAC,aAAa,CAAC,CAAA;IAC/B,IAAI,EAAE,WAAW,CAAC,aAAa,EAAE,cAAc,CAAC,EAAE,CAAA;CAClD,GAAG,OAAO,CAAC,CAAC,aAAa,CAAC,aAAa,EAAE,cAAc,CAAC,GAAG,SAAS,CAAC,EAAE,CAAC,CAwBxE"}
|
|
@@ -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 };
|