@tsed/platform-serverless-http 8.0.0-alpha.1 → 8.0.0-alpha.10

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,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"}
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,18 +1,17 @@
1
1
  {
2
2
  "name": "@tsed/platform-serverless-http",
3
3
  "description": "Module to support Serverless HTTP function with Ts.ED",
4
- "type": "commonjs",
5
- "version": "8.0.0-alpha.1",
4
+ "type": "module",
5
+ "version": "8.0.0-alpha.10",
6
6
  "source": "./src/index.ts",
7
- "main": "./lib/cjs/index.js",
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
- "default": "./lib/cjs/index.js"
14
+ "default": "./lib/esm/index.js"
16
15
  }
17
16
  },
18
17
  "scripts": {
@@ -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.6.1"
57
+ "tslib": "2.7.0"
59
58
  },
60
59
  "devDependencies": {
61
- "@tsed/barrels": "8.0.0-alpha.1",
62
- "@tsed/common": "8.0.0-alpha.1",
63
- "@tsed/core": "8.0.0-alpha.1",
64
- "@tsed/di": "8.0.0-alpha.1",
65
- "@tsed/platform-serverless-testing": "8.0.0-alpha.1",
66
- "@tsed/typescript": "8.0.0-alpha.1",
67
- "@types/aws-lambda": "^8.10.136",
68
- "eslint": "^8.57.0",
60
+ "@tsed/barrels": "8.0.0-alpha.10",
61
+ "@tsed/common": "8.0.0-alpha.10",
62
+ "@tsed/core": "8.0.0-alpha.10",
63
+ "@tsed/di": "8.0.0-alpha.10",
64
+ "@tsed/platform-serverless-testing": "8.0.0-alpha.10",
65
+ "@tsed/typescript": "8.0.0-alpha.10",
66
+ "@types/aws-lambda": "^8.10.145",
67
+ "eslint": "9.12.0",
69
68
  "serverless-http": "^3.2.0",
70
- "typescript": "4.9.5",
71
- "vitest": "2.0.4"
69
+ "typescript": "5.4.5",
70
+ "vitest": "2.1.2"
72
71
  },
73
72
  "peerDependencies": {
74
- "@tsed/common": "8.0.0-alpha.1",
75
- "@tsed/core": "8.0.0-alpha.1",
76
- "@tsed/di": "8.0.0-alpha.1",
77
- "@tsed/json-mapper": "8.0.0-alpha.1",
73
+ "@tsed/common": "8.0.0-alpha.10",
74
+ "@tsed/core": "8.0.0-alpha.10",
75
+ "@tsed/di": "8.0.0-alpha.10",
76
+ "@tsed/json-mapper": "8.0.0-alpha.10",
78
77
  "@tsed/logger": ">=6.7.5",
79
- "@tsed/openspec": "8.0.0-alpha.1",
80
- "@tsed/schema": "8.0.0-alpha.1",
78
+ "@tsed/openspec": "8.0.0-alpha.10",
79
+ "@tsed/schema": "8.0.0-alpha.10",
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
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,8EAAoD;AACpD,4EAAkD;AAClD,0EAAgD"}
@@ -1,3 +0,0 @@
1
- {
2
- "type": "commonjs"
3
- }
@@ -1,3 +0,0 @@
1
- {
2
- "type": "module"
3
- }
@@ -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
- }
@@ -1,7 +0,0 @@
1
- import { Context } from "aws-lambda";
2
- /**
3
- * Return the Serverless context
4
- * @decorator
5
- */
6
- export declare function ServerlessContext(): ParameterDecorator;
7
- export type ServerlessContext = Context;
@@ -1,5 +0,0 @@
1
- /**
2
- * Return the serverless.event
3
- * @decorator
4
- */
5
- export declare function ServerlessEvent(): ParameterDecorator;
@@ -1,6 +0,0 @@
1
- /**
2
- * @file Automatically generated by @tsed/barrels.
3
- */
4
- export * from "./builder/PlatformServerlessHttp.js";
5
- export * from "./decorators/serverlessContext.js";
6
- export * from "./decorators/serverlessEvent.js";