@tsed/platform-serverless-http 7.0.0-beta.9 → 7.0.0-rc.3
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.
|
@@ -1 +1 @@
|
|
|
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,
|
|
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,QAAsC;QACxE,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<any>): 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"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlatformServerlessHttp.js","sourceRoot":"","sources":["../../../src/builder/PlatformServerlessHttp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,eAAe,EAA0B,MAAM,cAAc,CAAC;AAGtE,OAAO,UAAU,MAAM,iBAAiB,CAAC;AAEzC,MAAM,OAAO,sBAAsB;IACjC,MAAM,CAAC,SAAS,CAAC,MAAiB,EAAE,
|
|
1
|
+
{"version":3,"file":"PlatformServerlessHttp.js","sourceRoot":"","sources":["../../../src/builder/PlatformServerlessHttp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,eAAe,EAA0B,MAAM,cAAc,CAAC;AAGtE,OAAO,UAAU,MAAM,iBAAiB,CAAC;AAEzC,MAAM,OAAO,sBAAsB;IACjC,MAAM,CAAC,SAAS,CAAC,MAAiB,EAAE,QAAsC;QACxE,MAAM,QAAQ,GAAG,eAAe,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,UAAU,CAAC,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","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<any>): 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"]}
|
|
@@ -2,7 +2,7 @@ import { PlatformBuilder, PlatformBuilderSettings } from "@tsed/common";
|
|
|
2
2
|
import { Type } from "@tsed/core";
|
|
3
3
|
import type { Handler } from "aws-lambda";
|
|
4
4
|
export declare class PlatformServerlessHttp {
|
|
5
|
-
static bootstrap(module: Type<any>, settings: PlatformBuilderSettings<any
|
|
5
|
+
static bootstrap(module: Type<any>, settings: PlatformBuilderSettings<any>): PlatformBuilder & {
|
|
6
6
|
handler(): Handler;
|
|
7
7
|
};
|
|
8
8
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsed/platform-serverless-http",
|
|
3
|
-
"version": "7.0.0-
|
|
3
|
+
"version": "7.0.0-rc.3",
|
|
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",
|
|
@@ -50,27 +50,27 @@
|
|
|
50
50
|
"bugs": {
|
|
51
51
|
"url": "https://github.com/tsedio/tsed/issues"
|
|
52
52
|
},
|
|
53
|
-
"homepage": "https://github.com/tsedio/tsed/tree/
|
|
53
|
+
"homepage": "https://github.com/tsedio/tsed/tree/rc/packages/platform/platform-serverless-http",
|
|
54
54
|
"repository": "https://github.com/tsedio/tsed",
|
|
55
55
|
"dependencies": {
|
|
56
|
-
"tslib": "2.
|
|
56
|
+
"tslib": "2.4.0"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
|
-
"@tsed/common": "7.0.0-
|
|
60
|
-
"@tsed/core": "7.0.0-
|
|
61
|
-
"@tsed/di": "7.0.0-
|
|
62
|
-
"@tsed/platform-serverless-testing": "7.0.0-
|
|
59
|
+
"@tsed/common": "7.0.0-rc.3",
|
|
60
|
+
"@tsed/core": "7.0.0-rc.3",
|
|
61
|
+
"@tsed/di": "7.0.0-rc.3",
|
|
62
|
+
"@tsed/platform-serverless-testing": "7.0.0-rc.3",
|
|
63
63
|
"aws-lambda": "^1.0.7",
|
|
64
64
|
"serverless-http": "^2.7.0"
|
|
65
65
|
},
|
|
66
66
|
"peerDependencies": {
|
|
67
|
-
"@tsed/common": "^7.0.0-
|
|
68
|
-
"@tsed/core": "^7.0.0-
|
|
69
|
-
"@tsed/di": "^7.0.0-
|
|
70
|
-
"@tsed/json-mapper": "^7.0.0-
|
|
71
|
-
"@tsed/logger": ">=6.
|
|
72
|
-
"@tsed/openspec": "^7.0.0-
|
|
73
|
-
"@tsed/schema": "^7.0.0-
|
|
67
|
+
"@tsed/common": "^7.0.0-rc.3",
|
|
68
|
+
"@tsed/core": "^7.0.0-rc.3",
|
|
69
|
+
"@tsed/di": "^7.0.0-rc.3",
|
|
70
|
+
"@tsed/json-mapper": "^7.0.0-rc.3",
|
|
71
|
+
"@tsed/logger": ">=6.2.0",
|
|
72
|
+
"@tsed/openspec": "^7.0.0-rc.3",
|
|
73
|
+
"@tsed/schema": "^7.0.0-rc.3",
|
|
74
74
|
"aws-lambda": ">=1.0.7",
|
|
75
75
|
"serverless-http": ">=2.0.0"
|
|
76
76
|
},
|
|
@@ -96,5 +96,8 @@
|
|
|
96
96
|
"@tsed/schema": {
|
|
97
97
|
"optional": false
|
|
98
98
|
}
|
|
99
|
+
},
|
|
100
|
+
"publishConfig": {
|
|
101
|
+
"tag": "rc"
|
|
99
102
|
}
|
|
100
103
|
}
|
package/readme.md
CHANGED
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
[](https://badge.fury.io/js/%40tsed%2Fcommon)
|
|
12
12
|
[](https://github.com/semantic-release/semantic-release)
|
|
13
13
|
[](https://github.com/prettier/prettier)
|
|
14
|
-
[](https://github.com/sponsors/romakita)
|
|
15
|
+
[](https://opencollective.com/tsed)
|
|
15
16
|
|
|
16
17
|
</div>
|
|
17
18
|
|
|
@@ -297,7 +298,7 @@ website. [[Become a sponsor](https://opencollective.com/tsed#sponsor)]
|
|
|
297
298
|
|
|
298
299
|
The MIT License (MIT)
|
|
299
300
|
|
|
300
|
-
Copyright (c) 2016 -
|
|
301
|
+
Copyright (c) 2016 - 2022 Romain Lenzotti
|
|
301
302
|
|
|
302
303
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
|
303
304
|
documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
|