@streamsy/core 0.2.0 → 0.4.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/LICENSE +21 -0
- package/README.md +139 -0
- package/dist/cursor-generator-CGz1TO_N.js +13 -0
- package/dist/http/index.d.ts +2 -0
- package/dist/http/index.js +3 -0
- package/dist/http-EnNOUsIK.js +69 -0
- package/dist/index-CFv8vZvy.d.ts +513 -0
- package/dist/index.d.ts +3 -792
- package/dist/index.js +109 -3336
- package/dist/internal/index.d.ts +22 -0
- package/dist/internal/index.js +3 -0
- package/dist/layer-D8ybaCL2.js +340 -0
- package/dist/layer-KvknRFUT.js +656 -0
- package/dist/owner-BQzMpfC1.js +36 -0
- package/dist/owner-records-CX6yU28i.js +5 -0
- package/dist/owner-records-QDlssl__.d.ts +2963 -0
- package/dist/program-DJ8NpHIf.js +814 -0
- package/dist/protocol/index.d.ts +8 -0
- package/dist/protocol/index.js +16 -0
- package/dist/remote/index.d.ts +23 -0
- package/dist/remote/index.js +428 -0
- package/dist/rolldown-runtime-D7D4PA-g.js +13 -0
- package/dist/streamsy-OjRubIPC.js +829 -0
- package/dist/testing/index.d.ts +44 -0
- package/dist/testing/index.js +757 -0
- package/package.json +50 -13
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { _ as StreamsWriter, dt as StreamId, g as StreamsReader, m as StorageCapabilities, r as Storage, rt as ChangeSnapshot } from "../owner-records-QDlssl__.js";
|
|
2
|
+
import { M as MemoryOptions, N as ProtocolOptions } from "../index-CFv8vZvy.js";
|
|
3
|
+
import { Context, Effect, Layer } from "effect";
|
|
4
|
+
//#region src/testing/storage-contract.d.ts
|
|
5
|
+
interface StorageContractOptions {
|
|
6
|
+
readonly name: string;
|
|
7
|
+
readonly layer: Layer.Layer<Storage>;
|
|
8
|
+
readonly expected: StorageCapabilities;
|
|
9
|
+
/** The Layer also provides `CommitBoundary` and the internal owner records that projections need. */
|
|
10
|
+
readonly ownerRecords?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare const StorageContract: {
|
|
13
|
+
run(options: StorageContractOptions): void;
|
|
14
|
+
/** The configured memory suite must exercise each shipped capability value. */
|
|
15
|
+
assertModes(configurations: ReadonlyArray<StorageCapabilities>): void;
|
|
16
|
+
};
|
|
17
|
+
//#endregion
|
|
18
|
+
//#region src/testing/fault-injection.d.ts
|
|
19
|
+
/** One selected attempt per decorator; "after" injects only if that mutation applies. */
|
|
20
|
+
export declare function faultyStorage(source: Layer.Layer<Storage>, options: {
|
|
21
|
+
readonly failOn: number;
|
|
22
|
+
readonly when: "before" | "after";
|
|
23
|
+
}): Layer.Layer<Storage>;
|
|
24
|
+
//#endregion
|
|
25
|
+
//#region src/testing/streams-test.d.ts
|
|
26
|
+
declare const StreamsTest_base: Context.ServiceClass<StreamsTest, "@streamsy/core/StreamsTest", {
|
|
27
|
+
readonly storage: typeof Storage.Service;
|
|
28
|
+
readonly subscribers: Effect.Effect<number>;
|
|
29
|
+
readonly snapshot: Effect.Effect<{
|
|
30
|
+
readonly id: StreamId;
|
|
31
|
+
readonly value: ChangeSnapshot;
|
|
32
|
+
}>;
|
|
33
|
+
}>;
|
|
34
|
+
export declare class StreamsTest extends StreamsTest_base {}
|
|
35
|
+
/** Real protocol and memory, with deterministic observation at the scoped changes boundary. */
|
|
36
|
+
export declare const layerTest: (options?: MemoryOptions & ProtocolOptions) => Layer.Layer<StreamsReader | StreamsTest | StreamsWriter, never, never>;
|
|
37
|
+
//#endregion
|
|
38
|
+
//#region src/testing/expect-failure-tag.d.ts
|
|
39
|
+
/** An unexpected success stays a failure so the enclosing test cannot pass. */
|
|
40
|
+
export declare const expectFailureTag: <A, E extends {
|
|
41
|
+
readonly _tag: string;
|
|
42
|
+
}, R>(effect: Effect.Effect<A, E, R>, tag: E["_tag"]) => Effect.Effect<E, A, R>;
|
|
43
|
+
//#endregion
|
|
44
|
+
export type { StorageContractOptions };
|