@tsed/platform-serverless-http 8.38.0-beta.4 → 8.38.0-beta.6

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.
@@ -2,7 +2,11 @@ import { PlatformBuilder } from "@tsed/platform-http";
2
2
  import serverless from "serverless-http";
3
3
  export class PlatformServerlessHttp {
4
4
  static bootstrap(module, settings) {
5
- const platform = PlatformBuilder.create(module, settings);
5
+ settings = settings || module;
6
+ const platform = PlatformBuilder.create({
7
+ rootModule: module,
8
+ ...settings
9
+ });
6
10
  const promise = platform.listen();
7
11
  platform.handler = () => {
8
12
  let handler;
@@ -2,7 +2,10 @@ import { PlatformBuilder, PlatformBuilderSettings } from "@tsed/platform-http";
2
2
  import type { Handler } from "aws-lambda";
3
3
  import { Type } from "@tsed/core";
4
4
  export declare class PlatformServerlessHttp {
5
- static bootstrap(module: Type<any>, settings: PlatformBuilderSettings<any>): PlatformBuilder & {
5
+ static bootstrap(settings: PlatformBuilderSettings<any>): PlatformBuilder & {
6
+ handler(): Handler;
7
+ };
8
+ static bootstrap(module: Type<any>, settings?: PlatformBuilderSettings<any>): PlatformBuilder & {
6
9
  handler(): Handler;
7
10
  };
8
11
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tsed/platform-serverless-http",
3
- "version": "8.38.0-beta.4",
3
+ "version": "8.38.0-beta.6",
4
4
  "description": "Module to support Serverless HTTP function with Ts.ED",
5
5
  "keywords": [
6
6
  "Controller",
@@ -58,12 +58,12 @@
58
58
  "tslib": ">=2.7.0"
59
59
  },
60
60
  "devDependencies": {
61
- "@tsed/barrels": "8.38.0-beta.4",
62
- "@tsed/di": "8.38.0-beta.4",
63
- "@tsed/hooks": "8.38.0-beta.4",
64
- "@tsed/platform-http": "8.38.0-beta.4",
65
- "@tsed/platform-serverless-testing": "8.38.0-beta.4",
66
- "@tsed/typescript": "8.38.0-beta.4",
61
+ "@tsed/barrels": "8.38.0-beta.6",
62
+ "@tsed/di": "8.38.0-beta.6",
63
+ "@tsed/hooks": "8.38.0-beta.6",
64
+ "@tsed/platform-http": "8.38.0-beta.6",
65
+ "@tsed/platform-serverless-testing": "8.38.0-beta.6",
66
+ "@tsed/typescript": "8.38.0-beta.6",
67
67
  "@types/aws-lambda": "^8.10.145",
68
68
  "serverless-http": "4.0.0",
69
69
  "typescript": "6.0.2",
package/readme.md CHANGED
@@ -133,7 +133,8 @@ import {PlatformExpress} from "@tsed/platform-express";
133
133
  import {Server} from "./Server.js";
134
134
 
135
135
  async function bootstrap() {
136
- const platform = await PlatformExpress.bootstrap(Server, {
136
+ const platform = await PlatformExpress.bootstrap({
137
+ rootModule: Server,
137
138
  httpsPort: false,
138
139
  httpPort: process.env.PORT || 3000,
139
140
  disableComponentsScan: true