toiljs 0.0.123 → 0.0.125
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +9 -0
- package/README.md +14 -10
- package/build/cli/.tsbuildinfo +1 -1
- package/build/cli/index.js +474 -230
- package/build/client/.tsbuildinfo +1 -1
- package/build/client/auth.d.ts +2 -0
- package/build/client/auth.js +7 -0
- package/build/compiler/.tsbuildinfo +1 -1
- package/build/compiler/generate.js +1 -1
- package/build/compiler/index.js +2 -0
- package/build/compiler/toil-docs.generated.js +13 -13
- package/build/devserver/.tsbuildinfo +1 -1
- package/build/devserver/daemon/index.d.ts +4 -0
- package/build/devserver/daemon/index.js +84 -2
- package/build/devserver/db/database.d.ts +11 -2
- package/build/devserver/db/database.js +227 -22
- package/build/devserver/db/limits.d.ts +6 -0
- package/build/devserver/db/limits.js +118 -0
- package/build/devserver/db/materialization.d.ts +4 -0
- package/build/devserver/db/materialization.js +25 -0
- package/build/devserver/db/types.d.ts +3 -0
- package/build/devserver/db/types.js +1 -0
- package/build/devserver/runtime/host.js +17 -0
- package/build/devserver/runtime/module.d.ts +4 -0
- package/build/devserver/runtime/module.js +47 -9
- package/build/devserver/wasm/envelope-window.d.ts +1 -0
- package/build/devserver/wasm/envelope-window.js +64 -0
- package/build/testing/.tsbuildinfo +1 -1
- package/package.json +3 -3
- package/server/auth/AuthController.ts +265 -61
- package/server/runtime/response.ts +12 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [v0.0.124] - 2026-10-10
|
|
4
|
+
|
|
5
|
+
- Add a dedicated Testing group to `toiljs doctor`, checking actual installed runner, browser, driver, and coverage versions, compatible ranges, matching Vitest/coverage releases, configuration, and scripts. Unconfigured legacy apps get warnings; broken configured tooling fails.
|
|
6
|
+
- Add testing repairs to `doctor --fix` and accepted `toiljs update` runs, including setup when `update --yes` has no package upgrades. Preserve custom configs, existing files, nonempty scripts, and explicit package sources.
|
|
7
|
+
- Include tests in plain JSON TypeScript configs, ignore test reports, recognize Bun text lockfiles in doctor, and keep native test updates on supported majors with matching Vitest/coverage releases.
|
|
8
|
+
- Extend packaged-install validation to verify the Testing report and read-only doctor behavior.
|
|
9
|
+
|
|
10
|
+
Validation: all 587 framework tests passed, along with build, typecheck, lint, and packaged checks for doctor diagnostics, automatic unit/browser testing, V8 reports, repeated runs, and failure exit status.
|
|
11
|
+
|
|
3
12
|
## [v0.0.123] - 2026-10-10
|
|
4
13
|
|
|
5
14
|
- Add native Vitest unit tests, real Chrome component tests through WebdriverIO, and V8 coverage to every project template, including runnable examples and test scripts.
|
package/README.md
CHANGED
|
@@ -144,9 +144,9 @@ flowchart TB
|
|
|
144
144
|
CLOUD -. orchestrates .-> EDGE
|
|
145
145
|
CLOUD -. orchestrates .-> DB
|
|
146
146
|
|
|
147
|
-
class CROUTES,CPARTS,SREST,SRPC,SDATA,SHARED,VITE,TSC,TOOLKIT,STATIC,WASM,CDN today;
|
|
147
|
+
class CROUTES,CPARTS,SREST,SRPC,SDATA,SHARED,VITE,TSC,TOOLKIT,STATIC,WASM,CDN,RT today;
|
|
148
148
|
class GENCLI gen;
|
|
149
|
-
class
|
|
149
|
+
class DB,CLOUD soon;
|
|
150
150
|
```
|
|
151
151
|
|
|
152
152
|
The client is fully static (host it anywhere). The server is a portable compiled module. The two are separated by design and joined by a typed contract, so the frontend ships to any CDN while the backend runs wherever it is deployed. That split is what makes the delivery network global: static files replicate everywhere for free, and one small module is trivial to run in many places at once.
|
|
@@ -344,7 +344,11 @@ export class HelloHandler extends ToilHandler {
|
|
|
344
344
|
- **Typed RPC (preview)**: tag a server function and the compiler generates a typed `Server.*` surface on the client, end to end, no hand-written glue. The typed pipeline is in place today; the network transport is landing next.
|
|
345
345
|
- **Cookies**: a complete RFC 6265bis layer as a global (no import). Read with `req.cookie('sid')`, write with `resp.setCookie(Cookie.create('sid', token).httpOnly().secure().sameSite(SameSite.Lax))`, and reach for `SecureCookies` when you need HMAC-signed or AES-256-GCM-encrypted values.
|
|
346
346
|
|
|
347
|
-
`toiljs start` self-hosts the built client and a WebSocket channel on [hyper-express](https://github.com/kartikk221/hyper-express) (backed by uWebSockets.js)
|
|
347
|
+
`toiljs build` followed by `toiljs start` self-hosts the built client, WebAssembly backend, and a WebSocket channel on [hyper-express](https://github.com/kartikk221/hyper-express) (backed by uWebSockets.js). It runs production static/SSR output and starts a production HTTP worker pool by default (`--threads 1` disables it). You can deploy on your own server today; managed Dacely Cloud hosting is optional. At scale, that same `.wasm` is exactly what the Toil edge runtime serves: one hot instance per tenant, called directly with your request and wiped clean between requests, so there is no cold start and isolation is enforced below your code rather than by trust. See [Deployment](./docs/getting-started/deploy.md) and [The road to hyperscale](#the-road-to-hyperscale).
|
|
348
|
+
|
|
349
|
+
**Other services can communicate with your backend over HTTP.** Have your integration server send requests to private ToilJS REST endpoints, protected with authentication, shared secrets, and an IP allowlist enforced by your firewall or reverse proxy. Use that server to call external APIs and send results back to ToilJS.
|
|
350
|
+
|
|
351
|
+
**The hot request path keeps outbound network I/O out by design.** ToilJS is built to stay responsive under heavy load. Every server has finite I/O capacity: waiting on external services ties up connections and in-flight work, and a slow or stalled dependency can exhaust that capacity even with async code. Keeping external calls in a separate integration server or background work lets the hot path handle requests without waiting on those services.
|
|
348
352
|
|
|
349
353
|
## Agentic tooling
|
|
350
354
|
|
|
@@ -468,7 +472,7 @@ No imports. `Toil` is a fully-typed global, tree-shaken at build. The page rende
|
|
|
468
472
|
|
|
469
473
|
## Architecture
|
|
470
474
|
|
|
471
|
-
One pipeline, from your editor to planetary scale. The
|
|
475
|
+
One pipeline, from your editor to planetary scale. The framework supports self-hosting today, and the edge runtime is built and measured. Purple marks the ToilDB data layer and managed Dacely Cloud hosting on the roadmap.
|
|
472
476
|
|
|
473
477
|
```mermaid
|
|
474
478
|
flowchart TB
|
|
@@ -484,7 +488,7 @@ flowchart TB
|
|
|
484
488
|
|
|
485
489
|
CLIENTS["CLIENTS<br/>browsers, mobile, API clients, AI crawlers / LLMs"]
|
|
486
490
|
|
|
487
|
-
subgraph EDGE["EDGE, anycast, multi-region POPs, scale-out, built + measured
|
|
491
|
+
subgraph EDGE["EDGE, anycast, multi-region POPs, scale-out, built + measured"]
|
|
488
492
|
direction LR
|
|
489
493
|
SC["STATIC CLIENT<br/>React SPA + baked HTML<br/>images, fonts, css<br/>served from CDN / edge"]
|
|
490
494
|
RT["WASM EDGE RUNTIME<br/>your ToilScript server as one .wasm<br/>isolated per-tenant instance at line rate<br/>8M req/s measured, sub-ms p50<br/>Request to handler to Response<br/>realtime channels, binary IO<br/>x many tenants x many POPs"]
|
|
@@ -509,8 +513,8 @@ flowchart TB
|
|
|
509
513
|
CTRL -. orchestrates .-> EDGE
|
|
510
514
|
CTRL -. orchestrates .-> DATA
|
|
511
515
|
|
|
512
|
-
class TSX,VITE,ART,TS,TSC,WASM,TOOL,CLIENTS today;
|
|
513
|
-
class
|
|
516
|
+
class TSX,VITE,ART,TS,TSC,WASM,TOOL,CLIENTS,SC,RT today;
|
|
517
|
+
class MODES,DUR,BLOB,CTRL soon;
|
|
514
518
|
```
|
|
515
519
|
|
|
516
520
|
<details>
|
|
@@ -570,7 +574,7 @@ flowchart TB
|
|
|
570
574
|
║ push your app ─▶ client to the edge, .wasm to the runtime, data replicated ║
|
|
571
575
|
╚══════════════════════════════════════════════════════════════════════════╝
|
|
572
576
|
|
|
573
|
-
[today] shipping now [built] running + measured
|
|
577
|
+
[today] shipping now [built] running + measured [soon] roadmap
|
|
574
578
|
```
|
|
575
579
|
|
|
576
580
|
</details>
|
|
@@ -579,7 +583,7 @@ flowchart TB
|
|
|
579
583
|
|
|
580
584
|
## The road to hyperscale
|
|
581
585
|
|
|
582
|
-
> **Architecture and status.**
|
|
586
|
+
> **Architecture and status.** You can self-host ToilJS today. The edge runtime below is built and measured; ToilDB and managed Dacely Cloud hosting are on the roadmap.
|
|
583
587
|
|
|
584
588
|
The reason the client is static and the server is WebAssembly is that the WebAssembly runs on a runtime engineered from scratch for the edge. Toil's backend treats your compiled server as an isolated tenant and serves it at line rate, so the same app that runs on your laptop scales out across the edge without a rewrite.
|
|
585
589
|
|
|
@@ -600,7 +604,7 @@ The reason the client is static and the server is WebAssembly is that the WebAss
|
|
|
600
604
|
- **Post-quantum-ready transport** _(coming)_. Forward-looking encryption on the QUIC layer that already terminates TLS 1.3.
|
|
601
605
|
- **Dacely Cloud** _(coming)_. Managed hosting for the whole stack: push your app, the static client goes to the edge and your WebAssembly server runs on the runtime above.
|
|
602
606
|
|
|
603
|
-
This is the spine the framework was shaped around. Today you write a typed, file-based React app with a WebAssembly server; the
|
|
607
|
+
This is the spine the framework was shaped around. Today you write a typed, file-based React app with a WebAssembly server and self-host it; the same compiled artifacts are designed to scale out across the edge.
|
|
604
608
|
|
|
605
609
|
## Tech
|
|
606
610
|
|