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 +9 -4
- package/dist/app/aws/index.d.ts +0 -1
- package/dist/app/aws/index.js +0 -3
- package/dist/app/aws/index.js.map +1 -1
- package/package.json +1 -1
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
|
|
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()
|
|
159
|
-
|
|
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.
|
package/dist/app/aws/index.d.ts
CHANGED
package/dist/app/aws/index.js
CHANGED
|
@@ -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":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/app/aws/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AACA,2CAAyB"}
|