@tsed/platform-serverless-http 8.0.0-alpha.5 → 8.0.0-alpha.7
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/lib/esm/builder/PlatformServerlessHttp.js.map +1 -1
- package/package.json +18 -19
- package/lib/cjs/builder/PlatformServerlessHttp.js +0 -30
- package/lib/cjs/builder/PlatformServerlessHttp.js.map +0 -1
- package/lib/cjs/decorators/serverlessContext.js +0 -13
- package/lib/cjs/decorators/serverlessContext.js.map +0 -1
- package/lib/cjs/decorators/serverlessEvent.js +0 -13
- package/lib/cjs/decorators/serverlessEvent.js.map +0 -1
- package/lib/cjs/index.js +0 -10
- package/lib/cjs/index.js.map +0 -1
- package/lib/cjs/package.json +0 -3
- package/lib/esm/package.json +0 -3
- package/lib/types-esm/builder/PlatformServerlessHttp.d.ts +0 -8
- package/lib/types-esm/decorators/serverlessContext.d.ts +0 -7
- package/lib/types-esm/decorators/serverlessEvent.d.ts +0 -5
- package/lib/types-esm/index.d.ts +0 -6
|
@@ -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,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;
|
|
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,CAAC;oBACb,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;gBACL,CAAC;gBAED,OAAO,OAAO,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;YACjC,CAAC,CAAC;QACJ,CAAC,CAAC;QAEF,OAAO,QAAe,CAAC;IACzB,CAAC;CACF"}
|
package/package.json
CHANGED
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsed/platform-serverless-http",
|
|
3
3
|
"description": "Module to support Serverless HTTP function with Ts.ED",
|
|
4
|
-
"type": "
|
|
5
|
-
"version": "8.0.0-alpha.
|
|
4
|
+
"type": "module",
|
|
5
|
+
"version": "8.0.0-alpha.7",
|
|
6
6
|
"source": "./src/index.ts",
|
|
7
|
-
"main": "./lib/
|
|
7
|
+
"main": "./lib/esm/index.js",
|
|
8
8
|
"module": "./lib/esm/index.js",
|
|
9
9
|
"typings": "./lib/types/index.d.ts",
|
|
10
10
|
"exports": {
|
|
11
11
|
".": {
|
|
12
12
|
"types": "./lib/types/index.d.ts",
|
|
13
13
|
"import": "./lib/esm/index.js",
|
|
14
|
-
"require": "./lib/cjs/index.js",
|
|
15
14
|
"default": "./lib/cjs/index.js"
|
|
16
15
|
}
|
|
17
16
|
},
|
|
@@ -55,29 +54,29 @@
|
|
|
55
54
|
"homepage": "https://github.com/tsedio/tsed/tree/production/packages/platform/platform-serverless-http",
|
|
56
55
|
"repository": "https://github.com/tsedio/tsed",
|
|
57
56
|
"dependencies": {
|
|
58
|
-
"tslib": "2.
|
|
57
|
+
"tslib": "2.7.0"
|
|
59
58
|
},
|
|
60
59
|
"devDependencies": {
|
|
61
|
-
"@tsed/barrels": "8.0.0-alpha.
|
|
62
|
-
"@tsed/common": "8.0.0-alpha.
|
|
63
|
-
"@tsed/core": "8.0.0-alpha.
|
|
64
|
-
"@tsed/di": "8.0.0-alpha.
|
|
65
|
-
"@tsed/platform-serverless-testing": "8.0.0-alpha.
|
|
66
|
-
"@tsed/typescript": "8.0.0-alpha.
|
|
60
|
+
"@tsed/barrels": "8.0.0-alpha.7",
|
|
61
|
+
"@tsed/common": "8.0.0-alpha.7",
|
|
62
|
+
"@tsed/core": "8.0.0-alpha.7",
|
|
63
|
+
"@tsed/di": "8.0.0-alpha.7",
|
|
64
|
+
"@tsed/platform-serverless-testing": "8.0.0-alpha.7",
|
|
65
|
+
"@tsed/typescript": "8.0.0-alpha.7",
|
|
67
66
|
"@types/aws-lambda": "^8.10.136",
|
|
68
|
-
"eslint": "
|
|
67
|
+
"eslint": "9.11.1",
|
|
69
68
|
"serverless-http": "^3.2.0",
|
|
70
|
-
"typescript": "4.
|
|
69
|
+
"typescript": "5.4.5",
|
|
71
70
|
"vitest": "2.0.4"
|
|
72
71
|
},
|
|
73
72
|
"peerDependencies": {
|
|
74
|
-
"@tsed/common": "8.0.0-alpha.
|
|
75
|
-
"@tsed/core": "8.0.0-alpha.
|
|
76
|
-
"@tsed/di": "8.0.0-alpha.
|
|
77
|
-
"@tsed/json-mapper": "8.0.0-alpha.
|
|
73
|
+
"@tsed/common": "8.0.0-alpha.7",
|
|
74
|
+
"@tsed/core": "8.0.0-alpha.7",
|
|
75
|
+
"@tsed/di": "8.0.0-alpha.7",
|
|
76
|
+
"@tsed/json-mapper": "8.0.0-alpha.7",
|
|
78
77
|
"@tsed/logger": ">=6.7.5",
|
|
79
|
-
"@tsed/openspec": "8.0.0-alpha.
|
|
80
|
-
"@tsed/schema": "8.0.0-alpha.
|
|
78
|
+
"@tsed/openspec": "8.0.0-alpha.7",
|
|
79
|
+
"@tsed/schema": "8.0.0-alpha.7",
|
|
81
80
|
"serverless-http": ">=2.0.0"
|
|
82
81
|
},
|
|
83
82
|
"peerDependenciesMeta": {
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PlatformServerlessHttp = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const common_1 = require("@tsed/common");
|
|
6
|
-
const serverless_http_1 = tslib_1.__importDefault(require("serverless-http"));
|
|
7
|
-
class PlatformServerlessHttp {
|
|
8
|
-
static bootstrap(module, settings) {
|
|
9
|
-
const platform = common_1.PlatformBuilder.create(module, settings);
|
|
10
|
-
const promise = platform.listen();
|
|
11
|
-
platform.handler = () => {
|
|
12
|
-
let handler;
|
|
13
|
-
return async (event, context) => {
|
|
14
|
-
// istanbul ignore else
|
|
15
|
-
if (!handler) {
|
|
16
|
-
await promise;
|
|
17
|
-
handler = (0, serverless_http_1.default)(platform.callback(), {
|
|
18
|
-
request(request) {
|
|
19
|
-
request.serverless = { event, context };
|
|
20
|
-
}
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
return handler(event, context);
|
|
24
|
-
};
|
|
25
|
-
};
|
|
26
|
-
return platform;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
exports.PlatformServerlessHttp = PlatformServerlessHttp;
|
|
30
|
-
//# sourceMappingURL=PlatformServerlessHttp.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ServerlessContext = void 0;
|
|
4
|
-
const common_1 = require("@tsed/common");
|
|
5
|
-
/**
|
|
6
|
-
* Return the Serverless context
|
|
7
|
-
* @decorator
|
|
8
|
-
*/
|
|
9
|
-
function ServerlessContext() {
|
|
10
|
-
return (0, common_1.Req)("serverless.context");
|
|
11
|
-
}
|
|
12
|
-
exports.ServerlessContext = ServerlessContext;
|
|
13
|
-
//# sourceMappingURL=serverlessContext.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"serverlessContext.js","sourceRoot":"","sources":["../../../src/decorators/serverlessContext.ts"],"names":[],"mappings":";;;AAAA,yCAAiC;AAGjC;;;GAGG;AACH,SAAgB,iBAAiB;IAC/B,OAAO,IAAA,YAAG,EAAC,oBAAoB,CAAC,CAAC;AACnC,CAAC;AAFD,8CAEC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ServerlessEvent = void 0;
|
|
4
|
-
const common_1 = require("@tsed/common");
|
|
5
|
-
/**
|
|
6
|
-
* Return the serverless.event
|
|
7
|
-
* @decorator
|
|
8
|
-
*/
|
|
9
|
-
function ServerlessEvent() {
|
|
10
|
-
return (0, common_1.Req)("serverless.event");
|
|
11
|
-
}
|
|
12
|
-
exports.ServerlessEvent = ServerlessEvent;
|
|
13
|
-
//# sourceMappingURL=serverlessEvent.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"serverlessEvent.js","sourceRoot":"","sources":["../../../src/decorators/serverlessEvent.ts"],"names":[],"mappings":";;;AAAA,yCAAiC;AAEjC;;;GAGG;AACH,SAAgB,eAAe;IAC7B,OAAO,IAAA,YAAG,EAAC,kBAAkB,CAAC,CAAC;AACjC,CAAC;AAFD,0CAEC"}
|
package/lib/cjs/index.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
/**
|
|
5
|
-
* @file Automatically generated by @tsed/barrels.
|
|
6
|
-
*/
|
|
7
|
-
tslib_1.__exportStar(require("./builder/PlatformServerlessHttp.js"), exports);
|
|
8
|
-
tslib_1.__exportStar(require("./decorators/serverlessContext.js"), exports);
|
|
9
|
-
tslib_1.__exportStar(require("./decorators/serverlessEvent.js"), exports);
|
|
10
|
-
//# sourceMappingURL=index.js.map
|
package/lib/cjs/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,8EAAoD;AACpD,4EAAkD;AAClD,0EAAgD"}
|
package/lib/cjs/package.json
DELETED
package/lib/esm/package.json
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { PlatformBuilder, PlatformBuilderSettings } from "@tsed/common";
|
|
2
|
-
import { Type } from "@tsed/core";
|
|
3
|
-
import type { Handler } from "aws-lambda";
|
|
4
|
-
export declare class PlatformServerlessHttp {
|
|
5
|
-
static bootstrap(module: Type<any>, settings: PlatformBuilderSettings<any>): PlatformBuilder & {
|
|
6
|
-
handler(): Handler;
|
|
7
|
-
};
|
|
8
|
-
}
|