@livestore/utils 0.0.56-dev.3 → 0.0.57-dev.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.
|
@@ -2,9 +2,9 @@ import type { ParseResult } from '@effect/schema';
|
|
|
2
2
|
import type { Scope } from 'effect';
|
|
3
3
|
import { Deferred, Effect, Either, Queue, Stream } from 'effect';
|
|
4
4
|
import * as Schema from './Schema/index.js';
|
|
5
|
-
export type WebChannel<MsgIn, MsgOut> = {
|
|
6
|
-
send: (a: MsgOut) => Effect.Effect<void, ParseResult.ParseError>;
|
|
7
|
-
listen: Stream.Stream<Either.Either<MsgIn, ParseResult.ParseError
|
|
5
|
+
export type WebChannel<MsgIn, MsgOut, E = never> = {
|
|
6
|
+
send: (a: MsgOut) => Effect.Effect<void, ParseResult.ParseError | E>;
|
|
7
|
+
listen: Stream.Stream<Either.Either<MsgIn, ParseResult.ParseError>, E>;
|
|
8
8
|
closedDeferred: Deferred.Deferred<void>;
|
|
9
9
|
};
|
|
10
10
|
export declare const broadcastChannel: <MsgIn, MsgOut, MsgInEncoded, MsgOutEncoded>({ channelName, listenSchema, sendSchema, }: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WebChannel.d.ts","sourceRoot":"","sources":["../../src/effect/WebChannel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AACjD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAA;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAEhE,OAAO,KAAK,MAAM,MAAM,mBAAmB,CAAA;AAE3C,MAAM,MAAM,UAAU,CAAC,KAAK,EAAE,MAAM,IAAI;
|
|
1
|
+
{"version":3,"file":"WebChannel.d.ts","sourceRoot":"","sources":["../../src/effect/WebChannel.ts"],"names":[],"mappings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AK,EAAE,YAAY,CAAC,CAAA;IAChD,UAAU,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAA;CACjD,KAAG,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,KAAK,EAAE,MAAM,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,CAeT,CAAA;AAEtD,eAAO,MAAM,kBAAkB,GAAI,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,aAAa,uCAI1E;IACD,IAAI,EAAE,WAAW,CAAA;IACjB,YAAY,EAAE,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,YAAY,CAAC,CAAA;IAChD,UAAU,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAA;CACjD,KAAG,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,KAAK,EAAE,MAAM,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,CAmBJ,CAAA;AAE3D,eAAO,MAAM,iBAAiB,GAAI,KAAK,EAAE,MAAM,OAAK,MAAM,CAAC,MAAM,CAC/D;IAAE,UAAU,EAAE,UAAU,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;IAAC,SAAS,EAAE,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAAC,WAAW,EAAE,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;CAAE,EAC1G,KAAK,EACL,KAAK,CAAC,KAAK,CAeT,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@livestore/utils",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.57-dev.0",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -36,27 +36,27 @@
|
|
|
36
36
|
"msgpackr": "^1.11.0",
|
|
37
37
|
"otel-websocket-exporter": "^0.0.29",
|
|
38
38
|
"pretty-bytes": "^6.1.1",
|
|
39
|
-
"effect-db-schema": "0.0.
|
|
39
|
+
"effect-db-schema": "0.0.57-dev.0"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
|
-
"@effect/experimental": "^0.
|
|
43
|
-
"@effect/opentelemetry": "^0.
|
|
44
|
-
"@effect/platform": "^0.
|
|
45
|
-
"@effect/platform-browser": "^0.
|
|
46
|
-
"@effect/schema": "^0.
|
|
42
|
+
"@effect/experimental": "^0.23.6",
|
|
43
|
+
"@effect/opentelemetry": "^0.36.0",
|
|
44
|
+
"@effect/platform": "^0.62.4",
|
|
45
|
+
"@effect/platform-browser": "^0.41.4",
|
|
46
|
+
"@effect/schema": "^0.71.3",
|
|
47
47
|
"@opentelemetry/api": "^1.9.0",
|
|
48
|
-
"effect": "^3.
|
|
48
|
+
"effect": "^3.7.0"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
|
-
"@effect/experimental": "0.
|
|
52
|
-
"@effect/opentelemetry": "0.
|
|
53
|
-
"@effect/platform": "0.
|
|
54
|
-
"@effect/platform-browser": "0.
|
|
55
|
-
"@effect/schema": "0.
|
|
51
|
+
"@effect/experimental": "0.24.0",
|
|
52
|
+
"@effect/opentelemetry": "0.36.0",
|
|
53
|
+
"@effect/platform": "0.63.0",
|
|
54
|
+
"@effect/platform-browser": "0.42.0",
|
|
55
|
+
"@effect/schema": "0.72.0",
|
|
56
56
|
"@opentelemetry/api": "^1.9.0",
|
|
57
57
|
"@types/node": "^22.0.0",
|
|
58
58
|
"@types/web": "^0.0.153",
|
|
59
|
-
"effect": "3.
|
|
59
|
+
"effect": "3.7.0",
|
|
60
60
|
"vitest": "^2.0.4"
|
|
61
61
|
},
|
|
62
62
|
"publishConfig": {
|
package/src/effect/WebChannel.ts
CHANGED
|
@@ -4,9 +4,9 @@ import { Deferred, Effect, Either, Queue, Stream } from 'effect'
|
|
|
4
4
|
|
|
5
5
|
import * as Schema from './Schema/index.js'
|
|
6
6
|
|
|
7
|
-
export type WebChannel<MsgIn, MsgOut> = {
|
|
8
|
-
send: (a: MsgOut) => Effect.Effect<void, ParseResult.ParseError>
|
|
9
|
-
listen: Stream.Stream<Either.Either<MsgIn, ParseResult.ParseError
|
|
7
|
+
export type WebChannel<MsgIn, MsgOut, E = never> = {
|
|
8
|
+
send: (a: MsgOut) => Effect.Effect<void, ParseResult.ParseError | E>
|
|
9
|
+
listen: Stream.Stream<Either.Either<MsgIn, ParseResult.ParseError>, E>
|
|
10
10
|
closedDeferred: Deferred.Deferred<void>
|
|
11
11
|
}
|
|
12
12
|
|