reactor-effect-client 0.7.0 → 0.8.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/NOTICE +7 -2
- package/README.md +103 -141
- package/dist/Coordinator.d.ts +382 -0
- package/dist/Coordinator.d.ts.map +1 -0
- package/dist/Coordinator.js +732 -0
- package/dist/Coordinator.js.map +1 -0
- package/dist/H3.d.ts +159 -0
- package/dist/H3.d.ts.map +1 -0
- package/dist/H3.js +21 -0
- package/dist/H3.js.map +1 -0
- package/dist/H3Source.d.ts +93 -0
- package/dist/H3Source.d.ts.map +1 -0
- package/dist/H3Source.js +401 -0
- package/dist/H3Source.js.map +1 -0
- package/dist/LocalSource.d.ts +68 -0
- package/dist/LocalSource.d.ts.map +1 -0
- package/dist/LocalSource.js +354 -0
- package/dist/LocalSource.js.map +1 -0
- package/dist/Media.d.ts +106 -0
- package/dist/Media.d.ts.map +1 -0
- package/dist/Media.js +16 -0
- package/dist/Media.js.map +1 -0
- package/dist/Peer.d.ts +134 -0
- package/dist/Peer.d.ts.map +1 -0
- package/dist/Peer.js +57 -0
- package/dist/Peer.js.map +1 -0
- package/dist/Playout.d.ts +724 -0
- package/dist/Playout.d.ts.map +1 -0
- package/dist/Playout.js +28 -0
- package/dist/Playout.js.map +1 -0
- package/dist/Reactor.d.ts +135 -0
- package/dist/Reactor.d.ts.map +1 -0
- package/dist/Reactor.js +158 -0
- package/dist/Reactor.js.map +1 -0
- package/dist/ReactorError.d.ts +331 -0
- package/dist/ReactorError.d.ts.map +1 -0
- package/dist/ReactorError.js +316 -0
- package/dist/ReactorError.js.map +1 -0
- package/dist/ReactorTest.d.ts +383 -0
- package/dist/ReactorTest.d.ts.map +1 -0
- package/dist/ReactorTest.js +317 -0
- package/dist/ReactorTest.js.map +1 -0
- package/dist/Session.d.ts +314 -0
- package/dist/Session.d.ts.map +1 -0
- package/dist/Session.js +51 -0
- package/dist/Session.js.map +1 -0
- package/dist/index.d.ts +12 -22
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -11
- package/dist/index.js.map +1 -1
- package/dist/internal/correlator.d.ts +46 -0
- package/dist/internal/correlator.d.ts.map +1 -0
- package/dist/internal/correlator.js +150 -0
- package/dist/internal/correlator.js.map +1 -0
- package/dist/internal/deadline.d.ts +24 -0
- package/dist/internal/deadline.d.ts.map +1 -0
- package/dist/internal/deadline.js +44 -0
- package/dist/internal/deadline.js.map +1 -0
- package/dist/{h3/_internal/contracts.d.ts → internal/h3/commands.d.ts} +39 -33
- package/dist/internal/h3/commands.d.ts.map +1 -0
- package/dist/internal/h3/commands.js +128 -0
- package/dist/internal/h3/commands.js.map +1 -0
- package/dist/{h3 → internal/h3}/messages.d.ts +16 -11
- package/dist/internal/h3/messages.d.ts.map +1 -0
- package/dist/{h3 → internal/h3}/messages.js +19 -31
- package/dist/internal/h3/messages.js.map +1 -0
- package/dist/internal/h3/operations.d.ts +145 -0
- package/dist/internal/h3/operations.d.ts.map +1 -0
- package/dist/internal/h3/operations.js +284 -0
- package/dist/internal/h3/operations.js.map +1 -0
- package/dist/{h3 → internal/h3}/profile.d.ts +63 -65
- package/dist/internal/h3/profile.d.ts.map +1 -0
- package/dist/{h3 → internal/h3}/profile.js +39 -39
- package/dist/internal/h3/profile.js.map +1 -0
- package/dist/internal/h3/provider.d.ts +14 -0
- package/dist/internal/h3/provider.d.ts.map +1 -0
- package/dist/internal/h3/provider.js +672 -0
- package/dist/internal/h3/provider.js.map +1 -0
- package/dist/internal/h3/references.d.ts +68 -0
- package/dist/internal/h3/references.d.ts.map +1 -0
- package/dist/internal/h3/references.js +339 -0
- package/dist/internal/h3/references.js.map +1 -0
- package/dist/internal/h3/request.d.ts +56 -0
- package/dist/internal/h3/request.d.ts.map +1 -0
- package/dist/internal/h3/request.js +70 -0
- package/dist/internal/h3/request.js.map +1 -0
- package/dist/internal/h3/state.d.ts +120 -0
- package/dist/internal/h3/state.d.ts.map +1 -0
- package/dist/internal/h3/state.js +270 -0
- package/dist/internal/h3/state.js.map +1 -0
- package/dist/{Submission.d.ts → internal/h3/submission.d.ts} +1 -3
- package/dist/internal/h3/submission.d.ts.map +1 -0
- package/dist/{Submission.js → internal/h3/submission.js} +1 -9
- package/dist/internal/h3/submission.js.map +1 -0
- package/dist/internal/hub.d.ts +32 -0
- package/dist/internal/hub.d.ts.map +1 -0
- package/dist/internal/hub.js +92 -0
- package/dist/internal/hub.js.map +1 -0
- package/dist/internal/playout/errors.d.ts +51 -0
- package/dist/internal/playout/errors.d.ts.map +1 -0
- package/dist/internal/playout/errors.js +40 -0
- package/dist/internal/playout/errors.js.map +1 -0
- package/dist/internal/playout/policy.d.ts +559 -0
- package/dist/internal/playout/policy.d.ts.map +1 -0
- package/dist/internal/playout/policy.js +2338 -0
- package/dist/internal/playout/policy.js.map +1 -0
- package/dist/internal/playout/runtime.d.ts +28 -0
- package/dist/internal/playout/runtime.d.ts.map +1 -0
- package/dist/internal/playout/runtime.js +766 -0
- package/dist/internal/playout/runtime.js.map +1 -0
- package/dist/internal/playout/tag.d.ts +14 -0
- package/dist/internal/playout/tag.d.ts.map +1 -0
- package/dist/internal/playout/tag.js +43 -0
- package/dist/internal/playout/tag.js.map +1 -0
- package/dist/internal/proto/reactor_wire/v1/common_pb.d.ts +55 -0
- package/dist/internal/proto/reactor_wire/v1/common_pb.d.ts.map +1 -0
- package/dist/internal/proto/reactor_wire/v1/common_pb.js +42 -0
- package/dist/internal/proto/reactor_wire/v1/common_pb.js.map +1 -0
- package/dist/internal/proto/reactor_wire/v1/control_pb.d.ts +160 -0
- package/dist/internal/proto/reactor_wire/v1/control_pb.d.ts.map +1 -0
- package/dist/internal/proto/reactor_wire/v1/control_pb.js +21 -0
- package/dist/internal/proto/reactor_wire/v1/control_pb.js.map +1 -0
- package/dist/internal/proto/reactor_wire/v1/data_pb.d.ts +89 -0
- package/dist/internal/proto/reactor_wire/v1/data_pb.d.ts.map +1 -0
- package/dist/internal/proto/reactor_wire/v1/data_pb.js +20 -0
- package/dist/internal/proto/reactor_wire/v1/data_pb.js.map +1 -0
- package/dist/internal/proto/reactor_wire/v1/model_pb.d.ts +85 -0
- package/dist/internal/proto/reactor_wire/v1/model_pb.d.ts.map +1 -0
- package/dist/internal/proto/reactor_wire/v1/model_pb.js +24 -0
- package/dist/internal/proto/reactor_wire/v1/model_pb.js.map +1 -0
- package/dist/internal/proto/reactor_wire/v1/platform_pb.d.ts +190 -0
- package/dist/internal/proto/reactor_wire/v1/platform_pb.d.ts.map +1 -0
- package/dist/internal/proto/reactor_wire/v1/platform_pb.js +54 -0
- package/dist/internal/proto/reactor_wire/v1/platform_pb.js.map +1 -0
- package/dist/internal/proto/reactor_wire/v1/track_pb.d.ts +88 -0
- package/dist/internal/proto/reactor_wire/v1/track_pb.d.ts.map +1 -0
- package/dist/internal/proto/reactor_wire/v1/track_pb.js +33 -0
- package/dist/internal/proto/reactor_wire/v1/track_pb.js.map +1 -0
- package/dist/internal/queue.d.ts +4 -0
- package/dist/internal/queue.d.ts.map +1 -0
- package/dist/{_internal → internal}/queue.js +0 -9
- package/dist/internal/queue.js.map +1 -0
- package/dist/internal/reactorTest/coordinator.d.ts +5 -0
- package/dist/internal/reactorTest/coordinator.d.ts.map +1 -0
- package/dist/internal/reactorTest/coordinator.js +178 -0
- package/dist/internal/reactorTest/coordinator.js.map +1 -0
- package/dist/internal/reactorTest/faults.d.ts +172 -0
- package/dist/internal/reactorTest/faults.d.ts.map +1 -0
- package/dist/internal/reactorTest/faults.js +23 -0
- package/dist/internal/reactorTest/faults.js.map +1 -0
- package/dist/internal/reactorTest/h3.d.ts +431 -0
- package/dist/internal/reactorTest/h3.d.ts.map +1 -0
- package/dist/internal/reactorTest/h3.js +625 -0
- package/dist/internal/reactorTest/h3.js.map +1 -0
- package/dist/internal/reactorTest/media.d.ts +22 -0
- package/dist/internal/reactorTest/media.d.ts.map +1 -0
- package/dist/internal/reactorTest/media.js +34 -0
- package/dist/internal/reactorTest/media.js.map +1 -0
- package/dist/internal/reactorTest/peer.d.ts +318 -0
- package/dist/internal/reactorTest/peer.d.ts.map +1 -0
- package/dist/internal/reactorTest/peer.js +206 -0
- package/dist/internal/reactorTest/peer.js.map +1 -0
- package/dist/internal/reactorTest/playout.d.ts +34 -0
- package/dist/internal/reactorTest/playout.d.ts.map +1 -0
- package/dist/internal/reactorTest/playout.js +340 -0
- package/dist/internal/reactorTest/playout.js.map +1 -0
- package/dist/internal/reactorTest/references.d.ts +25 -0
- package/dist/internal/reactorTest/references.d.ts.map +1 -0
- package/dist/{testing/Png.js → internal/reactorTest/references.js} +50 -12
- package/dist/internal/reactorTest/references.js.map +1 -0
- package/dist/internal/reactorTest/sessions.d.ts +364 -0
- package/dist/internal/reactorTest/sessions.d.ts.map +1 -0
- package/dist/internal/reactorTest/sessions.js +592 -0
- package/dist/internal/reactorTest/sessions.js.map +1 -0
- package/dist/internal/reactorTest/timing.d.ts +13 -0
- package/dist/internal/reactorTest/timing.d.ts.map +1 -0
- package/dist/internal/reactorTest/timing.js +20 -0
- package/dist/internal/reactorTest/timing.js.map +1 -0
- package/dist/internal/recording.d.ts +52 -0
- package/dist/internal/recording.d.ts.map +1 -0
- package/dist/internal/recording.js +141 -0
- package/dist/internal/recording.js.map +1 -0
- package/dist/internal/session/connect.d.ts +34 -0
- package/dist/internal/session/connect.d.ts.map +1 -0
- package/dist/internal/session/connect.js +502 -0
- package/dist/internal/session/connect.js.map +1 -0
- package/dist/internal/session/generation.d.ts +35 -0
- package/dist/internal/session/generation.d.ts.map +1 -0
- package/dist/internal/session/generation.js +185 -0
- package/dist/internal/session/generation.js.map +1 -0
- package/dist/internal/session/ice.d.ts +23 -0
- package/dist/internal/session/ice.d.ts.map +1 -0
- package/dist/internal/session/ice.js +57 -0
- package/dist/internal/session/ice.js.map +1 -0
- package/dist/internal/session/inbound.d.ts +50 -0
- package/dist/internal/session/inbound.d.ts.map +1 -0
- package/dist/internal/session/inbound.js +202 -0
- package/dist/internal/session/inbound.js.map +1 -0
- package/dist/internal/session/model.d.ts +163 -0
- package/dist/internal/session/model.d.ts.map +1 -0
- package/dist/internal/session/model.js +78 -0
- package/dist/internal/session/model.js.map +1 -0
- package/dist/internal/session/requests.d.ts +71 -0
- package/dist/internal/session/requests.d.ts.map +1 -0
- package/dist/internal/session/requests.js +240 -0
- package/dist/internal/session/requests.js.map +1 -0
- package/dist/internal/session/tracks.d.ts +21 -0
- package/dist/internal/session/tracks.d.ts.map +1 -0
- package/dist/internal/session/tracks.js +166 -0
- package/dist/internal/session/tracks.js.map +1 -0
- package/dist/internal/session/upload.d.ts +21 -0
- package/dist/internal/session/upload.d.ts.map +1 -0
- package/dist/internal/session/upload.js +68 -0
- package/dist/internal/session/upload.js.map +1 -0
- package/dist/internal/session.d.ts +66 -0
- package/dist/internal/session.d.ts.map +1 -0
- package/dist/internal/session.js +280 -0
- package/dist/internal/session.js.map +1 -0
- package/dist/{stats.d.ts → internal/stats.d.ts} +30 -16
- package/dist/internal/stats.d.ts.map +1 -0
- package/dist/internal/stats.js +201 -0
- package/dist/internal/stats.js.map +1 -0
- package/dist/internal/token.d.ts +22 -0
- package/dist/internal/token.d.ts.map +1 -0
- package/dist/internal/token.js +65 -0
- package/dist/internal/token.js.map +1 -0
- package/dist/internal/wire.d.ts +37 -0
- package/dist/internal/wire.d.ts.map +1 -0
- package/dist/internal/wire.js +49 -0
- package/dist/internal/wire.js.map +1 -0
- package/notices/bufbuild-protobuf-LICENSE +201 -0
- package/package.json +17 -38
- package/dist/FetchHttp.d.ts +0 -9
- package/dist/FetchHttp.d.ts.map +0 -1
- package/dist/FetchHttp.js +0 -63
- package/dist/FetchHttp.js.map +0 -1
- package/dist/PeerFactory.d.ts +0 -26
- package/dist/PeerFactory.d.ts.map +0 -1
- package/dist/PeerFactory.js +0 -4
- package/dist/PeerFactory.js.map +0 -1
- package/dist/PeerTypes.d.ts +0 -64
- package/dist/PeerTypes.d.ts.map +0 -1
- package/dist/PeerTypes.js +0 -2
- package/dist/PeerTypes.js.map +0 -1
- package/dist/Sequence.d.ts +0 -85
- package/dist/Sequence.d.ts.map +0 -1
- package/dist/Sequence.js +0 -210
- package/dist/Sequence.js.map +0 -1
- package/dist/SessionTypes.d.ts +0 -312
- package/dist/SessionTypes.d.ts.map +0 -1
- package/dist/SessionTypes.js +0 -19
- package/dist/SessionTypes.js.map +0 -1
- package/dist/Submission.d.ts.map +0 -1
- package/dist/Submission.js.map +0 -1
- package/dist/_internal/queue.d.ts +0 -6
- package/dist/_internal/queue.d.ts.map +0 -1
- package/dist/_internal/queue.js.map +0 -1
- package/dist/bytes.d.ts +0 -6
- package/dist/bytes.d.ts.map +0 -1
- package/dist/bytes.js +0 -32
- package/dist/bytes.js.map +0 -1
- package/dist/contract.d.ts +0 -149
- package/dist/contract.d.ts.map +0 -1
- package/dist/contract.js +0 -119
- package/dist/contract.js.map +0 -1
- package/dist/coordinator/_internal/client.d.ts +0 -215
- package/dist/coordinator/_internal/client.d.ts.map +0 -1
- package/dist/coordinator/_internal/client.js +0 -563
- package/dist/coordinator/_internal/client.js.map +0 -1
- package/dist/coordinator/_internal/recording.d.ts +0 -31
- package/dist/coordinator/_internal/recording.d.ts.map +0 -1
- package/dist/coordinator/_internal/recording.js +0 -123
- package/dist/coordinator/_internal/recording.js.map +0 -1
- package/dist/coordinator/_internal/response.d.ts +0 -15
- package/dist/coordinator/_internal/response.d.ts.map +0 -1
- package/dist/coordinator/_internal/response.js +0 -55
- package/dist/coordinator/_internal/response.js.map +0 -1
- package/dist/coordinator/_internal/schemas.d.ts +0 -73
- package/dist/coordinator/_internal/schemas.d.ts.map +0 -1
- package/dist/coordinator/_internal/schemas.js +0 -200
- package/dist/coordinator/_internal/schemas.js.map +0 -1
- package/dist/coordinator/index.d.ts +0 -40
- package/dist/coordinator/index.d.ts.map +0 -1
- package/dist/coordinator/index.js +0 -21
- package/dist/coordinator/index.js.map +0 -1
- package/dist/correlation.d.ts +0 -47
- package/dist/correlation.d.ts.map +0 -1
- package/dist/correlation.js +0 -131
- package/dist/correlation.js.map +0 -1
- package/dist/duration.d.ts +0 -27
- package/dist/duration.d.ts.map +0 -1
- package/dist/duration.js +0 -47
- package/dist/duration.js.map +0 -1
- package/dist/errors.d.ts +0 -1303
- package/dist/errors.d.ts.map +0 -1
- package/dist/errors.js +0 -745
- package/dist/errors.js.map +0 -1
- package/dist/h3/_internal/client.d.ts +0 -9
- package/dist/h3/_internal/client.d.ts.map +0 -1
- package/dist/h3/_internal/client.js +0 -652
- package/dist/h3/_internal/client.js.map +0 -1
- package/dist/h3/_internal/contracts.d.ts.map +0 -1
- package/dist/h3/_internal/contracts.js +0 -123
- package/dist/h3/_internal/contracts.js.map +0 -1
- package/dist/h3/_internal/deployment.d.ts +0 -8
- package/dist/h3/_internal/deployment.d.ts.map +0 -1
- package/dist/h3/_internal/deployment.js +0 -149
- package/dist/h3/_internal/deployment.js.map +0 -1
- package/dist/h3/_internal/evidence.d.ts +0 -17
- package/dist/h3/_internal/evidence.d.ts.map +0 -1
- package/dist/h3/_internal/evidence.js +0 -48
- package/dist/h3/_internal/evidence.js.map +0 -1
- package/dist/h3/_internal/operations.d.ts +0 -58
- package/dist/h3/_internal/operations.d.ts.map +0 -1
- package/dist/h3/_internal/operations.js +0 -268
- package/dist/h3/_internal/operations.js.map +0 -1
- package/dist/h3/_internal/references.d.ts +0 -24
- package/dist/h3/_internal/references.d.ts.map +0 -1
- package/dist/h3/_internal/references.js +0 -309
- package/dist/h3/_internal/references.js.map +0 -1
- package/dist/h3/_internal/request.d.ts +0 -21
- package/dist/h3/_internal/request.d.ts.map +0 -1
- package/dist/h3/_internal/request.js +0 -97
- package/dist/h3/_internal/request.js.map +0 -1
- package/dist/h3/_internal/retained.d.ts +0 -22
- package/dist/h3/_internal/retained.d.ts.map +0 -1
- package/dist/h3/_internal/retained.js +0 -89
- package/dist/h3/_internal/retained.js.map +0 -1
- package/dist/h3/_internal/state.d.ts +0 -44
- package/dist/h3/_internal/state.d.ts.map +0 -1
- package/dist/h3/_internal/state.js +0 -283
- package/dist/h3/_internal/state.js.map +0 -1
- package/dist/h3/index.d.ts +0 -10
- package/dist/h3/index.d.ts.map +0 -1
- package/dist/h3/index.js +0 -7
- package/dist/h3/index.js.map +0 -1
- package/dist/h3/messages.d.ts.map +0 -1
- package/dist/h3/messages.js.map +0 -1
- package/dist/h3/profile.d.ts.map +0 -1
- package/dist/h3/profile.js.map +0 -1
- package/dist/h3/types.d.ts +0 -291
- package/dist/h3/types.d.ts.map +0 -1
- package/dist/h3/types.js +0 -2
- package/dist/h3/types.js.map +0 -1
- package/dist/host.d.ts +0 -26
- package/dist/host.d.ts.map +0 -1
- package/dist/host.js +0 -20
- package/dist/host.js.map +0 -1
- package/dist/json.d.ts +0 -25
- package/dist/json.d.ts.map +0 -1
- package/dist/json.js +0 -143
- package/dist/json.js.map +0 -1
- package/dist/media-stream.d.ts +0 -10
- package/dist/media-stream.d.ts.map +0 -1
- package/dist/media-stream.js +0 -18
- package/dist/media-stream.js.map +0 -1
- package/dist/observation.d.ts +0 -38
- package/dist/observation.d.ts.map +0 -1
- package/dist/observation.js +0 -113
- package/dist/observation.js.map +0 -1
- package/dist/orchestration/elapsed.d.ts +0 -9
- package/dist/orchestration/elapsed.d.ts.map +0 -1
- package/dist/orchestration/elapsed.js +0 -8
- package/dist/orchestration/elapsed.js.map +0 -1
- package/dist/orchestration/h3-source.d.ts +0 -58
- package/dist/orchestration/h3-source.d.ts.map +0 -1
- package/dist/orchestration/h3-source.js +0 -362
- package/dist/orchestration/h3-source.js.map +0 -1
- package/dist/orchestration/index.d.ts +0 -17
- package/dist/orchestration/index.d.ts.map +0 -1
- package/dist/orchestration/index.js +0 -12
- package/dist/orchestration/index.js.map +0 -1
- package/dist/orchestration/media-buffer.d.ts +0 -32
- package/dist/orchestration/media-buffer.d.ts.map +0 -1
- package/dist/orchestration/media-buffer.js +0 -94
- package/dist/orchestration/media-buffer.js.map +0 -1
- package/dist/orchestration/open-h3.d.ts +0 -101
- package/dist/orchestration/open-h3.d.ts.map +0 -1
- package/dist/orchestration/open-h3.js +0 -127
- package/dist/orchestration/open-h3.js.map +0 -1
- package/dist/orchestration/queries.d.ts +0 -10
- package/dist/orchestration/queries.d.ts.map +0 -1
- package/dist/orchestration/queries.js +0 -43
- package/dist/orchestration/queries.js.map +0 -1
- package/dist/orchestration/references.d.ts +0 -18
- package/dist/orchestration/references.d.ts.map +0 -1
- package/dist/orchestration/references.js +0 -79
- package/dist/orchestration/references.js.map +0 -1
- package/dist/orchestration/renewal-state.d.ts +0 -84
- package/dist/orchestration/renewal-state.d.ts.map +0 -1
- package/dist/orchestration/renewal-state.js +0 -95
- package/dist/orchestration/renewal-state.js.map +0 -1
- package/dist/orchestration/renewal.d.ts +0 -103
- package/dist/orchestration/renewal.d.ts.map +0 -1
- package/dist/orchestration/renewal.js +0 -1088
- package/dist/orchestration/renewal.js.map +0 -1
- package/dist/orchestration/request.d.ts +0 -65
- package/dist/orchestration/request.d.ts.map +0 -1
- package/dist/orchestration/request.js +0 -134
- package/dist/orchestration/request.js.map +0 -1
- package/dist/orchestration/retention.d.ts +0 -100
- package/dist/orchestration/retention.d.ts.map +0 -1
- package/dist/orchestration/retention.js +0 -134
- package/dist/orchestration/retention.js.map +0 -1
- package/dist/orchestration/routing.d.ts +0 -21
- package/dist/orchestration/routing.d.ts.map +0 -1
- package/dist/orchestration/routing.js +0 -93
- package/dist/orchestration/routing.js.map +0 -1
- package/dist/orchestration/scheduler-key.d.ts +0 -14
- package/dist/orchestration/scheduler-key.d.ts.map +0 -1
- package/dist/orchestration/scheduler-key.js +0 -62
- package/dist/orchestration/scheduler-key.js.map +0 -1
- package/dist/orchestration/scheduler-policy.d.ts +0 -222
- package/dist/orchestration/scheduler-policy.d.ts.map +0 -1
- package/dist/orchestration/scheduler-policy.js +0 -582
- package/dist/orchestration/scheduler-policy.js.map +0 -1
- package/dist/orchestration/scheduler.d.ts +0 -383
- package/dist/orchestration/scheduler.d.ts.map +0 -1
- package/dist/orchestration/scheduler.js +0 -2597
- package/dist/orchestration/scheduler.js.map +0 -1
- package/dist/orchestration/source-slot.d.ts +0 -124
- package/dist/orchestration/source-slot.d.ts.map +0 -1
- package/dist/orchestration/source-slot.js +0 -348
- package/dist/orchestration/source-slot.js.map +0 -1
- package/dist/orchestration/types.d.ts +0 -1462
- package/dist/orchestration/types.d.ts.map +0 -1
- package/dist/orchestration/types.js +0 -135
- package/dist/orchestration/types.js.map +0 -1
- package/dist/protobuf.d.ts +0 -63
- package/dist/protobuf.d.ts.map +0 -1
- package/dist/protobuf.js +0 -252
- package/dist/protobuf.js.map +0 -1
- package/dist/session/_internal/acquire.d.ts +0 -21
- package/dist/session/_internal/acquire.d.ts.map +0 -1
- package/dist/session/_internal/acquire.js +0 -168
- package/dist/session/_internal/acquire.js.map +0 -1
- package/dist/session/_internal/cleanup.d.ts +0 -19
- package/dist/session/_internal/cleanup.d.ts.map +0 -1
- package/dist/session/_internal/cleanup.js +0 -102
- package/dist/session/_internal/cleanup.js.map +0 -1
- package/dist/session/_internal/lifecycle.d.ts +0 -67
- package/dist/session/_internal/lifecycle.d.ts.map +0 -1
- package/dist/session/_internal/lifecycle.js +0 -142
- package/dist/session/_internal/lifecycle.js.map +0 -1
- package/dist/session/_internal/remote.d.ts +0 -28
- package/dist/session/_internal/remote.d.ts.map +0 -1
- package/dist/session/_internal/remote.js +0 -71
- package/dist/session/_internal/remote.js.map +0 -1
- package/dist/session/_internal/uploads.d.ts +0 -7
- package/dist/session/_internal/uploads.d.ts.map +0 -1
- package/dist/session/_internal/uploads.js +0 -31
- package/dist/session/_internal/uploads.js.map +0 -1
- package/dist/session/commands.d.ts +0 -2
- package/dist/session/commands.d.ts.map +0 -1
- package/dist/session/commands.js +0 -2
- package/dist/session/commands.js.map +0 -1
- package/dist/session/files.d.ts +0 -21
- package/dist/session/files.d.ts.map +0 -1
- package/dist/session/files.js +0 -49
- package/dist/session/files.js.map +0 -1
- package/dist/session/index.d.ts +0 -84
- package/dist/session/index.d.ts.map +0 -1
- package/dist/session/index.js +0 -16
- package/dist/session/index.js.map +0 -1
- package/dist/session/media.d.ts +0 -114
- package/dist/session/media.d.ts.map +0 -1
- package/dist/session/media.js +0 -2
- package/dist/session/media.js.map +0 -1
- package/dist/session/recorder.d.ts +0 -24
- package/dist/session/recorder.d.ts.map +0 -1
- package/dist/session/recorder.js +0 -19
- package/dist/session/recorder.js.map +0 -1
- package/dist/session.d.ts +0 -105
- package/dist/session.d.ts.map +0 -1
- package/dist/session.js +0 -976
- package/dist/session.js.map +0 -1
- package/dist/simulation/_internal/source.d.ts +0 -12
- package/dist/simulation/_internal/source.d.ts.map +0 -1
- package/dist/simulation/_internal/source.js +0 -513
- package/dist/simulation/_internal/source.js.map +0 -1
- package/dist/simulation/index.d.ts +0 -13
- package/dist/simulation/index.d.ts.map +0 -1
- package/dist/simulation/index.js +0 -12
- package/dist/simulation/index.js.map +0 -1
- package/dist/simulation/types.d.ts +0 -39
- package/dist/simulation/types.d.ts.map +0 -1
- package/dist/simulation/types.js +0 -2
- package/dist/simulation/types.js.map +0 -1
- package/dist/stats.d.ts.map +0 -1
- package/dist/stats.js +0 -205
- package/dist/stats.js.map +0 -1
- package/dist/testing/Faults.d.ts +0 -4
- package/dist/testing/Faults.d.ts.map +0 -1
- package/dist/testing/Faults.js +0 -7
- package/dist/testing/Faults.js.map +0 -1
- package/dist/testing/Png.d.ts +0 -3
- package/dist/testing/Png.d.ts.map +0 -1
- package/dist/testing/Png.js.map +0 -1
- package/dist/testing/Wav.d.ts +0 -14
- package/dist/testing/Wav.d.ts.map +0 -1
- package/dist/testing/Wav.js +0 -37
- package/dist/testing/Wav.js.map +0 -1
- package/dist/testing/index.d.ts +0 -5
- package/dist/testing/index.d.ts.map +0 -1
- package/dist/testing/index.js +0 -4
- package/dist/testing/index.js.map +0 -1
- package/dist/wire.d.ts +0 -7
- package/dist/wire.d.ts.map +0 -1
- package/dist/wire.generated.d.ts +0 -305
- package/dist/wire.generated.d.ts.map +0 -1
- package/dist/wire.generated.js +0 -1257
- package/dist/wire.generated.js.map +0 -1
- package/dist/wire.js +0 -5
- package/dist/wire.js.map +0 -1
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright 2021-2026 Buf Technologies, Inc.
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "reactor-effect-client",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"description": "Scoped Reactor sessions, H3 provider state and explicit orchestration over Effect",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -18,59 +18,38 @@
|
|
|
18
18
|
"README.md"
|
|
19
19
|
],
|
|
20
20
|
"exports": {
|
|
21
|
-
".":
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
"./
|
|
26
|
-
"types": "./dist/h3/index.d.ts",
|
|
27
|
-
"import": "./dist/h3/index.js"
|
|
28
|
-
},
|
|
29
|
-
"./orchestration": {
|
|
30
|
-
"types": "./dist/orchestration/index.d.ts",
|
|
31
|
-
"import": "./dist/orchestration/index.js"
|
|
32
|
-
},
|
|
33
|
-
"./simulation": {
|
|
34
|
-
"types": "./dist/simulation/index.d.ts",
|
|
35
|
-
"import": "./dist/simulation/index.js"
|
|
36
|
-
},
|
|
37
|
-
"./testing": {
|
|
38
|
-
"types": "./dist/testing/index.d.ts",
|
|
39
|
-
"import": "./dist/testing/index.js"
|
|
40
|
-
},
|
|
41
|
-
"./wire": {
|
|
42
|
-
"types": "./dist/wire.d.ts",
|
|
43
|
-
"import": "./dist/wire.js"
|
|
44
|
-
},
|
|
45
|
-
"./host": {
|
|
46
|
-
"types": "./dist/host.d.ts",
|
|
47
|
-
"import": "./dist/host.js"
|
|
48
|
-
}
|
|
21
|
+
"./package.json": "./package.json",
|
|
22
|
+
".": "./dist/index.js",
|
|
23
|
+
"./*": "./dist/*.js",
|
|
24
|
+
"./internal/*": null,
|
|
25
|
+
"./index": null
|
|
49
26
|
},
|
|
50
27
|
"engines": {
|
|
51
28
|
"node": ">=22"
|
|
52
29
|
},
|
|
53
30
|
"peerDependencies": {
|
|
54
|
-
"effect": "
|
|
31
|
+
"effect": "4.0.0-rc.117"
|
|
55
32
|
},
|
|
56
33
|
"devDependencies": {
|
|
57
|
-
"@
|
|
58
|
-
"@
|
|
59
|
-
"@effect/
|
|
34
|
+
"@bufbuild/buf": "1.73.0",
|
|
35
|
+
"@bufbuild/protoc-gen-es": "2.15.0",
|
|
36
|
+
"@effect/platform-bun": "4.0.0-rc.117",
|
|
37
|
+
"@effect/platform-node": "4.0.0-rc.117",
|
|
38
|
+
"@effect/vitest": "4.0.0-rc.117",
|
|
60
39
|
"@types/node": "22.20.2",
|
|
61
|
-
"effect": "
|
|
62
|
-
"reactor-effect-test-kit": "0.7.0",
|
|
40
|
+
"effect": "4.0.0-rc.117",
|
|
63
41
|
"vitest": "5.0.0"
|
|
64
42
|
},
|
|
65
43
|
"scripts": {
|
|
66
44
|
"build": "rm -rf dist && tsc -p tsconfig.build.json",
|
|
67
45
|
"typecheck": "tsc -p tsconfig.json --noEmit && tsc -p tsconfig.node.json --noEmit",
|
|
68
|
-
"test": "vitest run"
|
|
69
|
-
"generate:wire": "python3 wire/generate.py",
|
|
70
|
-
"generate:check": "python3 wire/generate.py --check"
|
|
46
|
+
"test": "vitest run"
|
|
71
47
|
},
|
|
72
48
|
"publishConfig": {
|
|
73
49
|
"access": "public",
|
|
74
50
|
"provenance": true
|
|
51
|
+
},
|
|
52
|
+
"dependencies": {
|
|
53
|
+
"@bufbuild/protobuf": "2.15.0"
|
|
75
54
|
}
|
|
76
55
|
}
|
package/dist/FetchHttp.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import * as Layer from "effect/Layer";
|
|
2
|
-
import * as HttpClient from "effect/unstable/http/HttpClient";
|
|
3
|
-
/**
|
|
4
|
-
* A Fetch implementation of Effect's HttpClient. The small response adaptation
|
|
5
|
-
* owns both cancellation and reader-lock release, and preserves an empty body
|
|
6
|
-
* as zero bytes. Applications may supply another HttpClient implementation.
|
|
7
|
-
*/
|
|
8
|
-
export declare const layer: Layer.Layer<HttpClient.HttpClient, never, never>;
|
|
9
|
-
//# sourceMappingURL=FetchHttp.d.ts.map
|
package/dist/FetchHttp.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FetchHttp.d.ts","sourceRoot":"","sources":["../src/FetchHttp.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AAEtC,OAAO,KAAK,UAAU,MAAM,iCAAiC,CAAC;AAO9D;;;;GAIG;AACH,eAAO,MAAM,KAAK,kDA+DjB,CAAC"}
|
package/dist/FetchHttp.js
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import * as Effect from "effect/Effect";
|
|
2
|
-
import * as Layer from "effect/Layer";
|
|
3
|
-
import * as Stream from "effect/Stream";
|
|
4
|
-
import * as HttpClient from "effect/unstable/http/HttpClient";
|
|
5
|
-
import * as HttpClientError from "effect/unstable/http/HttpClientError";
|
|
6
|
-
import * as HttpClientResponse from "effect/unstable/http/HttpClientResponse";
|
|
7
|
-
import * as FetchHttpClient from "effect/unstable/http/FetchHttpClient";
|
|
8
|
-
import { fromOwnedReadableStream } from "./media-stream.js";
|
|
9
|
-
import { ReactorError } from "./errors.js";
|
|
10
|
-
/**
|
|
11
|
-
* A Fetch implementation of Effect's HttpClient. The small response adaptation
|
|
12
|
-
* owns both cancellation and reader-lock release, and preserves an empty body
|
|
13
|
-
* as zero bytes. Applications may supply another HttpClient implementation.
|
|
14
|
-
*/
|
|
15
|
-
export const layer = Layer.effect(HttpClient.HttpClient, Effect.gen(function* () {
|
|
16
|
-
const fetch = yield* FetchHttpClient.Fetch;
|
|
17
|
-
return HttpClient.make((request, url, signal) => {
|
|
18
|
-
const send = (body) => Effect.tryPromise({
|
|
19
|
-
try: () => fetch(url, {
|
|
20
|
-
method: request.method,
|
|
21
|
-
headers: request.headers,
|
|
22
|
-
...(body === undefined ? {} : { body }),
|
|
23
|
-
signal,
|
|
24
|
-
credentials: "omit",
|
|
25
|
-
redirect: "error",
|
|
26
|
-
// Node requires this option for streaming request bodies. It is ignored
|
|
27
|
-
// by browsers, and is not part of the portable coordinator contract.
|
|
28
|
-
...(body instanceof ReadableStream ? { duplex: "half" } : {}),
|
|
29
|
-
}),
|
|
30
|
-
catch: (cause) => new HttpClientError.HttpClientError({
|
|
31
|
-
reason: new HttpClientError.TransportError({ request, cause }),
|
|
32
|
-
}),
|
|
33
|
-
}).pipe(Effect.map((source) => {
|
|
34
|
-
const response = HttpClientResponse.fromWeb(request, source);
|
|
35
|
-
const stream = source.body === null
|
|
36
|
-
? Stream.empty
|
|
37
|
-
: fromOwnedReadableStream({
|
|
38
|
-
evaluate: () => source.body,
|
|
39
|
-
onError: (cause) => ReactorError.fromCode("Http", "HTTP response body failed", { detail: cause }),
|
|
40
|
-
}).pipe(Stream.mapError((cause) => new HttpClientError.HttpClientError({
|
|
41
|
-
reason: new HttpClientError.DecodeError({ request, response, cause }),
|
|
42
|
-
})));
|
|
43
|
-
// Retain the official response's public accessors and identity; only its
|
|
44
|
-
// stream owns the additional reader-release contract.
|
|
45
|
-
return Object.create(response, {
|
|
46
|
-
stream: { get: () => stream },
|
|
47
|
-
});
|
|
48
|
-
}));
|
|
49
|
-
switch (request.body._tag) {
|
|
50
|
-
case "Raw":
|
|
51
|
-
return send(request.body.body);
|
|
52
|
-
case "Uint8Array":
|
|
53
|
-
return send(new Uint8Array(request.body.body));
|
|
54
|
-
case "FormData":
|
|
55
|
-
return send(request.body.formData);
|
|
56
|
-
case "Stream":
|
|
57
|
-
return Stream.toReadableStreamEffect(request.body.stream).pipe(Effect.flatMap(send));
|
|
58
|
-
default:
|
|
59
|
-
return send(undefined);
|
|
60
|
-
}
|
|
61
|
-
});
|
|
62
|
-
}));
|
|
63
|
-
//# sourceMappingURL=FetchHttp.js.map
|
package/dist/FetchHttp.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FetchHttp.js","sourceRoot":"","sources":["../src/FetchHttp.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,UAAU,MAAM,iCAAiC,CAAC;AAC9D,OAAO,KAAK,eAAe,MAAM,sCAAsC,CAAC;AACxE,OAAO,KAAK,kBAAkB,MAAM,yCAAyC,CAAC;AAC9E,OAAO,KAAK,eAAe,MAAM,sCAAsC,CAAC;AACxE,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C;;;;GAIG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,KAAK,CAAC,MAAM,CAC/B,UAAU,CAAC,UAAU,EACrB,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;IAClB,MAAM,KAAK,GAAG,KAAK,CAAC,CAAC,eAAe,CAAC,KAAK,CAAC;IAC3C,OAAO,UAAU,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,EAAE;QAC9C,MAAM,IAAI,GAAG,CAAC,IAAyB,EAAE,EAAE,CACzC,MAAM,CAAC,UAAU,CAAC;YAChB,GAAG,EAAE,GAAG,EAAE,CACR,KAAK,CAAC,GAAG,EAAE;gBACT,MAAM,EAAE,OAAO,CAAC,MA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iBACtE,CAAC,CACL,CACF,CAAC;YACR,yEAAyE;YACzE,sDAAsD;YACtD,OAAO,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE;gBAC7B,MAAM,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,MAAM,EAAE;aAC9B,CAA0C,CAAC;QAC9C,CAAC,CAAC,CACH,CAAC;QAEJ,QAAQ,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;YAC1B,KAAK,KAAK;gBACR,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAA2B,CAAC,CAAC;YACxD,KAAK,YAAY;gBACf,OAAO,IAAI,CAAC,IAAI,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;YACjD,KAAK,UAAU;gBACb,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;YACrC,KAAK,QAAQ;gBACX,OAAO,MAAM,CAAC,sBAAsB,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;YACvF;gBACE,OAAO,IAAI,CAAC,SAAS,CAAC,CAAC;QAC3B,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CACH,CAAC"}
|
package/dist/PeerFactory.d.ts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import * as Context from "effect/Context";
|
|
2
|
-
import type * as Effect from "effect/Effect";
|
|
3
|
-
import type { Peer } from "./PeerTypes.js";
|
|
4
|
-
import type { ReactorError } from "./errors.js";
|
|
5
|
-
/**
|
|
6
|
-
* A host's transport capability. A host resolves and validates what it needs
|
|
7
|
-
* while its layer is built, so building the layer is the host preflight and
|
|
8
|
-
* `make` never depends on another call having run first.
|
|
9
|
-
*/
|
|
10
|
-
export interface PeerFactoryShape {
|
|
11
|
-
/** A fresh transport for each connection generation. No Reactor orchestration. */
|
|
12
|
-
readonly make: () => Peer;
|
|
13
|
-
/**
|
|
14
|
-
* Fails when the host cannot create a peer right now, for example while a
|
|
15
|
-
* native runtime still holds an owner that did not join. The session factory
|
|
16
|
-
* runs it before every remote allocation, so a paid session is never
|
|
17
|
-
* allocated for a peer that cannot be made. It must not change what `make`
|
|
18
|
-
* does; a host with nothing to check omits it.
|
|
19
|
-
*/
|
|
20
|
-
readonly check?: Effect.Effect<void, ReactorError> | undefined;
|
|
21
|
-
}
|
|
22
|
-
declare const PeerFactory_base: Context.ServiceClass<PeerFactory, "reactor-effect-client/PeerFactory", PeerFactoryShape>;
|
|
23
|
-
export declare class PeerFactory extends PeerFactory_base {
|
|
24
|
-
}
|
|
25
|
-
export type { Peer, PeerEvent, Prepared, Channel } from "./PeerTypes.js";
|
|
26
|
-
//# sourceMappingURL=PeerFactory.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PeerFactory.d.ts","sourceRoot":"","sources":["../src/PeerFactory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC1C,OAAO,KAAK,KAAK,MAAM,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAC/B,kFAAkF;IAClF,QAAQ,CAAC,IAAI,EAAE,MAAM,IAAI,CAAC;IAC1B;;;;;;OAMG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,YAAY,CAAC,GAAG,SAAS,CAAC;CAChE;;AAED,qBAAa,WAAY,SAAQ,gBAEhC;CAAG;AAEJ,YAAY,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC"}
|
package/dist/PeerFactory.js
DELETED
package/dist/PeerFactory.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PeerFactory.js","sourceRoot":"","sources":["../src/PeerFactory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAuB1C,MAAM,OAAO,WAAY,SAAQ,OAAO,CAAC,OAAO,EAAiC,CAC/E,mCAAmC,CACpC;CAAG"}
|
package/dist/PeerTypes.d.ts
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import type * as Effect from "effect/Effect";
|
|
2
|
-
import type * as Scope from "effect/Scope";
|
|
3
|
-
import type { ReactorError } from "./errors.js";
|
|
4
|
-
import type { IceCandidate, IceServer, Mapping, Track } from "./contract.js";
|
|
5
|
-
import type { RawMedia } from "./session/media.js";
|
|
6
|
-
export type Channel = "control" | "data";
|
|
7
|
-
export type PeerState = "new" | "connecting" | "connected" | "disconnected" | "failed" | "closed";
|
|
8
|
-
/** Minimal track lifetime contract. Native peers expose owned frames instead. */
|
|
9
|
-
export interface MediaTrack {
|
|
10
|
-
readonly kind: string;
|
|
11
|
-
readonly readyState: "live" | "ended";
|
|
12
|
-
clone(): MediaTrack;
|
|
13
|
-
stop(): void;
|
|
14
|
-
}
|
|
15
|
-
export type PeerEvent = {
|
|
16
|
-
readonly type: "state";
|
|
17
|
-
readonly state: PeerState;
|
|
18
|
-
} | {
|
|
19
|
-
readonly type: "channel";
|
|
20
|
-
readonly channel: Channel;
|
|
21
|
-
readonly open: boolean;
|
|
22
|
-
} | {
|
|
23
|
-
readonly type: "message";
|
|
24
|
-
readonly channel: Channel;
|
|
25
|
-
readonly bytes: Uint8Array;
|
|
26
|
-
} | {
|
|
27
|
-
readonly type: "ice";
|
|
28
|
-
readonly candidate?: IceCandidate;
|
|
29
|
-
} | {
|
|
30
|
-
readonly type: "track";
|
|
31
|
-
readonly name: string;
|
|
32
|
-
readonly mid: string;
|
|
33
|
-
} | {
|
|
34
|
-
readonly type: "decoded";
|
|
35
|
-
readonly kind: "video" | "audio";
|
|
36
|
-
readonly name: string;
|
|
37
|
-
readonly mid: string;
|
|
38
|
-
} | {
|
|
39
|
-
readonly type: "error";
|
|
40
|
-
readonly error: ReactorError;
|
|
41
|
-
};
|
|
42
|
-
export interface Prepared {
|
|
43
|
-
readonly sdp: string;
|
|
44
|
-
readonly mapping: readonly Mapping[];
|
|
45
|
-
}
|
|
46
|
-
/** Transport only. Coordinator allocation and Reactor protocol state remain session-owned. */
|
|
47
|
-
export interface Peer {
|
|
48
|
-
readonly rawMedia?: RawMedia;
|
|
49
|
-
readonly shutdown?: Effect.Effect<void, ReactorError>;
|
|
50
|
-
readonly nativeTracks?: boolean;
|
|
51
|
-
readonly mediaSupported?: boolean;
|
|
52
|
-
prepare(servers: readonly IceServer[], tracks: readonly Track[], emit: (event: PeerEvent) => void): Effect.Effect<Prepared, ReactorError, Scope.Scope>;
|
|
53
|
-
answer(sdp: string): Effect.Effect<void, ReactorError>;
|
|
54
|
-
/** Local submission/transport acknowledgement is never a Reactor application reply. */
|
|
55
|
-
send(channel: Channel, bytes: Uint8Array<ArrayBuffer>): Effect.Effect<void, ReactorError>;
|
|
56
|
-
close(): void;
|
|
57
|
-
lease(name: string): MediaTrack;
|
|
58
|
-
release(track: MediaTrack): void;
|
|
59
|
-
direction(name: string, active: boolean): Effect.Effect<void, ReactorError>;
|
|
60
|
-
replace(name: string, track: MediaTrack | null): Effect.Effect<void, ReactorError>;
|
|
61
|
-
maxBitrate(name: string, bitsPerSecond: number): Effect.Effect<void, ReactorError>;
|
|
62
|
-
readonly stats: Effect.Effect<readonly unknown[], ReactorError>;
|
|
63
|
-
}
|
|
64
|
-
//# sourceMappingURL=PeerTypes.d.ts.map
|
package/dist/PeerTypes.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PeerTypes.d.ts","sourceRoot":"","sources":["../src/PeerTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,K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AAE,YAAY,CAAC,CAAC;IAC1F,KAAK,IAAI,IAAI,CAAC;IACd,KAAK,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,CAAC;IAChC,OAAO,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI,CAAC;IACjC,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;IAC5E,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,GAAG,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;IACnF,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;IACnF,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,SAAS,OAAO,EAAE,EAAE,YAAY,CAAC,CAAC;CACjE"}
|
package/dist/PeerTypes.js
DELETED
package/dist/PeerTypes.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PeerTypes.js","sourceRoot":"","sources":["../src/PeerTypes.ts"],"names":[],"mappings":""}
|
package/dist/Sequence.d.ts
DELETED
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import { Effect, Schema } from "effect";
|
|
2
|
-
export type SequenceStatus = "open" | "sealed" | "indeterminate" | "retired";
|
|
3
|
-
export type MemberOutcome = {
|
|
4
|
-
readonly _tag: "Accepted";
|
|
5
|
-
readonly memberId: string;
|
|
6
|
-
readonly clipId: string;
|
|
7
|
-
readonly index: number;
|
|
8
|
-
readonly final: boolean;
|
|
9
|
-
} | {
|
|
10
|
-
readonly _tag: "Rejected";
|
|
11
|
-
readonly memberId: string;
|
|
12
|
-
readonly reason: string | undefined;
|
|
13
|
-
} | {
|
|
14
|
-
readonly _tag: "Indeterminate";
|
|
15
|
-
readonly memberId: string;
|
|
16
|
-
readonly reason: string | undefined;
|
|
17
|
-
};
|
|
18
|
-
export interface SequenceSnapshot<Owner> {
|
|
19
|
-
readonly id: string;
|
|
20
|
-
readonly owner: Owner;
|
|
21
|
-
readonly status: SequenceStatus;
|
|
22
|
-
readonly acceptedCount: number;
|
|
23
|
-
readonly rejectedCount: number;
|
|
24
|
-
readonly indeterminateCount: number;
|
|
25
|
-
readonly pendingCount: number;
|
|
26
|
-
readonly sealRequested: boolean;
|
|
27
|
-
readonly members: ReadonlyArray<MemberOutcome>;
|
|
28
|
-
}
|
|
29
|
-
declare const InvalidSequenceOptions_base: Schema.Class<InvalidSequenceOptions, Schema.TaggedStruct<"InvalidSequenceOptions", {
|
|
30
|
-
readonly message: Schema.String;
|
|
31
|
-
}>, import("effect/Cause").YieldableError>;
|
|
32
|
-
/** An affinity bound that is not a positive safe integer. */
|
|
33
|
-
export declare class InvalidSequenceOptions extends InvalidSequenceOptions_base {
|
|
34
|
-
}
|
|
35
|
-
/** Why a sequence refused an operation. */
|
|
36
|
-
export declare const SequenceCode: Schema.Literals<readonly ["capacity", "member-capacity", "owner-mismatch", "sealed", "sealing", "indeterminate", "retired", "missing", "member-missing", "member-duplicate", "not-releasable"]>;
|
|
37
|
-
export type SequenceCode = typeof SequenceCode.Type;
|
|
38
|
-
declare const SequenceError_base: Schema.Class<SequenceError, Schema.TaggedStruct<"SequenceError", {
|
|
39
|
-
readonly sequenceId: Schema.String;
|
|
40
|
-
readonly code: Schema.Literals<readonly ["capacity", "member-capacity", "owner-mismatch", "sealed", "sealing", "indeterminate", "retired", "missing", "member-missing", "member-duplicate", "not-releasable"]>;
|
|
41
|
-
}>, import("effect/Cause").YieldableError>;
|
|
42
|
-
/** A sequence operation the affinity state refused; `code` says why. */
|
|
43
|
-
export declare class SequenceError extends SequenceError_base {
|
|
44
|
-
get message(): string;
|
|
45
|
-
}
|
|
46
|
-
export interface Affinity<Owner> {
|
|
47
|
-
readonly get: (id: string) => Effect.Effect<SequenceSnapshot<Owner> | undefined>;
|
|
48
|
-
readonly snapshots: Effect.Effect<ReadonlyArray<SequenceSnapshot<Owner>>>;
|
|
49
|
-
/** Bind no later than the first member dispatch. Existing ownership never changes. */
|
|
50
|
-
readonly bind: (id: string, owner: Owner) => Effect.Effect<Owner, SequenceError>;
|
|
51
|
-
/** Register one member whose remote outcome is not yet known. */
|
|
52
|
-
readonly begin: (id: string, memberId: string) => Effect.Effect<void, SequenceError>;
|
|
53
|
-
readonly accepted: (id: string, memberId: string, clipId: string, final?: boolean) => Effect.Effect<void, SequenceError>;
|
|
54
|
-
readonly rejected: (id: string, memberId: string, reason?: string, final?: boolean) => Effect.Effect<void, SequenceError>;
|
|
55
|
-
readonly uncertain: (id: string, memberId: string, reason?: string) => Effect.Effect<void, SequenceError>;
|
|
56
|
-
/**
|
|
57
|
-
* Stop admitting members. With no pending member this seals immediately;
|
|
58
|
-
* otherwise the sequence seals after every already-started member resolves.
|
|
59
|
-
*/
|
|
60
|
-
readonly seal: (id: string) => Effect.Effect<void, SequenceError>;
|
|
61
|
-
/** Session death retires known sequences and makes still-pending members indeterminate. */
|
|
62
|
-
readonly retire: (owner: Owner) => Effect.Effect<void>;
|
|
63
|
-
/**
|
|
64
|
-
* Explicitly acknowledge that an indeterminate sequence has been accounted
|
|
65
|
-
* for externally. Its history stays queryable as Retired until release.
|
|
66
|
-
*/
|
|
67
|
-
readonly acknowledgeIndeterminate: (id: string) => Effect.Effect<void, SequenceError>;
|
|
68
|
-
/** Explicit cleanup after history has been consumed. Open/unknown/pending work is retained. */
|
|
69
|
-
readonly release: (id: string) => Effect.Effect<void, SequenceError>;
|
|
70
|
-
readonly size: Effect.Effect<number>;
|
|
71
|
-
}
|
|
72
|
-
export interface Options<Owner> {
|
|
73
|
-
readonly maxEntries?: number;
|
|
74
|
-
readonly maxMembers?: number;
|
|
75
|
-
readonly sameOwner?: (left: Owner, right: Owner) => boolean;
|
|
76
|
-
}
|
|
77
|
-
/**
|
|
78
|
-
* Bounded sequence-affinity state. Unresolved work is never evicted to admit
|
|
79
|
-
* another sequence or member; callers explicitly account and release history.
|
|
80
|
-
* Every operation is one pure transition of the whole state, applied with
|
|
81
|
-
* `Ref.modify`, so none observes another half done.
|
|
82
|
-
*/
|
|
83
|
-
export declare const makeAffinity: <Owner>(options?: Options<Owner>) => Effect.Effect<Affinity<Owner>, InvalidSequenceOptions>;
|
|
84
|
-
export {};
|
|
85
|
-
//# sourceMappingURL=Sequence.d.ts.map
|
package/dist/Sequence.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Sequence.d.ts","sourceRoot":"","sources":["../src/Sequence.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAO,MAAM,EAAE,MAAM,QAAQ,CAAC;AAE7C,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,QAAQ,GAAG,eAAe,GAAG,SAAS,CAAC;AAE7E,MAAM,MAAM,aAAa,GACrB;IACE,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAC1B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;CACzB,GACD;IAAE,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,GAC7F;IACE,QAAQ,CAAC,IAAI,EAAE,eAAe,CAAC;IAC/B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;CACrC,CAAC;AAEN,MAAM,WAAW,gBAAgB,CAAC,KAAK;IACrC,QAAQ,CAAC,EAAE,EAAE,MAAM,C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