quantum-flow 1.20.0 → 1.20.1

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
@@ -146,7 +146,8 @@ Use `LambdaAdapter` to convert API Gateway events to requests and responses. Cre
146
146
 
147
147
  ```typescript
148
148
  Example Lambda handler creation
149
- import { LambdaAdapter, LambdaRequest, Request } from 'quantum-flow/aws';
149
+ import { LambdaAdapter, LambdaRequest } from 'quantum-flow/aws';
150
+ import { Request, Query, Headers, Params, Response } from 'quantum-flow/core'
150
151
 
151
152
  @Controller({ prefix: 'user' })
152
153
  class UserController {
@@ -155,14 +156,18 @@ class UserController {
155
156
  @Headers() headers: Record<string, string | string[]>,
156
157
  @Params(ParamDTO, 'param') params: string,
157
158
  @Request() req: LambdaRequest,
158
- @Response() resp: ServerResponse,
159
- @InjectWS() ws: IWebSocketService,
160
- ) {}
159
+ @Response() res: ServerResponse
160
+ ) { }
161
161
  }
162
162
  const lambdaAdapter = new LambdaAdapter(UserController);
163
163
  export const handler = lambdaAdapter.handler;
164
164
  ```
165
165
 
166
+ You can access context and event throught @Request() decorator:
167
+ @Request() request: LambdaRequest
168
+ request.context
169
+ request.event
170
+
166
171
  # WebSocket Support
167
172
 
168
173
  Enable WebSocket in the server configuration and register WebSocket controllers.
@@ -1,3 +1,2 @@
1
1
  export { LambdaEvent, LambdaRequest } from '../../types/index.js';
2
- export { Request } from '../../core';
3
2
  export * from './lambda';
@@ -14,8 +14,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.Request = void 0;
18
- var core_1 = require("../../core");
19
- Object.defineProperty(exports, "Request", { enumerable: true, get: function () { return core_1.Request; } });
20
17
  __exportStar(require("./lambda"), exports);
21
18
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/app/aws/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AACA,mCAAqC;AAA5B,+FAAA,OAAO,OAAA;AAChB,2CAAyB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/app/aws/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AACA,2CAAyB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "quantum-flow",
3
- "version": "1.20.0",
3
+ "version": "1.20.1",
4
4
  "description": "Decorator-based API framework",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",