@daloyjs/core 0.7.2 → 0.7.5
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 +15 -56
- package/package.json +23 -22
package/README.md
CHANGED
|
@@ -285,62 +285,21 @@ The core only ever sees `Request → Response`. Adapters live at the edge.
|
|
|
285
285
|
|
|
286
286
|
---
|
|
287
287
|
|
|
288
|
-
## Status
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
-
|
|
295
|
-
-
|
|
296
|
-
-
|
|
297
|
-
-
|
|
298
|
-
-
|
|
299
|
-
-
|
|
300
|
-
-
|
|
301
|
-
|
|
302
|
-
-
|
|
303
|
-
- [x] Security middleware: `secureHeaders` / `cors` / `rateLimit` / `requestId` / `bearerAuth` / `timing` / `timingSafeEqual`
|
|
304
|
-
- [x] Pluggable structured logger + request id propagation
|
|
305
|
-
- [x] Graceful shutdown
|
|
306
|
-
- [x] `app.onClose()` lifecycle hook + augmentable `AppState` for plugin-typed context
|
|
307
|
-
- [x] Mock mode
|
|
308
|
-
- [x] Scalar + Swagger UI handlers
|
|
309
|
-
- [x] **pnpm-first distribution with hardened `.npmrc`**
|
|
310
|
-
- [x] **Lockfile source verification for git/non-registry tarball dependencies**
|
|
311
|
-
- [x] **100% line + function coverage** enforced by `pnpm coverage`
|
|
312
|
-
|
|
313
|
-
**Current (`0.2.x` follow-up — see [ROADMAP.md](./ROADMAP.md) for the full plan):**
|
|
314
|
-
|
|
315
|
-
- [x] `onSend` hook for response transformation
|
|
316
|
-
- [x] GitHub Actions CI for install, typecheck, tests, coverage, build, and audit
|
|
317
|
-
- [x] `SECURITY.md` and vulnerability disclosure process
|
|
318
|
-
- [x] `pnpm create daloy` project scaffolder (Node + Vercel Edge + Cloudflare templates)
|
|
319
|
-
- [x] Docs site discoverability pass: page metadata, sitemap, robots, OpenGraph image, ORM guides
|
|
320
|
-
- [x] Streaming response helpers: SSE + NDJSON with backpressure-safe writers (`sseStream` / `sseResponse` / `ndjsonStream` / `ndjsonResponse`)
|
|
321
|
-
- [x] OpenAPI extras: `securitySchemes` builders (`httpBearerScheme` / `httpBasicScheme` / `apiKeyScheme` / `oauth2Scheme` / `openIdConnectScheme`), top-level `webhooks`, per-operation `callbacks`, and `discriminator` / `discriminatedUnion` helpers
|
|
322
|
-
- [x] OpenTelemetry-compatible tracing hook (`otelTracing`) with HTTP semantic-convention attributes and per-request `SERVER` spans
|
|
323
|
-
- [x] CSRF helper (`csrf`) with double-submit-cookie pattern, timing-safe verification, and `__Host-` cookie defaults
|
|
324
|
-
- [x] Multipart/form-data ergonomics: `fileField` + `multipartObject` (per-file size and MIME caps, OpenAPI-aware emission) and `AppOptions.multipart` defense-in-depth caps
|
|
325
|
-
- [ ] Branch coverage push to `>= 98%`
|
|
326
|
-
- [ ] Release checklist and publishing docs cleanup
|
|
327
|
-
|
|
328
|
-
**On deck (`0.3.x` and beyond):**
|
|
329
|
-
WebSockets and HTTP/2 + HTTP/3 adapters.
|
|
330
|
-
|
|
331
|
-
**Shipped from the `0.x` extensibility track so far:**
|
|
332
|
-
|
|
333
|
-
- [x] Plugin lifecycle events: `app.onPluginInstalled((info) => ...)` fires once per `register()` (sync or async), and `app.onShutdown(({ reason, timeoutMs }) => ...)` fires at the start of `app.shutdown()` before in-flight requests drain. `onClose()` still runs after drain for resource cleanup.
|
|
334
|
-
- [x] Edge-friendly session middleware: `session({ secret, store })` exposes `ctx.state.session` (`get` / `set` / `delete` / `regenerate` / `destroy`) backed by a signed `__Host-` cookie (HMAC-SHA256, key rotation) and a pluggable `SessionStore` (`MemorySessionStore` ships in-process; KV/Redis stores plug in directly). Standalone `signValue` / `verifySignedValue` helpers are exported for ad-hoc cookie/token signing.
|
|
335
|
-
|
|
336
|
-
**Shipped from `0.5.x` ("project ops") so far:**
|
|
337
|
-
|
|
338
|
-
- [x] Bun and Deno scaffolder templates (`bun-basic`, `deno-basic`)
|
|
339
|
-
- [x] `--minimal` flag that strips the bookstore demo and `/docs` + `/openapi.json` routes from any template
|
|
340
|
-
- [x] `daloy inspect` CLI: route table, schema summary, contract-test gate, OpenAPI dump, tag/method filters
|
|
341
|
-
- [x] Redis-backed `RateLimitStore` at `@daloyjs/core/rate-limit-redis` with `ioredisAdapter` / `nodeRedisAdapter` and a fail-open default for shared counters across replicas
|
|
342
|
-
- [x] AI-agent helper files (`AGENTS.md` + `SKILL.md`) shipped in every `create-daloy` template so Copilot/Claude/Cursor/Codex have project context out of the box
|
|
343
|
-
- [x] Polished `create-daloy` terminal UX: DaloyJS welcome banner, arrow-key pickers, install spinner, and boxed next steps while preserving zero runtime dependencies
|
|
288
|
+
## Status
|
|
289
|
+
|
|
290
|
+
DaloyJS is in **public preview** (`0.x`). The public API may still change between minor versions; deprecations will get at least one minor cycle once `1.0.0` ships. The framework is already in use for production trials — every release ships with **100% line + function test coverage**, strict TypeScript, OpenSSF Scorecard, CodeQL, zizmor workflow linting, and npm provenance.
|
|
291
|
+
|
|
292
|
+
What works today, at a glance:
|
|
293
|
+
|
|
294
|
+
- Contract-first routing, Standard Schema validation (Zod 4 / Valibot / ArkType / TypeBox), and OpenAPI 3.1 from a single source of truth.
|
|
295
|
+
- Adapters for Node, Bun, Deno, Cloudflare Workers, and Vercel Edge.
|
|
296
|
+
- Built-in security primitives (body limits, prototype-pollution-safe JSON, path-traversal guard, request timeouts, header injection guards) plus first-party middleware (`secureHeaders`, `cors`, `rateLimit`, `requestId`, `bearerAuth`, `csrf`, `session`, `timing` / `timingSafeEqual`).
|
|
297
|
+
- Streaming helpers (SSE + NDJSON), multipart ergonomics, OpenTelemetry-compatible tracing, signed-cookie sessions with pluggable stores, and a Redis-backed rate-limit store at `@daloyjs/core/rate-limit-redis`.
|
|
298
|
+
- In-process test client (`app.request()`), contract-test runner, in-process typed client, and Hey API codegen via `pnpm gen`.
|
|
299
|
+
- `pnpm create daloy` scaffolder with Node, Bun, Deno, Cloudflare Worker, and Vercel Edge templates.
|
|
300
|
+
- Plugin encapsulation, decorators, structured logging, request-id propagation, lifecycle events (`onPluginInstalled`, `onShutdown`, `onClose`), and graceful shutdown.
|
|
301
|
+
|
|
302
|
+
Roadmap, version-by-version plan, and shipped/in-progress checklists live in [ROADMAP.md](./ROADMAP.md). Release history and rationale lives in [PROJECT_HISTORY.md](./PROJECT_HISTORY.md).
|
|
344
303
|
|
|
345
304
|
## License
|
|
346
305
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@daloyjs/core",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.5",
|
|
4
4
|
"description": "DaloyJS is a runtime-portable, contract-first TypeScript web framework with built-in OpenAPI (Hey API), typed client generation, large-scale maintainability, and security-first defaults. Hono-grade portability, Elysia-grade DX, FastAPI-grade docs, Fastify-grade ops — distributed via pnpm.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"publishConfig": {
|
|
@@ -15,6 +15,22 @@
|
|
|
15
15
|
"url": "https://github.com/daloyjs/daloy/issues"
|
|
16
16
|
},
|
|
17
17
|
"author": "DaloyJS",
|
|
18
|
+
"license": "MIT",
|
|
19
|
+
"keywords": [
|
|
20
|
+
"framework",
|
|
21
|
+
"http",
|
|
22
|
+
"openapi",
|
|
23
|
+
"hey-api",
|
|
24
|
+
"contract-first",
|
|
25
|
+
"typescript",
|
|
26
|
+
"hono",
|
|
27
|
+
"elysia",
|
|
28
|
+
"fastify",
|
|
29
|
+
"fastapi",
|
|
30
|
+
"standard-schema",
|
|
31
|
+
"security",
|
|
32
|
+
"pnpm"
|
|
33
|
+
],
|
|
18
34
|
"main": "./dist/index.js",
|
|
19
35
|
"types": "./dist/index.d.ts",
|
|
20
36
|
"bin": {
|
|
@@ -90,27 +106,6 @@
|
|
|
90
106
|
"import": "./dist/session.js"
|
|
91
107
|
}
|
|
92
108
|
},
|
|
93
|
-
"files": [
|
|
94
|
-
"dist",
|
|
95
|
-
"bin",
|
|
96
|
-
"README.md"
|
|
97
|
-
],
|
|
98
|
-
"keywords": [
|
|
99
|
-
"framework",
|
|
100
|
-
"http",
|
|
101
|
-
"openapi",
|
|
102
|
-
"hey-api",
|
|
103
|
-
"contract-first",
|
|
104
|
-
"typescript",
|
|
105
|
-
"hono",
|
|
106
|
-
"elysia",
|
|
107
|
-
"fastify",
|
|
108
|
-
"fastapi",
|
|
109
|
-
"standard-schema",
|
|
110
|
-
"security",
|
|
111
|
-
"pnpm"
|
|
112
|
-
],
|
|
113
|
-
"license": "MIT",
|
|
114
109
|
"devDependencies": {
|
|
115
110
|
"@hey-api/openapi-ts": "^0.97.1",
|
|
116
111
|
"@types/node": "^25.7.0",
|
|
@@ -119,6 +114,12 @@
|
|
|
119
114
|
"typescript": "^6.0.3",
|
|
120
115
|
"zod": "^4.4.3"
|
|
121
116
|
},
|
|
117
|
+
"files": [
|
|
118
|
+
"dist",
|
|
119
|
+
"bin",
|
|
120
|
+
"README.md"
|
|
121
|
+
],
|
|
122
|
+
"dependencies": {},
|
|
122
123
|
"scripts": {
|
|
123
124
|
"build": "tsc -p tsconfig.json",
|
|
124
125
|
"dev": "tsc -w -p tsconfig.json",
|