@tsed/platform-serverless-http 8.0.0-beta.1 → 8.0.0-beta.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,4 +1,4 @@
1
- import { PlatformBuilder } from "@tsed/common";
1
+ import { PlatformBuilder } from "@tsed/platform-http";
2
2
  import serverless from "serverless-http";
3
3
  export class PlatformServerlessHttp {
4
4
  static bootstrap(module, settings) {
@@ -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,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"}
1
+ {"version":3,"file":"PlatformServerlessHttp.js","sourceRoot":"","sources":["../../../src/builder/PlatformServerlessHttp.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,eAAe,EAA0B,MAAM,qBAAqB,CAAC;AAE7E,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"}
@@ -1,4 +1,4 @@
1
- import { Req } from "@tsed/common";
1
+ import { Req } from "@tsed/platform-http";
2
2
  /**
3
3
  * Return the Serverless context
4
4
  * @decorator
@@ -1 +1 @@
1
- {"version":3,"file":"serverlessContext.js","sourceRoot":"","sources":["../../../src/decorators/serverlessContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,cAAc,CAAC;AAGjC;;;GAGG;AACH,MAAM,UAAU,iBAAiB;IAC/B,OAAO,GAAG,CAAC,oBAAoB,CAAC,CAAC;AACnC,CAAC"}
1
+ {"version":3,"file":"serverlessContext.js","sourceRoot":"","sources":["../../../src/decorators/serverlessContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,qBAAqB,CAAC;AAGxC;;;GAGG;AACH,MAAM,UAAU,iBAAiB;IAC/B,OAAO,GAAG,CAAC,oBAAoB,CAAC,CAAC;AACnC,CAAC"}
@@ -1,4 +1,4 @@
1
- import { Req } from "@tsed/common";
1
+ import { Req } from "@tsed/platform-http";
2
2
  /**
3
3
  * Return the serverless.event
4
4
  * @decorator
@@ -1 +1 @@
1
- {"version":3,"file":"serverlessEvent.js","sourceRoot":"","sources":["../../../src/decorators/serverlessEvent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,cAAc,CAAC;AAEjC;;;GAGG;AACH,MAAM,UAAU,eAAe;IAC7B,OAAO,GAAG,CAAC,kBAAkB,CAAC,CAAC;AACjC,CAAC"}
1
+ {"version":3,"file":"serverlessEvent.js","sourceRoot":"","sources":["../../../src/decorators/serverlessEvent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,qBAAqB,CAAC;AAExC;;;GAGG;AACH,MAAM,UAAU,eAAe;IAC7B,OAAO,GAAG,CAAC,kBAAkB,CAAC,CAAC;AACjC,CAAC"}
@@ -1,5 +1,5 @@
1
- import { PlatformBuilder, PlatformBuilderSettings } from "@tsed/common";
2
1
  import { Type } from "@tsed/core";
2
+ import { PlatformBuilder, PlatformBuilderSettings } from "@tsed/platform-http";
3
3
  import type { Handler } from "aws-lambda";
4
4
  export declare class PlatformServerlessHttp {
5
5
  static bootstrap(module: Type<any>, settings: PlatformBuilderSettings<any>): PlatformBuilder & {
@@ -1,4 +1,4 @@
1
- import { Context } from "aws-lambda";
1
+ import type { Context } from "aws-lambda";
2
2
  /**
3
3
  * Return the Serverless context
4
4
  * @decorator
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@tsed/platform-serverless-http",
3
3
  "description": "Module to support Serverless HTTP function with Ts.ED",
4
4
  "type": "module",
5
- "version": "8.0.0-beta.1",
5
+ "version": "8.0.0-beta.10",
6
6
  "source": "./src/index.ts",
7
7
  "main": "./lib/esm/index.js",
8
8
  "module": "./lib/esm/index.js",
@@ -57,12 +57,12 @@
57
57
  "tslib": "2.7.0"
58
58
  },
59
59
  "devDependencies": {
60
- "@tsed/barrels": "8.0.0-beta.1",
61
- "@tsed/common": "8.0.0-beta.1",
62
- "@tsed/core": "8.0.0-beta.1",
63
- "@tsed/di": "8.0.0-beta.1",
64
- "@tsed/platform-serverless-testing": "8.0.0-beta.1",
65
- "@tsed/typescript": "8.0.0-beta.1",
60
+ "@tsed/barrels": "8.0.0-beta.10",
61
+ "@tsed/core": "8.0.0-beta.10",
62
+ "@tsed/di": "8.0.0-beta.10",
63
+ "@tsed/platform-http": "8.0.0-beta.10",
64
+ "@tsed/platform-serverless-testing": "8.0.0-beta.10",
65
+ "@tsed/typescript": "8.0.0-beta.10",
66
66
  "@types/aws-lambda": "^8.10.145",
67
67
  "eslint": "9.12.0",
68
68
  "serverless-http": "^3.2.0",
@@ -70,13 +70,13 @@
70
70
  "vitest": "2.1.2"
71
71
  },
72
72
  "peerDependencies": {
73
- "@tsed/common": "8.0.0-beta.1",
74
- "@tsed/core": "8.0.0-beta.1",
75
- "@tsed/di": "8.0.0-beta.1",
76
- "@tsed/json-mapper": "8.0.0-beta.1",
73
+ "@tsed/core": "8.0.0-beta.10",
74
+ "@tsed/di": "8.0.0-beta.10",
75
+ "@tsed/json-mapper": "8.0.0-beta.10",
77
76
  "@tsed/logger": ">=6.7.5",
78
- "@tsed/openspec": "8.0.0-beta.1",
79
- "@tsed/schema": "8.0.0-beta.1",
77
+ "@tsed/openspec": "8.0.0-beta.10",
78
+ "@tsed/platform-http": "8.0.0-beta.10",
79
+ "@tsed/schema": "8.0.0-beta.10",
80
80
  "serverless-http": ">=2.0.0"
81
81
  },
82
82
  "peerDependenciesMeta": {
package/readme.md CHANGED
@@ -67,7 +67,7 @@ export class TimeslotsController {
67
67
 
68
68
  @Get("/")
69
69
  @Summary("Return a list of timeslots")
70
- @Returns(200, Array).Of(TimeslotModel)
70
+ @(Returns(200, Array).Of(TimeslotModel))
71
71
  get(@QueryParams("date_start") dateStart: Date, @QueryParams("date_end") dateEnd: Date) {
72
72
  return this.timeslotsService.find({
73
73
  dateStart,
@@ -81,7 +81,7 @@ Create new `Server.ts` to configure your Ts.ED application:
81
81
 
82
82
  ```typescript
83
83
  import {Configuration, Inject} from "@tsed/di";
84
- import {PlatformApplication} from "@tsed/common";
84
+ import {PlatformApplication} from "@tsed/platform-http";
85
85
  import cors from "cors";
86
86
  import compress from "compression";
87
87
  import cookieParser from "cookie-parser";
@@ -220,7 +220,8 @@ You should see in the terminal the following result:
220
220
  This package includes decorators to easily get the event object Lambda received from API Gateway:
221
221
 
222
222
  ```typescript
223
- import {Controller, Get} from "@tsed/common";
223
+ import {Controller} from "@tsed/di";
224
+ import {Get} from "@tsed/schema";
224
225
  import {ServerlessEvent, ServerlessContext} from "@tsed/platform-serverless-http";
225
226
 
226
227
  @Controller("/")