Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@iadev93/zuno-elysia

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@iadev93/zuno-elysia

Elysia adapter for Zuno.

latest
Source
npmnpm
Version
0.0.6
Version published
Maintainers
1
Created
Source

@iadev93/zuno-elysia

Elysia adapter for Zuno.

Provides seamless state synchronization for ElysiaJS (Bun) applications using native async generators.

pnpm add @iadev93/zuno-elysia

Usage

import { Elysia } from 'elysia'
import { cors } from '@elysiajs/cors'
import { createZunoElysia } from '@iadev93/zuno-elysia'

const app = new Elysia()
  .use(cors())
  
const zuno = createZunoElysia({
  batchSync: true // Optional: Enable batching
})

// Register Zuno handlers
app.get('/zuno/sse', zuno.sse)
app.post('/zuno/sync', zuno.sync)
app.get('/zuno/snapshot', zuno.snapshot)

app.listen(3002)

API

createZunoElysia()

Returns an object containing the following handlers:

sse (GET)

An async generator handler for Server-Sent Events. It automatically handles:

  • Connection keep-alive and heartbeats.
  • Reconnection logic via last-event-id.
  • Initial state snapshots for fresh connections.

sync (POST)

Validates and applies incoming state events to the Zuno universe. Handles version conflicts and broadcasts updates to all connected SSE clients.

snapshot (GET)

Returns the current full state of the universe, the current version, and the last event ID.

Features

  • Native SSE: Uses Elysia's optimized streaming capabilities with async generators.
  • Lightweight: Zero runtime dependencies on Elysia itself (uses structural typing).
  • Type Safe: Fully written in TypeScript with comprehensive docstrings.

License

MIT

Keywords

zuno

FAQs

Package last updated on 08 Feb 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts