@tsed/platform-serverless 7.70.1 → 7.71.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/jest.config.js +3 -1
- package/lib/cjs/builder/PlatformServerless.js +7 -7
- package/lib/cjs/builder/PlatformServerless.js.map +1 -1
- package/lib/cjs/builder/PlatformServerlessHandler.js +2 -2
- package/lib/cjs/builder/PlatformServerlessHandler.js.map +1 -1
- package/lib/cjs/domain/ServerlessContext.js +4 -4
- package/lib/cjs/domain/ServerlessContext.js.map +1 -1
- package/lib/cjs/index.js +11 -11
- package/lib/cjs/index.js.map +1 -1
- package/lib/esm/builder/PlatformServerless.js.map +1 -1
- package/lib/esm/builder/PlatformServerlessHandler.js.map +1 -1
- package/lib/esm/domain/ServerlessContext.js.map +1 -1
- package/lib/esm/index.js +2 -2
- package/lib/esm/index.js.map +1 -1
- package/lib/types/builder/PlatformServerlessHandler.d.ts +1 -1
- package/lib/types/domain/ServerlessContext.d.ts +2 -2
- package/lib/types/domain/ServerlessRequest.d.ts +2 -2
- package/lib/types/domain/ServerlessResponse.d.ts +2 -2
- package/lib/types/index.d.ts +9 -9
- package/lib/types/utils/setResponseHeaders.d.ts +1 -1
- package/package.json +12 -12
- package/readme.md +6 -6
package/jest.config.js
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
// For a detailed explanation regarding each configuration property, visit:
|
|
2
2
|
// https://jestjs.io/docs/en/configuration.html
|
|
3
|
+
const config = require("@tsed/jest-config");
|
|
3
4
|
|
|
4
5
|
module.exports = {
|
|
5
|
-
...
|
|
6
|
+
...config,
|
|
6
7
|
roots: ["<rootDir>/src", "<rootDir>/test"],
|
|
7
8
|
moduleNameMapper: {
|
|
9
|
+
...config.moduleNameMapper,
|
|
8
10
|
"^@tsed/platform-serverless$": "<rootDir>/src/index.ts"
|
|
9
11
|
},
|
|
10
12
|
coverageThreshold: {
|
|
@@ -28,9 +28,9 @@ const core_1 = require("@tsed/core");
|
|
|
28
28
|
const di_1 = require("@tsed/di");
|
|
29
29
|
const logger_1 = require("@tsed/logger");
|
|
30
30
|
const schema_1 = require("@tsed/schema");
|
|
31
|
-
const
|
|
32
|
-
const
|
|
33
|
-
const
|
|
31
|
+
const ServerlessContext_js_1 = require("../domain/ServerlessContext.js");
|
|
32
|
+
const getRequestId_js_1 = require("../utils/getRequestId.js");
|
|
33
|
+
const PlatformServerlessHandler_js_1 = require("./PlatformServerlessHandler.js");
|
|
34
34
|
/**
|
|
35
35
|
* @platform
|
|
36
36
|
*/
|
|
@@ -79,7 +79,7 @@ class PlatformServerless {
|
|
|
79
79
|
statusCode: 404,
|
|
80
80
|
body: "Not found",
|
|
81
81
|
headers: {
|
|
82
|
-
"x-request-id": (0,
|
|
82
|
+
"x-request-id": (0, getRequestId_js_1.getRequestId)(event, context)
|
|
83
83
|
},
|
|
84
84
|
isBase64Encoded: false
|
|
85
85
|
};
|
|
@@ -125,13 +125,13 @@ class PlatformServerless {
|
|
|
125
125
|
return async (event, context) => {
|
|
126
126
|
await this.init();
|
|
127
127
|
if (!handler) {
|
|
128
|
-
const platformHandler = this.injector.get(
|
|
128
|
+
const platformHandler = this.injector.get(PlatformServerlessHandler_js_1.PlatformServerlessHandler);
|
|
129
129
|
handler = await platformHandler.createHandler(token, propertyKey);
|
|
130
130
|
}
|
|
131
|
-
const $ctx = new
|
|
131
|
+
const $ctx = new ServerlessContext_js_1.ServerlessContext({
|
|
132
132
|
event,
|
|
133
133
|
context,
|
|
134
|
-
id: (0,
|
|
134
|
+
id: (0, getRequestId_js_1.getRequestId)(event, context),
|
|
135
135
|
logger: this.injector.logger,
|
|
136
136
|
injector: this.injector,
|
|
137
137
|
endpoint: entity
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlatformServerless.js","sourceRoot":"","sources":["../../../src/builder/PlatformServerless.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qCAAqC;AACrC,iCAAkF;AA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,CAAC;QAEtC,MAAM,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QAExC,MAAM,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAEpC,MAAM,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IACzC,CAAC;CACF;AA1KD,gDA0KC"}
|
|
@@ -6,7 +6,7 @@ const core_1 = require("@tsed/core");
|
|
|
6
6
|
const di_1 = require("@tsed/di");
|
|
7
7
|
const json_mapper_1 = require("@tsed/json-mapper");
|
|
8
8
|
const platform_params_1 = require("@tsed/platform-params");
|
|
9
|
-
const
|
|
9
|
+
const setResponseHeaders_js_1 = require("../utils/setResponseHeaders.js");
|
|
10
10
|
let PlatformServerlessHandler = class PlatformServerlessHandler {
|
|
11
11
|
injector;
|
|
12
12
|
params;
|
|
@@ -33,7 +33,7 @@ let PlatformServerlessHandler = class PlatformServerlessHandler {
|
|
|
33
33
|
};
|
|
34
34
|
}
|
|
35
35
|
flush($ctx) {
|
|
36
|
-
(0,
|
|
36
|
+
(0, setResponseHeaders_js_1.setResponseHeaders)($ctx);
|
|
37
37
|
let body = $ctx.response.getBody();
|
|
38
38
|
if ((0, core_1.isSerializable)(body)) {
|
|
39
39
|
$ctx.response.set("content-type", "application/json");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlatformServerlessHandler.js","sourceRoot":"","sources":["../../../src/builder/PlatformServerlessHandler.ts"],"names":[],"mappings":";;;;AAAA,qCAA0E;AAC1E,iCAAoH;AACpH,mDAA4C;AAE5C,2DAAuF;AAEvF,
|
|
1
|
+
{"version":3,"file":"PlatformServerlessHandler.js","sourceRoot":"","sources":["../../../src/builder/PlatformServerlessHandler.ts"],"names":[],"mappings":";;;;AAAA,qCAA0E;AAC1E,iCAAoH;AACpH,mDAA4C;AAE5C,2DAAuF;AAEvF,0EAAkE;AAM3D,IAAM,yBAAyB,GAA/B,MAAM,y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9D,QAAQ,EAAE,IAAI;oBACd,QAAQ,EAAE,IAAI;iBACf,CAAC,CAAC;aACJ;YAED,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;SAC1B;IACH,CAAC;CACF,CAAA;AApFC;IAAC,IAAA,WAAM,GAAE;sCACW,oBAAe;2DAAC;AAEpC;IAAC,IAAA,WAAM,GAAE;sCACS,gCAAc;yDAAC;AAEjC;IAAC,IAAA,eAAU,EAAC,oBAAoB,EAAE,GAAG,EAAE,2DAAQ,2BAA2B,GAAC,CAAC;;oEACnB;AAR9C,yBAAyB;IAJrC,IAAA,eAAU,EAAC;QACV,KAAK,EAAE,kBAAa,CAAC,SAAS;QAC9B,OAAO,EAAE,CAAC,kCAAgB,EAAE,gCAAc,CAAC;KAC5C,CAAC;GACW,yBAAyB,CAqFrC;AArFY,8DAAyB"}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ServerlessContext = void 0;
|
|
4
4
|
const di_1 = require("@tsed/di");
|
|
5
|
-
const
|
|
6
|
-
const
|
|
5
|
+
const ServerlessRequest_js_1 = require("./ServerlessRequest.js");
|
|
6
|
+
const ServerlessResponse_js_1 = require("./ServerlessResponse.js");
|
|
7
7
|
class ServerlessContext extends di_1.DIContext {
|
|
8
8
|
response;
|
|
9
9
|
request;
|
|
@@ -17,8 +17,8 @@ class ServerlessContext extends di_1.DIContext {
|
|
|
17
17
|
});
|
|
18
18
|
this.context = context;
|
|
19
19
|
this.event = event;
|
|
20
|
-
this.request = new
|
|
21
|
-
this.response = new
|
|
20
|
+
this.request = new ServerlessRequest_js_1.ServerlessRequest(this);
|
|
21
|
+
this.response = new ServerlessResponse_js_1.ServerlessResponse(this);
|
|
22
22
|
this.endpoint = endpoint;
|
|
23
23
|
}
|
|
24
24
|
async destroy() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ServerlessContext.js","sourceRoot":"","sources":["../../../src/domain/ServerlessContext.ts"],"names":[],"mappings":";;;AAAA,iCAAqD;AAGrD,
|
|
1
|
+
{"version":3,"file":"ServerlessContext.js","sourceRoot":"","sources":["../../../src/domain/ServerlessContext.ts"],"names":[],"mappings":";;;AAAA,iCAAqD;AAGrD,iEAAyD;AACzD,mEAA2D;AAQ3D,MAAa,iBAAkB,SAAQ,cAAS;IACrC,QAAQ,CAAqB;IAC7B,OAAO,CAAoB;IAC3B,OAAO,CAAU;IACjB,KAAK,CAAoE;IACzE,QAAQ,CAAkB;IAEnC,YAAY,EAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,OAAO,EAA2B;QAC1E,KAAK,CAAC;YACJ,GAAG,OAAO;YACV,YAAY,EAAE,CAAC;SAChB,CAAC,CAAC;QACH,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,OAAO,GAAG,IAAI,wCAAiB,CAAC,IAAI,CAAC,CAAC;QAC3C,IAAI,CAAC,QAAQ,GAAG,IAAI,0CAAkB,CAAC,IAAI,CAAC,CAAC;QAC7C,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,CAAC;IAED,KAAK,CAAC,OAAO;QACX,MAAM,KAAK,CAAC,OAAO,EAAE,CAAC;QACtB,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC;IAC1B,CAAC;IAED,MAAM;QACJ,OAAO,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC;IAChC,CAAC;CACF;AA3BD,8CA2BC"}
|
package/lib/cjs/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* @file Automatically generated by barrelsby.
|
|
4
|
-
*/
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
const tslib_1 = require("tslib");
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
tslib_1.__exportStar(require("./
|
|
11
|
-
tslib_1.__exportStar(require("./
|
|
12
|
-
tslib_1.__exportStar(require("./domain/
|
|
13
|
-
tslib_1.__exportStar(require("./
|
|
14
|
-
tslib_1.__exportStar(require("./
|
|
4
|
+
/**
|
|
5
|
+
* @file Automatically generated by @tsed/barrels.
|
|
6
|
+
*/
|
|
7
|
+
tslib_1.__exportStar(require("./builder/PlatformServerless.js"), exports);
|
|
8
|
+
tslib_1.__exportStar(require("./builder/PlatformServerlessHandler.js"), exports);
|
|
9
|
+
tslib_1.__exportStar(require("./domain/ServerlessContext.js"), exports);
|
|
10
|
+
tslib_1.__exportStar(require("./domain/ServerlessRequest.js"), exports);
|
|
11
|
+
tslib_1.__exportStar(require("./domain/ServerlessResponse.js"), exports);
|
|
12
|
+
tslib_1.__exportStar(require("./exports.js"), exports);
|
|
13
|
+
tslib_1.__exportStar(require("./utils/getRequestId.js"), exports);
|
|
14
|
+
tslib_1.__exportStar(require("./utils/setResponseHeaders.js"), exports);
|
|
15
15
|
//# sourceMappingURL=index.js.map
|
package/lib/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,0EAAgD;AAChD,iFAAuD;AACvD,wEAA8C;AAC9C,wEAA8C;AAC9C,yEAA+C;AAC/C,uDAA6B;AAC7B,kEAAwC;AACxC,wEAA8C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlatformServerless.js","sourceRoot":"","sources":["../../../src/builder/PlatformServerless.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAO,MAAM,YAAY,CAAC;AACrC,OAAO,EAAC,eAAe,EAAE,eAAe,EAAE,sBAAsB,EAAC,MAAM,UAA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,CAAC,CAAC;QAErC,uBAAuB;QACvB,IAAI,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,IAAI,IAAI,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE;YAC9E,IAAI,CAAC,IAAI,EAAE,CAAC;SACb;QAED,OAAO,IAAI,CAAC;IACd,CAAC;IAES,KAAK,CAAC,YAAY;QAC1B,MAAM,SAAS,GAAG,eAAe,EAAE,CAAC;QAEpC,sBAAsB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAEtC,MAAM,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QAExC,MAAM,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAEpC,MAAM,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IACzC,CAAC;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlatformServerlessHandler.js","sourceRoot":"","sources":["../../../src/builder/PlatformServerlessHandler.ts"],"names":[],"mappings":";AAAA,OAAO,EAAmB,YAAY,EAAE,cAAc,EAAC,MAAM,YAAY,CAAC;AAC1E,OAAO,EAAc,MAAM,EAAE,UAAU,EAAE,eAAe,EAAE,UAAU,EAAE,aAAa,EAAgB,MAAM,UAAU,CAAC;AACpH,OAAO,EAAC,SAAS,EAAC,MAAM,mBAAmB,CAAC;AAE5C,OAAO,EAAC,gBAAgB,EAAE,cAAc,EAAE,cAAc,EAAC,MAAM,uBAAuB,CAAC;AAEvF,OAAO,EAAC,kBAAkB,EAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"PlatformServerlessHandler.js","sourceRoot":"","sources":["../../../src/builder/PlatformServerlessHandler.ts"],"names":[],"mappings":";AAAA,OAAO,EAAmB,YAAY,EAAE,cAAc,EAAC,MAAM,YAAY,CAAC;AAC1E,OAAO,EAAc,MAAM,E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AS,EAAE,KAAK,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;YAErD,IAAI,cAAc,CAAC,IAAI,CAAC,EAAE;gBACxB,IAAI,GAAG,SAAS,CAAC,IAAI,EAAE;oBACrB,GAAG,IAAI,CAAC,QAAQ,CAAC,kBAAkB,CAAC,IAAI,CAAC,QAAQ,CAAC,SAAS,EAAE,CAAC;oBAC9D,QAAQ,EAAE,IAAI;oBACd,QAAQ,EAAE,IAAI;iBACf,CAAC,CAAC;aACJ;YAED,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;SAC1B;IACH,CAAC;CACF,CAAA;AApFC;IAAC,MAAM,EAAE;8BACW,eAAe;2DAAC;AAEpC;IAAC,MAAM,EAAE;8BACS,cAAc;yDAAC;AAEjC;IAAC,UAAU,CAAC,oBAAoB,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,2BAA2B,CAAC,CAAC;;oEACnB;AAR9C,yBAAyB;IAJrC,UAAU,CAAC;QACV,KAAK,EAAE,aAAa,CAAC,SAAS;QAC9B,OAAO,EAAE,CAAC,gBAAgB,EAAE,cAAc,CAAC;KAC5C,CAAC;GACW,yBAAyB,CAqFrC;SArFY,yBAAyB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ServerlessContext.js","sourceRoot":"","sources":["../../../src/domain/ServerlessContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAmB,MAAM,UAAU,CAAC;AAGrD,OAAO,EAAC,iBAAiB,EAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"ServerlessContext.js","sourceRoot":"","sources":["../../../src/domain/ServerlessContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAmB,MAAM,UAAU,CAAC;AAGrD,OAAO,EAAC,iBAAiB,EAAC,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAC,kBAAkB,EAAC,MAAM,yBAAyB,CAAC;AAQ3D,MAAM,OAAO,iBAAkB,SAAQ,SAAS;IACrC,QAAQ,CAAqB;IAC7B,OAAO,CAAoB;IAC3B,OAAO,CAAU;IACjB,KAAK,CAAoE;IACzE,QAAQ,CAAkB;IAEnC,YAAY,EAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,OAAO,EAA2B;QAC1E,KAAK,CAAC;YACJ,GAAG,OAAO;YACV,YAAY,EAAE,CAAC;SAChB,CAAC,CAAC;QACH,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,OAAO,GAAG,IAAI,iBAAiB,CAAC,IAAI,CAAC,CAAC;QAC3C,IAAI,CAAC,QAAQ,GAAG,IAAI,kBAAkB,CAAC,IAAI,CAAC,CAAC;QAC7C,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,CAAC;IAED,KAAK,CAAC,OAAO;QACX,MAAM,KAAK,CAAC,OAAO,EAAE,CAAC;QACtB,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC;IAC1B,CAAC;IAED,MAAM;QACJ,OAAO,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC;IAChC,CAAC;CACF"}
|
package/lib/esm/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @file Automatically generated by
|
|
2
|
+
* @file Automatically generated by @tsed/barrels.
|
|
3
3
|
*/
|
|
4
|
-
export * from "./exports.js";
|
|
5
4
|
export * from "./builder/PlatformServerless.js";
|
|
6
5
|
export * from "./builder/PlatformServerlessHandler.js";
|
|
7
6
|
export * from "./domain/ServerlessContext.js";
|
|
8
7
|
export * from "./domain/ServerlessRequest.js";
|
|
9
8
|
export * from "./domain/ServerlessResponse.js";
|
|
9
|
+
export * from "./exports.js";
|
|
10
10
|
export * from "./utils/getRequestId.js";
|
|
11
11
|
export * from "./utils/setResponseHeaders.js";
|
|
12
12
|
//# sourceMappingURL=index.js.map
|
package/lib/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,cAAc,iCAAiC,CAAC;AAChD,cAAc,wCAAwC,CAAC;AACvD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,cAAc,CAAC;AAC7B,cAAc,yBAAyB,CAAC;AACxC,cAAc,+BAA+B,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { InjectorService, TokenProvider } from "@tsed/di";
|
|
2
2
|
import type { PlatformExceptions } from "@tsed/platform-exceptions";
|
|
3
3
|
import { PlatformParams } from "@tsed/platform-params";
|
|
4
|
-
import { ServerlessContext } from "../domain/ServerlessContext";
|
|
4
|
+
import { ServerlessContext } from "../domain/ServerlessContext.js";
|
|
5
5
|
export declare class PlatformServerlessHandler {
|
|
6
6
|
protected injector: InjectorService;
|
|
7
7
|
protected params: PlatformParams;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { DIContext, DIContextOptions } from "@tsed/di";
|
|
2
2
|
import { JsonEntityStore } from "@tsed/schema";
|
|
3
3
|
import { APIGatewayEventDefaultAuthorizerContext, APIGatewayProxyEventBase, Context } from "aws-lambda";
|
|
4
|
-
import { ServerlessRequest } from "./ServerlessRequest";
|
|
5
|
-
import { ServerlessResponse } from "./ServerlessResponse";
|
|
4
|
+
import { ServerlessRequest } from "./ServerlessRequest.js";
|
|
5
|
+
import { ServerlessResponse } from "./ServerlessResponse.js";
|
|
6
6
|
export interface ServerlessContextOptions extends DIContextOptions {
|
|
7
7
|
event: APIGatewayProxyEventBase<APIGatewayEventDefaultAuthorizerContext>;
|
|
8
8
|
context: Context;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ServerlessContext } from "./ServerlessContext";
|
|
1
|
+
import { ServerlessContext } from "./ServerlessContext.js";
|
|
2
2
|
/**
|
|
3
3
|
* @platform
|
|
4
4
|
*/
|
|
@@ -7,7 +7,7 @@ export declare class ServerlessRequest {
|
|
|
7
7
|
constructor($ctx: ServerlessContext);
|
|
8
8
|
get event(): import("aws-lambda").APIGatewayProxyEventBase<import("aws-lambda").APIGatewayEventDefaultAuthorizerContext>;
|
|
9
9
|
get raw(): import("aws-lambda").APIGatewayProxyEventBase<import("aws-lambda").APIGatewayEventDefaultAuthorizerContext>;
|
|
10
|
-
get response(): import("./ServerlessResponse").ServerlessResponse;
|
|
10
|
+
get response(): import("./ServerlessResponse.js").ServerlessResponse;
|
|
11
11
|
get secure(): boolean;
|
|
12
12
|
get host(): string;
|
|
13
13
|
get protocol(): string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ServerlessContext } from "./ServerlessContext";
|
|
1
|
+
import { ServerlessContext } from "./ServerlessContext.js";
|
|
2
2
|
export type HeaderValue = boolean | number | string;
|
|
3
3
|
/**
|
|
4
4
|
* @platform
|
|
@@ -9,7 +9,7 @@ export declare class ServerlessResponse {
|
|
|
9
9
|
constructor($ctx: ServerlessContext);
|
|
10
10
|
get event(): import("aws-lambda").APIGatewayProxyEventBase<import("aws-lambda").APIGatewayEventDefaultAuthorizerContext>;
|
|
11
11
|
get raw(): import("aws-lambda").APIGatewayProxyEventBase<import("aws-lambda").APIGatewayEventDefaultAuthorizerContext>;
|
|
12
|
-
get request(): import("./ServerlessRequest").ServerlessRequest;
|
|
12
|
+
get request(): import("./ServerlessRequest.js").ServerlessRequest;
|
|
13
13
|
/**
|
|
14
14
|
* Get the current statusCode
|
|
15
15
|
*/
|
package/lib/types/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @file Automatically generated by
|
|
2
|
+
* @file Automatically generated by @tsed/barrels.
|
|
3
3
|
*/
|
|
4
|
-
export * from "./
|
|
5
|
-
export * from "./builder/
|
|
6
|
-
export * from "./
|
|
7
|
-
export * from "./domain/
|
|
8
|
-
export * from "./domain/
|
|
9
|
-
export * from "./
|
|
10
|
-
export * from "./utils/getRequestId";
|
|
11
|
-
export * from "./utils/setResponseHeaders";
|
|
4
|
+
export * from "./builder/PlatformServerless.js";
|
|
5
|
+
export * from "./builder/PlatformServerlessHandler.js";
|
|
6
|
+
export * from "./domain/ServerlessContext.js";
|
|
7
|
+
export * from "./domain/ServerlessRequest.js";
|
|
8
|
+
export * from "./domain/ServerlessResponse.js";
|
|
9
|
+
export * from "./exports.js";
|
|
10
|
+
export * from "./utils/getRequestId.js";
|
|
11
|
+
export * from "./utils/setResponseHeaders.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsed/platform-serverless",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.71.0",
|
|
4
4
|
"description": "Platform serverless module for Ts.ED Framework",
|
|
5
5
|
"source": "./src/index.ts",
|
|
6
6
|
"main": "./lib/cjs/index.js",
|
|
@@ -14,35 +14,35 @@
|
|
|
14
14
|
},
|
|
15
15
|
"scripts": {
|
|
16
16
|
"build": "yarn barrels && yarn build:ts",
|
|
17
|
-
"barrels": "
|
|
17
|
+
"barrels": "barrels",
|
|
18
18
|
"test": "jest && jest-coverage-thresholds-bumper",
|
|
19
19
|
"build:ts": "tsc --build tsconfig.json && tsc --build tsconfig.esm.json"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@tsed/core": "7.
|
|
23
|
-
"@tsed/exceptions": "7.
|
|
24
|
-
"@tsed/json-mapper": "7.
|
|
25
|
-
"@tsed/platform-exceptions": "7.
|
|
26
|
-
"@tsed/platform-params": "7.
|
|
27
|
-
"@tsed/schema": "7.
|
|
22
|
+
"@tsed/core": "7.71.0",
|
|
23
|
+
"@tsed/exceptions": "7.71.0",
|
|
24
|
+
"@tsed/json-mapper": "7.71.0",
|
|
25
|
+
"@tsed/platform-exceptions": "7.71.0",
|
|
26
|
+
"@tsed/platform-params": "7.71.0",
|
|
27
|
+
"@tsed/schema": "7.71.0",
|
|
28
28
|
"encodeurl": "^2.0.0",
|
|
29
29
|
"mime": "^3.0.0",
|
|
30
30
|
"tslib": "2.6.1",
|
|
31
31
|
"uuid": "^9.0.1"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@tsed/
|
|
35
|
-
"@tsed/
|
|
34
|
+
"@tsed/barrels": "7.71.0",
|
|
35
|
+
"@tsed/platform-serverless-testing": "7.71.0",
|
|
36
|
+
"@tsed/typescript": "7.71.0",
|
|
36
37
|
"@types/aws-lambda": "^8.10.136",
|
|
37
38
|
"@types/encodeurl": "^1.0.2",
|
|
38
39
|
"@types/mime": "^3.0.4",
|
|
39
|
-
"barrelsby": "^2.8.1",
|
|
40
40
|
"eslint": "^8.57.0",
|
|
41
41
|
"find-my-way": "^7.7.0",
|
|
42
42
|
"jest": "^29.7.0"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
|
-
"@tsed/di": "7.
|
|
45
|
+
"@tsed/di": "7.71.0",
|
|
46
46
|
"@tsed/logger": ">=6.7.5"
|
|
47
47
|
},
|
|
48
48
|
"peerDependenciesMeta": {
|
package/readme.md
CHANGED
|
@@ -138,8 +138,8 @@ In the `src/lambda` create a new Lambda class:
|
|
|
138
138
|
import {Controller, Inject} from "@tsed/di";
|
|
139
139
|
import {Get, Returns, Summary} from "@tsed/schema";
|
|
140
140
|
import {QueryParams} from "@tsed/platform-params"; // /!\ don't import decorators from @tsed/common
|
|
141
|
-
import {TimeslotsService} from "../services/TimeslotsService";
|
|
142
|
-
import {TimeslotModel} from "../models/TimeslotModel";
|
|
141
|
+
import {TimeslotsService} from "../services/TimeslotsService.js";
|
|
142
|
+
import {TimeslotModel} from "../models/TimeslotModel.js";
|
|
143
143
|
|
|
144
144
|
@Controller("/timeslots")
|
|
145
145
|
export class TimeslotsLambda {
|
|
@@ -162,7 +162,7 @@ Create new `handler.ts` to expose your lambda:
|
|
|
162
162
|
|
|
163
163
|
```typescript
|
|
164
164
|
import {PlatformServerless} from "@tsed/platform-serverless";
|
|
165
|
-
import {TimeslotsLambda} from "./lambda/TimeslotsLambda";
|
|
165
|
+
import {TimeslotsLambda} from "./lambda/TimeslotsLambda.js";
|
|
166
166
|
|
|
167
167
|
const platform = PlatformServerless.bootstrap({
|
|
168
168
|
lambda: [TimeslotsLambda]
|
|
@@ -274,7 +274,7 @@ Then, edit the `handler.ts` and change the exported functions:
|
|
|
274
274
|
|
|
275
275
|
```typescript
|
|
276
276
|
import {PlatformServerless} from "@tsed/platform-serverless";
|
|
277
|
-
import {TimeslotsLambda} from "./TimeslotsLambda";
|
|
277
|
+
import {TimeslotsLambda} from "./TimeslotsLambda.js";
|
|
278
278
|
|
|
279
279
|
const platform = PlatformServerless.bootstrap({
|
|
280
280
|
lambda: [TimeslotsLambda]
|
|
@@ -300,8 +300,8 @@ To simplify our workflow, we can add the following npm script command in our `pa
|
|
|
300
300
|
```typescript
|
|
301
301
|
import {Injectable} from "@tsed/di";
|
|
302
302
|
import {QueryParams, ServerlessContext} from "@tsed/platform-serverless"; // /!\ don't import decorators from @tsed/common
|
|
303
|
-
import {TimeslotsService} from "../services/TimeslotsService";
|
|
304
|
-
import {ServerlessContext} from "./ServerlessContext";
|
|
303
|
+
import {TimeslotsService} from "../services/TimeslotsService.js";
|
|
304
|
+
import {ServerlessContext} from "./ServerlessContext.js";
|
|
305
305
|
|
|
306
306
|
@Injectable()
|
|
307
307
|
export class TimeslotsLambda {
|