@wrnexus/ai
Server-side Anthropic client with generation and streaming.
bun add @wrnexus/ai@0.2.15A tiny, zero-dependency Claude (Anthropic) client for WRNexusJS apps — generate and stream text with Claude from any server-side code.+ +
@wrnexus/ai
Server-side Anthropic client with generation and streaming.
Private registry access required
This package is not available from the public npm registry. After WorkRoot approves access and supplies private registry instructions, install the release-aligned package:
bun add @wrnexus/ai@0.2.15Request preview access. Never put registry tokens in source control.
A tiny, zero-dependency Claude (Anthropic) client for WRNexusJS apps — generate and stream text with Claude from any server-side code.
Part of the WRNexusJS framework — an SSR-first, Bun-native full-stack web framework.
Overview
@wrnexus/ai is a thin, dependency-free wrapper over the Anthropic Messages API, built on fetch (Bun-native, no SDK). Use it in API routes, jobs, or middleware to call Claude. It defaults to the most capable model, claude-opus-4-8, reads your key from ANTHROPIC_API_KEY, and supports both one-shot generation and streaming.
@anthropic-ai/sdk; talks to the Messages API directly.claude-opus-4-8. Pass { model } for a different model (e.g."claude-sonnet-5" for speed/cost, "claude-haiku-4-5" for the fastest).
Complete TypeScript API
This declaration is generated from the exact published package and lists its exported functions, classes, interfaces, and types.
/**
+Complete TypeScript API
This declaration comes from the exact installed package and lists its exported functions, classes, interfaces, and types.
/**
* @wrnexus/ai — a tiny, zero-dependency Claude (Anthropic) client for WRNexusJS apps.
*
* Use it in API routes, jobs, or anywhere server-side to generate text with Claude.
@@ -162,7 +164,7 @@ interface AI {
declare function createAI(config?: AIConfig): AI;
export { type AI, type AIConfig, AIError, type Effort, type GenerateOptions, type Message, type Role, createAI };
-Examples
Copy-ready examples taken from this package's published documentation.
Example 1
bun add @wrnexus/aiExample 2
ANTHROPIC_API_KEY=sk-ant-...Example 3
import { createAI } from "@wrnexus/ai";
+Examples
Examples are taken from this package's installed documentation and must be evaluated with its requirements and stability notes.
Example 1
bun add @wrnexus/aiExample 2
ANTHROPIC_API_KEY=sk-ant-...Example 3
import { createAI } from "@wrnexus/ai";
const ai = createAI(); // or createAI({ apiKey, model, maxTokens, baseURL, version })Example 4
const text = await ai.generate("Write a haiku about Bun.");
const reply = await ai.generate(
@@ -175,7 +177,7 @@ const reply = await ai.generate(
);@wrnexus/authz
Role, permission, policy, and authorization guards.
bun add @wrnexus/authz@0.2.15Composable authorization for WRNexusJS — role-based (RBAC), policy-based (PBAC), and attribute-based (ABAC) access control that reduces to a boolean check plus an authorize() guard.
+
+ @wrnexus/authz
Role, permission, policy, and authorization guards.
Private registry access required
This package is not available from the public npm registry. After WorkRoot approves access and supplies private registry instructions, install the release-aligned package:
bun add @wrnexus/authz@0.2.15Request preview access. Never put registry tokens in source control.
Composable authorization for WRNexusJS — role-based (RBAC), policy-based (PBAC), and attribute-based (ABAC) access control that reduces to a boolean check plus an authorize() guard.
Part of the WRNexusJS framework — an SSR-first, Bun-native full-stack web framework.
Overview
@wrnexus/authz is a small, server-side authorization toolkit. It gives you three interchangeable models — RBAC (roles → permissions), PBAC (policy predicates), and ABAC (attribute matchers) — that all collapse to a boolean | Promise<boolean> decision. Wrap any decision in a Middleware guard (authorize, requireRole, requirePermission) to protect WRNexusJS routes. Reach for it whenever a route or action needs to be gated on who the user is, what roles they hold, or attributes of the user and the resource. It plugs into @wrnexus/core by reading ctx.user as the authorization subject.
@wrnexus/core](../core) — the guards return Middleware and read the subject from ctx.user on the request Context. Both types are imported from @wrnexus/core.any, all) and authorize are async-aware, so policies may return a Promise<boolean> (e.g. for a database ownership check).Complete TypeScript API
This declaration is generated from the exact published package and lists its exported functions, classes, interfaces, and types.
import { Context, Middleware } from '@wrnexus/core';
+Complete TypeScript API
This declaration comes from the exact installed package and lists its exported functions, classes, interfaces, and types.
import { Context, Middleware } from '@wrnexus/core';
/**
* @wrnexus/authz — authorization: role-based (RBAC), policy-based (PBAC), and
@@ -168,7 +170,7 @@ declare function requireRole(...roles: string[]): Middleware;
declare function requirePermission(rbac: Rbac, permission: string): Middleware;
export { type Policy, type Rbac, type Subject, all, any, attr, authorize, defineRbac, hasRole, requirePermission, requireRole };
-Examples
Copy-ready examples taken from this package's published documentation.
Example 1
bun add @wrnexus/authzExample 2
import { defineRbac, hasRole } from "@wrnexus/authz";
+Examples
Examples are taken from this package's installed documentation and must be evaluated with its requirements and stability notes.
Example 1
bun add @wrnexus/authzExample 2
import { defineRbac, hasRole } from "@wrnexus/authz";
const rbac = defineRbac({
admin: ["*"],
@@ -226,7 +228,7 @@ app.put(
);@wrnexus/cli
Create, develop, build, generate, test, and maintain WRNexusJS apps.
bun add @wrnexus/cli@0.2.15The wrnexus command-line tool that scaffolds, runs, builds, tests, and manages WRNexusJS apps.
+
+ @wrnexus/cli
Create, develop, build, generate, test, and maintain WRNexusJS apps.
Private registry access required
This package is not available from the public npm registry. After WorkRoot approves access and supplies private registry instructions, install the release-aligned package:
bun add @wrnexus/cli@0.2.15Request preview access. Never put registry tokens in source control.
The wrnexus command-line tool that scaffolds, runs, builds, tests, and manages WRNexusJS apps.
Part of the WRNexusJS framework — an SSR-first, Bun-native full-stack web framework.
Overview
@wrnexus/cli provides the wrnexus executable — the single entry point for developing a WRNexusJS app. It runs the HMR dev server, produces a self-contained production build, scaffolds apps/pages/components, drives database migrations, regenerates typed routes and queries, runs tests, and manages configuration profiles. It also scaffolds multi-app monorepos and serves them behind a domain-routing gateway. This is a CLI/build-time package (it shells out to the Bun binary for the dev child and tests) and it also exports the workspace config types via a subpath.
bun test, and the production build uses Bun.build. Node is not supported.@wrnexus/dev-server (dev/prod server + gateway), @wrnexus/router (route + typed-routes codegen), @wrnexus/compiler (.wrn → .ts), @wrnexus/db (migrations, typed queries), @wrnexus/styles (config, profiles, .env, themes, styles), @wrnexus/ui (ejectable Wire UI components), @wrnexus/validation, @wrnexus/csr, and @wrnexus/i18n.wrnexus.config.ts for db / databases, theme, styles, seo, security, i18n, and profiles, and wrnexus.workspace.ts for the gateway.Complete TypeScript API
This declaration is generated from the exact published package and lists its exported functions, classes, interfaces, and types.
#!/usr/bin/env bun
-Examples
Copy-ready examples taken from this package's published documentation.
Example 1
bun add @wrnexus/cliExample 2
bunx wrnexus dev
+Complete TypeScript API
This declaration comes from the exact installed package and lists its exported functions, classes, interfaces, and types.
#!/usr/bin/env bun
+
Examples
Examples are taken from this package's installed documentation and must be evaluated with its requirements and stability notes.
Example 1
bun add @wrnexus/cli
Example 2
bunx wrnexus dev
# or add scripts: "dev": "wrnexus dev .", "build": "wrnexus build ."
Example 3
wrnexus dev . --port=8080
Example 4
bun dist/server.js # PORT env var optional
# Generated apps also provide: npm start
# Build and start together: npm run production
@wrnexus/compiler
Parser and code generators for the .wrn language.
bun add @wrnexus/compiler@0.2.15Compiler for the+ +.wrnlanguage — tokenizes, parses, and lowers.wrnpage and component files to TypeScript.
@wrnexus/compiler
Parser and code generators for the .wrn language.
Private registry access required
This package is not available from the public npm registry. After WorkRoot approves access and supplies private registry instructions, install the release-aligned package:
bun add @wrnexus/compiler@0.2.15Request preview access. Never put registry tokens in source control.
Compiler for the.wrnlanguage — tokenizes, parses, and lowers.wrnpage and component files to TypeScript.
Part of the WRNexusJS framework — an SSR-first, Bun-native full-stack web framework.
Overview
@wrnexus/compiler turns .wrn source into TypeScript that targets the framework's runtime primitives. A .wrn file declares either a page (a route) or a component (a reusable, prop-driven fragment) with blocks for state, view (plain HTML), seo, style, functions, api, ssr/client data bindings, and realtime websocket handlers. The pipeline is source → Lexer → parse() → PageAst → generate() → TypeScript. It is a build/server-side library — the WRNexusJS dev loader calls it to compile .wrn files on the fly, surfacing ParseError as a readable error page.
- Pure TypeScript with no runtime dependencies; runs under Bun as part of the WRNexusJS toolchain (Node is not supported).
- Generated modules target WRNexusJS runtime primitives (
data-scope,data-text,data-on-*,data-for,data-component,__wrnexus*/__wire*helpers) — consume the output within a WRNexusJS app, e.g. via@wrnexus/core's dev loader.
-
Complete TypeScript API
This declaration is generated from the exact published package and lists its exported functions, classes, interfaces, and types.
/**
+Complete TypeScript API
This declaration comes from the exact installed package and lists its exported functions, classes, interfaces, and types.
/**
* Recursive-descent parser for `.wrn`, producing a small AST.
*
* Grammar (subset of the vision, but real):
@@ -328,7 +330,7 @@ declare function compileWireFile(source: string): string;
declare function compile(source: string): CompileResult;
export { type ApiBlock, type Attr, type CompileResult, type DataApiBlock, type DataMode, LexError, Lexer, type ModeFunctionsBlock, NativeCompileError, type PageAst, ParseError, type RealtimeBlock, type SeoBlock, type StateDecl, type ViewNode, compile, compileNativeWireFile, compileWireFile, generate, generateNative, parse };
-Examples
Copy-ready examples taken from this package's published documentation.
Example 1
bun add @wrnexus/compilerExample 2
interface CompileResult {
+Examples
Examples are taken from this package's installed documentation and must be evaluated with its requirements and stability notes.
Example 1
bun add @wrnexus/compilerExample 2
interface CompileResult {
code: string;
ast: PageAst;
diagnostics: string[];
@@ -355,7 +357,7 @@ page Home {
// returning an HTML string, wrapped in a data-scope for the reactive runtime.@wrnexus/core
Contexts, middleware, security, sessions, caching, JSX, and realtime.
bun add @wrnexus/core@0.2.15The framework core: the request Context, middleware contract, and the security, session, caching, streaming, realtime, and JSX primitives every other WRNexusJS package builds on.
+
+ @wrnexus/core
Contexts, middleware, security, sessions, caching, JSX, and realtime.
Private registry access required
This package is not available from the public npm registry. After WorkRoot approves access and supplies private registry instructions, install the release-aligned package:
bun add @wrnexus/core@0.2.15Request preview access. Never put registry tokens in source control.
The framework core: the request Context, middleware contract, and the security, session, caching, streaming, realtime, and JSX primitives every other WRNexusJS package builds on.
Part of the WRNexusJS framework — an SSR-first, Bun-native full-stack web framework.
Overview
@wrnexus/core is the shared foundation of WRNexusJS. It defines the Context object that flows through every middleware, page, and API route, plus the Middleware/Next contract they implement. On top of that it ships the building blocks a real app needs: cookie-backed sessions, password auth, CSRF protection, rate limiting, request logging, HTTP + in-memory caching, file uploads, streaming/SSE responses, WebSocket "rooms", security headers/CORS, and a server-side JSX runtime that renders to HTML strings. Everything here is server-side and Bun-native (it uses Bun.password, Bun.write, the web-standard Request/Response, and crypto). You depend on it directly and transitively through the rest of the framework.
compatible with [@wrnexus/pubsub](../pubsub); the security, auth, and JSX primitives here are consumed by the WRNexusJS server/router packages.
@wrnexus/core/jsx-runtime and @wrnexus/core/jsx-dev-runtimefor TypeScript's automatic JSX transform.
-Complete TypeScript API
This declaration is generated from the exact published package and lists its exported functions, classes, interfaces, and types.
export { Fragment, Html, Component as JSXComponent, Props as JSXProps, Renderable, jsx, jsxs, mustache } from './jsx-runtime.js';
+Complete TypeScript API
This declaration comes from the exact installed package and lists its exported functions, classes, interfaces, and types.
export { Fragment, Html, Component as JSXComponent, Props as JSXProps, Renderable, jsx, jsxs, mustache } from './jsx-runtime.js';
interface CookieOptions {
path?: string;
@@ -926,7 +928,7 @@ declare function resolveRequestUrl(req: Request, trustProxy?: boolean): URL;
declare function withSecurityHeaders(req: Request, res: Response, mode: Mode, security?: SecurityConfig, nonce?: string): Response;
export { type AsyncSessionBackend, type Bucket, CSRF_COOKIE, CSRF_HEADER, type CacheControlOptions, type ContentSecurityPolicyConfig, type Context, type CookieOptions, type CookieStore, type CorsConfig, type CorsOrigin, type CspDirectiveValue, type HstsConfig, type LocalStorageSnapshot, type Middleware, type Mode, type Next, type PageComponent, type PageMeta, type PermissionsPolicyConfig, type RateLimitOptions, type RateLimitStore, type RawSocket, type RealtimeBridge, type RealtimeBus, type RealtimeConnectMeta, type RealtimeEnvelope, type RealtimeHandler, type RealtimeRegistry, type RealtimeSocket, type RequestLoggerOptions, type RequestRecord, type RequireAuthOptions, type Room, type RoomAuthInfo, type RoomClient, type RoomDefinition, type RoomHandlers, SESSION_USER_KEY, type SaveUploadOptions, type SavedUpload, type SecurityConfig, type SeoConfig, type ServerSentEvent, type SessionBackend, type SessionEntry, type SessionStore, type StreamResponseInit, type TFunction, TTLCache, type Target, type TrustedTypesConfig, UploadError, bridgeRealtime, cacheControl, collectUploads, createContext, createCorsPreflightResponse, createRealtimeRegistry, csrfProtection, csrfToken, defaultKey, defineRoom, escapeHtml, etag, getUser, hashPassword, isRoomDefinition, isSafeIslandName, isSafeRequestPath, isWebSocketOriginAllowed, loadSession, logIn, logOut, notModified, peerKey, proxyKey, rateLimit, renderDevError, renderError, renderNotFound, renderProdError, renderStatusPage, requestLogger, requireAuth, resolveRequestUrl, sanitizeFilename, saveUpload, sessionAuth, setSessionBackend, sse, streamResponse, verifyCsrf, verifyPassword, withCacheControl, withContextHeaders, withSecurityHeaders };
-Examples
Copy-ready examples taken from this package's published documentation.
Example 1
bun add @wrnexus/coreExample 2
// tsconfig.json
+Examples
Examples are taken from this package's installed documentation and must be evaluated with its requirements and stability notes.
Example 1
bun add @wrnexus/coreExample 2
// tsconfig.json
{
"compilerOptions": {
"jsx": "react-jsx",
@@ -962,7 +964,7 @@ if (await verifyPassword(form.password, user.passwordHash)) {
const current = getUser<{ id: string }>(ctx); // or null@wrnexus/csr
Reactive, navigation, and realtime browser runtimes.
bun add @wrnexus/csr@0.2.15The browser-side client runtime for WRNexusJS — generic, self-contained JS that hydrates server-rendered pages with reactivity, client-side navigation, and realtime rooms.+ +
@wrnexus/csr
Reactive, navigation, and realtime browser runtimes.
Private registry access required
This package is not available from the public npm registry. After WorkRoot approves access and supplies private registry instructions, install the release-aligned package:
bun add @wrnexus/csr@0.2.15Request preview access. Never put registry tokens in source control.
The browser-side client runtime for WRNexusJS — generic, self-contained JS that hydrates server-rendered pages with reactivity, client-side navigation, and realtime rooms.
Part of the WRNexusJS framework — an SSR-first, Bun-native full-stack web framework.
Overview
@wrnexus/csr holds the three client runtimes that WRNexusJS serves to the browser. Components are authored as .wrn files and rendered on the server; this package provides the single, generic runtime that hydrates that HTML in the browser — there are no per-component browser bundles. Each runtime is exported as a plain-JS string (no build step, no imports) intended to be served verbatim from a well-known URL:
eval/new Function (no unsafe-eval), and DOM swaps use importNode/attribute writes rather than innerHTML (Trusted-Types friendly)..wrn components and the serving layer come from @wrnexus/core (the sole dependency); pages are rendered by the WRNexusJS dev/prod server.Complete TypeScript API
This declaration is generated from the exact published package and lists its exported functions, classes, interfaces, and types.
/**
+Complete TypeScript API
This declaration comes from the exact installed package and lists its exported functions, classes, interfaces, and types.
/**
* Browser reactive runtime (Point 2: reactive directives).
*
* Served verbatim at `/__wrnexus/reactive.js` for any page that contains a
@@ -196,7 +198,7 @@ declare function getNavRuntime(): string;
declare function getRealtimeRuntime(): string;
export { NAV_RUNTIME, REACTIVE_RUNTIME, REALTIME_RUNTIME, getNavRuntime, getReactiveRuntime, getRealtimeRuntime };
-Examples
Copy-ready examples taken from this package's published documentation.
Example 1
bun add @wrnexus/csrExample 2
getReactiveRuntime(): string // → REACTIVE_RUNTIME
+Examples
Examples are taken from this package's installed documentation and must be evaluated with its requirements and stability notes.
Example 1
bun add @wrnexus/csrExample 2
getReactiveRuntime(): string // → REACTIVE_RUNTIME
getNavRuntime(): string // → NAV_RUNTIME
getRealtimeRuntime(): string // → REALTIME_RUNTIMEExample 3
wire.room(name): Room // open (or reuse) a room connection
wire.bindRooms(root?) // (re)bind declarative [data-room] containers
@@ -228,7 +230,7 @@ Bun.serve({
});@wrnexus/db
Database adapters, typed queries, models, migrations, and sessions.
bun add @wrnexus/db@0.2.15The database layer for WRNexusJS: TS models as the single source of truth for DDL, validation, and result typing, plus a driver-based Db client, migrations, and a sqlc-style query generator.
+
+ @wrnexus/db
Database adapters, typed queries, models, migrations, and sessions.
Private registry access required
This package is not available from the public npm registry. After WorkRoot approves access and supplies private registry instructions, install the release-aligned package:
bun add @wrnexus/db@0.2.15Request preview access. Never put registry tokens in source control.
The database layer for WRNexusJS: TS models as the single source of truth for DDL, validation, and result typing, plus a driver-based Db client, migrations, and a sqlc-style query generator.
Part of the WRNexusJS framework — an SSR-first, Bun-native full-stack web framework.
Overview
@wrnexus/db is the server-side data layer. You describe tables as TypeScript models (the v column builder + table()); those models drive migrations, coerce raw DB rows into typed objects, and feed the query generator. A thin Driver interface is implemented by adapters for SQLite (bun:sqlite), Postgres/MySQL (Bun.SQL), and MongoDB. The Db client adds ergonomics — model-mapped all/one, transactions, createTable, pagination, and batched relation loading. A process-wide registry (getDb/setDb) exposes configured connections to pages and API routes. Reach for it whenever a WRNexusJS app needs persistence.
SessionBackend; getDb/setDb are wired by the WRNexusJS runtime from wrnexus.config.ts.
mongodb npm package is an optional, lazily-imported peer — install itonly if you use @wrnexus/db/mongo. The core package stays dependency-free.
Complete TypeScript API
This declaration is generated from the exact published package and lists its exported functions, classes, interfaces, and types.
import { M as Model } from './schema-tVurYsbL.js';
+Complete TypeScript API
This declaration comes from the exact installed package and lists its exported functions, classes, interfaces, and types.
import { M as Model } from './schema-tVurYsbL.js';
export { B as BaseType, C as Column, a as ColumnDef, b as Columns, t as table, v } from './schema-tVurYsbL.js';
import { a as Db, b as Dialect, R as Row } from './driver-DA53QHkO.js';
export { D as Driver, E as ExecResult, T as TxHandle, c as createDb, d as createTableSql } from './driver-DA53QHkO.js';
@@ -302,7 +304,7 @@ interface RelationOptions<C> {
declare function loadRelated<P extends Row, C extends Row = Row>(db: Db, parents: P[], opts: RelationOptions<C>): Promise<(P & Record<string, C | C[] | null>)[]>;
export { Db, Dialect, type Migration, Model, type ModelRef, type PageOptions, type Paginated, type QueryDef, type QueryKind, type RelationOptions, Row, appliedMigrations, closeDatabases, databaseNames, generateQueriesFile, getDb, hasDb, loadMigrations, loadRelated, migrate, paginate, parseMigration, parseQueries, registerDb, rollback, scaffoldMigration, setDb, status };
-Examples
Copy-ready examples taken from this package's published documentation.
Example 1
bun add @wrnexus/dbExample 2
import { v, table } from "@wrnexus/db";
+Examples
Examples are taken from this package's installed documentation and must be evaluated with its requirements and stability notes.
Example 1
bun add @wrnexus/dbExample 2
import { v, table } from "@wrnexus/db";
const users = table("users", {
id: v.id(), // auto-increment primary key
@@ -315,7 +317,7 @@ const users = table("users", {
const events = await getDb("analytics").all("SELECT * FROM hits");@wrnexus/dev-server
Development and production servers, HMR, assets, and gateways.
bun add @wrnexus/dev-server@0.2.15The WRNexusJS HTTP + WebSocket server runtime — request dispatch, SSR document assembly, live-reload (HMR), and the portable production handler.+ +
@wrnexus/dev-server
Development and production servers, HMR, assets, and gateways.
Private registry access required
This package is not available from the public npm registry. After WorkRoot approves access and supplies private registry instructions, install the release-aligned package:
bun add @wrnexus/dev-server@0.2.15Request preview access. Never put registry tokens in source control.
The WRNexusJS HTTP + WebSocket server runtime — request dispatch, SSR document assembly, live-reload (HMR), and the portable production handler.
Part of the WRNexusJS framework — an SSR-first, Bun-native full-stack web framework.
Overview
This package is the server runtime that powers a WRNexusJS app in both development and production. A single request runtime (createHandlers) owns HTTP/WebSocket dispatch and SSR document assembly; it knows nothing about _how_ modules and assets are produced, so the dev and prod entry points wire in different backends: dev uses dynamic module loading plus on-the-fly bundling and injects a live-reload client; prod uses a static, pre-built manifest with cache-immutable assets. The package also ships a multi-app gateway (route several apps by Host header behind one port) and a portable node:http adapter for WinterCG hosts. It is entirely server-side and Bun-native (Bun.serve, Bun.file, Bun.gzipSync).
Cache-Control: no-transform.</content>
-</invoke>
Complete TypeScript API
This declaration is generated from the exact published package and lists its exported functions, classes, interfaces, and types.
import { Mode, Middleware, SeoConfig, SecurityConfig, RealtimeBus, RealtimeConnectMeta } from '@wrnexus/core';
+</invoke>
Complete TypeScript API
This declaration comes from the exact installed package and lists its exported functions, classes, interfaces, and types.
import { Mode, Middleware, SeoConfig, SecurityConfig, RealtimeBus, RealtimeConnectMeta } from '@wrnexus/core';
import { Router } from '@wrnexus/router';
import { ResolvedTheme, MobileConfig, PwaConfig, StylesConfig, ThemeConfig } from '@wrnexus/styles';
import { ResolvedI18n, I18nConfig } from '@wrnexus/i18n';
@@ -648,7 +650,7 @@ interface RunningServer {
declare function startServer(opts: ServeOptions): Promise<RunningServer>;
export { type AssetServer, type FetchHandler, type GatewayApp, type GatewayAuth, type GatewayOptions, type GatewaySecurity, RESTART_EXIT_CODE, type RunningGateway, type RunningServer, type RuntimeDeps, type ServeOptions, type WsData, createHandlers, createProductionHandlers, createProductionServer, nodeListener, serveNode, startGateway, startServer, toRequest, writeResponse };
-Examples
Copy-ready examples taken from this package's published documentation.
Example 1
bun add @wrnexus/dev-serverExample 2
interface ServeOptions {
+Examples
Examples are taken from this package's installed documentation and must be evaluated with its requirements and stability notes.
Example 1
bun add @wrnexus/dev-serverExample 2
interface ServeOptions {
appDir: string; // absolute/relative path to the app/ dir
port?: number; // default 3000
hostname?: string; // default "localhost"
@@ -729,7 +731,7 @@ interface ProdOptions {
}@wrnexus/encryption
Hashing, HMAC, authenticated encryption, and key derivation.
bun add @wrnexus/encryption@0.2.15Dependency-free crypto helpers for WRNexusJS: authenticated symmetric encryption (AES-256-GCM), hashing, and HMAC signing.+ +
@wrnexus/encryption
Hashing, HMAC, authenticated encryption, and key derivation.
Private registry access required
This package is not available from the public npm registry. After WorkRoot approves access and supplies private registry instructions, install the release-aligned package:
bun add @wrnexus/encryption@0.2.15Request preview access. Never put registry tokens in source control.
Dependency-free crypto helpers for WRNexusJS: authenticated symmetric encryption (AES-256-GCM), hashing, and HMAC signing.
Part of the WRNexusJS framework — an SSR-first, Bun-native full-stack web framework.
Overview
This package provides small, focused cryptographic primitives for server-side use: encrypting secrets/tokens/database fields at rest with AES-256-GCM, deriving keys from passwords via PBKDF2, computing SHA-256 digests, and signing/verifying payloads with HMAC-SHA256. It is built entirely on the standard Web Crypto API (crypto.subtle) plus btoa/atob and TextEncoder/TextDecoder — no third-party dependencies. Reach for it whenever you need to protect sensitive values or verify webhook signatures. All functions are async (Web Crypto is promise-based).
Complete TypeScript API
This declaration is generated from the exact published package and lists its exported functions, classes, interfaces, and types.
/**
+Complete TypeScript API
This declaration comes from the exact installed package and lists its exported functions, classes, interfaces, and types.
/**
* @wrnexus/encryption — authenticated symmetric encryption (AES-256-GCM) via
* WebCrypto, dependency-free. Use it to encrypt secrets, tokens, or database
* fields at rest.
@@ -90,7 +92,7 @@ declare function decrypt(payload: string, key: string): Promise<string>;
declare function deriveKey(password: string, salt: string): Promise<string>;
export { decrypt, deriveKey, encrypt, generateKey, hmacSign, hmacVerify, sha256 };
-Examples
Copy-ready examples taken from this package's published documentation.
Example 1
bun add @wrnexus/encryptionExample 2
import { generateKey, encrypt, decrypt } from "@wrnexus/encryption";
+Examples
Examples are taken from this package's installed documentation and must be evaluated with its requirements and stability notes.
Example 1
bun add @wrnexus/encryptionExample 2
import { generateKey, encrypt, decrypt } from "@wrnexus/encryption";
const key = await generateKey(); // store this safely (env/secret manager)
@@ -107,7 +109,7 @@ const ok = await hmacVerify(rawBody, webhookSecret, incomingSignatureHeader);
if (!ok) throw new Error("Invalid webhook signature");@wrnexus/i18n
Translation loading, locale resolution, and Intl formatting.
bun add @wrnexus/i18n@0.2.15Per-request translations plus locale-aware number, date, and currency formatting for WRNexusJS apps.+ +
@wrnexus/i18n
Translation loading, locale resolution, and Intl formatting.
Private registry access required
This package is not available from the public npm registry. After WorkRoot approves access and supplies private registry instructions, install the release-aligned package:
bun add @wrnexus/i18n@0.2.15Request preview access. Never put registry tokens in source control.
Per-request translations plus locale-aware number, date, and currency formatting for WRNexusJS apps.
Part of the WRNexusJS framework — an SSR-first, Bun-native full-stack web framework.
Overview
@wrnexus/i18n loads locale files from app/locales/<lang>.json, resolves the active language for each request (cookie → Accept-Language → default), and builds a t(key, params) translator used both in server code and in .wrn views. It also ships Intl-based formatting helpers and a tiny client runtime that wires up a language switcher. Translation lookup, language resolution, and HTML marker rewriting run server-side; only the small I18N_RUNTIME snippet runs in the browser.
comes from core, and the resolved translator is exposed as ctx.t / ctx.lang in request handling.
on . to walk the object tree.
Complete TypeScript API
This declaration is generated from the exact published package and lists its exported functions, classes, interfaces, and types.
import { TFunction } from '@wrnexus/core';
+Complete TypeScript API
This declaration comes from the exact installed package and lists its exported functions, classes, interfaces, and types.
import { TFunction } from '@wrnexus/core';
/**
* Locale-aware formatting helpers (Intl-based) + pluralization. Pair with the
@@ -181,7 +183,7 @@ declare function renderI18nData(i18n: ResolvedI18n, lang: string): string;
declare const I18N_RUNTIME: string;
export { I18N_JS_HREF, I18N_RUNTIME, type I18nConfig, LANG_COOKIE, type Messages, type ResolvedI18n, formatCurrency, formatDate, formatNumber, formatRelativeTime, loadLocales, makeT, plural, renderI18nData, resolveI18n, resolveLang, translateHtml };
-Examples
Copy-ready examples taken from this package's published documentation.
Example 1
bun add @wrnexus/i18nExample 2
import {
+Examples
Examples are taken from this package's installed documentation and must be evaluated with its requirements and stability notes.
Example 1
bun add @wrnexus/i18nExample 2
import {
loadLocales,
resolveI18n,
resolveLang,
@@ -209,7 +211,7 @@ const finalHtml = translateHtml(renderedHtml, t);@wrnexus/jwt
HS256 JWT signing, verification, and bearer authentication.
bun add @wrnexus/jwt@0.2.15Dependency-free JSON Web Tokens (HS256) via Web Crypto, plus a bearer-token auth middleware for WRNexusJS.+ +
@wrnexus/jwt
HS256 JWT signing, verification, and bearer authentication.
Private registry access required
This package is not available from the public npm registry. After WorkRoot approves access and supplies private registry instructions, install the release-aligned package:
bun add @wrnexus/jwt@0.2.15Request preview access. Never put registry tokens in source control.
Dependency-free JSON Web Tokens (HS256) via Web Crypto, plus a bearer-token auth middleware for WRNexusJS.
Part of the WRNexusJS framework — an SSR-first, Bun-native full-stack web framework.
Overview
@wrnexus/jwt signs and verifies stateless JSON Web Tokens using the HS256 (HMAC-SHA-256) algorithm. It has no runtime dependencies — signing and verification are implemented directly on the standard Web Crypto API (crypto.subtle), which Bun provides natively. It runs server-side and pairs with the session-based auth in @wrnexus/core, giving you a stateless option for API and mobile clients. Reach for it when you need bearer-token auth rather than cookie sessions.
are not supported.
@wrnexus/core](../core) for Context, Middleware, andctx.user; it complements the framework's cookie/session auth with a stateless bearer-token flow for API and mobile clients.
Complete TypeScript API
This declaration is generated from the exact published package and lists its exported functions, classes, interfaces, and types.
import { Context, Middleware } from '@wrnexus/core';
+Complete TypeScript API
This declaration comes from the exact installed package and lists its exported functions, classes, interfaces, and types.
import { Context, Middleware } from '@wrnexus/core';
/**
* @wrnexus/jwt — dependency-free JSON Web Tokens (HS256) via WebCrypto, plus a
@@ -138,14 +140,14 @@ interface JwtAuthOptions {
declare function jwtAuth(options: JwtAuthOptions): Middleware;
export { type JwtAuthOptions, type JwtClaims, JwtError, type SignOptions, jwtAuth, signJwt, verifyJwt };
-Examples
Copy-ready examples taken from this package's published documentation.
Example 1
bun add @wrnexus/jwtExample 2
function signJwt(payload: JwtClaims, secret: string, options?: SignOptions): Promise<string>;Example 3
function verifyJwt<T extends JwtClaims = JwtClaims>(
+Examples
Examples are taken from this package's installed documentation and must be evaluated with its requirements and stability notes.
Example 1
bun add @wrnexus/jwtExample 2
function signJwt(payload: JwtClaims, secret: string, options?: SignOptions): Promise<string>;Example 3
function verifyJwt<T extends JwtClaims = JwtClaims>(
token: string,
secret: string,
options?: { now?: number },
): Promise<T>;Example 4
function jwtAuth(options: JwtAuthOptions): Middleware;@wrnexus/mobile
SSR-safe compatibility access to Capacitor plugins.
bun add @wrnexus/mobile@0.2.15SSR-safe access to Capacitor plugins from WRNexusJS browser code.
+ +@wrnexus/mobile
SSR-safe compatibility access to Capacitor plugins.
Private registry access required
This package is not available from the public npm registry. After WorkRoot approves access and supplies private registry instructions, install the release-aligned package:
bun add @wrnexus/mobile@0.2.15Request preview access. Never put registry tokens in source control.
SSR-safe access to Capacitor plugins from WRNexusJS browser code.
wrnexus mobile add @capacitor/camera
import { Camera } from "@capacitor/camera";
import { mobile } from "@wrnexus/mobile";
@@ -23,7 +25,7 @@ if (mobile.isNative()) {
const photo = await mobile.invoke("Camera", "getPhoto", { resultType: "uri" });
}
isNative() is false and platform() is web during SSR. plugin() returns undefined when unavailable; requirePlugin() and invoke() throw an actionable MobileUnavailableError.
Import and register Capacitor packages only from browser-owned code. Do not import them in server routes, SSR helpers, or other Bun-only modules.
Complete TypeScript API
This declaration is generated from the exact published package and lists its exported functions, classes, interfaces, and types.
export { native } from '@wrnexus/native';
+Import and register Capacitor packages only from browser-owned code. Do not import them in server routes, SSR helpers, or other Bun-only modules.
Complete TypeScript API
This declaration comes from the exact installed package and lists its exported functions, classes, interfaces, and types.
export { native } from '@wrnexus/native';
/** @wrnexus/mobile — SSR-safe access to Capacitor's native bridge. */
@@ -61,7 +63,7 @@ declare const mobile: {
};
export { type CapacitorBridge, type MobilePlatform, MobileUnavailableError, invoke, isNative, mobile, platform, plugin, registerPlugin, requirePlugin, whenNative };
-Examples
Copy-ready examples taken from this package's published documentation.
Example 1
wrnexus mobile add @capacitor/cameraExample 2
import { Camera } from "@capacitor/camera";
+Examples
Examples are taken from this package's installed documentation and must be evaluated with its requirements and stability notes.
Example 1
wrnexus mobile add @capacitor/cameraExample 2
import { Camera } from "@capacitor/camera";
import { mobile } from "@wrnexus/mobile";
if (mobile.isNative()) {
@@ -70,7 +72,7 @@ if (mobile.isNative()) {
}@wrnexus/native
Cross-platform browser and Capacitor capability registry.
bun add @wrnexus/native@0.2.15Cross-platform capabilities for browsers, Capacitor WebViews, and compiled native apps.
+ +@wrnexus/native
Cross-platform browser and Capacitor capability registry.
Private registry access required
This package is not available from the public npm registry. After WorkRoot approves access and supplies private registry instructions, install the release-aligned package:
bun add @wrnexus/native@0.2.15Request preview access. Never put registry tokens in source control.
Cross-platform capabilities for browsers, Capacitor WebViews, and compiled native apps.
import { native } from "@wrnexus/native";
if (native.supports("share")) await native.run("share", { title: "WRNexusJS", url: location.href });
Built-ins include camera, clipboard.write, share, geolocation, network, haptics, storage, filesystem, notifications, and device information. Browser capabilities use Web APIs; mobile capabilities use installed Capacitor plugins.
platform() returns server during SSR, browser on the web, and the Capacitor platform in a native WebView. Unsupported operations reject with NativeUnavailableError; use supports() before presenting optional UI.
Complete TypeScript API
This declaration is generated from the exact published package and lists its exported functions, classes, interfaces, and types.
import { N as NativePlatform, a as NativeCapability, b as NativeRunOptions, c as NativeTarget } from './types-CDShWg0i.js';
+platform() returns server during SSR, browser on the web, and the Capacitor platform in a native WebView. Unsupported operations reject with NativeUnavailableError; use supports() before presenting optional UI.
Complete TypeScript API
This declaration comes from the exact installed package and lists its exported functions, classes, interfaces, and types.
import { N as NativePlatform, a as NativeCapability, b as NativeRunOptions, c as NativeTarget } from './types-CDShWg0i.js';
export { d as NativeAdapter, e as NativeBrowserRuntime } from './types-CDShWg0i.js';
export { browserCapabilities } from './browser.js';
export { mobileCapabilities } from './mobile.js';
@@ -44,12 +46,12 @@ declare const native: {
};
export { NativeCapability, NativePlatform, NativeRunOptions, NativeTarget, NativeUnavailableError, clearRegistry, isMobile, native, platform, register, registered, run, supports };
-Examples
Copy-ready examples taken from this package's published documentation.
Example 1
import { native } from "@wrnexus/native";
+Examples
Examples are taken from this package's installed documentation and must be evaluated with its requirements and stability notes.
Example 1
import { native } from "@wrnexus/native";
if (native.supports("share")) await native.run("share", { title: "WRNexusJS", url: location.href });@wrnexus/oauth
OAuth 2.0, PKCE, provider presets, and profile mapping.
bun add @wrnexus/oauth@0.2.15Dependency-free OAuth 2.0 sign-in for any provider, with PKCE and presets for Google, GitHub, and Discord.+ +
@wrnexus/oauth
OAuth 2.0, PKCE, provider presets, and profile mapping.
Private registry access required
This package is not available from the public npm registry. After WorkRoot approves access and supplies private registry instructions, install the release-aligned package:
bun add @wrnexus/oauth@0.2.15Request preview access. Never put registry tokens in source control.
Dependency-free OAuth 2.0 sign-in for any provider, with PKCE and presets for Google, GitHub, and Discord.
Part of the WRNexusJS framework — an SSR-first, Bun-native full-stack web framework.
Overview
@wrnexus/oauth implements the OAuth 2.0 Authorization Code flow (with PKCE) for server-side sign-in. It ships ready-made provider presets and a defineProvider helper for custom providers, then gives you two flow functions — startAuth (build the redirect) and completeAuth (exchange the code and fetch the user's profile). It has no runtime dependencies: it uses the platform fetch and WebCrypto only. Pairs naturally with @wrnexus/core's logIn to establish a session once you have a normalized profile.
verifier between startAuth and completeAuth (session or signed cookie).
@wrnexus/core](../core) — feed the normalized OAuthProfile intologIn to establish a session.
Complete TypeScript API
This declaration is generated from the exact published package and lists its exported functions, classes, interfaces, and types.
/**
+Complete TypeScript API
This declaration comes from the exact installed package and lists its exported functions, classes, interfaces, and types.
/**
* @wrnexus/oauth — OAuth 2.0 sign-in with any provider. Ships presets for Google,
* GitHub, and Discord, and `defineProvider` for a custom one. Dependency-free
* (uses `fetch` + WebCrypto for PKCE). Pairs with @wrnexus/core's `logIn`.
@@ -236,7 +238,7 @@ declare function exchangeCode(provider: OAuthProvider, options: CompleteAuthOpti
declare function fetchProfile(provider: OAuthProvider, tokens: OAuthTokens, fetchImpl?: FetchLike): Promise<OAuthProfile>;
export { type CompleteAuthOptions, type OAuthProfile, type OAuthProvider, type OAuthTokens, type ProviderCredentials, type StartAuthOptions, type StartAuthResult, completeAuth, defineProvider, discord, exchangeCode, fetchProfile, github, google, randomToken, startAuth };
-Examples
Copy-ready examples taken from this package's published documentation.
Example 1
bun add @wrnexus/oauthExample 2
interface ProviderCredentials {
+Examples
Examples are taken from this package's installed documentation and must be evaluated with its requirements and stability notes.
Example 1
bun add @wrnexus/oauthExample 2
interface ProviderCredentials {
clientId: string;
clientSecret: string;
scopes?: string[]; // override the preset's default scopes
@@ -263,7 +265,7 @@ interface StartAuthResult {
}@wrnexus/pubsub
In-process and Redis-backed publish/subscribe.
bun add @wrnexus/pubsub@0.2.15Topic-based publish/subscribe with a pluggable driver — in-process by default, Redis for cross-process messaging.+ +
@wrnexus/pubsub
In-process and Redis-backed publish/subscribe.
Private registry access required
This package is not available from the public npm registry. After WorkRoot approves access and supplies private registry instructions, install the release-aligned package:
bun add @wrnexus/pubsub@0.2.15Request preview access. Never put registry tokens in source control.
Topic-based publish/subscribe with a pluggable driver — in-process by default, Redis for cross-process messaging.
Part of the WRNexusJS framework — an SSR-first, Bun-native full-stack web framework.
Overview
@wrnexus/pubsub is a small server-side pub/sub bus. You publish messages to a topic and subscribe with topic patterns; handlers fire for matching topics. The default driver keeps everything in-process, and you can swap in the Redis driver (@wrnexus/pubsub/redis) to fan messages out across processes or hosts. It also backs @wrnexus/core's realtime bridge for horizontal scaling.
REDIS_URL from the environment when no url is passed.@wrnexus/core](../core)'s realtime bridge for horizontal scaling.Complete TypeScript API
This declaration is generated from the exact published package and lists its exported functions, classes, interfaces, and types.
/**
+Complete TypeScript API
This declaration comes from the exact installed package and lists its exported functions, classes, interfaces, and types.
/**
* @wrnexus/pubsub — topic-based publish/subscribe with a pluggable driver.
* The default is in-process; swap in a Redis/NATS driver for cross-instance
* messaging (it also backs @wrnexus/core's realtime bridge).
@@ -120,7 +122,7 @@ declare function memoryDriver(): PubSubDriver;
declare function createPubSub(driver?: PubSubDriver): PubSub;
export { type Handler, type PubSub, type PubSubDriver, createPubSub, memoryDriver };
-Examples
Copy-ready examples taken from this package's published documentation.
Example 1
bun add @wrnexus/pubsubExample 2
interface PubSub {
+Examples
Examples are taken from this package's installed documentation and must be evaluated with its requirements and stability notes.
Example 1
bun add @wrnexus/pubsubExample 2
interface PubSub {
publish<T = unknown>(topic: string, message: T): Promise<void>;
subscribe<T = unknown>(pattern: string, handler: Handler<T>): () => void;
}
@@ -131,7 +133,7 @@ type Handler<T = unknown> = (message: T, topic: string) => void | Promi
}Example 4
function redisDriver(url?: string): PubSubDriver & { close(): void };@wrnexus/queue
Background jobs with delay, concurrency, retry, and repetition.
bun add @wrnexus/queue@0.2.15A background job queue with delays, retries + exponential backoff, recurring jobs, and concurrent workers.+ +
@wrnexus/queue
Background jobs with delay, concurrency, retry, and repetition.
Private registry access required
This package is not available from the public npm registry. After WorkRoot approves access and supplies private registry instructions, install the release-aligned package:
bun add @wrnexus/queue@0.2.15Request preview access. Never put registry tokens in source control.
A background job queue with delays, retries + exponential backoff, recurring jobs, and concurrent workers.
Part of the WRNexusJS framework — an SSR-first, Bun-native full-stack web framework.
Overview
@wrnexus/queue is a server-side in-process job queue. You register named workers, enqueue jobs (optionally delayed or recurring), and let the queue poll and run them on a timer — with per-job retry limits and doubling backoff between attempts. The default store lives in memory; the design allows a pluggable driver to back it with Redis/SQL for durability across restarts. Reach for it when you need to defer work (emails, webhooks, cleanup) off the request path without a heavyweight external broker. Tests can drive it deterministically via drain().
pluggable driver is intended for backing it with Redis/SQL for durability.
@wrnexus/core for offloading work from the request path.Complete TypeScript API
This declaration is generated from the exact published package and lists its exported functions, classes, interfaces, and types.
/**
+Complete TypeScript API
This declaration comes from the exact installed package and lists its exported functions, classes, interfaces, and types.
/**
* @wrnexus/queue — a background job queue with delays, retries + backoff, and
* concurrent workers. The default store is in-process; a pluggable driver lets
* you back it with Redis/SQL for durability across restarts.
@@ -160,7 +162,7 @@ interface Queue {
declare function createQueue(options?: QueueOptions): Queue;
export { type AddOptions, type Job, type JobHandler, type Queue, type QueueOptions, createQueue };
-Examples
Copy-ready examples taken from this package's published documentation.
Example 1
bun add @wrnexus/queueExample 2
function createQueue(options?: QueueOptions): Queue;Example 3
type JobHandler<T = unknown> = (job: Job<T>) => void | Promise<void>;Example 4
interface Job<T = unknown> {
+Examples
Examples are taken from this package's installed documentation and must be evaluated with its requirements and stability notes.
Example 1
bun add @wrnexus/queueExample 2
function createQueue(options?: QueueOptions): Queue;Example 3
type JobHandler<T = unknown> = (job: Job<T>) => void | Promise<void>;Example 4
interface Job<T = unknown> {
id: string; // e.g. "job_1"
name: string;
data: T;
@@ -171,7 +173,7 @@ export { type AddOptions, type Job, type JobHandler, type Queue, type Queue
}@wrnexus/reactive
Small type-safe reactive signal primitives.
bun add @wrnexus/reactive@0.2.15Tiny, type-safe reactive primitives (signals) with zero dependencies.+ +
@wrnexus/reactive
Small type-safe reactive signal primitives.
Private registry access required
This package is not available from the public npm registry. After WorkRoot approves access and supplies private registry instructions, install the release-aligned package:
bun add @wrnexus/reactive@0.2.15Request preview access. Never put registry tokens in source control.
Tiny, type-safe reactive primitives (signals) with zero dependencies.
Part of the WRNexusJS framework — an SSR-first, Bun-native full-stack web framework.
Overview
@wrnexus/reactive is the seed of WRNexusJS's reactivity layer: a minimal signal primitive that holds a value, notifies subscribers when it changes, and hands back an unsubscribe function. It is deliberately small and framework-agnostic — it powers nothing on its own, but is shaped so client islands (and later the .wrn compiler's state blocks) can build reactive bindings on top of it. Reach for it when you need observable state without pulling in a full reactivity library.
Object.is..wrncompiler state blocks.
Complete TypeScript API
This declaration is generated from the exact published package and lists its exported functions, classes, interfaces, and types.
/**
+Complete TypeScript API
This declaration comes from the exact installed package and lists its exported functions, classes, interfaces, and types.
/**
* A minimal, type-safe reactive signal with zero dependencies.
*
* This is the seed of the framework's reactivity. Today it powers nothing on
@@ -103,7 +105,7 @@ interface Signal<T> {
declare function signal<T>(initial: T): Signal<T>;
export { type Signal, type Subscriber, type Unsubscribe, signal };
-Examples
Copy-ready examples taken from this package's published documentation.
Example 1
bun add @wrnexus/reactiveExample 2
type Subscriber<T> = (value: T) => void;
+Examples
Examples are taken from this package's installed documentation and must be evaluated with its requirements and stability notes.
Example 1
bun add @wrnexus/reactiveExample 2
type Subscriber<T> = (value: T) => void;
type Unsubscribe = () => void;
interface Signal<T> {
@@ -133,7 +135,7 @@ const user: Signal<{ name: string } | null> = signal(null);
user.set({ name: "Ada" });@wrnexus/router
Filesystem discovery, route matching, and typed route generation.
bun add @wrnexus/router@0.2.15File-based router that maps an app/ directory onto route tables and matches request paths against them.
+
+ @wrnexus/router
Filesystem discovery, route matching, and typed route generation.
Private registry access required
This package is not available from the public npm registry. After WorkRoot approves access and supplies private registry instructions, install the release-aligned package:
bun add @wrnexus/router@0.2.15Request preview access. Never put registry tokens in source control.
File-based router that maps an app/ directory onto route tables and matches request paths against them.
Part of the WRNexusJS framework — an SSR-first, Bun-native full-stack web framework.
Overview
@wrnexus/router scans an application's app/ directory once at startup and builds route tables for pages, API endpoints, realtime channels, middleware, server-rendered .wrn components, layouts, and validation schemas. It also compiles URL patterns (/users/[id]) into RegExps and matches request paths against them. Request input is never turned into a file path, which makes the router immune to path traversal. This is a server-side package used by the WRNexusJS runtime to resolve incoming requests, plus a codegen helper for compile-time typed links.
@wrnexus/compiler](../compiler) to parse .wrn pages and extract embedded api / realtime blocks.@wrnexus/core](../core) for isSafeIslandName (name validation) and the Middleware type.Complete TypeScript API
This declaration is generated from the exact published package and lists its exported functions, classes, interfaces, and types.
export { Middleware } from '@wrnexus/core';
+Complete TypeScript API
This declaration comes from the exact installed package and lists its exported functions, classes, interfaces, and types.
export { Middleware } from '@wrnexus/core';
/**
* Route compilation + matching.
@@ -219,7 +221,7 @@ interface RouterOptions {
declare function buildRouter(appDir: string, opts?: RouterOptions): Router;
export { type ComponentRef, type Route, type RouteMatch, type Router, type RouterOptions, buildRouter, compileRoutePattern, generateRoutesFile, matchRoute, sortRoutes };
-Examples
Copy-ready examples taken from this package's published documentation.
Example 1
bun add @wrnexus/routerExample 2
app/pages/index.tsx -> GET /
+Examples
Examples are taken from this package's installed documentation and must be evaluated with its requirements and stability notes.
Example 1
bun add @wrnexus/routerExample 2
app/pages/index.tsx -> GET /
app/pages/about.tsx -> GET /about
app/pages/users/[id].tsx -> GET /users/:id
app/api/hello.ts -> /api/hello
@@ -260,7 +262,7 @@ interface ComponentRef {
}@wrnexus/ssr
Secure HTML document rendering and SEO metadata.
bun add @wrnexus/ssr@0.2.15Server-side rendering: wraps a page's HTML body in a complete HTML document with a metadata-driven <head>.
+
+ @wrnexus/ssr
Secure HTML document rendering and SEO metadata.
Private registry access required
This package is not available from the public npm registry. After WorkRoot approves access and supplies private registry instructions, install the release-aligned package:
bun add @wrnexus/ssr@0.2.15Request preview access. Never put registry tokens in source control.
Server-side rendering: wraps a page's HTML body in a complete HTML document with a metadata-driven <head>.
Part of the WRNexusJS framework — an SSR-first, Bun-native full-stack web framework.
Overview
Pages in WRNexusJS return an HTML string for the body. @wrnexus/ssr takes that body and produces a full HTML document — building the <head> from page metadata and global SEO defaults, resolving canonical/Open Graph/Twitter tags, and injecting module preloads and <script type="module"> tags. It is deliberately server-only: nothing in this package touches the DOM or ships to the browser, keeping server code genuinely server-only. Reach for it on the server when turning a rendered page body into a response document.
@wrnexus/core](../core) for escapeHtml and the PageMeta / SeoConfig types.Complete TypeScript API
This declaration is generated from the exact published package and lists its exported functions, classes, interfaces, and types.
import { PageMeta, SeoConfig } from '@wrnexus/core';
+Complete TypeScript API
This declaration comes from the exact installed package and lists its exported functions, classes, interfaces, and types.
import { PageMeta, SeoConfig } from '@wrnexus/core';
/**
* @wrnexus/ssr — server-side rendering.
@@ -126,7 +128,7 @@ interface RenderOptions {
declare function renderDocument(opts: RenderOptions): string;
export { type RenderOptions, renderDocument };
-Examples
Copy-ready examples taken from this package's published documentation.
Example 1
bun add @wrnexus/ssrExample 2
type SeoConfig = {
+Examples
Examples are taken from this package's installed documentation and must be evaluated with its requirements and stability notes.
Example 1
bun add @wrnexus/ssrExample 2
type SeoConfig = {
title?: string;
titleTemplate?: string; // e.g. "%s — My Site"; %s is replaced with the page title
description?: string;
@@ -165,7 +167,7 @@ return new Response(html, {
});@wrnexus/styles
CSS pipeline, themes, fonts, profiles, and application config.
bun add @wrnexus/styles@0.2.15Global CSS bundling, the+ +--wire-*design-token theme system, and thewrnexus.config.tsapp-config loader for WRNexusJS apps.
@wrnexus/styles
CSS pipeline, themes, fonts, profiles, and application config.
Private registry access required
This package is not available from the public npm registry. After WorkRoot approves access and supplies private registry instructions, install the release-aligned package:
bun add @wrnexus/styles@0.2.15Request preview access. Never put registry tokens in source control.
Global CSS bundling, the--wire-*design-token theme system, and thewrnexus.config.tsapp-config loader for WRNexusJS apps.
Part of the WRNexusJS framework — an SSR-first, Bun-native full-stack web framework.
Overview
This package owns three server-side concerns that shape every page a WRNexusJS app renders:
@@ -158,7 +160,7 @@ const themeJs = renderThemeRuntime(theme); // served at THEME_JS_HREFConfig and env loading usenode:fs / node:path / node:url and read from process.env.
@wrnexus/core supplies the SeoConfig and SecurityConfig types referenced by AppConfig.THEME_CSS_HREF), and the theme runtime (THEME_JS_HREF) are wired into pages by the framework's server; this package only produces their contents.Complete TypeScript API
This declaration is generated from the exact published package and lists its exported functions, classes, interfaces, and types.
import { SeoConfig, SecurityConfig } from '@wrnexus/core';
+Complete TypeScript API
This declaration comes from the exact installed package and lists its exported functions, classes, interfaces, and types.
import { SeoConfig, SecurityConfig } from '@wrnexus/core';
import { StorageConfig } from '@wrnexus/uploader';
/**
@@ -508,7 +510,7 @@ declare function bundleCss(entryPath: string, mode: Mode): Promise<string>
declare function renderStyles(ctx: StyleProcessContext, styles?: StylesConfig): Promise<string>;
export { type AppConfig, DEFAULT_THEMES, type FontConfig, type FontDisplay, type GoogleFont, type LocalFontFace, type MobileConfig, type Mode, type PwaConfig, type ResolvedTheme, type StyleProcessContext, type StylesConfig, type Mode as StylesMode, THEME_COOKIE, THEME_CSS_HREF, THEME_JS_HREF, type ThemeConfig, type ThemeTokens, bundleCss, findStyleEntry, fontCspSources, headToString, loadAppConfig, loadEnv, loadRawConfig, renderFontHead, renderProductionFontHead, renderStyles, renderThemeCss, renderThemeRuntime, resolveProfile, resolveThemeConfig, resolveThemeName };
-Examples
Copy-ready examples taken from this package's published documentation.
Example 1
bun add @wrnexus/stylesExample 2
interface StylesConfig {
+Examples
Examples are taken from this package's installed documentation and must be evaluated with its requirements and stability notes.
Example 1
bun add @wrnexus/stylesExample 2
interface StylesConfig {
/** CSS entry path relative to the app root. Default: app/styles/global.css */
entry?: string;
/** Custom processor — return the final CSS string (Tailwind/PostCSS/Sass). */
@@ -562,7 +564,7 @@ export default {
} satisfies AppConfig;@wrnexus/test
WRNexusJS-aware component, route, and browser testing utilities.
bun add @wrnexus/test@0.2.15Testing utilities for WRNexusJS apps — component rendering, reactive-DOM mounting, route handler calls, and a full in-process app harness, plus a one-import re-export of bun:test.
+
+ @wrnexus/test
WRNexusJS-aware component, route, and browser testing utilities.
Private registry access required
This package is not available from the public npm registry. After WorkRoot approves access and supplies private registry instructions, install the release-aligned package:
bun add @wrnexus/test@0.2.15Request preview access. Never put registry tokens in source control.
Testing utilities for WRNexusJS apps — component rendering, reactive-DOM mounting, route handler calls, and a full in-process app harness, plus a one-import re-export of bun:test.
Part of the WRNexusJS framework — an SSR-first, Bun-native full-stack web framework.
Overview
@wrnexus/test is the server-side test toolkit you reach for when writing tests for a WRNexusJS app. It runs under bun test (invoked via wrnexus test) and gives you a single import surface: the bun:test primitives (test, expect, mock, …) re-exported alongside WRNexusJS-aware helpers that compile .wrn components, hydrate server HTML in a DOM, invoke API route handlers, and boot the real app on an ephemeral port for integration tests.
lazily; it's a dev dependency, not a runtime dependency of this package).
[@wrnexus/compiler](../compiler) (compiles .wrn sources), [@wrnexus/core](../core) (Context / createContext), [@wrnexus/csr](../csr) (reactive runtime for mountHtml), [@wrnexus/dev-server](../dev-server) (startServer behind createHarness), and [@wrnexus/styles](../styles) (config/env/profile loading for the harness).
Complete TypeScript API
This declaration is generated from the exact published package and lists its exported functions, classes, interfaces, and types.
import { Context } from '@wrnexus/core';
+Complete TypeScript API
This declaration comes from the exact installed package and lists its exported functions, classes, interfaces, and types.
import { Context } from '@wrnexus/core';
export { createContext } from '@wrnexus/core';
export { afterAll, afterEach, beforeAll, beforeEach, describe, expect, it, mock, spyOn, test } from 'bun:test';
@@ -159,7 +161,7 @@ interface HarnessOptions {
declare function createHarness(projectRoot: string, options?: HarnessOptions): Promise<Harness>;
export { type Harness, type HarnessOptions, callRoute, createHarness, mountHtml, renderComponent };
-Examples
Copy-ready examples taken from this package's published documentation.
Example 1
bun add @wrnexus/testExample 2
function renderComponent(source: string, props?: Record<string, unknown>): Promise<string>;Example 3
function mountHtml(html: string): {
+Examples
Examples are taken from this package's installed documentation and must be evaluated with its requirements and stability notes.
Example 1
bun add @wrnexus/testExample 2
function renderComponent(source: string, props?: Record<string, unknown>): Promise<string>;Example 3
function mountHtml(html: string): {
document: Document;
window: unknown;
querySelector: (sel: string) => Element | null;
@@ -170,7 +172,7 @@ export { type Harness, type HarnessOptions, callRoute, createHarness, mount
): Promise<Response>;@wrnexus/tracking
Error/event capture, middleware, filtering, and sinks.
bun add @wrnexus/tracking@0.2.15Error tracking for WRNexusJS apps: capture exceptions manually or via middleware and fan them out to pluggable sinks.+ +
@wrnexus/tracking
Error/event capture, middleware, filtering, and sinks.
Private registry access required
This package is not available from the public npm registry. After WorkRoot approves access and supplies private registry instructions, install the release-aligned package:
bun add @wrnexus/tracking@0.2.15Request preview access. Never put registry tokens in source control.
Error tracking for WRNexusJS apps: capture exceptions manually or via middleware and fan them out to pluggable sinks.
Part of the WRNexusJS framework — an SSR-first, Bun-native full-stack web framework.
Overview
@wrnexus/tracking is a small, server-side error-capture layer. You create a tracker with one or more sinks, then feed it errors — either manually with tracker.capture(err, context) or automatically by mounting tracker.middleware() in your request pipeline. A consoleSink is included; forwarding to Sentry, Datadog, or any other backend is just a matter of writing a tiny sink. Reach for it when you want a single, sink-agnostic place to route application errors. Sinks run best-effort — a throwing sink never breaks the request.
used by tracker.middleware() come from there.
Promise.all, and asink that throws is swallowed so it can never break the app.
-Complete TypeScript API
This declaration is generated from the exact published package and lists its exported functions, classes, interfaces, and types.
import { Middleware } from '@wrnexus/core';
+Complete TypeScript API
This declaration comes from the exact installed package and lists its exported functions, classes, interfaces, and types.
import { Middleware } from '@wrnexus/core';
/**
* @wrnexus/tracking — error tracking with pluggable sinks. Capture exceptions
@@ -130,7 +132,7 @@ declare const consoleSink: ErrorSink;
declare function createTracker(options?: TrackerOptions): Tracker;
export { type ErrorEvent, type ErrorSink, type Tracker, type TrackerOptions, consoleSink, createTracker };
-Examples
Copy-ready examples taken from this package's published documentation.
Example 1
bun add @wrnexus/trackingExample 2
{ method: ctx.req.method, path: ctx.url.pathname, requestId: ctx.locals.requestId }Example 3
interface ErrorEvent {
+Examples
Examples are taken from this package's installed documentation and must be evaluated with its requirements and stability notes.
Example 1
bun add @wrnexus/trackingExample 2
{ method: ctx.req.method, path: ctx.url.pathname, requestId: ctx.locals.requestId }Example 3
interface ErrorEvent {
error: Error;
context: Record<string, unknown>; // request info, user id, tags…
timestamp: number; // epoch ms
@@ -151,7 +153,7 @@ try {
}@wrnexus/ui
Themeable server-rendered UI components and CSS.
bun add @wrnexus/ui@0.2.15First-party Wire UI component library — a set of themeable .wrn components plus a single tokenized stylesheet.
+
+ @wrnexus/ui
Themeable server-rendered UI components and CSS.
Private registry access required
This package is not available from the public npm registry. After WorkRoot approves access and supplies private registry instructions, install the release-aligned package:
bun add @wrnexus/ui@0.2.15Request preview access. Never put registry tokens in source control.
First-party Wire UI component library — a set of themeable .wrn components plus a single tokenized stylesheet.
Part of the WRNexusJS framework — an SSR-first, Bun-native full-stack web framework.
Overview
@wrnexus/ui ships a library of server-rendered .wrn components (layout, form controls, and feedback UI) together with one themeable stylesheet, ui.css. The components are auto-discovered by the framework router — you don't import them in code. Once the package's component directory is on the router's scan path, you mount any component in a page with data-component="<name>". Every visual is driven by var(--wire-*) theme tokens, so components restyle instantly when the theme changes. The tiny JS surface (src/index.ts) exists only so the toolchain (CLI build + dev server) can locate the component directory and stylesheet.
@wrnexus/core](../core) (dependencies).theme-toggle relies on the framework's theme runtime, which binds thedata-wire-theme-toggle attribute — no per-component JS is required.
Complete TypeScript API
This declaration is generated from the exact published package and lists its exported functions, classes, interfaces, and types.
/**
+Complete TypeScript API
This declaration comes from the exact installed package and lists its exported functions, classes, interfaces, and types.
/**
* @wrnexus/ui — the Wire UI component library.
*
* Components are `.wrn` files under `components/`, auto-discovered by the
@@ -98,7 +100,7 @@ declare function uiCss(): string;
declare function uiComponentNames(): string[];
export { uiComponentNames, uiComponentsDir, uiCss, uiCssPath };
-Examples
Copy-ready examples taken from this package's published documentation.
Example 1
bun add @wrnexus/uiExample 2
"exports": {
+Examples
Examples are taken from this package's installed documentation and must be evaluated with its requirements and stability notes.
Example 1
bun add @wrnexus/uiExample 2
"exports": {
".": "./src/index.ts",
"./ui.css": "./ui.css"
}Example 3
import { buildRouter } from "@wrnexus/router";
@@ -111,7 +113,7 @@ const router = buildRouter(appDir, { componentDirs: [uiComponentsDir()]
</div>@wrnexus/uploader
Validated local/S3 uploads and secure file serving.
bun add @wrnexus/uploader@0.2.15Config-driven file uploads + serving for WRNexusJS. Declare named storage stores (local disk or any S3-compatible backend) in wrnexus.config.ts, upload with one function call, drop a drag-and-drop widget on a page, and serve files back — public or private. Zero external dependencies (S3 is signed with a built-in AWS SigV4 implementation, like the rest of the framework).
@wrnexus/uploader
Validated local/S3 uploads and secure file serving.
Private registry access required
This package is not available from the public npm registry. After WorkRoot approves access and supplies private registry instructions, install the release-aligned package:
bun add @wrnexus/uploader@0.2.15Request preview access. Never put registry tokens in source control.
Config-driven file uploads + serving for WRNexusJS. Declare named storage stores (local disk or any S3-compatible backend) in wrnexus.config.ts, upload with one function call, drop a drag-and-drop widget on a page, and serve files back — public or private. Zero external dependencies (S3 is signed with a built-in AWS SigV4 implementation, like the rest of the framework).
Configure
// wrnexus.config.ts
import type { AppConfig } from "@wrnexus/styles";
@@ -95,7 +97,7 @@ export const GET = serveFromStore("docs"); // your middleware decides
SigV4 signing is implemented from scratch (no @aws-sdk); tested against local S3 semantics.
Live AWS/R2 connectivity depends on your credentials + bucket policy.
v1 buffers each file in memory up to its size cap (fine for images/docs up to tens of MB).
-Complete TypeScript API
This declaration is generated from the exact published package and lists its exported functions, classes, interfaces, and types.
import { Context } from '@wrnexus/core';
+Complete TypeScript API
This declaration comes from the exact installed package and lists its exported functions, classes, interfaces, and types.
import { Context } from '@wrnexus/core';
/**
* Storage driver contract + config types.
@@ -370,7 +372,7 @@ declare function accepts(accept: string[] | undefined, file: {
}): boolean;
export { type LocalStoreConfig, type PutMeta, type S3StoreConfig, type StorageConfig, type StorageDriver, type Store, type StoreAccess, type StoreConfig, type StoredObject, UPLOADS_PREFIX, UPLOAD_JS_HREF, UPLOAD_RUNTIME, UploadError, type UploadOptions, type UploadedFile, accepts, configureStorage, contentTypeOf, encodeKey, extForType, extOf, getStore, handleUpload, hasStorage, localDriver, s3Driver, serveFromStore, serveStoredFile, sha256Hex, signS3, storeNames, storedUrl, upload };
-Examples
Copy-ready examples taken from this package's published documentation.
Example 1
// wrnexus.config.ts
+Examples
Examples are taken from this package's installed documentation and must be evaluated with its requirements and stability notes.
Example 1
// wrnexus.config.ts
import type { AppConfig } from "@wrnexus/styles";
const config: AppConfig = {
@@ -413,7 +415,7 @@ await getStore("docs").driver.delete(files[0].key);@wrnexus/validation
Typed schemas, coercion, validation, and browser descriptors.
bun add @wrnexus/validation@0.2.15One fluent schema, validated on the server (API bodies, env vars) and mirrored to an eval-free browser validator for forms.+ +
@wrnexus/validation
Typed schemas, coercion, validation, and browser descriptors.
Private registry access required
This package is not available from the public npm registry. After WorkRoot approves access and supplies private registry instructions, install the release-aligned package:
bun add @wrnexus/validation@0.2.15Request preview access. Never put registry tokens in source control.
One fluent schema, validated on the server (API bodies, env vars) and mirrored to an eval-free browser validator for forms.
Part of the WRNexusJS framework — an SSR-first, Bun-native full-stack web framework.
Overview
Define a schema once with the fluent v builder, then reuse it in three places: .parse() runs server-side and returns coerced values plus per-field errors; .describe() emits a plain-JSON SchemaDescriptor that the browser runtime interprets (no eval, no bundled validator); and helpers like parseBody and parseEnv wire schemas straight into API routes and startup config. The server rule logic (applyRule/checkField) and the client runtime (VALIDATE_RUNTIME) mirror each other exactly, so a form validates identically in both places. Schemas are conventionally kept in app/schemas/.
refine) run only server-side and are never serialized — client and server agree on every other rule because both interpret the same RuleDescriptor list.src/index.ts) executed directly by Bun.@wrnexus/core) for route handlers and the SSR layer that injects renderSchemasScript / VALIDATE_RUNTIME.Complete TypeScript API
This declaration is generated from the exact published package and lists its exported functions, classes, interfaces, and types.
/**
+Complete TypeScript API
This declaration comes from the exact installed package and lists its exported functions, classes, interfaces, and types.
/**
* Client-side validation. `renderSchemasScript` bakes the discovered schema
* descriptors into `window.__wireSchemas`; `VALIDATE_RUNTIME` is a generic,
* eval-free validator that reads them and validates every `form[data-schema]`
@@ -302,7 +304,7 @@ declare function parseBody<T = Record<string, unknown>>(schema: Obje
}>;
export { type FieldDescriptor, ObjectSchema, type ParseResult, type RuleDescriptor, type SchemaDescriptor, VALIDATE_RUNTIME, applyRule, checkField, invalid, parseBody, parseEnv, renderSchemasScript, v };
-Examples
Copy-ready examples taken from this package's published documentation.
Example 1
bun add @wrnexus/validationExample 2
import { v } from "@wrnexus/validation";Example 3
schema.parse(input: unknown): ParseResult
+Examples
Examples are taken from this package's installed documentation and must be evaluated with its requirements and stability notes.
Example 1
bun add @wrnexus/validationExample 2
import { v } from "@wrnexus/validation";Example 3
schema.parse(input: unknown): ParseResult
schema.describe(): SchemaDescriptorExample 4
interface ParseResult<T = Record<string, unknown>> {
ok: boolean; // true when errors is empty
value: T; // coerced values (present pass or fail)
@@ -310,7 +312,7 @@ schema.describe(): SchemaDescriptorOn this page
- +@wrnexus/${name}
${summary}
bun add @wrnexus/${name}@${frameworkVersion}Complete TypeScript API
This declaration is generated from the exact published package and lists its exported functions, classes, interfaces, and types.
${escape(types)}Examples
Copy-ready examples taken from this package's published documentation.
@wrnexus/${name}
${summary}
Private registry access required
This package is not available from the public npm registry. After WorkRoot approves access and supplies private registry instructions, install the release-aligned package:
bun add @wrnexus/${name}@${frameworkVersion}Request preview access. Never put registry tokens in source control.
Complete TypeScript API
This declaration comes from the exact installed package and lists its exported functions, classes, interfaces, and types.
${escape(types)}Examples
Examples are taken from this package's installed documentation and must be evaluated with its requirements and stability notes.