He
HeliumTS
Note:

HeliumTS is under active development. Expect bugs and breaking changes. If you find any issues, please report them in our GitHub

Version 0.10.2 uses HTTP RPC and adds typed streaming with useStreaming.

Migrating to 0.10

HeliumTS 0.10 uses HTTP-only RPC and adds typed streaming through useStreaming. This is a breaking upgrade from 0.9. Upgrade the framework, matching scaffolder, templates, and deployed app together.

%npm install heliumts@^0.10.2
%npm create [email protected] my-app

Remove old connection settings and helpers

Removed APIMigration
rpc.transport and rpc.autoHttpOnMobileRemove them. All RPC uses HTTP.
rpc.compression and rpc.maxWsPayloadRemove them. HTTP compression is negotiated; use maxBodySize for incoming request bytes.
rpc.security.maxConnectionsPerIPRemove it. There are no framework RPC connections to count.
rpc.security.maxMessagesPerWindowRename to maxRequestsPerWindow; limits now share a window per client IP.
preconnect, getRpcTransport, isAutoHttpOnMobileEnabled, RpcTransportRemove these imports and related connection logic.
callMethod transport option and result.transportUse callMethod(method, args), returning data and stats.
1const config: HeliumConfig = {
2 rpc: {
3 maxBodySize: 1_048_576,
4 maxBatchSize: 20,
5 security: {
6 maxRequestsPerWindow: 100,
7 rateLimitWindowMs: 60_000,
8 tokenValidityMs: 30_000,
9 },
10 },
11};
12
13const { data, stats } = await callMethod(getTasks, { status: "open" });

The WebSocket RPC endpoint and client implementation are removed, not kept as compatibility no-ops. Rebuild and deploy the client and server together; refresh old open clients after the rollout. Vite's development HMR and application-owned external connections are separate from framework RPC.

Keep the typed application APIs

defineMethod, generated method stubs, useFetch, useCall, cache invalidation, callMethod, MessagePack, batching, middleware, SSR, and SSG remain. Hook arguments and normal method results keep their inferred types.

Update request and retry assumptions

ctx.req now describes the current HTTP request, with fresh cookies and headers for each call. Remove guards that assumed an upgrade request with GET /rpc; use method middleware and session checks. Rate limits and stats use the shared client-IP request window.

Network failures and server errors are not automatically replayed. The client may safely refresh an expired request token after an authorization rejection before retrying. Streaming requests are never replayed. Preserve request security, HELIUM_SECRET, and proxy trust configuration.

RPC request values may nest up to 128 containers (arrays and objects). Keep request payloads within this limit as well as the configured body-size and batch limits.

Add streaming when needed

Define an async generator using defineMethod and consume it with useStreaming. Pass the required ctx.signal to upstream work. Cancellation and partial failures preserve received output; a new start replaces it.

Read the streaming guide. The old transport comparison page and its synthetic benchmark endpoints have been removed.