@natsail/effect 0.7.0 → 0.7.1

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.
Files changed (2) hide show
  1. package/README.md +3 -2
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -15,8 +15,9 @@ Use `subscribe()` when every Effect consumer should own one ephemeral Core NATS
15
15
  ```ts
16
16
  import { Effect, Stream } from 'effect'
17
17
 
18
- import { natsCodecs } from '@natsail/core'
18
+ import { createNatsRuntime, natsCodecs } from '@natsail/core'
19
19
  import { Natsail, subscribe } from '@natsail/effect'
20
+ import { createSessionRegistry } from '@natsail/session'
20
21
 
21
22
  const NatsLive = Natsail.layerScoped(
22
23
  Effect.sync(() => ({
@@ -230,7 +231,7 @@ Interrupting a processor aborts the in-flight handler and closes the consumer. T
230
231
 
231
232
  `natsSchemaCodec(schema)`, imported from `@natsail/effect/schema`, returns a JSON `NatsPayloadCodec` backed by an Effect `Schema`, for both `codec` options and publishing. Schemas with `Schema.Date`, `BigInt` or classes encode through their JSON codec. A payload that fails the schema is terminal for the subscription; to skip bad messages, decode `natsCodecs.bytes` inside the Stream instead.
232
233
 
233
- Decode failures from JetStream surface as `NatsailJetStreamError` (`stage: 'source'` or `'processor'`) or, for shared sessions, `NatsailSessionError` (`stage: 'source'`), with a `JetStreamDecodeError` as the `cause`. Set the processor option `onDecodeFailure` to choose a disposition instead of stopping the processor.
234
+ Decode failures from JetStream surface as `NatsailJetStreamError` (`stage: 'catch-up'` during the initial backlog, `'source'` after it, `'processor'` for processors) or, for shared sessions, `NatsailSessionError` (`stage: 'source'`), with a `JetStreamDecodeError` as the `cause`. Set the processor option `onDecodeFailure` to choose a disposition instead of stopping the processor.
234
235
 
235
236
  Invalid stream options (for example `bufferSize: 0`) surface as a defect when the Stream runs, the same way through the service and the free functions.
236
237
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@natsail/effect",
3
- "version": "0.7.0",
3
+ "version": "0.7.1",
4
4
  "description": "Scoped Effect v4 Streams for Core NATS, JetStream, and shared sessions.",
5
5
  "keywords": [
6
6
  "nats",
@@ -42,9 +42,9 @@
42
42
  "registry": "https://registry.npmjs.org/"
43
43
  },
44
44
  "dependencies": {
45
- "@natsail/jetstream": "^0.7.0",
46
45
  "@natsail/core": "^0.6.0",
47
- "@natsail/session": "^0.5.1"
46
+ "@natsail/session": "^0.5.1",
47
+ "@natsail/jetstream": "^0.8.0"
48
48
  },
49
49
  "peerDependencies": {
50
50
  "effect": "^4.0.0"