Skip to content

Releases: kultify-com/kmicro-js

v0.2.3

30 Mar 11:36

Choose a tag to compare

v0.2.1

10 Mar 18:52

Choose a tag to compare

Changes

  • Upgrade dependencies: @nats-io/services, @nats-io/transport-node, pino, biome, vitest, and others
  • Fix import ordering in events tests

v0.2.0

10 Mar 18:51

Choose a tag to compare

Domain Events

Add fire-and-forget domain events via NATS JetStream.

New exports

  • DomainEvent — event type with id, domain, type, orgId, and payload
  • EventHandler — handler signature (context, event) => Promise<void>

New methods on Kmicro

  • publish(event) — publishes to {prefix}.{orgId}.{domain} with JetStream deduplication via msgID
  • subscribe(streamName, consumerName, handler) — consumes from an existing JetStream stream/consumer with ack/nak/term semantics

Details

  • Subject convention: {prefix}.{orgId}.{domain} (prefix configurable via constructor options, default "events")
  • OTel tracing: producer spans on publish, consumer spans on subscribe
  • Streams and consumers are created in infrastructure, not by kmicro
  • On handler error → nak() (JetStream retries), on unmarshal failure → term() (no retry)
  • New dependency: @nats-io/jetstream@3.3.1

v0.1.3

17 Feb 20:17

Choose a tag to compare

Full Changelog: v0.1.2...v0.1.3

v0.1.2

17 Feb 17:55

Choose a tag to compare

Full Changelog: v0.1.1...v0.1.2

v0.1.1

17 Feb 17:50

Choose a tag to compare

Full Changelog: v0.1.0...v0.1.1

v0.0.20

29 Aug 11:29

Choose a tag to compare

chore: log errors

v0.0.19

28 Aug 14:43

Choose a tag to compare

chore: adapt gh workflows to testcontainers

v0.0.18

28 Aug 14:31

Choose a tag to compare

chore: access nats connection on kmicro

v0.0.17

09 May 16:13

Choose a tag to compare

chore: package upgrades and add option to disable otel