chore: update docs to WRNexusJS 0.2.14

This commit is contained in:
2026-07-12 16:58:47 +05:30
parent 70ff967da4
commit 042cdd64b8
37 changed files with 222 additions and 172 deletions
+21 -1
View File
@@ -1,3 +1,23 @@
node_modules/
.wrnexus/
dist/
dist/
**/.wrnexus/
coverage/
.env
.env.*
!.env.example
*.log
*.db
*.db-shm
*.db-wal
*.sqlite
*.sqlite3
mobile/android/
mobile/ios/
mobile/.expo/
.idea/
.vscode/
.DS_Store
Thumbs.db
*.tsbuildinfo
.eslintcache
+1 -1
View File
@@ -1,6 +1,6 @@
# WRNexusJS Documentation
Standalone documentation site for all 25 private `@wrnexus/*` packages at version `0.2.12`.
Standalone documentation site for all 25 private `@wrnexus/*` packages. The displayed release is generated from `package.json#wrnexus.version`.
## Development
+3 -1
View File
@@ -7,6 +7,8 @@ import { compileWireFile } from "@wrnexus/compiler";
import { mountHtml } from "@wrnexus/test";
const root = join(import.meta.dir, "..");
const frameworkVersion = JSON.parse(readFileSync(join(root, "package.json"), "utf8")).wrnexus
.version as string;
const packagePages = join(root, "app", "pages", "packages");
const expected = [
"ai",
@@ -47,7 +49,7 @@ test("generates one detailed page for every published package", () => {
test("every package page contains installation, guide, and complete API sections", () => {
for (const name of expected) {
const source = readFileSync(join(packagePages, `${name}.wrn`), "utf8");
expect(source).toContain(`bun add @wrnexus/${name}@0.2.12`);
expect(source).toContain(`bun add @wrnexus/${name}@${frameworkVersion}`);
expect(source).toContain('id="guide"');
expect(source).toContain('id="api"');
expect(source).toContain("Complete TypeScript API");
+1 -1
View File
@@ -12,7 +12,7 @@ page Architecture {
<button data-wire-theme-toggle class="theme-button" aria-label="Toggle theme">Theme</button>
</header>
<main class="page"><article class="documentation prose standalone"><span class="eyebrow">Concepts</span><h1>Architecture</h1><p>WRNexusJS separates server work, generated markup, and browser behavior so applications stay understandable and efficient.</p><h2>Request path</h2><pre><code>Request → Router → Middleware → Page/API → SSR document → Browser runtime</code></pre><h2>Compiler</h2><p>The compiler parses .wrn files and lowers state, events, interpolation, loops, conditionals, data bindings, components, and styles into server modules and small declarative browser directives.</p><h2>Runtime</h2><p>The server owns routing, data, secrets, sessions, validation, uploads, and rendering. The browser owns reactive scopes, navigation, forms, realtime clients, and native capability dispatch.</p><h2>Package boundaries</h2><p>Each package is independently installable. Start with the CLI and core, then add database, security, realtime, native, UI, and operational packages as required.</p><div class="actions"><a class="primary" href="/packages/core">Read core API</a><a href="/packages/compiler">Read compiler API</a></div></article></main>
<footer>WRNexusJS 0.2.12 · SSR-first · Bun-native · Documentation generated from published package APIs.</footer>
<footer>WRNexusJS 0.2.14 · SSR-first · Bun-native · Documentation generated from published package APIs.</footer>
</div>
}
}
+1 -1
View File
@@ -25,7 +25,7 @@ bun run dev</code></pre><h2>2. Add a page</h2><pre><code>page Dashboard {
}</code></pre><h2>3. Verify and build</h2><pre><code>wrnexus doctor
wrnexus test
wrnexus build</code></pre><h2>Where things live</h2><ul><li><code>app/pages</code> contains routes.</li><li><code>app/components</code> contains reusable .wrn components.</li><li><code>app/api</code> contains server API handlers.</li><li><code>app/layouts</code> contains shared shells.</li><li><code>app/middleware</code> contains request middleware.</li><li><code>wrnexus.config.ts</code> configures security, styles, data, mobile, and deployment.</li></ul></article></main>
<footer>WRNexusJS 0.2.12 · SSR-first · Bun-native · Documentation generated from published package APIs.</footer>
<footer>WRNexusJS 0.2.14 · SSR-first · Bun-native · Documentation generated from published package APIs.</footer>
</div>
}
}
+2 -2
View File
@@ -11,7 +11,7 @@ page Home {
<nav><a href="/getting-started">Get started</a><a href="/packages">Packages</a><a href="/language">Language</a><a href="/architecture">Architecture</a></nav>
<button data-wire-theme-toggle class="theme-button" aria-label="Toggle theme">Theme</button>
</header>
<main class="page"><section class="hero"><span class="eyebrow">WRNexusJS 0.2.12</span><h1>Build from the server.<br><em>Ship only what matters.</em></h1><p>An SSR-first, Bun-native framework with reactive .wrn components, typed data, realtime rooms, mobile capabilities, and production security built in.</p><div class="actions"><a class="primary" href="/getting-started">Start building</a><a href="/packages">Explore 25 packages</a></div><div class="code-window"><span>app/pages/counter.wrn</span><pre><code>page Counter {
<main class="page"><section class="hero"><span class="eyebrow">WRNexusJS 0.2.14</span><h1>Build from the server.<br><em>Ship only what matters.</em></h1><p>An SSR-first, Bun-native framework with reactive .wrn components, typed data, realtime rooms, mobile capabilities, and production security built in.</p><div class="actions"><a class="primary" href="/getting-started">Start building</a><a href="/packages">Explore 25 packages</a></div><div class="code-window"><span>app/pages/counter.wrn</span><pre><code>page Counter {
state count = 0
view {
&lt;button @click=&quot;count++&quot;&gt;
@@ -19,7 +19,7 @@ page Home {
&lt;/button&gt;
}
}</code></pre></div></section><section class="feature-grid"><article><h2>SSR by default</h2><p>Useful HTML reaches the browser immediately. Interactive pages hydrate only the runtime they use.</p></article><article><h2>Secure foundations</h2><p>CSP, Trusted Types, CSRF, sessions, validation, authorization, encryption, and safe rendering are integrated.</p></article><article><h2>Web to native</h2><p>Share markup through Capacitor or compile portable pages into Expo and React Native routes.</p></article></section></main>
<footer>WRNexusJS 0.2.12 · SSR-first · Bun-native · Documentation generated from published package APIs.</footer>
<footer>WRNexusJS 0.2.14 · SSR-first · Bun-native · Documentation generated from published package APIs.</footer>
</div>
}
}
+1 -1
View File
@@ -84,7 +84,7 @@ view &#123;
&lt;p data-native-only=&quot;browser&quot;&gt;Browser instructions&lt;/p&gt;
&lt;button data-native-requires=&quot;haptics&quot;&gt;Haptic action&lt;/button&gt;</code></pre>
<h2 id="other">Other framework attributes</h2><div class="table-wrap"><table><thead><tr><th>Attribute</th><th>Purpose</th></tr></thead><tbody><tr><td><code>data-error</code></td><td>Field validation error destination.</td></tr><tr><td><code>data-success</code></td><td>Successful form message.</td></tr><tr><td><code>data-redirect</code></td><td>Navigation after form success.</td></tr><tr><td><code>data-room-*</code></td><td>Realtime status, templates, sending, and reset behavior.</td></tr><tr><td><code>data-uploader</code></td><td>Config-driven upload widget.</td></tr><tr><td><code>data-wire-theme-*</code></td><td>Theme selection and toggling.</td></tr><tr><td><code>data-wire-lang*</code></td><td>Language selection.</td></tr><tr><td><code>data-native-*</code></td><td>Cross-platform capability and visibility behavior.</td></tr></tbody></table></div></article></main>
<footer>WRNexusJS 0.2.12 · SSR-first · Bun-native · Documentation generated from published package APIs.</footer>
<footer>WRNexusJS 0.2.14 · SSR-first · Bun-native · Documentation generated from published package APIs.</footer>
</div>
}
}
+2 -2
View File
@@ -13,7 +13,7 @@ page Packages {
<nav><a href="/getting-started">Get started</a><a href="/packages">Packages</a><a href="/language">Language</a><a href="/architecture">Architecture</a></nav>
<button data-wire-theme-toggle class="theme-button" aria-label="Toggle theme">Theme</button>
</header>
<main class="page"><section class="hero compact"><span class="eyebrow">25 focused packages</span><h1>Package reference</h1><p>Everything in the framework, organized by responsibility and documented from the published 0.2.12 APIs.</p><input class="search" type="search" placeholder="Search packages, features, or categories…" @input="query = event.target.value" /></section><section class="category-filter" aria-label="Filter packages by category"><div class="category-row"><button type="button" @click="category = 'All'">All<span>25</span></button><button type="button" @click="category = 'AI'">AI<span>1</span></button><button type="button" @click="category = 'Security'">Security<span>5</span></button><button type="button" @click="category = 'Tooling'">Tooling<span>2</span></button><button type="button" @click="category = 'Core'">Core<span>3</span></button><button type="button" @click="category = 'Frontend'">Frontend<span>5</span></button><button type="button" @click="category = 'Data'">Data<span>3</span></button><button type="button" @click="category = 'Runtime'">Runtime<span>3</span></button><button type="button" @click="category = 'Native'">Native<span>2</span></button><button type="button" @click="category = 'Realtime'">Realtime<span>1</span></button></div><p>Showing <strong>{category}</strong> packages</p></section><section class="package-grid"><a class="package-card" href="/packages/ai" data-show="(category === 'All' ? true : category === 'AI') ? (query === '' ? true : 'ai ai server-side anthropic client with generation and streaming. '.includes(query.toLowerCase())) : false">
<main class="page"><section class="hero compact"><span class="eyebrow">25 focused packages</span><h1>Package reference</h1><p>Everything in the framework, organized by responsibility and documented from the published 0.2.14 APIs.</p><input class="search" type="search" placeholder="Search packages, features, or categories…" @input="query = event.target.value" /></section><section class="category-filter" aria-label="Filter packages by category"><div class="category-row"><button type="button" @click="category = 'All'">All<span>25</span></button><button type="button" @click="category = 'AI'">AI<span>1</span></button><button type="button" @click="category = 'Security'">Security<span>5</span></button><button type="button" @click="category = 'Tooling'">Tooling<span>2</span></button><button type="button" @click="category = 'Core'">Core<span>3</span></button><button type="button" @click="category = 'Frontend'">Frontend<span>5</span></button><button type="button" @click="category = 'Data'">Data<span>3</span></button><button type="button" @click="category = 'Runtime'">Runtime<span>3</span></button><button type="button" @click="category = 'Native'">Native<span>2</span></button><button type="button" @click="category = 'Realtime'">Realtime<span>1</span></button></div><p>Showing <strong>{category}</strong> packages</p></section><section class="package-grid"><a class="package-card" href="/packages/ai" data-show="(category === 'All' ? true : category === 'AI') ? (query === '' ? true : 'ai ai server-side anthropic client with generation and streaming. '.includes(query.toLowerCase())) : false">
<span class="category">AI</span><h2>@wrnexus/ai</h2><p>Server-side Anthropic client with generation and streaming.</p><span class="card-link">Open documentation →</span>
</a>
<a class="package-card" href="/packages/authz" data-show="(category === 'All' ? true : category === 'Security') ? (query === '' ? true : 'authz security role, permission, policy, and authorization guards. '.includes(query.toLowerCase())) : false">
@@ -88,7 +88,7 @@ page Packages {
<a class="package-card" href="/packages/validation" data-show="(category === 'All' ? true : category === 'Security') ? (query === '' ? true : 'validation security typed schemas, coercion, validation, and browser descriptors. '.includes(query.toLowerCase())) : false">
<span class="category">Security</span><h2>@wrnexus/validation</h2><p>Typed schemas, coercion, validation, and browser descriptors.</p><span class="card-link">Open documentation →</span>
</a></section></main>
<footer>WRNexusJS 0.2.12 · SSR-first · Bun-native · Documentation generated from published package APIs.</footer>
<footer>WRNexusJS 0.2.14 · SSR-first · Bun-native · Documentation generated from published package APIs.</footer>
</div>
}
}
+3 -3
View File
@@ -12,8 +12,8 @@ page wrnexusai {
<button data-wire-theme-toggle class="theme-button" aria-label="Toggle theme">Theme</button>
</header>
<main class="page package-page">
<aside class="sidebar"><a href="/packages">← All packages</a><span class="category">AI</span><h1>@wrnexus/ai</h1><p>Server-side Anthropic client with generation and streaming.</p><code>bun add @wrnexus/ai@0.2.12</code><nav><a href="#guide">Guide</a><a href="#api">Complete API</a></nav></aside>
<article class="documentation"><section class="doc-intro"><span class="eyebrow">AI</span><h1>@wrnexus/ai</h1><p>Server-side Anthropic client with generation and streaming.</p><pre><code>bun add @wrnexus/ai@0.2.12</code></pre></section><section id="guide" class="prose"><blockquote>A tiny, zero-dependency Claude (Anthropic) client for WRNexusJS apps — generate and stream text with Claude from any server-side code.</blockquote>
<aside class="sidebar"><a href="/packages">← All packages</a><span class="category">AI</span><h1>@wrnexus/ai</h1><p>Server-side Anthropic client with generation and streaming.</p><code>bun add @wrnexus/ai@0.2.14</code><nav><a href="#guide">Guide</a><a href="#api">Complete API</a></nav></aside>
<article class="documentation"><section class="doc-intro"><span class="eyebrow">AI</span><h1>@wrnexus/ai</h1><p>Server-side Anthropic client with generation and streaming.</p><pre><code>bun add @wrnexus/ai@0.2.14</code></pre></section><section id="guide" class="prose"><blockquote>A tiny, zero-dependency Claude (Anthropic) client for WRNexusJS apps — generate and stream text with Claude from any server-side code.</blockquote>
<p>Part of the <strong>WRNexusJS</strong> framework — an SSR-first, Bun-native full-stack web framework.</p>
<h3 id="overview">Overview</h3>
<p><code>@wrnexus/ai</code> is a thin, dependency-free wrapper over the Anthropic <strong>Messages API</strong>, built on <code>fetch</code> (Bun-native, no SDK). Use it in API routes, jobs, or middleware to call Claude. It defaults to the most capable model, <strong><code>claude-opus-4-8</code></strong>, reads your key from <code>ANTHROPIC_API_KEY</code>, and supports both one-shot generation and streaming.</p>
@@ -175,7 +175,7 @@ const reply = await ai.generate(
);</code></pre></article></div></section></article>
<aside class="on-this-page"><h2>On this page</h2><nav><a class="toc-level-2" href="#guide">Guide</a><a class="toc-level-3" href="#overview">Overview</a><a class="toc-level-3" href="#installation">Installation</a><a class="toc-level-3" href="#api">API</a><a class="toc-level-4" href="#createai-config">createAI(config?)</a><a class="toc-level-4" href="#ai-generate-prompt-opts-promise-string">ai.generate(prompt, opts?): Promise&lt;string&gt;</a><a class="toc-level-4" href="#ai-stream-prompt-opts-asyncgenerator-string">ai.stream(prompt, opts?): AsyncGenerator&lt;string&gt;</a><a class="toc-level-4" href="#ai-streamresponse-prompt-opts-response">ai.streamResponse(prompt, opts?): Response</a><a class="toc-level-4" href="#generateoptions">GenerateOptions</a><a class="toc-level-4" href="#aierror">AIError</a><a class="toc-level-3" href="#usage">Usage</a><a class="toc-level-3" href="#requirements-notes">Requirements / Notes</a><a class="toc-level-2" href="#api">Complete API</a><a class="toc-level-2" href="#examples">Examples</a></nav></aside>
</main>
<footer>WRNexusJS 0.2.12 · SSR-first · Bun-native · Documentation generated from published package APIs.</footer>
<footer>WRNexusJS 0.2.14 · SSR-first · Bun-native · Documentation generated from published package APIs.</footer>
</div>
}
}
+3 -3
View File
@@ -12,8 +12,8 @@ page wrnexusauthz {
<button data-wire-theme-toggle class="theme-button" aria-label="Toggle theme">Theme</button>
</header>
<main class="page package-page">
<aside class="sidebar"><a href="/packages">← All packages</a><span class="category">Security</span><h1>@wrnexus/authz</h1><p>Role, permission, policy, and authorization guards.</p><code>bun add @wrnexus/authz@0.2.12</code><nav><a href="#guide">Guide</a><a href="#api">Complete API</a></nav></aside>
<article class="documentation"><section class="doc-intro"><span class="eyebrow">Security</span><h1>@wrnexus/authz</h1><p>Role, permission, policy, and authorization guards.</p><pre><code>bun add @wrnexus/authz@0.2.12</code></pre></section><section id="guide" class="prose"><blockquote>Composable authorization for WRNexusJS — role-based (RBAC), policy-based (PBAC), and attribute-based (ABAC) access control that reduces to a boolean check plus an <code>authorize()</code> guard.</blockquote>
<aside class="sidebar"><a href="/packages">← All packages</a><span class="category">Security</span><h1>@wrnexus/authz</h1><p>Role, permission, policy, and authorization guards.</p><code>bun add @wrnexus/authz@0.2.14</code><nav><a href="#guide">Guide</a><a href="#api">Complete API</a></nav></aside>
<article class="documentation"><section class="doc-intro"><span class="eyebrow">Security</span><h1>@wrnexus/authz</h1><p>Role, permission, policy, and authorization guards.</p><pre><code>bun add @wrnexus/authz@0.2.14</code></pre></section><section id="guide" class="prose"><blockquote>Composable authorization for WRNexusJS — role-based (RBAC), policy-based (PBAC), and attribute-based (ABAC) access control that reduces to a boolean check plus an <code>authorize()</code> guard.</blockquote>
<p>Part of the <strong>WRNexusJS</strong> framework — an SSR-first, Bun-native full-stack web framework.</p>
<h3 id="overview">Overview</h3>
<p><code>@wrnexus/authz</code> 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 <code>boolean | Promise&lt;boolean&gt;</code> decision. Wrap any decision in a <code>Middleware</code> guard (<code>authorize</code>, <code>requireRole</code>, <code>requirePermission</code>) 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 <code>@wrnexus/core</code> by reading <code>ctx.user</code> as the authorization subject.</p>
@@ -226,7 +226,7 @@ app.put(
);</code></pre></article></div></section></article>
<aside class="on-this-page"><h2>On this page</h2><nav><a class="toc-level-2" href="#guide">Guide</a><a class="toc-level-3" href="#overview">Overview</a><a class="toc-level-3" href="#installation">Installation</a><a class="toc-level-3" href="#api">API</a><a class="toc-level-4" href="#types">Types</a><a class="toc-level-4" href="#rbac">RBAC</a><a class="toc-level-4" href="#definerbac-roles-record-string-string-rbac">defineRbac(roles: Record&lt;string, string[]&gt;): Rbac</a><a class="toc-level-4" href="#hasrole-subject-subject-undefined-required-string-boolean">hasRole(subject: Subject | undefined, ...required: string[]): boolean</a><a class="toc-level-4" href="#pbac-abac-combinators">PBAC / ABAC combinators</a><a class="toc-level-4" href="#guards-middleware">Guards (middleware)</a><a class="toc-level-3" href="#usage">Usage</a><a class="toc-level-4" href="#rbac-2">RBAC</a><a class="toc-level-4" href="#guarding-routes">Guarding routes</a><a class="toc-level-4" href="#pbac-abac-policies">PBAC / ABAC policies</a><a class="toc-level-3" href="#requirements-notes">Requirements / Notes</a><a class="toc-level-2" href="#api">Complete API</a><a class="toc-level-2" href="#examples">Examples</a></nav></aside>
</main>
<footer>WRNexusJS 0.2.12 · SSR-first · Bun-native · Documentation generated from published package APIs.</footer>
<footer>WRNexusJS 0.2.14 · SSR-first · Bun-native · Documentation generated from published package APIs.</footer>
</div>
}
}
+14 -7
View File
@@ -12,8 +12,8 @@ page wrnexuscli {
<button data-wire-theme-toggle class="theme-button" aria-label="Toggle theme">Theme</button>
</header>
<main class="page package-page">
<aside class="sidebar"><a href="/packages">← All packages</a><span class="category">Tooling</span><h1>@wrnexus/cli</h1><p>Create, develop, build, generate, test, and maintain WRNexusJS apps.</p><code>bun add @wrnexus/cli@0.2.12</code><nav><a href="#guide">Guide</a><a href="#api">Complete API</a></nav></aside>
<article class="documentation"><section class="doc-intro"><span class="eyebrow">Tooling</span><h1>@wrnexus/cli</h1><p>Create, develop, build, generate, test, and maintain WRNexusJS apps.</p><pre><code>bun add @wrnexus/cli@0.2.12</code></pre></section><section id="guide" class="prose"><blockquote>The <code>wrnexus</code> command-line tool that scaffolds, runs, builds, tests, and manages WRNexusJS apps.</blockquote>
<aside class="sidebar"><a href="/packages">← All packages</a><span class="category">Tooling</span><h1>@wrnexus/cli</h1><p>Create, develop, build, generate, test, and maintain WRNexusJS apps.</p><code>bun add @wrnexus/cli@0.2.14</code><nav><a href="#guide">Guide</a><a href="#api">Complete API</a></nav></aside>
<article class="documentation"><section class="doc-intro"><span class="eyebrow">Tooling</span><h1>@wrnexus/cli</h1><p>Create, develop, build, generate, test, and maintain WRNexusJS apps.</p><pre><code>bun add @wrnexus/cli@0.2.14</code></pre></section><section id="guide" class="prose"><blockquote>The <code>wrnexus</code> command-line tool that scaffolds, runs, builds, tests, and manages WRNexusJS apps.</blockquote>
<p>Part of the <strong>WRNexusJS</strong> framework — an SSR-first, Bun-native full-stack web framework.</p>
<h3 id="overview">Overview</h3>
<p><code>@wrnexus/cli</code> provides the <code>wrnexus</code> 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.</p>
@@ -41,9 +41,14 @@ page wrnexuscli {
<li><code>public/</code> — copied verbatim.</li>
</ul>
<p>Before bundling, it regenerates typed queries for the default and every named database. Run the output with:</p>
<pre data-language="bash"><code>bun dist/server.js # PORT env var optional</code></pre>
<pre data-language="bash"><code>bun dist/server.js # PORT env var optional
# Generated apps also provide: npm start
# Build and start together: npm run production</code></pre>
<h4 id="wrnexus-create"><code>wrnexus create</code></h4>
<p>Scaffolds a new app from an inline (dependency-free) template — <code>package.json</code>, config, and starter <code>app/</code> files. Run <code>wrnexus dev</code> in the new directory to start.</p>
<p>Scaffolds a new app from an inline (dependency-free) template — <code>package.json</code>, <code>.gitignore</code>, config, and starter <code>app/</code> files. Use <code>npm run dev</code> during development, <code>npm run build &amp;&amp; npm start</code> for production, or <code>npm run production</code> to build and start in one command. The generated production server currently requires Bun even when npm is used to manage packages and scripts.</p>
<h4 id="wrnexus-update"><code>wrnexus update</code></h4>
<p><code>wrnexus update --latest</code> performs a complete project upgrade. It hands control to the exact target CLI, backs up important project files under <code>.wrnexus/update-backups/</code>, updates every <code>@wrnexus/*</code> dependency, refreshes framework-owned references, and applies every versioned syntax/config/file migration between the project version and target version. After installation it runs the project's <code>check</code> and <code>build</code> scripts; the new version is recorded only after verification succeeds.</p>
<p>Use <code>--dry-run</code> to preview an upgrade or <code>--no-verify</code> when verification is intentionally handled elsewhere. Migrations never overwrite user-owned configuration wholesale: each release must provide a focused, idempotent transformation for any changed syntax or config contract.</p>
<pre data-language="bash"><code>wrnexus create my-app</code></pre>
<h4 id="wrnexus-generate"><code>wrnexus generate</code></h4>
<p>Scaffolds a single file from a template, refusing to overwrite an existing file. Types (with aliases): <code>page</code>/<code>p</code>, <code>component</code>/<code>c</code>, <code>api</code>/<code>a</code>, <code>schema</code>/<code>s</code>. Nested names create nested paths.</p>
@@ -105,10 +110,12 @@ export default config;</code></pre>
<li>Reads <code>wrnexus.config.ts</code> for <code>db</code> / <code>databases</code>, <code>theme</code>, <code>styles</code>, <code>seo</code>, <code>security</code>, <code>i18n</code>, and <code>profiles</code>, and <code>wrnexus.workspace.ts</code> for the gateway.</li>
</ul></section><section id="api" class="prose api"><h2>Complete TypeScript API</h2><p>This declaration is generated from the exact published package and lists its exported functions, classes, interfaces, and types.</p><pre data-language="typescript"><code>#!/usr/bin/env bun
</code></pre></section><section id="examples" class="prose examples"><h2>Examples</h2><p>Copy-ready examples taken from this package's published documentation.</p><div class="example-grid"><article class="example-card"><h3>Example 1</h3><pre data-language="bash"><code>bun add @wrnexus/cli</code></pre></article><article class="example-card"><h3>Example 2</h3><pre data-language="bash"><code>bunx wrnexus dev
# or add scripts: &quot;dev&quot;: &quot;wrnexus dev .&quot;, &quot;build&quot;: &quot;wrnexus build .&quot;</code></pre></article><article class="example-card"><h3>Example 3</h3><pre data-language="bash"><code>wrnexus dev . --port=8080</code></pre></article><article class="example-card"><h3>Example 4</h3><pre data-language="bash"><code>bun dist/server.js # PORT env var optional</code></pre></article></div></section></article>
<aside class="on-this-page"><h2>On this page</h2><nav><a class="toc-level-2" href="#guide">Guide</a><a class="toc-level-3" href="#overview">Overview</a><a class="toc-level-3" href="#installation">Installation</a><a class="toc-level-3" href="#commands">Commands</a><a class="toc-level-4" href="#wrnexus-dev">wrnexus dev</a><a class="toc-level-4" href="#wrnexus-build">wrnexus build</a><a class="toc-level-4" href="#wrnexus-create">wrnexus create</a><a class="toc-level-4" href="#wrnexus-generate">wrnexus generate</a><a class="toc-level-4" href="#wrnexus-eject">wrnexus eject</a><a class="toc-level-4" href="#wrnexus-db">wrnexus db</a><a class="toc-level-4" href="#wrnexus-workspace-and-wrnexus-gateway">wrnexus workspace and wrnexus gateway</a><a class="toc-level-4" href="#wrnexus-test">wrnexus test</a><a class="toc-level-3" href="#profiles">Profiles</a><a class="toc-level-3" href="#subpath-exports">Subpath exports</a><a class="toc-level-3" href="#requirements-notes">Requirements / Notes</a><a class="toc-level-2" href="#api">Complete API</a><a class="toc-level-2" href="#examples">Examples</a></nav></aside>
# or add scripts: &quot;dev&quot;: &quot;wrnexus dev .&quot;, &quot;build&quot;: &quot;wrnexus build .&quot;</code></pre></article><article class="example-card"><h3>Example 3</h3><pre data-language="bash"><code>wrnexus dev . --port=8080</code></pre></article><article class="example-card"><h3>Example 4</h3><pre data-language="bash"><code>bun dist/server.js # PORT env var optional
# Generated apps also provide: npm start
# Build and start together: npm run production</code></pre></article></div></section></article>
<aside class="on-this-page"><h2>On this page</h2><nav><a class="toc-level-2" href="#guide">Guide</a><a class="toc-level-3" href="#overview">Overview</a><a class="toc-level-3" href="#installation">Installation</a><a class="toc-level-3" href="#commands">Commands</a><a class="toc-level-4" href="#wrnexus-dev">wrnexus dev</a><a class="toc-level-4" href="#wrnexus-build">wrnexus build</a><a class="toc-level-4" href="#wrnexus-create">wrnexus create</a><a class="toc-level-4" href="#wrnexus-update">wrnexus update</a><a class="toc-level-4" href="#wrnexus-generate">wrnexus generate</a><a class="toc-level-4" href="#wrnexus-eject">wrnexus eject</a><a class="toc-level-4" href="#wrnexus-db">wrnexus db</a><a class="toc-level-4" href="#wrnexus-workspace-and-wrnexus-gateway">wrnexus workspace and wrnexus gateway</a><a class="toc-level-4" href="#wrnexus-test">wrnexus test</a><a class="toc-level-3" href="#profiles">Profiles</a><a class="toc-level-3" href="#subpath-exports">Subpath exports</a><a class="toc-level-3" href="#requirements-notes">Requirements / Notes</a><a class="toc-level-2" href="#api">Complete API</a><a class="toc-level-2" href="#examples">Examples</a></nav></aside>
</main>
<footer>WRNexusJS 0.2.12 · SSR-first · Bun-native · Documentation generated from published package APIs.</footer>
<footer>WRNexusJS 0.2.14 · SSR-first · Bun-native · Documentation generated from published package APIs.</footer>
</div>
}
}
+3 -3
View File
@@ -12,8 +12,8 @@ page wrnexuscompiler {
<button data-wire-theme-toggle class="theme-button" aria-label="Toggle theme">Theme</button>
</header>
<main class="page package-page">
<aside class="sidebar"><a href="/packages">← All packages</a><span class="category">Core</span><h1>@wrnexus/compiler</h1><p>Parser and code generators for the .wrn language.</p><code>bun add @wrnexus/compiler@0.2.12</code><nav><a href="#guide">Guide</a><a href="#api">Complete API</a></nav></aside>
<article class="documentation"><section class="doc-intro"><span class="eyebrow">Core</span><h1>@wrnexus/compiler</h1><p>Parser and code generators for the .wrn language.</p><pre><code>bun add @wrnexus/compiler@0.2.12</code></pre></section><section id="guide" class="prose"><blockquote>Compiler for the <code>.wrn</code> language — tokenizes, parses, and lowers <code>.wrn</code> page and component files to TypeScript.</blockquote>
<aside class="sidebar"><a href="/packages">← All packages</a><span class="category">Core</span><h1>@wrnexus/compiler</h1><p>Parser and code generators for the .wrn language.</p><code>bun add @wrnexus/compiler@0.2.14</code><nav><a href="#guide">Guide</a><a href="#api">Complete API</a></nav></aside>
<article class="documentation"><section class="doc-intro"><span class="eyebrow">Core</span><h1>@wrnexus/compiler</h1><p>Parser and code generators for the .wrn language.</p><pre><code>bun add @wrnexus/compiler@0.2.14</code></pre></section><section id="guide" class="prose"><blockquote>Compiler for the <code>.wrn</code> language — tokenizes, parses, and lowers <code>.wrn</code> page and component files to TypeScript.</blockquote>
<p>Part of the <strong>WRNexusJS</strong> framework — an SSR-first, Bun-native full-stack web framework.</p>
<h3 id="overview">Overview</h3>
<p><code>@wrnexus/compiler</code> turns <code>.wrn</code> source into TypeScript that targets the framework's runtime primitives. A <code>.wrn</code> file declares either a <code>page</code> (a route) or a <code>component</code> (a reusable, prop-driven fragment) with blocks for <code>state</code>, <code>view</code> (plain HTML), <code>seo</code>, <code>style</code>, <code>functions</code>, <code>api</code>, <code>ssr</code>/<code>client</code> data bindings, and <code>realtime</code> websocket handlers. The pipeline is <code>source → Lexer → parse() → PageAst → generate() → TypeScript</code>. It is a build/server-side library — the WRNexusJS dev loader calls it to compile <code>.wrn</code> files on the fly, surfacing <code>ParseError</code> as a readable error page.</p>
@@ -355,7 +355,7 @@ page Home &#123;
// returning an HTML string, wrapped in a data-scope for the reactive runtime.</code></pre></article></div></section></article>
<aside class="on-this-page"><h2>On this page</h2><nav><a class="toc-level-2" href="#guide">Guide</a><a class="toc-level-3" href="#overview">Overview</a><a class="toc-level-3" href="#installation">Installation</a><a class="toc-level-3" href="#api">API</a><a class="toc-level-4" href="#compilewirefile-source-string-string">compileWireFile(source: string): string</a><a class="toc-level-4" href="#compile-source-string-compileresult">compile(source: string): CompileResult</a><a class="toc-level-4" href="#parse-source-string-pageast">parse(source: string): PageAst</a><a class="toc-level-4" href="#generate-ast-pageast-string">generate(ast: PageAst): string</a><a class="toc-level-4" href="#lexer">Lexer</a><a class="toc-level-4" href="#errors">Errors</a><a class="toc-level-4" href="#ast-types">AST types</a><a class="toc-level-3" href="#usage">Usage</a><a class="toc-level-3" href="#the-wrn-language-as-parsed">The .wrn language (as parsed)</a><a class="toc-level-3" href="#requirements-notes">Requirements / Notes</a><a class="toc-level-2" href="#api">Complete API</a><a class="toc-level-2" href="#examples">Examples</a></nav></aside>
</main>
<footer>WRNexusJS 0.2.12 · SSR-first · Bun-native · Documentation generated from published package APIs.</footer>
<footer>WRNexusJS 0.2.14 · SSR-first · Bun-native · Documentation generated from published package APIs.</footer>
</div>
}
}
+5 -3
View File
@@ -12,8 +12,8 @@ page wrnexuscore {
<button data-wire-theme-toggle class="theme-button" aria-label="Toggle theme">Theme</button>
</header>
<main class="page package-page">
<aside class="sidebar"><a href="/packages">← All packages</a><span class="category">Core</span><h1>@wrnexus/core</h1><p>Contexts, middleware, security, sessions, caching, JSX, and realtime.</p><code>bun add @wrnexus/core@0.2.12</code><nav><a href="#guide">Guide</a><a href="#api">Complete API</a></nav></aside>
<article class="documentation"><section class="doc-intro"><span class="eyebrow">Core</span><h1>@wrnexus/core</h1><p>Contexts, middleware, security, sessions, caching, JSX, and realtime.</p><pre><code>bun add @wrnexus/core@0.2.12</code></pre></section><section id="guide" class="prose"><blockquote>The framework core: the request <code>Context</code>, middleware contract, and the security, session, caching, streaming, realtime, and JSX primitives every other WRNexusJS package builds on.</blockquote>
<aside class="sidebar"><a href="/packages">← All packages</a><span class="category">Core</span><h1>@wrnexus/core</h1><p>Contexts, middleware, security, sessions, caching, JSX, and realtime.</p><code>bun add @wrnexus/core@0.2.14</code><nav><a href="#guide">Guide</a><a href="#api">Complete API</a></nav></aside>
<article class="documentation"><section class="doc-intro"><span class="eyebrow">Core</span><h1>@wrnexus/core</h1><p>Contexts, middleware, security, sessions, caching, JSX, and realtime.</p><pre><code>bun add @wrnexus/core@0.2.14</code></pre></section><section id="guide" class="prose"><blockquote>The framework core: the request <code>Context</code>, middleware contract, and the security, session, caching, streaming, realtime, and JSX primitives every other WRNexusJS package builds on.</blockquote>
<p>Part of the <strong>WRNexusJS</strong> framework — an SSR-first, Bun-native full-stack web framework.</p>
<h3 id="overview">Overview</h3>
<p><code>@wrnexus/core</code> is the shared foundation of WRNexusJS. It defines the <code>Context</code> object that flows through every middleware, page, and API route, plus the <code>Middleware</code>/<code>Next</code> 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 &quot;rooms&quot;, security headers/CORS, and a server-side JSX runtime that renders to HTML strings. Everything here is <strong>server-side</strong> and Bun-native (it uses <code>Bun.password</code>, <code>Bun.write</code>, the web-standard <code>Request</code>/<code>Response</code>, and <code>crypto</code>). You depend on it directly and transitively through the rest of the framework.</p>
@@ -339,6 +339,8 @@ type Next = () =&gt; Promise&lt;Response&gt; | Response;
type Middleware = (ctx: Context, next: Next) =&gt; Promise&lt;Response&gt; | Response;
/** SEO metadata rendered into the document `&lt;head&gt;`. */
type SeoConfig = &#123;
/** BCP 47 document language used on `&lt;html lang&gt;` (default: `en`). */
lang?: string;
title?: string;
titleTemplate?: string;
description?: string;
@@ -960,7 +962,7 @@ if (await verifyPassword(form.password, user.passwordHash)) &#123;
const current = getUser&lt;&#123; id: string &#125;&gt;(ctx); // or null</code></pre></article></div></section></article>
<aside class="on-this-page"><h2>On this page</h2><nav><a class="toc-level-2" href="#guide">Guide</a><a class="toc-level-3" href="#overview">Overview</a><a class="toc-level-3" href="#installation">Installation</a><a class="toc-level-3" href="#api">API</a><a class="toc-level-4" href="#context-middleware-wrnexus-core">Context &amp; middleware — @wrnexus/core</a><a class="toc-level-4" href="#authentication-wrnexus-core">Authentication — @wrnexus/core</a><a class="toc-level-4" href="#csrf-wrnexus-core">CSRF — @wrnexus/core</a><a class="toc-level-4" href="#rate-limiting-wrnexus-core">Rate limiting — @wrnexus/core</a><a class="toc-level-4" href="#request-logging-wrnexus-core">Request logging — @wrnexus/core</a><a class="toc-level-4" href="#caching-wrnexus-core">Caching — @wrnexus/core</a><a class="toc-level-4" href="#file-uploads-wrnexus-core">File uploads — @wrnexus/core</a><a class="toc-level-4" href="#streaming-sse-wrnexus-core">Streaming &amp; SSE — @wrnexus/core</a><a class="toc-level-4" href="#realtime-rooms-wrnexus-core">Realtime rooms — @wrnexus/core</a><a class="toc-level-4" href="#error-pages-wrnexus-core">Error pages — @wrnexus/core</a><a class="toc-level-4" href="#security-headers-cors-wrnexus-core">Security headers &amp; CORS — @wrnexus/core</a><a class="toc-level-4" href="#storage-cookies-sessions-localstorage-wrnexus-core">Storage: cookies, sessions, localStorage — @wrnexus/core</a><a class="toc-level-4" href="#low-level-security-helpers-wrnexus-core">Low-level security helpers — @wrnexus/core</a><a class="toc-level-4" href="#jsx-runtime-wrnexus-core-wrnexus-core-jsx-runtime-wrnexus-core-jsx-dev-runtime">JSX runtime — @wrnexus/core, @wrnexus/core/jsx-runtime, @wrnexus/core/jsx-dev-runtime</a><a class="toc-level-3" href="#usage">Usage</a><a class="toc-level-4" href="#a-minimal-middleware-chain">A minimal middleware chain</a><a class="toc-level-4" href="#password-auth">Password auth</a><a class="toc-level-4" href="#http-caching-with-etags">HTTP caching with ETags</a><a class="toc-level-4" href="#streaming-sse">Streaming SSE</a><a class="toc-level-4" href="#a-realtime-room">A realtime room</a><a class="toc-level-4" href="#jsx-rendering">JSX rendering</a><a class="toc-level-3" href="#requirements-notes">Requirements / Notes</a><a class="toc-level-2" href="#api">Complete API</a><a class="toc-level-2" href="#examples">Examples</a></nav></aside>
</main>
<footer>WRNexusJS 0.2.12 · SSR-first · Bun-native · Documentation generated from published package APIs.</footer>
<footer>WRNexusJS 0.2.14 · SSR-first · Bun-native · Documentation generated from published package APIs.</footer>
</div>
}
}
+3 -3
View File
@@ -12,8 +12,8 @@ page wrnexuscsr {
<button data-wire-theme-toggle class="theme-button" aria-label="Toggle theme">Theme</button>
</header>
<main class="page package-page">
<aside class="sidebar"><a href="/packages">← All packages</a><span class="category">Frontend</span><h1>@wrnexus/csr</h1><p>Reactive, navigation, and realtime browser runtimes.</p><code>bun add @wrnexus/csr@0.2.12</code><nav><a href="#guide">Guide</a><a href="#api">Complete API</a></nav></aside>
<article class="documentation"><section class="doc-intro"><span class="eyebrow">Frontend</span><h1>@wrnexus/csr</h1><p>Reactive, navigation, and realtime browser runtimes.</p><pre><code>bun add @wrnexus/csr@0.2.12</code></pre></section><section id="guide" class="prose"><blockquote>The browser-side client runtime for WRNexusJS — generic, self-contained JS that hydrates server-rendered pages with reactivity, client-side navigation, and realtime rooms.</blockquote>
<aside class="sidebar"><a href="/packages">← All packages</a><span class="category">Frontend</span><h1>@wrnexus/csr</h1><p>Reactive, navigation, and realtime browser runtimes.</p><code>bun add @wrnexus/csr@0.2.14</code><nav><a href="#guide">Guide</a><a href="#api">Complete API</a></nav></aside>
<article class="documentation"><section class="doc-intro"><span class="eyebrow">Frontend</span><h1>@wrnexus/csr</h1><p>Reactive, navigation, and realtime browser runtimes.</p><pre><code>bun add @wrnexus/csr@0.2.14</code></pre></section><section id="guide" class="prose"><blockquote>The browser-side client runtime for WRNexusJS — generic, self-contained JS that hydrates server-rendered pages with reactivity, client-side navigation, and realtime rooms.</blockquote>
<p>Part of the <strong>WRNexusJS</strong> framework — an SSR-first, Bun-native full-stack web framework.</p>
<h3 id="overview">Overview</h3>
<p><code>@wrnexus/csr</code> holds the three client runtimes that WRNexusJS serves to the browser. Components are authored as <code>.wrn</code> files and rendered on the <strong>server</strong>; this package provides the single, generic runtime that <strong>hydrates</strong> 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:</p>
@@ -228,7 +228,7 @@ Bun.serve(&#123;
&#125;);</code></pre></article></div></section></article>
<aside class="on-this-page"><h2>On this page</h2><nav><a class="toc-level-2" href="#guide">Guide</a><a class="toc-level-3" href="#overview">Overview</a><a class="toc-level-3" href="#installation">Installation</a><a class="toc-level-3" href="#api">API</a><a class="toc-level-4" href="#runtime-strings">Runtime strings</a><a class="toc-level-4" href="#accessor-functions">Accessor functions</a><a class="toc-level-4" href="#browser-reactive-directives">Browser: reactive directives</a><a class="toc-level-4" href="#browser-navigation">Browser: navigation</a><a class="toc-level-4" href="#browser-realtime-rooms">Browser: realtime rooms</a><a class="toc-level-3" href="#usage">Usage</a><a class="toc-level-3" href="#requirements-notes">Requirements / Notes</a><a class="toc-level-2" href="#api">Complete API</a><a class="toc-level-2" href="#examples">Examples</a></nav></aside>
</main>
<footer>WRNexusJS 0.2.12 · SSR-first · Bun-native · Documentation generated from published package APIs.</footer>
<footer>WRNexusJS 0.2.14 · SSR-first · Bun-native · Documentation generated from published package APIs.</footer>
</div>
}
}
+3 -3
View File
@@ -12,8 +12,8 @@ page wrnexusdb {
<button data-wire-theme-toggle class="theme-button" aria-label="Toggle theme">Theme</button>
</header>
<main class="page package-page">
<aside class="sidebar"><a href="/packages">← All packages</a><span class="category">Data</span><h1>@wrnexus/db</h1><p>Database adapters, typed queries, models, migrations, and sessions.</p><code>bun add @wrnexus/db@0.2.12</code><nav><a href="#guide">Guide</a><a href="#api">Complete API</a></nav></aside>
<article class="documentation"><section class="doc-intro"><span class="eyebrow">Data</span><h1>@wrnexus/db</h1><p>Database adapters, typed queries, models, migrations, and sessions.</p><pre><code>bun add @wrnexus/db@0.2.12</code></pre></section><section id="guide" class="prose"><blockquote>The database layer for WRNexusJS: TS models as the single source of truth for DDL, validation, and result typing, plus a driver-based <code>Db</code> client, migrations, and a sqlc-style query generator.</blockquote>
<aside class="sidebar"><a href="/packages">← All packages</a><span class="category">Data</span><h1>@wrnexus/db</h1><p>Database adapters, typed queries, models, migrations, and sessions.</p><code>bun add @wrnexus/db@0.2.14</code><nav><a href="#guide">Guide</a><a href="#api">Complete API</a></nav></aside>
<article class="documentation"><section class="doc-intro"><span class="eyebrow">Data</span><h1>@wrnexus/db</h1><p>Database adapters, typed queries, models, migrations, and sessions.</p><pre><code>bun add @wrnexus/db@0.2.14</code></pre></section><section id="guide" class="prose"><blockquote>The database layer for WRNexusJS: TS models as the single source of truth for DDL, validation, and result typing, plus a driver-based <code>Db</code> client, migrations, and a sqlc-style query generator.</blockquote>
<p>Part of the <strong>WRNexusJS</strong> framework — an SSR-first, Bun-native full-stack web framework.</p>
<h3 id="overview">Overview</h3>
<p><code>@wrnexus/db</code> is the server-side data layer. You describe tables as TypeScript models (the <code>v</code> column builder + <code>table()</code>); those models drive migrations, coerce raw DB rows into typed objects, and feed the query generator. A thin <code>Driver</code> interface is implemented by adapters for SQLite (<code>bun:sqlite</code>), Postgres/MySQL (<code>Bun.SQL</code>), and MongoDB. The <code>Db</code> client adds ergonomics — model-mapped <code>all</code>/<code>one</code>, transactions, <code>createTable</code>, pagination, and batched relation loading. A process-wide registry (<code>getDb</code>/<code>setDb</code>) exposes configured connections to pages and API routes. Reach for it whenever a WRNexusJS app needs persistence.</p>
@@ -315,7 +315,7 @@ const users = table(&quot;users&quot;, &#123;
const events = await getDb(&quot;analytics&quot;).all(&quot;SELECT * FROM hits&quot;);</code></pre></article></div></section></article>
<aside class="on-this-page"><h2>On this page</h2><nav><a class="toc-level-2" href="#guide">Guide</a><a class="toc-level-3" href="#overview">Overview</a><a class="toc-level-3" href="#installation">Installation</a><a class="toc-level-3" href="#api">API</a><a class="toc-level-4" href="#schema-v-table-column">Schema — v, table, Column</a><a class="toc-level-4" href="#driver-client-createdb-db-driver">Driver &amp; client — createDb, Db, Driver</a><a class="toc-level-4" href="#client-registry-getdb-setdb">Client registry — getDb / setDb</a><a class="toc-level-4" href="#adapters">Adapters</a><a class="toc-level-4" href="#migrations">Migrations</a><a class="toc-level-4" href="#query-generator-sqlc-style">Query generator (sqlc-style)</a><a class="toc-level-4" href="#query-helpers">Query helpers</a><a class="toc-level-4" href="#session-store">Session store</a><a class="toc-level-3" href="#usage">Usage</a><a class="toc-level-3" href="#configuration">Configuration</a><a class="toc-level-3" href="#requirements-notes">Requirements / Notes</a><a class="toc-level-2" href="#api">Complete API</a><a class="toc-level-2" href="#examples">Examples</a></nav></aside>
</main>
<footer>WRNexusJS 0.2.12 · SSR-first · Bun-native · Documentation generated from published package APIs.</footer>
<footer>WRNexusJS 0.2.14 · SSR-first · Bun-native · Documentation generated from published package APIs.</footer>
</div>
}
}
+7 -3
View File
@@ -12,8 +12,8 @@ page wrnexusdevserver {
<button data-wire-theme-toggle class="theme-button" aria-label="Toggle theme">Theme</button>
</header>
<main class="page package-page">
<aside class="sidebar"><a href="/packages">← All packages</a><span class="category">Runtime</span><h1>@wrnexus/dev-server</h1><p>Development and production servers, HMR, assets, and gateways.</p><code>bun add @wrnexus/dev-server@0.2.12</code><nav><a href="#guide">Guide</a><a href="#api">Complete API</a></nav></aside>
<article class="documentation"><section class="doc-intro"><span class="eyebrow">Runtime</span><h1>@wrnexus/dev-server</h1><p>Development and production servers, HMR, assets, and gateways.</p><pre><code>bun add @wrnexus/dev-server@0.2.12</code></pre></section><section id="guide" class="prose"><blockquote>The WRNexusJS HTTP + WebSocket server runtime — request dispatch, SSR document assembly, live-reload (HMR), and the portable production handler.</blockquote>
<aside class="sidebar"><a href="/packages">← All packages</a><span class="category">Runtime</span><h1>@wrnexus/dev-server</h1><p>Development and production servers, HMR, assets, and gateways.</p><code>bun add @wrnexus/dev-server@0.2.14</code><nav><a href="#guide">Guide</a><a href="#api">Complete API</a></nav></aside>
<article class="documentation"><section class="doc-intro"><span class="eyebrow">Runtime</span><h1>@wrnexus/dev-server</h1><p>Development and production servers, HMR, assets, and gateways.</p><pre><code>bun add @wrnexus/dev-server@0.2.14</code></pre></section><section id="guide" class="prose"><blockquote>The WRNexusJS HTTP + WebSocket server runtime — request dispatch, SSR document assembly, live-reload (HMR), and the portable production handler.</blockquote>
<p>Part of the <strong>WRNexusJS</strong> framework — an SSR-first, Bun-native full-stack web framework.</p>
<h3 id="overview">Overview</h3>
<p>This package is the server runtime that powers a WRNexusJS app in both development and production. A single <strong>request runtime</strong> (<code>createHandlers</code>) 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 <strong>gateway</strong> (route several apps by <code>Host</code> header behind one port) and a portable <code>node:http</code> adapter for WinterCG hosts. It is entirely server-side and Bun-native (<code>Bun.serve</code>, <code>Bun.file</code>, <code>Bun.gzipSync</code>).</p>
@@ -312,6 +312,8 @@ interface RuntimeDeps &#123;
hasStyles?: boolean;
/** When true, inject the Wire UI stylesheet link (`/__wrnexus/ui.css`). */
hasUi?: boolean;
/** Production build combined theme + UI stylesheet. */
hasFrameworkStyles?: boolean;
/** Resolved theme config: enables `/__wrnexus/theme.css` + `&lt;html data-theme&gt;`. */
theme?: ResolvedTheme;
/** Resolved i18n bundle: enables `ctx.t`, `&lt;html lang&gt;`, and `&#123;t:key&#125;` markers. */
@@ -488,6 +490,8 @@ interface ProdOptions &#123;
theme?: ResolvedTheme;
/** Absolute path to the pre-built Wire UI stylesheet (`ui.css`). */
uiCssPath?: string;
/** Combined production theme + Wire UI stylesheet. */
frameworkCssPath?: string;
/** Pre-built `window.__wireSchemas = &#123;...&#125;` script for client validation. */
schemasJs?: string;
/** Resolved i18n bundle (default lang + locale messages). */
@@ -721,7 +725,7 @@ interface ProdOptions &#123;
&#125;</code></pre></article></div></section></article>
<aside class="on-this-page"><h2>On this page</h2><nav><a class="toc-level-2" href="#guide">Guide</a><a class="toc-level-3" href="#overview">Overview</a><a class="toc-level-3" href="#installation">Installation</a><a class="toc-level-3" href="#api">API</a><a class="toc-level-4" href="#main-entry-wrnexus-dev-server">Main entry (@wrnexus/dev-server)</a><a class="toc-level-4" href="#startserver-opts">startServer(opts)</a><a class="toc-level-4" href="#createhandlers-deps">createHandlers(deps)</a><a class="toc-level-4" href="#createproductionserver-manifest-opts-createproductionhandlers-manifest-opts">createProductionServer(manifest, opts) / createProductionHandlers(manifest, opts)</a><a class="toc-level-4" href="#startgateway-opts-multi-app-gateway">startGateway(opts) — multi-app gateway</a><a class="toc-level-4" href="#node-http-adapter-from-adapters-node-ts">node:http adapter (from ./adapters/node.ts)</a><a class="toc-level-4" href="#subpath-export-wrnexus-dev-server-serve-entry">Subpath export: @wrnexus/dev-server/serve-entry</a><a class="toc-level-3" href="#usage">Usage</a><a class="toc-level-4" href="#programmatic-dev-server">Programmatic dev server</a><a class="toc-level-4" href="#production-server-from-a-build-manifest">Production server from a build manifest</a><a class="toc-level-4" href="#embedding-the-handler-on-node-http">Embedding the handler on node:http</a><a class="toc-level-4" href="#multi-app-gateway">Multi-app gateway</a><a class="toc-level-3" href="#framework-asset-routes">Framework asset routes</a><a class="toc-level-3" href="#requirements-notes">Requirements / Notes</a><a class="toc-level-2" href="#api">Complete API</a><a class="toc-level-2" href="#examples">Examples</a></nav></aside>
</main>
<footer>WRNexusJS 0.2.12 · SSR-first · Bun-native · Documentation generated from published package APIs.</footer>
<footer>WRNexusJS 0.2.14 · SSR-first · Bun-native · Documentation generated from published package APIs.</footer>
</div>
}
}
+3 -3
View File
@@ -12,8 +12,8 @@ page wrnexusencryption {
<button data-wire-theme-toggle class="theme-button" aria-label="Toggle theme">Theme</button>
</header>
<main class="page package-page">
<aside class="sidebar"><a href="/packages">← All packages</a><span class="category">Security</span><h1>@wrnexus/encryption</h1><p>Hashing, HMAC, authenticated encryption, and key derivation.</p><code>bun add @wrnexus/encryption@0.2.12</code><nav><a href="#guide">Guide</a><a href="#api">Complete API</a></nav></aside>
<article class="documentation"><section class="doc-intro"><span class="eyebrow">Security</span><h1>@wrnexus/encryption</h1><p>Hashing, HMAC, authenticated encryption, and key derivation.</p><pre><code>bun add @wrnexus/encryption@0.2.12</code></pre></section><section id="guide" class="prose"><blockquote>Dependency-free crypto helpers for WRNexusJS: authenticated symmetric encryption (AES-256-GCM), hashing, and HMAC signing.</blockquote>
<aside class="sidebar"><a href="/packages">← All packages</a><span class="category">Security</span><h1>@wrnexus/encryption</h1><p>Hashing, HMAC, authenticated encryption, and key derivation.</p><code>bun add @wrnexus/encryption@0.2.14</code><nav><a href="#guide">Guide</a><a href="#api">Complete API</a></nav></aside>
<article class="documentation"><section class="doc-intro"><span class="eyebrow">Security</span><h1>@wrnexus/encryption</h1><p>Hashing, HMAC, authenticated encryption, and key derivation.</p><pre><code>bun add @wrnexus/encryption@0.2.14</code></pre></section><section id="guide" class="prose"><blockquote>Dependency-free crypto helpers for WRNexusJS: authenticated symmetric encryption (AES-256-GCM), hashing, and HMAC signing.</blockquote>
<p>Part of the <strong>WRNexusJS</strong> framework — an SSR-first, Bun-native full-stack web framework.</p>
<h3 id="overview">Overview</h3>
<p>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 <strong>Web Crypto API</strong> (<code>crypto.subtle</code>) plus <code>btoa</code>/<code>atob</code> and <code>TextEncoder</code>/<code>TextDecoder</code> — no third-party dependencies. Reach for it whenever you need to protect sensitive values or verify webhook signatures. All functions are <code>async</code> (Web Crypto is promise-based).</p>
@@ -107,7 +107,7 @@ const ok = await hmacVerify(rawBody, webhookSecret, incomingSignatureHeader);
if (!ok) throw new Error(&quot;Invalid webhook signature&quot;);</code></pre></article></div></section></article>
<aside class="on-this-page"><h2>On this page</h2><nav><a class="toc-level-2" href="#guide">Guide</a><a class="toc-level-3" href="#overview">Overview</a><a class="toc-level-3" href="#installation">Installation</a><a class="toc-level-3" href="#api">API</a><a class="toc-level-3" href="#usage">Usage</a><a class="toc-level-3" href="#requirements-notes">Requirements / Notes</a><a class="toc-level-2" href="#api">Complete API</a><a class="toc-level-2" href="#examples">Examples</a></nav></aside>
</main>
<footer>WRNexusJS 0.2.12 · SSR-first · Bun-native · Documentation generated from published package APIs.</footer>
<footer>WRNexusJS 0.2.14 · SSR-first · Bun-native · Documentation generated from published package APIs.</footer>
</div>
}
}
+3 -3
View File
@@ -12,8 +12,8 @@ page wrnexusi18n {
<button data-wire-theme-toggle class="theme-button" aria-label="Toggle theme">Theme</button>
</header>
<main class="page package-page">
<aside class="sidebar"><a href="/packages">← All packages</a><span class="category">Frontend</span><h1>@wrnexus/i18n</h1><p>Translation loading, locale resolution, and Intl formatting.</p><code>bun add @wrnexus/i18n@0.2.12</code><nav><a href="#guide">Guide</a><a href="#api">Complete API</a></nav></aside>
<article class="documentation"><section class="doc-intro"><span class="eyebrow">Frontend</span><h1>@wrnexus/i18n</h1><p>Translation loading, locale resolution, and Intl formatting.</p><pre><code>bun add @wrnexus/i18n@0.2.12</code></pre></section><section id="guide" class="prose"><blockquote>Per-request translations plus locale-aware number, date, and currency formatting for WRNexusJS apps.</blockquote>
<aside class="sidebar"><a href="/packages">← All packages</a><span class="category">Frontend</span><h1>@wrnexus/i18n</h1><p>Translation loading, locale resolution, and Intl formatting.</p><code>bun add @wrnexus/i18n@0.2.14</code><nav><a href="#guide">Guide</a><a href="#api">Complete API</a></nav></aside>
<article class="documentation"><section class="doc-intro"><span class="eyebrow">Frontend</span><h1>@wrnexus/i18n</h1><p>Translation loading, locale resolution, and Intl formatting.</p><pre><code>bun add @wrnexus/i18n@0.2.14</code></pre></section><section id="guide" class="prose"><blockquote>Per-request translations plus locale-aware number, date, and currency formatting for WRNexusJS apps.</blockquote>
<p>Part of the <strong>WRNexusJS</strong> framework — an SSR-first, Bun-native full-stack web framework.</p>
<h3 id="overview">Overview</h3>
<p><code>@wrnexus/i18n</code> loads locale files from <code>app/locales/&lt;lang&gt;.json</code>, resolves the active language for each request (cookie → <code>Accept-Language</code> → default), and builds a <code>t(key, params)</code> translator used both in server code and in <code>.wrn</code> 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 <code>I18N_RUNTIME</code> snippet runs in the browser.</p>
@@ -209,7 +209,7 @@ const finalHtml = translateHtml(renderedHtml, t);</code></pre></article><article
&lt;input t:placeholder=&quot;search.placeholder&quot; /&gt;</code></pre></article></div></section></article>
<aside class="on-this-page"><h2>On this page</h2><nav><a class="toc-level-2" href="#guide">Guide</a><a class="toc-level-3" href="#overview">Overview</a><a class="toc-level-3" href="#installation">Installation</a><a class="toc-level-3" href="#api">API</a><a class="toc-level-4" href="#loading-resolving">Loading &amp; resolving</a><a class="toc-level-4" href="#types-constants">Types &amp; constants</a><a class="toc-level-4" href="#html-client-runtime">HTML &amp; client runtime</a><a class="toc-level-4" href="#formatting-helpers-re-exported-from-format-ts">Formatting helpers (re-exported from ./format.ts)</a><a class="toc-level-3" href="#usage">Usage</a><a class="toc-level-4" href="#server-load-resolve-translate">Server: load, resolve, translate</a><a class="toc-level-4" href="#views-translation-markers">Views: translation markers</a><a class="toc-level-4" href="#client-language-switcher">Client: language switcher</a><a class="toc-level-4" href="#formatting">Formatting</a><a class="toc-level-3" href="#configuration">Configuration</a><a class="toc-level-3" href="#requirements-notes">Requirements / Notes</a><a class="toc-level-2" href="#api">Complete API</a><a class="toc-level-2" href="#examples">Examples</a></nav></aside>
</main>
<footer>WRNexusJS 0.2.12 · SSR-first · Bun-native · Documentation generated from published package APIs.</footer>
<footer>WRNexusJS 0.2.14 · SSR-first · Bun-native · Documentation generated from published package APIs.</footer>
</div>
}
}
+3 -3
View File
@@ -12,8 +12,8 @@ page wrnexusjwt {
<button data-wire-theme-toggle class="theme-button" aria-label="Toggle theme">Theme</button>
</header>
<main class="page package-page">
<aside class="sidebar"><a href="/packages">← All packages</a><span class="category">Security</span><h1>@wrnexus/jwt</h1><p>HS256 JWT signing, verification, and bearer authentication.</p><code>bun add @wrnexus/jwt@0.2.12</code><nav><a href="#guide">Guide</a><a href="#api">Complete API</a></nav></aside>
<article class="documentation"><section class="doc-intro"><span class="eyebrow">Security</span><h1>@wrnexus/jwt</h1><p>HS256 JWT signing, verification, and bearer authentication.</p><pre><code>bun add @wrnexus/jwt@0.2.12</code></pre></section><section id="guide" class="prose"><blockquote>Dependency-free JSON Web Tokens (HS256) via Web Crypto, plus a bearer-token auth middleware for WRNexusJS.</blockquote>
<aside class="sidebar"><a href="/packages">← All packages</a><span class="category">Security</span><h1>@wrnexus/jwt</h1><p>HS256 JWT signing, verification, and bearer authentication.</p><code>bun add @wrnexus/jwt@0.2.14</code><nav><a href="#guide">Guide</a><a href="#api">Complete API</a></nav></aside>
<article class="documentation"><section class="doc-intro"><span class="eyebrow">Security</span><h1>@wrnexus/jwt</h1><p>HS256 JWT signing, verification, and bearer authentication.</p><pre><code>bun add @wrnexus/jwt@0.2.14</code></pre></section><section id="guide" class="prose"><blockquote>Dependency-free JSON Web Tokens (HS256) via Web Crypto, plus a bearer-token auth middleware for WRNexusJS.</blockquote>
<p>Part of the <strong>WRNexusJS</strong> framework — an SSR-first, Bun-native full-stack web framework.</p>
<h3 id="overview">Overview</h3>
<p><code>@wrnexus/jwt</code> signs and verifies stateless JSON Web Tokens using the <strong>HS256</strong> (HMAC-SHA-256) algorithm. It has no runtime dependencies — signing and verification are implemented directly on the standard <strong>Web Crypto</strong> API (<code>crypto.subtle</code>), which Bun provides natively. It runs server-side and pairs with the session-based auth in <code>@wrnexus/core</code>, giving you a stateless option for API and mobile clients. Reach for it when you need bearer-token auth rather than cookie sessions.</p>
@@ -145,7 +145,7 @@ export &#123; type JwtAuthOptions, type JwtClaims, JwtError, type SignOptions, j
): Promise&lt;T&gt;;</code></pre></article><article class="example-card"><h3>Example 4</h3><pre data-language="ts"><code>function jwtAuth(options: JwtAuthOptions): Middleware;</code></pre></article></div></section></article>
<aside class="on-this-page"><h2>On this page</h2><nav><a class="toc-level-2" href="#guide">Guide</a><a class="toc-level-3" href="#overview">Overview</a><a class="toc-level-3" href="#installation">Installation</a><a class="toc-level-3" href="#api">API</a><a class="toc-level-4" href="#signjwt-payload-secret-options">signJwt(payload, secret, options?)</a><a class="toc-level-4" href="#verifyjwt-t-token-secret-options">verifyJwt&lt;T&gt;(token, secret, options?)</a><a class="toc-level-4" href="#jwtauth-options">jwtAuth(options)</a><a class="toc-level-3" href="#usage">Usage</a><a class="toc-level-3" href="#requirements-notes">Requirements / Notes</a><a class="toc-level-2" href="#api">Complete API</a><a class="toc-level-2" href="#examples">Examples</a></nav></aside>
</main>
<footer>WRNexusJS 0.2.12 · SSR-first · Bun-native · Documentation generated from published package APIs.</footer>
<footer>WRNexusJS 0.2.14 · SSR-first · Bun-native · Documentation generated from published package APIs.</footer>
</div>
}
}
+3 -3
View File
@@ -12,8 +12,8 @@ page wrnexusmobile {
<button data-wire-theme-toggle class="theme-button" aria-label="Toggle theme">Theme</button>
</header>
<main class="page package-page">
<aside class="sidebar"><a href="/packages">← All packages</a><span class="category">Native</span><h1>@wrnexus/mobile</h1><p>SSR-safe compatibility access to Capacitor plugins.</p><code>bun add @wrnexus/mobile@0.2.12</code><nav><a href="#guide">Guide</a><a href="#api">Complete API</a></nav></aside>
<article class="documentation"><section class="doc-intro"><span class="eyebrow">Native</span><h1>@wrnexus/mobile</h1><p>SSR-safe compatibility access to Capacitor plugins.</p><pre><code>bun add @wrnexus/mobile@0.2.12</code></pre></section><section id="guide" class="prose"><p>SSR-safe access to Capacitor plugins from WRNexusJS browser code.</p>
<aside class="sidebar"><a href="/packages">← All packages</a><span class="category">Native</span><h1>@wrnexus/mobile</h1><p>SSR-safe compatibility access to Capacitor plugins.</p><code>bun add @wrnexus/mobile@0.2.14</code><nav><a href="#guide">Guide</a><a href="#api">Complete API</a></nav></aside>
<article class="documentation"><section class="doc-intro"><span class="eyebrow">Native</span><h1>@wrnexus/mobile</h1><p>SSR-safe compatibility access to Capacitor plugins.</p><pre><code>bun add @wrnexus/mobile@0.2.14</code></pre></section><section id="guide" class="prose"><p>SSR-safe access to Capacitor plugins from WRNexusJS browser code.</p>
<pre data-language="bash"><code>wrnexus mobile add @capacitor/camera</code></pre>
<pre data-language="ts"><code>import &#123; Camera &#125; from &quot;@capacitor/camera&quot;;
import &#123; mobile &#125; from &quot;@wrnexus/mobile&quot;;
@@ -70,7 +70,7 @@ if (mobile.isNative()) &#123;
&#125;</code></pre></article></div></section></article>
<aside class="on-this-page"><h2>On this page</h2><nav><a class="toc-level-2" href="#guide">Guide</a><a class="toc-level-2" href="#api">Complete API</a><a class="toc-level-2" href="#examples">Examples</a></nav></aside>
</main>
<footer>WRNexusJS 0.2.12 · SSR-first · Bun-native · Documentation generated from published package APIs.</footer>
<footer>WRNexusJS 0.2.14 · SSR-first · Bun-native · Documentation generated from published package APIs.</footer>
</div>
}
}
+3 -3
View File
@@ -12,8 +12,8 @@ page wrnexusnative {
<button data-wire-theme-toggle class="theme-button" aria-label="Toggle theme">Theme</button>
</header>
<main class="page package-page">
<aside class="sidebar"><a href="/packages">← All packages</a><span class="category">Native</span><h1>@wrnexus/native</h1><p>Cross-platform browser and Capacitor capability registry.</p><code>bun add @wrnexus/native@0.2.12</code><nav><a href="#guide">Guide</a><a href="#api">Complete API</a></nav></aside>
<article class="documentation"><section class="doc-intro"><span class="eyebrow">Native</span><h1>@wrnexus/native</h1><p>Cross-platform browser and Capacitor capability registry.</p><pre><code>bun add @wrnexus/native@0.2.12</code></pre></section><section id="guide" class="prose"><p>Cross-platform capabilities for browsers, Capacitor WebViews, and compiled native apps.</p>
<aside class="sidebar"><a href="/packages">← All packages</a><span class="category">Native</span><h1>@wrnexus/native</h1><p>Cross-platform browser and Capacitor capability registry.</p><code>bun add @wrnexus/native@0.2.14</code><nav><a href="#guide">Guide</a><a href="#api">Complete API</a></nav></aside>
<article class="documentation"><section class="doc-intro"><span class="eyebrow">Native</span><h1>@wrnexus/native</h1><p>Cross-platform browser and Capacitor capability registry.</p><pre><code>bun add @wrnexus/native@0.2.14</code></pre></section><section id="guide" class="prose"><p>Cross-platform capabilities for browsers, Capacitor WebViews, and compiled native apps.</p>
<pre data-language="ts"><code>import &#123; native &#125; from &quot;@wrnexus/native&quot;;
if (native.supports(&quot;share&quot;)) await native.run(&quot;share&quot;, &#123; title: &quot;WRNexusJS&quot;, url: location.href &#125;);</code></pre>
@@ -49,7 +49,7 @@ export &#123; NativeCapability, NativePlatform, NativeRunOptions, NativeTarget,
if (native.supports(&quot;share&quot;)) await native.run(&quot;share&quot;, &#123; title: &quot;WRNexusJS&quot;, url: location.href &#125;);</code></pre></article></div></section></article>
<aside class="on-this-page"><h2>On this page</h2><nav><a class="toc-level-2" href="#guide">Guide</a><a class="toc-level-2" href="#api">Complete API</a><a class="toc-level-2" href="#examples">Examples</a></nav></aside>
</main>
<footer>WRNexusJS 0.2.12 · SSR-first · Bun-native · Documentation generated from published package APIs.</footer>
<footer>WRNexusJS 0.2.14 · SSR-first · Bun-native · Documentation generated from published package APIs.</footer>
</div>
}
}
+3 -3
View File
@@ -12,8 +12,8 @@ page wrnexusoauth {
<button data-wire-theme-toggle class="theme-button" aria-label="Toggle theme">Theme</button>
</header>
<main class="page package-page">
<aside class="sidebar"><a href="/packages">← All packages</a><span class="category">Security</span><h1>@wrnexus/oauth</h1><p>OAuth 2.0, PKCE, provider presets, and profile mapping.</p><code>bun add @wrnexus/oauth@0.2.12</code><nav><a href="#guide">Guide</a><a href="#api">Complete API</a></nav></aside>
<article class="documentation"><section class="doc-intro"><span class="eyebrow">Security</span><h1>@wrnexus/oauth</h1><p>OAuth 2.0, PKCE, provider presets, and profile mapping.</p><pre><code>bun add @wrnexus/oauth@0.2.12</code></pre></section><section id="guide" class="prose"><blockquote>Dependency-free OAuth 2.0 sign-in for any provider, with PKCE and presets for Google, GitHub, and Discord.</blockquote>
<aside class="sidebar"><a href="/packages">← All packages</a><span class="category">Security</span><h1>@wrnexus/oauth</h1><p>OAuth 2.0, PKCE, provider presets, and profile mapping.</p><code>bun add @wrnexus/oauth@0.2.14</code><nav><a href="#guide">Guide</a><a href="#api">Complete API</a></nav></aside>
<article class="documentation"><section class="doc-intro"><span class="eyebrow">Security</span><h1>@wrnexus/oauth</h1><p>OAuth 2.0, PKCE, provider presets, and profile mapping.</p><pre><code>bun add @wrnexus/oauth@0.2.14</code></pre></section><section id="guide" class="prose"><blockquote>Dependency-free OAuth 2.0 sign-in for any provider, with PKCE and presets for Google, GitHub, and Discord.</blockquote>
<p>Part of the <strong>WRNexusJS</strong> framework — an SSR-first, Bun-native full-stack web framework.</p>
<h3 id="overview">Overview</h3>
<p><code>@wrnexus/oauth</code> implements the OAuth 2.0 Authorization Code flow (with PKCE) for server-side sign-in. It ships ready-made provider presets and a <code>defineProvider</code> helper for custom providers, then gives you two flow functions — <code>startAuth</code> (build the redirect) and <code>completeAuth</code> (exchange the code and fetch the user's profile). It has no runtime dependencies: it uses the platform <code>fetch</code> and WebCrypto only. Pairs naturally with <code>@wrnexus/core</code>'s <code>logIn</code> to establish a session once you have a normalized profile.</p>
@@ -263,7 +263,7 @@ interface StartAuthResult &#123;
&#125;</code></pre></article></div></section></article>
<aside class="on-this-page"><h2>On this page</h2><nav><a class="toc-level-2" href="#guide">Guide</a><a class="toc-level-3" href="#overview">Overview</a><a class="toc-level-3" href="#installation">Installation</a><a class="toc-level-3" href="#api">API</a><a class="toc-level-4" href="#providers">Providers</a><a class="toc-level-4" href="#flow">Flow</a><a class="toc-level-4" href="#startauth-provider-options-promise-startauthresult">startAuth(provider, options): Promise&lt;StartAuthResult&gt;</a><a class="toc-level-4" href="#completeauth-provider-options-promise-tokens-profile">completeAuth(provider, options): Promise&lt;&#123; tokens, profile &#125;&gt;</a><a class="toc-level-4" href="#lower-level-helpers">Lower-level helpers</a><a class="toc-level-4" href="#types">Types</a><a class="toc-level-3" href="#usage">Usage</a><a class="toc-level-3" href="#requirements-notes">Requirements / Notes</a><a class="toc-level-2" href="#api">Complete API</a><a class="toc-level-2" href="#examples">Examples</a></nav></aside>
</main>
<footer>WRNexusJS 0.2.12 · SSR-first · Bun-native · Documentation generated from published package APIs.</footer>
<footer>WRNexusJS 0.2.14 · SSR-first · Bun-native · Documentation generated from published package APIs.</footer>
</div>
}
}
+3 -3
View File
@@ -12,8 +12,8 @@ page wrnexuspubsub {
<button data-wire-theme-toggle class="theme-button" aria-label="Toggle theme">Theme</button>
</header>
<main class="page package-page">
<aside class="sidebar"><a href="/packages">← All packages</a><span class="category">Realtime</span><h1>@wrnexus/pubsub</h1><p>In-process and Redis-backed publish/subscribe.</p><code>bun add @wrnexus/pubsub@0.2.12</code><nav><a href="#guide">Guide</a><a href="#api">Complete API</a></nav></aside>
<article class="documentation"><section class="doc-intro"><span class="eyebrow">Realtime</span><h1>@wrnexus/pubsub</h1><p>In-process and Redis-backed publish/subscribe.</p><pre><code>bun add @wrnexus/pubsub@0.2.12</code></pre></section><section id="guide" class="prose"><blockquote>Topic-based publish/subscribe with a pluggable driver — in-process by default, Redis for cross-process messaging.</blockquote>
<aside class="sidebar"><a href="/packages">← All packages</a><span class="category">Realtime</span><h1>@wrnexus/pubsub</h1><p>In-process and Redis-backed publish/subscribe.</p><code>bun add @wrnexus/pubsub@0.2.14</code><nav><a href="#guide">Guide</a><a href="#api">Complete API</a></nav></aside>
<article class="documentation"><section class="doc-intro"><span class="eyebrow">Realtime</span><h1>@wrnexus/pubsub</h1><p>In-process and Redis-backed publish/subscribe.</p><pre><code>bun add @wrnexus/pubsub@0.2.14</code></pre></section><section id="guide" class="prose"><blockquote>Topic-based publish/subscribe with a pluggable driver — in-process by default, Redis for cross-process messaging.</blockquote>
<p>Part of the <strong>WRNexusJS</strong> framework — an SSR-first, Bun-native full-stack web framework.</p>
<h3 id="overview">Overview</h3>
<p><code>@wrnexus/pubsub</code> 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 (<code>@wrnexus/pubsub/redis</code>) to fan messages out across processes or hosts. It also backs <code>@wrnexus/core</code>'s realtime bridge for horizontal scaling.</p>
@@ -131,7 +131,7 @@ type Handler&lt;T = unknown&gt; = (message: T, topic: string) =&gt; void | Promi
&#125;</code></pre></article><article class="example-card"><h3>Example 4</h3><pre data-language="ts"><code>function redisDriver(url?: string): PubSubDriver &amp; &#123; close(): void &#125;;</code></pre></article></div></section></article>
<aside class="on-this-page"><h2>On this page</h2><nav><a class="toc-level-2" href="#guide">Guide</a><a class="toc-level-3" href="#overview">Overview</a><a class="toc-level-3" href="#installation">Installation</a><a class="toc-level-3" href="#api">API</a><a class="toc-level-4" href="#createpubsub-driver-pubsub">createPubSub(driver?): PubSub</a><a class="toc-level-4" href="#pattern-matching">Pattern matching</a><a class="toc-level-4" href="#memorydriver-pubsubdriver">memoryDriver(): PubSubDriver</a><a class="toc-level-4" href="#wrnexus-pubsub-redis-redisdriver-url">@wrnexus/pubsub/redis — redisDriver(url?)</a><a class="toc-level-4" href="#resp-codec-internal">RESP codec (internal)</a><a class="toc-level-3" href="#usage">Usage</a><a class="toc-level-3" href="#requirements-notes">Requirements / Notes</a><a class="toc-level-2" href="#api">Complete API</a><a class="toc-level-2" href="#examples">Examples</a></nav></aside>
</main>
<footer>WRNexusJS 0.2.12 · SSR-first · Bun-native · Documentation generated from published package APIs.</footer>
<footer>WRNexusJS 0.2.14 · SSR-first · Bun-native · Documentation generated from published package APIs.</footer>
</div>
}
}
+3 -3
View File
@@ -12,8 +12,8 @@ page wrnexusqueue {
<button data-wire-theme-toggle class="theme-button" aria-label="Toggle theme">Theme</button>
</header>
<main class="page package-page">
<aside class="sidebar"><a href="/packages">← All packages</a><span class="category">Data</span><h1>@wrnexus/queue</h1><p>Background jobs with delay, concurrency, retry, and repetition.</p><code>bun add @wrnexus/queue@0.2.12</code><nav><a href="#guide">Guide</a><a href="#api">Complete API</a></nav></aside>
<article class="documentation"><section class="doc-intro"><span class="eyebrow">Data</span><h1>@wrnexus/queue</h1><p>Background jobs with delay, concurrency, retry, and repetition.</p><pre><code>bun add @wrnexus/queue@0.2.12</code></pre></section><section id="guide" class="prose"><blockquote>A background job queue with delays, retries + exponential backoff, recurring jobs, and concurrent workers.</blockquote>
<aside class="sidebar"><a href="/packages">← All packages</a><span class="category">Data</span><h1>@wrnexus/queue</h1><p>Background jobs with delay, concurrency, retry, and repetition.</p><code>bun add @wrnexus/queue@0.2.14</code><nav><a href="#guide">Guide</a><a href="#api">Complete API</a></nav></aside>
<article class="documentation"><section class="doc-intro"><span class="eyebrow">Data</span><h1>@wrnexus/queue</h1><p>Background jobs with delay, concurrency, retry, and repetition.</p><pre><code>bun add @wrnexus/queue@0.2.14</code></pre></section><section id="guide" class="prose"><blockquote>A background job queue with delays, retries + exponential backoff, recurring jobs, and concurrent workers.</blockquote>
<p>Part of the <strong>WRNexusJS</strong> framework — an SSR-first, Bun-native full-stack web framework.</p>
<h3 id="overview">Overview</h3>
<p><code>@wrnexus/queue</code> 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 <code>drain()</code>.</p>
@@ -171,7 +171,7 @@ export &#123; type AddOptions, type Job, type JobHandler, type Queue, type Queue
&#125;</code></pre></article></div></section></article>
<aside class="on-this-page"><h2>On this page</h2><nav><a class="toc-level-2" href="#guide">Guide</a><a class="toc-level-3" href="#overview">Overview</a><a class="toc-level-3" href="#installation">Installation</a><a class="toc-level-3" href="#api">API</a><a class="toc-level-4" href="#createqueue-options-queue">createQueue(options?): Queue</a><a class="toc-level-4" href="#queueoptions">QueueOptions</a><a class="toc-level-4" href="#queue">Queue</a><a class="toc-level-4" href="#addoptions">AddOptions</a><a class="toc-level-4" href="#jobhandler-t">JobHandler&lt;T&gt;</a><a class="toc-level-4" href="#job-t">Job&lt;T&gt;</a><a class="toc-level-3" href="#usage">Usage</a><a class="toc-level-4" href="#recurring-jobs">Recurring jobs</a><a class="toc-level-4" href="#handling-permanent-failures">Handling permanent failures</a><a class="toc-level-4" href="#deterministic-testing">Deterministic testing</a><a class="toc-level-3" href="#retry-backoff-behavior">Retry &amp; backoff behavior</a><a class="toc-level-3" href="#requirements-notes">Requirements / Notes</a><a class="toc-level-2" href="#api">Complete API</a><a class="toc-level-2" href="#examples">Examples</a></nav></aside>
</main>
<footer>WRNexusJS 0.2.12 · SSR-first · Bun-native · Documentation generated from published package APIs.</footer>
<footer>WRNexusJS 0.2.14 · SSR-first · Bun-native · Documentation generated from published package APIs.</footer>
</div>
}
}
+3 -3
View File
@@ -12,8 +12,8 @@ page wrnexusreactive {
<button data-wire-theme-toggle class="theme-button" aria-label="Toggle theme">Theme</button>
</header>
<main class="page package-page">
<aside class="sidebar"><a href="/packages">← All packages</a><span class="category">Frontend</span><h1>@wrnexus/reactive</h1><p>Small type-safe reactive signal primitives.</p><code>bun add @wrnexus/reactive@0.2.12</code><nav><a href="#guide">Guide</a><a href="#api">Complete API</a></nav></aside>
<article class="documentation"><section class="doc-intro"><span class="eyebrow">Frontend</span><h1>@wrnexus/reactive</h1><p>Small type-safe reactive signal primitives.</p><pre><code>bun add @wrnexus/reactive@0.2.12</code></pre></section><section id="guide" class="prose"><blockquote>Tiny, type-safe reactive primitives (signals) with zero dependencies.</blockquote>
<aside class="sidebar"><a href="/packages">← All packages</a><span class="category">Frontend</span><h1>@wrnexus/reactive</h1><p>Small type-safe reactive signal primitives.</p><code>bun add @wrnexus/reactive@0.2.14</code><nav><a href="#guide">Guide</a><a href="#api">Complete API</a></nav></aside>
<article class="documentation"><section class="doc-intro"><span class="eyebrow">Frontend</span><h1>@wrnexus/reactive</h1><p>Small type-safe reactive signal primitives.</p><pre><code>bun add @wrnexus/reactive@0.2.14</code></pre></section><section id="guide" class="prose"><blockquote>Tiny, type-safe reactive primitives (signals) with zero dependencies.</blockquote>
<p>Part of the <strong>WRNexusJS</strong> framework — an SSR-first, Bun-native full-stack web framework.</p>
<h3 id="overview">Overview</h3>
<p><code>@wrnexus/reactive</code> is the seed of WRNexusJS's reactivity layer: a minimal <code>signal</code> 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 <code>.wrn</code> compiler's <code>state</code> blocks) can build reactive bindings on top of it. Reach for it when you need observable state without pulling in a full reactivity library.</p>
@@ -133,7 +133,7 @@ const user: Signal&lt;&#123; name: string &#125; | null&gt; = signal(null);
user.set(&#123; name: &quot;Ada&quot; &#125;);</code></pre></article></div></section></article>
<aside class="on-this-page"><h2>On this page</h2><nav><a class="toc-level-2" href="#guide">Guide</a><a class="toc-level-3" href="#overview">Overview</a><a class="toc-level-3" href="#installation">Installation</a><a class="toc-level-3" href="#api">API</a><a class="toc-level-4" href="#signal-t-initial-t-signal-t">signal&lt;T&gt;(initial: T): Signal&lt;T&gt;</a><a class="toc-level-4" href="#types">Types</a><a class="toc-level-3" href="#usage">Usage</a><a class="toc-level-3" href="#requirements-notes">Requirements / Notes</a><a class="toc-level-2" href="#api">Complete API</a><a class="toc-level-2" href="#examples">Examples</a></nav></aside>
</main>
<footer>WRNexusJS 0.2.12 · SSR-first · Bun-native · Documentation generated from published package APIs.</footer>
<footer>WRNexusJS 0.2.14 · SSR-first · Bun-native · Documentation generated from published package APIs.</footer>
</div>
}
}
+3 -3
View File
@@ -12,8 +12,8 @@ page wrnexusrouter {
<button data-wire-theme-toggle class="theme-button" aria-label="Toggle theme">Theme</button>
</header>
<main class="page package-page">
<aside class="sidebar"><a href="/packages">← All packages</a><span class="category">Core</span><h1>@wrnexus/router</h1><p>Filesystem discovery, route matching, and typed route generation.</p><code>bun add @wrnexus/router@0.2.12</code><nav><a href="#guide">Guide</a><a href="#api">Complete API</a></nav></aside>
<article class="documentation"><section class="doc-intro"><span class="eyebrow">Core</span><h1>@wrnexus/router</h1><p>Filesystem discovery, route matching, and typed route generation.</p><pre><code>bun add @wrnexus/router@0.2.12</code></pre></section><section id="guide" class="prose"><blockquote>File-based router that maps an <code>app/</code> directory onto route tables and matches request paths against them.</blockquote>
<aside class="sidebar"><a href="/packages">← All packages</a><span class="category">Core</span><h1>@wrnexus/router</h1><p>Filesystem discovery, route matching, and typed route generation.</p><code>bun add @wrnexus/router@0.2.14</code><nav><a href="#guide">Guide</a><a href="#api">Complete API</a></nav></aside>
<article class="documentation"><section class="doc-intro"><span class="eyebrow">Core</span><h1>@wrnexus/router</h1><p>Filesystem discovery, route matching, and typed route generation.</p><pre><code>bun add @wrnexus/router@0.2.14</code></pre></section><section id="guide" class="prose"><blockquote>File-based router that maps an <code>app/</code> directory onto route tables and matches request paths against them.</blockquote>
<p>Part of the <strong>WRNexusJS</strong> framework — an SSR-first, Bun-native full-stack web framework.</p>
<h3 id="overview">Overview</h3>
<p><code>@wrnexus/router</code> scans an application's <code>app/</code> directory once at startup and builds route tables for pages, API endpoints, realtime channels, middleware, server-rendered <code>.wrn</code> components, layouts, and validation schemas. It also compiles URL patterns (<code>/users/[id]</code>) 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.</p>
@@ -260,7 +260,7 @@ interface ComponentRef &#123;
&#125;</code></pre></article></div></section></article>
<aside class="on-this-page"><h2>On this page</h2><nav><a class="toc-level-2" href="#guide">Guide</a><a class="toc-level-3" href="#overview">Overview</a><a class="toc-level-3" href="#installation">Installation</a><a class="toc-level-3" href="#directory-conventions">Directory conventions</a><a class="toc-level-3" href="#api">API</a><a class="toc-level-4" href="#buildrouter-appdir-opts-router">buildRouter(appDir, opts?): Router</a><a class="toc-level-4" href="#route-matching">Route matching</a><a class="toc-level-4" href="#typed-routes-codegen">Typed-routes codegen</a><a class="toc-level-4" href="#re-exports">Re-exports</a><a class="toc-level-3" href="#usage">Usage</a><a class="toc-level-3" href="#requirements-notes">Requirements / Notes</a><a class="toc-level-2" href="#api">Complete API</a><a class="toc-level-2" href="#examples">Examples</a></nav></aside>
</main>
<footer>WRNexusJS 0.2.12 · SSR-first · Bun-native · Documentation generated from published package APIs.</footer>
<footer>WRNexusJS 0.2.14 · SSR-first · Bun-native · Documentation generated from published package APIs.</footer>
</div>
}
}
+3 -3
View File
@@ -12,8 +12,8 @@ page wrnexusssr {
<button data-wire-theme-toggle class="theme-button" aria-label="Toggle theme">Theme</button>
</header>
<main class="page package-page">
<aside class="sidebar"><a href="/packages">← All packages</a><span class="category">Runtime</span><h1>@wrnexus/ssr</h1><p>Secure HTML document rendering and SEO metadata.</p><code>bun add @wrnexus/ssr@0.2.12</code><nav><a href="#guide">Guide</a><a href="#api">Complete API</a></nav></aside>
<article class="documentation"><section class="doc-intro"><span class="eyebrow">Runtime</span><h1>@wrnexus/ssr</h1><p>Secure HTML document rendering and SEO metadata.</p><pre><code>bun add @wrnexus/ssr@0.2.12</code></pre></section><section id="guide" class="prose"><blockquote>Server-side rendering: wraps a page's HTML body in a complete HTML document with a metadata-driven <code>&lt;head&gt;</code>.</blockquote>
<aside class="sidebar"><a href="/packages">← All packages</a><span class="category">Runtime</span><h1>@wrnexus/ssr</h1><p>Secure HTML document rendering and SEO metadata.</p><code>bun add @wrnexus/ssr@0.2.14</code><nav><a href="#guide">Guide</a><a href="#api">Complete API</a></nav></aside>
<article class="documentation"><section class="doc-intro"><span class="eyebrow">Runtime</span><h1>@wrnexus/ssr</h1><p>Secure HTML document rendering and SEO metadata.</p><pre><code>bun add @wrnexus/ssr@0.2.14</code></pre></section><section id="guide" class="prose"><blockquote>Server-side rendering: wraps a page's HTML body in a complete HTML document with a metadata-driven <code>&lt;head&gt;</code>.</blockquote>
<p>Part of the <strong>WRNexusJS</strong> framework — an SSR-first, Bun-native full-stack web framework.</p>
<h3 id="overview">Overview</h3>
<p>Pages in WRNexusJS return an HTML string for the body. <code>@wrnexus/ssr</code> takes that body and produces a full HTML document — building the <code>&lt;head&gt;</code> from page metadata and global SEO defaults, resolving canonical/Open Graph/Twitter tags, and injecting module preloads and <code>&lt;script type=&quot;module&quot;&gt;</code> 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.</p>
@@ -165,7 +165,7 @@ return new Response(html, &#123;
&#125;);</code></pre></article></div></section></article>
<aside class="on-this-page"><h2>On this page</h2><nav><a class="toc-level-2" href="#guide">Guide</a><a class="toc-level-3" href="#overview">Overview</a><a class="toc-level-3" href="#installation">Installation</a><a class="toc-level-3" href="#api">API</a><a class="toc-level-4" href="#renderdocument-opts-renderoptions-string">renderDocument(opts: RenderOptions): string</a><a class="toc-level-4" href="#renderoptions">RenderOptions</a><a class="toc-level-4" href="#metadata-resolution">Metadata resolution</a><a class="toc-level-3" href="#usage">Usage</a><a class="toc-level-3" href="#requirements-notes">Requirements / Notes</a><a class="toc-level-2" href="#api">Complete API</a><a class="toc-level-2" href="#examples">Examples</a></nav></aside>
</main>
<footer>WRNexusJS 0.2.12 · SSR-first · Bun-native · Documentation generated from published package APIs.</footer>
<footer>WRNexusJS 0.2.14 · SSR-first · Bun-native · Documentation generated from published package APIs.</footer>
</div>
}
}
+10 -4
View File
@@ -12,8 +12,8 @@ page wrnexusstyles {
<button data-wire-theme-toggle class="theme-button" aria-label="Toggle theme">Theme</button>
</header>
<main class="page package-page">
<aside class="sidebar"><a href="/packages">← All packages</a><span class="category">Frontend</span><h1>@wrnexus/styles</h1><p>CSS pipeline, themes, fonts, profiles, and application config.</p><code>bun add @wrnexus/styles@0.2.12</code><nav><a href="#guide">Guide</a><a href="#api">Complete API</a></nav></aside>
<article class="documentation"><section class="doc-intro"><span class="eyebrow">Frontend</span><h1>@wrnexus/styles</h1><p>CSS pipeline, themes, fonts, profiles, and application config.</p><pre><code>bun add @wrnexus/styles@0.2.12</code></pre></section><section id="guide" class="prose"><blockquote>Global CSS bundling, the <code>--wire-*</code> design-token theme system, and the <code>wrnexus.config.ts</code> app-config loader for WRNexusJS apps.</blockquote>
<aside class="sidebar"><a href="/packages">← All packages</a><span class="category">Frontend</span><h1>@wrnexus/styles</h1><p>CSS pipeline, themes, fonts, profiles, and application config.</p><code>bun add @wrnexus/styles@0.2.14</code><nav><a href="#guide">Guide</a><a href="#api">Complete API</a></nav></aside>
<article class="documentation"><section class="doc-intro"><span class="eyebrow">Frontend</span><h1>@wrnexus/styles</h1><p>CSS pipeline, themes, fonts, profiles, and application config.</p><pre><code>bun add @wrnexus/styles@0.2.14</code></pre></section><section id="guide" class="prose"><blockquote>Global CSS bundling, the <code>--wire-*</code> design-token theme system, and the <code>wrnexus.config.ts</code> app-config loader for WRNexusJS apps.</blockquote>
<p>Part of the <strong>WRNexusJS</strong> framework — an SSR-first, Bun-native full-stack web framework.</p>
<h3 id="overview">Overview</h3>
<p>This package owns three server-side concerns that shape every page a WRNexusJS app renders:</p>
@@ -263,6 +263,12 @@ interface FontConfig &#123;
* configured. The output is trusted, framework-controlled HTML.
*/
declare function renderFontHead(fonts?: FontConfig): string;
/**
* Production variant that inlines the small Google Fonts stylesheet at build
* time. This removes a render-blocking CSS round trip while retaining the same
* font files, `font-display`, CSP sources, and offline-safe fallback markup.
*/
declare function renderProductionFontHead(fonts?: FontConfig, fetcher?: (input: string, init?: RequestInit) =&gt; Promise&lt;Response&gt;): Promise&lt;string&gt;;
/**
* CSP source hosts required by the configured fonts, so the policy can be
* auto-extended (Google Fonts need their CSS + static hosts allow-listed).
@@ -501,7 +507,7 @@ declare function bundleCss(entryPath: string, mode: Mode): Promise&lt;string&gt;
*/
declare function renderStyles(ctx: StyleProcessContext, styles?: StylesConfig): Promise&lt;string&gt;;
export &#123; 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, renderStyles, renderThemeCss, renderThemeRuntime, resolveProfile, resolveThemeConfig, resolveThemeName &#125;;
export &#123; 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 &#125;;
</code></pre></section><section id="examples" class="prose examples"><h2>Examples</h2><p>Copy-ready examples taken from this package's published documentation.</p><div class="example-grid"><article class="example-card"><h3>Example 1</h3><pre data-language="bash"><code>bun add @wrnexus/styles</code></pre></article><article class="example-card"><h3>Example 2</h3><pre data-language="ts"><code>interface StylesConfig &#123;
/** CSS entry path relative to the app root. Default: app/styles/global.css */
entry?: string;
@@ -556,7 +562,7 @@ export default &#123;
&#125; satisfies AppConfig;</code></pre></article></div></section></article>
<aside class="on-this-page"><h2>On this page</h2><nav><a class="toc-level-2" href="#guide">Guide</a><a class="toc-level-3" href="#overview">Overview</a><a class="toc-level-3" href="#installation">Installation</a><a class="toc-level-3" href="#api">API</a><a class="toc-level-4" href="#config-loading">Config loading</a><a class="toc-level-4" href="#appconfig">AppConfig</a><a class="toc-level-4" href="#styles-pipeline">Styles pipeline</a><a class="toc-level-4" href="#theme-system">Theme system</a><a class="toc-level-3" href="#usage">Usage</a><a class="toc-level-4" href="#wrnexus-config-ts">wrnexus.config.ts</a><a class="toc-level-4" href="#loading-config-producing-css">Loading config + producing CSS</a><a class="toc-level-4" href="#rendering-the-theme">Rendering the theme</a><a class="toc-level-3" href="#requirements-notes">Requirements / Notes</a><a class="toc-level-2" href="#api">Complete API</a><a class="toc-level-2" href="#examples">Examples</a></nav></aside>
</main>
<footer>WRNexusJS 0.2.12 · SSR-first · Bun-native · Documentation generated from published package APIs.</footer>
<footer>WRNexusJS 0.2.14 · SSR-first · Bun-native · Documentation generated from published package APIs.</footer>
</div>
}
}
+3 -3
View File
@@ -12,8 +12,8 @@ page wrnexustest {
<button data-wire-theme-toggle class="theme-button" aria-label="Toggle theme">Theme</button>
</header>
<main class="page package-page">
<aside class="sidebar"><a href="/packages">← All packages</a><span class="category">Tooling</span><h1>@wrnexus/test</h1><p>WRNexusJS-aware component, route, and browser testing utilities.</p><code>bun add @wrnexus/test@0.2.12</code><nav><a href="#guide">Guide</a><a href="#api">Complete API</a></nav></aside>
<article class="documentation"><section class="doc-intro"><span class="eyebrow">Tooling</span><h1>@wrnexus/test</h1><p>WRNexusJS-aware component, route, and browser testing utilities.</p><pre><code>bun add @wrnexus/test@0.2.12</code></pre></section><section id="guide" class="prose"><blockquote>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 <code>bun:test</code>.</blockquote>
<aside class="sidebar"><a href="/packages">← All packages</a><span class="category">Tooling</span><h1>@wrnexus/test</h1><p>WRNexusJS-aware component, route, and browser testing utilities.</p><code>bun add @wrnexus/test@0.2.14</code><nav><a href="#guide">Guide</a><a href="#api">Complete API</a></nav></aside>
<article class="documentation"><section class="doc-intro"><span class="eyebrow">Tooling</span><h1>@wrnexus/test</h1><p>WRNexusJS-aware component, route, and browser testing utilities.</p><pre><code>bun add @wrnexus/test@0.2.14</code></pre></section><section id="guide" class="prose"><blockquote>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 <code>bun:test</code>.</blockquote>
<p>Part of the <strong>WRNexusJS</strong> framework — an SSR-first, Bun-native full-stack web framework.</p>
<h3 id="overview">Overview</h3>
<p><code>@wrnexus/test</code> is the server-side test toolkit you reach for when writing tests for a WRNexusJS app. It runs under <code>bun test</code> (invoked via <code>wrnexus test</code>) and gives you a single import surface: the <code>bun:test</code> primitives (<code>test</code>, <code>expect</code>, <code>mock</code>, …) re-exported alongside WRNexusJS-aware helpers that compile <code>.wrn</code> components, hydrate server HTML in a DOM, invoke API route handlers, and boot the real app on an ephemeral port for integration tests.</p>
@@ -170,7 +170,7 @@ export &#123; type Harness, type HarnessOptions, callRoute, createHarness, mount
): Promise&lt;Response&gt;;</code></pre></article></div></section></article>
<aside class="on-this-page"><h2>On this page</h2><nav><a class="toc-level-2" href="#guide">Guide</a><a class="toc-level-3" href="#overview">Overview</a><a class="toc-level-3" href="#installation">Installation</a><a class="toc-level-3" href="#api">API</a><a class="toc-level-4" href="#re-exported-test-primitives">Re-exported test primitives</a><a class="toc-level-4" href="#rendercomponent-source-props">renderComponent(source, props?)</a><a class="toc-level-4" href="#mounthtml-html">mountHtml(html)</a><a class="toc-level-4" href="#callroute-handler-request">callRoute(handler, request)</a><a class="toc-level-4" href="#createharness-projectroot-options">createHarness(projectRoot, options?)</a><a class="toc-level-3" href="#usage">Usage</a><a class="toc-level-3" href="#requirements-notes">Requirements / Notes</a><a class="toc-level-2" href="#api">Complete API</a><a class="toc-level-2" href="#examples">Examples</a></nav></aside>
</main>
<footer>WRNexusJS 0.2.12 · SSR-first · Bun-native · Documentation generated from published package APIs.</footer>
<footer>WRNexusJS 0.2.14 · SSR-first · Bun-native · Documentation generated from published package APIs.</footer>
</div>
}
}
+3 -3
View File
@@ -12,8 +12,8 @@ page wrnexustracking {
<button data-wire-theme-toggle class="theme-button" aria-label="Toggle theme">Theme</button>
</header>
<main class="page package-page">
<aside class="sidebar"><a href="/packages">← All packages</a><span class="category">Runtime</span><h1>@wrnexus/tracking</h1><p>Error/event capture, middleware, filtering, and sinks.</p><code>bun add @wrnexus/tracking@0.2.12</code><nav><a href="#guide">Guide</a><a href="#api">Complete API</a></nav></aside>
<article class="documentation"><section class="doc-intro"><span class="eyebrow">Runtime</span><h1>@wrnexus/tracking</h1><p>Error/event capture, middleware, filtering, and sinks.</p><pre><code>bun add @wrnexus/tracking@0.2.12</code></pre></section><section id="guide" class="prose"><blockquote>Error tracking for WRNexusJS apps: capture exceptions manually or via middleware and fan them out to pluggable sinks.</blockquote>
<aside class="sidebar"><a href="/packages">← All packages</a><span class="category">Runtime</span><h1>@wrnexus/tracking</h1><p>Error/event capture, middleware, filtering, and sinks.</p><code>bun add @wrnexus/tracking@0.2.14</code><nav><a href="#guide">Guide</a><a href="#api">Complete API</a></nav></aside>
<article class="documentation"><section class="doc-intro"><span class="eyebrow">Runtime</span><h1>@wrnexus/tracking</h1><p>Error/event capture, middleware, filtering, and sinks.</p><pre><code>bun add @wrnexus/tracking@0.2.14</code></pre></section><section id="guide" class="prose"><blockquote>Error tracking for WRNexusJS apps: capture exceptions manually or via middleware and fan them out to pluggable sinks.</blockquote>
<p>Part of the <strong>WRNexusJS</strong> framework — an SSR-first, Bun-native full-stack web framework.</p>
<h3 id="overview">Overview</h3>
<p><code>@wrnexus/tracking</code> is a small, server-side error-capture layer. You create a tracker with one or more <strong>sinks</strong>, then feed it errors — either manually with <code>tracker.capture(err, context)</code> or automatically by mounting <code>tracker.middleware()</code> in your request pipeline. A <code>consoleSink</code> 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.</p>
@@ -151,7 +151,7 @@ try &#123;
&#125;</code></pre></article></div></section></article>
<aside class="on-this-page"><h2>On this page</h2><nav><a class="toc-level-2" href="#guide">Guide</a><a class="toc-level-3" href="#overview">Overview</a><a class="toc-level-3" href="#installation">Installation</a><a class="toc-level-3" href="#api">API</a><a class="toc-level-4" href="#createtracker-options-tracker">createTracker(options?): Tracker</a><a class="toc-level-4" href="#consolesink-errorsink">consoleSink: ErrorSink</a><a class="toc-level-4" href="#types">Types</a><a class="toc-level-3" href="#usage">Usage</a><a class="toc-level-3" href="#requirements-notes">Requirements / Notes</a><a class="toc-level-2" href="#api">Complete API</a><a class="toc-level-2" href="#examples">Examples</a></nav></aside>
</main>
<footer>WRNexusJS 0.2.12 · SSR-first · Bun-native · Documentation generated from published package APIs.</footer>
<footer>WRNexusJS 0.2.14 · SSR-first · Bun-native · Documentation generated from published package APIs.</footer>
</div>
}
}
+3 -3
View File
@@ -12,8 +12,8 @@ page wrnexusui {
<button data-wire-theme-toggle class="theme-button" aria-label="Toggle theme">Theme</button>
</header>
<main class="page package-page">
<aside class="sidebar"><a href="/packages">← All packages</a><span class="category">Frontend</span><h1>@wrnexus/ui</h1><p>Themeable server-rendered UI components and CSS.</p><code>bun add @wrnexus/ui@0.2.12</code><nav><a href="#guide">Guide</a><a href="#api">Complete API</a></nav></aside>
<article class="documentation"><section class="doc-intro"><span class="eyebrow">Frontend</span><h1>@wrnexus/ui</h1><p>Themeable server-rendered UI components and CSS.</p><pre><code>bun add @wrnexus/ui@0.2.12</code></pre></section><section id="guide" class="prose"><blockquote>First-party Wire UI component library — a set of themeable <code>.wrn</code> components plus a single tokenized stylesheet.</blockquote>
<aside class="sidebar"><a href="/packages">← All packages</a><span class="category">Frontend</span><h1>@wrnexus/ui</h1><p>Themeable server-rendered UI components and CSS.</p><code>bun add @wrnexus/ui@0.2.14</code><nav><a href="#guide">Guide</a><a href="#api">Complete API</a></nav></aside>
<article class="documentation"><section class="doc-intro"><span class="eyebrow">Frontend</span><h1>@wrnexus/ui</h1><p>Themeable server-rendered UI components and CSS.</p><pre><code>bun add @wrnexus/ui@0.2.14</code></pre></section><section id="guide" class="prose"><blockquote>First-party Wire UI component library — a set of themeable <code>.wrn</code> components plus a single tokenized stylesheet.</blockquote>
<p>Part of the <strong>WRNexusJS</strong> framework — an SSR-first, Bun-native full-stack web framework.</p>
<h3 id="overview">Overview</h3>
<p><code>@wrnexus/ui</code> ships a library of server-rendered <code>.wrn</code> components (layout, form controls, and feedback UI) together with one themeable stylesheet, <code>ui.css</code>. The components are <strong>auto-discovered</strong> 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 <code>data-component=&quot;&lt;name&gt;&quot;</code>. Every visual is driven by <code>var(--wire-*)</code> theme tokens, so components restyle instantly when the theme changes. The tiny JS surface (<code>src/index.ts</code>) exists only so the toolchain (CLI build + dev server) can locate the component directory and stylesheet.</p>
@@ -111,7 +111,7 @@ const router = buildRouter(appDir, &#123; componentDirs: [uiComponentsDir()] &#1
&lt;/div&gt;</code></pre></article></div></section></article>
<aside class="on-this-page"><h2>On this page</h2><nav><a class="toc-level-2" href="#guide">Guide</a><a class="toc-level-3" href="#overview">Overview</a><a class="toc-level-3" href="#installation">Installation</a><a class="toc-level-3" href="#components">Components</a><a class="toc-level-4" href="#layout">Layout</a><a class="toc-level-4" href="#core-feedback">Core / feedback</a><a class="toc-level-4" href="#additional-controls-data-display">Additional controls &amp; data display</a><a class="toc-level-3" href="#api">API</a><a class="toc-level-4" href="#ui-css-asset-export">./ui.css asset export</a><a class="toc-level-3" href="#usage">Usage</a><a class="toc-level-4" href="#auto-discovery">Auto-discovery</a><a class="toc-level-4" href="#mounting-components-in-a-page">Mounting components in a page</a><a class="toc-level-3" href="#overrides">Overrides</a><a class="toc-level-3" href="#requirements-notes">Requirements / Notes</a><a class="toc-level-2" href="#api">Complete API</a><a class="toc-level-2" href="#examples">Examples</a></nav></aside>
</main>
<footer>WRNexusJS 0.2.12 · SSR-first · Bun-native · Documentation generated from published package APIs.</footer>
<footer>WRNexusJS 0.2.14 · SSR-first · Bun-native · Documentation generated from published package APIs.</footer>
</div>
}
}
+3 -3
View File
@@ -12,8 +12,8 @@ page wrnexusuploader {
<button data-wire-theme-toggle class="theme-button" aria-label="Toggle theme">Theme</button>
</header>
<main class="page package-page">
<aside class="sidebar"><a href="/packages">← All packages</a><span class="category">Data</span><h1>@wrnexus/uploader</h1><p>Validated local/S3 uploads and secure file serving.</p><code>bun add @wrnexus/uploader@0.2.12</code><nav><a href="#guide">Guide</a><a href="#api">Complete API</a></nav></aside>
<article class="documentation"><section class="doc-intro"><span class="eyebrow">Data</span><h1>@wrnexus/uploader</h1><p>Validated local/S3 uploads and secure file serving.</p><pre><code>bun add @wrnexus/uploader@0.2.12</code></pre></section><section id="guide" class="prose"><p>Config-driven file uploads + serving for <a href="https://www.npmjs.com/org/wrnexus" rel="noreferrer">WRNexusJS</a>. Declare named <strong>storage stores</strong> (local disk or any S3-compatible backend) in <code>wrnexus.config.ts</code>, 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).</p>
<aside class="sidebar"><a href="/packages">← All packages</a><span class="category">Data</span><h1>@wrnexus/uploader</h1><p>Validated local/S3 uploads and secure file serving.</p><code>bun add @wrnexus/uploader@0.2.14</code><nav><a href="#guide">Guide</a><a href="#api">Complete API</a></nav></aside>
<article class="documentation"><section class="doc-intro"><span class="eyebrow">Data</span><h1>@wrnexus/uploader</h1><p>Validated local/S3 uploads and secure file serving.</p><pre><code>bun add @wrnexus/uploader@0.2.14</code></pre></section><section id="guide" class="prose"><p>Config-driven file uploads + serving for <a href="https://www.npmjs.com/org/wrnexus" rel="noreferrer">WRNexusJS</a>. Declare named <strong>storage stores</strong> (local disk or any S3-compatible backend) in <code>wrnexus.config.ts</code>, 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).</p>
<h3 id="configure">Configure</h3>
<pre data-language="ts"><code>// wrnexus.config.ts
import type &#123; AppConfig &#125; from &quot;@wrnexus/styles&quot;;
@@ -413,7 +413,7 @@ await getStore(&quot;docs&quot;).driver.delete(files[0].key);</code></pre></arti
&gt;&lt;/div&gt;</code></pre></article></div></section></article>
<aside class="on-this-page"><h2>On this page</h2><nav><a class="toc-level-2" href="#guide">Guide</a><a class="toc-level-3" href="#configure">Configure</a><a class="toc-level-3" href="#upload-server">Upload (server)</a><a class="toc-level-3" href="#widget-client">Widget (client)</a><a class="toc-level-3" href="#serve-files">Serve files</a><a class="toc-level-3" href="#api">API</a><a class="toc-level-3" href="#notes">Notes</a><a class="toc-level-2" href="#api">Complete API</a><a class="toc-level-2" href="#examples">Examples</a></nav></aside>
</main>
<footer>WRNexusJS 0.2.12 · SSR-first · Bun-native · Documentation generated from published package APIs.</footer>
<footer>WRNexusJS 0.2.14 · SSR-first · Bun-native · Documentation generated from published package APIs.</footer>
</div>
}
}
+3 -3
View File
@@ -12,8 +12,8 @@ page wrnexusvalidation {
<button data-wire-theme-toggle class="theme-button" aria-label="Toggle theme">Theme</button>
</header>
<main class="page package-page">
<aside class="sidebar"><a href="/packages">← All packages</a><span class="category">Security</span><h1>@wrnexus/validation</h1><p>Typed schemas, coercion, validation, and browser descriptors.</p><code>bun add @wrnexus/validation@0.2.12</code><nav><a href="#guide">Guide</a><a href="#api">Complete API</a></nav></aside>
<article class="documentation"><section class="doc-intro"><span class="eyebrow">Security</span><h1>@wrnexus/validation</h1><p>Typed schemas, coercion, validation, and browser descriptors.</p><pre><code>bun add @wrnexus/validation@0.2.12</code></pre></section><section id="guide" class="prose"><blockquote>One fluent schema, validated on the server (API bodies, env vars) and mirrored to an eval-free browser validator for forms.</blockquote>
<aside class="sidebar"><a href="/packages">← All packages</a><span class="category">Security</span><h1>@wrnexus/validation</h1><p>Typed schemas, coercion, validation, and browser descriptors.</p><code>bun add @wrnexus/validation@0.2.14</code><nav><a href="#guide">Guide</a><a href="#api">Complete API</a></nav></aside>
<article class="documentation"><section class="doc-intro"><span class="eyebrow">Security</span><h1>@wrnexus/validation</h1><p>Typed schemas, coercion, validation, and browser descriptors.</p><pre><code>bun add @wrnexus/validation@0.2.14</code></pre></section><section id="guide" class="prose"><blockquote>One fluent schema, validated on the server (API bodies, env vars) and mirrored to an eval-free browser validator for forms.</blockquote>
<p>Part of the <strong>WRNexusJS</strong> framework — an SSR-first, Bun-native full-stack web framework.</p>
<h3 id="overview">Overview</h3>
<p>Define a schema once with the fluent <code>v</code> builder, then reuse it in three places: <code>.parse()</code> runs server-side and returns coerced values plus per-field errors; <code>.describe()</code> emits a plain-JSON <code>SchemaDescriptor</code> that the browser runtime interprets (no <code>eval</code>, no bundled validator); and helpers like <code>parseBody</code> and <code>parseEnv</code> wire schemas straight into API routes and startup config. The server rule logic (<code>applyRule</code>/<code>checkField</code>) and the client runtime (<code>VALIDATE_RUNTIME</code>) mirror each other exactly, so a form validates identically in both places. Schemas are conventionally kept in <code>app/schemas/</code>.</p>
@@ -310,7 +310,7 @@ schema.describe(): SchemaDescriptor</code></pre></article><article class="exampl
&#125;</code></pre></article></div></section></article>
<aside class="on-this-page"><h2>On this page</h2><nav><a class="toc-level-2" href="#guide">Guide</a><a class="toc-level-3" href="#overview">Overview</a><a class="toc-level-3" href="#installation">Installation</a><a class="toc-level-3" href="#api">API</a><a class="toc-level-4" href="#the-v-builder">The v builder</a><a class="toc-level-4" href="#objectschema">ObjectSchema</a><a class="toc-level-4" href="#rules-and-coercion">Rules and coercion</a><a class="toc-level-4" href="#api-helpers">API helpers</a><a class="toc-level-4" href="#environment-config">Environment config</a><a class="toc-level-4" href="#client-runtime-from-runtime-ts">Client runtime (from runtime.ts)</a><a class="toc-level-3" href="#usage">Usage</a><a class="toc-level-3" href="#requirements-notes">Requirements / Notes</a><a class="toc-level-2" href="#api">Complete API</a><a class="toc-level-2" href="#examples">Examples</a></nav></aside>
</main>
<footer>WRNexusJS 0.2.12 · SSR-first · Bun-native · Documentation generated from published package APIs.</footer>
<footer>WRNexusJS 0.2.14 · SSR-first · Bun-native · Documentation generated from published package APIs.</footer>
</div>
}
}
+50 -50
View File
@@ -5,37 +5,37 @@
"": {
"name": "wrnexusjs",
"dependencies": {
"@wrnexus/ai": "^0.2.13",
"@wrnexus/authz": "^0.2.13",
"@wrnexus/compiler": "^0.2.13",
"@wrnexus/core": "^0.2.13",
"@wrnexus/csr": "^0.2.13",
"@wrnexus/db": "^0.2.13",
"@wrnexus/dev-server": "^0.2.13",
"@wrnexus/encryption": "^0.2.13",
"@wrnexus/i18n": "^0.2.13",
"@wrnexus/jwt": "^0.2.13",
"@wrnexus/mobile": "^0.2.13",
"@wrnexus/native": "^0.2.13",
"@wrnexus/oauth": "^0.2.13",
"@wrnexus/pubsub": "^0.2.13",
"@wrnexus/queue": "^0.2.13",
"@wrnexus/reactive": "^0.2.13",
"@wrnexus/router": "^0.2.13",
"@wrnexus/ssr": "^0.2.13",
"@wrnexus/styles": "^0.2.13",
"@wrnexus/test": "^0.2.13",
"@wrnexus/tracking": "^0.2.13",
"@wrnexus/ui": "^0.2.13",
"@wrnexus/uploader": "^0.2.13",
"@wrnexus/validation": "^0.2.13",
"@wrnexus/ai": "^0.2.14",
"@wrnexus/authz": "^0.2.14",
"@wrnexus/compiler": "^0.2.14",
"@wrnexus/core": "^0.2.14",
"@wrnexus/csr": "^0.2.14",
"@wrnexus/db": "^0.2.14",
"@wrnexus/dev-server": "^0.2.14",
"@wrnexus/encryption": "^0.2.14",
"@wrnexus/i18n": "^0.2.14",
"@wrnexus/jwt": "^0.2.14",
"@wrnexus/mobile": "^0.2.14",
"@wrnexus/native": "^0.2.14",
"@wrnexus/oauth": "^0.2.14",
"@wrnexus/pubsub": "^0.2.14",
"@wrnexus/queue": "^0.2.14",
"@wrnexus/reactive": "^0.2.14",
"@wrnexus/router": "^0.2.14",
"@wrnexus/ssr": "^0.2.14",
"@wrnexus/styles": "^0.2.14",
"@wrnexus/test": "^0.2.14",
"@wrnexus/tracking": "^0.2.14",
"@wrnexus/ui": "^0.2.14",
"@wrnexus/uploader": "^0.2.14",
"@wrnexus/validation": "^0.2.14",
},
"devDependencies": {
"@eslint/js": "^9.0.0",
"@tailwindcss/cli": "^4.0.0",
"@types/bun": "latest",
"@types/node": "^26.1.1",
"@wrnexus/cli": "^0.2.13",
"@wrnexus/cli": "^0.2.14",
"eslint": "^9.0.0",
"prettier": "latest",
"tailwindcss": "^4.0.0",
@@ -169,55 +169,55 @@
"@typescript-eslint/visitor-keys": ["@typescript-eslint/visitor-keys@8.63.0", "", { "dependencies": { "@typescript-eslint/types": "8.63.0", "eslint-visitor-keys": "^5.0.0" } }, "sha512-UexrHGnGTpbuQHct2ExOc2ZcFbGUS9FOesCxxqdBGcpI1BxYu/LZ6U8Aq6/72XtF/qRBk9nhuGHFJIXXMhPMdw=="],
"@wrnexus/ai": ["@wrnexus/ai@0.2.13", "", {}, "sha512-Y67iBWCkvpsvqIdbNVRTKXKgUCBf4s4U+faYY0vVYiXLBxu0oZreaFBqQ1K1wLBpnP7Bn1So20XpIgpNUzFvTw=="],
"@wrnexus/ai": ["@wrnexus/ai@0.2.14", "", {}, "sha512-ArYxJeVT1pZcqr0PVdlIc2Uw5ANnH0NxFmZ+vG890asHrEzTEhtO8ydtKTXF03Kd5afTfd3yiLkNl6S12CwTTQ=="],
"@wrnexus/authz": ["@wrnexus/authz@0.2.13", "", {}, "sha512-B0londyf3PNAK8kwaWvUsfPUXbN8T4JS/7ZRsxpBAWfyzrkNO0iwAr+2qUK5vl0lLzePUqIYkfP1cJtSv1eq/w=="],
"@wrnexus/authz": ["@wrnexus/authz@0.2.14", "", {}, "sha512-XFOmdaquDVZNg1IHfl3UP0511YykeRwHmklZQkr+9II7qwsWnpALkMrs8YMHfPInynBJzAwJ+DOsLBC5EfncyQ=="],
"@wrnexus/cli": ["@wrnexus/cli@0.2.13", "", { "dependencies": { "@wrnexus/compiler": "^0.2.13", "@wrnexus/core": "^0.2.13", "@wrnexus/csr": "^0.2.13", "@wrnexus/db": "^0.2.13", "@wrnexus/dev-server": "^0.2.13", "@wrnexus/i18n": "^0.2.13", "@wrnexus/router": "^0.2.13", "@wrnexus/styles": "^0.2.13", "@wrnexus/ui": "^0.2.13", "@wrnexus/validation": "^0.2.13" }, "bin": { "wrnexus": "dist/index.js" } }, "sha512-NZq6FCPVC0/F1HN7PtlCzbigjEOpFw6MLufU8bQW1ND1PN4VCxr0bPNW2Fg1htuGfaWOL9AajtwtupLqu7k7og=="],
"@wrnexus/cli": ["@wrnexus/cli@0.2.14", "", { "dependencies": { "@wrnexus/compiler": "^0.2.14", "@wrnexus/core": "^0.2.14", "@wrnexus/csr": "^0.2.14", "@wrnexus/db": "^0.2.14", "@wrnexus/dev-server": "^0.2.14", "@wrnexus/i18n": "^0.2.14", "@wrnexus/router": "^0.2.14", "@wrnexus/styles": "^0.2.14", "@wrnexus/ui": "^0.2.14", "@wrnexus/validation": "^0.2.14" }, "bin": { "wrnexus": "dist/index.js" } }, "sha512-8oWT9m9w83/vImhMQh//KKXP4FWev56uBI/Q6jwpbt7s0APig0mIoLtp4Tx3nK1JF0mDjc3J/tOzTrTr2FGslA=="],
"@wrnexus/compiler": ["@wrnexus/compiler@0.2.13", "", {}, "sha512-Ic0vRAalJRlmZKRnVEBwYgenrof5dkyR+4bduQ+RlULkWURAxlxZT2uvABnF5/wbcjIpX2ApiU/d0W0oQnjrkw=="],
"@wrnexus/compiler": ["@wrnexus/compiler@0.2.14", "", {}, "sha512-5OkeQYqCgtQbsgb99Jgq230yWjL9WU+jpOPmHXO83EFVrN5tb4EFzlag7s8dL0kFeDxBseVY40YFMWl3fVjhjQ=="],
"@wrnexus/core": ["@wrnexus/core@0.2.13", "", {}, "sha512-LNooiQBlQNGO7TmLwVL3D8LqfhjG3Flo49RpFJwMfgpv421hwilZwPs05Ug22y31c/XJWCT2LldNTrO6Wsug6A=="],
"@wrnexus/core": ["@wrnexus/core@0.2.14", "", {}, "sha512-j6b/upI8iLnHSp62rFBQETXAkVb1XHM4TE5B8yTcfVg2AaIx4kYlc1CAEUvvkAuc/4s3aVywWuPQf2h9I2SjRw=="],
"@wrnexus/csr": ["@wrnexus/csr@0.2.13", "", { "dependencies": { "@wrnexus/core": "^0.2.13" } }, "sha512-wN38+F+NOoIhAiZFyQChfL4ctraBd8M0w4izmKnW/Wk3SEut/oa4nS6MlWtwDzdTAefzOxHL5Rb4eLl5w2/jxg=="],
"@wrnexus/csr": ["@wrnexus/csr@0.2.14", "", { "dependencies": { "@wrnexus/core": "^0.2.14" } }, "sha512-AfFEBLqH/W4aWK9nsdipmAWdGmD71pmj+7RVd88CFqM8KYq1MFxxwkcgoFCBlhP+b8HJlxGCCdfVfQnSI2piNA=="],
"@wrnexus/db": ["@wrnexus/db@0.2.13", "", {}, "sha512-23y6pvAW6ruvMNXu9Jcdc1bFuTWlWOqxvUCF9VLQ6WvNZmWkU/G1/ITNu+X6tgTnByIJPC60nBtVDE5D4xbqeg=="],
"@wrnexus/db": ["@wrnexus/db@0.2.14", "", {}, "sha512-Rqd4S8NOcjmC0fv+GYkwKiLYdAtXRQSMxVZ+PKERsrpT/KcTA2lkLN/NPMshKUt+HiFaRMy1jJqJSAWFTM8grw=="],
"@wrnexus/dev-server": ["@wrnexus/dev-server@0.2.13", "", { "dependencies": { "@wrnexus/compiler": "^0.2.13", "@wrnexus/core": "^0.2.13", "@wrnexus/csr": "^0.2.13", "@wrnexus/db": "^0.2.13", "@wrnexus/i18n": "^0.2.13", "@wrnexus/pubsub": "^0.2.13", "@wrnexus/router": "^0.2.13", "@wrnexus/ssr": "^0.2.13", "@wrnexus/styles": "^0.2.13", "@wrnexus/ui": "^0.2.13", "@wrnexus/uploader": "^0.2.13", "@wrnexus/validation": "^0.2.13" } }, "sha512-hmbl5KJbJR+gsFZR3KxOkvF7W1LlHxGctuc6SvR7HDWe2oPsUgBHp0NDkxQ7njogue4GPcfZDw1WbNbZtRGOUw=="],
"@wrnexus/dev-server": ["@wrnexus/dev-server@0.2.14", "", { "dependencies": { "@wrnexus/compiler": "^0.2.14", "@wrnexus/core": "^0.2.14", "@wrnexus/csr": "^0.2.14", "@wrnexus/db": "^0.2.14", "@wrnexus/i18n": "^0.2.14", "@wrnexus/pubsub": "^0.2.14", "@wrnexus/router": "^0.2.14", "@wrnexus/ssr": "^0.2.14", "@wrnexus/styles": "^0.2.14", "@wrnexus/ui": "^0.2.14", "@wrnexus/uploader": "^0.2.14", "@wrnexus/validation": "^0.2.14" } }, "sha512-HKylu48sbrPF3gxmNdkPUSwe9LzyfOLqvZjGPPnDnF9aoXUnMih+XidGaJLIKyTKN6VGyPw7CowAU941nZlLbA=="],
"@wrnexus/encryption": ["@wrnexus/encryption@0.2.13", "", {}, "sha512-4MByItCHZFv/BkRyC/MKIOAyDWcjFSE5sVvsqp3tteOQsAmqPOwatZ8gfca9SEyDuk8L80sEu5YQVBZieBPHKw=="],
"@wrnexus/encryption": ["@wrnexus/encryption@0.2.14", "", {}, "sha512-aio0O6xZGCypiKSW30UK1uPXSRg9CKBwEoGNdvof8qjl23it7T6iOBskPRXMZoVVtJS4MaYgROFngpkhIFmX+g=="],
"@wrnexus/i18n": ["@wrnexus/i18n@0.2.13", "", { "dependencies": { "@wrnexus/core": "^0.2.13" } }, "sha512-zBMQ4s5RymCsrrToiYKhiZNTYAf6yinkNcGzbD+v4uMpKngVHCbQ8xL/uqlJNDMtdTTvDATBz+dNe1yP7/Kn4A=="],
"@wrnexus/i18n": ["@wrnexus/i18n@0.2.14", "", { "dependencies": { "@wrnexus/core": "^0.2.14" } }, "sha512-Rzy3NQRxcKKzPmo+3puLQcJJ/R+80kp32uVGJ3O3cqo3hGdF8L1ox9cc4lYT/II84+d3yQ5QCyfKOGHFEabcXA=="],
"@wrnexus/jwt": ["@wrnexus/jwt@0.2.13", "", {}, "sha512-fIzqZkmv1KZVmo3eziLTXCxrmVwC5BuU2LXQu2z5hWnEnEBLKQRROQPYSrooCKcgtqAIZYvxMQ87UHhcWlF8BA=="],
"@wrnexus/jwt": ["@wrnexus/jwt@0.2.14", "", {}, "sha512-zE/7LnncvOxjPnBIPO+eJnWiPZAqwyYU68upJua/PQtyH1fdo3I3625ZQwdWDCwhJtyg+UJyEkZFToUaVS5YeQ=="],
"@wrnexus/mobile": ["@wrnexus/mobile@0.2.13", "", { "dependencies": { "@wrnexus/native": "^0.2.13" } }, "sha512-pCTKYUN3TdmGV7wVQAIq5rNbfxXVwBZuv3FW+/2t6UpAT0+1vW+hsHGRoM9xJAVyEN1ieBAZpqWrTWLcs4vkTg=="],
"@wrnexus/mobile": ["@wrnexus/mobile@0.2.14", "", { "dependencies": { "@wrnexus/native": "^0.2.14" } }, "sha512-qEkPzOzBLMG1v/LTZubmkriye8428mWPSfaPCq0XFP6uV8XXvs1ag4vmU3V8KvXSDkHraQ8ppeOGm+nTFAYVhg=="],
"@wrnexus/native": ["@wrnexus/native@0.2.13", "", {}, "sha512-wIKtgZ9TYS854iy94Ljh6Kkt+HR5wphSuVASEcE9AJ2MNqlc7Bku0hKYARUIpn6HNkp27P1w+g6PJoHmXmVmEQ=="],
"@wrnexus/native": ["@wrnexus/native@0.2.14", "", {}, "sha512-8Tc2GHprmIXnTHIj7EqcKFhzb7GcNbFosYSByrzYsHbD9kn9qhtscOri1kCfm+HA2/+t1auBFbLiEUicAL61aw=="],
"@wrnexus/oauth": ["@wrnexus/oauth@0.2.13", "", {}, "sha512-dlXGgmoCfDeqDXhS2ctLGbDxsr4tUgU6YPor1cQD0lAOFy840vEwS3AmdrebMrYyIkhIFxapxV+xHXbBd6eonA=="],
"@wrnexus/oauth": ["@wrnexus/oauth@0.2.14", "", {}, "sha512-ZrR+Jwj1uoieklF0CFfqMRUvYp8MN0arlh0r3FdWDRoafJUnhDWj/3NfzmA4OU56xFYPFbiWAWWldMgLEsc6Gw=="],
"@wrnexus/pubsub": ["@wrnexus/pubsub@0.2.13", "", {}, "sha512-/BUhOZXusEA6GJFNkS3z85CDq1itzZjtX3xJAWEc3ElpV1D09EsKuGZD1RslmWerF0CqumgkJ3MuQk5MjKuG2g=="],
"@wrnexus/pubsub": ["@wrnexus/pubsub@0.2.14", "", {}, "sha512-o6Tmw2O7jBIrFzCRmmN6j9triJFqE2Q7gmBYAIQ6JitqMYcz7FjDRzgjeNHU+seJir1OO0du8AzB+MX0uCgCbw=="],
"@wrnexus/queue": ["@wrnexus/queue@0.2.13", "", {}, "sha512-ZUFM4VqVLpfGwQ8bnlIzxIJmVACjX/jc2TD/kJsdpBH0B9ff33HHhcDAej6MxsGdhNH6EkwZMWYv0l+te7aXOQ=="],
"@wrnexus/queue": ["@wrnexus/queue@0.2.14", "", {}, "sha512-q9XbUANIpMEZDTiLy1/j2bWkillFRwkQ4ZzMFit3JqSoCSqXH9EuF8Ol+LNwQhVQmJs4isCKzp+oLQMnvDtQ3Q=="],
"@wrnexus/reactive": ["@wrnexus/reactive@0.2.13", "", {}, "sha512-qzaRvFWtlp6JdXU3QD+n2zcDiJeMo2ip8VVwzqrsfcjRSY8GgbqAR3DidoYGfDRxfLavSrbpQOo+WYBBSIAV1A=="],
"@wrnexus/reactive": ["@wrnexus/reactive@0.2.14", "", {}, "sha512-v+GYTrUEmokrBNQjUllKUPbpRtRuPsRLXI8FRu2ecQ0i+achpdo1/oR3X51mqkkDsZMh84iNTbDWmAELk7bdyg=="],
"@wrnexus/router": ["@wrnexus/router@0.2.13", "", { "dependencies": { "@wrnexus/compiler": "^0.2.13", "@wrnexus/core": "^0.2.13" } }, "sha512-uAqbBGWz2gqhuqvri/Nuc807JJ4T4gb3plSMV6AGaC1fuEY1XCRjSgg4i8Noz/3ufHKinDiU+GyZ9Ka+KknIXg=="],
"@wrnexus/router": ["@wrnexus/router@0.2.14", "", { "dependencies": { "@wrnexus/compiler": "^0.2.14", "@wrnexus/core": "^0.2.14" } }, "sha512-MKRNQArv8lKuTPKo/9+LIVigjDfM3se9zjhhRB8725CyhKxED/DY7ORA37i0htz+VbUozKt9ZZGbx4HM7Bx2SA=="],
"@wrnexus/ssr": ["@wrnexus/ssr@0.2.13", "", { "dependencies": { "@wrnexus/core": "^0.2.13" } }, "sha512-hcZewoV4Or55lyStENAh9MD6ENj3wXpn5lbjqxvmVINUhdrk1bNuqfLKumFYU7SlkZvmA+t0UqNV1QQlkZq3Dw=="],
"@wrnexus/ssr": ["@wrnexus/ssr@0.2.14", "", { "dependencies": { "@wrnexus/core": "^0.2.14" } }, "sha512-G8BGpCqNLSjtdgQh5JeFPNSqtXPYnCMZAd/zLH/jCIR8uiimJ2UEnM8fQbfNLsivtoeK4QLzUnEOm/+1sjBkaw=="],
"@wrnexus/styles": ["@wrnexus/styles@0.2.13", "", { "dependencies": { "@wrnexus/uploader": "^0.2.13" } }, "sha512-PNLtYaJuEGILdP5kXMOPueXOmcN2u8uHyUc1W4/Yd+ivFk4NXDi2fDAgwbD95CAEZn5D+0V5OpsNJD3r4Vygmw=="],
"@wrnexus/styles": ["@wrnexus/styles@0.2.14", "", { "dependencies": { "@wrnexus/uploader": "^0.2.14" } }, "sha512-bhRlSAaRxhRQIHHWYgQEVqNI9z3INzlobCvUfYI2dsmLdnzeJiXM+8GZ09auJYhmaht3/F+wNrfUcoswN+ldfA=="],
"@wrnexus/test": ["@wrnexus/test@0.2.13", "", {}, "sha512-HXUfV7mxT7bL6USYxhFjV4kDsvVQmk68syMbkJA78S9MT0t/VauTjvT9jle8L8tmHA1pflGujkQVZTMjitxegA=="],
"@wrnexus/test": ["@wrnexus/test@0.2.14", "", {}, "sha512-iiLz8ps6djkKZcSqI2VjFtZv8i2dV3T/LmLh8AVUTtDxvae3PVlDVQ5n0qdqQEMWSVKOK+azhKWTpEwjIimNIg=="],
"@wrnexus/tracking": ["@wrnexus/tracking@0.2.13", "", {}, "sha512-ikRD4RNqwevEQIaON5aTRp+cemjKQFxfjin1RfUwCmIwoyPsGZqAqaQA5mpQhCkMjAXzCB+ytbFTHVATCpmJlw=="],
"@wrnexus/tracking": ["@wrnexus/tracking@0.2.14", "", {}, "sha512-+rPCXS3ZKa+zEYwihfoWGNOkq1/4SbRRN8pxNyQ59o8JrH4/DSETbatUfNLyIRiEbnw/6LHdHyHibr4TqTqtUA=="],
"@wrnexus/ui": ["@wrnexus/ui@0.2.13", "", { "dependencies": { "@wrnexus/core": "^0.2.13" } }, "sha512-Wop0x4ORymsVLh7CwqD5BOFLdr5p6CaGisZoPH6M/4lEeonp1tsQlltn3OS1x0VevlfVEyE11isRT3sL92sGOw=="],
"@wrnexus/ui": ["@wrnexus/ui@0.2.14", "", { "dependencies": { "@wrnexus/core": "^0.2.14" } }, "sha512-iAlhsPo08Isf+yDLmO+fHasSt7zxF7RTByKyf2AHq015ZMnF7fVtUrYlUqt0Tz5QQt4peFoVhmqKsmGkwMLVmA=="],
"@wrnexus/uploader": ["@wrnexus/uploader@0.2.13", "", { "dependencies": { "@wrnexus/core": "^0.2.13" } }, "sha512-tV1wWku2a49TrsNsU992NbXNTgJFWTnTnF6J9MyCY0OOEiFXI8FZPDpbowQBRvnJecUwwYrmIqs3BgYphaIG6A=="],
"@wrnexus/uploader": ["@wrnexus/uploader@0.2.14", "", { "dependencies": { "@wrnexus/core": "^0.2.14" } }, "sha512-RfUfUUsIflPHTX4TmGLkpoIK0YIixcLNJPuFrJQ6Nzu0xF7q1u6sBtsoxymAl6FoWfq3mP6kZ2Uq5nnVn9ON1Q=="],
"@wrnexus/validation": ["@wrnexus/validation@0.2.13", "", {}, "sha512-Jz/otKOQ80yXr4qbIRotKrjPVKv6DTNxBaoAdgQKqtCI5ynnNmKhR/Hd3dyZwuNHXdLzhcJp5xeNuDWBQ31xfg=="],
"@wrnexus/validation": ["@wrnexus/validation@0.2.14", "", {}, "sha512-X9wb8HG8eCWQL+NbOI4XVXkTGPqYA/t60RBeETrGyeBi6obeTeKoGwCvyCivuTk8tMyQtFwt/lbP9L3l2NJ2YA=="],
"acorn": ["acorn@8.17.0", "", { "bin": { "acorn": "bin/acorn" } }, "sha512-xRQbDb9BnwDafYNn6Vwl839DYVjqXYb1XVGtWAZ1kcDc6iwAL4hg3B1dZlRiuENFeO2H53gFG3in621AdERVAg=="],
+2
View File
@@ -243,7 +243,9 @@ export const POST = async (ctx) => {
```
wrnexus dev . # dev server + HMR
wrnexus build . # production build → dist/server.js
bun dist/server.js # run the production server (or npm start)
wrnexus create <name> # scaffold a new app
wrnexus update --latest # deps + syntax/config migrations + verification
wrnexus generate page <Name> # scaffold a page (aliases: g p)
wrnexus generate component <name> | api <path> | schema <name>
wrnexus db migrate | rollback | status | new [--from-models] | generate | seed
+29 -27
View File
@@ -12,40 +12,42 @@
"format": "prettier . --write",
"format:check": "prettier . --check",
"check": "bun run lint && bun run test && bun run format:check",
"docs:generate": "bun run scripts/generate-docs.ts"
"docs:generate": "bun run scripts/generate-docs.ts",
"start": "bun dist/server.js",
"production": "bun run build && bun run start"
},
"dependencies": {
"@wrnexus/ai": "^0.2.13",
"@wrnexus/authz": "^0.2.13",
"@wrnexus/compiler": "^0.2.13",
"@wrnexus/core": "^0.2.13",
"@wrnexus/csr": "^0.2.13",
"@wrnexus/db": "^0.2.13",
"@wrnexus/dev-server": "^0.2.13",
"@wrnexus/encryption": "^0.2.13",
"@wrnexus/i18n": "^0.2.13",
"@wrnexus/jwt": "^0.2.13",
"@wrnexus/mobile": "^0.2.13",
"@wrnexus/native": "^0.2.13",
"@wrnexus/oauth": "^0.2.13",
"@wrnexus/pubsub": "^0.2.13",
"@wrnexus/queue": "^0.2.13",
"@wrnexus/reactive": "^0.2.13",
"@wrnexus/router": "^0.2.13",
"@wrnexus/ssr": "^0.2.13",
"@wrnexus/styles": "^0.2.13",
"@wrnexus/test": "^0.2.13",
"@wrnexus/tracking": "^0.2.13",
"@wrnexus/ui": "^0.2.13",
"@wrnexus/uploader": "^0.2.13",
"@wrnexus/validation": "^0.2.13"
"@wrnexus/ai": "^0.2.14",
"@wrnexus/authz": "^0.2.14",
"@wrnexus/compiler": "^0.2.14",
"@wrnexus/core": "^0.2.14",
"@wrnexus/csr": "^0.2.14",
"@wrnexus/db": "^0.2.14",
"@wrnexus/dev-server": "^0.2.14",
"@wrnexus/encryption": "^0.2.14",
"@wrnexus/i18n": "^0.2.14",
"@wrnexus/jwt": "^0.2.14",
"@wrnexus/mobile": "^0.2.14",
"@wrnexus/native": "^0.2.14",
"@wrnexus/oauth": "^0.2.14",
"@wrnexus/pubsub": "^0.2.14",
"@wrnexus/queue": "^0.2.14",
"@wrnexus/reactive": "^0.2.14",
"@wrnexus/router": "^0.2.14",
"@wrnexus/ssr": "^0.2.14",
"@wrnexus/styles": "^0.2.14",
"@wrnexus/test": "^0.2.14",
"@wrnexus/tracking": "^0.2.14",
"@wrnexus/ui": "^0.2.14",
"@wrnexus/uploader": "^0.2.14",
"@wrnexus/validation": "^0.2.14"
},
"devDependencies": {
"@eslint/js": "^9.0.0",
"@tailwindcss/cli": "^4.0.0",
"@types/bun": "latest",
"@types/node": "^26.1.1",
"@wrnexus/cli": "^0.2.13",
"@wrnexus/cli": "^0.2.14",
"eslint": "^9.0.0",
"prettier": "latest",
"tailwindcss": "^4.0.0",
@@ -53,6 +55,6 @@
"typescript-eslint": "latest"
},
"wrnexus": {
"version": "0.2.13"
"version": "0.2.14"
}
}
+10 -5
View File
@@ -2,6 +2,11 @@ import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
import { join, resolve } from "node:path";
const root = resolve(import.meta.dir, "..");
const projectPackage = JSON.parse(readFileSync(join(root, "package.json"), "utf8")) as {
wrnexus?: { version?: string };
};
const frameworkVersion = projectPackage.wrnexus?.version;
if (!frameworkVersion) throw new Error("package.json is missing wrnexus.version");
const pages = join(root, "app", "pages");
const packagePages = join(pages, "packages");
mkdirSync(packagePages, { recursive: true });
@@ -201,7 +206,7 @@ ${state}
<button data-wire-theme-toggle class="theme-button" aria-label="Toggle theme">Theme</button>
</header>
${content}
<footer>WrNexus 0.2.12 · SSR-first · Bun-native · Documentation generated from published package APIs.</footer>
<footer>WrNexus ${frameworkVersion} · SSR-first · Bun-native · Documentation generated from published package APIs.</footer>
</div>
}
}
@@ -237,7 +242,7 @@ writeFileSync(
shell(
"Packages",
"Explore every WrNexus package, API, function, and copy-ready usage example.",
`<main class="page"><section class="hero compact"><span class="eyebrow">25 focused packages</span><h1>Package reference</h1><p>Everything in the framework, organized by responsibility and documented from the published 0.2.12 APIs.</p><input class="search" type="search" placeholder="Search packages, features, or categories…" @input="query = event.target.value" /></section><section class="category-filter" aria-label="Filter packages by category"><div class="category-row">${categoryButtons}</div><p>Showing <strong>{category}</strong> packages</p></section><section class="package-grid">${cards}</section></main>`,
`<main class="page"><section class="hero compact"><span class="eyebrow">25 focused packages</span><h1>Package reference</h1><p>Everything in the framework, organized by responsibility and documented from the published ${frameworkVersion} APIs.</p><input class="search" type="search" placeholder="Search packages, features, or categories…" @input="query = event.target.value" /></section><section class="category-filter" aria-label="Filter packages by category"><div class="category-row">${categoryButtons}</div><p>Showing <strong>{category}</strong> packages</p></section><section class="package-grid">${cards}</section></main>`,
' state query = ""\n state category = "All"\n',
),
);
@@ -263,8 +268,8 @@ for (const [name, category, summary] of catalog) {
)
.join("");
const content = `<main class="page package-page">
<aside class="sidebar"><a href="/packages">← All packages</a><span class="category">${category}</span><h1>@wrnexus/${name}</h1><p>${summary}</p><code>bun add @wrnexus/${name}@0.2.12</code><nav><a href="#guide">Guide</a><a href="#api">Complete API</a></nav></aside>
<article class="documentation"><section class="doc-intro"><span class="eyebrow">${category}</span><h1>@wrnexus/${name}</h1><p>${summary}</p><pre><code>bun add @wrnexus/${name}@0.2.12</code></pre></section><section id="guide" class="prose">${guide.html}</section><section id="api" class="prose api"><h2>Complete TypeScript API</h2><p>This declaration is generated from the exact published package and lists its exported functions, classes, interfaces, and types.</p><pre data-language="typescript"><code>${escape(types)}</code></pre></section><section id="examples" class="prose examples"><h2>Examples</h2><p>Copy-ready examples taken from this package's published documentation.</p><div class="example-grid">${examplesFrom(readme, name)}</div></section></article>
<aside class="sidebar"><a href="/packages">← All packages</a><span class="category">${category}</span><h1>@wrnexus/${name}</h1><p>${summary}</p><code>bun add @wrnexus/${name}@${frameworkVersion}</code><nav><a href="#guide">Guide</a><a href="#api">Complete API</a></nav></aside>
<article class="documentation"><section class="doc-intro"><span class="eyebrow">${category}</span><h1>@wrnexus/${name}</h1><p>${summary}</p><pre><code>bun add @wrnexus/${name}@${frameworkVersion}</code></pre></section><section id="guide" class="prose">${guide.html}</section><section id="api" class="prose api"><h2>Complete TypeScript API</h2><p>This declaration is generated from the exact published package and lists its exported functions, classes, interfaces, and types.</p><pre data-language="typescript"><code>${escape(types)}</code></pre></section><section id="examples" class="prose examples"><h2>Examples</h2><p>Copy-ready examples taken from this package's published documentation.</p><div class="example-grid">${examplesFrom(readme, name)}</div></section></article>
<aside class="on-this-page"><h2>On this page</h2><nav>${toc}</nav></aside>
</main>`;
writeFileSync(join(packagePages, `${name}.wrn`), shell(`@wrnexus/${name}`, summary, content));
@@ -275,7 +280,7 @@ writeFileSync(
shell(
"Home",
"WrNexus documentation: build secure, server-rendered, reactive applications with Bun.",
`<main class="page"><section class="hero"><span class="eyebrow">WrNexus 0.2.12</span><h1>Build from the server.<br><em>Ship only what matters.</em></h1><p>An SSR-first, Bun-native framework with reactive .wrn components, typed data, realtime rooms, mobile capabilities, and production security built in.</p><div class="actions"><a class="primary" href="/getting-started">Start building</a><a href="/packages">Explore 25 packages</a></div><div class="code-window"><span>app/pages/counter.wrn</span><pre><code>page Counter {
`<main class="page"><section class="hero"><span class="eyebrow">WrNexus ${frameworkVersion}</span><h1>Build from the server.<br><em>Ship only what matters.</em></h1><p>An SSR-first, Bun-native framework with reactive .wrn components, typed data, realtime rooms, mobile capabilities, and production security built in.</p><div class="actions"><a class="primary" href="/getting-started">Start building</a><a href="/packages">Explore 25 packages</a></div><div class="code-window"><span>app/pages/counter.wrn</span><pre><code>page Counter {
state count = 0
view {
&lt;button @click=&quot;count++&quot;&gt;