@streamsy/core 0.2.1 → 0.5.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.
@@ -0,0 +1,36 @@
1
+ import { _ as StreamsWriter, dt as StreamId, g as StreamsReader, m as StorageCapabilities, r as Storage, rt as ChangeSnapshot } from "../owner-records-BV5Un5R0.js";
2
+ import { M as MemoryOptions, N as ProtocolOptions } from "../index-C26ncp7Y.js";
3
+ import { Context, Effect, Layer } from "effect";
4
+ interface StorageContractOptions {
5
+ readonly name: string;
6
+ readonly layer: Layer.Layer<Storage>;
7
+ readonly expected: StorageCapabilities;
8
+ /** The Layer also provides `CommitBoundary` and the internal owner records that projections need. */
9
+ readonly ownerRecords?: boolean;
10
+ }
11
+ export declare const StorageContract: {
12
+ run(options: StorageContractOptions): void;
13
+ /** The configured memory suite must exercise each shipped capability value. */
14
+ assertModes(configurations: ReadonlyArray<StorageCapabilities>): void;
15
+ };
16
+ /** One selected attempt per decorator; "after" injects only if that mutation applies. */
17
+ export declare function faultyStorage(source: Layer.Layer<Storage>, options: {
18
+ readonly failOn: number;
19
+ readonly when: "before" | "after";
20
+ }): Layer.Layer<Storage>;
21
+ declare const StreamsTest_base: Context.ServiceClass<StreamsTest, "@streamsy/core/StreamsTest", {
22
+ readonly storage: typeof Storage.Service;
23
+ readonly subscribers: Effect.Effect<number>;
24
+ readonly snapshot: Effect.Effect<{
25
+ readonly id: StreamId;
26
+ readonly value: ChangeSnapshot;
27
+ }>;
28
+ }>;
29
+ export declare class StreamsTest extends StreamsTest_base {}
30
+ /** Real protocol and memory, with deterministic observation at the scoped changes boundary. */
31
+ export declare const layerTest: (options?: MemoryOptions & ProtocolOptions) => Layer.Layer<StreamsReader | StreamsTest | StreamsWriter, never, never>;
32
+ /** An unexpected success stays a failure so the enclosing test cannot pass. */
33
+ export declare const expectFailureTag: <A, E extends {
34
+ readonly _tag: string;
35
+ }, R>(effect: Effect.Effect<A, E, R>, tag: E["_tag"]) => Effect.Effect<E, A, R>;
36
+ export type { StorageContractOptions };