barejs 0.2.5 → 0.2.6

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/README.md CHANGED
@@ -50,6 +50,23 @@ app.listen(3000);
50
50
 
51
51
  ## Installation & Quick Start
52
52
 
53
+ ### Official Starter CLI ([`create-barejs`](https://github.com/xarhang/create-barejs))
54
+
55
+ Scaffold a production-ready project (with JSON logging, `securityHeaders()`, `healthcheck()`, and OpenAPI 3.1 + Scalar `/docs`) in one command:
56
+
57
+ ```bash
58
+ # Interactive (prompts for Bun, Node.js, Node.js + uWebSockets.js, or Deno)
59
+ bun create barejs my-app
60
+
61
+ # Or choose a runtime directly:
62
+ bun create barejs my-bun-app --bun
63
+ bun create barejs my-node-app --node
64
+ bun create barejs my-uws-app --node-uws
65
+ bun create barejs my-deno-app --deno
66
+ ```
67
+
68
+ ### Manual Installation
69
+
53
70
  <details open>
54
71
  <summary><strong>Bun (&gt;= 1.1.0)</strong></summary>
55
72
 
@@ -154,10 +171,10 @@ Measured in-process on **Bun** with [`mitata`](https://github.com/evanwash/mitat
154
171
 
155
172
  | Scenario | **BareJS** | **ElysiaJS** | **Hono** |
156
173
  | :--- | :---: | :---: | :---: |
157
- | **1. 100 Routes + Dynamic Params** | **`1.41 µs`**<br><sub>`p99: 7.67 µs`</sub> | `1.94 µs`<br><sub>`p99: 9.19 µs`</sub> | `3.76 µs`<br><sub>`p99: 14.06 µs`</sub> |
158
- | **2. 10 Middlewares + Deep Path** | **`1.54 µs`**<br><sub>`p99: 8.16 µs`</sub> | `2.03 µs`<br><sub>`p99: 9.06 µs`</sub> | `4.17 µs`<br><sub>`p99: 15.06 µs`</sub> |
159
- | **3. POST JSON + Schema Validation** | **`4.23 µs`**<br><sub>`p99: 14.34 µs`</sub> | `4.74 µs`<br><sub>`p99: 15.49 µs`</sub> | `4.68 µs`<br><sub>`p99: 16.31 µs`</sub> |
160
- | **4. Async Handler + Query Parsing** | `2.25 µs`<br><sub>`p99: 9.48 µs`</sub> | `2.46 µs`<br><sub>`p99: 10.30 µs`</sub> | `3.27 µs`<br><sub>`p99: 13.20 µs`</sub> |
174
+ | **1. 100 Routes + Dynamic Params** | **`1.28 µs`**<br><sub>`p99: 7.01 µs`</sub> | `1.91 µs`<br><sub>`p99: 8.83 µs`</sub> | `3.90 µs`<br><sub>`p99: 15.79 µs`</sub> |
175
+ | **2. 10 Middlewares + Deep Path** | **`1.19 µs`**<br><sub>`p99: 6.78 µs`</sub> | `1.99 µs`<br><sub>`p99: 8.04 µs`</sub> | `3.97 µs`<br><sub>`p99: 14.68 µs`</sub> |
176
+ | **3. POST JSON + Schema Validation** | **`3.54 µs`**<br><sub>`p99: 12.64 µs`</sub> | `4.61 µs`<br><sub>`p99: 14.65 µs`</sub> | `4.63 µs`<br><sub>`p99: 15.63 µs`</sub> |
177
+ | **4. Async Handler + Query Parsing** | **`1.88 µs`**<br><sub>`p99: 8.83 µs`</sub> | `2.21 µs`<br><sub>`p99: 9.09 µs`</sub> | `3.15 µs`<br><sub>`p99: 12.65 µs`</sub> |
161
178
 
162
179
  > Last Updated: 2026-11-30 (github action — `linux`, AMD EPYC 7763 64-Core Processor, Bun `1.4.5`, Elysia `1.4.21`, Hono `4.11.4`)
163
180
 
@@ -186,7 +203,8 @@ BareJS is a complete, zero-boilerplate backend platform—every module below shi
186
203
  ## Documentation
187
204
 
188
205
  - **[Documentation Site](https://xarhang.github.io/bareJS/)** — Interactive docs, code examples, and live CI benchmark dashboard.
189
- - **[Comprehensive Guide](./docs/guide.md)** — Validation & auto-coercion, cookies & uploads, security suite, `app.derive()`, WebSockets, SSE, JSON-RPC 2.0, OpenAPI 3.1, `listenCluster()`, `uWebSockets.js`, native `tls`, `barejs/edge`, and `bareClient`/`bareTreaty`.
206
+ - **[`create-barejs` Starter CLI](https://github.com/xarhang/create-barejs)** — Official multi-runtime project scaffolding (`bun create barejs my-app --bun|--node|--node-uws|--deno`).
207
+ - **[Comprehensive Guide](./docs/guide.md)** — Scaffolding, validation & auto-coercion, cookies & uploads, security suite, `app.derive()`, `app.macro()`, WebSockets, SSE, JSON-RPC 2.0, OpenAPI 3.1, `listenCluster()`, `uWebSockets.js`, native `tls`, `barejs/edge`, and `bareClient`/`bareTreaty`.
190
208
  - **[External Integrations](./docs/integrations.md)** — Ready-to-use recipes for Better-Auth, GraphQL Yoga, Auth0, Clerk, Sentry, and OpenTelemetry.
191
209
  - **[API & Configuration Reference](./docs/reference.md)** — Complete `Context` (`ctx`) & `BareJS` API tables, `poolSize`, `bare.config.ts`, and `NODE_ENV` settings.
192
210
  - **[Benchmarks](./BENCHMARKS.md)** — Full 7-scenario results and reproduction instructions.
@@ -198,7 +216,7 @@ BareJS is a complete, zero-boilerplate backend platform—every module below shi
198
216
 
199
217
  ## Status, Contributing & License
200
218
 
201
- - **Status:** Active `0.2.x` development (**483 tests / 6,740 assertions**). Verified in [CI](./.github/workflows/ci.yml) across **Bun** (`bun test`), **Node.js 20 & 22** (`vitest run` + `tests/node-smoke.mjs`; Node 20 skips `production-db.test.ts` which requires `node:sqlite`), and **Deno 2** (`deno test` + `tests/deno-smoke.ts`; skips `playwright.test.ts` and `production-db.test.ts`).
219
+ - **Status:** Active `0.2.x` development (**489 tests / 6,789 assertions**). Verified in [CI](./.github/workflows/ci.yml) across **Bun** (`bun test`), **Node.js 20 & 22** (`vitest run` + `tests/node-smoke.mjs`; Node 20 skips `production-db.test.ts` which requires `node:sqlite`), and **Deno 2** (`deno test` + `tests/deno-smoke.ts`; skips `playwright.test.ts` and `production-db.test.ts`).
202
220
  - **Security:** See [SECURITY.md](./SECURITY.md) for reporting vulnerabilities.
203
221
  - **Contributing:** See [CONTRIBUTING.md](./CONTRIBUTING.md) for development setup and release workflows.
204
222
  - **License:** [MIT](./LICENSE) — Maintained by [xarhang](https://github.com/xarhang).