From 379553bdf79112a407778165fb8db2e36c045bbe Mon Sep 17 00:00:00 2001 From: Ajay Ghanwat Date: Mon, 13 Jul 2026 20:58:28 +0530 Subject: [PATCH] docs: publish package usage examples for 0.2.24 --- app/docs.test.ts | 9 + app/pages/404.wrn | 4 +- app/pages/access.wrn | 6 +- app/pages/architecture.wrn | 6 +- app/pages/benchmarks.wrn | 4 +- app/pages/changelog.wrn | 6 +- app/pages/examples.wrn | 6 +- app/pages/getting-started.wrn | 6 +- app/pages/guides/api-routes.wrn | 6 +- app/pages/guides/authentication.wrn | 6 +- app/pages/guides/authorization.wrn | 6 +- .../guides/configuration-and-profiles.wrn | 6 +- app/pages/guides/database.wrn | 6 +- app/pages/guides/deployment.wrn | 6 +- app/pages/guides/forms-and-validation.wrn | 6 +- app/pages/guides/i18n-and-themes.wrn | 6 +- app/pages/guides/middleware.wrn | 6 +- app/pages/guides/mobile.wrn | 6 +- app/pages/guides/observability.wrn | 6 +- app/pages/guides/pages-and-components.wrn | 6 +- app/pages/guides/project-structure.wrn | 6 +- app/pages/guides/pubsub.wrn | 6 +- app/pages/guides/queues.wrn | 6 +- app/pages/guides/realtime.wrn | 6 +- app/pages/guides/routing.wrn | 6 +- app/pages/guides/security.wrn | 6 +- app/pages/guides/server-data.wrn | 6 +- app/pages/guides/testing.wrn | 6 +- app/pages/guides/troubleshooting.wrn | 6 +- app/pages/guides/upgrading.wrn | 6 +- app/pages/guides/uploads.wrn | 6 +- app/pages/guides/workspaces-and-gateway.wrn | 8 +- app/pages/index.wrn | 10 +- app/pages/language.wrn | 6 +- app/pages/license.wrn | 4 +- app/pages/packages.wrn | 6 +- app/pages/packages/ai.wrn | 56 +++- app/pages/packages/authz.wrn | 14 +- app/pages/packages/cli.wrn | 49 ++- app/pages/packages/compiler.wrn | 39 +-- app/pages/packages/core.wrn | 53 +++- app/pages/packages/csr.wrn | 40 +-- app/pages/packages/db.wrn | 51 +++- app/pages/packages/dev-server.wrn | 119 +++----- app/pages/packages/encryption.wrn | 14 +- app/pages/packages/helpers.wrn | 46 ++- app/pages/packages/i18n.wrn | 38 ++- app/pages/packages/jwt.wrn | 37 ++- app/pages/packages/mobile.wrn | 94 ++++-- app/pages/packages/native.wrn | 93 +++++- app/pages/packages/oauth.wrn | 77 +++-- app/pages/packages/pubsub.wrn | 39 ++- app/pages/packages/queue.wrn | 44 ++- app/pages/packages/reactive.wrn | 20 +- app/pages/packages/router.wrn | 69 ++--- app/pages/packages/ssr.wrn | 49 +-- app/pages/packages/styles.wrn | 75 +++-- app/pages/packages/test.wrn | 41 ++- app/pages/packages/tracking.wrn | 42 ++- app/pages/packages/ui.wrn | 15 +- app/pages/packages/uploader.wrn | 37 ++- app/pages/packages/validation.wrn | 47 ++- app/pages/releases/0.2.24.wrn | 16 + app/pages/roadmap.wrn | 4 +- app/pages/search.wrn | 4 +- app/pages/security.wrn | 6 +- app/pages/showcase.wrn | 6 +- app/pages/support.wrn | 4 +- app/pages/tutorial.wrn | 6 +- bun.lock | 104 +++---- docs/release-access-status.md | 4 +- docs/site-audit.md | 4 +- package-lock.json | 272 ++++++++--------- package.json | 54 ++-- public/docs-index.json | 142 ++++----- public/llms-full.txt | 4 +- public/llms.txt | 280 ++++++++++++++++-- public/sitemap.xml | 2 +- scripts/generate-docs.ts | 7 +- 79 files changed, 1542 insertions(+), 894 deletions(-) create mode 100644 app/pages/releases/0.2.24.wrn diff --git a/app/docs.test.ts b/app/docs.test.ts index a32dcf48..82d3a306 100644 --- a/app/docs.test.ts +++ b/app/docs.test.ts @@ -60,6 +60,15 @@ test("every package page contains installation, guide, and complete API sections } }); +test("every package page shows multiple named usage examples", () => { + for (const name of expected) { + const source = readFileSync(join(packagePages, `${name}.wrn`), "utf8"); + expect(source.match(/class="example-card"/g)?.length ?? 0).toBeGreaterThanOrEqual(2); + expect(source).not.toContain("

Example 1

"); + expect(source).not.toContain(`import * as packageApi from "@wrnexus/${name}"`); + } +}); + test("site includes core guides and production configuration", () => { for (const route of [ "index.wrn", diff --git a/app/pages/404.wrn b/app/pages/404.wrn index 90172cac..e444ba33 100644 --- a/app/pages/404.wrn +++ b/app/pages/404.wrn @@ -7,10 +7,10 @@ page Pagenotfound { view {
-
W WRNexusJS
+
W WRNexusJS
- +
} } \ No newline at end of file diff --git a/app/pages/access.wrn b/app/pages/access.wrn index 1f946b0d..5e451c93 100644 --- a/app/pages/access.wrn +++ b/app/pages/access.wrn @@ -7,10 +7,10 @@ page Access { view {
-
W WRNexusJS
+
W WRNexusJS
-
Private Developer Preview

Request preview access

WRNexusJS 0.2.23 packages are not available from the public npm registry. Installation requires approval and private registry credentials supplied by WorkRoot. Never paste registry tokens into source control, issue reports, or support messages.

Request process

  1. Contact WorkRoot through the public contact path at workroot.in.
  2. Describe the application, team, expected deployment, and Bun environment.
  3. After approval, follow the registry instructions supplied privately.
  4. Use the canonical scaffold command below only after authentication.
bunx @wrnexus/cli@0.2.23 create my-app

Access approval, response time, licensing terms, and support level remain owner-controlled. This site does not collect access requests directly.

- +
Private Developer Preview

Request preview access

WRNexusJS 0.2.24 packages are not available from the public npm registry. Installation requires approval and private registry credentials supplied by WorkRoot. Never paste registry tokens into source control, issue reports, or support messages.

Request process

  1. Contact WorkRoot through the public contact path at workroot.in.
  2. Describe the application, team, expected deployment, and Bun environment.
  3. After approval, follow the registry instructions supplied privately.
  4. Use the canonical scaffold command below only after authentication.
bunx @wrnexus/cli@0.2.24 create my-app

Access approval, response time, licensing terms, and support level remain owner-controlled. This site does not collect access requests directly.

+
} } \ No newline at end of file diff --git a/app/pages/architecture.wrn b/app/pages/architecture.wrn index acca2de5..17c43678 100644 --- a/app/pages/architecture.wrn +++ b/app/pages/architecture.wrn @@ -7,10 +7,10 @@ page Architecture { view {
-
W WRNexusJS
+
W WRNexusJS
-
Framework architecture · 0.2.23

Architecture

WRNexusJS is Bun-native and SSR-first. File discovery maps pages and API handlers; middleware enriches or short-circuits a request; the compiler turns .wrn declarations into server render functions and small feature runtimes.

Request and build lifecycle

  1. DiscoverPages, APIs, middleware, components, layouts, schemas, rooms
  2. CompileParse .wrn, validate grammar, generate server code
  3. RequestLimits, security, locale, session, middleware
  4. MatchStatic and dynamic file route
  5. RenderSSR data, escaped interpolation, components, metadata
  6. EnhanceOnly required reactive/directive runtimes

Package boundaries

core owns contexts, middleware, sessions and rooms; router discovers routes; compiler parses .wrn; ssr renders documents; csr supplies browser runtimes; dev-server and cli orchestrate development and builds.

Security and data flow

Validation happens at trust boundaries. Session authentication establishes identity; authorization makes resource decisions. CSP, Trusted Types, CSRF, upload checks, WebSocket origins, request limits, and output escaping are layered controls—not substitutes for application policy.

Realtime and scale

Rooms are process-local unless connected through pub/sub. Redis-backed pub/sub distributes events. Queue durability depends on the selected driver and must be evaluated explicitly.

Workspaces and gateways

The gateway can dispatch multiple applications while preserving route, component, asset, config, and session boundaries. Validate host routing and isolation before production.

Build and deployment

wrnexus build . produces dist/server.js and hashed/static assets. Run the server with Bun, apply migrations before traffic, terminate TLS at a trusted edge, and forward only expected proxy headers.

Mobile

Mobile compatibility bridges SSR-safe Capacitor capabilities; native route generation is experimental and is not general web portability. Test each target platform.

Generated files and limits

app/routes.gen.ts, .wrnexus/, and dist/ are generated. The runtime is Bun-only. Preview packages are private. Historical compatibility and long-term support policy are not yet published.

- +
Framework architecture · 0.2.24

Architecture

WRNexusJS is Bun-native and SSR-first. File discovery maps pages and API handlers; middleware enriches or short-circuits a request; the compiler turns .wrn declarations into server render functions and small feature runtimes.

Request and build lifecycle

  1. DiscoverPages, APIs, middleware, components, layouts, schemas, rooms
  2. CompileParse .wrn, validate grammar, generate server code
  3. RequestLimits, security, locale, session, middleware
  4. MatchStatic and dynamic file route
  5. RenderSSR data, escaped interpolation, components, metadata
  6. EnhanceOnly required reactive/directive runtimes

Package boundaries

core owns contexts, middleware, sessions and rooms; router discovers routes; compiler parses .wrn; ssr renders documents; csr supplies browser runtimes; dev-server and cli orchestrate development and builds.

Security and data flow

Validation happens at trust boundaries. Session authentication establishes identity; authorization makes resource decisions. CSP, Trusted Types, CSRF, upload checks, WebSocket origins, request limits, and output escaping are layered controls—not substitutes for application policy.

Realtime and scale

Rooms are process-local unless connected through pub/sub. Redis-backed pub/sub distributes events. Queue durability depends on the selected driver and must be evaluated explicitly.

Workspaces and gateways

The gateway can dispatch multiple applications while preserving route, component, asset, config, and session boundaries. Validate host routing and isolation before production.

Build and deployment

wrnexus build . produces dist/server.js and hashed/static assets. Run the server with Bun, apply migrations before traffic, terminate TLS at a trusted edge, and forward only expected proxy headers.

Mobile

Mobile compatibility bridges SSR-safe Capacitor capabilities; native route generation is experimental and is not general web portability. Test each target platform.

Generated files and limits

app/routes.gen.ts, .wrnexus/, and dist/ are generated. The runtime is Bun-only. Preview packages are private. Historical compatibility and long-term support policy are not yet published.

+
} } \ No newline at end of file diff --git a/app/pages/benchmarks.wrn b/app/pages/benchmarks.wrn index 236577ac..a23e40d6 100644 --- a/app/pages/benchmarks.wrn +++ b/app/pages/benchmarks.wrn @@ -7,10 +7,10 @@ page Benchmarks { view {
-
W WRNexusJS
+
W WRNexusJS

Benchmarks

No publishable benchmark dataset yet

No comparative speed claims are published. A valid baseline must record scripts, commit, Bun/framework versions, hardware, OS, warmup, samples, workload, raw results, median, percentiles, memory, HTML size, browser JavaScript size, and run date.

The roadmap starts with WRNexusJS-only measurements before any maintained equivalent-workload comparison.

- +
} } \ No newline at end of file diff --git a/app/pages/changelog.wrn b/app/pages/changelog.wrn index fc0bd934..a9e0f571 100644 --- a/app/pages/changelog.wrn +++ b/app/pages/changelog.wrn @@ -7,10 +7,10 @@ page Changelog { view {
-
W WRNexusJS
+
W WRNexusJS
-

Changelog

0.2.23 2026-07-13

Documentation is aligned to all 26 installed packages. This release adds @wrnexus/helpers, original-request URL helpers, safe login redirects, working wrnexus workspace add, and forward-auth redirect propagation.

Migration notes

Run wrnexus update --latest and keep every @wrnexus/* package on 0.2.23. Existing applications must explicitly add @wrnexus/helpers before importing it; newly scaffolded applications include it automatically.

Versioning and support

The packages use semantic-looking versions, but a formal compatibility and old-release support policy has not been approved. Preview consumers should treat minor releases as potentially requiring migration review.

- +

Changelog

0.2.24 2026-07-13

Documentation is aligned to all 26 installed packages. This release adds @wrnexus/helpers, original-request URL helpers, safe login redirects, working wrnexus workspace add, and forward-auth redirect propagation.

Migration notes

Run wrnexus update --latest and keep every @wrnexus/* package on 0.2.24. Existing applications must explicitly add @wrnexus/helpers before importing it; newly scaffolded applications include it automatically.

Versioning and support

The packages use semantic-looking versions, but a formal compatibility and old-release support policy has not been approved. Preview consumers should treat minor releases as potentially requiring migration review.

+
} } \ No newline at end of file diff --git a/app/pages/examples.wrn b/app/pages/examples.wrn index 64e151ca..a58319d2 100644 --- a/app/pages/examples.wrn +++ b/app/pages/examples.wrn @@ -7,10 +7,10 @@ page Examples { view {
-
W WRNexusJS
+
W WRNexusJS
-

Examples

Examples are tied to installed 0.2.23 package documentation. The focused snippets in guides are source-verified; standalone runnable projects and CI compilation are tracked as remaining work.

Minimal .wrn page

Documented

Database CRUD

Planned fixture

Authentication and protected route

Planned fixture

Permissions

Planned fixture

Forms and validation

Documented

Realtime dashboard

Planned fixture

File upload

Planned fixture

Background queue

Planned fixture

Redis pub/sub

Planned fixture

Workspace gateway

Planned fixture

Deployment

Planned fixture

Experimental mobile mode

Planned fixture
- +

Examples

Examples are tied to installed 0.2.24 package documentation. The focused snippets in guides are source-verified; standalone runnable projects and CI compilation are tracked as remaining work.

Minimal .wrn page

Documented

Database CRUD

Planned fixture

Authentication and protected route

Planned fixture

Permissions

Planned fixture

Forms and validation

Documented

Realtime dashboard

Planned fixture

File upload

Planned fixture

Background queue

Planned fixture

Redis pub/sub

Planned fixture

Workspace gateway

Planned fixture

Deployment

Planned fixture

Experimental mobile mode

Planned fixture
+
} } \ No newline at end of file diff --git a/app/pages/getting-started.wrn b/app/pages/getting-started.wrn index 4a99360d..97d72ec8 100644 --- a/app/pages/getting-started.wrn +++ b/app/pages/getting-started.wrn @@ -7,9 +7,9 @@ page Gettingstarted { view {
-
W WRNexusJS
+
W WRNexusJS
-
Preview guide · v0.2.23

Build a contact inbox

This path creates a server-rendered page, validated API route, middleware, and realtime next step. It requires approved registry access and Bun 1.3.x; this site was verified with Bun 1.3.14.

1. Create the project

bunx @wrnexus/cli@0.2.23 create my-app
+      
Preview guide · v0.2.24

Build a contact inbox

This path creates a server-rendered page, validated API route, middleware, and realtime next step. It requires approved registry access and Bun 1.3.x; this site was verified with Bun 1.3.14.

1. Create the project

bunx @wrnexus/cli@0.2.24 create my-app
 cd my-app
 bun install
 bun run dev

2. Know the structure

app/pages/       # file-based .wrn routes
@@ -39,7 +39,7 @@ export const POST = async (ctx) => {
 }

7. Test and ship

bun run test
 bun run build
 bun dist/server.js

Next: deployment, database, authentication, and workspaces.

- +
} } \ No newline at end of file diff --git a/app/pages/guides/api-routes.wrn b/app/pages/guides/api-routes.wrn index ac281966..e68e3038 100644 --- a/app/pages/guides/api-routes.wrn +++ b/app/pages/guides/api-routes.wrn @@ -7,10 +7,10 @@ page APIroutes { view {
-
W WRNexusJS
+
W WRNexusJS
-
Preview guide · 0.2.23

API routes

Export GET, POST, PUT, PATCH, or DELETE from app/api files. Validate request bodies, enforce authentication and authorization, cap request sizes, and return Web Responses.

Release scope

This guide describes installed 0.2.23 capabilities. Follow linked package declarations for exact signatures; undocumented behavior is not guaranteed.

Browse package APIs · Troubleshooting · Support

- +
Preview guide · 0.2.24

API routes

Export GET, POST, PUT, PATCH, or DELETE from app/api files. Validate request bodies, enforce authentication and authorization, cap request sizes, and return Web Responses.

Release scope

This guide describes installed 0.2.24 capabilities. Follow linked package declarations for exact signatures; undocumented behavior is not guaranteed.

Browse package APIs · Troubleshooting · Support

+
} } \ No newline at end of file diff --git a/app/pages/guides/authentication.wrn b/app/pages/guides/authentication.wrn index 1dbf8b58..82baa31d 100644 --- a/app/pages/guides/authentication.wrn +++ b/app/pages/guides/authentication.wrn @@ -7,10 +7,10 @@ page Authentication { view {
-
W WRNexusJS
+
W WRNexusJS
-
Preview guide · 0.2.23

Authentication

Configure session authentication, log users in through supported auth helpers, and read identity from context. Cookie flags, rotation, expiry, and secret storage remain deployment responsibilities.

Release scope

This guide describes installed 0.2.23 capabilities. Follow linked package declarations for exact signatures; undocumented behavior is not guaranteed.

Browse package APIs · Troubleshooting · Support

- +
Preview guide · 0.2.24

Authentication

Configure session authentication, log users in through supported auth helpers, and read identity from context. Cookie flags, rotation, expiry, and secret storage remain deployment responsibilities.

Release scope

This guide describes installed 0.2.24 capabilities. Follow linked package declarations for exact signatures; undocumented behavior is not guaranteed.

Browse package APIs · Troubleshooting · Support

+
} } \ No newline at end of file diff --git a/app/pages/guides/authorization.wrn b/app/pages/guides/authorization.wrn index 3fb3b021..cc6913fb 100644 --- a/app/pages/guides/authorization.wrn +++ b/app/pages/guides/authorization.wrn @@ -7,10 +7,10 @@ page Authorization { view {
-
W WRNexusJS
+
W WRNexusJS
-
Preview guide · 0.2.23

Authorization

Authentication identifies; authorization decides. Enforce permissions in server routes and policies, including object ownership. UI hiding is never an authorization boundary.

Release scope

This guide describes installed 0.2.23 capabilities. Follow linked package declarations for exact signatures; undocumented behavior is not guaranteed.

Browse package APIs · Troubleshooting · Support

- +
Preview guide · 0.2.24

Authorization

Authentication identifies; authorization decides. Enforce permissions in server routes and policies, including object ownership. UI hiding is never an authorization boundary.

Release scope

This guide describes installed 0.2.24 capabilities. Follow linked package declarations for exact signatures; undocumented behavior is not guaranteed.

Browse package APIs · Troubleshooting · Support

+
} } \ No newline at end of file diff --git a/app/pages/guides/configuration-and-profiles.wrn b/app/pages/guides/configuration-and-profiles.wrn index d1bbaffc..1b42812c 100644 --- a/app/pages/guides/configuration-and-profiles.wrn +++ b/app/pages/guides/configuration-and-profiles.wrn @@ -7,10 +7,10 @@ page Configurationandprofiles { view {
-
W WRNexusJS
+
W WRNexusJS
-
Preview guide · 0.2.23

Configuration and profiles

wrnexus.config.ts owns styles, SEO, security, data, mobile, fonts, and profiles. Keep secrets in validated environment variables and review merged production configuration.

Release scope

This guide describes installed 0.2.23 capabilities. Follow linked package declarations for exact signatures; undocumented behavior is not guaranteed.

Browse package APIs · Troubleshooting · Support

- +
Preview guide · 0.2.24

Configuration and profiles

wrnexus.config.ts owns styles, SEO, security, data, mobile, fonts, and profiles. Keep secrets in validated environment variables and review merged production configuration.

Release scope

This guide describes installed 0.2.24 capabilities. Follow linked package declarations for exact signatures; undocumented behavior is not guaranteed.

Browse package APIs · Troubleshooting · Support

+
} } \ No newline at end of file diff --git a/app/pages/guides/database.wrn b/app/pages/guides/database.wrn index 8fcc262f..15a5d88d 100644 --- a/app/pages/guides/database.wrn +++ b/app/pages/guides/database.wrn @@ -7,10 +7,10 @@ page Database { view {
-
W WRNexusJS
+
W WRNexusJS
-
Preview guide · 0.2.23

Database

Configure SQLite or the installed supported driver, keep queries in named SQL blocks, generate typed functions, and apply migrations before traffic. Back up data and test rollback independently.

Release scope

This guide describes installed 0.2.23 capabilities. Follow linked package declarations for exact signatures; undocumented behavior is not guaranteed.

Browse package APIs · Troubleshooting · Support

- +
Preview guide · 0.2.24

Database

Configure SQLite or the installed supported driver, keep queries in named SQL blocks, generate typed functions, and apply migrations before traffic. Back up data and test rollback independently.

Release scope

This guide describes installed 0.2.24 capabilities. Follow linked package declarations for exact signatures; undocumented behavior is not guaranteed.

Browse package APIs · Troubleshooting · Support

+
} } \ No newline at end of file diff --git a/app/pages/guides/deployment.wrn b/app/pages/guides/deployment.wrn index f0f5fc8e..e177a9e9 100644 --- a/app/pages/guides/deployment.wrn +++ b/app/pages/guides/deployment.wrn @@ -7,10 +7,10 @@ page Deployment { view {
-
W WRNexusJS
+
W WRNexusJS
-
Preview guide · 0.2.23

Deployment

Run bun run build, apply migrations, and start dist/server.js with Bun. Configure TLS, proxy trust, environment validation, health checks, graceful restarts, logs, backups, and restrictive security headers.

Release scope

This guide describes installed 0.2.23 capabilities. Follow linked package declarations for exact signatures; undocumented behavior is not guaranteed.

Browse package APIs · Troubleshooting · Support

- +
Preview guide · 0.2.24

Deployment

Run bun run build, apply migrations, and start dist/server.js with Bun. Configure TLS, proxy trust, environment validation, health checks, graceful restarts, logs, backups, and restrictive security headers.

Release scope

This guide describes installed 0.2.24 capabilities. Follow linked package declarations for exact signatures; undocumented behavior is not guaranteed.

Browse package APIs · Troubleshooting · Support

+
} } \ No newline at end of file diff --git a/app/pages/guides/forms-and-validation.wrn b/app/pages/guides/forms-and-validation.wrn index cad57f23..774943c0 100644 --- a/app/pages/guides/forms-and-validation.wrn +++ b/app/pages/guides/forms-and-validation.wrn @@ -7,10 +7,10 @@ page Formsandvalidation { view {
-
W WRNexusJS
+
W WRNexusJS
-
Preview guide · 0.2.23

Forms and validation

Define a v.object schema, use data-schema on the form, show field errors with data-error, and always call parseBody on the server. refine is server-only.

Release scope

This guide describes installed 0.2.23 capabilities. Follow linked package declarations for exact signatures; undocumented behavior is not guaranteed.

Browse package APIs · Troubleshooting · Support

- +
Preview guide · 0.2.24

Forms and validation

Define a v.object schema, use data-schema on the form, show field errors with data-error, and always call parseBody on the server. refine is server-only.

Release scope

This guide describes installed 0.2.24 capabilities. Follow linked package declarations for exact signatures; undocumented behavior is not guaranteed.

Browse package APIs · Troubleshooting · Support

+
} } \ No newline at end of file diff --git a/app/pages/guides/i18n-and-themes.wrn b/app/pages/guides/i18n-and-themes.wrn index b36ccaa1..d27c88b3 100644 --- a/app/pages/guides/i18n-and-themes.wrn +++ b/app/pages/guides/i18n-and-themes.wrn @@ -7,10 +7,10 @@ page Internationalizationandthemes { view {
-
W WRNexusJS
+
W WRNexusJS
-
Preview guide · 0.2.23

Internationalization and themes

Store locale JSON under app/locales and use translation directives. Themes resolve CSS tokens; ensure contrast, system preference behavior, persistence, and non-color cues.

Release scope

This guide describes installed 0.2.23 capabilities. Follow linked package declarations for exact signatures; undocumented behavior is not guaranteed.

Browse package APIs · Troubleshooting · Support

- +
Preview guide · 0.2.24

Internationalization and themes

Store locale JSON under app/locales and use translation directives. Themes resolve CSS tokens; ensure contrast, system preference behavior, persistence, and non-color cues.

Release scope

This guide describes installed 0.2.24 capabilities. Follow linked package declarations for exact signatures; undocumented behavior is not guaranteed.

Browse package APIs · Troubleshooting · Support

+
} } \ No newline at end of file diff --git a/app/pages/guides/middleware.wrn b/app/pages/guides/middleware.wrn index 089be1be..b01f0b08 100644 --- a/app/pages/guides/middleware.wrn +++ b/app/pages/guides/middleware.wrn @@ -7,10 +7,10 @@ page Middleware { view {
-
W WRNexusJS
+
W WRNexusJS
-
Preview guide · 0.2.23

Middleware

Middleware receives context and next. Return next() to continue or return a Response to stop. Put request limits and trust-boundary controls before business logic.

Release scope

This guide describes installed 0.2.23 capabilities. Follow linked package declarations for exact signatures; undocumented behavior is not guaranteed.

Browse package APIs · Troubleshooting · Support

- +
Preview guide · 0.2.24

Middleware

Middleware receives context and next. Return next() to continue or return a Response to stop. Put request limits and trust-boundary controls before business logic.

Release scope

This guide describes installed 0.2.24 capabilities. Follow linked package declarations for exact signatures; undocumented behavior is not guaranteed.

Browse package APIs · Troubleshooting · Support

+
} } \ No newline at end of file diff --git a/app/pages/guides/mobile.wrn b/app/pages/guides/mobile.wrn index 741751f8..2657782f 100644 --- a/app/pages/guides/mobile.wrn +++ b/app/pages/guides/mobile.wrn @@ -7,10 +7,10 @@ page Mobile { view {
-
W WRNexusJS
+
W WRNexusJS
-
Preview guide · 0.2.23

Mobile

Mobile capabilities are experimental in this preview. Test Capacitor permissions and lifecycle on each platform; do not assume every .wrn or browser API converts to native.

Release scope

This guide describes installed 0.2.23 capabilities. Follow linked package declarations for exact signatures; undocumented behavior is not guaranteed.

Browse package APIs · Troubleshooting · Support

- +
Preview guide · 0.2.24

Mobile

Mobile capabilities are experimental in this preview. Test Capacitor permissions and lifecycle on each platform; do not assume every .wrn or browser API converts to native.

Release scope

This guide describes installed 0.2.24 capabilities. Follow linked package declarations for exact signatures; undocumented behavior is not guaranteed.

Browse package APIs · Troubleshooting · Support

+
} } \ No newline at end of file diff --git a/app/pages/guides/observability.wrn b/app/pages/guides/observability.wrn index 73b8eb13..4a987c23 100644 --- a/app/pages/guides/observability.wrn +++ b/app/pages/guides/observability.wrn @@ -7,10 +7,10 @@ page Observability { view {
-
W WRNexusJS
+
W WRNexusJS
-
Preview guide · 0.2.23

Observability

Use tracking middleware and sinks with redaction, sampling, stable request identifiers, alert ownership, and retention limits. Never capture registry tokens or session secrets.

Release scope

This guide describes installed 0.2.23 capabilities. Follow linked package declarations for exact signatures; undocumented behavior is not guaranteed.

Browse package APIs · Troubleshooting · Support

- +
Preview guide · 0.2.24

Observability

Use tracking middleware and sinks with redaction, sampling, stable request identifiers, alert ownership, and retention limits. Never capture registry tokens or session secrets.

Release scope

This guide describes installed 0.2.24 capabilities. Follow linked package declarations for exact signatures; undocumented behavior is not guaranteed.

Browse package APIs · Troubleshooting · Support

+
} } \ No newline at end of file diff --git a/app/pages/guides/pages-and-components.wrn b/app/pages/guides/pages-and-components.wrn index a32b41c2..2e62106a 100644 --- a/app/pages/guides/pages-and-components.wrn +++ b/app/pages/guides/pages-and-components.wrn @@ -7,10 +7,10 @@ page Pagesandcomponents { view {
-
W WRNexusJS
+
W WRNexusJS
-
Preview guide · 0.2.23

Pages and components

Pages are routable, components are reusable, and layouts provide shared slots. Mount a component with data-component and keep browser state scoped and minimal.

Release scope

This guide describes installed 0.2.23 capabilities. Follow linked package declarations for exact signatures; undocumented behavior is not guaranteed.

Browse package APIs · Troubleshooting · Support

- +
Preview guide · 0.2.24

Pages and components

Pages are routable, components are reusable, and layouts provide shared slots. Mount a component with data-component and keep browser state scoped and minimal.

Release scope

This guide describes installed 0.2.24 capabilities. Follow linked package declarations for exact signatures; undocumented behavior is not guaranteed.

Browse package APIs · Troubleshooting · Support

+
} } \ No newline at end of file diff --git a/app/pages/guides/project-structure.wrn b/app/pages/guides/project-structure.wrn index 894db462..1e3c160c 100644 --- a/app/pages/guides/project-structure.wrn +++ b/app/pages/guides/project-structure.wrn @@ -7,10 +7,10 @@ page Projectstructure { view {
-
W WRNexusJS
+
W WRNexusJS
-
Preview guide · 0.2.23

Project structure

Pages, components, layouts, APIs, middleware, schemas, database files, locales, realtime rooms, and styles live under app. Never edit app/routes.gen.ts, .wrnexus, or dist by hand.

Release scope

This guide describes installed 0.2.23 capabilities. Follow linked package declarations for exact signatures; undocumented behavior is not guaranteed.

Browse package APIs · Troubleshooting · Support

- +
Preview guide · 0.2.24

Project structure

Pages, components, layouts, APIs, middleware, schemas, database files, locales, realtime rooms, and styles live under app. Never edit app/routes.gen.ts, .wrnexus, or dist by hand.

Release scope

This guide describes installed 0.2.24 capabilities. Follow linked package declarations for exact signatures; undocumented behavior is not guaranteed.

Browse package APIs · Troubleshooting · Support

+
} } \ No newline at end of file diff --git a/app/pages/guides/pubsub.wrn b/app/pages/guides/pubsub.wrn index e5553aea..f3f7c5f9 100644 --- a/app/pages/guides/pubsub.wrn +++ b/app/pages/guides/pubsub.wrn @@ -7,10 +7,10 @@ page Pubsub { view {
-
W WRNexusJS
+
W WRNexusJS
-
Preview guide · 0.2.23

Pub/sub

The in-process driver cannot cross processes. Use Redis where instances must share events, define channel ownership, and design for reconnects and duplicate delivery.

Release scope

This guide describes installed 0.2.23 capabilities. Follow linked package declarations for exact signatures; undocumented behavior is not guaranteed.

Browse package APIs · Troubleshooting · Support

- +
Preview guide · 0.2.24

Pub/sub

The in-process driver cannot cross processes. Use Redis where instances must share events, define channel ownership, and design for reconnects and duplicate delivery.

Release scope

This guide describes installed 0.2.24 capabilities. Follow linked package declarations for exact signatures; undocumented behavior is not guaranteed.

Browse package APIs · Troubleshooting · Support

+
} } \ No newline at end of file diff --git a/app/pages/guides/queues.wrn b/app/pages/guides/queues.wrn index 15229be9..b179a1d2 100644 --- a/app/pages/guides/queues.wrn +++ b/app/pages/guides/queues.wrn @@ -7,10 +7,10 @@ page Queues { view {
-
W WRNexusJS
+
W WRNexusJS
-
Preview guide · 0.2.23

Queues

Queue behavior is preview-level. Treat in-process work as non-durable, make handlers idempotent, cap retries, record failures, and choose a production persistence strategy.

Release scope

This guide describes installed 0.2.23 capabilities. Follow linked package declarations for exact signatures; undocumented behavior is not guaranteed.

Browse package APIs · Troubleshooting · Support

- +
Preview guide · 0.2.24

Queues

Queue behavior is preview-level. Treat in-process work as non-durable, make handlers idempotent, cap retries, record failures, and choose a production persistence strategy.

Release scope

This guide describes installed 0.2.24 capabilities. Follow linked package declarations for exact signatures; undocumented behavior is not guaranteed.

Browse package APIs · Troubleshooting · Support

+
} } \ No newline at end of file diff --git a/app/pages/guides/realtime.wrn b/app/pages/guides/realtime.wrn index 714ee187..ca866566 100644 --- a/app/pages/guides/realtime.wrn +++ b/app/pages/guides/realtime.wrn @@ -7,10 +7,10 @@ page Realtime { view {
-
W WRNexusJS
+
W WRNexusJS
-
Preview guide · 0.2.23

Realtime

defineRoom handles connection and messages. Validate message shapes, authorize subscriptions, restrict origins, bound payloads, and use pub/sub to scale across processes.

Release scope

This guide describes installed 0.2.23 capabilities. Follow linked package declarations for exact signatures; undocumented behavior is not guaranteed.

Browse package APIs · Troubleshooting · Support

- +
Preview guide · 0.2.24

Realtime

defineRoom handles connection and messages. Validate message shapes, authorize subscriptions, restrict origins, bound payloads, and use pub/sub to scale across processes.

Release scope

This guide describes installed 0.2.24 capabilities. Follow linked package declarations for exact signatures; undocumented behavior is not guaranteed.

Browse package APIs · Troubleshooting · Support

+
} } \ No newline at end of file diff --git a/app/pages/guides/routing.wrn b/app/pages/guides/routing.wrn index 5ef977f4..2cebd704 100644 --- a/app/pages/guides/routing.wrn +++ b/app/pages/guides/routing.wrn @@ -7,10 +7,10 @@ page Routing { view {
-
W WRNexusJS
+
W WRNexusJS
-
Preview guide · 0.2.23

Routing

A page filename defines its URL; index maps to the directory root and bracket segments are dynamic parameters. API files under app/api expose HTTP method functions and receive a Context.

Release scope

This guide describes installed 0.2.23 capabilities. Follow linked package declarations for exact signatures; undocumented behavior is not guaranteed.

Browse package APIs · Troubleshooting · Support

- +
Preview guide · 0.2.24

Routing

A page filename defines its URL; index maps to the directory root and bracket segments are dynamic parameters. API files under app/api expose HTTP method functions and receive a Context.

Release scope

This guide describes installed 0.2.24 capabilities. Follow linked package declarations for exact signatures; undocumented behavior is not guaranteed.

Browse package APIs · Troubleshooting · Support

+
} } \ No newline at end of file diff --git a/app/pages/guides/security.wrn b/app/pages/guides/security.wrn index b2ef23b8..70ab4110 100644 --- a/app/pages/guides/security.wrn +++ b/app/pages/guides/security.wrn @@ -7,10 +7,10 @@ page Applicationsecurity { view {
-
W WRNexusJS
+
W WRNexusJS
-
Preview guide · 0.2.23

Application security

Use CSP, CSRF, Trusted Types, session hardening, validation, origin checks, upload restrictions, encryption, request limits, and explicit CORS. See the security policy for reporting.

Release scope

This guide describes installed 0.2.23 capabilities. Follow linked package declarations for exact signatures; undocumented behavior is not guaranteed.

Browse package APIs · Troubleshooting · Support

- +
Preview guide · 0.2.24

Application security

Use CSP, CSRF, Trusted Types, session hardening, validation, origin checks, upload restrictions, encryption, request limits, and explicit CORS. See the security policy for reporting.

Release scope

This guide describes installed 0.2.24 capabilities. Follow linked package declarations for exact signatures; undocumented behavior is not guaranteed.

Browse package APIs · Troubleshooting · Support

+
} } \ No newline at end of file diff --git a/app/pages/guides/server-data.wrn b/app/pages/guides/server-data.wrn index a5dc8ad5..732905cd 100644 --- a/app/pages/guides/server-data.wrn +++ b/app/pages/guides/server-data.wrn @@ -7,10 +7,10 @@ page Serverdata { view {
-
W WRNexusJS
+
W WRNexusJS
-
Preview guide · 0.2.23

Server data

Use an ssr API binding, return the desired response field, and render it with a server #each block. Values are escaped. Avoid fetching private data through a route that lacks authorization.

Release scope

This guide describes installed 0.2.23 capabilities. Follow linked package declarations for exact signatures; undocumented behavior is not guaranteed.

Browse package APIs · Troubleshooting · Support

- +
Preview guide · 0.2.24

Server data

Use an ssr API binding, return the desired response field, and render it with a server #each block. Values are escaped. Avoid fetching private data through a route that lacks authorization.

Release scope

This guide describes installed 0.2.24 capabilities. Follow linked package declarations for exact signatures; undocumented behavior is not guaranteed.

Browse package APIs · Troubleshooting · Support

+
} } \ No newline at end of file diff --git a/app/pages/guides/testing.wrn b/app/pages/guides/testing.wrn index 665b1ed1..23c9a2e5 100644 --- a/app/pages/guides/testing.wrn +++ b/app/pages/guides/testing.wrn @@ -7,10 +7,10 @@ page Testing { view {
-
W WRNexusJS
+
W WRNexusJS
-
Preview guide · 0.2.23

Testing

Use Bun tests and @wrnexus/test helpers. Cover server HTML, API status and validation, authorization failures, reactive behavior, and a production startup smoke test.

Release scope

This guide describes installed 0.2.23 capabilities. Follow linked package declarations for exact signatures; undocumented behavior is not guaranteed.

Browse package APIs · Troubleshooting · Support

- +
Preview guide · 0.2.24

Testing

Use Bun tests and @wrnexus/test helpers. Cover server HTML, API status and validation, authorization failures, reactive behavior, and a production startup smoke test.

Release scope

This guide describes installed 0.2.24 capabilities. Follow linked package declarations for exact signatures; undocumented behavior is not guaranteed.

Browse package APIs · Troubleshooting · Support

+
} } \ No newline at end of file diff --git a/app/pages/guides/troubleshooting.wrn b/app/pages/guides/troubleshooting.wrn index c8eea09d..c992a9c2 100644 --- a/app/pages/guides/troubleshooting.wrn +++ b/app/pages/guides/troubleshooting.wrn @@ -7,10 +7,10 @@ page Troubleshooting { view {
-
W WRNexusJS
+
W WRNexusJS
-
Preview guide · 0.2.23

Troubleshooting

Confirm Bun and package versions, regenerate docs/routes through supported commands, read the first compiler diagnostic, check file naming, validate config, and reproduce under a production build.

Release scope

This guide describes installed 0.2.23 capabilities. Follow linked package declarations for exact signatures; undocumented behavior is not guaranteed.

Browse package APIs · Troubleshooting · Support

- +
Preview guide · 0.2.24

Troubleshooting

Confirm Bun and package versions, regenerate docs/routes through supported commands, read the first compiler diagnostic, check file naming, validate config, and reproduce under a production build.

Release scope

This guide describes installed 0.2.24 capabilities. Follow linked package declarations for exact signatures; undocumented behavior is not guaranteed.

Browse package APIs · Troubleshooting · Support

+
} } \ No newline at end of file diff --git a/app/pages/guides/upgrading.wrn b/app/pages/guides/upgrading.wrn index f9d050f3..ef0fbfb0 100644 --- a/app/pages/guides/upgrading.wrn +++ b/app/pages/guides/upgrading.wrn @@ -7,10 +7,10 @@ page Upgrading { view {
-
W WRNexusJS
+
W WRNexusJS
-
Preview guide · 0.2.23

Upgrading

Back up and commit first, then use wrnexus update --latest as documented by the installed CLI. Review migrations and keep every @wrnexus package aligned. Current release: 0.2.23.

Release scope

This guide describes installed 0.2.23 capabilities. Follow linked package declarations for exact signatures; undocumented behavior is not guaranteed.

Browse package APIs · Troubleshooting · Support

- +
Preview guide · 0.2.24

Upgrading

Back up and commit first, then use wrnexus update --latest as documented by the installed CLI. Review migrations and keep every @wrnexus package aligned. Current release: 0.2.24.

Release scope

This guide describes installed 0.2.24 capabilities. Follow linked package declarations for exact signatures; undocumented behavior is not guaranteed.

Browse package APIs · Troubleshooting · Support

+
} } \ No newline at end of file diff --git a/app/pages/guides/uploads.wrn b/app/pages/guides/uploads.wrn index 8547f93d..1ac8b9a7 100644 --- a/app/pages/guides/uploads.wrn +++ b/app/pages/guides/uploads.wrn @@ -7,10 +7,10 @@ page Uploads { view {
-
W WRNexusJS
+
W WRNexusJS
-
Preview guide · 0.2.23

Uploads

Configure named stores, accepted MIME/extensions, and maxBytes. Random keys avoid path traversal. Private files require an authenticated serving route; v1 buffers each file in memory.

Release scope

This guide describes installed 0.2.23 capabilities. Follow linked package declarations for exact signatures; undocumented behavior is not guaranteed.

Browse package APIs · Troubleshooting · Support

- +
Preview guide · 0.2.24

Uploads

Configure named stores, accepted MIME/extensions, and maxBytes. Random keys avoid path traversal. Private files require an authenticated serving route; v1 buffers each file in memory.

Release scope

This guide describes installed 0.2.24 capabilities. Follow linked package declarations for exact signatures; undocumented behavior is not guaranteed.

Browse package APIs · Troubleshooting · Support

+
} } \ No newline at end of file diff --git a/app/pages/guides/workspaces-and-gateway.wrn b/app/pages/guides/workspaces-and-gateway.wrn index 631e67d3..f4c111e7 100644 --- a/app/pages/guides/workspaces-and-gateway.wrn +++ b/app/pages/guides/workspaces-and-gateway.wrn @@ -7,9 +7,9 @@ page Workspacesandgateway { view {
-
W WRNexusJS
+
W WRNexusJS
-
Preview guide · 0.2.23

Workspaces and gateway

A workspace runs isolated applications behind one domain-routing gateway. Add an application from the workspace root; the CLI scaffolds apps/reports and registers it in wrnexus.workspace.ts:

wrnexus workspace add reports --domain=reports.localhost
+      
Preview guide · 0.2.24

Workspaces and gateway

A workspace runs isolated applications behind one domain-routing gateway. Add an application from the workspace root; the CLI scaffolds apps/reports and registers it in wrnexus.workspace.ts:

wrnexus workspace add reports --domain=reports.localhost
 bun install
 bun run dev

Forward authentication

Point protected applications at a dedicated verifier endpoint. The verifier must return 2xx for an authenticated session, 401/403 to deny access, or an HTTP redirect to begin browser login.

// wrnexus.workspace.ts
 {
@@ -28,8 +28,8 @@ export const GET = async (ctx: Context) => {
   return redirectToLogin(ctx, "/login", {
     allowedHosts: ["admin.localhost:3000", "reports.localhost:3000"],
   });
-};

Always allowlist redirect hosts. After login, validate or sign the returnTo value before redirecting. Keep internal app ports private and open applications through the gateway port.

Release scope

This guide describes installed 0.2.23 capabilities. Follow linked package declarations for exact signatures; undocumented behavior is not guaranteed.

Browse package APIs · Troubleshooting · Support

- +};

Always allowlist redirect hosts. After login, validate or sign the returnTo value before redirecting. Keep internal app ports private and open applications through the gateway port.

Release scope

This guide describes installed 0.2.24 capabilities. Follow linked package declarations for exact signatures; undocumented behavior is not guaranteed.

Browse package APIs · Troubleshooting · Support

+
} } \ No newline at end of file diff --git a/app/pages/index.wrn b/app/pages/index.wrn index 8513a7f5..1bd66d4a 100644 --- a/app/pages/index.wrn +++ b/app/pages/index.wrn @@ -7,9 +7,9 @@ page Home { view {
-
W WRNexusJS
+
W WRNexusJS
-
Private Developer Preview

WRNexusJS v0.2.23

Build from the server.
Ship only what matters.

WRNexusJS is an SSR-first, Bun-native full-stack framework. Build typed pages, APIs, validated forms, realtime rooms, secure sessions, workspaces, and optional mobile experiences with the .wrn component language.

Private developer preview. Request access to the package registry.

app/pages/dashboard.wrn
page Dashboard {
+      
Private Developer Preview

WRNexusJS v0.2.24

Build from the server.
Ship only what matters.

WRNexusJS is an SSR-first, Bun-native full-stack framework. Build typed pages, APIs, validated forms, realtime rooms, secure sessions, workspaces, and optional mobile experiences with the .wrn component language.

Private developer preview. Request access to the package registry.

app/pages/dashboard.wrn
page Dashboard {
   ssr { api tasks GET /api/tasks { return tasks } }
   view {
     <main>
@@ -35,10 +35,10 @@ export const POST = async (ctx) => {
   return result.ok ? Response.json({ ok: true }, { status: 201 }) : result.response;
 };

Request lifecycle

  1. RequestSecurity headers and request limits
  2. MiddlewareAuthentication, policy, and context
  3. File routePage or API handler
  4. Compiler + SSRSafe HTML and scoped runtime
  5. ResponseHTML, JSON, stream, or realtime upgrade
-

Production proof

WorkRoot

Public creator/company site and approved WRNexusJS production showcase.

wrnexusjs.dev

This documentation application runs WRNexusJS 0.2.23.

View deployment notes and showcase status →

-

Capability status

CapabilityStatusDetails
SSR, routing, compiler, APIsPreviewInstalled in 0.2.23; public support policy pending.
Mobile/nativeExperimentalCapacitor compatibility and native generation have platform limitations.
Durable queuesExperimentalProduction durability requires an appropriate driver strategy.
+

Production proof

WorkRoot

Public creator/company site and approved WRNexusJS production showcase.

wrnexusjs.dev

This documentation application runs WRNexusJS 0.2.24.

View deployment notes and showcase status →

+

Capability status

CapabilityStatusDetails
SSR, routing, compiler, APIsPreviewInstalled in 0.2.24; public support policy pending.
Mobile/nativeExperimentalCapacitor compatibility and native generation have platform limitations.
Durable queuesExperimentalProduction durability requires an appropriate driver strategy.

Continue exploring

- +
} } \ No newline at end of file diff --git a/app/pages/language.wrn b/app/pages/language.wrn index f49e4fb3..03f73d21 100644 --- a/app/pages/language.wrn +++ b/app/pages/language.wrn @@ -7,15 +7,15 @@ page Thewrnlanguage { view {
-
W WRNexusJS
+
W WRNexusJS
-
Language reference · 0.2.23

The .wrn language

File anatomy

page Account {
+      
Language reference · 0.2.24

The .wrn language

File anatomy

page Account {
   layout = "public"
   seo { title = "Account" description = "Manage your account." }
   state count = 0
   view { <button @click="count++">Count {count}</button> }
 }

Pages, components, layouts, props, and state

Pages are routes. Components declare default-valued props and may hold state. Layouts provide shared slots. Mount components with data-component; fill default or named slots with data-slot.

Interpolation, conditionals, and loops

Interpolation is HTML-escaped. Use server {#if} and {#each} for SSR data. Use data-show for reactive client visibility.

Events and directives

@click and other events execute in the reactive scope. Data attributes opt into forms, i18n, themes, realtime, uploader, browser, and mobile behavior. Consult the exact package page because availability varies.

Forms, i18n, themes, and realtime

form[data-schema] connects descriptors to client and server validation. Translation keys use {t:key}. Theme toggles use data-wire-theme-toggle. Realtime pages opt into a named room.

Escaping and security

Text interpolation is escaped by default. Do not construct trusted HTML from user input. Server-only refinements must be repeated at the authoritative mutation boundary.

Common compiler errors

  • Use balanced braces; a literal brace must be escaped.
  • Declare UI in view, not JSX or hooks.
  • Use a valid page, component, or layout declaration matching the file role.
  • Keep server loops tied to available SSR bindings.
  • Check troubleshooting and compiler API for this release.
- +
} } \ No newline at end of file diff --git a/app/pages/license.wrn b/app/pages/license.wrn index ee221217..ec822e40 100644 --- a/app/pages/license.wrn +++ b/app/pages/license.wrn @@ -7,10 +7,10 @@ page License { view {
-
W WRNexusJS
+
W WRNexusJS

License

Owner decision required

This documentation repository contains no public license file, and the packages are unavailable from the public npm registry. No open-source license or redistribution right should be inferred.

Approved preview users must follow the private/commercial terms supplied by WorkRoot. Contact WorkRoot before copying, redistributing, or using WRNexusJS in production.

- +
} } \ No newline at end of file diff --git a/app/pages/packages.wrn b/app/pages/packages.wrn index 9807e540..932b8673 100644 --- a/app/pages/packages.wrn +++ b/app/pages/packages.wrn @@ -12,10 +12,10 @@ page Packages {
W WRNexusJS - +
-
26 focused packages

Package reference

Everything in the framework, organized by responsibility and documented from the published 0.2.23 APIs.

Showing {category} packages

+
26 focused packages

Package reference

Everything in the framework, organized by responsibility and documented from the published 0.2.24 APIs.

Showing {category} packages

AI

@wrnexus/ai

Server-side Anthropic client with generation and streaming.

Open documentation →
@@ -93,7 +93,7 @@ page Packages { Security

@wrnexus/validation

Typed schemas, coercion, validation, and browser descriptors.

Open documentation →
-
WRNexusJS 0.2.23 · Private Developer Preview · Bun-native · Documentation generated from installed package APIs.
+
WRNexusJS 0.2.24 · Private Developer Preview · Bun-native · Documentation generated from installed package APIs.
} } diff --git a/app/pages/packages/ai.wrn b/app/pages/packages/ai.wrn index cabb27d9..58e6bc86 100644 --- a/app/pages/packages/ai.wrn +++ b/app/pages/packages/ai.wrn @@ -10,12 +10,12 @@ page wrnexusai {
W WRNexusJS - +
- -
AI · Preview

@wrnexus/ai

Server-side Anthropic client with generation and streaming.

Private registry access required

This package is not available from the public npm registry. After WorkRoot approves access and supplies private registry instructions, install the release-aligned package:

bun add @wrnexus/ai@0.2.23

Request preview access. Never put registry tokens in source control.

A tiny, zero-dependency Claude (Anthropic) client for WRNexusJS apps — generate and stream text with Claude from any server-side code.
+ +
AI · Preview

@wrnexus/ai

Server-side Anthropic client with generation and streaming.

Private registry access required

This package is not available from the public npm registry. After WorkRoot approves access and supplies private registry instructions, install the release-aligned package:

bun add @wrnexus/ai@0.2.24

Request preview access. Never put registry tokens in source control.

A tiny, zero-dependency Claude (Anthropic) client for WRNexusJS apps — generate and stream text with Claude from any server-side code.

Part of the WRNexusJS framework — an SSR-first, Bun-native full-stack web framework.

Overview

@wrnexus/ai is a thin, dependency-free wrapper over the Anthropic Messages API, built on fetch (Bun-native, no SDK). Use it in API routes, jobs, or middleware to call Claude. It defaults to the most capable model, claude-opus-4-8, reads your key from ANTHROPIC_API_KEY, and supports both one-shot generation and streaming.

@@ -77,6 +77,7 @@ try { } }

Usage

+

Return generated JSON from an API route

// app/api/summarize.ts — summarize posted text
 import { createAI } from "@wrnexus/ai";
 const ai = createAI();
@@ -89,6 +90,19 @@ export const POST = async (ctx) => {
   });
   return Response.json({ summary });
 };
+

Stream a chat response to the browser

+
// app/api/chat.ts
+import { createAI } from "@wrnexus/ai";
+
+const ai = createAI({ model: "claude-sonnet-5" });
+
+export const POST = async (ctx) => {
+  const { messages } = await ctx.req.json();
+  return ai.streamResponse(messages, {
+    system: "Answer using concise Markdown.",
+    maxTokens: 1_500,
+  });
+};

Requirements / Notes

  • Bun-only. Uses fetch, ReadableStream, TextDecoder/TextEncoder, and
  • @@ -163,20 +177,32 @@ interface AI { declare function createAI(config?: AIConfig): AI; export { type AI, type AIConfig, AIError, type Effort, type GenerateOptions, type Message, type Role, createAI }; -

Examples

Examples are taken from this package's installed documentation and must be evaluated with its requirements and stability notes.

Example 1

bun add @wrnexus/ai

Example 2

ANTHROPIC_API_KEY=sk-ant-...

Example 3

import { createAI } from "@wrnexus/ai";
-const ai = createAI(); // or createAI({ apiKey, model, maxTokens, baseURL, version })

Example 4

const text = await ai.generate("Write a haiku about Bun.");
+

Examples

Examples are taken from this package's installed documentation and must be evaluated with its requirements and stability notes.

Return generated JSON from an API route

// app/api/summarize.ts — summarize posted text
+import { createAI } from "@wrnexus/ai";
+const ai = createAI();
 
-const reply = await ai.generate(
-  [
-    { role: "user", content: "My name is Ada." },
-    { role: "assistant", content: "Hi Ada!" },
-    { role: "user", content: "What's my name?" },
-  ],
-  { system: "You are concise." },
-);
- +export const POST = async (ctx) => { + const { text } = await ctx.req.json().catch(() => ({})); + if (!text) return Response.json({ error: "Provide 'text'." }, { status: 400 }); + const summary = await ai.generate(`Summarize in one sentence:\n\n${text}`, { + system: "You are a precise summarizer.", + }); + return Response.json({ summary }); +};

Stream a chat response to the browser

// app/api/chat.ts
+import { createAI } from "@wrnexus/ai";
+
+const ai = createAI({ model: "claude-sonnet-5" });
+
+export const POST = async (ctx) => {
+  const { messages } = await ctx.req.json();
+  return ai.streamResponse(messages, {
+    system: "Answer using concise Markdown.",
+    maxTokens: 1_500,
+  });
+};
+
-
WRNexusJS 0.2.23 · Private Developer Preview · Bun-native · Documentation generated from installed package APIs.
+
WRNexusJS 0.2.24 · Private Developer Preview · Bun-native · Documentation generated from installed package APIs.
} } diff --git a/app/pages/packages/authz.wrn b/app/pages/packages/authz.wrn index 8338bfae..324bc3b0 100644 --- a/app/pages/packages/authz.wrn +++ b/app/pages/packages/authz.wrn @@ -10,12 +10,12 @@ page wrnexusauthz {
W WRNexusJS - +
- -
Security · Preview

@wrnexus/authz

Role, permission, policy, and authorization guards.

Private registry access required

This package is not available from the public npm registry. After WorkRoot approves access and supplies private registry instructions, install the release-aligned package:

bun add @wrnexus/authz@0.2.23

Request preview access. Never put registry tokens in source control.

Composable authorization for WRNexusJS — role-based (RBAC), policy-based (PBAC), and attribute-based (ABAC) access control that reduces to a boolean check plus an authorize() guard.
+ +
Security · Preview

@wrnexus/authz

Role, permission, policy, and authorization guards.

Private registry access required

This package is not available from the public npm registry. After WorkRoot approves access and supplies private registry instructions, install the release-aligned package:

bun add @wrnexus/authz@0.2.24

Request preview access. Never put registry tokens in source control.

Composable authorization for WRNexusJS — role-based (RBAC), policy-based (PBAC), and attribute-based (ABAC) access control that reduces to a boolean check plus an authorize() guard.

Part of the WRNexusJS framework — an SSR-first, Bun-native full-stack web framework.

Overview

@wrnexus/authz is a small, server-side authorization toolkit. It gives you three interchangeable models — RBAC (roles → permissions), PBAC (policy predicates), and ABAC (attribute matchers) — that all collapse to a boolean | Promise<boolean> decision. Wrap any decision in a Middleware guard (authorize, requireRole, requirePermission) to protect WRNexusJS routes. Reach for it whenever a route or action needs to be gated on who the user is, what roles they hold, or attributes of the user and the resource. It plugs into @wrnexus/core by reading ctx.user as the authorization subject.

@@ -169,7 +169,7 @@ declare function requireRole(...roles: string[]): Middleware; declare function requirePermission(rbac: Rbac, permission: string): Middleware; export { type Policy, type Rbac, type Subject, all, any, attr, authorize, defineRbac, hasRole, requirePermission, requireRole }; -

Examples

Examples are taken from this package's installed documentation and must be evaluated with its requirements and stability notes.

Example 1

bun add @wrnexus/authz

Example 2

import { defineRbac, hasRole } from "@wrnexus/authz";
+

Examples

Examples are taken from this package's installed documentation and must be evaluated with its requirements and stability notes.

RBAC

import { defineRbac, hasRole } from "@wrnexus/authz";
 
 const rbac = defineRbac({
   admin: ["*"],
@@ -184,7 +184,7 @@ const user = { id: "u1", roles: ["editor"] };
 rbac.can(user, "post:write"); // true
 rbac.can(user, "post:delete"); // false
 rbac.permissionsFor(["lead"]); // Set { "post:read", "post:write", "post:publish" }
-hasRole(user, "editor"); // true

Example 3

import { authorize, requireRole, requirePermission, defineRbac } from "@wrnexus/authz";
+hasRole(user, "editor"); // true

Guarding routes

import { authorize, requireRole, requirePermission, defineRbac } from "@wrnexus/authz";
 
 const rbac = defineRbac({ admin: ["*"], editor: ["post:read", "post:write"] });
 
@@ -199,7 +199,7 @@ app.delete(
   "/posts/:id",
   authorize((ctx) => hasRole(ctx.user, "admin")),
   handler,
-);

Example 4

import { any, all, attr, authorize, type Policy } from "@wrnexus/authz";
+);

PBAC / ABAC policies

import { any, all, attr, authorize, type Policy } from "@wrnexus/authz";
 
 interface User {
   id: string;
@@ -227,7 +227,7 @@ app.put(
 );
-
WRNexusJS 0.2.23 · Private Developer Preview · Bun-native · Documentation generated from installed package APIs.
+
WRNexusJS 0.2.24 · Private Developer Preview · Bun-native · Documentation generated from installed package APIs.
} } diff --git a/app/pages/packages/cli.wrn b/app/pages/packages/cli.wrn index 68f2e88a..9b225170 100644 --- a/app/pages/packages/cli.wrn +++ b/app/pages/packages/cli.wrn @@ -10,12 +10,12 @@ page wrnexuscli {
W WRNexusJS - +
- -
Tooling · Preview

@wrnexus/cli

Create, develop, build, generate, test, and maintain WRNexusJS apps.

Private registry access required

This package is not available from the public npm registry. After WorkRoot approves access and supplies private registry instructions, install the release-aligned package:

bun add @wrnexus/cli@0.2.23

Request preview access. Never put registry tokens in source control.

The wrnexus command-line tool that scaffolds, runs, builds, tests, and manages WRNexusJS apps.
+ +
Tooling · Preview

@wrnexus/cli

Create, develop, build, generate, test, and maintain WRNexusJS apps.

Private registry access required

This package is not available from the public npm registry. After WorkRoot approves access and supplies private registry instructions, install the release-aligned package:

bun add @wrnexus/cli@0.2.24

Request preview access. Never put registry tokens in source control.

The wrnexus command-line tool that scaffolds, runs, builds, tests, and manages WRNexusJS apps.

Part of the WRNexusJS framework — an SSR-first, Bun-native full-stack web framework.

Overview

@wrnexus/cli provides the wrnexus executable — the single entry point for developing a WRNexusJS app. It runs the HMR dev server, produces a self-contained production build, scaffolds apps/pages/components, drives database migrations, regenerates typed routes and queries, runs tests, and manages configuration profiles. It also scaffolds multi-app monorepos and serves them behind a domain-routing gateway. This is a CLI/build-time package (it shells out to the Bun binary for the dev child and tests) and it also exports the workspace config types via a subpath.

@@ -92,6 +92,28 @@ bun install

wrnexus test

Runs the app's tests with bun test. Defaults to the test profile (config + .env.test). Pass --watch to re-run on change; extra flags pass straight through to bun test.

wrnexus test . --watch
+

Usage

+

Create and run a single application

+
bunx @wrnexus/cli create customer-portal
+cd customer-portal
+bun install
+bun run dev
+

Add routes and shared UI to an existing app

+
wrnexus generate page reports/monthly
+wrnexus generate api reports/export
+wrnexus generate component report-filter
+wrnexus generate routes
+

Create a multi-app workspace and add another app

+
wrnexus workspace company-suite
+cd company-suite
+wrnexus workspace add reports --domain=reports.localhost
+bun install
+wrnexus gateway --port=3000
+

Open http://reports.localhost:3000; the gateway selects apps/reports from the request host.

+

Upgrade with migrations and verification

+
wrnexus update --latest --dry-run
+wrnexus update --latest
+wrnexus doctor

Profiles

Pass --profile=<name> to dev, build, db (or set WRNEXUS_PROFILE) to select a config profile. The CLI publishes WRNEXUS_PROFILE so config loaders and the dev child pick it up, and loads that profile's .env cascade (.env, .env.local, .env.<profile>, .env.<profile>.local) into process.env.

wrnexus dev --profile=uat
@@ -114,13 +136,22 @@ export default config;
  • Orchestrates the rest of the framework: @wrnexus/dev-server (dev/prod server + gateway), @wrnexus/router (route + typed-routes codegen), @wrnexus/compiler (.wrn.ts), @wrnexus/db (migrations, typed queries), @wrnexus/styles (config, profiles, .env, themes, styles), @wrnexus/ui (ejectable Wire UI components), @wrnexus/validation, @wrnexus/csr, and @wrnexus/i18n.
  • Reads wrnexus.config.ts for db / databases, theme, styles, seo, security, i18n, and profiles, and wrnexus.workspace.ts for the gateway.
  • Complete TypeScript API

    This declaration comes from the exact installed package and lists its exported functions, classes, interfaces, and types.

    #!/usr/bin/env bun
    -

    Examples

    Examples are taken from this package's installed documentation and must be evaluated with its requirements and stability notes.

    Example 1

    bun add @wrnexus/cli

    Example 2

    bunx wrnexus dev
    -# or add scripts: "dev": "wrnexus dev .", "build": "wrnexus build ."

    Example 3

    wrnexus dev . --port=8080

    Example 4

    bun dist/server.js   # PORT env var optional
    -# Generated apps also provide: npm start
    -# Build and start together: npm run production
    - +

    Examples

    Examples are taken from this package's installed documentation and must be evaluated with its requirements and stability notes.

    Create and run a single application

    bunx @wrnexus/cli create customer-portal
    +cd customer-portal
    +bun install
    +bun run dev

    Add routes and shared UI to an existing app

    wrnexus generate page reports/monthly
    +wrnexus generate api reports/export
    +wrnexus generate component report-filter
    +wrnexus generate routes

    Create a multi-app workspace and add another app

    wrnexus workspace company-suite
    +cd company-suite
    +wrnexus workspace add reports --domain=reports.localhost
    +bun install
    +wrnexus gateway --port=3000

    Upgrade with migrations and verification

    wrnexus update --latest --dry-run
    +wrnexus update --latest
    +wrnexus doctor
    +
    -
    WRNexusJS 0.2.23 · Private Developer Preview · Bun-native · Documentation generated from installed package APIs.
    +
    WRNexusJS 0.2.24 · Private Developer Preview · Bun-native · Documentation generated from installed package APIs.
    } } diff --git a/app/pages/packages/compiler.wrn b/app/pages/packages/compiler.wrn index 71ba3277..929404e6 100644 --- a/app/pages/packages/compiler.wrn +++ b/app/pages/packages/compiler.wrn @@ -10,12 +10,12 @@ page wrnexuscompiler {
    W WRNexusJS - +
    - -
    Core · Preview

    @wrnexus/compiler

    Parser and code generators for the .wrn language.

    Private registry access required

    This package is not available from the public npm registry. After WorkRoot approves access and supplies private registry instructions, install the release-aligned package:

    bun add @wrnexus/compiler@0.2.23

    Request preview access. Never put registry tokens in source control.

    Compiler for the .wrn language — tokenizes, parses, and lowers .wrn page and component files to TypeScript.
    + +
    Core · Preview

    @wrnexus/compiler

    Parser and code generators for the .wrn language.

    Private registry access required

    This package is not available from the public npm registry. After WorkRoot approves access and supplies private registry instructions, install the release-aligned package:

    bun add @wrnexus/compiler@0.2.24

    Request preview access. Never put registry tokens in source control.

    Compiler for the .wrn language — tokenizes, parses, and lowers .wrn page and component files to TypeScript.

    Part of the WRNexusJS framework — an SSR-first, Bun-native full-stack web framework.

    Overview

    @wrnexus/compiler turns .wrn source into TypeScript that targets the framework's runtime primitives. A .wrn file declares either a page (a route) or a component (a reusable, prop-driven fragment) with blocks for state, view (plain HTML), seo, style, functions, api, ssr/client data bindings, and realtime websocket handlers. The pipeline is source → Lexer → parse() → PageAst → generate() → TypeScript. It is a build/server-side library — the WRNexusJS dev loader calls it to compile .wrn files on the fly, surfacing ParseError as a readable error page.

    @@ -329,19 +329,7 @@ declare function compileWireFile(source: string): string; declare function compile(source: string): CompileResult; export { type ApiBlock, type Attr, type CompileResult, type DataApiBlock, type DataMode, LexError, Lexer, type ModeFunctionsBlock, NativeCompileError, type PageAst, ParseError, type RealtimeBlock, type SeoBlock, type StateDecl, type ViewNode, compile, compileNativeWireFile, compileWireFile, generate, generateNative, parse }; -

    Examples

    Examples are taken from this package's installed documentation and must be evaluated with its requirements and stability notes.

    Example 1

    bun add @wrnexus/compiler

    Example 2

    interface CompileResult {
    -  code: string;
    -  ast: PageAst;
    -  diagnostics: string[];
    -}

    Example 3

    class Lexer {
    -  pos: number;
    -  constructor(src: string);
    -  next(): Token; // consume next structural token
    -  peek(): Token; // look ahead without consuming
    -  readPath(): string; // route path, e.g. /users/[id]
    -  readToLineEnd(): string; // rest of line (state/prop initializers)
    -  readBalancedBraces(): string; // inner text of a { ... } block, string-aware
    -}

    Example 4

    import { compileWireFile } from "@wrnexus/compiler";
    +

    Examples

    Examples are taken from this package's installed documentation and must be evaluated with its requirements and stability notes.

    Compile a page

    import { compileWireFile } from "@wrnexus/compiler";
     
     const ts = compileWireFile(`
     page Home {
    @@ -353,10 +341,25 @@ page Home {
     }
     `);
     // ts is a TypeScript module: exports `meta`, and a default page component
    -// returning an HTML string, wrapped in a data-scope for the reactive runtime.
    +// returning an HTML string, wrapped in a data-scope for the reactive runtime.

    Inspect the AST and diagnostics

    import { compile, ParseError } from "@wrnexus/compiler";
    +
    +try {
    +  const { code, ast, diagnostics } = compile(source);
    +  console.log(ast.kind, ast.name, ast.states.length);
    +} catch (err) {
    +  if (err instanceof ParseError) console.error(err.message);
    +}

    Drive the parse/codegen stages directly

    import { parse, generate } from "@wrnexus/compiler";
    +
    +const ast = parse(componentSource); // ast.kind === "component"
    +const module = generate(ast); // exports render(props) + __wrnexusComponent

    Use the lexer standalone

    import { Lexer } from "@wrnexus/compiler";
    +
    +const lx = new Lexer("page Home {");
    +lx.next(); // { type: "ident", value: "page", pos: 0 }
    +lx.next(); // { type: "ident", value: "Home", pos: 5 }
    +lx.next(); // { type: "lbrace", value: "{", pos: 10 }
    -
    WRNexusJS 0.2.23 · Private Developer Preview · Bun-native · Documentation generated from installed package APIs.
    +
    WRNexusJS 0.2.24 · Private Developer Preview · Bun-native · Documentation generated from installed package APIs.
    } } diff --git a/app/pages/packages/core.wrn b/app/pages/packages/core.wrn index de91a8a8..2a6b0c42 100644 --- a/app/pages/packages/core.wrn +++ b/app/pages/packages/core.wrn @@ -10,12 +10,12 @@ page wrnexuscore {
    W WRNexusJS - +
    - -
    Core · Preview

    @wrnexus/core

    Contexts, middleware, security, sessions, caching, JSX, and realtime.

    Private registry access required

    This package is not available from the public npm registry. After WorkRoot approves access and supplies private registry instructions, install the release-aligned package:

    bun add @wrnexus/core@0.2.23

    Request preview access. Never put registry tokens in source control.

    The framework core: the request Context, middleware contract, and the security, session, caching, streaming, realtime, and JSX primitives every other WRNexusJS package builds on.
    + +
    Core · Preview

    @wrnexus/core

    Contexts, middleware, security, sessions, caching, JSX, and realtime.

    Private registry access required

    This package is not available from the public npm registry. After WorkRoot approves access and supplies private registry instructions, install the release-aligned package:

    bun add @wrnexus/core@0.2.24

    Request preview access. Never put registry tokens in source control.

    The framework core: the request Context, middleware contract, and the security, session, caching, streaming, realtime, and JSX primitives every other WRNexusJS package builds on.

    Part of the WRNexusJS framework — an SSR-first, Bun-native full-stack web framework.

    Overview

    @wrnexus/core is the shared foundation of WRNexusJS. It defines the Context object that flows through every middleware, page, and API route, plus the Middleware/Next contract they implement. On top of that it ships the building blocks a real app needs: cookie-backed sessions, password auth, CSRF protection, rate limiting, request logging, HTTP + in-memory caching, file uploads, streaming/SSE responses, WebSocket "rooms", security headers/CORS, and a server-side JSX runtime that renders to HTML strings. Everything here is server-side and Bun-native (it uses Bun.password, Bun.write, the web-standard Request/Response, and crypto). You depend on it directly and transitively through the rest of the framework.

    @@ -927,13 +927,7 @@ declare function resolveRequestUrl(req: Request, trustProxy?: boolean): URL; declare function withSecurityHeaders(req: Request, res: Response, mode: Mode, security?: SecurityConfig, nonce?: string): Response; export { type AsyncSessionBackend, type Bucket, CSRF_COOKIE, CSRF_HEADER, type CacheControlOptions, type ContentSecurityPolicyConfig, type Context, type CookieOptions, type CookieStore, type CorsConfig, type CorsOrigin, type CspDirectiveValue, type HstsConfig, type LocalStorageSnapshot, type Middleware, type Mode, type Next, type PageComponent, type PageMeta, type PermissionsPolicyConfig, type RateLimitOptions, type RateLimitStore, type RawSocket, type RealtimeBridge, type RealtimeBus, type RealtimeConnectMeta, type RealtimeEnvelope, type RealtimeHandler, type RealtimeRegistry, type RealtimeSocket, type RequestLoggerOptions, type RequestRecord, type RequireAuthOptions, type Room, type RoomAuthInfo, type RoomClient, type RoomDefinition, type RoomHandlers, SESSION_USER_KEY, type SaveUploadOptions, type SavedUpload, type SecurityConfig, type SeoConfig, type ServerSentEvent, type SessionBackend, type SessionEntry, type SessionStore, type StreamResponseInit, type TFunction, TTLCache, type Target, type TrustedTypesConfig, UploadError, bridgeRealtime, cacheControl, collectUploads, createContext, createCorsPreflightResponse, createRealtimeRegistry, csrfProtection, csrfToken, defaultKey, defineRoom, escapeHtml, etag, getUser, hashPassword, isRoomDefinition, isSafeIslandName, isSafeRequestPath, isWebSocketOriginAllowed, loadSession, logIn, logOut, notModified, peerKey, proxyKey, rateLimit, renderDevError, renderError, renderNotFound, renderProdError, renderStatusPage, requestLogger, requireAuth, resolveRequestUrl, sanitizeFilename, saveUpload, sessionAuth, setSessionBackend, sse, streamResponse, verifyCsrf, verifyPassword, withCacheControl, withContextHeaders, withSecurityHeaders }; -

    Examples

    Examples are taken from this package's installed documentation and must be evaluated with its requirements and stability notes.

    Example 1

    bun add @wrnexus/core

    Example 2

    // tsconfig.json
    -{
    -  "compilerOptions": {
    -    "jsx": "react-jsx",
    -    "jsxImportSource": "@wrnexus/core",
    -  },
    -}

    Example 3

    import {
    +

    Examples

    Examples are taken from this package's installed documentation and must be evaluated with its requirements and stability notes.

    A minimal middleware chain

    import {
       createContext,
       withContextHeaders,
       sessionAuth,
    @@ -950,7 +944,7 @@ const chain: Middleware[] = [
       csrfProtection(),
       sessionAuth(),
       requireAuth({ loginPath: "/login" }),
    -];

    Example 4

    import { hashPassword, verifyPassword, logIn, getUser } from "@wrnexus/core";
    +];

    Password auth

    import { hashPassword, verifyPassword, logIn, getUser } from "@wrnexus/core";
     
     // Registration
     const passwordHash = await hashPassword(form.password);
    @@ -960,10 +954,43 @@ if (await verifyPassword(form.password, user.passwordHash)) {
       logIn(ctx, { id: user.id, email: user.email });
     }
     
    -const current = getUser<{ id: string }>(ctx); // or null
    +const current = getUser<{ id: string }>(ctx); // or null

    HTTP caching with ETags

    import { etag, notModified, withCacheControl } from "@wrnexus/core";
    +
    +const body = JSON.stringify(data);
    +const tag = etag(body);
    +if (notModified(ctx.req, tag)) {
    +  return new Response(null, { status: 304, headers: { ETag: tag } });
    +}
    +const res = new Response(body, { headers: { ETag: tag, "content-type": "application/json" } });
    +return withCacheControl(res, { maxAge: 60, staleWhileRevalidate: 300 });

    Streaming SSE

    import { sse } from "@wrnexus/core";
    +
    +async function* ticks() {
    +  for (let n = 0; ; n++) {
    +    yield { event: "tick", data: String(n) };
    +    await Bun.sleep(1000);
    +  }
    +}
    +export default (ctx) => sse(ticks());

    A realtime room

    // app/realtime/chat.ts
    +import { defineRoom } from "@wrnexus/core";
    +
    +export default defineRoom({
    +  authorize: (info) => !!info.user, // require auth
    +  onConnect(client) {
    +    client.user = client.query.user;
    +    client.room.broadcast({ type: "join", id: client.id });
    +  },
    +  onMessage(client, msg) {
    +    client.broadcast({ type: "say", from: client.id, text: msg.text });
    +  },
    +});

    A realtime room

    import { createRealtimeRegistry, bridgeRealtime } from "@wrnexus/core";
    +import { createPubSub } from "@wrnexus/pubsub";
    +import { redisDriver } from "@wrnexus/pubsub/redis";
    +
    +const registry = createRealtimeRegistry();
    +bridgeRealtime(registry, createPubSub(redisDriver(process.env.REDIS_URL)));
    -
    WRNexusJS 0.2.23 · Private Developer Preview · Bun-native · Documentation generated from installed package APIs.
    +
    WRNexusJS 0.2.24 · Private Developer Preview · Bun-native · Documentation generated from installed package APIs.
    } } diff --git a/app/pages/packages/csr.wrn b/app/pages/packages/csr.wrn index b7ec38b1..e0e8762d 100644 --- a/app/pages/packages/csr.wrn +++ b/app/pages/packages/csr.wrn @@ -10,12 +10,12 @@ page wrnexuscsr {
    W WRNexusJS - +
    - -
    Frontend · Preview

    @wrnexus/csr

    Reactive, navigation, and realtime browser runtimes.

    Private registry access required

    This package is not available from the public npm registry. After WorkRoot approves access and supplies private registry instructions, install the release-aligned package:

    bun add @wrnexus/csr@0.2.23

    Request preview access. Never put registry tokens in source control.

    The browser-side client runtime for WRNexusJS — generic, self-contained JS that hydrates server-rendered pages with reactivity, client-side navigation, and realtime rooms.
    + +
    Frontend · Preview

    @wrnexus/csr

    Reactive, navigation, and realtime browser runtimes.

    Private registry access required

    This package is not available from the public npm registry. After WorkRoot approves access and supplies private registry instructions, install the release-aligned package:

    bun add @wrnexus/csr@0.2.24

    Request preview access. Never put registry tokens in source control.

    The browser-side client runtime for WRNexusJS — generic, self-contained JS that hydrates server-rendered pages with reactivity, client-side navigation, and realtime rooms.

    Part of the WRNexusJS framework — an SSR-first, Bun-native full-stack web framework.

    Overview

    @wrnexus/csr holds the three client runtimes that WRNexusJS serves to the browser. Components are authored as .wrn files and rendered on the server; this package provides the single, generic runtime that hydrates that HTML in the browser — there are no per-component browser bundles. Each runtime is exported as a plain-JS string (no build step, no imports) intended to be served verbatim from a well-known URL:

    @@ -197,18 +197,7 @@ declare function getNavRuntime(): string; declare function getRealtimeRuntime(): string; export { NAV_RUNTIME, REACTIVE_RUNTIME, REALTIME_RUNTIME, getNavRuntime, getReactiveRuntime, getRealtimeRuntime }; -

    Examples

    Examples are taken from this package's installed documentation and must be evaluated with its requirements and stability notes.

    Example 1

    bun add @wrnexus/csr

    Example 2

    getReactiveRuntime(): string   // → REACTIVE_RUNTIME
    -getNavRuntime(): string        // → NAV_RUNTIME
    -getRealtimeRuntime(): string   // → REALTIME_RUNTIME

    Example 3

    wire.room(name): Room          // open (or reuse) a room connection
    -wire.bindRooms(root?)          // (re)bind declarative [data-room] containers
    -
    -interface Room {
    -  name: string;
    -  send(obj: object | string): Room;         // JSON-stringifies objects; queues until open
    -  on(type: string, cb): Room;               // filter by msg.type; "*" or a fn = all messages
    -  on(cb): Room;
    -  close(): Room;
    -}

    Example 4

    import { getReactiveRuntime, getNavRuntime, getRealtimeRuntime } from "@wrnexus/csr";
    +

    Examples

    Examples are taken from this package's installed documentation and must be evaluated with its requirements and stability notes.

    Server side — serve the runtime strings from your router (example with Bun.serve)

    import { getReactiveRuntime, getNavRuntime, getRealtimeRuntime } from "@wrnexus/csr";
     
     const routes: Record<string, string> = {
       "/__wrnexus/reactive.js": getReactiveRuntime(),
    @@ -226,10 +215,27 @@ Bun.serve({
         }
         return new Response("Not found", { status: 404 });
       },
    -});
    +});

    Browser side — server-rendered HTML that the reactive runtime hydrates

    <div data-scope="count: 0">
    +  <button data-on-click="count++">+1</button>
    +  <span data-text="count"></span>
    +  <p>Total: {{count}}</p>
    +</div>
    +<script src="/__wrnexus/reactive.js"></script>

    A realtime chat, fully declarative

    <div data-room="lobby" data-room-user="ada">
    +  <div data-room-status></div>
    +  <ul data-room-log></ul>
    +  <template data-room-item="chat"><li>%user%: %text%</li></template>
    +  <form data-room-send>
    +    <input name="text" data-room-reset />
    +    <input type="hidden" name="type" value="chat" />
    +    <button>Send</button>
    +  </form>
    +</div>
    +<script src="/__wrnexus/realtime.js"></script>

    Or drive a room from code

    const room = wire.room("lobby");
    +room.on("chat", (msg) => console.log(msg.user, msg.text));
    +room.send({ type: "chat", user: "ada", text: "hi" });
    -
    WRNexusJS 0.2.23 · Private Developer Preview · Bun-native · Documentation generated from installed package APIs.
    +
    WRNexusJS 0.2.24 · Private Developer Preview · Bun-native · Documentation generated from installed package APIs.
    } } diff --git a/app/pages/packages/db.wrn b/app/pages/packages/db.wrn index 704ee8b3..91a9c3c8 100644 --- a/app/pages/packages/db.wrn +++ b/app/pages/packages/db.wrn @@ -10,12 +10,12 @@ page wrnexusdb {
    W WRNexusJS - +
    - -
    Data · Preview

    @wrnexus/db

    Database adapters, typed queries, models, migrations, and sessions.

    Private registry access required

    This package is not available from the public npm registry. After WorkRoot approves access and supplies private registry instructions, install the release-aligned package:

    bun add @wrnexus/db@0.2.23

    Request preview access. Never put registry tokens in source control.

    The database layer for WRNexusJS: TS models as the single source of truth for DDL, validation, and result typing, plus a driver-based Db client, migrations, and a sqlc-style query generator.
    + +
    Data · Preview

    @wrnexus/db

    Database adapters, typed queries, models, migrations, and sessions.

    Private registry access required

    This package is not available from the public npm registry. After WorkRoot approves access and supplies private registry instructions, install the release-aligned package:

    bun add @wrnexus/db@0.2.24

    Request preview access. Never put registry tokens in source control.

    The database layer for WRNexusJS: TS models as the single source of truth for DDL, validation, and result typing, plus a driver-based Db client, migrations, and a sqlc-style query generator.

    Part of the WRNexusJS framework — an SSR-first, Bun-native full-stack web framework.

    Overview

    @wrnexus/db is the server-side data layer. You describe tables as TypeScript models (the v column builder + table()); those models drive migrations, coerce raw DB rows into typed objects, and feed the query generator. A thin Driver interface is implemented by adapters for SQLite (bun:sqlite), Postgres/MySQL (Bun.SQL), and MongoDB. The Db client adds ergonomics — model-mapped all/one, transactions, createTable, pagination, and batched relation loading. A process-wide registry (getDb/setDb) exposes configured connections to pages and API routes. Reach for it whenever a WRNexusJS app needs persistence.

    @@ -303,20 +303,45 @@ interface RelationOptions<C> { declare function loadRelated<P extends Row, C extends Row = Row>(db: Db, parents: P[], opts: RelationOptions<C>): Promise<(P & Record<string, C | C[] | null>)[]>; export { Db, Dialect, type Migration, Model, type ModelRef, type PageOptions, type Paginated, type QueryDef, type QueryKind, type RelationOptions, Row, appliedMigrations, closeDatabases, databaseNames, generateQueriesFile, getDb, hasDb, loadMigrations, loadRelated, migrate, paginate, parseMigration, parseQueries, registerDb, rollback, scaffoldMigration, setDb, status }; -

    Examples

    Examples are taken from this package's installed documentation and must be evaluated with its requirements and stability notes.

    Example 1

    bun add @wrnexus/db

    Example 2

    import { v, table } from "@wrnexus/db";
    +

    Examples

    Examples are taken from this package's installed documentation and must be evaluated with its requirements and stability notes.

    Define models, connect, create tables, and query with typed results

    import { v, table, createDb } from "@wrnexus/db";
    +import { sqlite } from "@wrnexus/db/sqlite";
     
    -const users = table("users", {
    -  id: v.id(), // auto-increment primary key
    +const users = table<{ id: number; email: string; name: string | null }>("users", {
    +  id: v.id(),
       email: v.text().unique(),
    -  name: v.text().optional(), // NULLable
    -  age: v.int().default(0),
    -  active: v.bool().default(true),
    -  createdAt: v.timestamp().default("now"), // CURRENT_TIMESTAMP
    -});

    Example 3

    createDb(driver: Driver): Db

    Example 4

    const users = await getDb().all("SELECT * FROM users");
    -const events = await getDb("analytics").all("SELECT * FROM hits");
    + name: v.text().optional(), + createdAt: v.timestamp().default("now"), +}); + +const db = createDb(sqlite("file:./dev.db")); +await db.createTable(users); + +await db.exec("INSERT INTO users (email) VALUES (?)", ["a@b.com"]); +const list = await db.all("SELECT * FROM users", [], users); // rows typed + coerced +const one = await db.one("SELECT * FROM users WHERE id = ?", [1], users); + +await db.tx(async (tx) => { + await tx.exec("UPDATE users SET name = ? WHERE id = ?", ["Ada", 1]); +});

    Resolve a config to a live SQL Db, and register it

    import { connectFromConfig } from "@wrnexus/db/connect";
    +import { setDb, getDb } from "@wrnexus/db";
    +
    +setDb(connectFromConfig({ driver: "sqlite", url: "file:./dev.db" }, process.cwd()));
    +const rows = await getDb().all("SELECT * FROM users");

    Run migrations and paginate

    import { migrate, paginate } from "@wrnexus/db";
    +
    +await migrate(db, "app/db/migrations");
    +const pageTwo = await paginate(
    +  db,
    +  { sql: "SELECT * FROM users ORDER BY id", model: users },
    +  { page: 2 },
    +);

    MongoDB (document API)

    import { mongo } from "@wrnexus/db/mongo";
    +
    +const mdb = await mongo(process.env.MONGO_URL!, "app");
    +const repo = mdb.collection(users);
    +await repo.insert({ email: "a@b.com" });
    +const active = await repo.find({ active: true });
    -
    WRNexusJS 0.2.23 · Private Developer Preview · Bun-native · Documentation generated from installed package APIs.
    +
    WRNexusJS 0.2.24 · Private Developer Preview · Bun-native · Documentation generated from installed package APIs.
    } } diff --git a/app/pages/packages/dev-server.wrn b/app/pages/packages/dev-server.wrn index 46b64f76..c0d24b2e 100644 --- a/app/pages/packages/dev-server.wrn +++ b/app/pages/packages/dev-server.wrn @@ -10,12 +10,12 @@ page wrnexusdevserver {
    W WRNexusJS - +
    - -
    Runtime · Preview

    @wrnexus/dev-server

    Development and production servers, HMR, assets, and gateways.

    Private registry access required

    This package is not available from the public npm registry. After WorkRoot approves access and supplies private registry instructions, install the release-aligned package:

    bun add @wrnexus/dev-server@0.2.23

    Request preview access. Never put registry tokens in source control.

    The WRNexusJS HTTP + WebSocket server runtime — request dispatch, SSR document assembly, live-reload (HMR), and the portable production handler.
    + +
    Runtime · Preview

    @wrnexus/dev-server

    Development and production servers, HMR, assets, and gateways.

    Private registry access required

    This package is not available from the public npm registry. After WorkRoot approves access and supplies private registry instructions, install the release-aligned package:

    bun add @wrnexus/dev-server@0.2.24

    Request preview access. Never put registry tokens in source control.

    The WRNexusJS HTTP + WebSocket server runtime — request dispatch, SSR document assembly, live-reload (HMR), and the portable production handler.

    Part of the WRNexusJS framework — an SSR-first, Bun-native full-stack web framework.

    Overview

    This package is the server runtime that powers a WRNexusJS app in both development and production. A single request runtime (createHandlers) owns HTTP/WebSocket dispatch and SSR document assembly; it knows nothing about _how_ modules and assets are produced, so the dev and prod entry points wire in different backends: dev uses dynamic module loading plus on-the-fly bundling and injects a live-reload client; prod uses a static, pre-built manifest with cache-immutable assets. The package also ships a multi-app gateway (route several apps by Host header behind one port) and a portable node:http adapter for WinterCG hosts. It is entirely server-side and Bun-native (Bun.serve, Bun.file, Bun.gzipSync).

    @@ -652,88 +652,47 @@ interface RunningServer { declare function startServer(opts: ServeOptions): Promise<RunningServer>; export { type AssetServer, type FetchHandler, type GatewayApp, type GatewayAuth, type GatewayOptions, type GatewaySecurity, RESTART_EXIT_CODE, type RunningGateway, type RunningServer, type RuntimeDeps, type ServeOptions, type WsData, createHandlers, createProductionHandlers, createProductionServer, nodeListener, serveNode, startGateway, startServer, toRequest, writeResponse }; -

    Examples

    Examples are taken from this package's installed documentation and must be evaluated with its requirements and stability notes.

    Example 1

    bun add @wrnexus/dev-server

    Example 2

    interface ServeOptions {
    -  appDir: string; // absolute/relative path to the app/ dir
    -  port?: number; // default 3000
    -  hostname?: string; // default "localhost"
    -  mode?: Mode; // "development" | "production"; default "development"
    -  hmr?: boolean; // inject live-reload client; default (mode === "development")
    -  styleEntry?: string | null; // resolved absolute path to the global CSS entry
    -  stylesConfig?: StylesConfig; // custom styles processor (e.g. Tailwind/PostCSS)
    -  head?: string; // raw HTML appended to every page <head>
    -  seo?: SeoConfig; // global SEO defaults
    -  security?: SecurityConfig; // security headers + CORS policy
    -  theme?: ThemeConfig; // design-token theme (merged over built-in light/dark)
    -  i18n?: I18nConfig; // default language + supported locales
    -  db?: { driver: string; url: string }; // default db → getDb(); dev auto-migrates
    -  databases?: Record<string, { driver: string; url: string }>; // named dbs → getDb("<name>")
    -  realtime?: { scale?: boolean; redisUrl?: string }; // bridge rooms over Redis across processes
    -}
    +

    Examples

    Examples are taken from this package's installed documentation and must be evaluated with its requirements and stability notes.

    Programmatic dev server

    import { startServer } from "@wrnexus/dev-server";
     
    -interface RunningServer {
    -  port: number;
    -  hostname: string;
    -  url: string;
    -  router: Router;
    -  stop(): void;
    -}

    Example 3

    interface RuntimeDeps {
    -  mode: Mode;
    -  hmr: boolean; // inject the live-reload client into pages
    -  router: Router;
    -  loadModule(file: string): Promise<Record<string, unknown>>;
    -  getMiddleware(): Promise<Middleware[]>;
    -  assets: AssetServer; // serves /__wrnexus/* (islands, reactive, hmr)
    -  hasStyles?: boolean; // inject the global stylesheet link
    -  hasUi?: boolean; // inject the Wire UI stylesheet (/__wrnexus/ui.css)
    -  theme?: ResolvedTheme; // enables /__wrnexus/theme.css + <html data-theme>
    -  i18n?: ResolvedI18n; // enables ctx.t, <html lang>, {t:key} markers
    -  inlineStyles?: string; // inline small prod stylesheets into <head>
    -  assetVersion?: string; // cache-busting ?v= on framework asset URLs
    -  head?: string; // raw HTML appended to every page <head>
    -  seo?: SeoConfig;
    -  security?: SecurityConfig;
    -  maxBodyBytes?: number; // 413 above this; default 10 MB
    -  hub?: HmrHub; // browser HMR sockets (dev only)
    -  realtimeBus?: RealtimeBus; // cross-process room bridge (Redis pub/sub)
    -}
    +const server = await startServer({
    +  appDir: "./app",
    +  port: 3000,
    +  mode: "development",
    +  theme: {/* design tokens */},
    +  db: { driver: "sqlite", url: "file:./data/app.db" },
    +});
     
    -interface Handlers {
    -  fetch(req: Request, server: UpgradeServer): Promise<Response | undefined>;
    -  websocket: { open; message; close; drain };
    -}

    Example 4

    interface ProdManifest {
    -  pages: { raw: string; mod: RouteModule }[];
    -  api: { raw: string; mod: RouteModule }[];
    -  realtime: { raw: string; mod: RouteModule }[];
    -  middleware: Middleware[];
    -  components: { name: string; mod: RouteModule }[];
    -  layouts: { name: string; mod: RouteModule }[];
    -}
    +console.log(`Running at ${server.url}`);
    +// server.stop();

    Production server from a build manifest

    import { createProductionServer } from "@wrnexus/dev-server";
    +import { manifest } from "./dist/manifest.js"; // generated by `wrnexus build`
     
    -interface ProdOptions {
    -  stylesPath?: string;
    -  inlineStyles?: string;
    -  reactivePath?: string;
    -  themePath?: string;
    -  themeJsPath?: string;
    -  theme?: ResolvedTheme;
    -  uiCssPath?: string;
    -  schemasJs?: string;
    -  i18n?: ResolvedI18n;
    -  db?: { driver: string; url: string };
    -  databases?: Record<string, { driver: string; url: string }>;
    -  realtime?: { scale?: boolean; redisUrl?: string };
    -  assetVersion?: string;
    -  publicDir?: string;
    -  head?: string;
    -  seo?: SeoConfig;
    -  security?: SecurityConfig;
    -  port?: number;
    -  hostname?: string;
    -  maxBodyBytes?: number;
    -}
    +createProductionServer(manifest, { + stylesPath: "./dist/styles.css", + reactivePath: "./dist/reactive.js", + assetVersion: process.env.BUILD_ID, + db: { driver: "postgres", url: process.env.DATABASE_URL! }, + port: Number(process.env.PORT) || 3000, +});

    Embedding the handler on node:http

    import { createProductionHandlers, serveNode } from "@wrnexus/dev-server";
    +
    +const handlers = createProductionHandlers(manifest, opts);
    +await serveNode(handlers.fetch, { port: 8080 });

    Multi-app gateway

    import { startGateway } from "@wrnexus/dev-server";
    +
    +await startGateway({
    +  port: 3000,
    +  apps: [
    +    { name: "web", dir: "./apps/web", domains: ["localhost", "web.localhost"] },
    +    {
    +      name: "admin",
    +      dir: "./apps/admin",
    +      domains: ["admin.localhost"],
    +      auth: { basic: { user: "root", pass: "s3cret" } },
    +    },
    +  ],
    +  security: { trustedHostsOnly: true, rateLimit: { max: 600 } },
    +});
    -
    WRNexusJS 0.2.23 · Private Developer Preview · Bun-native · Documentation generated from installed package APIs.
    +
    WRNexusJS 0.2.24 · Private Developer Preview · Bun-native · Documentation generated from installed package APIs.
    } } diff --git a/app/pages/packages/encryption.wrn b/app/pages/packages/encryption.wrn index e4aaefee..45fdc63f 100644 --- a/app/pages/packages/encryption.wrn +++ b/app/pages/packages/encryption.wrn @@ -10,12 +10,12 @@ page wrnexusencryption {
    W WRNexusJS - +
    - -
    Security · Preview

    @wrnexus/encryption

    Hashing, HMAC, authenticated encryption, and key derivation.

    Private registry access required

    This package is not available from the public npm registry. After WorkRoot approves access and supplies private registry instructions, install the release-aligned package:

    bun add @wrnexus/encryption@0.2.23

    Request preview access. Never put registry tokens in source control.

    Dependency-free crypto helpers for WRNexusJS: authenticated symmetric encryption (AES-256-GCM), hashing, and HMAC signing.
    + +
    Security · Preview

    @wrnexus/encryption

    Hashing, HMAC, authenticated encryption, and key derivation.

    Private registry access required

    This package is not available from the public npm registry. After WorkRoot approves access and supplies private registry instructions, install the release-aligned package:

    bun add @wrnexus/encryption@0.2.24

    Request preview access. Never put registry tokens in source control.

    Dependency-free crypto helpers for WRNexusJS: authenticated symmetric encryption (AES-256-GCM), hashing, and HMAC signing.

    Part of the WRNexusJS framework — an SSR-first, Bun-native full-stack web framework.

    Overview

    This package provides small, focused cryptographic primitives for server-side use: encrypting secrets/tokens/database fields at rest with AES-256-GCM, deriving keys from passwords via PBKDF2, computing SHA-256 digests, and signing/verifying payloads with HMAC-SHA256. It is built entirely on the standard Web Crypto API (crypto.subtle) plus btoa/atob and TextEncoder/TextDecoder — no third-party dependencies. Reach for it whenever you need to protect sensitive values or verify webhook signatures. All functions are async (Web Crypto is promise-based).

    @@ -91,15 +91,15 @@ declare function decrypt(payload: string, key: string): Promise<string>; declare function deriveKey(password: string, salt: string): Promise<string>; export { decrypt, deriveKey, encrypt, generateKey, hmacSign, hmacVerify, sha256 }; -

    Examples

    Examples are taken from this package's installed documentation and must be evaluated with its requirements and stability notes.

    Example 1

    bun add @wrnexus/encryption

    Example 2

    import { generateKey, encrypt, decrypt } from "@wrnexus/encryption";
    +

    Examples

    Examples are taken from this package's installed documentation and must be evaluated with its requirements and stability notes.

    Symmetric encryption of a secret at rest

    import { generateKey, encrypt, decrypt } from "@wrnexus/encryption";
     
     const key = await generateKey(); // store this safely (env/secret manager)
     
     const box = await encrypt("card #1234", key); // opaque base64 string, safe to persist
    -const plain = await decrypt(box, key); // "card #1234"

    Example 3

    import { deriveKey, encrypt } from "@wrnexus/encryption";
    +const plain = await decrypt(box, key); // "card #1234"

    Deriving a key from a user password instead of a random key

    import { deriveKey, encrypt } from "@wrnexus/encryption";
     
     const key = await deriveKey("correct horse battery staple", "per-user-salt");
    -const box = await encrypt("secret note", key);

    Example 4

    import { sha256, hmacSign, hmacVerify } from "@wrnexus/encryption";
    +const box = await encrypt("secret note", key);

    Hashing and webhook signature verification

    import { sha256, hmacSign, hmacVerify } from "@wrnexus/encryption";
     
     const digest = await sha256("some content"); // 64-char hex string
     
    @@ -108,7 +108,7 @@ const ok = await hmacVerify(rawBody, webhookSecret, incomingSignatureHeader);
     if (!ok) throw new Error("Invalid webhook signature");
    -
    WRNexusJS 0.2.23 · Private Developer Preview · Bun-native · Documentation generated from installed package APIs.
    +
    WRNexusJS 0.2.24 · Private Developer Preview · Bun-native · Documentation generated from installed package APIs.
    } } diff --git a/app/pages/packages/helpers.wrn b/app/pages/packages/helpers.wrn index 6bca06fc..687136d5 100644 --- a/app/pages/packages/helpers.wrn +++ b/app/pages/packages/helpers.wrn @@ -10,15 +10,16 @@ page wrnexushelpers {
    W WRNexusJS - +
    - -
    Tooling · Preview

    @wrnexus/helpers

    Safe Context URL helpers and forward-auth login redirects.

    Private registry access required

    This package is not available from the public npm registry. After WorkRoot approves access and supplies private registry instructions, install the release-aligned package:

    bun add @wrnexus/helpers@0.2.23

    Request preview access. Never put registry tokens in source control.

    Safe convenience helpers for common WRNexusJS application flows. The package uses standard Context, URL, and Response values and has no runtime dependency beyond @wrnexus/core.

    + +
    Tooling · Preview

    @wrnexus/helpers

    Safe Context URL helpers and forward-auth login redirects.

    Private registry access required

    This package is not available from the public npm registry. After WorkRoot approves access and supplies private registry instructions, install the release-aligned package:

    bun add @wrnexus/helpers@0.2.24

    Request preview access. Never put registry tokens in source control.

    Safe convenience helpers for common WRNexusJS application flows. The package uses standard Context, URL, and Response values and has no runtime dependency beyond @wrnexus/core.

    bun add @wrnexus/helpers

    The package is private, so the machine must be authenticated to the wrnexus npm organization.

    -

    Forward-auth login redirects

    +

    Usage

    +

    Redirect an unauthenticated forward-auth request

    The gateway calls an SSO verifier on a different URL from the original application. These helpers reconstruct the original URL from the gateway headers and safely place it in the login redirect:

    import type { Context } from "@wrnexus/core";
     import { redirectToLogin } from "@wrnexus/helpers";
    @@ -34,9 +35,22 @@ export const GET = async (ctx: Context) => {
     };

    This creates a response such as:

    Location: http://sso.localhost:3000/login?returnTo=http%3A%2F%2Fadmin.localhost%3A3000%2F
    -

    Always list the application hosts that are valid redirect destinations. Forwarded host headers are rejected when allowedHosts is absent or does not match, preventing an open redirect. A callback can support dynamic tenant domains:

    +

    Always list the application hosts that are valid redirect destinations. Forwarded host headers are rejected when allowedHosts is absent or does not match, preventing an open redirect.

    The SSO hostname is the login destination, not an allowedHosts entry. For example, when protecting admin.localhost:3000, keep admin.localhost:3000 in the allowlist even though the verifier runs at sso.localhost:3000. WRNexus preserves both hosts across a nested gateway request.

    -
    allowedHosts: (host) => host.endsWith(".example.test");
    +

    Support dynamic tenant domains

    +
    import type { Context } from "@wrnexus/core";
    +import { getOriginalRequestOrigin, redirectToLogin } from "@wrnexus/helpers";
    +
    +export const GET = async (ctx: Context) => {
    +  const allowedHosts = (host: string) => host === "example.test" || host.endsWith(".example.test");
    +
    +  console.info("Authentication requested by", getOriginalRequestOrigin(ctx, { allowedHosts }));
    +  return redirectToLogin(ctx, "https://auth.example.test/login", {
    +    allowedHosts,
    +    returnToParam: "continue",
    +    status: 303,
    +  });
    +};

    API

    • getOriginalRequestUrl(ctx, options): URL — reconstruct the gateway URL.
    • @@ -90,7 +104,7 @@ declare function getOriginalRequestOrigin(ctx: RequestContext, options?: Origina declare function redirectToLogin(ctx: RequestContext, loginUrl: string | URL, options?: LoginRedirectOptions): Response; export { type AllowedHosts, type LoginRedirectOptions, type OriginalRequestOptions, type RequestContext, getOriginalRequestMethod, getOriginalRequestOrigin, getOriginalRequestPath, getOriginalRequestUrl, redirectToLogin }; -

    Examples

    Examples are taken from this package's installed documentation and must be evaluated with its requirements and stability notes.

    Example 1

    bun add @wrnexus/helpers

    Example 2

    import type { Context } from "@wrnexus/core";
    +

    Examples

    Examples are taken from this package's installed documentation and must be evaluated with its requirements and stability notes.

    Redirect an unauthenticated forward-auth request

    import type { Context } from "@wrnexus/core";
     import { redirectToLogin } from "@wrnexus/helpers";
     
     export const GET = async (ctx: Context) => {
    @@ -101,10 +115,22 @@ export const GET = async (ctx: Context) => {
       return redirectToLogin(ctx, "/login", {
         allowedHosts: ["admin.localhost:3000", "reports.localhost:3000"],
       });
    -};

    Example 3

    Location: http://sso.localhost:3000/login?returnTo=http%3A%2F%2Fadmin.localhost%3A3000%2F

    Example 4

    allowedHosts: (host) => host.endsWith(".example.test");
    - +};

    Support dynamic tenant domains

    import type { Context } from "@wrnexus/core";
    +import { getOriginalRequestOrigin, redirectToLogin } from "@wrnexus/helpers";
    +
    +export const GET = async (ctx: Context) => {
    +  const allowedHosts = (host: string) => host === "example.test" || host.endsWith(".example.test");
    +
    +  console.info("Authentication requested by", getOriginalRequestOrigin(ctx, { allowedHosts }));
    +  return redirectToLogin(ctx, "https://auth.example.test/login", {
    +    allowedHosts,
    +    returnToParam: "continue",
    +    status: 303,
    +  });
    +};
    +
    -
    WRNexusJS 0.2.23 · Private Developer Preview · Bun-native · Documentation generated from installed package APIs.
    +
    WRNexusJS 0.2.24 · Private Developer Preview · Bun-native · Documentation generated from installed package APIs.
    } } diff --git a/app/pages/packages/i18n.wrn b/app/pages/packages/i18n.wrn index 51a65027..fb24970b 100644 --- a/app/pages/packages/i18n.wrn +++ b/app/pages/packages/i18n.wrn @@ -10,12 +10,12 @@ page wrnexusi18n {
    W WRNexusJS - +
    - -
    Frontend · Preview

    @wrnexus/i18n

    Translation loading, locale resolution, and Intl formatting.

    Private registry access required

    This package is not available from the public npm registry. After WorkRoot approves access and supplies private registry instructions, install the release-aligned package:

    bun add @wrnexus/i18n@0.2.23

    Request preview access. Never put registry tokens in source control.

    Per-request translations plus locale-aware number, date, and currency formatting for WRNexusJS apps.
    + +
    Frontend · Preview

    @wrnexus/i18n

    Translation loading, locale resolution, and Intl formatting.

    Private registry access required

    This package is not available from the public npm registry. After WorkRoot approves access and supplies private registry instructions, install the release-aligned package:

    bun add @wrnexus/i18n@0.2.24

    Request preview access. Never put registry tokens in source control.

    Per-request translations plus locale-aware number, date, and currency formatting for WRNexusJS apps.

    Part of the WRNexusJS framework — an SSR-first, Bun-native full-stack web framework.

    Overview

    @wrnexus/i18n loads locale files from app/locales/<lang>.json, resolves the active language for each request (cookie → Accept-Language → default), and builds a t(key, params) translator used both in server code and in .wrn views. It also ships Intl-based formatting helpers and a tiny client runtime that wires up a language switcher. Translation lookup, language resolution, and HTML marker rewriting run server-side; only the small I18N_RUNTIME snippet runs in the browser.

    @@ -182,7 +182,7 @@ declare function renderI18nData(i18n: ResolvedI18n, lang: string): string; declare const I18N_RUNTIME: string; export { I18N_JS_HREF, I18N_RUNTIME, type I18nConfig, LANG_COOKIE, type Messages, type ResolvedI18n, formatCurrency, formatDate, formatNumber, formatRelativeTime, loadLocales, makeT, plural, renderI18nData, resolveI18n, resolveLang, translateHtml }; -

    Examples

    Examples are taken from this package's installed documentation and must be evaluated with its requirements and stability notes.

    Example 1

    bun add @wrnexus/i18n

    Example 2

    import {
    +

    Examples

    Examples are taken from this package's installed documentation and must be evaluated with its requirements and stability notes.

    Server: load, resolve, translate

    import {
       loadLocales,
       resolveI18n,
       resolveLang,
    @@ -203,14 +203,36 @@ t("nav.home"); // dotted key → "Home"
     t("greeting", { name: "Ada" }); // "Hello, {name}" → "Hello, Ada"
     
     // After rendering a .wrn view, resolve translation markers in the HTML:
    -const finalHtml = translateHtml(renderedHtml, t);

    Example 3

    {
    +const finalHtml = translateHtml(renderedHtml, t);

    Server: load, resolve, translate

    {
       "nav": { "home": "Home" },
       "greeting": "Hello, {name}"
    -}

    Example 4

    <h1 data-t="nav.home">Home</h1>
    -<input t:placeholder="search.placeholder" />
    +}

    Views: translation markers

    <h1 data-t="nav.home">Home</h1>
    +<input t:placeholder="search.placeholder" />

    Client: language switcher

    import { renderI18nData, I18N_RUNTIME, I18N_JS_HREF } from "@wrnexus/i18n";
    +
    +// In the document <head>:
    +const head = `
    +  <script>${renderI18nData(i18n, lang)}</script>
    +  <script src="${I18N_JS_HREF}"></script>
    +`;
    +
    +// Serve I18N_RUNTIME at I18N_JS_HREF; then in markup:
    +// <button data-wire-lang-set="es">Español</button>
    +// <select data-wire-lang>…</select>

    Formatting

    import {
    +  formatNumber,
    +  formatCurrency,
    +  formatDate,
    +  formatRelativeTime,
    +  plural,
    +} from "@wrnexus/i18n";
    +
    +formatNumber(1234.5, lang); // "1,234.5"
    +formatCurrency(9.99, "USD", lang); // "$9.99"
    +formatDate(Date.now(), lang); // "Jul 4, 2026"
    +formatRelativeTime(-3, "day", lang); // "3 days ago"
    +plural(2, { one: "# item", other: "# items" }, lang); // "2 items"
    -
    WRNexusJS 0.2.23 · Private Developer Preview · Bun-native · Documentation generated from installed package APIs.
    +
    WRNexusJS 0.2.24 · Private Developer Preview · Bun-native · Documentation generated from installed package APIs.
    } } diff --git a/app/pages/packages/jwt.wrn b/app/pages/packages/jwt.wrn index 74d1df4b..96c0fce9 100644 --- a/app/pages/packages/jwt.wrn +++ b/app/pages/packages/jwt.wrn @@ -10,12 +10,12 @@ page wrnexusjwt {
    W WRNexusJS - +
    - -
    Security · Preview

    @wrnexus/jwt

    HS256 JWT signing, verification, and bearer authentication.

    Private registry access required

    This package is not available from the public npm registry. After WorkRoot approves access and supplies private registry instructions, install the release-aligned package:

    bun add @wrnexus/jwt@0.2.23

    Request preview access. Never put registry tokens in source control.

    Dependency-free JSON Web Tokens (HS256) via Web Crypto, plus a bearer-token auth middleware for WRNexusJS.
    + +
    Security · Preview

    @wrnexus/jwt

    HS256 JWT signing, verification, and bearer authentication.

    Private registry access required

    This package is not available from the public npm registry. After WorkRoot approves access and supplies private registry instructions, install the release-aligned package:

    bun add @wrnexus/jwt@0.2.24

    Request preview access. Never put registry tokens in source control.

    Dependency-free JSON Web Tokens (HS256) via Web Crypto, plus a bearer-token auth middleware for WRNexusJS.

    Part of the WRNexusJS framework — an SSR-first, Bun-native full-stack web framework.

    Overview

    @wrnexus/jwt signs and verifies stateless JSON Web Tokens using the HS256 (HMAC-SHA-256) algorithm. It has no runtime dependencies — signing and verification are implemented directly on the standard Web Crypto API (crypto.subtle), which Bun provides natively. It runs server-side and pairs with the session-based auth in @wrnexus/core, giving you a stateless option for API and mobile clients. Reach for it when you need bearer-token auth rather than cookie sessions.

    @@ -139,14 +139,33 @@ interface JwtAuthOptions { declare function jwtAuth(options: JwtAuthOptions): Middleware; export { type JwtAuthOptions, type JwtClaims, JwtError, type SignOptions, jwtAuth, signJwt, verifyJwt }; -

    Examples

    Examples are taken from this package's installed documentation and must be evaluated with its requirements and stability notes.

    Example 1

    bun add @wrnexus/jwt

    Example 2

    function signJwt(payload: JwtClaims, secret: string, options?: SignOptions): Promise<string>;

    Example 3

    function verifyJwt<T extends JwtClaims = JwtClaims>(
    -  token: string,
    -  secret: string,
    -  options?: { now?: number },
    -): Promise<T>;

    Example 4

    function jwtAuth(options: JwtAuthOptions): Middleware;
    +

    Examples

    Examples are taken from this package's installed documentation and must be evaluated with its requirements and stability notes.

    Typical usage

    import { signJwt, verifyJwt, jwtAuth, JwtError } from "@wrnexus/jwt";
    +
    +const secret = process.env.JWT_SECRET!;
    +
    +// Sign a token that expires in one hour
    +const token = await signJwt({ sub: user.id, role: "admin" }, secret, {
    +  expiresIn: 3600,
    +});
    +
    +// Verify it later
    +try {
    +  const claims = await verifyJwt<{ sub: string; role: string }>(token, secret);
    +  console.log(claims.sub, claims.role);
    +} catch (err) {
    +  if (err instanceof JwtError) {
    +    // invalid signature, expired, malformed, etc.
    +  }
    +}

    Protecting routes with the middleware

    import { jwtAuth } from "@wrnexus/jwt";
    +
    +// Require a valid bearer token; ctx.user holds the verified claims
    +app.use(jwtAuth({ secret: process.env.JWT_SECRET! }));
    +
    +// Optional auth — populate ctx.user when present, but don't 401
    +app.use(jwtAuth({ secret: process.env.JWT_SECRET!, required: false }));
    -
    WRNexusJS 0.2.23 · Private Developer Preview · Bun-native · Documentation generated from installed package APIs.
    +
    WRNexusJS 0.2.24 · Private Developer Preview · Bun-native · Documentation generated from installed package APIs.
    } } diff --git a/app/pages/packages/mobile.wrn b/app/pages/packages/mobile.wrn index 0757d929..7f8c93ca 100644 --- a/app/pages/packages/mobile.wrn +++ b/app/pages/packages/mobile.wrn @@ -10,22 +10,64 @@ page wrnexusmobile {
    W WRNexusJS - +
    - -
    Native · Preview

    @wrnexus/mobile

    SSR-safe compatibility access to Capacitor plugins.

    Private registry access required

    This package is not available from the public npm registry. After WorkRoot approves access and supplies private registry instructions, install the release-aligned package:

    bun add @wrnexus/mobile@0.2.23

    Request preview access. Never put registry tokens in source control.

    SSR-safe access to Capacitor plugins from WRNexusJS browser code.

    -
    wrnexus mobile add @capacitor/camera
    -
    import { Camera } from "@capacitor/camera";
    +      
    +      
    Native · Preview

    @wrnexus/mobile

    SSR-safe compatibility access to Capacitor plugins.

    Private registry access required

    This package is not available from the public npm registry. After WorkRoot approves access and supplies private registry instructions, install the release-aligned package:

    bun add @wrnexus/mobile@0.2.24

    Request preview access. Never put registry tokens in source control.

    SSR-safe access to Capacitor plugins from WRNexusJS browser code.
    +

    Overview

    +

    @wrnexus/mobile keeps optional native imports out of server rendering while giving browser-owned modules one consistent registry for Capacitor plugins. During SSR, mobile.isNative() is false and mobile.platform() is "web".

    +

    Install a plugin through the WRNexusJS CLI so the web and native projects stay aligned:

    +
    wrnexus mobile add @capacitor/camera @capacitor/haptics
    +

    Usage

    +

    Register and invoke a Capacitor plugin

    +

    Import Capacitor packages only from browser-owned code, never from API routes or SSR helpers.

    +
    import { Camera, CameraResultType } from "@capacitor/camera";
     import { mobile } from "@wrnexus/mobile";
     
    -if (mobile.isNative()) {
    -  mobile.registerPlugin("Camera", Camera);
    -  const photo = await mobile.invoke("Camera", "getPhoto", { resultType: "uri" });
    +mobile.registerPlugin("Camera", Camera);
    +
    +export async function takePhoto() {
    +  if (!mobile.isNative()) return null;
    +  return mobile.invoke("Camera", "getPhoto", {
    +    quality: 85,
    +    resultType: CameraResultType.Uri,
    +  });
     }
    -

    isNative() is false and platform() is web during SSR. plugin() returns undefined when unavailable; requirePlugin() and invoke() throw an actionable MobileUnavailableError.

    -

    Import and register Capacitor packages only from browser-owned code. Do not import them in server routes, SSR helpers, or other Bun-only modules.

    Complete TypeScript API

    This declaration comes from the exact installed package and lists its exported functions, classes, interfaces, and types.

    export { native } from '@wrnexus/native';
    +

    Provide a browser fallback

    +

    whenNative runs the first callback only in a Capacitor WebView and can return a web/SSR-safe fallback everywhere else.

    +
    import { Haptics, ImpactStyle } from "@capacitor/haptics";
    +import { mobile } from "@wrnexus/mobile";
    +
    +mobile.registerPlugin("Haptics", Haptics);
    +
    +export const confirmAction = () =>
    +  mobile.whenNative(
    +    () => mobile.invoke("Haptics", "impact", { style: ImpactStyle.Medium }),
    +    () => navigator.vibrate?.(30),
    +  );
    +

    Read an optional plugin without throwing

    +
    import type { NetworkPlugin } from "@capacitor/network";
    +import { mobile } from "@wrnexus/mobile";
    +
    +const network = mobile.plugin<NetworkPlugin>("Network");
    +const status = network ? await network.getStatus() : { connected: true, connectionType: "unknown" };
    +

    API

    +
      +
    • registerPlugin(name, instance) registers a browser-imported plugin.
    • +
    • plugin(name) returns a plugin or undefined; requirePlugin(name) throws when absent.
    • +
    • invoke(plugin, method, options?) calls a registered method and returns its result.
    • +
    • whenNative(native, fallback?) selects native behavior without breaking SSR.
    • +
    • isNative() and platform() report the current Capacitor environment.
    • +
    +

    Unavailable required plugins throw MobileUnavailableError with an actionable message.

    +

    Requirements / Notes

    +
      +
    • Capacitor plugin imports must remain in browser-owned modules.
    • +
    • @wrnexus/mobile re-exports native from @wrnexus/native for applications that
    • +

      prefer the higher-level cross-platform capability API.

      +

    Complete TypeScript API

    This declaration comes from the exact installed package and lists its exported functions, classes, interfaces, and types.

    export { native } from '@wrnexus/native';
     
     /** @wrnexus/mobile — SSR-safe access to Capacitor's native bridge. */
     
    @@ -63,16 +105,34 @@ declare const mobile: {
     };
     
     export { type CapacitorBridge, type MobilePlatform, MobileUnavailableError, invoke, isNative, mobile, platform, plugin, registerPlugin, requirePlugin, whenNative };
    -

    Examples

    Examples are taken from this package's installed documentation and must be evaluated with its requirements and stability notes.

    Example 1

    wrnexus mobile add @capacitor/camera

    Example 2

    import { Camera } from "@capacitor/camera";
    +

    Examples

    Examples are taken from this package's installed documentation and must be evaluated with its requirements and stability notes.

    Register and invoke a Capacitor plugin

    import { Camera, CameraResultType } from "@capacitor/camera";
     import { mobile } from "@wrnexus/mobile";
     
    -if (mobile.isNative()) {
    -  mobile.registerPlugin("Camera", Camera);
    -  const photo = await mobile.invoke("Camera", "getPhoto", { resultType: "uri" });
    -}
    - +mobile.registerPlugin("Camera", Camera); + +export async function takePhoto() { + if (!mobile.isNative()) return null; + return mobile.invoke("Camera", "getPhoto", { + quality: 85, + resultType: CameraResultType.Uri, + }); +}

    Provide a browser fallback

    import { Haptics, ImpactStyle } from "@capacitor/haptics";
    +import { mobile } from "@wrnexus/mobile";
    +
    +mobile.registerPlugin("Haptics", Haptics);
    +
    +export const confirmAction = () =>
    +  mobile.whenNative(
    +    () => mobile.invoke("Haptics", "impact", { style: ImpactStyle.Medium }),
    +    () => navigator.vibrate?.(30),
    +  );

    Read an optional plugin without throwing

    import type { NetworkPlugin } from "@capacitor/network";
    +import { mobile } from "@wrnexus/mobile";
    +
    +const network = mobile.plugin<NetworkPlugin>("Network");
    +const status = network ? await network.getStatus() : { connected: true, connectionType: "unknown" };
    +
    -
    WRNexusJS 0.2.23 · Private Developer Preview · Bun-native · Documentation generated from installed package APIs.
    +
    WRNexusJS 0.2.24 · Private Developer Preview · Bun-native · Documentation generated from installed package APIs.
    } } diff --git a/app/pages/packages/native.wrn b/app/pages/packages/native.wrn index dd3769cb..7056f7d8 100644 --- a/app/pages/packages/native.wrn +++ b/app/pages/packages/native.wrn @@ -10,17 +10,63 @@ page wrnexusnative {
    W WRNexusJS - +
    - -
    Native · Preview

    @wrnexus/native

    Cross-platform browser and Capacitor capability registry.

    Private registry access required

    This package is not available from the public npm registry. After WorkRoot approves access and supplies private registry instructions, install the release-aligned package:

    bun add @wrnexus/native@0.2.23

    Request preview access. Never put registry tokens in source control.

    Cross-platform capabilities for browsers, Capacitor WebViews, and compiled native apps.

    + +
    Native · Preview

    @wrnexus/native

    Cross-platform browser and Capacitor capability registry.

    Private registry access required

    This package is not available from the public npm registry. After WorkRoot approves access and supplies private registry instructions, install the release-aligned package:

    bun add @wrnexus/native@0.2.24

    Request preview access. Never put registry tokens in source control.

    Cross-platform capabilities for browsers, Capacitor WebViews, and compiled native apps.
    +

    Overview

    +

    @wrnexus/native exposes capabilities by name so application code can ask what the current platform supports before presenting an action. Browser capabilities use Web APIs; mobile capabilities use installed Capacitor plugins. platform() returns "server" during SSR, "browser" on the web, and the Capacitor platform in a native WebView.

    +
    bun add @wrnexus/native
    +

    Usage

    +

    Share a page when the platform supports it

    import { native } from "@wrnexus/native";
     
    -if (native.supports("share")) await native.run("share", { title: "WRNexusJS", url: location.href });
    -

    Built-ins include camera, clipboard.write, share, geolocation, network, haptics, storage, filesystem, notifications, and device information. Browser capabilities use Web APIs; mobile capabilities use installed Capacitor plugins.

    -

    platform() returns server during SSR, browser on the web, and the Capacitor platform in a native WebView. Unsupported operations reject with NativeUnavailableError; use supports() before presenting optional UI.

    Complete TypeScript API

    This declaration comes from the exact installed package and lists its exported functions, classes, interfaces, and types.

    import { N as NativePlatform, a as NativeCapability, b as NativeRunOptions, c as NativeTarget } from './types-CDShWg0i.js';
    +export async function shareCurrentPage() {
    +  if (!native.supports("share")) return false;
    +  await native.run("share", {
    +    title: document.title,
    +    url: location.href,
    +  });
    +  return true;
    +}
    +

    Register an application-specific capability

    +

    register returns an unregister function, which is useful for tests and temporary feature modules.

    +
    import { native } from "@wrnexus/native";
    +
    +const unregister = native.register("orders.scan", {
    +  browser: {
    +    supported: () => typeof window !== "undefined",
    +    run: async ({ orderId }: { orderId: string }) => {
    +      const code = window.prompt(`Scan code for order ${orderId}`);
    +      return { code };
    +    },
    +  },
    +});
    +
    +const result = await native.run<{ code: string | null }>("orders.scan", { orderId: "ord_42" });
    +unregister();
    +

    Target browser or mobile behavior explicitly

    +
    import { native } from "@wrnexus/native";
    +
    +const canUseMobileCamera = native.supports("camera", "mobile");
    +const position = await native.run(
    +  "geolocation",
    +  { enableHighAccuracy: true },
    +  { target: "browser" },
    +);
    +

    API

    +
      +
    • supports(name, target?) checks availability without running the capability.
    • +
    • run(name, options?, runOptions?) executes it or rejects with NativeUnavailableError.
    • +
    • register(name, capability) adds or overrides a capability and returns cleanup.
    • +
    • registered() lists capability names; clearRegistry() resets the registry.
    • +
    • isMobile() and platform() report the current target safely during SSR.
    • +
    +

    Built-ins include camera, clipboard.write, share, geolocation, network, haptics, storage, filesystem, notifications, and device information.

    +

    Requirements / Notes

    +

    Use supports() before showing optional controls. Mobile capabilities require their matching Capacitor plugins to be installed and registered by the application.

    Complete TypeScript API

    This declaration comes from the exact installed package and lists its exported functions, classes, interfaces, and types.

    import { N as NativePlatform, a as NativeCapability, b as NativeRunOptions, c as NativeTarget } from './types-CDShWg0i.js';
     export { d as NativeAdapter, e as NativeBrowserRuntime } from './types-CDShWg0i.js';
     export { browserCapabilities } from './browser.js';
     export { mobileCapabilities } from './mobile.js';
    @@ -46,12 +92,39 @@ declare const native: {
     };
     
     export { NativeCapability, NativePlatform, NativeRunOptions, NativeTarget, NativeUnavailableError, clearRegistry, isMobile, native, platform, register, registered, run, supports };
    -

    Examples

    Examples are taken from this package's installed documentation and must be evaluated with its requirements and stability notes.

    Example 1

    import { native } from "@wrnexus/native";
    +

    Examples

    Examples are taken from this package's installed documentation and must be evaluated with its requirements and stability notes.

    Share a page when the platform supports it

    import { native } from "@wrnexus/native";
     
    -if (native.supports("share")) await native.run("share", { title: "WRNexusJS", url: location.href });
    - +export async function shareCurrentPage() { + if (!native.supports("share")) return false; + await native.run("share", { + title: document.title, + url: location.href, + }); + return true; +}

    Register an application-specific capability

    import { native } from "@wrnexus/native";
    +
    +const unregister = native.register("orders.scan", {
    +  browser: {
    +    supported: () => typeof window !== "undefined",
    +    run: async ({ orderId }: { orderId: string }) => {
    +      const code = window.prompt(`Scan code for order ${orderId}`);
    +      return { code };
    +    },
    +  },
    +});
    +
    +const result = await native.run<{ code: string | null }>("orders.scan", { orderId: "ord_42" });
    +unregister();

    Target browser or mobile behavior explicitly

    import { native } from "@wrnexus/native";
    +
    +const canUseMobileCamera = native.supports("camera", "mobile");
    +const position = await native.run(
    +  "geolocation",
    +  { enableHighAccuracy: true },
    +  { target: "browser" },
    +);
    +
    -
    WRNexusJS 0.2.23 · Private Developer Preview · Bun-native · Documentation generated from installed package APIs.
    +
    WRNexusJS 0.2.24 · Private Developer Preview · Bun-native · Documentation generated from installed package APIs.
    } } diff --git a/app/pages/packages/oauth.wrn b/app/pages/packages/oauth.wrn index 1a30a79f..32059784 100644 --- a/app/pages/packages/oauth.wrn +++ b/app/pages/packages/oauth.wrn @@ -10,12 +10,12 @@ page wrnexusoauth {
    W WRNexusJS - +
    - -
    Security · Preview

    @wrnexus/oauth

    OAuth 2.0, PKCE, provider presets, and profile mapping.

    Private registry access required

    This package is not available from the public npm registry. After WorkRoot approves access and supplies private registry instructions, install the release-aligned package:

    bun add @wrnexus/oauth@0.2.23

    Request preview access. Never put registry tokens in source control.

    Dependency-free OAuth 2.0 sign-in for any provider, with PKCE and presets for Google, GitHub, and Discord.
    + +
    Security · Preview

    @wrnexus/oauth

    OAuth 2.0, PKCE, provider presets, and profile mapping.

    Private registry access required

    This package is not available from the public npm registry. After WorkRoot approves access and supplies private registry instructions, install the release-aligned package:

    bun add @wrnexus/oauth@0.2.24

    Request preview access. Never put registry tokens in source control.

    Dependency-free OAuth 2.0 sign-in for any provider, with PKCE and presets for Google, GitHub, and Discord.

    Part of the WRNexusJS framework — an SSR-first, Bun-native full-stack web framework.

    Overview

    @wrnexus/oauth implements the OAuth 2.0 Authorization Code flow (with PKCE) for server-side sign-in. It ships ready-made provider presets and a defineProvider helper for custom providers, then gives you two flow functions — startAuth (build the redirect) and completeAuth (exchange the code and fetch the user's profile). It has no runtime dependencies: it uses the platform fetch and WebCrypto only. Pairs naturally with @wrnexus/core's logIn to establish a session once you have a normalized profile.

    @@ -237,34 +237,57 @@ declare function exchangeCode(provider: OAuthProvider, options: CompleteAuthOpti declare function fetchProfile(provider: OAuthProvider, tokens: OAuthTokens, fetchImpl?: FetchLike): Promise<OAuthProfile>; export { type CompleteAuthOptions, type OAuthProfile, type OAuthProvider, type OAuthTokens, type ProviderCredentials, type StartAuthOptions, type StartAuthResult, completeAuth, defineProvider, discord, exchangeCode, fetchProfile, github, google, randomToken, startAuth }; -

    Examples

    Examples are taken from this package's installed documentation and must be evaluated with its requirements and stability notes.

    Example 1

    bun add @wrnexus/oauth

    Example 2

    interface ProviderCredentials {
    -  clientId: string;
    -  clientSecret: string;
    -  scopes?: string[]; // override the preset's default scopes
    -}

    Example 3

    interface OAuthProvider {
    -  name: string;
    -  authorizeUrl: string;
    -  tokenUrl: string;
    -  userInfoUrl: string;
    -  scopes: string[];
    -  clientId: string;
    -  clientSecret: string;
    -  authorizeParams?: Record<string, string>; // e.g. access_type, prompt
    -  mapProfile: (raw: Record<string, unknown>) => OAuthProfile;
    -}

    Example 4

    interface StartAuthOptions {
    -  redirectUri: string;
    -  state?: string; // reuse a state instead of generating one
    -  params?: Record<string, string>; // extra authorize params, merged last
    +

    Examples

    Examples are taken from this package's installed documentation and must be evaluated with its requirements and stability notes.

    Typical usage

    import { google, startAuth, completeAuth } from "@wrnexus/oauth";
    +import { logIn } from "@wrnexus/core";
    +
    +const provider = google({
    +  clientId: process.env.GOOGLE_CLIENT_ID!,
    +  clientSecret: process.env.GOOGLE_CLIENT_SECRET!,
    +});
    +
    +const redirectUri = "https://example.com/auth/callback";
    +
    +// 1. Kick off sign-in: redirect the user to the provider.
    +async function beginLogin(ctx) {
    +  const { url, state, verifier } = await startAuth(provider, { redirectUri });
    +  // Persist state + verifier in the session, then redirect.
    +  ctx.session.set("oauth_state", state);
    +  ctx.session.set("oauth_verifier", verifier);
    +  return Response.redirect(url, 302);
     }
     
    -interface StartAuthResult {
    -  url: string; // authorize URL to redirect to
    -  state: string; // CSRF state — verify on callback
    -  verifier: string; // PKCE code verifier — pass to completeAuth
    -}
    +// 2. Handle the callback. +async function handleCallback(ctx, code: string, state: string) { + if (state !== ctx.session.get("oauth_state")) throw new Error("bad state"); + + const { profile } = await completeAuth(provider, { + code, + redirectUri, + verifier: ctx.session.get("oauth_verifier"), + }); + + logIn(ctx, { id: profile.id, email: profile.email }); +}

    Custom provider with defineProvider

    import { defineProvider, startAuth } from "@wrnexus/oauth";
    +
    +const gitlab = defineProvider({
    +  name: "gitlab",
    +  authorizeUrl: "https://gitlab.com/oauth/authorize",
    +  tokenUrl: "https://gitlab.com/oauth/token",
    +  userInfoUrl: "https://gitlab.com/api/v4/user",
    +  scopes: ["read_user"],
    +  clientId: process.env.GITLAB_CLIENT_ID!,
    +  clientSecret: process.env.GITLAB_CLIENT_SECRET!,
    +  mapProfile: (raw) => ({
    +    id: String(raw.id),
    +    email: raw.email as string | undefined,
    +    name: raw.name as string | undefined,
    +    avatar: raw.avatar_url as string | undefined,
    +    raw,
    +  }),
    +});
    -
    WRNexusJS 0.2.23 · Private Developer Preview · Bun-native · Documentation generated from installed package APIs.
    +
    WRNexusJS 0.2.24 · Private Developer Preview · Bun-native · Documentation generated from installed package APIs.
    } } diff --git a/app/pages/packages/pubsub.wrn b/app/pages/packages/pubsub.wrn index ad6c6d95..698a377c 100644 --- a/app/pages/packages/pubsub.wrn +++ b/app/pages/packages/pubsub.wrn @@ -10,12 +10,12 @@ page wrnexuspubsub {
    W WRNexusJS - +
    - -
    Realtime · Preview

    @wrnexus/pubsub

    In-process and Redis-backed publish/subscribe.

    Private registry access required

    This package is not available from the public npm registry. After WorkRoot approves access and supplies private registry instructions, install the release-aligned package:

    bun add @wrnexus/pubsub@0.2.23

    Request preview access. Never put registry tokens in source control.

    Topic-based publish/subscribe with a pluggable driver — in-process by default, Redis for cross-process messaging.
    + +
    Realtime · Preview

    @wrnexus/pubsub

    In-process and Redis-backed publish/subscribe.

    Private registry access required

    This package is not available from the public npm registry. After WorkRoot approves access and supplies private registry instructions, install the release-aligned package:

    bun add @wrnexus/pubsub@0.2.24

    Request preview access. Never put registry tokens in source control.

    Topic-based publish/subscribe with a pluggable driver — in-process by default, Redis for cross-process messaging.

    Part of the WRNexusJS framework — an SSR-first, Bun-native full-stack web framework.

    Overview

    @wrnexus/pubsub is a small server-side pub/sub bus. You publish messages to a topic and subscribe with topic patterns; handlers fire for matching topics. The default driver keeps everything in-process, and you can swap in the Redis driver (@wrnexus/pubsub/redis) to fan messages out across processes or hosts. It also backs @wrnexus/core's realtime bridge for horizontal scaling.

    @@ -121,18 +121,33 @@ declare function memoryDriver(): PubSubDriver; declare function createPubSub(driver?: PubSubDriver): PubSub; export { type Handler, type PubSub, type PubSubDriver, createPubSub, memoryDriver }; -

    Examples

    Examples are taken from this package's installed documentation and must be evaluated with its requirements and stability notes.

    Example 1

    bun add @wrnexus/pubsub

    Example 2

    interface PubSub {
    -  publish<T = unknown>(topic: string, message: T): Promise<void>;
    -  subscribe<T = unknown>(pattern: string, handler: Handler<T>): () => void;
    -}
    +

    Examples

    Examples are taken from this package's installed documentation and must be evaluated with its requirements and stability notes.

    In-process (default)

    import { createPubSub } from "@wrnexus/pubsub";
     
    -type Handler<T = unknown> = (message: T, topic: string) => void | Promise<void>;

    Example 3

    interface PubSubDriver {
    -  publish(topic: string, message: unknown): void | Promise<void>;
    -  subscribe(pattern: string, handler: Handler): () => void;
    -}

    Example 4

    function redisDriver(url?: string): PubSubDriver & { close(): void };
    +const bus = createPubSub(); + +const off = bus.subscribe("order:*", (msg, topic) => { + console.log(topic, msg); +}); + +await bus.publish("order:created", { id: 7 }); + +off(); // unsubscribe

    Cross-process with Redis

    import { createPubSub } from "@wrnexus/pubsub";
    +import { redisDriver } from "@wrnexus/pubsub/redis";
    +
    +const driver = redisDriver("redis://localhost:6379");
    +const bus = createPubSub(driver);
    +
    +bus.subscribe("order:*", (msg, topic) => {
    +  // received on any app process subscribed to this pattern
    +});
    +
    +await bus.publish("order:created", { id: 7 });
    +
    +// on shutdown
    +driver.close();
    -
    WRNexusJS 0.2.23 · Private Developer Preview · Bun-native · Documentation generated from installed package APIs.
    +
    WRNexusJS 0.2.24 · Private Developer Preview · Bun-native · Documentation generated from installed package APIs.
    } } diff --git a/app/pages/packages/queue.wrn b/app/pages/packages/queue.wrn index 0d689c30..2151ceea 100644 --- a/app/pages/packages/queue.wrn +++ b/app/pages/packages/queue.wrn @@ -10,12 +10,12 @@ page wrnexusqueue {
    W WRNexusJS - +
    - -
    Data · Preview

    @wrnexus/queue

    Background jobs with delay, concurrency, retry, and repetition.

    Private registry access required

    This package is not available from the public npm registry. After WorkRoot approves access and supplies private registry instructions, install the release-aligned package:

    bun add @wrnexus/queue@0.2.23

    Request preview access. Never put registry tokens in source control.

    A background job queue with delays, retries + exponential backoff, recurring jobs, and concurrent workers.
    + +
    Data · Preview

    @wrnexus/queue

    Background jobs with delay, concurrency, retry, and repetition.

    Private registry access required

    This package is not available from the public npm registry. After WorkRoot approves access and supplies private registry instructions, install the release-aligned package:

    bun add @wrnexus/queue@0.2.24

    Request preview access. Never put registry tokens in source control.

    A background job queue with delays, retries + exponential backoff, recurring jobs, and concurrent workers.

    Part of the WRNexusJS framework — an SSR-first, Bun-native full-stack web framework.

    Overview

    @wrnexus/queue is a server-side in-process job queue. You register named workers, enqueue jobs (optionally delayed or recurring), and let the queue poll and run them on a timer — with per-job retry limits and doubling backoff between attempts. The default store lives in memory; the design allows a pluggable driver to back it with Redis/SQL for durability across restarts. Reach for it when you need to defer work (emails, webhooks, cleanup) off the request path without a heavyweight external broker. Tests can drive it deterministically via drain().

    @@ -161,18 +161,36 @@ interface Queue { declare function createQueue(options?: QueueOptions): Queue; export { type AddOptions, type Job, type JobHandler, type Queue, type QueueOptions, createQueue }; -

    Examples

    Examples are taken from this package's installed documentation and must be evaluated with its requirements and stability notes.

    Example 1

    bun add @wrnexus/queue

    Example 2

    function createQueue(options?: QueueOptions): Queue;

    Example 3

    type JobHandler<T = unknown> = (job: Job<T>) => void | Promise<void>;

    Example 4

    interface Job<T = unknown> {
    -  id: string; // e.g. "job_1"
    -  name: string;
    -  data: T;
    -  attempts: number;
    -  maxAttempts: number;
    -  runAt: number; // epoch ms; job runs when now ≥ runAt
    -  repeat?: number; // if set, re-enqueue this many ms after each success
    -}
    +

    Examples

    Examples are taken from this package's installed documentation and must be evaluated with its requirements and stability notes.

    Register workers, enqueue jobs, then start the poller

    import { createQueue } from "@wrnexus/queue";
    +
    +const queue = createQueue({ maxAttempts: 3, backoffMs: 1000 });
    +
    +// Register a worker for the "email" job name.
    +queue.process<{ to: string }>("email", async (job) => {
    +  await send(job.data.to);
    +});
    +
    +// Enqueue a delayed job with up to 3 attempts.
    +await queue.add("email", { to: "a@b.com" }, { delayMs: 5000, maxAttempts: 3 });
    +
    +queue.start(); // begin polling; queue.stop() to halt

    Recurring jobs

    queue.process("heartbeat", async () => ping());
    +await queue.add("heartbeat", {}, { repeat: 60_000 }); // runs ~every minute

    Handling permanent failures

    const queue = createQueue({
    +  onFailed: (job, error) => {
    +    console.error(`job ${job.id} (${job.name}) gave up`, error);
    +  },
    +});

    Deterministic testing

    let clock = 0;
    +const queue = createQueue({ now: () => clock });
    +
    +queue.process("task", async () => {
    +  /* ... */
    +});
    +await queue.add("task", {}, { delayMs: 5000 });
    +
    +clock = 5000;
    +const ran = await queue.drain(); // => 1
    -
    WRNexusJS 0.2.23 · Private Developer Preview · Bun-native · Documentation generated from installed package APIs.
    +
    WRNexusJS 0.2.24 · Private Developer Preview · Bun-native · Documentation generated from installed package APIs.
    } } diff --git a/app/pages/packages/reactive.wrn b/app/pages/packages/reactive.wrn index 2a383113..61040af9 100644 --- a/app/pages/packages/reactive.wrn +++ b/app/pages/packages/reactive.wrn @@ -10,12 +10,12 @@ page wrnexusreactive {
    W WRNexusJS - +
    - -
    Frontend · Preview

    @wrnexus/reactive

    Small type-safe reactive signal primitives.

    Private registry access required

    This package is not available from the public npm registry. After WorkRoot approves access and supplies private registry instructions, install the release-aligned package:

    bun add @wrnexus/reactive@0.2.23

    Request preview access. Never put registry tokens in source control.

    Tiny, type-safe reactive primitives (signals) with zero dependencies.
    + +
    Frontend · Preview

    @wrnexus/reactive

    Small type-safe reactive signal primitives.

    Private registry access required

    This package is not available from the public npm registry. After WorkRoot approves access and supplies private registry instructions, install the release-aligned package:

    bun add @wrnexus/reactive@0.2.24

    Request preview access. Never put registry tokens in source control.

    Tiny, type-safe reactive primitives (signals) with zero dependencies.

    Part of the WRNexusJS framework — an SSR-first, Bun-native full-stack web framework.

    Overview

    @wrnexus/reactive is the seed of WRNexusJS's reactivity layer: a minimal signal primitive that holds a value, notifies subscribers when it changes, and hands back an unsubscribe function. It is deliberately small and framework-agnostic — it powers nothing on its own, but is shaped so client islands (and later the .wrn compiler's state blocks) can build reactive bindings on top of it. Reach for it when you need observable state without pulling in a full reactivity library.

    @@ -104,15 +104,7 @@ interface Signal<T> { declare function signal<T>(initial: T): Signal<T>; export { type Signal, type Subscriber, type Unsubscribe, signal }; -

    Examples

    Examples are taken from this package's installed documentation and must be evaluated with its requirements and stability notes.

    Example 1

    bun add @wrnexus/reactive

    Example 2

    type Subscriber<T> = (value: T) => void;
    -type Unsubscribe = () => void;
    -
    -interface Signal<T> {
    -  get(): T;
    -  set(next: T): void;
    -  update(fn: (current: T) => T): void;
    -  subscribe(fn: Subscriber<T>): Unsubscribe;
    -}

    Example 3

    import { signal } from "@wrnexus/reactive";
    +

    Examples

    Examples are taken from this package's installed documentation and must be evaluated with its requirements and stability notes.

    Typical usage

    import { signal } from "@wrnexus/reactive";
     
     const count = signal(0);
     
    @@ -128,13 +120,13 @@ count.set(1); // no-op — value unchanged, no notification
     count.update((n) => n + 1); // logs: count is now 2
     
     off(); // stop listening
    -count.set(3); // nothing logged

    Example 4

    import { signal, type Signal } from "@wrnexus/reactive";
    +count.set(3); // nothing logged

    Typed signals infer T from the initial value, or can be annotated explicitly

    import { signal, type Signal } from "@wrnexus/reactive";
     
     const user: Signal<{ name: string } | null> = signal(null);
     user.set({ name: "Ada" });
    -
    WRNexusJS 0.2.23 · Private Developer Preview · Bun-native · Documentation generated from installed package APIs.
    +
    WRNexusJS 0.2.24 · Private Developer Preview · Bun-native · Documentation generated from installed package APIs.
    } } diff --git a/app/pages/packages/router.wrn b/app/pages/packages/router.wrn index eaa2f9f0..bf60700b 100644 --- a/app/pages/packages/router.wrn +++ b/app/pages/packages/router.wrn @@ -10,12 +10,12 @@ page wrnexusrouter {
    W WRNexusJS - +
    - -
    Core · Preview

    @wrnexus/router

    Filesystem discovery, route matching, and typed route generation.

    Private registry access required

    This package is not available from the public npm registry. After WorkRoot approves access and supplies private registry instructions, install the release-aligned package:

    bun add @wrnexus/router@0.2.23

    Request preview access. Never put registry tokens in source control.

    File-based router that maps an app/ directory onto route tables and matches request paths against them.
    + +
    Core · Preview

    @wrnexus/router

    Filesystem discovery, route matching, and typed route generation.

    Private registry access required

    This package is not available from the public npm registry. After WorkRoot approves access and supplies private registry instructions, install the release-aligned package:

    bun add @wrnexus/router@0.2.24

    Request preview access. Never put registry tokens in source control.

    File-based router that maps an app/ directory onto route tables and matches request paths against them.

    Part of the WRNexusJS framework — an SSR-first, Bun-native full-stack web framework.

    Overview

    @wrnexus/router scans an application's app/ directory once at startup and builds route tables for pages, API endpoints, realtime channels, middleware, server-rendered .wrn components, layouts, and validation schemas. It also compiles URL patterns (/users/[id]) into RegExps and matches request paths against them. Request input is never turned into a file path, which makes the router immune to path traversal. This is a server-side package used by the WRNexusJS runtime to resolve incoming requests, plus a codegen helper for compile-time typed links.

    @@ -220,48 +220,37 @@ interface RouterOptions { declare function buildRouter(appDir: string, opts?: RouterOptions): Router; export { type ComponentRef, type Route, type RouteMatch, type Router, type RouterOptions, buildRouter, compileRoutePattern, generateRoutesFile, matchRoute, sortRoutes }; -

    Examples

    Examples are taken from this package's installed documentation and must be evaluated with its requirements and stability notes.

    Example 1

    bun add @wrnexus/router

    Example 2

    app/pages/index.tsx        -> GET /
    -app/pages/about.tsx        -> GET /about
    -app/pages/users/[id].tsx   -> GET /users/:id
    -app/api/hello.ts           -> /api/hello
    -app/realtime/chat.ts       -> /realtime/chat
    -app/pages/*.wrn  (api)    -> embedded /api/* routes
    -app/pages/*.wrn  (rt)     -> embedded /realtime/* routes
    -app/middleware/*.ts        -> global middleware (alphabetical)
    -app/components/*.wrn      -> server-rendered components (by basename)
    -app/layouts/*.wrn         -> named page layouts
    -app/schemas/*.ts           -> validation schemas

    Example 3

    function buildRouter(appDir: string, opts?: RouterOptions): Router;
    +

    Examples

    Examples are taken from this package's installed documentation and must be evaluated with its requirements and stability notes.

    Typical usage

    import { buildRouter } from "@wrnexus/router";
     
    -interface RouterOptions {
    -  /** Extra dirs scanned for `.wrn` components (e.g. `@wrnexus/ui`), before
    -   *  `app/components`, so an app component of the same name wins. */
    -  componentDirs?: string[];
    -}

    Example 4

    interface Router {
    -  pages: Route[];
    -  api: Route[];
    -  realtime: Route[];
    -  /** Absolute paths of middleware modules, in execution order (alphabetical). */
    -  middlewareFiles: string[];
    -  /** Server-rendered `.wrn` components, mounted via `data-component`. */
    -  components: ComponentRef[];
    -  /** Named page layouts (`app/layouts/<name>.wrn`); a page picks one via `layout`. */
    -  layouts: ComponentRef[];
    -  /** Validation schemas (`app/schemas/<name>.ts`) shared by API + forms. */
    -  schemas: ComponentRef[];
    -  matchPage(pathname: string): RouteMatch | null;
    -  matchApi(pathname: string): RouteMatch | null;
    -  matchRealtime(pathname: string): RouteMatch | null;
    +const router = buildRouter("./app", {
    +  componentDirs: ["./node_modules/@wrnexus/ui/components"],
    +});
    +
    +// Resolve an incoming request.
    +const match = router.matchPage("/users/42");
    +if (match) {
    +  console.log(match.route.file); // absolute path to the page module
    +  console.log(match.params); // { id: "42" }
     }
     
    -interface ComponentRef {
    -  /** Validated component name (matches a `data-component` attribute). */
    -  name: string;
    -  /** Absolute path to the component's `.wrn` module. */
    -  file: string;
    -}
    +const api = router.matchApi("/api/hello"); +const rt = router.matchRealtime("/realtime/chat");

    Generating the typed-routes file (as wrnexus dev does)

    import { generateRoutesFile } from "@wrnexus/router";
    +import { writeFileSync } from "node:fs";
    +
    +const router = buildRouter("./app");
    +writeFileSync("./app/routes.gen.ts", generateRoutesFile(router.pages));

    Typical usage

    // Then, in app code, links are checked at compile time:
    +import { href } from "./routes.gen.ts";
    +
    +href("/users/[id]", { id: "42" }); // "/users/42"
    +href("/about"); // "/about"
    +href("/nope"); // type error: unknown path

    Lower-level pattern matching, if you need it directly

    import { compileRoutePattern, matchRoute, sortRoutes, type Route } from "@wrnexus/router";
    +
    +const { regex, paramNames } = compileRoutePattern("/posts/[slug]");
    +const routes = sortRoutes([{ raw: "/posts/[slug]", file: "…", regex, paramNames }]);
    +const m = matchRoute(routes, "/posts/hello"); // { route, params: { slug: "hello" } }
    -
    WRNexusJS 0.2.23 · Private Developer Preview · Bun-native · Documentation generated from installed package APIs.
    +
    WRNexusJS 0.2.24 · Private Developer Preview · Bun-native · Documentation generated from installed package APIs.
    } } diff --git a/app/pages/packages/ssr.wrn b/app/pages/packages/ssr.wrn index 640e50f9..b41d1d53 100644 --- a/app/pages/packages/ssr.wrn +++ b/app/pages/packages/ssr.wrn @@ -10,12 +10,12 @@ page wrnexusssr {
    W WRNexusJS - +
    - -
    Runtime · Preview

    @wrnexus/ssr

    Secure HTML document rendering and SEO metadata.

    Private registry access required

    This package is not available from the public npm registry. After WorkRoot approves access and supplies private registry instructions, install the release-aligned package:

    bun add @wrnexus/ssr@0.2.23

    Request preview access. Never put registry tokens in source control.

    Server-side rendering: wraps a page's HTML body in a complete HTML document with a metadata-driven <head>.
    + +
    Runtime · Preview

    @wrnexus/ssr

    Secure HTML document rendering and SEO metadata.

    Private registry access required

    This package is not available from the public npm registry. After WorkRoot approves access and supplies private registry instructions, install the release-aligned package:

    bun add @wrnexus/ssr@0.2.24

    Request preview access. Never put registry tokens in source control.

    Server-side rendering: wraps a page's HTML body in a complete HTML document with a metadata-driven <head>.

    Part of the WRNexusJS framework — an SSR-first, Bun-native full-stack web framework.

    Overview

    Pages in WRNexusJS return an HTML string for the body. @wrnexus/ssr takes that body and produces a full HTML document — building the <head> from page metadata and global SEO defaults, resolving canonical/Open Graph/Twitter tags, and injecting module preloads and <script type="module"> tags. It is deliberately server-only: nothing in this package touches the DOM or ships to the browser, keeping server code genuinely server-only. Reach for it on the server when turning a rendered page body into a response document.

    @@ -56,6 +56,7 @@ page wrnexusssr {
  • Emitted tags: <title>, and as applicable description, robots, keywords, theme-color, and canonical link, plus Open Graph (og:title, og:description, og:type, og:url, og:site_name, og:locale, og:image) and Twitter (twitter:card, twitter:title, twitter:description, twitter:image, twitter:site) meta tags. The document always includes charset, viewport, and a /favicon.ico icon link.
  • Usage

    +

    Render an SEO-ready application page

    import { renderDocument } from "@wrnexus/ssr";
     
     const html = renderDocument({
    @@ -79,6 +80,17 @@ return new Response(html, {
       headers: { "content-type": "text/html; charset=utf-8" },
     });

    The produced document has <title>About Us — Acme</title>, the SEO/Open Graph/Twitter tags derived from the merged metadata, a modulepreload link and module <script> for each entry in scripts, and the body wrapped in <div id="app">.

    +

    Add trusted framework assets and boot data

    +

    Use extraHead and extraBody only for HTML generated by your application or the framework. User-provided values belong in meta, where they are escaped.

    +
    const html = renderDocument({
    +  meta: { title: "Dashboard", robots: "noindex" },
    +  body: dashboardHtml,
    +  url: ctx.url,
    +  extraHead: '<link rel="stylesheet" href="/_wrnexus/admin.css">',
    +  extraBody: `<script type="application/json" id="boot">${JSON.stringify(bootData).replaceAll("<", "\\u003c")}</script>`,
    +});
    +
    +return new Response(html, { headers: { "content-type": "text/html; charset=utf-8" } });

    Requirements / Notes

    • Server-only. This module never imports or touches the DOM and is safe to keep out of client bundles.
    • @@ -127,22 +139,7 @@ interface RenderOptions { declare function renderDocument(opts: RenderOptions): string; export { type RenderOptions, renderDocument }; -

    Examples

    Examples are taken from this package's installed documentation and must be evaluated with its requirements and stability notes.

    Example 1

    bun add @wrnexus/ssr

    Example 2

    type SeoConfig = {
    -  title?: string;
    -  titleTemplate?: string; // e.g. "%s — My Site"; %s is replaced with the page title
    -  description?: string;
    -  canonical?: string;
    -  canonicalBase?: string; // origin used to absolutize canonical/image URLs
    -  robots?: string;
    -  keywords?: string | string[];
    -  image?: string;
    -  siteName?: string;
    -  type?: string; // Open Graph type; defaults to "website"
    -  locale?: string;
    -  twitterCard?: string; // defaults to "summary"
    -  twitterSite?: string;
    -  themeColor?: string;
    -};

    Example 3

    import { renderDocument } from "@wrnexus/ssr";
    +

    Examples

    Examples are taken from this package's installed documentation and must be evaluated with its requirements and stability notes.

    Render an SEO-ready application page

    import { renderDocument } from "@wrnexus/ssr";
     
     const html = renderDocument({
       meta: {
    @@ -163,10 +160,18 @@ const html = renderDocument({
     
     return new Response(html, {
       headers: { "content-type": "text/html; charset=utf-8" },
    -});
    - +});

    Add trusted framework assets and boot data

    const html = renderDocument({
    +  meta: { title: "Dashboard", robots: "noindex" },
    +  body: dashboardHtml,
    +  url: ctx.url,
    +  extraHead: '<link rel="stylesheet" href="/_wrnexus/admin.css">',
    +  extraBody: `<script type="application/json" id="boot">${JSON.stringify(bootData).replaceAll("<", "\\u003c")}</script>`,
    +});
    +
    +return new Response(html, { headers: { "content-type": "text/html; charset=utf-8" } });
    +
    -
    WRNexusJS 0.2.23 · Private Developer Preview · Bun-native · Documentation generated from installed package APIs.
    +
    WRNexusJS 0.2.24 · Private Developer Preview · Bun-native · Documentation generated from installed package APIs.
    } } diff --git a/app/pages/packages/styles.wrn b/app/pages/packages/styles.wrn index 0130177a..2825f202 100644 --- a/app/pages/packages/styles.wrn +++ b/app/pages/packages/styles.wrn @@ -10,12 +10,12 @@ page wrnexusstyles {
    W WRNexusJS - +
    - -
    Frontend · Preview

    @wrnexus/styles

    CSS pipeline, themes, fonts, profiles, and application config.

    Private registry access required

    This package is not available from the public npm registry. After WorkRoot approves access and supplies private registry instructions, install the release-aligned package:

    bun add @wrnexus/styles@0.2.23

    Request preview access. Never put registry tokens in source control.

    Global CSS bundling, the --wire-* design-token theme system, and the wrnexus.config.ts app-config loader for WRNexusJS apps.
    + +
    Frontend · Preview

    @wrnexus/styles

    CSS pipeline, themes, fonts, profiles, and application config.

    Private registry access required

    This package is not available from the public npm registry. After WorkRoot approves access and supplies private registry instructions, install the release-aligned package:

    bun add @wrnexus/styles@0.2.24

    Request preview access. Never put registry tokens in source control.

    Global CSS bundling, the --wire-* design-token theme system, and the wrnexus.config.ts app-config loader for WRNexusJS apps.

    Part of the WRNexusJS framework — an SSR-first, Bun-native full-stack web framework.

    Overview

    This package owns three server-side concerns that shape every page a WRNexusJS app renders:

    @@ -509,30 +509,7 @@ declare function bundleCss(entryPath: string, mode: Mode): Promise<string> declare function renderStyles(ctx: StyleProcessContext, styles?: StylesConfig): Promise<string>; export { type AppConfig, DEFAULT_THEMES, type FontConfig, type FontDisplay, type GoogleFont, type LocalFontFace, type MobileConfig, type Mode, type PwaConfig, type ResolvedTheme, type StyleProcessContext, type StylesConfig, type Mode as StylesMode, THEME_COOKIE, THEME_CSS_HREF, THEME_JS_HREF, type ThemeConfig, type ThemeTokens, bundleCss, findStyleEntry, fontCspSources, headToString, loadAppConfig, loadEnv, loadRawConfig, renderFontHead, renderProductionFontHead, renderStyles, renderThemeCss, renderThemeRuntime, resolveProfile, resolveThemeConfig, resolveThemeName }; -

    Examples

    Examples are taken from this package's installed documentation and must be evaluated with its requirements and stability notes.

    Example 1

    bun add @wrnexus/styles

    Example 2

    interface StylesConfig {
    -  /** CSS entry path relative to the app root. Default: app/styles/global.css */
    -  entry?: string;
    -  /** Custom processor — return the final CSS string (Tailwind/PostCSS/Sass). */
    -  process?: (ctx: StyleProcessContext) => string | Promise<string>;
    -}
    -
    -interface StyleProcessContext {
    -  entryPath: string | null; // resolved absolute CSS entry, or null
    -  appDir: string;
    -  appRoot: string;
    -  mode: Mode; // "development" | "production"
    -}

    Example 3

    type ThemeTokens = Record<string, string>;
    -
    -interface ThemeConfig {
    -  default?: string; // theme used when no cookie is present
    -  themes?: Record<string, ThemeTokens>; // deep-merged over built-in light/dark
    -}
    -
    -interface ResolvedTheme {
    -  default: string;
    -  names: string[];
    -  themes: Record<string, ThemeTokens>;
    -}

    Example 4

    import type { AppConfig } from "@wrnexus/styles";
    +

    Examples

    Examples are taken from this package's installed documentation and must be evaluated with its requirements and stability notes.

    wrnexus.config.ts

    import type { AppConfig } from "@wrnexus/styles";
     
     export default {
       head: [
    @@ -560,10 +537,50 @@ export default {
           db: { driver: "postgres", url: process.env.DATABASE_URL! },
         },
       },
    -} satisfies AppConfig;
    +} satisfies AppConfig;

    Loading config + producing CSS

    import {
    +  loadAppConfig,
    +  resolveProfile,
    +  loadEnv,
    +  findStyleEntry,
    +  renderStyles,
    +} from "@wrnexus/styles";
    +
    +const appRoot = process.cwd();
    +const mode = "production" as const;
    +
    +const profile = resolveProfile({ mode });
    +loadEnv(appRoot, profile);
    +
    +const config = await loadAppConfig(appRoot, profile);
    +
    +const appDir = `${appRoot}/app`;
    +const entryPath = findStyleEntry(appDir, appRoot, config.styles?.entry);
    +const css = await renderStyles({ entryPath, appDir, appRoot, mode }, config.styles);

    Rendering the theme

    import {
    +  resolveThemeConfig,
    +  resolveThemeName,
    +  renderThemeCss,
    +  renderThemeRuntime,
    +  THEME_COOKIE,
    +} from "@wrnexus/styles";
    +
    +const theme = resolveThemeConfig(config.theme);
    +
    +// Server: pick the active theme from the request cookie (no flash).
    +const active = resolveThemeName(cookies[THEME_COOKIE], theme);
    +// → render <html data-theme={active}>
    +
    +const themeCss = renderThemeCss(theme); // served at THEME_CSS_HREF
    +const themeJs = renderThemeRuntime(theme); // served at THEME_JS_HREF

    Rendering the theme

    .card {
    +  background: var(--wire-color-surface);
    +  color: var(--wire-color-text);
    +  border: 1px solid var(--wire-color-border);
    +  border-radius: var(--wire-radius);
    +  box-shadow: var(--wire-shadow-1);
    +}

    Rendering the theme

    <button data-wire-theme-toggle>Toggle theme</button>
    +<button data-wire-theme-set="brand">Brand theme</button>
    -
    WRNexusJS 0.2.23 · Private Developer Preview · Bun-native · Documentation generated from installed package APIs.
    +
    WRNexusJS 0.2.24 · Private Developer Preview · Bun-native · Documentation generated from installed package APIs.
    } } diff --git a/app/pages/packages/test.wrn b/app/pages/packages/test.wrn index ab1bd5f6..fa00ee49 100644 --- a/app/pages/packages/test.wrn +++ b/app/pages/packages/test.wrn @@ -10,12 +10,12 @@ page wrnexustest {
    W WRNexusJS - +
    - -
    Tooling · Preview

    @wrnexus/test

    WRNexusJS-aware component, route, and browser testing utilities.

    Private registry access required

    This package is not available from the public npm registry. After WorkRoot approves access and supplies private registry instructions, install the release-aligned package:

    bun add @wrnexus/test@0.2.23

    Request preview access. Never put registry tokens in source control.

    Testing utilities for WRNexusJS apps — component rendering, reactive-DOM mounting, route handler calls, and a full in-process app harness, plus a one-import re-export of bun:test.
    + +
    Tooling · Preview

    @wrnexus/test

    WRNexusJS-aware component, route, and browser testing utilities.

    Private registry access required

    This package is not available from the public npm registry. After WorkRoot approves access and supplies private registry instructions, install the release-aligned package:

    bun add @wrnexus/test@0.2.24

    Request preview access. Never put registry tokens in source control.

    Testing utilities for WRNexusJS apps — component rendering, reactive-DOM mounting, route handler calls, and a full in-process app harness, plus a one-import re-export of bun:test.

    Part of the WRNexusJS framework — an SSR-first, Bun-native full-stack web framework.

    Overview

    @wrnexus/test is the server-side test toolkit you reach for when writing tests for a WRNexusJS app. It runs under bun test (invoked via wrnexus test) and gives you a single import surface: the bun:test primitives (test, expect, mock, …) re-exported alongside WRNexusJS-aware helpers that compile .wrn components, hydrate server HTML in a DOM, invoke API route handlers, and boot the real app on an ephemeral port for integration tests.

    @@ -160,18 +160,33 @@ interface HarnessOptions { declare function createHarness(projectRoot: string, options?: HarnessOptions): Promise<Harness>; export { type Harness, type HarnessOptions, callRoute, createHarness, mountHtml, renderComponent }; -

    Examples

    Examples are taken from this package's installed documentation and must be evaluated with its requirements and stability notes.

    Example 1

    bun add @wrnexus/test

    Example 2

    function renderComponent(source: string, props?: Record<string, unknown>): Promise<string>;

    Example 3

    function mountHtml(html: string): {
    -  document: Document;
    -  window: unknown;
    -  querySelector: (sel: string) => Element | null;
    -  querySelectorAll: (sel: string) => Element[];
    -};

    Example 4

    function callRoute(
    -  handler: (ctx: Context) => Response | Promise<Response>,
    -  request: Request,
    -): Promise<Response>;
    +

    Examples

    Examples are taken from this package's installed documentation and must be evaluated with its requirements and stability notes.

    Typical usage

    import { test, expect, renderComponent, mountHtml, createHarness } from "@wrnexus/test";
    +
    +test("counter renders its label", async () => {
    +  const html = await renderComponent(SRC, { start: 3, label: "Hits" });
    +  expect(html).toContain("Hits");
    +});
    +
    +test("reactive scope hydrates", () => {
    +  const { querySelector } = mountHtml(serverHtml);
    +  expect(querySelector("[data-text]")?.textContent).toBe("3");
    +});
    +
    +test("home page responds", async () => {
    +  const app = await createHarness("examples/basic-app");
    +  const res = await app.fetch("/");
    +  expect(res.status).toBe(200);
    +  await app.close();
    +});

    Calling an API route handler directly

    import { test, expect, callRoute } from "@wrnexus/test";
    +import { GET } from "../app/api/health.ts";
    +
    +test("health endpoint", async () => {
    +  const res = await callRoute(GET, new Request("http://test/api/health"));
    +  expect(res.status).toBe(200);
    +});
    -
    WRNexusJS 0.2.23 · Private Developer Preview · Bun-native · Documentation generated from installed package APIs.
    +
    WRNexusJS 0.2.24 · Private Developer Preview · Bun-native · Documentation generated from installed package APIs.
    } } diff --git a/app/pages/packages/tracking.wrn b/app/pages/packages/tracking.wrn index 67c045a1..ca7c4760 100644 --- a/app/pages/packages/tracking.wrn +++ b/app/pages/packages/tracking.wrn @@ -10,12 +10,12 @@ page wrnexustracking {
    W WRNexusJS - +
    - -
    Runtime · Preview

    @wrnexus/tracking

    Error/event capture, middleware, filtering, and sinks.

    Private registry access required

    This package is not available from the public npm registry. After WorkRoot approves access and supplies private registry instructions, install the release-aligned package:

    bun add @wrnexus/tracking@0.2.23

    Request preview access. Never put registry tokens in source control.

    Error tracking for WRNexusJS apps: capture exceptions manually or via middleware and fan them out to pluggable sinks.
    + +
    Runtime · Preview

    @wrnexus/tracking

    Error/event capture, middleware, filtering, and sinks.

    Private registry access required

    This package is not available from the public npm registry. After WorkRoot approves access and supplies private registry instructions, install the release-aligned package:

    bun add @wrnexus/tracking@0.2.24

    Request preview access. Never put registry tokens in source control.

    Error tracking for WRNexusJS apps: capture exceptions manually or via middleware and fan them out to pluggable sinks.

    Part of the WRNexusJS framework — an SSR-first, Bun-native full-stack web framework.

    Overview

    @wrnexus/tracking is a small, server-side error-capture layer. You create a tracker with one or more sinks, then feed it errors — either manually with tracker.capture(err, context) or automatically by mounting tracker.middleware() in your request pipeline. A consoleSink is included; forwarding to Sentry, Datadog, or any other backend is just a matter of writing a tiny sink. Reach for it when you want a single, sink-agnostic place to route application errors. Sinks run best-effort — a throwing sink never breaks the request.

    @@ -131,16 +131,7 @@ declare const consoleSink: ErrorSink; declare function createTracker(options?: TrackerOptions): Tracker; export { type ErrorEvent, type ErrorSink, type Tracker, type TrackerOptions, consoleSink, createTracker }; -

    Examples

    Examples are taken from this package's installed documentation and must be evaluated with its requirements and stability notes.

    Example 1

    bun add @wrnexus/tracking

    Example 2

    { method: ctx.req.method, path: ctx.url.pathname, requestId: ctx.locals.requestId }

    Example 3

    interface ErrorEvent {
    -  error: Error;
    -  context: Record<string, unknown>; // request info, user id, tags…
    -  timestamp: number; // epoch ms
    -}
    -
    -interface ErrorSink {
    -  name?: string;
    -  capture(event: ErrorEvent): void | Promise<void>;
    -}

    Example 4

    import { createTracker, consoleSink } from "@wrnexus/tracking";
    +

    Examples

    Examples are taken from this package's installed documentation and must be evaluated with its requirements and stability notes.

    Manual capture

    import { createTracker, consoleSink } from "@wrnexus/tracking";
     
     const tracker = createTracker({ sinks: [consoleSink] });
     
    @@ -149,10 +140,31 @@ try {
     } catch (err) {
       await tracker.capture(err, { userId: 42, op: "doWork" });
       throw err;
    -}
    +}

    As request middleware

    import { createTracker, consoleSink } from "@wrnexus/tracking";
    +
    +const tracker = createTracker({ sinks: [consoleSink] });
    +
    +app.use(tracker.middleware()); // captures + re-throws downstream errors

    A custom sink with beforeSend scrubbing

    import { createTracker, type ErrorSink } from "@wrnexus/tracking";
    +
    +const sentrySink: ErrorSink = {
    +  name: "sentry",
    +  async capture(event) {
    +    await Sentry.captureException(event.error, { extra: event.context });
    +  },
    +};
    +
    +const tracker = createTracker({
    +  sinks: [sentrySink],
    +  beforeSend(event) {
    +    delete event.context.password; // scrub secrets
    +    return event; // return null to drop the event entirely
    +  },
    +});
    +
    +tracker.addSink(anotherSink); // add more sinks later
    -
    WRNexusJS 0.2.23 · Private Developer Preview · Bun-native · Documentation generated from installed package APIs.
    +
    WRNexusJS 0.2.24 · Private Developer Preview · Bun-native · Documentation generated from installed package APIs.
    } } diff --git a/app/pages/packages/ui.wrn b/app/pages/packages/ui.wrn index 1bd0718f..f25baa26 100644 --- a/app/pages/packages/ui.wrn +++ b/app/pages/packages/ui.wrn @@ -10,12 +10,12 @@ page wrnexusui {
    W WRNexusJS - +
    - -
    Frontend · Preview

    @wrnexus/ui

    Themeable server-rendered UI components and CSS.

    Private registry access required

    This package is not available from the public npm registry. After WorkRoot approves access and supplies private registry instructions, install the release-aligned package:

    bun add @wrnexus/ui@0.2.23

    Request preview access. Never put registry tokens in source control.

    First-party Wire UI component library — a set of themeable .wrn components plus a single tokenized stylesheet.
    + +
    Frontend · Preview

    @wrnexus/ui

    Themeable server-rendered UI components and CSS.

    Private registry access required

    This package is not available from the public npm registry. After WorkRoot approves access and supplies private registry instructions, install the release-aligned package:

    bun add @wrnexus/ui@0.2.24

    Request preview access. Never put registry tokens in source control.

    First-party Wire UI component library — a set of themeable .wrn components plus a single tokenized stylesheet.

    Part of the WRNexusJS framework — an SSR-first, Bun-native full-stack web framework.

    Overview

    @wrnexus/ui ships a library of server-rendered .wrn components (layout, form controls, and feedback UI) together with one themeable stylesheet, ui.css. The components are auto-discovered by the framework router — you don't import them in code. Once the package's component directory is on the router's scan path, you mount any component in a page with data-component="<name>". Every visual is driven by var(--wire-*) theme tokens, so components restyle instantly when the theme changes. The tiny JS surface (src/index.ts) exists only so the toolchain (CLI build + dev server) can locate the component directory and stylesheet.

    @@ -99,20 +99,17 @@ declare function uiCss(): string; declare function uiComponentNames(): string[]; export { uiComponentNames, uiComponentsDir, uiCss, uiCssPath }; -

    Examples

    Examples are taken from this package's installed documentation and must be evaluated with its requirements and stability notes.

    Example 1

    bun add @wrnexus/ui

    Example 2

    "exports": {
    -  ".": "./src/index.ts",
    -  "./ui.css": "./ui.css"
    -}

    Example 3

    import { buildRouter } from "@wrnexus/router";
    +

    Examples

    Examples are taken from this package's installed documentation and must be evaluated with its requirements and stability notes.

    Auto-discovery

    import { buildRouter } from "@wrnexus/router";
     import { uiComponentsDir } from "@wrnexus/ui";
     
    -const router = buildRouter(appDir, { componentDirs: [uiComponentsDir()] });

    Example 4

    <div data-component="card">
    +const router = buildRouter(appDir, { componentDirs: [uiComponentsDir()] });

    Mounting components in a page

    <div data-component="card">
       <div data-component="badge" label="New"></div>
       <button data-component="button" label="Save" variant="primary" size="lg"></button>
       <div data-component="alert" variant="success" title="Done" message="Saved."></div>
     </div>
    -
    WRNexusJS 0.2.23 · Private Developer Preview · Bun-native · Documentation generated from installed package APIs.
    +
    WRNexusJS 0.2.24 · Private Developer Preview · Bun-native · Documentation generated from installed package APIs.
    } } diff --git a/app/pages/packages/uploader.wrn b/app/pages/packages/uploader.wrn index 8bbcfc8a..996571b2 100644 --- a/app/pages/packages/uploader.wrn +++ b/app/pages/packages/uploader.wrn @@ -10,13 +10,14 @@ page wrnexusuploader {
    W WRNexusJS - +
    - -
    Data · Preview

    @wrnexus/uploader

    Validated local/S3 uploads and secure file serving.

    Private registry access required

    This package is not available from the public npm registry. After WorkRoot approves access and supplies private registry instructions, install the release-aligned package:

    bun add @wrnexus/uploader@0.2.23

    Request preview access. Never put registry tokens in source control.

    Config-driven file uploads + serving for WRNexusJS. Declare named storage stores (local disk or any S3-compatible backend) in wrnexus.config.ts, upload with one function call, drop a drag-and-drop widget on a page, and serve files back — public or private. Zero external dependencies (S3 is signed with a built-in AWS SigV4 implementation, like the rest of the framework).

    -

    Configure

    + +
    Data · Preview

    @wrnexus/uploader

    Validated local/S3 uploads and secure file serving.

    Private registry access required

    This package is not available from the public npm registry. After WorkRoot approves access and supplies private registry instructions, install the release-aligned package:

    bun add @wrnexus/uploader@0.2.24

    Request preview access. Never put registry tokens in source control.

    Config-driven file uploads + serving for WRNexusJS. Declare named storage stores (local disk or any S3-compatible backend) in wrnexus.config.ts, upload with one function call, drop a drag-and-drop widget on a page, and serve files back — public or private. Zero external dependencies (S3 is signed with a built-in AWS SigV4 implementation, like the rest of the framework).

    +

    Usage

    +

    Configure local and S3 stores

    // wrnexus.config.ts
     import type { AppConfig } from "@wrnexus/styles";
     
    @@ -46,7 +47,7 @@ const config: AppConfig = {
       },
     };
     export default config;
    -

    Upload (server)

    +

    Upload from an API route or server function

    // app/api/upload.ts — one-liner
     import { handleUpload } from "@wrnexus/uploader";
     export const POST = handleUpload({ store: "public" });
    @@ -56,7 +57,7 @@ import { upload, getStore } from "@wrnexus/uploader";
     const { files } = await upload("docs", ctx.req, { prefix: "invoices" });
     await getStore("docs").driver.delete(files[0].key);

    Uploads are validated (size + type), stored under a random, collision-proof, path-safe key (the client filename is never used as a path), and — for public stores — returned with a servable url.

    -

    Widget (client)

    +

    Add a client upload widget

    Drop the element anywhere; the runtime (drag-and-drop, per-file progress, success/failed states) is auto-injected on pages that contain data-uploader:

    <div
       data-uploader="public"
    @@ -78,7 +79,7 @@ await getStore("docs").driver.delete(files[0].key);
  • wrnexus:uploaddetail: { file, result: { key, url, name, size, type } }
  • wrnexus:upload-errordetail: { file, error }
  • -

    Serve files

    +

    Serve private files behind application authentication

    • Public + local → served automatically at /__wrnexus/uploads/<store>/<key> (immutable cache).
    • Public + S3url is the bucket/CDN URL directly.
    • @@ -372,7 +373,7 @@ declare function accepts(accept: string[] | undefined, file: { }): boolean; export { type LocalStoreConfig, type PutMeta, type S3StoreConfig, type StorageConfig, type StorageDriver, type Store, type StoreAccess, type StoreConfig, type StoredObject, UPLOADS_PREFIX, UPLOAD_JS_HREF, UPLOAD_RUNTIME, UploadError, type UploadOptions, type UploadedFile, accepts, configureStorage, contentTypeOf, encodeKey, extForType, extOf, getStore, handleUpload, hasStorage, localDriver, s3Driver, serveFromStore, serveStoredFile, sha256Hex, signS3, storeNames, storedUrl, upload }; -

    Examples

    Examples are taken from this package's installed documentation and must be evaluated with its requirements and stability notes.

    Example 1

    // wrnexus.config.ts
    +

    Examples

    Examples are taken from this package's installed documentation and must be evaluated with its requirements and stability notes.

    Configure local and S3 stores

    // wrnexus.config.ts
     import type { AppConfig } from "@wrnexus/styles";
     
     const config: AppConfig = {
    @@ -400,22 +401,30 @@ const config: AppConfig = {
         },
       },
     };
    -export default config;

    Example 2

    // app/api/upload.ts — one-liner
    +export default config;

    Upload from an API route or server function

    // app/api/upload.ts — one-liner
     import { handleUpload } from "@wrnexus/uploader";
     export const POST = handleUpload({ store: "public" });
    -// → { ok: true, files: [{ key, url, name, type, size }] }

    Example 3

    // or drive it yourself, anywhere you have the request
    +// → { ok: true, files: [{ key, url, name, type, size }] }

    Upload from an API route or server function

    // or drive it yourself, anywhere you have the request
     import { upload, getStore } from "@wrnexus/uploader";
     const { files } = await upload("docs", ctx.req, { prefix: "invoices" });
    -await getStore("docs").driver.delete(files[0].key);

    Example 4

    <div
    +await getStore("docs").driver.delete(files[0].key);

    Add a client upload widget

    <div
       data-uploader="public"
       data-endpoint="/api/upload"
       data-accept="image/*"
       data-max="10000000"
       data-multiple
    -></div>
    - +></div>

    Add a client upload widget

    <div
    +  data-component="file-upload"
    +  store="public"
    +  endpoint="/api/upload"
    +  accept="image/*"
    +  multiple="true"
    +></div>

    Serve private files behind application authentication

    // app/api/files/[key].ts
    +import { serveFromStore } from "@wrnexus/uploader";
    +export const GET = serveFromStore("docs"); // your middleware decides who gets in
    +
    -
    WRNexusJS 0.2.23 · Private Developer Preview · Bun-native · Documentation generated from installed package APIs.
    +
    WRNexusJS 0.2.24 · Private Developer Preview · Bun-native · Documentation generated from installed package APIs.
    } } diff --git a/app/pages/packages/validation.wrn b/app/pages/packages/validation.wrn index 87f3b776..083d850b 100644 --- a/app/pages/packages/validation.wrn +++ b/app/pages/packages/validation.wrn @@ -10,12 +10,12 @@ page wrnexusvalidation {
    W WRNexusJS - +
    - -
    Security · Preview

    @wrnexus/validation

    Typed schemas, coercion, validation, and browser descriptors.

    Private registry access required

    This package is not available from the public npm registry. After WorkRoot approves access and supplies private registry instructions, install the release-aligned package:

    bun add @wrnexus/validation@0.2.23

    Request preview access. Never put registry tokens in source control.

    One fluent schema, validated on the server (API bodies, env vars) and mirrored to an eval-free browser validator for forms.
    + +
    Security · Preview

    @wrnexus/validation

    Typed schemas, coercion, validation, and browser descriptors.

    Private registry access required

    This package is not available from the public npm registry. After WorkRoot approves access and supplies private registry instructions, install the release-aligned package:

    bun add @wrnexus/validation@0.2.24

    Request preview access. Never put registry tokens in source control.

    One fluent schema, validated on the server (API bodies, env vars) and mirrored to an eval-free browser validator for forms.

    Part of the WRNexusJS framework — an SSR-first, Bun-native full-stack web framework.

    Overview

    Define a schema once with the fluent v builder, then reuse it in three places: .parse() runs server-side and returns coerced values plus per-field errors; .describe() emits a plain-JSON SchemaDescriptor that the browser runtime interprets (no eval, no bundled validator); and helpers like parseBody and parseEnv wire schemas straight into API routes and startup config. The server rule logic (applyRule/checkField) and the client runtime (VALIDATE_RUNTIME) mirror each other exactly, so a form validates identically in both places. Schemas are conventionally kept in app/schemas/.

    @@ -309,15 +309,42 @@ declare function parseBody<T = Record<string, unknown>>(schema: Obje }>; export { type FieldDescriptor, ObjectSchema, type ParseResult, type RuleDescriptor, type SchemaDescriptor, VALIDATE_RUNTIME, applyRule, checkField, invalid, parseBody, parseEnv, renderSchemasScript, v }; -

    Examples

    Examples are taken from this package's installed documentation and must be evaluated with its requirements and stability notes.

    Example 1

    bun add @wrnexus/validation

    Example 2

    import { v } from "@wrnexus/validation";

    Example 3

    schema.parse(input: unknown): ParseResult
    -schema.describe(): SchemaDescriptor

    Example 4

    interface ParseResult<T = Record<string, unknown>> {
    -  ok: boolean; // true when errors is empty
    -  value: T; // coerced values (present pass or fail)
    -  errors: Record<string, string>; // field name → first failing message
    -}
    +

    Examples

    Examples are taken from this package's installed documentation and must be evaluated with its requirements and stability notes.

    Define a schema and validate an API body

    import { v, parseBody } from "@wrnexus/validation";
    +
    +export const signupSchema = v.object({
    +  email: v.string().required("Enter your email address").trim().email(),
    +  password: v.string().required("Enter your password").min(8).max(200),
    +  age: v.number().integer().min(13).max(120).optional(),
    +  role: v.string().oneOf(["user", "admin"]).default("user"),
    +  agree: v.boolean(),
    +});
    +
    +// inside a route handler
    +const result = await parseBody(signupSchema, req);
    +if (!result.ok) return result.response; // ready 400 with field errors
    +const { email, password, role } = result.value;

    Server-only refinement

    const schema = v.object({
    +  username: v
    +    .string()
    +    .min(3)
    +    .refine((name) => !RESERVED.has(String(name)), "That name is taken"),
    +});

    Validate environment at startup

    import { v, parseEnv } from "@wrnexus/validation";
    +
    +export const env = parseEnv(
    +  v.object({
    +    DATABASE_URL: v.string().min(1),
    +    PORT: v.number().integer().default(3000),
    +    DEBUG: v.boolean().optional(),
    +  }),
    +);
    +// throws one readable error listing every bad variable if misconfigured

    Wire the same schema into the browser

    import { renderSchemasScript, VALIDATE_RUNTIME } from "@wrnexus/validation";
    +import { signupSchema } from "./app/schemas/signup.ts";
    +
    +const head = `<script>${renderSchemasScript({ signup: signupSchema.describe() })}</script>
    +<script>${VALIDATE_RUNTIME}</script>`;
    +// render a <form data-schema="signup"> with [data-error="email"] etc.
    -
    WRNexusJS 0.2.23 · Private Developer Preview · Bun-native · Documentation generated from installed package APIs.
    +
    WRNexusJS 0.2.24 · Private Developer Preview · Bun-native · Documentation generated from installed package APIs.
    } } diff --git a/app/pages/releases/0.2.24.wrn b/app/pages/releases/0.2.24.wrn new file mode 100644 index 00000000..4bb45e65 --- /dev/null +++ b/app/pages/releases/0.2.24.wrn @@ -0,0 +1,16 @@ +page Release0224 { + seo { + title = "Release 0.2.24" + description = "WRNexusJS 0.2.24 release notes." + canonical = "https://wrnexusjs.dev/releases/0.2.24" + } + view { + +
    +
    W WRNexusJS
    + +

    WRNexusJS 0.2.24

    Released 2026-07-13. All 26 installed packages are aligned to this version. Highlights include the new helpers package, reliable workspace app addition, and browser SSO redirects through forward authentication. See the changelog, upgrade guide, and package references.

    + +
    + } +} \ No newline at end of file diff --git a/app/pages/roadmap.wrn b/app/pages/roadmap.wrn index ea24fd24..15635daf 100644 --- a/app/pages/roadmap.wrn +++ b/app/pages/roadmap.wrn @@ -7,10 +7,10 @@ page Roadmap { view {
    -
    W WRNexusJS
    +
    W WRNexusJS

    Roadmap

    Roadmap items are direction, not delivery commitments. Dates require explicit owner approval.

    Now

    • Private preview onboarding and accurate package references
    • Runnable documentation fixtures and link/accessibility checks
    • License, support, and disclosure owner decisions

    Next

    • Durable queue driver guidance
    • Expanded database/auth/realtime examples
    • Versioned release notes and migration fixtures

    Later / exploration

    • Historical documentation selector
    • Maintained reproducible benchmarks
    • Broader mobile/native coverage
    - +
    } } \ No newline at end of file diff --git a/app/pages/search.wrn b/app/pages/search.wrn index 7043b5f7..5c511da5 100644 --- a/app/pages/search.wrn +++ b/app/pages/search.wrn @@ -7,10 +7,10 @@ page Search { view {
    -
    W WRNexusJS
    +
    W WRNexusJS

    Search documentation

    This build-time index is local and sends no query to a third party. Use your browser’s find command to filter this compact index.

    Core documentation

    Get started · Packages · Language · Architecture

    Guides

    Project structure · Routing · Pages and components · Server data · API routes · Middleware · Forms and validation · Authentication · Authorization · Application security · Database · Uploads · Realtime · Pub/sub · Queues · Testing · Workspaces and gateway · Deployment · Configuration and profiles · Internationalization and themes · Mobile · Observability · Upgrading · Troubleshooting

    Package APIs

    @wrnexus/ai · @wrnexus/authz · @wrnexus/compiler · @wrnexus/core · @wrnexus/csr · @wrnexus/db · @wrnexus/dev-server · @wrnexus/encryption · @wrnexus/helpers · @wrnexus/i18n · @wrnexus/jwt · @wrnexus/mobile · @wrnexus/native · @wrnexus/oauth · @wrnexus/pubsub · @wrnexus/queue · @wrnexus/reactive · @wrnexus/router · @wrnexus/ssr · @wrnexus/styles · @wrnexus/test · @wrnexus/tracking · @wrnexus/ui · @wrnexus/uploader · @wrnexus/validation · @wrnexus/cli

    - +
    } } \ No newline at end of file diff --git a/app/pages/security.wrn b/app/pages/security.wrn index d1cc9073..86ba0745 100644 --- a/app/pages/security.wrn +++ b/app/pages/security.wrn @@ -7,10 +7,10 @@ page Security { view {
    -
    W WRNexusJS
    +
    W WRNexusJS
    -

    Security

    WRNexusJS provides primitives for CSP, CSRF, Trusted Types, sessions, validation, authorization, encryption, upload restrictions, request limits, and WebSocket-origin checks. Applications remain responsible for correct configuration, business authorization, secrets, dependencies, data protection, and operations.

    Supported releases

    Only the current private-preview release 0.2.23 is documented here. A formal old-release support window is not yet published.

    Report a vulnerability

    Use WorkRoot’s approved private contact path at workroot.in. Do not publish exploit details or secrets. Include affected version, impact, reproduction, and a safe contact method. Response targets, encryption key, bounty, audit, and certification are not currently claimed.

    Deployment controls

    Use restrictive CSP and permissions policies, HSTS only on HTTPS production origins, MIME sniffing protection, restrictive referrers, explicit CORS, secure cookies, CSRF validation, request limits, and origin checks. See application security.

    - +

    Security

    WRNexusJS provides primitives for CSP, CSRF, Trusted Types, sessions, validation, authorization, encryption, upload restrictions, request limits, and WebSocket-origin checks. Applications remain responsible for correct configuration, business authorization, secrets, dependencies, data protection, and operations.

    Supported releases

    Only the current private-preview release 0.2.24 is documented here. A formal old-release support window is not yet published.

    Report a vulnerability

    Use WorkRoot’s approved private contact path at workroot.in. Do not publish exploit details or secrets. Include affected version, impact, reproduction, and a safe contact method. Response targets, encryption key, bounty, audit, and certification are not currently claimed.

    Deployment controls

    Use restrictive CSP and permissions policies, HSTS only on HTTPS production origins, MIME sniffing protection, restrictive referrers, explicit CORS, secure cookies, CSRF validation, request limits, and origin checks. See application security.

    +
    } } \ No newline at end of file diff --git a/app/pages/showcase.wrn b/app/pages/showcase.wrn index 4e026152..3ccd8b61 100644 --- a/app/pages/showcase.wrn +++ b/app/pages/showcase.wrn @@ -7,10 +7,10 @@ page Showcase { view {
    -
    W WRNexusJS
    +
    W WRNexusJS
    -

    Showcase

    Only confirmed public properties are listed; no customer or traffic claims are made.

    WorkRoot

    Creator/company site demonstrating a public WRNexusJS deployment. Exact deployed version and infrastructure notes await owner confirmation.

    WRNexusJS docs

    This documentation portal, built and verified against WRNexusJS 0.2.23 on Bun.

    Screenshots are intentionally deferred until approved assets and alt text are available.

    - +

    Showcase

    Only confirmed public properties are listed; no customer or traffic claims are made.

    WorkRoot

    Creator/company site demonstrating a public WRNexusJS deployment. Exact deployed version and infrastructure notes await owner confirmation.

    WRNexusJS docs

    This documentation portal, built and verified against WRNexusJS 0.2.24 on Bun.

    Screenshots are intentionally deferred until approved assets and alt text are available.

    +
    } } \ No newline at end of file diff --git a/app/pages/support.wrn b/app/pages/support.wrn index a5cd84f2..94f5630b 100644 --- a/app/pages/support.wrn +++ b/app/pages/support.wrn @@ -7,10 +7,10 @@ page Support { view {
    -
    W WRNexusJS
    +
    W WRNexusJS

    Support

    WRNexusJS has no public Discord, public issue tracker, or guaranteed community support channel listed by this repository. Preview access and support begin through WorkRoot’s public contact path.

    Include WRNexusJS version, Bun version, OS, a minimal reproduction, expected and actual behavior, and sanitized logs. Never include registry tokens, credentials, session cookies, or private data.

    Support scope, service levels, and commercial terms require owner confirmation.

    - +
    } } \ No newline at end of file diff --git a/app/pages/tutorial.wrn b/app/pages/tutorial.wrn index 798b6e70..ad952a1c 100644 --- a/app/pages/tutorial.wrn +++ b/app/pages/tutorial.wrn @@ -7,9 +7,9 @@ page Tutorial { view {
    -
    W WRNexusJS
    +
    W WRNexusJS
    -
    Preview · runnable-project extraction pending

    Secure task board

    This tutorial connects the installed 0.2.23 APIs into one design. Snippets are limited to declarations and README patterns verified in the installed packages; a CI-compiled standalone fixture remains on the roadmap.

    Application shape

    A .wrn page renders tasks from an SSR API binding. A shared validation schema protects mutations. Session middleware identifies users, authorization policies gate updates, and a realtime room broadcasts changes.

    Schema and create route

    import { v, parseBody } from "@wrnexus/validation";
    +      
    Preview · runnable-project extraction pending

    Secure task board

    This tutorial connects the installed 0.2.24 APIs into one design. Snippets are limited to declarations and README patterns verified in the installed packages; a CI-compiled standalone fixture remains on the roadmap.

    Application shape

    A .wrn page renders tasks from an SSR API binding. A shared validation schema protects mutations. Session middleware identifies users, authorization policies gate updates, and a realtime room broadcasts changes.

    Schema and create route

    import { v, parseBody } from "@wrnexus/validation";
     const task = v.object({ title: v.string().trim().min(3).max(120) });
     export const POST = async (ctx) => {
       const parsed = await parseBody(task, ctx.req);
    @@ -23,7 +23,7 @@ export const POST = async (ctx) => {
         </ul></main>
       }
     }

    Production checklist

    • Choose SQLite for local development or configure the supported PostgreSQL driver.
    • Run migrations before accepting traffic.
    • Enable session authentication and enforce authorization on every mutation.
    • Validate upload types and sizes; keep private objects behind authenticated routes.
    • Use Redis pub/sub when realtime rooms span processes.
    • Treat the default queue as non-durable until a production driver is selected.

    Follow the focused database, authentication, authorization, realtime, and upload guides.

    - +
    } } \ No newline at end of file diff --git a/bun.lock b/bun.lock index 7ecef094..680dbcb5 100644 --- a/bun.lock +++ b/bun.lock @@ -5,38 +5,38 @@ "": { "name": "wrnexusjs", "dependencies": { - "@wrnexus/ai": "^0.2.23", - "@wrnexus/authz": "^0.2.23", - "@wrnexus/compiler": "^0.2.23", - "@wrnexus/core": "^0.2.23", - "@wrnexus/csr": "^0.2.23", - "@wrnexus/db": "^0.2.23", - "@wrnexus/dev-server": "^0.2.23", - "@wrnexus/encryption": "^0.2.23", - "@wrnexus/helpers": "^0.2.23", - "@wrnexus/i18n": "^0.2.23", - "@wrnexus/jwt": "^0.2.23", - "@wrnexus/mobile": "^0.2.23", - "@wrnexus/native": "^0.2.23", - "@wrnexus/oauth": "^0.2.23", - "@wrnexus/pubsub": "^0.2.23", - "@wrnexus/queue": "^0.2.23", - "@wrnexus/reactive": "^0.2.23", - "@wrnexus/router": "^0.2.23", - "@wrnexus/ssr": "^0.2.23", - "@wrnexus/styles": "^0.2.23", - "@wrnexus/test": "^0.2.23", - "@wrnexus/tracking": "^0.2.23", - "@wrnexus/ui": "^0.2.23", - "@wrnexus/uploader": "^0.2.23", - "@wrnexus/validation": "^0.2.23", + "@wrnexus/ai": "^0.2.24", + "@wrnexus/authz": "^0.2.24", + "@wrnexus/compiler": "^0.2.24", + "@wrnexus/core": "^0.2.24", + "@wrnexus/csr": "^0.2.24", + "@wrnexus/db": "^0.2.24", + "@wrnexus/dev-server": "^0.2.24", + "@wrnexus/encryption": "^0.2.24", + "@wrnexus/helpers": "^0.2.24", + "@wrnexus/i18n": "^0.2.24", + "@wrnexus/jwt": "^0.2.24", + "@wrnexus/mobile": "^0.2.24", + "@wrnexus/native": "^0.2.24", + "@wrnexus/oauth": "^0.2.24", + "@wrnexus/pubsub": "^0.2.24", + "@wrnexus/queue": "^0.2.24", + "@wrnexus/reactive": "^0.2.24", + "@wrnexus/router": "^0.2.24", + "@wrnexus/ssr": "^0.2.24", + "@wrnexus/styles": "^0.2.24", + "@wrnexus/test": "^0.2.24", + "@wrnexus/tracking": "^0.2.24", + "@wrnexus/ui": "^0.2.24", + "@wrnexus/uploader": "^0.2.24", + "@wrnexus/validation": "^0.2.24", }, "devDependencies": { "@eslint/js": "^9.0.0", "@tailwindcss/cli": "^4.0.0", "@types/bun": "latest", "@types/node": "^26.1.1", - "@wrnexus/cli": "^0.2.23", + "@wrnexus/cli": "^0.2.24", "eslint": "^9.0.0", "prettier": "latest", "tailwindcss": "^4.0.0", @@ -170,57 +170,57 @@ "@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.23", "", {}, "sha512-MLyiG7RD8D+uJ39eOA0T0jrufwFrO1EyQ7sOsgYjJSSzZJ539PPYRN0Ao1Kza/p9BOXAEfS5roGZrpINc/UB+A=="], + "@wrnexus/ai": ["@wrnexus/ai@0.2.24", "", {}, "sha512-q1I5KzP6IpPFBJ8EnwiOf7nfnkN4Ja2p/CjTZiwRP6t3O3HWnyQ01iDVF1iVsU0657BkKalUSiuUTiAxOiW05A=="], - "@wrnexus/authz": ["@wrnexus/authz@0.2.23", "", {}, "sha512-0eBlk8ZHr/Mdgpmgyex0xAdDER5eUzpTWt64Ul6AJW2QRZVPtTr/h7P0bZ0kGIGHceWIyHkd6RTInEJqUMNaKw=="], + "@wrnexus/authz": ["@wrnexus/authz@0.2.24", "", {}, "sha512-iBlQGzIl8kYg7PKUxBmbSyJ6m/H8x6wsHi76ER0rJxBuhoUcxNm+vX7FFS6wpyq3ARTYI56398vtUDiqewEkdQ=="], - "@wrnexus/cli": ["@wrnexus/cli@0.2.23", "", { "dependencies": { "@wrnexus/compiler": "^0.2.23", "@wrnexus/core": "^0.2.23", "@wrnexus/csr": "^0.2.23", "@wrnexus/db": "^0.2.23", "@wrnexus/dev-server": "^0.2.23", "@wrnexus/i18n": "^0.2.23", "@wrnexus/router": "^0.2.23", "@wrnexus/styles": "^0.2.23", "@wrnexus/ui": "^0.2.23", "@wrnexus/validation": "^0.2.23" }, "bin": { "wrnexus": "dist/index.js" } }, "sha512-r/ltDJA0ue2HKzdPLx52BX7QxfVTLq7xaxZSHlmXZ/CBSF13sN9AyDqRvgtiZ241u4MKcMPNld/3KXoq6KJ5XQ=="], + "@wrnexus/cli": ["@wrnexus/cli@0.2.24", "", { "dependencies": { "@wrnexus/compiler": "^0.2.24", "@wrnexus/core": "^0.2.24", "@wrnexus/csr": "^0.2.24", "@wrnexus/db": "^0.2.24", "@wrnexus/dev-server": "^0.2.24", "@wrnexus/i18n": "^0.2.24", "@wrnexus/router": "^0.2.24", "@wrnexus/styles": "^0.2.24", "@wrnexus/ui": "^0.2.24", "@wrnexus/validation": "^0.2.24" }, "bin": { "wrnexus": "dist/index.js" } }, "sha512-+OjK/2LUH52d21gFU6FPLUxelIRvgCZctTIG7IfsBgr2V40hfFTeNj3Dt5rscBNhRD6p4t1H2zRRa5T8bWNdIA=="], - "@wrnexus/compiler": ["@wrnexus/compiler@0.2.23", "", {}, "sha512-AK6uDH+EQaK/dg1kvNeSdSaMGc0vWzLiL2NF/gMUlvPDq9S7K5+OJQYt4v+hKS9mc/awwZo9hm5cqB6LCTPCGw=="], + "@wrnexus/compiler": ["@wrnexus/compiler@0.2.24", "", {}, "sha512-gWkv/kX7xknhpr0pZ+C5vFMnpoFSsSQzqHvEi3pXVXZR7AY7fPutJ4dLqBP/KBXqfLmjK/D/qNmBuTsFr7/CNg=="], - "@wrnexus/core": ["@wrnexus/core@0.2.23", "", {}, "sha512-RAXsCoI3F6xc/ejLU68UMRAQuJC5mD/9QI25IoXP3C0ifwDVCoSu3w9yTVECzpwCnqfMAaiMr4AG/W62v13bBw=="], + "@wrnexus/core": ["@wrnexus/core@0.2.24", "", {}, "sha512-NEbdz595nyEbRkdk1cEuF2Y3wIZeaWcjJMNncsJwKOwixCJ4ABLiRzQMrZo5TEfRO9dVKm7ZulW/3yW6hYuDMA=="], - "@wrnexus/csr": ["@wrnexus/csr@0.2.23", "", { "dependencies": { "@wrnexus/core": "^0.2.23" } }, "sha512-zKOiIdy8ZdW3Q7qpP+BmAFZsQM8VJbIQhwtREpFgAc523BWCnytLmBoXvZa9tbwjDaRGS8SbxCgkK+K2ChcJkw=="], + "@wrnexus/csr": ["@wrnexus/csr@0.2.24", "", { "dependencies": { "@wrnexus/core": "^0.2.24" } }, "sha512-ZPO1l0ikZWOze3Vq1qeFVXBFoxESrD4mf4nI0YnWKbzzKXZ+px3xNkt89SsXWjwN0ZsPz+f53v6oLeaaQJULpg=="], - "@wrnexus/db": ["@wrnexus/db@0.2.23", "", {}, "sha512-hQKC9PgdNr1lOglx5YyqgpGMXebS/KfytqLie6yXFSS5JbZipzyfqhZ3S0t+ffWdbG5OdAibFEO0QKgxQ8Oqgw=="], + "@wrnexus/db": ["@wrnexus/db@0.2.24", "", {}, "sha512-eV0swP/TZLHkr33Mb6fKXUaX4OaTsxV/SFJ4jkzIRwOfU1pVrDwys9wYDnwFdd01py4g2Z0GH/NoXdUAaATtVw=="], - "@wrnexus/dev-server": ["@wrnexus/dev-server@0.2.23", "", { "dependencies": { "@wrnexus/compiler": "^0.2.23", "@wrnexus/core": "^0.2.23", "@wrnexus/csr": "^0.2.23", "@wrnexus/db": "^0.2.23", "@wrnexus/i18n": "^0.2.23", "@wrnexus/pubsub": "^0.2.23", "@wrnexus/router": "^0.2.23", "@wrnexus/ssr": "^0.2.23", "@wrnexus/styles": "^0.2.23", "@wrnexus/ui": "^0.2.23", "@wrnexus/uploader": "^0.2.23", "@wrnexus/validation": "^0.2.23" } }, "sha512-4rj5VR8u76c/cHZShZzxjbbetkY1DiO+XCPONqAnD/i+i0PmR16fQ/f+ZkFm9pwpOFt0cUb7pg6yJp9yNX/IJg=="], + "@wrnexus/dev-server": ["@wrnexus/dev-server@0.2.24", "", { "dependencies": { "@wrnexus/compiler": "^0.2.24", "@wrnexus/core": "^0.2.24", "@wrnexus/csr": "^0.2.24", "@wrnexus/db": "^0.2.24", "@wrnexus/i18n": "^0.2.24", "@wrnexus/pubsub": "^0.2.24", "@wrnexus/router": "^0.2.24", "@wrnexus/ssr": "^0.2.24", "@wrnexus/styles": "^0.2.24", "@wrnexus/ui": "^0.2.24", "@wrnexus/uploader": "^0.2.24", "@wrnexus/validation": "^0.2.24" } }, "sha512-Hjsszh+99HYzVZ9womkAVcd0yMzjcZlHeyYYcuDs7jL6VDAUoZWTIDsclQOA37zRnLa0+ZMZg8nSO7BTSEWvOQ=="], - "@wrnexus/encryption": ["@wrnexus/encryption@0.2.23", "", {}, "sha512-TGA2KlVyDTvazBccMOPtuonGqYmjDzsDJw0+wH9qp43AT2uPqn21U46QuhMKqvYArNJhSSsY/S3mx9OpKU+n0g=="], + "@wrnexus/encryption": ["@wrnexus/encryption@0.2.24", "", {}, "sha512-AlN0vbKGc4f9EmsaqB2KeriQhcBWyr9rAiY9NY1u6VjSKRgB3HElX71wX5hhOZ1qC7rZC/HeSGrbly5K1kgRqg=="], - "@wrnexus/helpers": ["@wrnexus/helpers@0.2.23", "", { "dependencies": { "@wrnexus/core": "^0.2.23" } }, "sha512-VMR/pgN9Yp+qlpuX5pkLzfAoxp6/Rfd3HeVM+q6RqI0Ek8caoPX3AT2p4ST0P9roTenBYcJVJgnVoiHtDWwnpw=="], + "@wrnexus/helpers": ["@wrnexus/helpers@0.2.24", "", { "dependencies": { "@wrnexus/core": "^0.2.24" } }, "sha512-VQO7IpaqHZdfslpYPYWBjbuHWf0gqd9cB8aD+kCIEntkMAvWmQlJClWClCRtRNamvU1urrb/gA/Vz7zh+WbpcQ=="], - "@wrnexus/i18n": ["@wrnexus/i18n@0.2.23", "", { "dependencies": { "@wrnexus/core": "^0.2.23" } }, "sha512-VriwAdx8kKXQ7brlpK+CzZMq5Ue7kSJnJ0Txnvke+HDDk63QSKGfh8wgN3nwJQFs/ZxwwwADPR16u0o7njIkpg=="], + "@wrnexus/i18n": ["@wrnexus/i18n@0.2.24", "", { "dependencies": { "@wrnexus/core": "^0.2.24" } }, "sha512-t9/G7zzYw31wRPTC+drZLYlLzPhiz7Ba/K73mmxSr5v7TTU/vUtl6fx3U+yhB7zs916BSIV02Gj0JRYvQa1Ymg=="], - "@wrnexus/jwt": ["@wrnexus/jwt@0.2.23", "", {}, "sha512-VPbY5uFvfPUWU/UlbWd3qz6E1WpRbFbPd1gI8qvnSCC24pRIrDEPKwEikEu0DZVaeaEnUDhqbUIXk7+h6zWJZg=="], + "@wrnexus/jwt": ["@wrnexus/jwt@0.2.24", "", {}, "sha512-8wZKcS+uxi6KzLtNUqx9UO0gK4SyI8ATxCT7OzJdM8M1WiMsEVs/jmHoEDsfUy9f+1jJnkZvEFFnMEKuWweVIg=="], - "@wrnexus/mobile": ["@wrnexus/mobile@0.2.23", "", { "dependencies": { "@wrnexus/native": "^0.2.23" } }, "sha512-KcwuTLdVR02db04Xg08Jeg3hR+Xkn7rgD9IlujjC/mo9f1MfwnUm1RTKvpqx55jPo87CWqrPHvhtY35xppXACw=="], + "@wrnexus/mobile": ["@wrnexus/mobile@0.2.24", "", { "dependencies": { "@wrnexus/native": "^0.2.24" } }, "sha512-VkGXukM/Wqcs/lbM4EgBTg6eNssylnRZZkmZ5/Zd9lRgkllX6rX5fSDjmnEu05ytwMElmrsHJDREeHv8VOZSvQ=="], - "@wrnexus/native": ["@wrnexus/native@0.2.23", "", {}, "sha512-kUCzJ/jwx1392v1mTUMx2K8KE11vahUALysEDiN1YheYuiirpVyCWnOZrJ1hsPLKQeA/rytpMJ66UKvZ8YncTg=="], + "@wrnexus/native": ["@wrnexus/native@0.2.24", "", {}, "sha512-cxdXwkN8ZiTaqszGOggWEtnaJFMXaKNo+xi5A3uL/fTQvgYbbitaGh6zdBZ37SPjv0edPRouFm4+FRunKMO1Nw=="], - "@wrnexus/oauth": ["@wrnexus/oauth@0.2.23", "", {}, "sha512-FYe+pVYizoHpnKTtrLVbpeFNJpnEu0kVpYopFmAPvDS7MGJHAgtt35KQKYELJOplrN6tjfZbxzNVplCEJUvA5A=="], + "@wrnexus/oauth": ["@wrnexus/oauth@0.2.24", "", {}, "sha512-F5FrtnxhFmYXLSDvvBAn2wWfFfp7KSKjUbk41+QgMLyhh1gsPiqTxNjM0iRQB2ayfsk0ZMWWgUVRPntzsOo7EA=="], - "@wrnexus/pubsub": ["@wrnexus/pubsub@0.2.23", "", {}, "sha512-bArH5IvVo9vKFpG40lwqFOfY/0swqXI0PYiiRzgxQzoVfq7hP/swVyUhYQGrBdBX16kW8DkDQJ+uQv8XPflHRg=="], + "@wrnexus/pubsub": ["@wrnexus/pubsub@0.2.24", "", {}, "sha512-wA/JjSoxgfo5d0jUoYrPtQsg0lOosS8zMzSrY8nBL3SOCK6TkX0/DQmAyJJdbib5sM/t/tckO6uWjhNJ8XJeqw=="], - "@wrnexus/queue": ["@wrnexus/queue@0.2.23", "", {}, "sha512-LmW2rqs928fH/EXXBS9fbnxP5gxaAdZfOLaaFvjnckfaX61BaRckJ1QqToRJenyns75WIlaSl8qRcKRatEUieQ=="], + "@wrnexus/queue": ["@wrnexus/queue@0.2.24", "", {}, "sha512-MQZZC9jb4nA2/4LussT3IqXqvlFKQpRuTqK65DaSg1LLD3q6IcBjr6TyGVuaNLLHYdkgJPuEPZ6CTD256+ZtXQ=="], - "@wrnexus/reactive": ["@wrnexus/reactive@0.2.23", "", {}, "sha512-QTimrmgyCoLtGK+HDdLj0YfSIlNZglWVl7BP1uW5LPvZzXBUHTseASjQZs0CYPKLYnCpKi0MNw4ypfMgfZ49ug=="], + "@wrnexus/reactive": ["@wrnexus/reactive@0.2.24", "", {}, "sha512-ogReYbhX9MLTpc3CSfpTS+J9XjK0UKP/RxTGR+w8uoEp8+zwjGfMAJuqbepSYhm+yHnNe+NWgL8nxJkPS8T0DA=="], - "@wrnexus/router": ["@wrnexus/router@0.2.23", "", { "dependencies": { "@wrnexus/compiler": "^0.2.23", "@wrnexus/core": "^0.2.23" } }, "sha512-8jmITJzEoHSNA1BiOAIoGxtr0RNrswkUGmEaZ4RKA68DLXQ1QSDutS4o/+bwLKAlJulHMyBfgzvnzvJF3a8UaA=="], + "@wrnexus/router": ["@wrnexus/router@0.2.24", "", { "dependencies": { "@wrnexus/compiler": "^0.2.24", "@wrnexus/core": "^0.2.24" } }, "sha512-eh46ZH2Mn0ZDWsYEgmWcB8/0aYPVd5FkXBAq4RXDoo5WOSLjUD8xfaRVkkl2jC3zaJUbqnaHFuvOAlr1tDuVQg=="], - "@wrnexus/ssr": ["@wrnexus/ssr@0.2.23", "", { "dependencies": { "@wrnexus/core": "^0.2.23" } }, "sha512-yazF7n4s/grM5MEjPbZeM/wBEbYi5OWQrQUaMRJ/0lKKpQRh01YbH83MOPXnjB3ZvKcyktjkh92RSo5KSAhmlA=="], + "@wrnexus/ssr": ["@wrnexus/ssr@0.2.24", "", { "dependencies": { "@wrnexus/core": "^0.2.24" } }, "sha512-ogJ6ipp50SHXjLYAGDkqlzSectdFVJ1PpygJesEsqL//ijh1Oq0KnL8PlPxJ68BniP370reakh/knDxIIydZTg=="], - "@wrnexus/styles": ["@wrnexus/styles@0.2.23", "", { "dependencies": { "@wrnexus/uploader": "^0.2.23" } }, "sha512-DOuyLFM9WnbBu6vAEW8s93UxDah/k7ggMTFoSTK4Do49yxrXUoZxhD764k6MeQzgMslbbr5Y94QP1qik7Ojagg=="], + "@wrnexus/styles": ["@wrnexus/styles@0.2.24", "", { "dependencies": { "@wrnexus/uploader": "^0.2.24" } }, "sha512-hG5gBvOI3C1XzeknaT8+3zILQxwOrQhcVoEqpMAaszrppZKurXdJqL93Vx5Y8K0rOThv54h5/WBt+a1qpPuR9Q=="], - "@wrnexus/test": ["@wrnexus/test@0.2.23", "", {}, "sha512-d0o30955b6Ff+mfDEj6K67Ihv8cGLmCRmTEaYueJ3nsrbW2NCfn7svA8DBm8Pl2SIezNPSvPMXxPo5+hdqS++g=="], + "@wrnexus/test": ["@wrnexus/test@0.2.24", "", {}, "sha512-DCclD3UwE7HIQfrqcuo6Q9I8WmGqWH8DExz58CV2Ns8+YwwaGGVGIuMZEOZFv70WgN1aIp825rWDA4dGq5eomA=="], - "@wrnexus/tracking": ["@wrnexus/tracking@0.2.23", "", {}, "sha512-ZlEcfAICXqG5ji23qhVTmRo9HX/2cEvVa/tXJk0HuCtUBuRzi9HoskGFZ85zTLTSUTQ+NnY2xucpHq+cf7OQ/Q=="], + "@wrnexus/tracking": ["@wrnexus/tracking@0.2.24", "", {}, "sha512-j8GwR7VuiNL9UWTjJ4LzmalC1YcrSjW2T2RUHBJF0uciKj/iZoV7XfPfLk8nxfTcpo57/QOhiJ9k8Cz4PpZP0Q=="], - "@wrnexus/ui": ["@wrnexus/ui@0.2.23", "", { "dependencies": { "@wrnexus/core": "^0.2.23" } }, "sha512-UBRIcTIKP1zWhmftRv9JdjEfDDAtBJq7qx0zYnWXPGCTSr4qt1/3yXyF0yVrhKJglRCqpTb2zrfWlvvxyskUtA=="], + "@wrnexus/ui": ["@wrnexus/ui@0.2.24", "", { "dependencies": { "@wrnexus/core": "^0.2.24" } }, "sha512-1mYBM0PAdKDm4d3nvUn2E923kG8JYiwkpunLbDsBciTLBUHgBNyERglKnN6HUAANKAl4Vg2Wmi05IyQyDEyevg=="], - "@wrnexus/uploader": ["@wrnexus/uploader@0.2.23", "", { "dependencies": { "@wrnexus/core": "^0.2.23" } }, "sha512-vyQlfJ2WH5DqmsMuEtrRPHkUrIAETMp44BMo2se3zrtCXNejW7R+QB5z4h9ak4ixVqpF5WUIJZuHno3k8CLIlg=="], + "@wrnexus/uploader": ["@wrnexus/uploader@0.2.24", "", { "dependencies": { "@wrnexus/core": "^0.2.24" } }, "sha512-/6LGlnoU40+I7gsLibZMGWom+DHCRUtNg+/A4lGa2KkwW6FR6Xd3cyecbmxKXdLHrKvLhNp1vj1yB1nZKqAiqA=="], - "@wrnexus/validation": ["@wrnexus/validation@0.2.23", "", {}, "sha512-YqrYiMEU+h/q8Q6SVMEHwsB/jklwXEg64i1Qh4Ag65O157rrQ75oVCVeclVZsZIG4fM+sj0obDcTK8HEVDQKwA=="], + "@wrnexus/validation": ["@wrnexus/validation@0.2.24", "", {}, "sha512-4xRnEXf3eG7s05dQgBZOboRPskO59VayG8QcU40zyfZ9yCdJrEQS4RDWI5wFuos6yTawNz1FC+O37gpENWJbMw=="], "acorn": ["acorn@8.17.0", "", { "bin": { "acorn": "bin/acorn" } }, "sha512-xRQbDb9BnwDafYNn6Vwl839DYVjqXYb1XVGtWAZ1kcDc6iwAL4hg3B1dZlRiuENFeO2H53gFG3in621AdERVAg=="], diff --git a/docs/release-access-status.md b/docs/release-access-status.md index 5a2fd6d8..1216082d 100644 --- a/docs/release-access-status.md +++ b/docs/release-access-status.md @@ -2,6 +2,6 @@ ## Decision: Mode B — Private Developer Preview -Active version: 0.2.23, derived from package.json#wrnexus.version. All 26 installed @wrnexus packages resolve to 0.2.23 and npm reports restricted access. The repository remote is a private WorkRoot Git service and no public license file exists. +Active version: 0.2.24, derived from package.json#wrnexus.version. All 26 installed @wrnexus packages resolve to 0.2.24 and npm reports restricted access. The repository remote is a private WorkRoot Git service and no public license file exists. -External users cannot execute an installation without approved private registry credentials. The truthful CTA is Request preview access. After approval, the canonical command is bunx @wrnexus/cli@0.2.23 create my-app. Tokens must never appear in documentation or source. +External users cannot execute an installation without approved private registry credentials. The truthful CTA is Request preview access. After approval, the canonical command is bunx @wrnexus/cli@0.2.24 create my-app. Tokens must never appear in documentation or source. diff --git a/docs/site-audit.md b/docs/site-audit.md index 082e7f7b..79e392f3 100644 --- a/docs/site-audit.md +++ b/docs/site-audit.md @@ -1,6 +1,6 @@ # WRNexusJS site audit -Date: 2026-07-13. Baseline: Bun 1.3.14, framework 0.2.23. +Date: 2026-07-13. Baseline: Bun 1.3.14, framework 0.2.24. ## Baseline results @@ -12,7 +12,7 @@ Date: 2026-07-13. Baseline: Bun 1.3.14, framework 0.2.23. ## Findings -Package documentation, discovery assets, and AI-readable references are generated from the installed release. The 0.2.23 portal includes the helpers package, workspace app addition, and safe forward-auth login redirect guidance. +Package documentation, discovery assets, and AI-readable references are generated from the installed release. The 0.2.24 portal includes the helpers package, workspace app addition, and safe forward-auth login redirect guidance. ## Audit limitations diff --git a/package-lock.json b/package-lock.json index 21b9a195..bfaecbea 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,38 +8,38 @@ "name": "wrnexusjs", "version": "0.1.0", "dependencies": { - "@wrnexus/ai": "^0.2.23", - "@wrnexus/authz": "^0.2.23", - "@wrnexus/compiler": "^0.2.23", - "@wrnexus/core": "^0.2.23", - "@wrnexus/csr": "^0.2.23", - "@wrnexus/db": "^0.2.23", - "@wrnexus/dev-server": "^0.2.23", - "@wrnexus/encryption": "^0.2.23", - "@wrnexus/helpers": "^0.2.23", - "@wrnexus/i18n": "^0.2.23", - "@wrnexus/jwt": "^0.2.23", - "@wrnexus/mobile": "^0.2.23", - "@wrnexus/native": "^0.2.23", - "@wrnexus/oauth": "^0.2.23", - "@wrnexus/pubsub": "^0.2.23", - "@wrnexus/queue": "^0.2.23", - "@wrnexus/reactive": "^0.2.23", - "@wrnexus/router": "^0.2.23", - "@wrnexus/ssr": "^0.2.23", - "@wrnexus/styles": "^0.2.23", - "@wrnexus/test": "^0.2.23", - "@wrnexus/tracking": "^0.2.23", - "@wrnexus/ui": "^0.2.23", - "@wrnexus/uploader": "^0.2.23", - "@wrnexus/validation": "^0.2.23" + "@wrnexus/ai": "^0.2.24", + "@wrnexus/authz": "^0.2.24", + "@wrnexus/compiler": "^0.2.24", + "@wrnexus/core": "^0.2.24", + "@wrnexus/csr": "^0.2.24", + "@wrnexus/db": "^0.2.24", + "@wrnexus/dev-server": "^0.2.24", + "@wrnexus/encryption": "^0.2.24", + "@wrnexus/helpers": "^0.2.24", + "@wrnexus/i18n": "^0.2.24", + "@wrnexus/jwt": "^0.2.24", + "@wrnexus/mobile": "^0.2.24", + "@wrnexus/native": "^0.2.24", + "@wrnexus/oauth": "^0.2.24", + "@wrnexus/pubsub": "^0.2.24", + "@wrnexus/queue": "^0.2.24", + "@wrnexus/reactive": "^0.2.24", + "@wrnexus/router": "^0.2.24", + "@wrnexus/ssr": "^0.2.24", + "@wrnexus/styles": "^0.2.24", + "@wrnexus/test": "^0.2.24", + "@wrnexus/tracking": "^0.2.24", + "@wrnexus/ui": "^0.2.24", + "@wrnexus/uploader": "^0.2.24", + "@wrnexus/validation": "^0.2.24" }, "devDependencies": { "@eslint/js": "^9.0.0", "@tailwindcss/cli": "^4.0.0", "@types/bun": "latest", "@types/node": "^26.1.1", - "@wrnexus/cli": "^0.2.23", + "@wrnexus/cli": "^0.2.24", "eslint": "^9.0.0", "prettier": "latest", "tailwindcss": "^4.0.0", @@ -1219,40 +1219,40 @@ } }, "node_modules/@wrnexus/ai": { - "version": "0.2.23", - "resolved": "https://registry.npmjs.org/@wrnexus/ai/-/ai-0.2.23.tgz", - "integrity": "sha512-MLyiG7RD8D+uJ39eOA0T0jrufwFrO1EyQ7sOsgYjJSSzZJ539PPYRN0Ao1Kza/p9BOXAEfS5roGZrpINc/UB+A==", + "version": "0.2.24", + "resolved": "https://registry.npmjs.org/@wrnexus/ai/-/ai-0.2.24.tgz", + "integrity": "sha512-q1I5KzP6IpPFBJ8EnwiOf7nfnkN4Ja2p/CjTZiwRP6t3O3HWnyQ01iDVF1iVsU0657BkKalUSiuUTiAxOiW05A==", "license": "MIT", "engines": { "bun": ">=1.1.0" } }, "node_modules/@wrnexus/authz": { - "version": "0.2.23", - "resolved": "https://registry.npmjs.org/@wrnexus/authz/-/authz-0.2.23.tgz", - "integrity": "sha512-0eBlk8ZHr/Mdgpmgyex0xAdDER5eUzpTWt64Ul6AJW2QRZVPtTr/h7P0bZ0kGIGHceWIyHkd6RTInEJqUMNaKw==", + "version": "0.2.24", + "resolved": "https://registry.npmjs.org/@wrnexus/authz/-/authz-0.2.24.tgz", + "integrity": "sha512-iBlQGzIl8kYg7PKUxBmbSyJ6m/H8x6wsHi76ER0rJxBuhoUcxNm+vX7FFS6wpyq3ARTYI56398vtUDiqewEkdQ==", "license": "MIT", "engines": { "bun": ">=1.1.0" } }, "node_modules/@wrnexus/cli": { - "version": "0.2.23", - "resolved": "https://registry.npmjs.org/@wrnexus/cli/-/cli-0.2.23.tgz", - "integrity": "sha512-r/ltDJA0ue2HKzdPLx52BX7QxfVTLq7xaxZSHlmXZ/CBSF13sN9AyDqRvgtiZ241u4MKcMPNld/3KXoq6KJ5XQ==", + "version": "0.2.24", + "resolved": "https://registry.npmjs.org/@wrnexus/cli/-/cli-0.2.24.tgz", + "integrity": "sha512-+OjK/2LUH52d21gFU6FPLUxelIRvgCZctTIG7IfsBgr2V40hfFTeNj3Dt5rscBNhRD6p4t1H2zRRa5T8bWNdIA==", "dev": true, "license": "MIT", "dependencies": { - "@wrnexus/compiler": "^0.2.23", - "@wrnexus/core": "^0.2.23", - "@wrnexus/csr": "^0.2.23", - "@wrnexus/db": "^0.2.23", - "@wrnexus/dev-server": "^0.2.23", - "@wrnexus/i18n": "^0.2.23", - "@wrnexus/router": "^0.2.23", - "@wrnexus/styles": "^0.2.23", - "@wrnexus/ui": "^0.2.23", - "@wrnexus/validation": "^0.2.23" + "@wrnexus/compiler": "^0.2.24", + "@wrnexus/core": "^0.2.24", + "@wrnexus/csr": "^0.2.24", + "@wrnexus/db": "^0.2.24", + "@wrnexus/dev-server": "^0.2.24", + "@wrnexus/i18n": "^0.2.24", + "@wrnexus/router": "^0.2.24", + "@wrnexus/styles": "^0.2.24", + "@wrnexus/ui": "^0.2.24", + "@wrnexus/validation": "^0.2.24" }, "bin": { "wrnexus": "dist/index.js" @@ -1262,249 +1262,249 @@ } }, "node_modules/@wrnexus/compiler": { - "version": "0.2.23", - "resolved": "https://registry.npmjs.org/@wrnexus/compiler/-/compiler-0.2.23.tgz", - "integrity": "sha512-AK6uDH+EQaK/dg1kvNeSdSaMGc0vWzLiL2NF/gMUlvPDq9S7K5+OJQYt4v+hKS9mc/awwZo9hm5cqB6LCTPCGw==", + "version": "0.2.24", + "resolved": "https://registry.npmjs.org/@wrnexus/compiler/-/compiler-0.2.24.tgz", + "integrity": "sha512-gWkv/kX7xknhpr0pZ+C5vFMnpoFSsSQzqHvEi3pXVXZR7AY7fPutJ4dLqBP/KBXqfLmjK/D/qNmBuTsFr7/CNg==", "license": "MIT", "engines": { "bun": ">=1.1.0" } }, "node_modules/@wrnexus/core": { - "version": "0.2.23", - "resolved": "https://registry.npmjs.org/@wrnexus/core/-/core-0.2.23.tgz", - "integrity": "sha512-RAXsCoI3F6xc/ejLU68UMRAQuJC5mD/9QI25IoXP3C0ifwDVCoSu3w9yTVECzpwCnqfMAaiMr4AG/W62v13bBw==", + "version": "0.2.24", + "resolved": "https://registry.npmjs.org/@wrnexus/core/-/core-0.2.24.tgz", + "integrity": "sha512-NEbdz595nyEbRkdk1cEuF2Y3wIZeaWcjJMNncsJwKOwixCJ4ABLiRzQMrZo5TEfRO9dVKm7ZulW/3yW6hYuDMA==", "license": "MIT", "engines": { "bun": ">=1.1.0" } }, "node_modules/@wrnexus/csr": { - "version": "0.2.23", - "resolved": "https://registry.npmjs.org/@wrnexus/csr/-/csr-0.2.23.tgz", - "integrity": "sha512-zKOiIdy8ZdW3Q7qpP+BmAFZsQM8VJbIQhwtREpFgAc523BWCnytLmBoXvZa9tbwjDaRGS8SbxCgkK+K2ChcJkw==", + "version": "0.2.24", + "resolved": "https://registry.npmjs.org/@wrnexus/csr/-/csr-0.2.24.tgz", + "integrity": "sha512-ZPO1l0ikZWOze3Vq1qeFVXBFoxESrD4mf4nI0YnWKbzzKXZ+px3xNkt89SsXWjwN0ZsPz+f53v6oLeaaQJULpg==", "license": "MIT", "dependencies": { - "@wrnexus/core": "^0.2.23" + "@wrnexus/core": "^0.2.24" }, "engines": { "bun": ">=1.1.0" } }, "node_modules/@wrnexus/db": { - "version": "0.2.23", - "resolved": "https://registry.npmjs.org/@wrnexus/db/-/db-0.2.23.tgz", - "integrity": "sha512-hQKC9PgdNr1lOglx5YyqgpGMXebS/KfytqLie6yXFSS5JbZipzyfqhZ3S0t+ffWdbG5OdAibFEO0QKgxQ8Oqgw==", + "version": "0.2.24", + "resolved": "https://registry.npmjs.org/@wrnexus/db/-/db-0.2.24.tgz", + "integrity": "sha512-eV0swP/TZLHkr33Mb6fKXUaX4OaTsxV/SFJ4jkzIRwOfU1pVrDwys9wYDnwFdd01py4g2Z0GH/NoXdUAaATtVw==", "license": "MIT", "engines": { "bun": ">=1.1.0" } }, "node_modules/@wrnexus/dev-server": { - "version": "0.2.23", - "resolved": "https://registry.npmjs.org/@wrnexus/dev-server/-/dev-server-0.2.23.tgz", - "integrity": "sha512-4rj5VR8u76c/cHZShZzxjbbetkY1DiO+XCPONqAnD/i+i0PmR16fQ/f+ZkFm9pwpOFt0cUb7pg6yJp9yNX/IJg==", + "version": "0.2.24", + "resolved": "https://registry.npmjs.org/@wrnexus/dev-server/-/dev-server-0.2.24.tgz", + "integrity": "sha512-Hjsszh+99HYzVZ9womkAVcd0yMzjcZlHeyYYcuDs7jL6VDAUoZWTIDsclQOA37zRnLa0+ZMZg8nSO7BTSEWvOQ==", "license": "MIT", "dependencies": { - "@wrnexus/compiler": "^0.2.23", - "@wrnexus/core": "^0.2.23", - "@wrnexus/csr": "^0.2.23", - "@wrnexus/db": "^0.2.23", - "@wrnexus/i18n": "^0.2.23", - "@wrnexus/pubsub": "^0.2.23", - "@wrnexus/router": "^0.2.23", - "@wrnexus/ssr": "^0.2.23", - "@wrnexus/styles": "^0.2.23", - "@wrnexus/ui": "^0.2.23", - "@wrnexus/uploader": "^0.2.23", - "@wrnexus/validation": "^0.2.23" + "@wrnexus/compiler": "^0.2.24", + "@wrnexus/core": "^0.2.24", + "@wrnexus/csr": "^0.2.24", + "@wrnexus/db": "^0.2.24", + "@wrnexus/i18n": "^0.2.24", + "@wrnexus/pubsub": "^0.2.24", + "@wrnexus/router": "^0.2.24", + "@wrnexus/ssr": "^0.2.24", + "@wrnexus/styles": "^0.2.24", + "@wrnexus/ui": "^0.2.24", + "@wrnexus/uploader": "^0.2.24", + "@wrnexus/validation": "^0.2.24" }, "engines": { "bun": ">=1.1.0" } }, "node_modules/@wrnexus/encryption": { - "version": "0.2.23", - "resolved": "https://registry.npmjs.org/@wrnexus/encryption/-/encryption-0.2.23.tgz", - "integrity": "sha512-TGA2KlVyDTvazBccMOPtuonGqYmjDzsDJw0+wH9qp43AT2uPqn21U46QuhMKqvYArNJhSSsY/S3mx9OpKU+n0g==", + "version": "0.2.24", + "resolved": "https://registry.npmjs.org/@wrnexus/encryption/-/encryption-0.2.24.tgz", + "integrity": "sha512-AlN0vbKGc4f9EmsaqB2KeriQhcBWyr9rAiY9NY1u6VjSKRgB3HElX71wX5hhOZ1qC7rZC/HeSGrbly5K1kgRqg==", "license": "MIT", "engines": { "bun": ">=1.1.0" } }, "node_modules/@wrnexus/helpers": { - "version": "0.2.23", - "resolved": "https://registry.npmjs.org/@wrnexus/helpers/-/helpers-0.2.23.tgz", - "integrity": "sha512-VMR/pgN9Yp+qlpuX5pkLzfAoxp6/Rfd3HeVM+q6RqI0Ek8caoPX3AT2p4ST0P9roTenBYcJVJgnVoiHtDWwnpw==", + "version": "0.2.24", + "resolved": "https://registry.npmjs.org/@wrnexus/helpers/-/helpers-0.2.24.tgz", + "integrity": "sha512-VQO7IpaqHZdfslpYPYWBjbuHWf0gqd9cB8aD+kCIEntkMAvWmQlJClWClCRtRNamvU1urrb/gA/Vz7zh+WbpcQ==", "license": "MIT", "dependencies": { - "@wrnexus/core": "^0.2.23" + "@wrnexus/core": "^0.2.24" }, "engines": { "bun": ">=1.1.0" } }, "node_modules/@wrnexus/i18n": { - "version": "0.2.23", - "resolved": "https://registry.npmjs.org/@wrnexus/i18n/-/i18n-0.2.23.tgz", - "integrity": "sha512-VriwAdx8kKXQ7brlpK+CzZMq5Ue7kSJnJ0Txnvke+HDDk63QSKGfh8wgN3nwJQFs/ZxwwwADPR16u0o7njIkpg==", + "version": "0.2.24", + "resolved": "https://registry.npmjs.org/@wrnexus/i18n/-/i18n-0.2.24.tgz", + "integrity": "sha512-t9/G7zzYw31wRPTC+drZLYlLzPhiz7Ba/K73mmxSr5v7TTU/vUtl6fx3U+yhB7zs916BSIV02Gj0JRYvQa1Ymg==", "license": "MIT", "dependencies": { - "@wrnexus/core": "^0.2.23" + "@wrnexus/core": "^0.2.24" }, "engines": { "bun": ">=1.1.0" } }, "node_modules/@wrnexus/jwt": { - "version": "0.2.23", - "resolved": "https://registry.npmjs.org/@wrnexus/jwt/-/jwt-0.2.23.tgz", - "integrity": "sha512-VPbY5uFvfPUWU/UlbWd3qz6E1WpRbFbPd1gI8qvnSCC24pRIrDEPKwEikEu0DZVaeaEnUDhqbUIXk7+h6zWJZg==", + "version": "0.2.24", + "resolved": "https://registry.npmjs.org/@wrnexus/jwt/-/jwt-0.2.24.tgz", + "integrity": "sha512-8wZKcS+uxi6KzLtNUqx9UO0gK4SyI8ATxCT7OzJdM8M1WiMsEVs/jmHoEDsfUy9f+1jJnkZvEFFnMEKuWweVIg==", "license": "MIT", "engines": { "bun": ">=1.1.0" } }, "node_modules/@wrnexus/mobile": { - "version": "0.2.23", - "resolved": "https://registry.npmjs.org/@wrnexus/mobile/-/mobile-0.2.23.tgz", - "integrity": "sha512-KcwuTLdVR02db04Xg08Jeg3hR+Xkn7rgD9IlujjC/mo9f1MfwnUm1RTKvpqx55jPo87CWqrPHvhtY35xppXACw==", + "version": "0.2.24", + "resolved": "https://registry.npmjs.org/@wrnexus/mobile/-/mobile-0.2.24.tgz", + "integrity": "sha512-VkGXukM/Wqcs/lbM4EgBTg6eNssylnRZZkmZ5/Zd9lRgkllX6rX5fSDjmnEu05ytwMElmrsHJDREeHv8VOZSvQ==", "license": "MIT", "dependencies": { - "@wrnexus/native": "^0.2.23" + "@wrnexus/native": "^0.2.24" }, "engines": { "bun": ">=1.1.0" } }, "node_modules/@wrnexus/native": { - "version": "0.2.23", - "resolved": "https://registry.npmjs.org/@wrnexus/native/-/native-0.2.23.tgz", - "integrity": "sha512-kUCzJ/jwx1392v1mTUMx2K8KE11vahUALysEDiN1YheYuiirpVyCWnOZrJ1hsPLKQeA/rytpMJ66UKvZ8YncTg==", + "version": "0.2.24", + "resolved": "https://registry.npmjs.org/@wrnexus/native/-/native-0.2.24.tgz", + "integrity": "sha512-cxdXwkN8ZiTaqszGOggWEtnaJFMXaKNo+xi5A3uL/fTQvgYbbitaGh6zdBZ37SPjv0edPRouFm4+FRunKMO1Nw==", "license": "MIT", "engines": { "bun": ">=1.1.0" } }, "node_modules/@wrnexus/oauth": { - "version": "0.2.23", - "resolved": "https://registry.npmjs.org/@wrnexus/oauth/-/oauth-0.2.23.tgz", - "integrity": "sha512-FYe+pVYizoHpnKTtrLVbpeFNJpnEu0kVpYopFmAPvDS7MGJHAgtt35KQKYELJOplrN6tjfZbxzNVplCEJUvA5A==", + "version": "0.2.24", + "resolved": "https://registry.npmjs.org/@wrnexus/oauth/-/oauth-0.2.24.tgz", + "integrity": "sha512-F5FrtnxhFmYXLSDvvBAn2wWfFfp7KSKjUbk41+QgMLyhh1gsPiqTxNjM0iRQB2ayfsk0ZMWWgUVRPntzsOo7EA==", "license": "MIT", "engines": { "bun": ">=1.1.0" } }, "node_modules/@wrnexus/pubsub": { - "version": "0.2.23", - "resolved": "https://registry.npmjs.org/@wrnexus/pubsub/-/pubsub-0.2.23.tgz", - "integrity": "sha512-bArH5IvVo9vKFpG40lwqFOfY/0swqXI0PYiiRzgxQzoVfq7hP/swVyUhYQGrBdBX16kW8DkDQJ+uQv8XPflHRg==", + "version": "0.2.24", + "resolved": "https://registry.npmjs.org/@wrnexus/pubsub/-/pubsub-0.2.24.tgz", + "integrity": "sha512-wA/JjSoxgfo5d0jUoYrPtQsg0lOosS8zMzSrY8nBL3SOCK6TkX0/DQmAyJJdbib5sM/t/tckO6uWjhNJ8XJeqw==", "license": "MIT", "engines": { "bun": ">=1.1.0" } }, "node_modules/@wrnexus/queue": { - "version": "0.2.23", - "resolved": "https://registry.npmjs.org/@wrnexus/queue/-/queue-0.2.23.tgz", - "integrity": "sha512-LmW2rqs928fH/EXXBS9fbnxP5gxaAdZfOLaaFvjnckfaX61BaRckJ1QqToRJenyns75WIlaSl8qRcKRatEUieQ==", + "version": "0.2.24", + "resolved": "https://registry.npmjs.org/@wrnexus/queue/-/queue-0.2.24.tgz", + "integrity": "sha512-MQZZC9jb4nA2/4LussT3IqXqvlFKQpRuTqK65DaSg1LLD3q6IcBjr6TyGVuaNLLHYdkgJPuEPZ6CTD256+ZtXQ==", "license": "MIT", "engines": { "bun": ">=1.1.0" } }, "node_modules/@wrnexus/reactive": { - "version": "0.2.23", - "resolved": "https://registry.npmjs.org/@wrnexus/reactive/-/reactive-0.2.23.tgz", - "integrity": "sha512-QTimrmgyCoLtGK+HDdLj0YfSIlNZglWVl7BP1uW5LPvZzXBUHTseASjQZs0CYPKLYnCpKi0MNw4ypfMgfZ49ug==", + "version": "0.2.24", + "resolved": "https://registry.npmjs.org/@wrnexus/reactive/-/reactive-0.2.24.tgz", + "integrity": "sha512-ogReYbhX9MLTpc3CSfpTS+J9XjK0UKP/RxTGR+w8uoEp8+zwjGfMAJuqbepSYhm+yHnNe+NWgL8nxJkPS8T0DA==", "license": "MIT", "engines": { "bun": ">=1.1.0" } }, "node_modules/@wrnexus/router": { - "version": "0.2.23", - "resolved": "https://registry.npmjs.org/@wrnexus/router/-/router-0.2.23.tgz", - "integrity": "sha512-8jmITJzEoHSNA1BiOAIoGxtr0RNrswkUGmEaZ4RKA68DLXQ1QSDutS4o/+bwLKAlJulHMyBfgzvnzvJF3a8UaA==", + "version": "0.2.24", + "resolved": "https://registry.npmjs.org/@wrnexus/router/-/router-0.2.24.tgz", + "integrity": "sha512-eh46ZH2Mn0ZDWsYEgmWcB8/0aYPVd5FkXBAq4RXDoo5WOSLjUD8xfaRVkkl2jC3zaJUbqnaHFuvOAlr1tDuVQg==", "license": "MIT", "dependencies": { - "@wrnexus/compiler": "^0.2.23", - "@wrnexus/core": "^0.2.23" + "@wrnexus/compiler": "^0.2.24", + "@wrnexus/core": "^0.2.24" }, "engines": { "bun": ">=1.1.0" } }, "node_modules/@wrnexus/ssr": { - "version": "0.2.23", - "resolved": "https://registry.npmjs.org/@wrnexus/ssr/-/ssr-0.2.23.tgz", - "integrity": "sha512-yazF7n4s/grM5MEjPbZeM/wBEbYi5OWQrQUaMRJ/0lKKpQRh01YbH83MOPXnjB3ZvKcyktjkh92RSo5KSAhmlA==", + "version": "0.2.24", + "resolved": "https://registry.npmjs.org/@wrnexus/ssr/-/ssr-0.2.24.tgz", + "integrity": "sha512-ogJ6ipp50SHXjLYAGDkqlzSectdFVJ1PpygJesEsqL//ijh1Oq0KnL8PlPxJ68BniP370reakh/knDxIIydZTg==", "license": "MIT", "dependencies": { - "@wrnexus/core": "^0.2.23" + "@wrnexus/core": "^0.2.24" }, "engines": { "bun": ">=1.1.0" } }, "node_modules/@wrnexus/styles": { - "version": "0.2.23", - "resolved": "https://registry.npmjs.org/@wrnexus/styles/-/styles-0.2.23.tgz", - "integrity": "sha512-DOuyLFM9WnbBu6vAEW8s93UxDah/k7ggMTFoSTK4Do49yxrXUoZxhD764k6MeQzgMslbbr5Y94QP1qik7Ojagg==", + "version": "0.2.24", + "resolved": "https://registry.npmjs.org/@wrnexus/styles/-/styles-0.2.24.tgz", + "integrity": "sha512-hG5gBvOI3C1XzeknaT8+3zILQxwOrQhcVoEqpMAaszrppZKurXdJqL93Vx5Y8K0rOThv54h5/WBt+a1qpPuR9Q==", "license": "MIT", "dependencies": { - "@wrnexus/uploader": "^0.2.23" + "@wrnexus/uploader": "^0.2.24" }, "engines": { "bun": ">=1.1.0" } }, "node_modules/@wrnexus/test": { - "version": "0.2.23", - "resolved": "https://registry.npmjs.org/@wrnexus/test/-/test-0.2.23.tgz", - "integrity": "sha512-d0o30955b6Ff+mfDEj6K67Ihv8cGLmCRmTEaYueJ3nsrbW2NCfn7svA8DBm8Pl2SIezNPSvPMXxPo5+hdqS++g==", + "version": "0.2.24", + "resolved": "https://registry.npmjs.org/@wrnexus/test/-/test-0.2.24.tgz", + "integrity": "sha512-DCclD3UwE7HIQfrqcuo6Q9I8WmGqWH8DExz58CV2Ns8+YwwaGGVGIuMZEOZFv70WgN1aIp825rWDA4dGq5eomA==", "license": "MIT", "engines": { "bun": ">=1.1.0" } }, "node_modules/@wrnexus/tracking": { - "version": "0.2.23", - "resolved": "https://registry.npmjs.org/@wrnexus/tracking/-/tracking-0.2.23.tgz", - "integrity": "sha512-ZlEcfAICXqG5ji23qhVTmRo9HX/2cEvVa/tXJk0HuCtUBuRzi9HoskGFZ85zTLTSUTQ+NnY2xucpHq+cf7OQ/Q==", + "version": "0.2.24", + "resolved": "https://registry.npmjs.org/@wrnexus/tracking/-/tracking-0.2.24.tgz", + "integrity": "sha512-j8GwR7VuiNL9UWTjJ4LzmalC1YcrSjW2T2RUHBJF0uciKj/iZoV7XfPfLk8nxfTcpo57/QOhiJ9k8Cz4PpZP0Q==", "license": "MIT", "engines": { "bun": ">=1.1.0" } }, "node_modules/@wrnexus/ui": { - "version": "0.2.23", - "resolved": "https://registry.npmjs.org/@wrnexus/ui/-/ui-0.2.23.tgz", - "integrity": "sha512-UBRIcTIKP1zWhmftRv9JdjEfDDAtBJq7qx0zYnWXPGCTSr4qt1/3yXyF0yVrhKJglRCqpTb2zrfWlvvxyskUtA==", + "version": "0.2.24", + "resolved": "https://registry.npmjs.org/@wrnexus/ui/-/ui-0.2.24.tgz", + "integrity": "sha512-1mYBM0PAdKDm4d3nvUn2E923kG8JYiwkpunLbDsBciTLBUHgBNyERglKnN6HUAANKAl4Vg2Wmi05IyQyDEyevg==", "license": "MIT", "dependencies": { - "@wrnexus/core": "^0.2.23" + "@wrnexus/core": "^0.2.24" }, "engines": { "bun": ">=1.1.0" } }, "node_modules/@wrnexus/uploader": { - "version": "0.2.23", - "resolved": "https://registry.npmjs.org/@wrnexus/uploader/-/uploader-0.2.23.tgz", - "integrity": "sha512-vyQlfJ2WH5DqmsMuEtrRPHkUrIAETMp44BMo2se3zrtCXNejW7R+QB5z4h9ak4ixVqpF5WUIJZuHno3k8CLIlg==", + "version": "0.2.24", + "resolved": "https://registry.npmjs.org/@wrnexus/uploader/-/uploader-0.2.24.tgz", + "integrity": "sha512-/6LGlnoU40+I7gsLibZMGWom+DHCRUtNg+/A4lGa2KkwW6FR6Xd3cyecbmxKXdLHrKvLhNp1vj1yB1nZKqAiqA==", "license": "MIT", "dependencies": { - "@wrnexus/core": "^0.2.23" + "@wrnexus/core": "^0.2.24" }, "engines": { "bun": ">=1.1.0" } }, "node_modules/@wrnexus/validation": { - "version": "0.2.23", - "resolved": "https://registry.npmjs.org/@wrnexus/validation/-/validation-0.2.23.tgz", - "integrity": "sha512-YqrYiMEU+h/q8Q6SVMEHwsB/jklwXEg64i1Qh4Ag65O157rrQ75oVCVeclVZsZIG4fM+sj0obDcTK8HEVDQKwA==", + "version": "0.2.24", + "resolved": "https://registry.npmjs.org/@wrnexus/validation/-/validation-0.2.24.tgz", + "integrity": "sha512-4xRnEXf3eG7s05dQgBZOboRPskO59VayG8QcU40zyfZ9yCdJrEQS4RDWI5wFuos6yTawNz1FC+O37gpENWJbMw==", "license": "MIT", "engines": { "bun": ">=1.1.0" diff --git a/package.json b/package.json index 2b3cbf0f..392b56fe 100644 --- a/package.json +++ b/package.json @@ -17,38 +17,38 @@ "production": "bun run build && bun run start" }, "dependencies": { - "@wrnexus/ai": "^0.2.23", - "@wrnexus/authz": "^0.2.23", - "@wrnexus/compiler": "^0.2.23", - "@wrnexus/core": "^0.2.23", - "@wrnexus/csr": "^0.2.23", - "@wrnexus/db": "^0.2.23", - "@wrnexus/dev-server": "^0.2.23", - "@wrnexus/encryption": "^0.2.23", - "@wrnexus/helpers": "^0.2.23", - "@wrnexus/i18n": "^0.2.23", - "@wrnexus/jwt": "^0.2.23", - "@wrnexus/mobile": "^0.2.23", - "@wrnexus/native": "^0.2.23", - "@wrnexus/oauth": "^0.2.23", - "@wrnexus/pubsub": "^0.2.23", - "@wrnexus/queue": "^0.2.23", - "@wrnexus/reactive": "^0.2.23", - "@wrnexus/router": "^0.2.23", - "@wrnexus/ssr": "^0.2.23", - "@wrnexus/styles": "^0.2.23", - "@wrnexus/test": "^0.2.23", - "@wrnexus/tracking": "^0.2.23", - "@wrnexus/ui": "^0.2.23", - "@wrnexus/uploader": "^0.2.23", - "@wrnexus/validation": "^0.2.23" + "@wrnexus/ai": "^0.2.24", + "@wrnexus/authz": "^0.2.24", + "@wrnexus/compiler": "^0.2.24", + "@wrnexus/core": "^0.2.24", + "@wrnexus/csr": "^0.2.24", + "@wrnexus/db": "^0.2.24", + "@wrnexus/dev-server": "^0.2.24", + "@wrnexus/encryption": "^0.2.24", + "@wrnexus/helpers": "^0.2.24", + "@wrnexus/i18n": "^0.2.24", + "@wrnexus/jwt": "^0.2.24", + "@wrnexus/mobile": "^0.2.24", + "@wrnexus/native": "^0.2.24", + "@wrnexus/oauth": "^0.2.24", + "@wrnexus/pubsub": "^0.2.24", + "@wrnexus/queue": "^0.2.24", + "@wrnexus/reactive": "^0.2.24", + "@wrnexus/router": "^0.2.24", + "@wrnexus/ssr": "^0.2.24", + "@wrnexus/styles": "^0.2.24", + "@wrnexus/test": "^0.2.24", + "@wrnexus/tracking": "^0.2.24", + "@wrnexus/ui": "^0.2.24", + "@wrnexus/uploader": "^0.2.24", + "@wrnexus/validation": "^0.2.24" }, "devDependencies": { "@eslint/js": "^9.0.0", "@tailwindcss/cli": "^4.0.0", "@types/bun": "latest", "@types/node": "^26.1.1", - "@wrnexus/cli": "^0.2.23", + "@wrnexus/cli": "^0.2.24", "eslint": "^9.0.0", "prettier": "latest", "tailwindcss": "^4.0.0", @@ -56,6 +56,6 @@ "typescript-eslint": "latest" }, "wrnexus": { - "version": "0.2.23" + "version": "0.2.24" } } diff --git a/public/docs-index.json b/public/docs-index.json index 08992188..f0e4364f 100644 --- a/public/docs-index.json +++ b/public/docs-index.json @@ -1,5 +1,5 @@ { - "version": "0.2.23", + "version": "0.2.24", "status": "private-developer-preview", "generatedAt": "2026-07-13", "documents": [ @@ -7,476 +7,476 @@ "url": "/", "title": "WRNexusJS", "section": "portal", - "version": "0.2.23", + "version": "0.2.24", "stability": "preview" }, { "url": "/access", "title": "access", "section": "portal", - "version": "0.2.23", + "version": "0.2.24", "stability": "preview" }, { "url": "/getting-started", "title": "getting started", "section": "portal", - "version": "0.2.23", + "version": "0.2.24", "stability": "preview" }, { "url": "/tutorial", "title": "tutorial", "section": "portal", - "version": "0.2.23", + "version": "0.2.24", "stability": "preview" }, { "url": "/architecture", "title": "architecture", "section": "portal", - "version": "0.2.23", + "version": "0.2.24", "stability": "preview" }, { "url": "/language", "title": "language", "section": "portal", - "version": "0.2.23", + "version": "0.2.24", "stability": "preview" }, { "url": "/packages", "title": "packages", "section": "package", - "version": "0.2.23", + "version": "0.2.24", "stability": "preview" }, { "url": "/guides/project-structure", "title": "project structure", "section": "guide", - "version": "0.2.23", + "version": "0.2.24", "stability": "preview" }, { "url": "/guides/routing", "title": "routing", "section": "guide", - "version": "0.2.23", + "version": "0.2.24", "stability": "preview" }, { "url": "/guides/pages-and-components", "title": "pages and components", "section": "guide", - "version": "0.2.23", + "version": "0.2.24", "stability": "preview" }, { "url": "/guides/server-data", "title": "server data", "section": "guide", - "version": "0.2.23", + "version": "0.2.24", "stability": "preview" }, { "url": "/guides/api-routes", "title": "api routes", "section": "guide", - "version": "0.2.23", + "version": "0.2.24", "stability": "preview" }, { "url": "/guides/middleware", "title": "middleware", "section": "guide", - "version": "0.2.23", + "version": "0.2.24", "stability": "preview" }, { "url": "/guides/forms-and-validation", "title": "forms and validation", "section": "guide", - "version": "0.2.23", + "version": "0.2.24", "stability": "preview" }, { "url": "/guides/authentication", "title": "authentication", "section": "guide", - "version": "0.2.23", + "version": "0.2.24", "stability": "preview" }, { "url": "/guides/authorization", "title": "authorization", "section": "guide", - "version": "0.2.23", + "version": "0.2.24", "stability": "preview" }, { "url": "/guides/security", "title": "security", "section": "guide", - "version": "0.2.23", + "version": "0.2.24", "stability": "preview" }, { "url": "/guides/database", "title": "database", "section": "guide", - "version": "0.2.23", + "version": "0.2.24", "stability": "preview" }, { "url": "/guides/uploads", "title": "uploads", "section": "guide", - "version": "0.2.23", + "version": "0.2.24", "stability": "preview" }, { "url": "/guides/realtime", "title": "realtime", "section": "guide", - "version": "0.2.23", + "version": "0.2.24", "stability": "preview" }, { "url": "/guides/pubsub", "title": "pubsub", "section": "guide", - "version": "0.2.23", + "version": "0.2.24", "stability": "preview" }, { "url": "/guides/queues", "title": "queues", "section": "guide", - "version": "0.2.23", + "version": "0.2.24", "stability": "experimental" }, { "url": "/guides/testing", "title": "testing", "section": "guide", - "version": "0.2.23", + "version": "0.2.24", "stability": "preview" }, { "url": "/guides/workspaces-and-gateway", "title": "workspaces and gateway", "section": "guide", - "version": "0.2.23", + "version": "0.2.24", "stability": "preview" }, { "url": "/guides/deployment", "title": "deployment", "section": "guide", - "version": "0.2.23", + "version": "0.2.24", "stability": "preview" }, { "url": "/guides/configuration-and-profiles", "title": "configuration and profiles", "section": "guide", - "version": "0.2.23", + "version": "0.2.24", "stability": "preview" }, { "url": "/guides/i18n-and-themes", "title": "i18n and themes", "section": "guide", - "version": "0.2.23", + "version": "0.2.24", "stability": "preview" }, { "url": "/guides/mobile", "title": "mobile", "section": "guide", - "version": "0.2.23", + "version": "0.2.24", "stability": "experimental" }, { "url": "/guides/observability", "title": "observability", "section": "guide", - "version": "0.2.23", + "version": "0.2.24", "stability": "preview" }, { "url": "/guides/upgrading", "title": "upgrading", "section": "guide", - "version": "0.2.23", + "version": "0.2.24", "stability": "preview" }, { "url": "/guides/troubleshooting", "title": "troubleshooting", "section": "guide", - "version": "0.2.23", + "version": "0.2.24", "stability": "preview" }, { "url": "/examples", "title": "examples", "section": "portal", - "version": "0.2.23", + "version": "0.2.24", "stability": "preview" }, { "url": "/showcase", "title": "showcase", "section": "portal", - "version": "0.2.23", + "version": "0.2.24", "stability": "preview" }, { "url": "/benchmarks", "title": "benchmarks", "section": "portal", - "version": "0.2.23", + "version": "0.2.24", "stability": "preview" }, { "url": "/roadmap", "title": "roadmap", "section": "portal", - "version": "0.2.23", + "version": "0.2.24", "stability": "preview" }, { "url": "/changelog", "title": "changelog", "section": "portal", - "version": "0.2.23", + "version": "0.2.24", "stability": "preview" }, { - "url": "/releases/0.2.23", - "title": "0.2.23", + "url": "/releases/0.2.24", + "title": "0.2.24", "section": "portal", - "version": "0.2.23", + "version": "0.2.24", "stability": "preview" }, { "url": "/security", "title": "security", "section": "portal", - "version": "0.2.23", + "version": "0.2.24", "stability": "preview" }, { "url": "/support", "title": "support", "section": "portal", - "version": "0.2.23", + "version": "0.2.24", "stability": "preview" }, { "url": "/license", "title": "license", "section": "portal", - "version": "0.2.23", + "version": "0.2.24", "stability": "preview" }, { "url": "/search", "title": "search", "section": "portal", - "version": "0.2.23", + "version": "0.2.24", "stability": "preview" }, { "url": "/404", "title": "404", "section": "portal", - "version": "0.2.23", + "version": "0.2.24", "stability": "preview" }, { "url": "/packages/ai", "title": "ai", "section": "package", - "version": "0.2.23", + "version": "0.2.24", "stability": "preview" }, { "url": "/packages/authz", "title": "authz", "section": "package", - "version": "0.2.23", + "version": "0.2.24", "stability": "preview" }, { "url": "/packages/cli", "title": "cli", "section": "package", - "version": "0.2.23", + "version": "0.2.24", "stability": "preview" }, { "url": "/packages/compiler", "title": "compiler", "section": "package", - "version": "0.2.23", + "version": "0.2.24", "stability": "preview" }, { "url": "/packages/core", "title": "core", "section": "package", - "version": "0.2.23", + "version": "0.2.24", "stability": "preview" }, { "url": "/packages/csr", "title": "csr", "section": "package", - "version": "0.2.23", + "version": "0.2.24", "stability": "preview" }, { "url": "/packages/db", "title": "db", "section": "package", - "version": "0.2.23", + "version": "0.2.24", "stability": "preview" }, { "url": "/packages/dev-server", "title": "dev server", "section": "package", - "version": "0.2.23", + "version": "0.2.24", "stability": "preview" }, { "url": "/packages/encryption", "title": "encryption", "section": "package", - "version": "0.2.23", + "version": "0.2.24", "stability": "preview" }, { "url": "/packages/helpers", "title": "helpers", "section": "package", - "version": "0.2.23", + "version": "0.2.24", "stability": "preview" }, { "url": "/packages/i18n", "title": "i18n", "section": "package", - "version": "0.2.23", + "version": "0.2.24", "stability": "preview" }, { "url": "/packages/jwt", "title": "jwt", "section": "package", - "version": "0.2.23", + "version": "0.2.24", "stability": "preview" }, { "url": "/packages/mobile", "title": "mobile", "section": "package", - "version": "0.2.23", + "version": "0.2.24", "stability": "experimental" }, { "url": "/packages/native", "title": "native", "section": "package", - "version": "0.2.23", + "version": "0.2.24", "stability": "preview" }, { "url": "/packages/oauth", "title": "oauth", "section": "package", - "version": "0.2.23", + "version": "0.2.24", "stability": "preview" }, { "url": "/packages/pubsub", "title": "pubsub", "section": "package", - "version": "0.2.23", + "version": "0.2.24", "stability": "preview" }, { "url": "/packages/queue", "title": "queue", "section": "package", - "version": "0.2.23", + "version": "0.2.24", "stability": "preview" }, { "url": "/packages/reactive", "title": "reactive", "section": "package", - "version": "0.2.23", + "version": "0.2.24", "stability": "preview" }, { "url": "/packages/router", "title": "router", "section": "package", - "version": "0.2.23", + "version": "0.2.24", "stability": "preview" }, { "url": "/packages/ssr", "title": "ssr", "section": "package", - "version": "0.2.23", + "version": "0.2.24", "stability": "preview" }, { "url": "/packages/styles", "title": "styles", "section": "package", - "version": "0.2.23", + "version": "0.2.24", "stability": "preview" }, { "url": "/packages/test", "title": "test", "section": "package", - "version": "0.2.23", + "version": "0.2.24", "stability": "preview" }, { "url": "/packages/tracking", "title": "tracking", "section": "package", - "version": "0.2.23", + "version": "0.2.24", "stability": "preview" }, { "url": "/packages/ui", "title": "ui", "section": "package", - "version": "0.2.23", + "version": "0.2.24", "stability": "preview" }, { "url": "/packages/uploader", "title": "uploader", "section": "package", - "version": "0.2.23", + "version": "0.2.24", "stability": "preview" }, { "url": "/packages/validation", "title": "validation", "section": "package", - "version": "0.2.23", + "version": "0.2.24", "stability": "preview" } ] diff --git a/public/llms-full.txt b/public/llms-full.txt index ee64c8d2..6fde0162 100644 --- a/public/llms-full.txt +++ b/public/llms-full.txt @@ -1,4 +1,4 @@ -# WRNexusJS 0.2.23 comprehensive documentation index +# WRNexusJS 0.2.24 comprehensive documentation index Status: Private Developer Preview. Runtime: Bun. UI language: .wrn. This is the documentation application, not the framework monorepo. @@ -39,7 +39,7 @@ This is the documentation application, not the framework monorepo. - https://wrnexusjs.dev/benchmarks - https://wrnexusjs.dev/roadmap - https://wrnexusjs.dev/changelog -- https://wrnexusjs.dev/releases/0.2.23 +- https://wrnexusjs.dev/releases/0.2.24 - https://wrnexusjs.dev/security - https://wrnexusjs.dev/support - https://wrnexusjs.dev/license diff --git a/public/llms.txt b/public/llms.txt index 34833345..c57a5aa8 100644 --- a/public/llms.txt +++ b/public/llms.txt @@ -1,4 +1,4 @@ -# WRNexusJS documentation 0.2.23 +# WRNexusJS documentation 0.2.24 Status: Private Developer Preview. This site documents 26 release-aligned packages. @@ -281,7 +281,7 @@ wrnexus eject # copy a Wire UI component's .wrn into app/compone # Installed package documentation -The following README files and declarations come from the installed private 0.2.23 release. +The following README files and declarations come from the installed private 0.2.24 release. ## @wrnexus/ai @@ -411,6 +411,8 @@ try { ## Usage +### Return generated JSON from an API route + ```ts // app/api/summarize.ts — summarize posted text import { createAI } from "@wrnexus/ai"; @@ -426,6 +428,23 @@ export const POST = async (ctx) => { }; ``` +### Stream a chat response to the browser + +```ts +// app/api/chat.ts +import { createAI } from "@wrnexus/ai"; + +const ai = createAI({ model: "claude-sonnet-5" }); + +export const POST = async (ctx) => { + const { messages } = await ctx.req.json(); + return ai.streamResponse(messages, { + system: "Answer using concise Markdown.", + maxTokens: 1_500, + }); +}; +``` + ## Requirements / Notes - **Bun-only.** Uses `fetch`, `ReadableStream`, `TextDecoder`/`TextEncoder`, and @@ -911,6 +930,47 @@ Runs the app's tests with `bun test`. Defaults to the `test` profile (config + ` wrnexus test . --watch ``` +## Usage + +### Create and run a single application + +```bash +bunx @wrnexus/cli create customer-portal +cd customer-portal +bun install +bun run dev +``` + +### Add routes and shared UI to an existing app + +```bash +wrnexus generate page reports/monthly +wrnexus generate api reports/export +wrnexus generate component report-filter +wrnexus generate routes +``` + +### Create a multi-app workspace and add another app + +```bash +wrnexus workspace company-suite +cd company-suite +wrnexus workspace add reports --domain=reports.localhost +bun install +wrnexus gateway --port=3000 +``` + +Open `http://reports.localhost:3000`; the gateway selects `apps/reports` from the +request host. + +### Upgrade with migrations and verification + +```bash +wrnexus update --latest --dry-run +wrnexus update --latest +wrnexus doctor +``` + ## Profiles Pass `--profile=` to `dev`, `build`, `db` (or set `WRNEXUS_PROFILE`) to select a config profile. The CLI publishes `WRNEXUS_PROFILE` so config loaders and the dev child pick it up, and loads that profile's `.env` cascade (`.env`, `.env.local`, `.env.`, `.env..local`) into `process.env`. @@ -3991,7 +4051,9 @@ bun add @wrnexus/helpers The package is private, so the machine must be authenticated to the `wrnexus` npm organization. -## Forward-auth login redirects +## Usage + +### Redirect an unauthenticated forward-auth request The gateway calls an SSO verifier on a different URL from the original application. These helpers reconstruct the original URL from the gateway headers and safely place it @@ -4020,15 +4082,29 @@ Location: http://sso.localhost:3000/login?returnTo=http%3A%2F%2Fadmin.localhost% Always list the application hosts that are valid redirect destinations. Forwarded host headers are rejected when `allowedHosts` is absent or does not match, preventing an open -redirect. A callback can support dynamic tenant domains: +redirect. The SSO hostname is the login destination, not an `allowedHosts` entry. For example, when protecting `admin.localhost:3000`, keep `admin.localhost:3000` in the allowlist even though the verifier runs at `sso.localhost:3000`. WRNexus preserves both hosts across a nested gateway request. +### Support dynamic tenant domains + ```ts -allowedHosts: (host) => host.endsWith(".example.test"); +import type { Context } from "@wrnexus/core"; +import { getOriginalRequestOrigin, redirectToLogin } from "@wrnexus/helpers"; + +export const GET = async (ctx: Context) => { + const allowedHosts = (host: string) => host === "example.test" || host.endsWith(".example.test"); + + console.info("Authentication requested by", getOriginalRequestOrigin(ctx, { allowedHosts })); + return redirectToLogin(ctx, "https://auth.example.test/login", { + allowedHosts, + returnToParam: "continue", + status: 303, + }); +}; ``` ## API @@ -4541,28 +4617,87 @@ Documentation URL: https://wrnexusjs.dev/packages/mobile # @wrnexus/mobile -SSR-safe access to Capacitor plugins from WrNexus browser code. +> SSR-safe access to Capacitor plugins from WRNexusJS browser code. + +## Overview + +`@wrnexus/mobile` keeps optional native imports out of server rendering while giving +browser-owned modules one consistent registry for Capacitor plugins. During SSR, +`mobile.isNative()` is `false` and `mobile.platform()` is `"web"`. + +## Installation + +Install a plugin through the WRNexusJS CLI so the web and native projects stay aligned: ```bash -wrnexus mobile add @capacitor/camera +wrnexus mobile add @capacitor/camera @capacitor/haptics ``` +## Usage + +### Register and invoke a Capacitor plugin + +Import Capacitor packages only from browser-owned code, never from API routes or SSR +helpers. + ```ts -import { Camera } from "@capacitor/camera"; +import { Camera, CameraResultType } from "@capacitor/camera"; import { mobile } from "@wrnexus/mobile"; -if (mobile.isNative()) { - mobile.registerPlugin("Camera", Camera); - const photo = await mobile.invoke("Camera", "getPhoto", { resultType: "uri" }); +mobile.registerPlugin("Camera", Camera); + +export async function takePhoto() { + if (!mobile.isNative()) return null; + return mobile.invoke("Camera", "getPhoto", { + quality: 85, + resultType: CameraResultType.Uri, + }); } ``` -`isNative()` is false and `platform()` is `web` during SSR. `plugin()` returns -`undefined` when unavailable; `requirePlugin()` and `invoke()` throw an -actionable `MobileUnavailableError`. +### Provide a browser fallback -Import and register Capacitor packages only from browser-owned code. Do not -import them in server routes, SSR helpers, or other Bun-only modules. +`whenNative` runs the first callback only in a Capacitor WebView and can return a +web/SSR-safe fallback everywhere else. + +```ts +import { Haptics, ImpactStyle } from "@capacitor/haptics"; +import { mobile } from "@wrnexus/mobile"; + +mobile.registerPlugin("Haptics", Haptics); + +export const confirmAction = () => + mobile.whenNative( + () => mobile.invoke("Haptics", "impact", { style: ImpactStyle.Medium }), + () => navigator.vibrate?.(30), + ); +``` + +### Read an optional plugin without throwing + +```ts +import type { NetworkPlugin } from "@capacitor/network"; +import { mobile } from "@wrnexus/mobile"; + +const network = mobile.plugin("Network"); +const status = network ? await network.getStatus() : { connected: true, connectionType: "unknown" }; +``` + +## API + +- `registerPlugin(name, instance)` registers a browser-imported plugin. +- `plugin(name)` returns a plugin or `undefined`; `requirePlugin(name)` throws when absent. +- `invoke(plugin, method, options?)` calls a registered method and returns its result. +- `whenNative(native, fallback?)` selects native behavior without breaking SSR. +- `isNative()` and `platform()` report the current Capacitor environment. + +Unavailable required plugins throw `MobileUnavailableError` with an actionable message. + +## Requirements / Notes + +- Capacitor plugin imports must remain in browser-owned modules. +- `@wrnexus/mobile` re-exports `native` from `@wrnexus/native` for applications that + prefer the higher-level cross-platform capability API. ### Exported TypeScript declarations @@ -4615,21 +4750,89 @@ Documentation URL: https://wrnexusjs.dev/packages/native # @wrnexus/native -Cross-platform capabilities for browsers, Capacitor WebViews, and compiled native apps. +> Cross-platform capabilities for browsers, Capacitor WebViews, and compiled native apps. + +## Overview + +`@wrnexus/native` exposes capabilities by name so application code can ask what the +current platform supports before presenting an action. Browser capabilities use Web +APIs; mobile capabilities use installed Capacitor plugins. `platform()` returns +`"server"` during SSR, `"browser"` on the web, and the Capacitor platform in a native +WebView. + +## Installation + +```bash +bun add @wrnexus/native +``` + +## Usage + +### Share a page when the platform supports it ```ts import { native } from "@wrnexus/native"; -if (native.supports("share")) await native.run("share", { title: "WrNexus", url: location.href }); +export async function shareCurrentPage() { + if (!native.supports("share")) return false; + await native.run("share", { + title: document.title, + url: location.href, + }); + return true; +} ``` -Built-ins include `camera`, `clipboard.write`, `share`, `geolocation`, `network`, -`haptics`, storage, filesystem, notifications, and device information. Browser -capabilities use Web APIs; mobile capabilities use installed Capacitor plugins. +### Register an application-specific capability -`platform()` returns `server` during SSR, `browser` on the web, and the Capacitor -platform in a native WebView. Unsupported operations reject with -`NativeUnavailableError`; use `supports()` before presenting optional UI. +`register` returns an unregister function, which is useful for tests and temporary +feature modules. + +```ts +import { native } from "@wrnexus/native"; + +const unregister = native.register("orders.scan", { + browser: { + supported: () => typeof window !== "undefined", + run: async ({ orderId }: { orderId: string }) => { + const code = window.prompt(`Scan code for order ${orderId}`); + return { code }; + }, + }, +}); + +const result = await native.run<{ code: string | null }>("orders.scan", { orderId: "ord_42" }); +unregister(); +``` + +### Target browser or mobile behavior explicitly + +```ts +import { native } from "@wrnexus/native"; + +const canUseMobileCamera = native.supports("camera", "mobile"); +const position = await native.run( + "geolocation", + { enableHighAccuracy: true }, + { target: "browser" }, +); +``` + +## API + +- `supports(name, target?)` checks availability without running the capability. +- `run(name, options?, runOptions?)` executes it or rejects with `NativeUnavailableError`. +- `register(name, capability)` adds or overrides a capability and returns cleanup. +- `registered()` lists capability names; `clearRegistry()` resets the registry. +- `isMobile()` and `platform()` report the current target safely during SSR. + +Built-ins include `camera`, `clipboard.write`, `share`, `geolocation`, `network`, +`haptics`, storage, filesystem, notifications, and device information. + +## Requirements / Notes + +Use `supports()` before showing optional controls. Mobile capabilities require their +matching Capacitor plugins to be installed and registered by the application. ### Exported TypeScript declarations @@ -5851,6 +6054,8 @@ type SeoConfig = { ## Usage +### Render an SEO-ready application page + ```ts import { renderDocument } from "@wrnexus/ssr"; @@ -5878,6 +6083,23 @@ return new Response(html, { The produced document has `About Us — Acme`, the SEO/Open Graph/Twitter tags derived from the merged metadata, a `modulepreload` link and module ``, +}); + +return new Response(html, { headers: { "content-type": "text/html; charset=utf-8" } }); +``` + ## Requirements / Notes - **Server-only.** This module never imports or touches the DOM and is safe to keep out of client bundles. @@ -7130,7 +7352,9 @@ with one function call, drop a drag-and-drop widget on a page, and serve files b private. Zero external dependencies (S3 is signed with a built-in AWS SigV4 implementation, like the rest of the framework). -## Configure +## Usage + +### Configure local and S3 stores ```ts // wrnexus.config.ts @@ -7164,7 +7388,7 @@ const config: AppConfig = { export default config; ``` -## Upload (server) +### Upload from an API route or server function ```ts // app/api/upload.ts — one-liner @@ -7184,7 +7408,7 @@ Uploads are validated (size + type), stored under a random, collision-proof, pat (the client filename is never used as a path), and — for public stores — returned with a servable `url`. -## Widget (client) +### Add a client upload widget Drop the element anywhere; the runtime (drag-and-drop, per-file progress, success/failed states) is auto-injected on pages that contain `data-uploader`: @@ -7216,7 +7440,7 @@ It dispatches bubbling events you can listen for: - `wrnexus:upload` — `detail: { file, result: { key, url, name, size, type } }` - `wrnexus:upload-error` — `detail: { file, error }` -## Serve files +### Serve private files behind application authentication - **Public + local** → served automatically at `/__wrnexus/uploads//` (immutable cache). - **Public + S3** → `url` is the bucket/CDN URL directly. diff --git a/public/sitemap.xml b/public/sitemap.xml index e9096037..52ef177f 100644 --- a/public/sitemap.xml +++ b/public/sitemap.xml @@ -1,2 +1,2 @@ -https://wrnexusjs.dev/https://wrnexusjs.dev/accesshttps://wrnexusjs.dev/getting-startedhttps://wrnexusjs.dev/tutorialhttps://wrnexusjs.dev/architecturehttps://wrnexusjs.dev/languagehttps://wrnexusjs.dev/packageshttps://wrnexusjs.dev/guides/project-structurehttps://wrnexusjs.dev/guides/routinghttps://wrnexusjs.dev/guides/pages-and-componentshttps://wrnexusjs.dev/guides/server-datahttps://wrnexusjs.dev/guides/api-routeshttps://wrnexusjs.dev/guides/middlewarehttps://wrnexusjs.dev/guides/forms-and-validationhttps://wrnexusjs.dev/guides/authenticationhttps://wrnexusjs.dev/guides/authorizationhttps://wrnexusjs.dev/guides/securityhttps://wrnexusjs.dev/guides/databasehttps://wrnexusjs.dev/guides/uploadshttps://wrnexusjs.dev/guides/realtimehttps://wrnexusjs.dev/guides/pubsubhttps://wrnexusjs.dev/guides/queueshttps://wrnexusjs.dev/guides/testinghttps://wrnexusjs.dev/guides/workspaces-and-gatewayhttps://wrnexusjs.dev/guides/deploymenthttps://wrnexusjs.dev/guides/configuration-and-profileshttps://wrnexusjs.dev/guides/i18n-and-themeshttps://wrnexusjs.dev/guides/mobilehttps://wrnexusjs.dev/guides/observabilityhttps://wrnexusjs.dev/guides/upgradinghttps://wrnexusjs.dev/guides/troubleshootinghttps://wrnexusjs.dev/exampleshttps://wrnexusjs.dev/showcasehttps://wrnexusjs.dev/benchmarkshttps://wrnexusjs.dev/roadmaphttps://wrnexusjs.dev/changeloghttps://wrnexusjs.dev/releases/0.2.23https://wrnexusjs.dev/securityhttps://wrnexusjs.dev/supporthttps://wrnexusjs.dev/licensehttps://wrnexusjs.dev/searchhttps://wrnexusjs.dev/404https://wrnexusjs.dev/packages/aihttps://wrnexusjs.dev/packages/authzhttps://wrnexusjs.dev/packages/clihttps://wrnexusjs.dev/packages/compilerhttps://wrnexusjs.dev/packages/corehttps://wrnexusjs.dev/packages/csrhttps://wrnexusjs.dev/packages/dbhttps://wrnexusjs.dev/packages/dev-serverhttps://wrnexusjs.dev/packages/encryptionhttps://wrnexusjs.dev/packages/helpershttps://wrnexusjs.dev/packages/i18nhttps://wrnexusjs.dev/packages/jwthttps://wrnexusjs.dev/packages/mobilehttps://wrnexusjs.dev/packages/nativehttps://wrnexusjs.dev/packages/oauthhttps://wrnexusjs.dev/packages/pubsubhttps://wrnexusjs.dev/packages/queuehttps://wrnexusjs.dev/packages/reactivehttps://wrnexusjs.dev/packages/routerhttps://wrnexusjs.dev/packages/ssrhttps://wrnexusjs.dev/packages/styleshttps://wrnexusjs.dev/packages/testhttps://wrnexusjs.dev/packages/trackinghttps://wrnexusjs.dev/packages/uihttps://wrnexusjs.dev/packages/uploaderhttps://wrnexusjs.dev/packages/validation +https://wrnexusjs.dev/https://wrnexusjs.dev/accesshttps://wrnexusjs.dev/getting-startedhttps://wrnexusjs.dev/tutorialhttps://wrnexusjs.dev/architecturehttps://wrnexusjs.dev/languagehttps://wrnexusjs.dev/packageshttps://wrnexusjs.dev/guides/project-structurehttps://wrnexusjs.dev/guides/routinghttps://wrnexusjs.dev/guides/pages-and-componentshttps://wrnexusjs.dev/guides/server-datahttps://wrnexusjs.dev/guides/api-routeshttps://wrnexusjs.dev/guides/middlewarehttps://wrnexusjs.dev/guides/forms-and-validationhttps://wrnexusjs.dev/guides/authenticationhttps://wrnexusjs.dev/guides/authorizationhttps://wrnexusjs.dev/guides/securityhttps://wrnexusjs.dev/guides/databasehttps://wrnexusjs.dev/guides/uploadshttps://wrnexusjs.dev/guides/realtimehttps://wrnexusjs.dev/guides/pubsubhttps://wrnexusjs.dev/guides/queueshttps://wrnexusjs.dev/guides/testinghttps://wrnexusjs.dev/guides/workspaces-and-gatewayhttps://wrnexusjs.dev/guides/deploymenthttps://wrnexusjs.dev/guides/configuration-and-profileshttps://wrnexusjs.dev/guides/i18n-and-themeshttps://wrnexusjs.dev/guides/mobilehttps://wrnexusjs.dev/guides/observabilityhttps://wrnexusjs.dev/guides/upgradinghttps://wrnexusjs.dev/guides/troubleshootinghttps://wrnexusjs.dev/exampleshttps://wrnexusjs.dev/showcasehttps://wrnexusjs.dev/benchmarkshttps://wrnexusjs.dev/roadmaphttps://wrnexusjs.dev/changeloghttps://wrnexusjs.dev/releases/0.2.24https://wrnexusjs.dev/securityhttps://wrnexusjs.dev/supporthttps://wrnexusjs.dev/licensehttps://wrnexusjs.dev/searchhttps://wrnexusjs.dev/404https://wrnexusjs.dev/packages/aihttps://wrnexusjs.dev/packages/authzhttps://wrnexusjs.dev/packages/clihttps://wrnexusjs.dev/packages/compilerhttps://wrnexusjs.dev/packages/corehttps://wrnexusjs.dev/packages/csrhttps://wrnexusjs.dev/packages/dbhttps://wrnexusjs.dev/packages/dev-serverhttps://wrnexusjs.dev/packages/encryptionhttps://wrnexusjs.dev/packages/helpershttps://wrnexusjs.dev/packages/i18nhttps://wrnexusjs.dev/packages/jwthttps://wrnexusjs.dev/packages/mobilehttps://wrnexusjs.dev/packages/nativehttps://wrnexusjs.dev/packages/oauthhttps://wrnexusjs.dev/packages/pubsubhttps://wrnexusjs.dev/packages/queuehttps://wrnexusjs.dev/packages/reactivehttps://wrnexusjs.dev/packages/routerhttps://wrnexusjs.dev/packages/ssrhttps://wrnexusjs.dev/packages/styleshttps://wrnexusjs.dev/packages/testhttps://wrnexusjs.dev/packages/trackinghttps://wrnexusjs.dev/packages/uihttps://wrnexusjs.dev/packages/uploaderhttps://wrnexusjs.dev/packages/validation diff --git a/scripts/generate-docs.ts b/scripts/generate-docs.ts index 29624589..3bf405e0 100644 --- a/scripts/generate-docs.ts +++ b/scripts/generate-docs.ts @@ -171,8 +171,11 @@ function markdown(source: string): { html: string; headings: DocHeading[] } { } function examplesFrom(readme: string, name: string): string { - const usage = /^## Usage\s*$([\s\S]*?)(?=^##\s|\s*$)/m.exec(readme)?.[1]; - if (!usage) throw new Error(`@wrnexus/${name} README must contain a Usage section`); + const usageHeading = /^## Usage[ \t]*\r?$/m.exec(readme); + if (!usageHeading) throw new Error(`@wrnexus/${name} README must contain a Usage section`); + const afterHeading = readme.slice(usageHeading.index + usageHeading[0].length); + const nextSection = /^##[ \t]+/m.exec(afterHeading); + const usage = afterHeading.slice(0, nextSection?.index ?? afterHeading.length); const examples: { title: string; language: string; code: string }[] = []; const lines = usage.replace(/\r/g, "").split("\n");