@livestore/common 0.3.0-dev.3 → 0.3.0-dev.31
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/.tsbuildinfo +1 -1
- package/dist/__tests__/fixture.d.ts +83 -221
- package/dist/__tests__/fixture.d.ts.map +1 -1
- package/dist/__tests__/fixture.js +33 -11
- package/dist/__tests__/fixture.js.map +1 -1
- package/dist/adapter-types.d.ts +128 -68
- package/dist/adapter-types.d.ts.map +1 -1
- package/dist/adapter-types.js +36 -7
- package/dist/adapter-types.js.map +1 -1
- package/dist/bounded-collections.d.ts.map +1 -1
- package/dist/debug-info.d.ts +1 -1
- package/dist/debug-info.d.ts.map +1 -1
- package/dist/debug-info.js +1 -0
- package/dist/debug-info.js.map +1 -1
- package/dist/devtools/devtools-messages-client-session.d.ts +389 -0
- package/dist/devtools/devtools-messages-client-session.d.ts.map +1 -0
- package/dist/devtools/devtools-messages-client-session.js +96 -0
- package/dist/devtools/devtools-messages-client-session.js.map +1 -0
- package/dist/devtools/devtools-messages-common.d.ts +68 -0
- package/dist/devtools/devtools-messages-common.d.ts.map +1 -0
- package/dist/devtools/devtools-messages-common.js +60 -0
- package/dist/devtools/devtools-messages-common.js.map +1 -0
- package/dist/devtools/devtools-messages-leader.d.ts +394 -0
- package/dist/devtools/devtools-messages-leader.d.ts.map +1 -0
- package/dist/devtools/devtools-messages-leader.js +147 -0
- package/dist/devtools/devtools-messages-leader.js.map +1 -0
- package/dist/devtools/devtools-messages.d.ts +3 -592
- package/dist/devtools/devtools-messages.d.ts.map +1 -1
- package/dist/devtools/devtools-messages.js +3 -171
- package/dist/devtools/devtools-messages.js.map +1 -1
- package/dist/devtools/devtools-sessioninfo.d.ts +28 -0
- package/dist/devtools/devtools-sessioninfo.d.ts.map +1 -0
- package/dist/devtools/devtools-sessioninfo.js +34 -0
- package/dist/devtools/devtools-sessioninfo.js.map +1 -0
- package/dist/devtools/mod.d.ts +39 -0
- package/dist/devtools/mod.d.ts.map +1 -0
- package/dist/devtools/mod.js +27 -0
- package/dist/devtools/mod.js.map +1 -0
- package/dist/index.d.ts +4 -11
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -7
- package/dist/index.js.map +1 -1
- package/dist/leader-thread/LeaderSyncProcessor.d.ts +62 -0
- package/dist/leader-thread/LeaderSyncProcessor.d.ts.map +1 -0
- package/dist/leader-thread/LeaderSyncProcessor.js +589 -0
- package/dist/leader-thread/LeaderSyncProcessor.js.map +1 -0
- package/dist/leader-thread/apply-event.d.ts +16 -0
- package/dist/leader-thread/apply-event.d.ts.map +1 -0
- package/dist/leader-thread/apply-event.js +103 -0
- package/dist/leader-thread/apply-event.js.map +1 -0
- package/dist/leader-thread/connection.d.ts +34 -6
- package/dist/leader-thread/connection.d.ts.map +1 -1
- package/dist/leader-thread/connection.js +22 -7
- package/dist/leader-thread/connection.js.map +1 -1
- package/dist/leader-thread/eventlog.d.ts +27 -0
- package/dist/leader-thread/eventlog.d.ts.map +1 -0
- package/dist/leader-thread/eventlog.js +123 -0
- package/dist/leader-thread/eventlog.js.map +1 -0
- package/dist/leader-thread/leader-worker-devtools.d.ts +1 -1
- package/dist/leader-thread/leader-worker-devtools.d.ts.map +1 -1
- package/dist/leader-thread/leader-worker-devtools.js +154 -132
- package/dist/leader-thread/leader-worker-devtools.js.map +1 -1
- package/dist/leader-thread/make-leader-thread-layer.d.ts +26 -12
- package/dist/leader-thread/make-leader-thread-layer.d.ts.map +1 -1
- package/dist/leader-thread/make-leader-thread-layer.js +82 -47
- package/dist/leader-thread/make-leader-thread-layer.js.map +1 -1
- package/dist/leader-thread/mod.d.ts +1 -1
- package/dist/leader-thread/mod.d.ts.map +1 -1
- package/dist/leader-thread/mod.js +1 -1
- package/dist/leader-thread/mod.js.map +1 -1
- package/dist/leader-thread/recreate-db.d.ts +4 -2
- package/dist/leader-thread/recreate-db.d.ts.map +1 -1
- package/dist/leader-thread/recreate-db.js +35 -25
- package/dist/leader-thread/recreate-db.js.map +1 -1
- package/dist/leader-thread/shutdown-channel.d.ts +2 -5
- package/dist/leader-thread/shutdown-channel.d.ts.map +1 -1
- package/dist/leader-thread/shutdown-channel.js +2 -4
- package/dist/leader-thread/shutdown-channel.js.map +1 -1
- package/dist/leader-thread/types.d.ts +86 -39
- package/dist/leader-thread/types.d.ts.map +1 -1
- package/dist/leader-thread/types.js +1 -3
- package/dist/leader-thread/types.js.map +1 -1
- package/dist/materializer-helper.d.ts +23 -0
- package/dist/materializer-helper.d.ts.map +1 -0
- package/dist/materializer-helper.js +70 -0
- package/dist/materializer-helper.js.map +1 -0
- package/dist/otel.d.ts +2 -0
- package/dist/otel.d.ts.map +1 -1
- package/dist/otel.js +5 -0
- package/dist/otel.js.map +1 -1
- package/dist/query-builder/api.d.ts +158 -55
- package/dist/query-builder/api.d.ts.map +1 -1
- package/dist/query-builder/api.js +3 -5
- package/dist/query-builder/api.js.map +1 -1
- package/dist/query-builder/astToSql.d.ts +7 -0
- package/dist/query-builder/astToSql.d.ts.map +1 -0
- package/dist/query-builder/astToSql.js +190 -0
- package/dist/query-builder/astToSql.js.map +1 -0
- package/dist/query-builder/impl.d.ts +3 -8
- package/dist/query-builder/impl.d.ts.map +1 -1
- package/dist/query-builder/impl.js +166 -124
- package/dist/query-builder/impl.js.map +1 -1
- package/dist/query-builder/impl.test.d.ts +86 -1
- package/dist/query-builder/impl.test.d.ts.map +1 -1
- package/dist/query-builder/impl.test.js +411 -69
- package/dist/query-builder/impl.test.js.map +1 -1
- package/dist/query-builder/mod.d.ts +7 -0
- package/dist/query-builder/mod.d.ts.map +1 -1
- package/dist/query-builder/mod.js +7 -0
- package/dist/query-builder/mod.js.map +1 -1
- package/dist/rehydrate-from-eventlog.d.ts +14 -0
- package/dist/rehydrate-from-eventlog.d.ts.map +1 -0
- package/dist/rehydrate-from-eventlog.js +65 -0
- package/dist/rehydrate-from-eventlog.js.map +1 -0
- package/dist/schema/EventDef.d.ts +136 -0
- package/dist/schema/EventDef.d.ts.map +1 -0
- package/dist/schema/EventDef.js +58 -0
- package/dist/schema/EventDef.js.map +1 -0
- package/dist/schema/EventId.d.ts +35 -15
- package/dist/schema/EventId.d.ts.map +1 -1
- package/dist/schema/EventId.js +57 -11
- package/dist/schema/EventId.js.map +1 -1
- package/dist/schema/EventId.test.d.ts +2 -0
- package/dist/schema/EventId.test.d.ts.map +1 -0
- package/dist/schema/EventId.test.js +11 -0
- package/dist/schema/EventId.test.js.map +1 -0
- package/dist/schema/LiveStoreEvent.d.ts +255 -0
- package/dist/schema/LiveStoreEvent.d.ts.map +1 -0
- package/dist/schema/LiveStoreEvent.js +118 -0
- package/dist/schema/LiveStoreEvent.js.map +1 -0
- package/dist/schema/client-document-def.d.ts +223 -0
- package/dist/schema/client-document-def.d.ts.map +1 -0
- package/dist/schema/client-document-def.js +170 -0
- package/dist/schema/client-document-def.js.map +1 -0
- package/dist/schema/client-document-def.test.d.ts +2 -0
- package/dist/schema/client-document-def.test.d.ts.map +1 -0
- package/dist/schema/client-document-def.test.js +201 -0
- package/dist/schema/client-document-def.test.js.map +1 -0
- package/dist/schema/db-schema/ast/sqlite.d.ts +69 -0
- package/dist/schema/db-schema/ast/sqlite.d.ts.map +1 -0
- package/dist/schema/db-schema/ast/sqlite.js +71 -0
- package/dist/schema/db-schema/ast/sqlite.js.map +1 -0
- package/dist/schema/db-schema/ast/validate.d.ts +3 -0
- package/dist/schema/db-schema/ast/validate.d.ts.map +1 -0
- package/dist/schema/db-schema/ast/validate.js +12 -0
- package/dist/schema/db-schema/ast/validate.js.map +1 -0
- package/dist/schema/db-schema/dsl/field-defs.d.ts +90 -0
- package/dist/schema/db-schema/dsl/field-defs.d.ts.map +1 -0
- package/dist/schema/db-schema/dsl/field-defs.js +87 -0
- package/dist/schema/db-schema/dsl/field-defs.js.map +1 -0
- package/dist/schema/db-schema/dsl/field-defs.test.d.ts +2 -0
- package/dist/schema/db-schema/dsl/field-defs.test.d.ts.map +1 -0
- package/dist/schema/db-schema/dsl/field-defs.test.js +29 -0
- package/dist/schema/db-schema/dsl/field-defs.test.js.map +1 -0
- package/dist/schema/db-schema/dsl/mod.d.ts +90 -0
- package/dist/schema/db-schema/dsl/mod.d.ts.map +1 -0
- package/dist/schema/db-schema/dsl/mod.js +41 -0
- package/dist/schema/db-schema/dsl/mod.js.map +1 -0
- package/dist/schema/db-schema/hash.d.ts +2 -0
- package/dist/schema/db-schema/hash.d.ts.map +1 -0
- package/dist/schema/db-schema/hash.js +14 -0
- package/dist/schema/db-schema/hash.js.map +1 -0
- package/dist/schema/db-schema/mod.d.ts +3 -0
- package/dist/schema/db-schema/mod.d.ts.map +1 -0
- package/dist/schema/db-schema/mod.js +3 -0
- package/dist/schema/db-schema/mod.js.map +1 -0
- package/dist/schema/events.d.ts +2 -0
- package/dist/schema/events.d.ts.map +1 -0
- package/dist/schema/events.js +2 -0
- package/dist/schema/events.js.map +1 -0
- package/dist/schema/mod.d.ts +5 -3
- package/dist/schema/mod.d.ts.map +1 -1
- package/dist/schema/mod.js +5 -3
- package/dist/schema/mod.js.map +1 -1
- package/dist/schema/schema-helpers.d.ts.map +1 -1
- package/dist/schema/schema-helpers.js +1 -1
- package/dist/schema/schema-helpers.js.map +1 -1
- package/dist/schema/schema.d.ts +30 -23
- package/dist/schema/schema.d.ts.map +1 -1
- package/dist/schema/schema.js +48 -35
- package/dist/schema/schema.js.map +1 -1
- package/dist/schema/sqlite-state.d.ts +12 -0
- package/dist/schema/sqlite-state.d.ts.map +1 -0
- package/dist/schema/sqlite-state.js +36 -0
- package/dist/schema/sqlite-state.js.map +1 -0
- package/dist/schema/system-tables.d.ts +179 -125
- package/dist/schema/system-tables.d.ts.map +1 -1
- package/dist/schema/system-tables.js +76 -41
- package/dist/schema/system-tables.js.map +1 -1
- package/dist/schema/table-def.d.ts +37 -109
- package/dist/schema/table-def.d.ts.map +1 -1
- package/dist/schema/table-def.js +23 -66
- package/dist/schema/table-def.js.map +1 -1
- package/dist/schema/view.d.ts +3 -0
- package/dist/schema/view.d.ts.map +1 -0
- package/dist/schema/view.js +3 -0
- package/dist/schema/view.js.map +1 -0
- package/dist/schema-management/common.d.ts +7 -7
- package/dist/schema-management/common.d.ts.map +1 -1
- package/dist/schema-management/common.js.map +1 -1
- package/dist/schema-management/migrations.d.ts +6 -6
- package/dist/schema-management/migrations.d.ts.map +1 -1
- package/dist/schema-management/migrations.js +19 -14
- package/dist/schema-management/migrations.js.map +1 -1
- package/dist/schema-management/validate-mutation-defs.d.ts +3 -3
- package/dist/schema-management/validate-mutation-defs.d.ts.map +1 -1
- package/dist/schema-management/validate-mutation-defs.js +17 -17
- package/dist/schema-management/validate-mutation-defs.js.map +1 -1
- package/dist/sql-queries/misc.d.ts.map +1 -1
- package/dist/sql-queries/sql-queries.d.ts +1 -1
- package/dist/sql-queries/sql-queries.d.ts.map +1 -1
- package/dist/sql-queries/sql-queries.js.map +1 -1
- package/dist/sql-queries/sql-query-builder.d.ts +1 -1
- package/dist/sql-queries/sql-query-builder.d.ts.map +1 -1
- package/dist/sql-queries/sql-query-builder.js.map +1 -1
- package/dist/sql-queries/types.d.ts +2 -1
- package/dist/sql-queries/types.d.ts.map +1 -1
- package/dist/sql-queries/types.js.map +1 -1
- package/dist/sync/ClientSessionSyncProcessor.d.ts +66 -0
- package/dist/sync/ClientSessionSyncProcessor.d.ts.map +1 -0
- package/dist/sync/ClientSessionSyncProcessor.js +209 -0
- package/dist/sync/ClientSessionSyncProcessor.js.map +1 -0
- package/dist/sync/index.d.ts +1 -1
- package/dist/sync/index.d.ts.map +1 -1
- package/dist/sync/index.js +1 -1
- package/dist/sync/index.js.map +1 -1
- package/dist/sync/next/compact-events.d.ts.map +1 -1
- package/dist/sync/next/facts.d.ts +19 -19
- package/dist/sync/next/facts.d.ts.map +1 -1
- package/dist/sync/next/facts.js +3 -3
- package/dist/sync/next/facts.js.map +1 -1
- package/dist/sync/next/history-dag-common.d.ts +6 -7
- package/dist/sync/next/history-dag-common.d.ts.map +1 -1
- package/dist/sync/next/history-dag-common.js +4 -2
- package/dist/sync/next/history-dag-common.js.map +1 -1
- package/dist/sync/next/history-dag.d.ts.map +1 -1
- package/dist/sync/next/history-dag.js +2 -2
- package/dist/sync/next/history-dag.js.map +1 -1
- package/dist/sync/next/rebase-events.d.ts +10 -8
- package/dist/sync/next/rebase-events.d.ts.map +1 -1
- package/dist/sync/next/rebase-events.js +11 -8
- package/dist/sync/next/rebase-events.js.map +1 -1
- package/dist/sync/next/test/compact-events.calculator.test.js +38 -33
- package/dist/sync/next/test/compact-events.calculator.test.js.map +1 -1
- package/dist/sync/next/test/compact-events.test.js +76 -76
- package/dist/sync/next/test/compact-events.test.js.map +1 -1
- package/dist/sync/next/test/{mutation-fixtures.d.ts → event-fixtures.d.ts} +29 -29
- package/dist/sync/next/test/event-fixtures.d.ts.map +1 -0
- package/dist/sync/next/test/{mutation-fixtures.js → event-fixtures.js} +67 -36
- package/dist/sync/next/test/event-fixtures.js.map +1 -0
- package/dist/sync/next/test/mod.d.ts +1 -1
- package/dist/sync/next/test/mod.d.ts.map +1 -1
- package/dist/sync/next/test/mod.js +1 -1
- package/dist/sync/next/test/mod.js.map +1 -1
- package/dist/sync/sync.d.ts +55 -20
- package/dist/sync/sync.d.ts.map +1 -1
- package/dist/sync/sync.js +7 -3
- package/dist/sync/sync.js.map +1 -1
- package/dist/sync/syncstate.d.ts +213 -82
- package/dist/sync/syncstate.d.ts.map +1 -1
- package/dist/sync/syncstate.js +319 -120
- package/dist/sync/syncstate.js.map +1 -1
- package/dist/sync/syncstate.test.js +295 -275
- package/dist/sync/syncstate.test.js.map +1 -1
- package/dist/sync/validate-push-payload.d.ts +2 -2
- package/dist/sync/validate-push-payload.d.ts.map +1 -1
- package/dist/sync/validate-push-payload.js +2 -2
- package/dist/sync/validate-push-payload.js.map +1 -1
- package/dist/util.d.ts +2 -2
- package/dist/util.d.ts.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +1 -1
- package/dist/version.js.map +1 -1
- package/package.json +6 -6
- package/src/__tests__/fixture.ts +36 -15
- package/src/adapter-types.ts +111 -74
- package/src/debug-info.ts +1 -0
- package/src/devtools/devtools-messages-client-session.ts +141 -0
- package/src/devtools/devtools-messages-common.ts +115 -0
- package/src/devtools/devtools-messages-leader.ts +191 -0
- package/src/devtools/devtools-messages.ts +3 -243
- package/src/devtools/devtools-sessioninfo.ts +99 -0
- package/src/devtools/mod.ts +36 -0
- package/src/index.ts +4 -13
- package/src/leader-thread/LeaderSyncProcessor.ts +935 -0
- package/src/leader-thread/apply-event.ts +173 -0
- package/src/leader-thread/connection.ts +54 -9
- package/src/leader-thread/eventlog.ts +199 -0
- package/src/leader-thread/leader-worker-devtools.ts +212 -189
- package/src/leader-thread/make-leader-thread-layer.ts +143 -77
- package/src/leader-thread/mod.ts +1 -1
- package/src/leader-thread/recreate-db.ts +41 -30
- package/src/leader-thread/shutdown-channel.ts +2 -4
- package/src/leader-thread/types.ts +95 -51
- package/src/materializer-helper.ts +110 -0
- package/src/otel.ts +8 -0
- package/src/query-builder/api.ts +236 -85
- package/src/query-builder/astToSql.ts +232 -0
- package/src/query-builder/impl.test.ts +447 -78
- package/src/query-builder/impl.ts +209 -144
- package/src/query-builder/mod.ts +7 -0
- package/src/rehydrate-from-eventlog.ts +114 -0
- package/src/schema/EventDef.ts +216 -0
- package/src/schema/EventId.test.ts +12 -0
- package/src/schema/EventId.ts +75 -15
- package/src/schema/LiveStoreEvent.ts +239 -0
- package/src/schema/client-document-def.test.ts +239 -0
- package/src/schema/client-document-def.ts +444 -0
- package/src/schema/db-schema/ast/sqlite.ts +142 -0
- package/src/schema/db-schema/ast/validate.ts +13 -0
- package/src/schema/db-schema/dsl/__snapshots__/field-defs.test.ts.snap +206 -0
- package/src/schema/db-schema/dsl/field-defs.test.ts +35 -0
- package/src/schema/db-schema/dsl/field-defs.ts +242 -0
- package/src/schema/db-schema/dsl/mod.ts +222 -0
- package/src/schema/db-schema/hash.ts +14 -0
- package/src/schema/db-schema/mod.ts +2 -0
- package/src/schema/events.ts +1 -0
- package/src/schema/mod.ts +5 -3
- package/src/schema/schema-helpers.ts +1 -1
- package/src/schema/schema.ts +84 -62
- package/src/schema/sqlite-state.ts +62 -0
- package/src/schema/system-tables.ts +68 -50
- package/src/schema/table-def.ts +68 -214
- package/src/schema/view.ts +2 -0
- package/src/schema-management/common.ts +7 -7
- package/src/schema-management/migrations.ts +27 -24
- package/src/schema-management/validate-mutation-defs.ts +22 -24
- package/src/sql-queries/sql-queries.ts +1 -1
- package/src/sql-queries/sql-query-builder.ts +1 -2
- package/src/sql-queries/types.ts +3 -1
- package/src/sync/ClientSessionSyncProcessor.ts +332 -0
- package/src/sync/index.ts +1 -1
- package/src/sync/next/facts.ts +32 -33
- package/src/sync/next/history-dag-common.ts +9 -5
- package/src/sync/next/history-dag.ts +2 -2
- package/src/sync/next/rebase-events.ts +22 -16
- package/src/sync/next/test/compact-events.calculator.test.ts +45 -45
- package/src/sync/next/test/compact-events.test.ts +78 -78
- package/src/sync/next/test/event-fixtures.ts +219 -0
- package/src/sync/next/test/mod.ts +1 -1
- package/src/sync/sync.ts +51 -19
- package/src/sync/syncstate.test.ts +335 -308
- package/src/sync/syncstate.ts +394 -212
- package/src/sync/validate-push-payload.ts +7 -4
- package/src/version.ts +1 -1
- package/tmp/pack.tgz +0 -0
- package/tsconfig.json +2 -1
- package/dist/derived-mutations.d.ts +0 -109
- package/dist/derived-mutations.d.ts.map +0 -1
- package/dist/derived-mutations.js +0 -54
- package/dist/derived-mutations.js.map +0 -1
- package/dist/derived-mutations.test.d.ts +0 -2
- package/dist/derived-mutations.test.d.ts.map +0 -1
- package/dist/derived-mutations.test.js +0 -93
- package/dist/derived-mutations.test.js.map +0 -1
- package/dist/devtools/devtools-bridge.d.ts +0 -12
- package/dist/devtools/devtools-bridge.d.ts.map +0 -1
- package/dist/devtools/devtools-bridge.js +0 -2
- package/dist/devtools/devtools-bridge.js.map +0 -1
- package/dist/devtools/index.d.ts +0 -42
- package/dist/devtools/index.d.ts.map +0 -1
- package/dist/devtools/index.js +0 -48
- package/dist/devtools/index.js.map +0 -1
- package/dist/init-singleton-tables.d.ts +0 -4
- package/dist/init-singleton-tables.d.ts.map +0 -1
- package/dist/init-singleton-tables.js +0 -16
- package/dist/init-singleton-tables.js.map +0 -1
- package/dist/leader-thread/apply-mutation.d.ts +0 -8
- package/dist/leader-thread/apply-mutation.d.ts.map +0 -1
- package/dist/leader-thread/apply-mutation.js +0 -95
- package/dist/leader-thread/apply-mutation.js.map +0 -1
- package/dist/leader-thread/leader-sync-processor.d.ts +0 -47
- package/dist/leader-thread/leader-sync-processor.d.ts.map +0 -1
- package/dist/leader-thread/leader-sync-processor.js +0 -422
- package/dist/leader-thread/leader-sync-processor.js.map +0 -1
- package/dist/leader-thread/mutationlog.d.ts +0 -23
- package/dist/leader-thread/mutationlog.d.ts.map +0 -1
- package/dist/leader-thread/mutationlog.js +0 -27
- package/dist/leader-thread/mutationlog.js.map +0 -1
- package/dist/leader-thread/pull-queue-set.d.ts +0 -7
- package/dist/leader-thread/pull-queue-set.d.ts.map +0 -1
- package/dist/leader-thread/pull-queue-set.js +0 -39
- package/dist/leader-thread/pull-queue-set.js.map +0 -1
- package/dist/mutation.d.ts +0 -13
- package/dist/mutation.d.ts.map +0 -1
- package/dist/mutation.js +0 -57
- package/dist/mutation.js.map +0 -1
- package/dist/query-info.d.ts +0 -38
- package/dist/query-info.d.ts.map +0 -1
- package/dist/query-info.js +0 -7
- package/dist/query-info.js.map +0 -1
- package/dist/rehydrate-from-mutationlog.d.ts +0 -14
- package/dist/rehydrate-from-mutationlog.d.ts.map +0 -1
- package/dist/rehydrate-from-mutationlog.js +0 -72
- package/dist/rehydrate-from-mutationlog.js.map +0 -1
- package/dist/schema/MutationEvent.d.ts +0 -191
- package/dist/schema/MutationEvent.d.ts.map +0 -1
- package/dist/schema/MutationEvent.js +0 -56
- package/dist/schema/MutationEvent.js.map +0 -1
- package/dist/schema/mutations.d.ts +0 -107
- package/dist/schema/mutations.d.ts.map +0 -1
- package/dist/schema/mutations.js +0 -42
- package/dist/schema/mutations.js.map +0 -1
- package/dist/sync/client-session-sync-processor.d.ts +0 -45
- package/dist/sync/client-session-sync-processor.d.ts.map +0 -1
- package/dist/sync/client-session-sync-processor.js +0 -131
- package/dist/sync/client-session-sync-processor.js.map +0 -1
- package/dist/sync/next/test/mutation-fixtures.d.ts.map +0 -1
- package/dist/sync/next/test/mutation-fixtures.js.map +0 -1
- package/src/derived-mutations.test.ts +0 -101
- package/src/derived-mutations.ts +0 -166
- package/src/devtools/devtools-bridge.ts +0 -13
- package/src/devtools/index.ts +0 -48
- package/src/init-singleton-tables.ts +0 -24
- package/src/leader-thread/apply-mutation.ts +0 -143
- package/src/leader-thread/leader-sync-processor.ts +0 -666
- package/src/leader-thread/mutationlog.ts +0 -42
- package/src/leader-thread/pull-queue-set.ts +0 -58
- package/src/mutation.ts +0 -81
- package/src/query-info.ts +0 -78
- package/src/rehydrate-from-mutationlog.ts +0 -127
- package/src/schema/MutationEvent.ts +0 -161
- package/src/schema/mutations.ts +0 -192
- package/src/sync/client-session-sync-processor.ts +0 -207
- package/src/sync/next/test/mutation-fixtures.ts +0 -231
@@ -1,68 +1,141 @@
|
|
1
|
-
import type { HttpClient,
|
2
|
-
import { Deferred, Effect,
|
1
|
+
import type { HttpClient, Schema, Scope } from '@livestore/utils/effect'
|
2
|
+
import { Deferred, Effect, Layer, Queue, SubscriptionRef } from '@livestore/utils/effect'
|
3
3
|
|
4
|
-
import type { BootStatus,
|
4
|
+
import type { BootStatus, MakeSqliteDb, MigrationsReport, SqliteError } from '../adapter-types.js'
|
5
5
|
import { UnexpectedError } from '../adapter-types.js'
|
6
|
+
import type * as Devtools from '../devtools/mod.js'
|
6
7
|
import type { LiveStoreSchema } from '../schema/mod.js'
|
7
|
-
import {
|
8
|
-
import {
|
9
|
-
import type { InvalidPullError, IsOfflineError, SyncBackend } from '../sync/sync.js'
|
8
|
+
import { LiveStoreEvent } from '../schema/mod.js'
|
9
|
+
import type { InvalidPullError, IsOfflineError, SyncOptions } from '../sync/sync.js'
|
10
10
|
import { sql } from '../util.js'
|
11
|
-
import {
|
12
|
-
import
|
11
|
+
import { makeApplyEvent } from './apply-event.js'
|
12
|
+
import * as Eventlog from './eventlog.js'
|
13
13
|
import { bootDevtools } from './leader-worker-devtools.js'
|
14
|
-
import {
|
14
|
+
import { makeLeaderSyncProcessor } from './LeaderSyncProcessor.js'
|
15
15
|
import { recreateDb } from './recreate-db.js'
|
16
|
-
import type {
|
16
|
+
import type { ShutdownChannel } from './shutdown-channel.js'
|
17
|
+
import type {
|
18
|
+
DevtoolsOptions,
|
19
|
+
InitialBlockingSyncContext,
|
20
|
+
InitialSyncOptions,
|
21
|
+
LeaderSqliteDb,
|
22
|
+
ShutdownState,
|
23
|
+
} from './types.js'
|
17
24
|
import { LeaderThreadCtx } from './types.js'
|
18
25
|
|
26
|
+
export interface MakeLeaderThreadLayerParams {
|
27
|
+
storeId: string
|
28
|
+
syncPayload: Schema.JsonValue | undefined
|
29
|
+
clientId: string
|
30
|
+
schema: LiveStoreSchema
|
31
|
+
makeSqliteDb: MakeSqliteDb
|
32
|
+
syncOptions: SyncOptions | undefined
|
33
|
+
dbReadModel: LeaderSqliteDb
|
34
|
+
dbEventlog: LeaderSqliteDb
|
35
|
+
devtoolsOptions: DevtoolsOptions
|
36
|
+
shutdownChannel: ShutdownChannel
|
37
|
+
params?: {
|
38
|
+
localPushBatchSize?: number
|
39
|
+
backendPushBatchSize?: number
|
40
|
+
}
|
41
|
+
testing?: {
|
42
|
+
syncProcessor?: {
|
43
|
+
delays?: {
|
44
|
+
localPushProcessing?: Effect.Effect<void>
|
45
|
+
}
|
46
|
+
}
|
47
|
+
}
|
48
|
+
}
|
49
|
+
|
19
50
|
export const makeLeaderThreadLayer = ({
|
20
51
|
schema,
|
21
52
|
storeId,
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
53
|
+
clientId,
|
54
|
+
syncPayload,
|
55
|
+
makeSqliteDb,
|
56
|
+
syncOptions,
|
57
|
+
dbReadModel,
|
58
|
+
dbEventlog,
|
27
59
|
devtoolsOptions,
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
schema: LiveStoreSchema
|
33
|
-
makeSyncDb: MakeSynchronousDatabase
|
34
|
-
makeSyncBackend: Effect.Effect<SyncBackend, UnexpectedError, Scope.Scope> | undefined
|
35
|
-
db: SynchronousDatabase
|
36
|
-
dbLog: SynchronousDatabase
|
37
|
-
devtoolsOptions: DevtoolsOptions
|
38
|
-
initialSyncOptions: InitialSyncOptions | undefined
|
39
|
-
}): Layer.Layer<LeaderThreadCtx, UnexpectedError, Scope.Scope | HttpClient.HttpClient> =>
|
60
|
+
shutdownChannel,
|
61
|
+
params,
|
62
|
+
testing,
|
63
|
+
}: MakeLeaderThreadLayerParams): Layer.Layer<LeaderThreadCtx, UnexpectedError, Scope.Scope | HttpClient.HttpClient> =>
|
40
64
|
Effect.gen(function* () {
|
41
65
|
const bootStatusQueue = yield* Queue.unbounded<BootStatus>().pipe(Effect.acquireRelease(Queue.shutdown))
|
42
66
|
|
43
67
|
// TODO do more validation here than just checking the count of tables
|
44
68
|
// Either happens on initial boot or if schema changes
|
45
|
-
const
|
69
|
+
const dbEventlogMissing =
|
70
|
+
dbEventlog.select<{ count: number }>(sql`select count(*) as count from sqlite_master`)[0]!.count === 0
|
71
|
+
|
72
|
+
const dbReadModelMissing =
|
73
|
+
dbReadModel.select<{ count: number }>(sql`select count(*) as count from sqlite_master`)[0]!.count === 0
|
74
|
+
|
75
|
+
const syncBackend =
|
76
|
+
syncOptions?.backend === undefined
|
77
|
+
? undefined
|
78
|
+
: yield* syncOptions.backend({ storeId, clientId, payload: syncPayload })
|
79
|
+
|
80
|
+
if (syncBackend !== undefined) {
|
81
|
+
// We're already connecting to the sync backend concurrently
|
82
|
+
yield* syncBackend.connect.pipe(Effect.tapCauseLogPretty, Effect.forkScoped)
|
83
|
+
}
|
84
|
+
|
85
|
+
const initialBlockingSyncContext = yield* makeInitialBlockingSyncContext({
|
86
|
+
initialSyncOptions: syncOptions?.initialSyncOptions ?? { _tag: 'Skip' },
|
87
|
+
bootStatusQueue,
|
88
|
+
})
|
89
|
+
|
90
|
+
const syncProcessor = yield* makeLeaderSyncProcessor({
|
91
|
+
schema,
|
92
|
+
dbEventlogMissing,
|
93
|
+
dbEventlog,
|
94
|
+
dbReadModel,
|
95
|
+
dbReadModelMissing,
|
96
|
+
initialBlockingSyncContext,
|
97
|
+
onError: syncOptions?.onSyncError ?? 'ignore',
|
98
|
+
params: {
|
99
|
+
localPushBatchSize: params?.localPushBatchSize,
|
100
|
+
backendPushBatchSize: params?.backendPushBatchSize,
|
101
|
+
},
|
102
|
+
testing: {
|
103
|
+
delays: testing?.syncProcessor?.delays,
|
104
|
+
},
|
105
|
+
})
|
46
106
|
|
47
|
-
const
|
107
|
+
const extraIncomingMessagesQueue = yield* Queue.unbounded<Devtools.Leader.MessageToApp>().pipe(
|
108
|
+
Effect.acquireRelease(Queue.shutdown),
|
109
|
+
)
|
48
110
|
|
49
|
-
const
|
111
|
+
const devtoolsContext = devtoolsOptions.enabled
|
112
|
+
? {
|
113
|
+
enabled: true as const,
|
114
|
+
syncBackendLatch: yield* Effect.makeLatch(true),
|
115
|
+
syncBackendLatchState: yield* SubscriptionRef.make<{ latchClosed: boolean }>({ latchClosed: false }),
|
116
|
+
}
|
117
|
+
: { enabled: false as const }
|
50
118
|
|
51
|
-
const
|
119
|
+
const applyEvent = yield* makeApplyEvent({ schema, dbReadModel, dbEventlog })
|
52
120
|
|
53
121
|
const ctx = {
|
54
122
|
schema,
|
55
123
|
bootStatusQueue,
|
56
124
|
storeId,
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
125
|
+
clientId,
|
126
|
+
dbReadModel,
|
127
|
+
dbEventlog,
|
128
|
+
makeSqliteDb,
|
129
|
+
eventSchema: LiveStoreEvent.makeEventDefSchema(schema),
|
62
130
|
shutdownStateSubRef: yield* SubscriptionRef.make<ShutdownState>('running'),
|
131
|
+
shutdownChannel,
|
63
132
|
syncBackend,
|
64
133
|
syncProcessor,
|
65
|
-
|
134
|
+
applyEvent,
|
135
|
+
extraIncomingMessagesQueue,
|
136
|
+
devtools: devtoolsContext,
|
137
|
+
// State will be set during `bootLeaderThread`
|
138
|
+
initialState: {} as any as LeaderThreadCtx['Type']['initialState'],
|
66
139
|
} satisfies typeof LeaderThreadCtx.Service
|
67
140
|
|
68
141
|
// @ts-expect-error For debugging purposes
|
@@ -70,13 +143,18 @@ export const makeLeaderThreadLayer = ({
|
|
70
143
|
|
71
144
|
const layer = Layer.succeed(LeaderThreadCtx, ctx)
|
72
145
|
|
73
|
-
yield* bootLeaderThread({
|
146
|
+
ctx.initialState = yield* bootLeaderThread({
|
147
|
+
dbReadModelMissing,
|
148
|
+
initialBlockingSyncContext,
|
149
|
+
devtoolsOptions,
|
150
|
+
}).pipe(Effect.provide(layer))
|
74
151
|
|
75
152
|
return layer
|
76
153
|
}).pipe(
|
77
154
|
Effect.withSpan('@livestore/common:leader-thread:boot'),
|
78
155
|
Effect.withSpanScoped('@livestore/common:leader-thread'),
|
79
156
|
UnexpectedError.mapToUnexpectedError,
|
157
|
+
Effect.tapCauseLogPretty,
|
80
158
|
Layer.unwrapScoped,
|
81
159
|
)
|
82
160
|
|
@@ -90,7 +168,7 @@ const makeInitialBlockingSyncContext = ({
|
|
90
168
|
Effect.gen(function* () {
|
91
169
|
const ctx = {
|
92
170
|
isDone: false,
|
93
|
-
|
171
|
+
processedEvents: 0,
|
94
172
|
total: -1,
|
95
173
|
}
|
96
174
|
|
@@ -113,10 +191,10 @@ const makeInitialBlockingSyncContext = ({
|
|
113
191
|
ctx.total = remaining + processed
|
114
192
|
}
|
115
193
|
|
116
|
-
ctx.
|
194
|
+
ctx.processedEvents += processed
|
117
195
|
yield* Queue.offer(bootStatusQueue, {
|
118
196
|
stage: 'syncing',
|
119
|
-
progress: { done: ctx.
|
197
|
+
progress: { done: ctx.processedEvents, total: ctx.total },
|
120
198
|
})
|
121
199
|
|
122
200
|
if (remaining === 0 && blockingDeferred !== undefined) {
|
@@ -132,61 +210,49 @@ const makeInitialBlockingSyncContext = ({
|
|
132
210
|
* It also starts various background processes (e.g. syncing)
|
133
211
|
*/
|
134
212
|
const bootLeaderThread = ({
|
135
|
-
|
213
|
+
dbReadModelMissing,
|
136
214
|
initialBlockingSyncContext,
|
137
215
|
devtoolsOptions,
|
138
216
|
}: {
|
139
|
-
|
217
|
+
dbReadModelMissing: boolean
|
140
218
|
initialBlockingSyncContext: InitialBlockingSyncContext
|
141
219
|
devtoolsOptions: DevtoolsOptions
|
142
220
|
}): Effect.Effect<
|
143
|
-
|
221
|
+
LeaderThreadCtx['Type']['initialState'],
|
144
222
|
UnexpectedError | SqliteError | IsOfflineError | InvalidPullError,
|
145
223
|
LeaderThreadCtx | Scope.Scope | HttpClient.HttpClient
|
146
224
|
> =>
|
147
225
|
Effect.gen(function* () {
|
148
|
-
const {
|
149
|
-
|
150
|
-
yield* migrateTable({
|
151
|
-
db: dbLog,
|
152
|
-
behaviour: 'create-if-not-exists',
|
153
|
-
tableAst: mutationLogMetaTable.sqliteDef.ast,
|
154
|
-
skipMetaTable: true,
|
155
|
-
})
|
226
|
+
const { dbEventlog, bootStatusQueue, syncProcessor } = yield* LeaderThreadCtx
|
156
227
|
|
157
|
-
yield*
|
158
|
-
db: dbLog,
|
159
|
-
behaviour: 'create-if-not-exists',
|
160
|
-
tableAst: syncStatusTable.sqliteDef.ast,
|
161
|
-
skipMetaTable: true,
|
162
|
-
})
|
228
|
+
yield* Eventlog.initEventlogDb(dbEventlog)
|
163
229
|
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
{},
|
171
|
-
)
|
172
|
-
|
173
|
-
const dbReady = yield* Deferred.make<void>()
|
174
|
-
|
175
|
-
// We're already starting pulling from the sync backend concurrently but wait until the db is ready before
|
176
|
-
// processing any incoming mutations
|
177
|
-
yield* syncProcessor.boot({ dbReady })
|
178
|
-
|
179
|
-
if (dbMissing) {
|
180
|
-
yield* recreateDb
|
230
|
+
let migrationsReport: MigrationsReport
|
231
|
+
if (dbReadModelMissing) {
|
232
|
+
const recreateResult = yield* recreateDb
|
233
|
+
migrationsReport = recreateResult.migrationsReport
|
234
|
+
} else {
|
235
|
+
migrationsReport = { migrations: [] }
|
181
236
|
}
|
182
237
|
|
183
|
-
|
238
|
+
// NOTE the sync processor depends on the dbs being initialized properly
|
239
|
+
const { initialLeaderHead } = yield* syncProcessor.boot
|
184
240
|
|
185
241
|
if (initialBlockingSyncContext.blockingDeferred !== undefined) {
|
186
|
-
|
242
|
+
// Provides a syncing status right away before the first pull response comes in
|
243
|
+
yield* Queue.offer(bootStatusQueue, {
|
244
|
+
stage: 'syncing',
|
245
|
+
progress: { done: 0, total: -1 },
|
246
|
+
})
|
247
|
+
|
248
|
+
yield* initialBlockingSyncContext.blockingDeferred.pipe(
|
249
|
+
Effect.withSpan('@livestore/common:leader-thread:initial-sync-blocking'),
|
250
|
+
)
|
187
251
|
}
|
188
252
|
|
189
253
|
yield* Queue.offer(bootStatusQueue, { stage: 'done' })
|
190
254
|
|
191
255
|
yield* bootDevtools(devtoolsOptions).pipe(Effect.tapCauseLogPretty, Effect.forkScoped)
|
256
|
+
|
257
|
+
return { migrationsReport, leaderHead: initialLeaderHead }
|
192
258
|
})
|
package/src/leader-thread/mod.ts
CHANGED
@@ -2,85 +2,92 @@ import { casesHandled } from '@livestore/utils'
|
|
2
2
|
import type { HttpClient } from '@livestore/utils/effect'
|
3
3
|
import { Effect, Queue } from '@livestore/utils/effect'
|
4
4
|
|
5
|
-
import type { InvalidPullError, IsOfflineError, MigrationHooks, SqliteError } from '../index.js'
|
6
|
-
import {
|
5
|
+
import type { InvalidPullError, IsOfflineError, MigrationHooks, MigrationsReport, SqliteError } from '../index.js'
|
6
|
+
import { migrateDb, rehydrateFromEventlog, UnexpectedError } from '../index.js'
|
7
7
|
import { configureConnection } from './connection.js'
|
8
8
|
import { LeaderThreadCtx } from './types.js'
|
9
9
|
|
10
10
|
export const recreateDb: Effect.Effect<
|
11
|
-
|
11
|
+
{ migrationsReport: MigrationsReport },
|
12
12
|
UnexpectedError | SqliteError | IsOfflineError | InvalidPullError,
|
13
13
|
LeaderThreadCtx | HttpClient.HttpClient
|
14
14
|
> = Effect.gen(function* () {
|
15
|
-
const {
|
15
|
+
const { dbReadModel, dbEventlog, schema, bootStatusQueue, applyEvent } = yield* LeaderThreadCtx
|
16
16
|
|
17
17
|
const migrationOptions = schema.migrationOptions
|
18
|
+
let migrationsReport: MigrationsReport
|
18
19
|
|
19
20
|
yield* Effect.addFinalizer(
|
20
21
|
Effect.fn('recreateDb:finalizer')(function* (ex) {
|
21
|
-
if (ex._tag === 'Failure')
|
22
|
+
if (ex._tag === 'Failure') dbReadModel.destroy()
|
22
23
|
}),
|
23
24
|
)
|
24
25
|
|
25
26
|
// NOTE to speed up the operations below, we're creating a temporary in-memory database
|
26
27
|
// and later we'll overwrite the persisted database with the new data
|
27
|
-
|
28
|
-
yield*
|
28
|
+
// TODO bring back this optimization
|
29
|
+
// const tmpDb = yield* makeSqliteDb({ _tag: 'in-memory' })
|
30
|
+
const tmpDb = dbReadModel
|
31
|
+
yield* configureConnection(tmpDb, { foreignKeys: true })
|
29
32
|
|
30
33
|
const initDb = (hooks: Partial<MigrationHooks> | undefined) =>
|
31
34
|
Effect.gen(function* () {
|
32
|
-
yield* Effect.tryAll(() => hooks?.init?.(
|
35
|
+
yield* Effect.tryAll(() => hooks?.init?.(tmpDb)).pipe(UnexpectedError.mapToUnexpectedError)
|
33
36
|
|
34
|
-
yield* migrateDb({
|
35
|
-
db:
|
37
|
+
const migrationsReport = yield* migrateDb({
|
38
|
+
db: tmpDb,
|
36
39
|
schema,
|
37
40
|
onProgress: ({ done, total }) =>
|
38
41
|
Queue.offer(bootStatusQueue, { stage: 'migrating', progress: { done, total } }),
|
39
42
|
})
|
40
43
|
|
41
|
-
|
44
|
+
yield* Effect.tryAll(() => hooks?.pre?.(tmpDb)).pipe(UnexpectedError.mapToUnexpectedError)
|
42
45
|
|
43
|
-
|
44
|
-
|
45
|
-
return tmpSyncDb
|
46
|
+
return { migrationsReport, tmpDb }
|
46
47
|
})
|
47
48
|
|
48
49
|
switch (migrationOptions.strategy) {
|
49
|
-
case 'from-
|
50
|
+
case 'from-eventlog': {
|
50
51
|
const hooks = migrationOptions.hooks
|
51
|
-
const
|
52
|
+
const initResult = yield* initDb(hooks)
|
53
|
+
|
54
|
+
migrationsReport = initResult.migrationsReport
|
52
55
|
|
53
|
-
yield*
|
54
|
-
db:
|
55
|
-
|
56
|
+
yield* rehydrateFromEventlog({
|
57
|
+
// db: initResult.tmpDb,
|
58
|
+
dbEventlog,
|
56
59
|
schema,
|
57
|
-
|
60
|
+
applyEvent,
|
58
61
|
onProgress: ({ done, total }) =>
|
59
62
|
Queue.offer(bootStatusQueue, { stage: 'rehydrating', progress: { done, total } }),
|
60
63
|
})
|
61
64
|
|
62
|
-
yield* Effect.tryAll(() => hooks?.post?.(
|
65
|
+
yield* Effect.tryAll(() => hooks?.post?.(initResult.tmpDb)).pipe(UnexpectedError.mapToUnexpectedError)
|
63
66
|
|
64
67
|
break
|
65
68
|
}
|
66
69
|
case 'hard-reset': {
|
67
70
|
const hooks = migrationOptions.hooks
|
68
|
-
const
|
71
|
+
const initResult = yield* initDb(hooks)
|
72
|
+
|
73
|
+
migrationsReport = initResult.migrationsReport
|
69
74
|
|
70
75
|
// The database is migrated but empty now, so nothing else to do
|
71
76
|
|
72
|
-
yield* Effect.tryAll(() => hooks?.post?.(
|
77
|
+
yield* Effect.tryAll(() => hooks?.post?.(initResult.tmpDb)).pipe(UnexpectedError.mapToUnexpectedError)
|
73
78
|
|
74
79
|
break
|
75
80
|
}
|
76
81
|
case 'manual': {
|
77
|
-
const oldDbData =
|
82
|
+
const oldDbData = dbReadModel.export()
|
83
|
+
|
84
|
+
migrationsReport = { migrations: [] }
|
78
85
|
|
79
86
|
const newDbData = yield* Effect.tryAll(() => migrationOptions.migrate(oldDbData)).pipe(
|
80
87
|
UnexpectedError.mapToUnexpectedError,
|
81
88
|
)
|
82
89
|
|
83
|
-
|
90
|
+
tmpDb.import(newDbData)
|
84
91
|
|
85
92
|
// TODO validate schema
|
86
93
|
|
@@ -91,17 +98,21 @@ export const recreateDb: Effect.Effect<
|
|
91
98
|
}
|
92
99
|
}
|
93
100
|
|
101
|
+
// TODO bring back
|
94
102
|
// Import the temporary in-memory database into the persistent database
|
95
|
-
yield* Effect.sync(() => db.import(
|
96
|
-
|
97
|
-
)
|
103
|
+
// yield* Effect.sync(() => db.import(tmpDb)).pipe(
|
104
|
+
// Effect.withSpan('@livestore/common:leader-thread:recreateDb:import'),
|
105
|
+
// )
|
98
106
|
|
99
107
|
// TODO maybe bring back re-using this initial snapshot to avoid calling `.export()` again
|
100
108
|
// We've disabled this for now as it made the code too complex, as we often run syncing right after
|
101
109
|
// so the snapshot is no longer up to date
|
102
|
-
// const snapshotFromTmpDb =
|
110
|
+
// const snapshotFromTmpDb = tmpDb.export()
|
111
|
+
|
112
|
+
// TODO bring back
|
113
|
+
// tmpDb.close()
|
103
114
|
|
104
|
-
|
115
|
+
return { migrationsReport }
|
105
116
|
}).pipe(
|
106
117
|
Effect.scoped, // NOTE we're closing the scope here so finalizers are called when the effect is done
|
107
118
|
Effect.withSpan('@livestore/common:leader-thread:recreateDb'),
|
@@ -1,11 +1,9 @@
|
|
1
1
|
import type { WebChannel } from '@livestore/utils/effect'
|
2
2
|
import { Schema } from '@livestore/utils/effect'
|
3
3
|
|
4
|
-
import { IntentionalShutdownCause } from '../index.js'
|
4
|
+
import { IntentionalShutdownCause, UnexpectedError } from '../index.js'
|
5
5
|
|
6
|
-
export class
|
7
|
-
|
8
|
-
export class All extends Schema.Union(IntentionalShutdownCause, DedicatedWorkerDisconnectBroadcast) {}
|
6
|
+
export class All extends Schema.Union(IntentionalShutdownCause, UnexpectedError) {}
|
9
7
|
|
10
8
|
/**
|
11
9
|
* Used internally by an adapter to shutdown gracefully.
|