veloce-ts 1.0.1 → 1.2.0
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 +85 -19
- package/README.md +7 -7
- package/dist/cjs/src/cli/index.js +257 -95
- package/dist/cjs/src/cli/index.js.map +4 -4
- package/dist/cjs/src/docs/index.js +3 -3
- package/dist/cjs/src/docs/index.js.map +4 -4
- package/dist/cjs/src/errors/index.js +24 -24
- package/dist/cjs/src/errors/index.js.map +6 -5
- package/dist/cjs/src/index.js +64 -62
- package/dist/cjs/src/index.js.map +15 -9
- package/dist/cjs/src/plugins/index.js +14 -14
- package/dist/cjs/src/plugins/index.js.map +4 -4
- package/dist/cjs/src/testing/index.js +34 -32
- package/dist/cjs/src/testing/index.js.map +10 -6
- package/dist/esm/src/cli/index.js +257 -95
- package/dist/esm/src/cli/index.js.map +4 -4
- package/dist/esm/src/docs/index.js +3 -3
- package/dist/esm/src/docs/index.js.map +4 -4
- package/dist/esm/src/errors/index.js +24 -24
- package/dist/esm/src/errors/index.js.map +6 -5
- package/dist/esm/src/index.js +64 -62
- package/dist/esm/src/index.js.map +15 -9
- package/dist/esm/src/plugins/index.js +14 -14
- package/dist/esm/src/plugins/index.js.map +4 -4
- package/dist/esm/src/testing/index.js +34 -32
- package/dist/esm/src/testing/index.js.map +10 -6
- package/dist/types/cli/commands/generate.d.ts.map +1 -1
- package/dist/types/core/application.d.ts +15 -0
- package/dist/types/core/application.d.ts.map +1 -1
- package/dist/types/core/interceptor-manager.d.ts +16 -0
- package/dist/types/core/interceptor-manager.d.ts.map +1 -0
- package/dist/types/core/router-compiler.d.ts +5 -1
- package/dist/types/core/router-compiler.d.ts.map +1 -1
- package/dist/types/decorators/extras.d.ts +20 -0
- package/dist/types/decorators/extras.d.ts.map +1 -0
- package/dist/types/decorators/stream.d.ts +5 -0
- package/dist/types/decorators/stream.d.ts.map +1 -0
- package/dist/types/docs/openapi-generator.d.ts +2 -2
- package/dist/types/docs/openapi-generator.d.ts.map +1 -1
- package/dist/types/docs/zod-to-json-schema.d.ts.map +1 -1
- package/dist/types/errors/exception-filter.d.ts +12 -0
- package/dist/types/errors/exception-filter.d.ts.map +1 -0
- package/dist/types/errors/index.d.ts +2 -0
- package/dist/types/errors/index.d.ts.map +1 -1
- package/dist/types/events/event-bus.d.ts +14 -0
- package/dist/types/events/event-bus.d.ts.map +1 -0
- package/dist/types/events/index.d.ts +2 -0
- package/dist/types/events/index.d.ts.map +1 -0
- package/dist/types/index.d.ts +7 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/testing/index.d.ts +1 -0
- package/dist/types/testing/index.d.ts.map +1 -1
- package/dist/types/testing/isolate.d.ts +12 -0
- package/dist/types/testing/isolate.d.ts.map +1 -0
- package/dist/types/types/index.d.ts +2 -0
- package/dist/types/types/index.d.ts.map +1 -1
- package/package.json +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,72 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [1.2.0] - 2026-06-27
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- **CLI code generation** (`veloce generate`): scaffold controllers, services, modules, resolvers, DTOs, middleware, and plugins with a single command. `veloce new <name>` creates a full project with correct tsconfig and dependencies.
|
|
15
|
+
```bash
|
|
16
|
+
veloce generate module school # controller + service + dto + barrel
|
|
17
|
+
veloce generate controller users # @Controller with full CRUD stubs
|
|
18
|
+
veloce generate resolver product # @Resolver with @GQLQuery/@GQLMutation
|
|
19
|
+
veloce generate plugin cache # Plugin interface implementation
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
- **Graceful shutdown** (`app.onShutdown()`): register async cleanup handlers executed on SIGTERM/SIGINT in reverse order, with a configurable timeout (default 30 s).
|
|
23
|
+
```typescript
|
|
24
|
+
app.onShutdown(async () => { await db.end(); });
|
|
25
|
+
app.setShutdownTimeout(10_000);
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
- **Exception filters** (`@Catch`, `app.useFilter()`): centralised error handling per error class — no more try/catch in every controller.
|
|
29
|
+
```typescript
|
|
30
|
+
@Catch(DrizzleError)
|
|
31
|
+
class DBFilter implements ExceptionFilter {
|
|
32
|
+
catch(err: DrizzleError, c: Context) { return c.json({ error: 'DB error' }, 500); }
|
|
33
|
+
}
|
|
34
|
+
app.useFilter(new DBFilter());
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
- **Interceptors** (`@UseInterceptor`, `app.useInterceptor()`): AOP middleware around handlers — logging, caching, retries, transforms.
|
|
38
|
+
```typescript
|
|
39
|
+
app.useInterceptor(new LoggingInterceptor());
|
|
40
|
+
@UseInterceptor(CacheInterceptor)
|
|
41
|
+
@Get('/users') async getUsers() { ... }
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
- **Streaming responses** (`@SSE()`, `@Stream(contentType)`): return `AsyncGenerator` from any handler for SSE or raw byte streams.
|
|
45
|
+
```typescript
|
|
46
|
+
@Get('/events') @SSE()
|
|
47
|
+
async* stream() { yield { data: 'ping' }; }
|
|
48
|
+
|
|
49
|
+
@Get('/export.csv') @Stream('text/csv')
|
|
50
|
+
async* csv() { yield 'id,name\n'; yield* rows; }
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
- **Event bus** (`EventBus`, `globalEvents`): lightweight in-process pub/sub with `on`, `once`, `off`, async `emit`, and `emitSync`.
|
|
54
|
+
```typescript
|
|
55
|
+
globalEvents.on('user.created', async ({ userId }) => { ... });
|
|
56
|
+
await globalEvents.emit('user.created', { userId });
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
- **Extra decorators**:
|
|
60
|
+
- `@Throttle(limit, windowMs)` — per-endpoint rate limit override
|
|
61
|
+
- `@ApiVersion('v2')` — prefix route with version segment
|
|
62
|
+
- `@ResponseHeader(name, value)` — set response header declaratively
|
|
63
|
+
- `@Redirect(url, status?)` — 301/302/307/308 redirect
|
|
64
|
+
- `@Deprecated(message?)` — marks route in OpenAPI + emits warning
|
|
65
|
+
|
|
66
|
+
- **Test isolation utilities** (`veloce-ts/testing`): `isolate()` resets shared singleton state between bun test files; `compileTestApp(app)` compiles and returns the Hono instance in one call.
|
|
67
|
+
|
|
68
|
+
- **OpenAPI 3.1** output: `openapi: '3.1.0'`, `jsonSchemaDialect` field, `nullable: true` replaced with JSON Schema 2020-12 type arrays (`{ type: ['string', 'null'] }`), full `oneOf` fallback for complex unions.
|
|
69
|
+
|
|
70
|
+
- **Benchmarks suite** (`benchmarks/`): `bun run benchmark` runs autocannon against veloce-ts, Hono, and Fastify across hello/json/params/validation routes and prints a comparison table.
|
|
71
|
+
|
|
72
|
+
### Fixed
|
|
73
|
+
|
|
74
|
+
- GraphQL templates in `veloce new` used `@Query`/`@Mutation` (wrong) — corrected to `@GQLQuery`/`@GQLMutation` with proper `veloce-ts/graphql` imports.
|
|
75
|
+
|
|
10
76
|
## [1.0.1] - 2026-06-26
|
|
11
77
|
|
|
12
78
|
### Fixed
|
|
@@ -860,22 +926,22 @@ This release brings powerful performance optimization features to Veloce-TS:
|
|
|
860
926
|
- CLI tooling
|
|
861
927
|
- Testing utilities
|
|
862
928
|
|
|
863
|
-
[Unreleased]: https://github.com/
|
|
864
|
-
[1.0.0]: https://github.com/
|
|
865
|
-
[0.4.18]: https://github.com/
|
|
866
|
-
[0.4.10]: https://github.com/
|
|
867
|
-
[0.4.0]: https://github.com/
|
|
868
|
-
[0.3.3]: https://github.com/
|
|
869
|
-
[0.3.2]: https://github.com/
|
|
870
|
-
[0.3.1]: https://github.com/
|
|
871
|
-
[0.2.2]: https://github.com/
|
|
872
|
-
[0.2.1]: https://github.com/
|
|
873
|
-
[0.2.0]: https://github.com/
|
|
874
|
-
[0.1.7]: https://github.com/
|
|
875
|
-
[0.1.6]: https://github.com/
|
|
876
|
-
[0.1.5]: https://github.com/
|
|
877
|
-
[0.1.4]: https://github.com/
|
|
878
|
-
[0.1.3]: https://github.com/
|
|
879
|
-
[0.1.2]: https://github.com/
|
|
880
|
-
[0.1.1]: https://github.com/
|
|
881
|
-
[0.1.0]: https://github.com/
|
|
929
|
+
[Unreleased]: https://github.com/ExcessHawk/veloce-ts/compare/v1.0.0...HEAD
|
|
930
|
+
[1.0.0]: https://github.com/ExcessHawk/veloce-ts/compare/v0.4.18...v1.0.0
|
|
931
|
+
[0.4.18]: https://github.com/ExcessHawk/veloce-ts/compare/v0.4.10...v0.4.18
|
|
932
|
+
[0.4.10]: https://github.com/ExcessHawk/veloce-ts/compare/v0.4.9...v0.4.10
|
|
933
|
+
[0.4.0]: https://github.com/ExcessHawk/veloce-ts/compare/v0.3.3...v0.4.0
|
|
934
|
+
[0.3.3]: https://github.com/ExcessHawk/veloce-ts/releases/tag/v0.3.3
|
|
935
|
+
[0.3.2]: https://github.com/ExcessHawk/veloce-ts/releases/tag/v0.3.2
|
|
936
|
+
[0.3.1]: https://github.com/ExcessHawk/veloce-ts/compare/v0.3.0...v0.3.1
|
|
937
|
+
[0.2.2]: https://github.com/ExcessHawk/veloce-ts/compare/v0.2.1...v0.2.2
|
|
938
|
+
[0.2.1]: https://github.com/ExcessHawk/veloce-ts/compare/v0.2.0...v0.2.1
|
|
939
|
+
[0.2.0]: https://github.com/ExcessHawk/veloce-ts/compare/v0.1.7...v0.2.0
|
|
940
|
+
[0.1.7]: https://github.com/ExcessHawk/veloce-ts/compare/v0.1.6...v0.1.7
|
|
941
|
+
[0.1.6]: https://github.com/ExcessHawk/veloce-ts/compare/v0.1.5...v0.1.6
|
|
942
|
+
[0.1.5]: https://github.com/ExcessHawk/veloce-ts/compare/v0.1.4...v0.1.5
|
|
943
|
+
[0.1.4]: https://github.com/ExcessHawk/veloce-ts/compare/v0.1.3...v0.1.4
|
|
944
|
+
[0.1.3]: https://github.com/ExcessHawk/veloce-ts/compare/v0.1.2...v0.1.3
|
|
945
|
+
[0.1.2]: https://github.com/ExcessHawk/veloce-ts/compare/v0.1.1...v0.1.2
|
|
946
|
+
[0.1.1]: https://github.com/ExcessHawk/veloce-ts/compare/v0.1.0...v0.1.1
|
|
947
|
+
[0.1.0]: https://github.com/ExcessHawk/veloce-ts/releases/tag/v0.1.0
|
package/README.md
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
[](https://bun.sh/)
|
|
15
15
|
[](https://docs.veloce-ts.com)
|
|
16
16
|
|
|
17
|
-
[Documentation](https://docs.veloce-ts.com) • [Examples](https://docs.veloce-ts.com/guides/getting-started) • [API Reference](https://docs.veloce-ts.com/reference/api-reference)
|
|
17
|
+
[Documentation](https://docs.veloce-ts.com) • [Examples](https://docs.veloce-ts.com/en/guides/getting-started) • [API Reference](https://docs.veloce-ts.com/en/reference/api-reference)
|
|
18
18
|
|
|
19
19
|
---
|
|
20
20
|
|
|
@@ -564,16 +564,16 @@ Directional priorities—not a release calendar. Items may ship in a different o
|
|
|
564
564
|
|
|
565
565
|
**Completed in v0.4.18:** Security audit of auth routes, JWT blacklist correctness, MetadataCompiler cache isolation fix, ORM lazy-loading for optional peer deps, 375-test suite, internal micro-benchmarks.
|
|
566
566
|
|
|
567
|
-
For the latest shipped changes, see [CHANGELOG](CHANGELOG.md). Discussion and proposals: [GitHub Discussions](https://github.com/
|
|
567
|
+
For the latest shipped changes, see [CHANGELOG](CHANGELOG.md). Discussion and proposals: [GitHub Discussions](https://github.com/ExcessHawk/veloce-ts/discussions).
|
|
568
568
|
|
|
569
569
|
## 📖 Documentation
|
|
570
570
|
|
|
571
571
|
| Resource | Description |
|
|
572
572
|
|----------|-------------|
|
|
573
573
|
| [📚 Full Documentation](https://docs.veloce-ts.com) | Complete guides and API reference |
|
|
574
|
-
| [⚠️ Limitations & roadmap](https://docs.veloce-ts.com/guides/limitations-and-roadmap/) | Known gaps and planned direction |
|
|
575
|
-
| [💡 Examples & Guides](https://docs.veloce-ts.com/guides/getting-started) | Tutorials and code examples |
|
|
576
|
-
| [🔧 API Reference](https://docs.veloce-ts.com/reference/api-reference) | Detailed API documentation |
|
|
574
|
+
| [⚠️ Limitations & roadmap](https://docs.veloce-ts.com/en/guides/limitations-and-roadmap/) | Known gaps and planned direction |
|
|
575
|
+
| [💡 Examples & Guides](https://docs.veloce-ts.com/en/guides/getting-started) | Tutorials and code examples |
|
|
576
|
+
| [🔧 API Reference](https://docs.veloce-ts.com/en/reference/api-reference) | Detailed API documentation |
|
|
577
577
|
|
|
578
578
|
## ⚙️ Requirements
|
|
579
579
|
|
|
@@ -608,7 +608,7 @@ For the latest shipped changes, see [CHANGELOG](CHANGELOG.md). Discussion and pr
|
|
|
608
608
|
- 🔌 Plugin system and extensibility
|
|
609
609
|
|
|
610
610
|
### Alfredo Mejia - Project Founder
|
|
611
|
-
**[@
|
|
611
|
+
**[@ExcessHawk](https://github.com/ExcessHawk)** - Project founder and maintainer
|
|
612
612
|
|
|
613
613
|
---
|
|
614
614
|
|
|
@@ -631,7 +631,7 @@ Built with ❤️ using:
|
|
|
631
631
|
|
|
632
632
|
<div align="center">
|
|
633
633
|
|
|
634
|
-
**[⭐ Star us on GitHub](https://github.com/
|
|
634
|
+
**[⭐ Star us on GitHub](https://github.com/ExcessHawk/veloce-ts)** • **[📖 Read the Docs](https://docs.veloce-ts.com)** • **[💬 Join Discussions](https://github.com/ExcessHawk/veloce-ts/discussions)**
|
|
635
635
|
|
|
636
636
|
Made with ⚡ by the Veloce team
|
|
637
637
|
|