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

@lilinx/link-qwik

v0.0.3

Published

Qwik City hooks (useChannel, useCall) and /api/lilinx proxy for Lilinx

Readme

@lilinx/link-qwik

Qwik City integration — useChannel, useCall, poll/call proxy, keyed singleton transport.

Consuming the package

From npm (pre-built lib/index.qwik.mjs)

Required Vite config:

// vite.config.ts
export default defineConfig({
  plugins: [qwikCity(), qwikVite()],
  ssr: {
    noExternal: ['@lilinx/link-qwik'],
  },
});

Important: read connection status as store.status, not a separate Signal:

const { store } = useChannel('jobs:demo');
return <span>{store.status}</span>; // ✅ updates after poll
// NOT: live.status.value — Signals from pre-built library chunks do not cross the Qwik library boundary

Data and status both live on the useStore returned as store (store.data, store.status). Use tick when you need useComputed$ over channel state.

From monorepo source (recommended for library development)

Alias to src/index.ts so the host app's Qwik optimizer compiles hooks:

resolve: {
  alias: {
    '@lilinx/link-qwik': path.resolve(__dirname, '../../packages/link/link-qwik/src/index.ts'),
  },
},
ssr: { noExternal: ['@lilinx/link-qwik'] },

See apps/demo/demo-qwik/vite.config.ts.

Multi-backend (sync-admin)

One app, two Link servers — nested providers with distinct scope and apiProxy:

<QwikLinkProvider scope="poll:ik" url={IK_WS} apiProxy="/api/lilinx">
  <IkRoutes />
</QwikLinkProvider>

<QwikLinkProvider scope="poll:bd" url={BD_WS} apiProxy="/api/lilinx/bd">
  <BdRoutes />
</QwikLinkProvider>

Each scope gets its own createLilinx singleton and poll proxy. Demo: /multi-backend-demo.

Transport (preferTransport)

Default: ws (WebSocket → SSE → HTTP poll). Poll fallback uses apiProxy when set.

// Provider-level (all channels under this backend)
<QwikLinkProvider
  url={import.meta.env.VITE_LINK_WS_URL}
  apiProxy="/api/lilinx"
  preferTransport="ws"
/>

// Per-channel override
const { store } = useChannel('jobs:demo', { preferTransport: 'poll' });

| Value | Behaviour | |-------|-----------| | 'ws' (default) | Try WebSocket first, fall back to SSE then poll | | 'sse' | Prefer SSE stream; poll as last resort | | 'poll' | HTTP poll only (edge/serverless) |

url and preferTransport serve different roles: url sets the backend address and hard transport limits (ws:// = WS only, poll:// = HTTP only). preferTransport chooses order within allowed transports. apiProxy is separate — same-origin Qwik route for poll + calls (CORS-safe), not a transport URL.

API

| Export | Purpose | |--------|---------| | QwikLinkProvider | Bootstrap (url, apiProxy, optional scope, preferTransport) | | useChannel | Channel → store.data, store.status, tick, channel.call | | useCall | Global router call | | acquireLinkSingleton(factory, scope?) | Keyed transport singleton | | wakeupLiveChannel(channel, scope?) | Scope-aware poll wakeup | | resolveLinkScope | scope ?? key ?? apiProxy ?? url |

Full reference: docs/packages/link-qwik.md.