@tsed/platform-serverless-http 6.107.5 → 6.110.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.
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.PlatformServerlessHttp = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const common_1 = require("@tsed/common");
|
|
6
|
-
const serverless_http_1 =
|
|
6
|
+
const serverless_http_1 = tslib_1.__importDefault(require("serverless-http"));
|
|
7
7
|
class PlatformServerlessHttp {
|
|
8
8
|
static bootstrap(module, settings) {
|
|
9
9
|
const platform = common_1.PlatformBuilder.create(module, settings);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlatformServerlessHttp.js","sourceRoot":"","sources":["../../../src/builder/PlatformServerlessHttp.ts"],"names":[],"mappings":";;;;AAAA,yCAAsE;AAGtE,
|
|
1
|
+
{"version":3,"file":"PlatformServerlessHttp.js","sourceRoot":"","sources":["../../../src/builder/PlatformServerlessHttp.ts"],"names":[],"mappings":";;;;AAAA,yCAAsE;AAGtE,8EAAyC;AAEzC,MAAa,sBAAsB;IACjC,MAAM,CAAC,SAAS,CAAC,MAAiB,EAAE,QAAiC;QACnE,MAAM,QAAQ,GAAG,wBAAe,CAAC,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;QAC1D,MAAM,OAAO,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC;QAEjC,QAAgB,CAAC,OAAO,GAAG,GAAY,EAAE;YACxC,IAAI,OAAY,CAAC;YAEjB,OAAO,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE;gBAC9B,uBAAuB;gBACvB,IAAI,CAAC,OAAO,EAAE;oBACZ,MAAM,OAAO,CAAC;oBACd,OAAO,GAAG,IAAA,yBAAU,EAAC,QAAQ,CAAC,QAAQ,EAAE,EAAE;wBACxC,OAAO,CAAC,OAAY;4BAClB,OAAO,CAAC,UAAU,GAAG,EAAC,KAAK,EAAE,OAAO,EAAC,CAAC;wBACxC,CAAC;qBACF,CAAC,CAAC;iBACJ;gBAED,OAAO,OAAO,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;YACjC,CAAC,CAAC;QACJ,CAAC,CAAC;QAEF,OAAO,QAAe,CAAC;IACzB,CAAC;CACF;AAzBD,wDAyBC","sourcesContent":["import {PlatformBuilder, PlatformBuilderSettings} from \"@tsed/common\";\nimport {Type} from \"@tsed/core\";\nimport type {Handler} from \"aws-lambda\";\nimport serverless from \"serverless-http\";\n\nexport class PlatformServerlessHttp {\n static bootstrap(module: Type<any>, settings: PlatformBuilderSettings): PlatformBuilder & {handler(): Handler} {\n const platform = PlatformBuilder.create(module, settings);\n const promise = platform.listen();\n\n (platform as any).handler = (): Handler => {\n let handler: any;\n\n return async (event, context) => {\n // istanbul ignore else\n if (!handler) {\n await promise;\n handler = serverless(platform.callback(), {\n request(request: any) {\n request.serverless = {event, context};\n }\n });\n }\n\n return handler(event, context);\n };\n };\n\n return platform as any;\n }\n}\n"]}
|
package/lib/cjs/index.js
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
*/
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const tslib_1 = require("tslib");
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
tslib_1.__exportStar(require("./builder/PlatformServerlessHttp"), exports);
|
|
8
|
+
tslib_1.__exportStar(require("./constants/constants"), exports);
|
|
9
|
+
tslib_1.__exportStar(require("./decorators/serverlessContext"), exports);
|
|
10
|
+
tslib_1.__exportStar(require("./decorators/serverlessEvent"), exports);
|
|
11
11
|
//# 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":";AAAA;;GAEG;;;AAEH,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,2EAAiD;AACjD,gEAAsC;AACtC,yEAA+C;AAC/C,uEAA6C","sourcesContent":["/**\n * @file Automatically generated by barrelsby.\n */\n\nexport * from \"./builder/PlatformServerlessHttp\";\nexport * from \"./constants/constants\";\nexport * from \"./decorators/serverlessContext\";\nexport * from \"./decorators/serverlessEvent\";\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsed/platform-serverless-http",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.110.0",
|
|
4
4
|
"description": "Module to support Serverless HTTP function with Ts.ED",
|
|
5
5
|
"source": "./src/index.ts",
|
|
6
6
|
"main": "./lib/cjs/index.js",
|
|
@@ -53,25 +53,48 @@
|
|
|
53
53
|
"homepage": "https://github.com/tsedio/tsed/tree/production/packages/platform/platform-serverless-http",
|
|
54
54
|
"repository": "https://github.com/tsedio/tsed",
|
|
55
55
|
"dependencies": {
|
|
56
|
-
"tslib": "2.
|
|
56
|
+
"tslib": "2.3.1"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
|
-
"@tsed/common": "6.
|
|
60
|
-
"@tsed/core": "6.
|
|
61
|
-
"@tsed/di": "6.
|
|
62
|
-
"@tsed/platform-serverless-testing": "6.
|
|
59
|
+
"@tsed/common": "6.110.0",
|
|
60
|
+
"@tsed/core": "6.110.0",
|
|
61
|
+
"@tsed/di": "6.110.0",
|
|
62
|
+
"@tsed/platform-serverless-testing": "6.110.0",
|
|
63
63
|
"aws-lambda": "^1.0.7",
|
|
64
64
|
"serverless-http": "^2.7.0"
|
|
65
65
|
},
|
|
66
66
|
"peerDependencies": {
|
|
67
|
-
"@tsed/common": "^6.
|
|
68
|
-
"@tsed/core": "^6.
|
|
69
|
-
"@tsed/di": "^6.
|
|
70
|
-
"@tsed/json-mapper": "^6.
|
|
71
|
-
"@tsed/logger": ">=6.1.
|
|
72
|
-
"@tsed/openspec": "^6.
|
|
73
|
-
"@tsed/schema": "^6.
|
|
67
|
+
"@tsed/common": "^6.110.0",
|
|
68
|
+
"@tsed/core": "^6.110.0",
|
|
69
|
+
"@tsed/di": "^6.110.0",
|
|
70
|
+
"@tsed/json-mapper": "^6.110.0",
|
|
71
|
+
"@tsed/logger": ">=6.1.1",
|
|
72
|
+
"@tsed/openspec": "^6.110.0",
|
|
73
|
+
"@tsed/schema": "^6.110.0",
|
|
74
74
|
"aws-lambda": ">=1.0.7",
|
|
75
75
|
"serverless-http": ">=2.0.0"
|
|
76
|
+
},
|
|
77
|
+
"peerDependenciesMeta": {
|
|
78
|
+
"@tsed/common": {
|
|
79
|
+
"optional": false
|
|
80
|
+
},
|
|
81
|
+
"@tsed/core": {
|
|
82
|
+
"optional": false
|
|
83
|
+
},
|
|
84
|
+
"@tsed/di": {
|
|
85
|
+
"optional": false
|
|
86
|
+
},
|
|
87
|
+
"@tsed/json-mapper": {
|
|
88
|
+
"optional": false
|
|
89
|
+
},
|
|
90
|
+
"@tsed/logger": {
|
|
91
|
+
"optional": false
|
|
92
|
+
},
|
|
93
|
+
"@tsed/openspec": {
|
|
94
|
+
"optional": false
|
|
95
|
+
},
|
|
96
|
+
"@tsed/schema": {
|
|
97
|
+
"optional": false
|
|
98
|
+
}
|
|
76
99
|
}
|
|
77
100
|
}
|