quantum-flow 1.0.4 → 1.0.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.
Files changed (2) hide show
  1. package/README.md +16 -15
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -21,7 +21,7 @@ yarn build
21
21
  Use the `@Controller` decorator to define controllers with options such as prefix, sub-controllers, middlewares, and interceptors.
22
22
 
23
23
  ```typescript
24
- import { Controller } from 'x-api/core';
24
+ import { Controller } from 'quantum-flow/core';
25
25
 
26
26
  @Controller({
27
27
  prefix: 'api',
@@ -36,7 +36,7 @@ class RootController {}
36
36
  Use the `@Server` decorator with configuration options like port, host, controllers, and WebSocket enablement.
37
37
 
38
38
  ```typescript
39
- import { Server, Port, Host, Use, Intercept, Catch, HttpServer } from 'x-api/http';
39
+ import { Server, Port, Host, Use, Intercept, Catch, HttpServer } from 'quantum-flow/http';
40
40
 
41
41
  @Server({
42
42
  controllers: [RootController],
@@ -62,22 +62,22 @@ server.listen().catch(console.error);
62
62
 
63
63
  ## Request decorators
64
64
 
65
- - Use `@Body` to apply middlewares.
66
- - Use `@Headers` to apply interceptors.
67
- - Use `@Query` to handle errors.
68
- - Use `@Params` and `@Host` to configure server port and host.
69
- - Use `@Multipart` and `@Host` to configure server port and host.
70
- - Use `@Request` and `@Host` to configure server port and host.
71
- - Use `@Response` and `@Host` to configure server port and host.
65
+ - Use `@Body` to handle request bodies.
66
+ - Use `@Headers` to access request headers.
67
+ - Use `@Query` to handle query parameters.
68
+ - Use `@Params` to access route parameters.
69
+ - Use `@Multipart` for handling multipart/form-data requests.
70
+ - Use `@Request` to access the entire request object.
71
+ - Use `@Response` to access the response object.
72
72
 
73
73
  # AWS Lambda Support
74
74
 
75
75
  Use `LambdaAdapter` to convert API Gateway events to requests and responses. Create Lambda handlers from controllers.
76
76
 
77
77
  ```typescript
78
- // Example Lambda handler creation
79
- // import { LambdaAdapter } from 'x-api/aws';
80
- // export const handler = LambdaAdapter.createHandler(RootController);
78
+ Example Lambda handler creation
79
+ import { LambdaAdapter } from 'quantum-flow/aws';
80
+ export const handler = LambdaAdapter.createHandler(RootController);
81
81
  ```
82
82
 
83
83
  # WebSocket Support
@@ -177,9 +177,9 @@ You can use controllers and server functionality by importing controllers and cr
177
177
 
178
178
  # Project Structure
179
179
 
180
- - `src/http/` - Main application source code for HTTP servers.
181
- - `src/aws/` - Main application source code AWS Lambda.
182
- - `src/core/` - Core framework components like Controller and Endpoint.
180
+ - `quantum-flow/http` - Main application source code for HTTP servers.
181
+ - `quantum-flow/aws` - Main application source code AWS Lambda.
182
+ - `quantum-flow/core` - Core framework components like Controller and Endpoint.
183
183
 
184
184
  ---
185
185
 
@@ -246,6 +246,7 @@ class App {}
246
246
  Method or class decorator to validate request parameters (query, body, params, headers) against a DTO class using class-validator.
247
247
 
248
248
  ```typescript
249
+ import { IsEmail } from 'class-validator';
249
250
  class UserDTO {
250
251
  @IsEmail()
251
252
  email: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "quantum-flow",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "description": "Decorator-based API framework",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",