npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@livon/client

v0.29.0-rc.11

Published

Client runtime and generated client foundations for LIVON.

Readme

@livon/client

npm dependencies npm publish OpenSSF Best Practices Snyk security package size license

Purpose

@livon/client provides deterministic client interface execution and generated-client foundations.

Best for

Use this package when frontend apps consume generated LIVON APIs and typed subscription handlers.

Exports include:

  • createClient
  • createClientModule
  • clientModule

Generator sync policy

Generated client surfaces and hover docs are built from the client generator. When generator output changes, docs must be updated in sync.

Current generated typing behavior to keep in sync:

  • and(...) schema nodes are emitted as TypeScript intersections (Left & Right).
  • If schema composition passes an explicit name, that name is used as the generated type name.

Central TypeScript surface template

Generated interface and signature syntax is centralized in:

  • packages/client/src/typeScriptSurfaceTemplate.ts

Use this file when TypeScript surface style should change globally (for example interface member syntax, callable signatures, or method/property signature formatting). This avoids editing many render call sites in packages/client/src/generate.ts.

Install

pnpm add @livon/client

Runtime wiring (generated API path)

import {runtime} from '@livon/runtime';
import {clientWsTransport} from '@livon/client-ws-transport';
import {api} from './generated/api';

runtime(
  clientWsTransport({url: 'ws://127.0.0.1:3002/ws'}),
  api,
);

Parameters in this example

clientWsTransport({...}):

  • url (string): websocket endpoint used by client transport.

runtime(transport, api):

  • transport (RuntimeModule): client transport module.
  • api (RuntimeModule): generated client module built from server schema.

Subscription handling pattern

api({
  onMessage: (payload, ctx) => {
    payload.text;
    ctx.state.get('lastMessage');
  },
});

api.onMessage.off();

Parameters in this example

api({...}):

  • onMessage ((payload, ctx) => void): typed subscription callback.
  • payload (in callback): generated payload type from server schema.
  • ctx (in callback): runtime context for state/emit/room access.

api.onMessage.off():

  • no parameters; disables one subscription callback stream.

Room-scoped handlers

api.room('global')({
  onMessage: (payload) => {
    payload.text;
  },
});

Parameters in this example

api.room(roomId):

  • roomId (string): room selector for scoped schema handling.

api.room(... )({...}):

  • onMessage ((payload) => void): room-scoped subscription callback.

Low-level client module

import {createClientModule} from '@livon/client';
import {runtime} from '@livon/runtime';

const module = createClientModule({ast});
runtime(transport, module);

Parameters in this example

createClientModule({...}):

  • ast (AstNode): schema AST used to build executable client interface module.

Related pages