@effect-agent/storage-sqlite 0.1.0-beta.39 → 0.1.0-beta.41
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/index.d.mts +10 -2
- package/dist/index.mjs +350 -94
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -4
- package/src/index.ts +2 -0
- package/src/migrations.ts +9 -68
- package/src/sqlite-activity-store.ts +503 -0
- package/src/sqlite-memory-store.ts +7 -0
package/dist/index.d.mts
CHANGED
|
@@ -1,11 +1,19 @@
|
|
|
1
1
|
import { a as SqliteFenceRejected, c as SqliteStorageCorruptionError, d as SqliteStorageFailpointLocation, f as SqliteWriteContention, i as SqliteCheckpointConflict, l as SqliteStorageError, n as SqliteStorageFailpointHandler, o as SqliteLedgerError, r as SqliteAppendConflict, s as SqliteStorageCompatibilityError, t as SqliteStorageFailpoint, u as SqliteStorageFailpointError } from "./sqlite-storage-failpoint-Cr0SXflP.mjs";
|
|
2
|
-
import { ScheduleStore, SourcePartition, SubmissionLedger, SubscriptionError, SubscriptionStore, ThreadStore, ThreadStoreError } from "@effect-agent/thread";
|
|
2
|
+
import { ActivityMutationFailpoint, ActivityMutationFailure, ActivityProcessorStore, ActivityStoreError, ScheduleStore, SourcePartition, SubmissionLedger, SubscriptionError, SubscriptionStore, ThreadStore, ThreadStoreError } from "@effect-agent/thread";
|
|
3
3
|
import { Context, Crypto, Effect, Layer, Schema } from "effect";
|
|
4
4
|
import { SqliteMigrator } from "@effect/sql-sqlite-node";
|
|
5
5
|
import * as SqlClientService from "effect/unstable/sql/SqlClient";
|
|
6
|
+
import { SqliteMemoryInitializationError, memoryReaderLayer, memoryStoreLayer, memoryStoreLayerWithFailpoints } from "@effect-agent/thread/sql-memory";
|
|
6
7
|
//#region src/migrations.d.ts
|
|
7
8
|
declare const CurrentSqliteStorageVersion = 7;
|
|
8
9
|
//#endregion
|
|
10
|
+
//#region src/sqlite-activity-store.d.ts
|
|
11
|
+
type SqliteActivityInitializationError = ActivityStoreError | ActivityMutationFailure;
|
|
12
|
+
/** SQLite activity progress with mutation failpoints kept injectable for recovery tests. */
|
|
13
|
+
declare const activityProcessorStoreLayerWithFailpoints: Layer.Layer<ActivityProcessorStore, SqliteActivityInitializationError, SqlClientService.SqlClient | ActivityMutationFailpoint>;
|
|
14
|
+
/** SQLite activity progress with the production no-op mutation failpoint. */
|
|
15
|
+
declare const activityProcessorStoreLayer: Layer.Layer<ActivityProcessorStore, SqliteActivityInitializationError, SqlClientService.SqlClient>;
|
|
16
|
+
//#endregion
|
|
9
17
|
//#region src/sqlite-storage-config.d.ts
|
|
10
18
|
declare const SqliteStorageConfigValue_base: Schema.Class<SqliteStorageConfigValue, Schema.Struct<{
|
|
11
19
|
readonly observationPollInterval: Schema.Int;
|
|
@@ -96,5 +104,5 @@ declare const scheduleStoreLayer: Layer.Layer<ScheduleStore, SqliteStorageInitia
|
|
|
96
104
|
//#region src/sqlite-subscription-store.d.ts
|
|
97
105
|
declare const subscriptionStoreLayer: (partition: SourcePartition) => Layer.Layer<SubscriptionStore, SqliteStorageInitializationError | SubscriptionError, SqliteStorageConfig | SqliteStorageFailpoint | SqlClientService.SqlClient>;
|
|
98
106
|
//#endregion
|
|
99
|
-
export { CurrentSqliteStorageVersion, SqliteAppendConflict, SqliteCheckpointConflict, SqliteFenceRejected, SqliteLedgerError, SqliteStorageCompatibilityError, SqliteStorageConfig, SqliteStorageConfigValue, SqliteStorageCorruptionError, SqliteStorageError, SqliteStorageFailpoint, SqliteStorageFailpointError, SqliteStorageFailpointHandler, SqliteStorageFailpointLocation, SqliteStorageInitializationError, SqliteStorageOptions, SqliteWriteContention, layer, ledgerLayer, observationOffsetAt, scheduleStoreLayer, storageConfigLayer, storageFailpointLayer, submissionLedgerLayer, subscriptionStoreLayer, threadStoreLayer };
|
|
107
|
+
export { CurrentSqliteStorageVersion, SqliteActivityInitializationError, SqliteAppendConflict, SqliteCheckpointConflict, SqliteFenceRejected, SqliteLedgerError, type SqliteMemoryInitializationError, SqliteStorageCompatibilityError, SqliteStorageConfig, SqliteStorageConfigValue, SqliteStorageCorruptionError, SqliteStorageError, SqliteStorageFailpoint, SqliteStorageFailpointError, SqliteStorageFailpointHandler, SqliteStorageFailpointLocation, SqliteStorageInitializationError, SqliteStorageOptions, SqliteWriteContention, activityProcessorStoreLayer, activityProcessorStoreLayerWithFailpoints, layer, ledgerLayer, memoryReaderLayer, memoryStoreLayer, memoryStoreLayerWithFailpoints, observationOffsetAt, scheduleStoreLayer, storageConfigLayer, storageFailpointLayer, submissionLedgerLayer, subscriptionStoreLayer, threadStoreLayer };
|
|
100
108
|
//# sourceMappingURL=index.d.mts.map
|