@tsed/platform-serverless-http 7.79.4 → 7.80.0

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.
@@ -0,0 +1,8 @@
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
+ }
@@ -0,0 +1,7 @@
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;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Return the serverless.event
3
+ * @decorator
4
+ */
5
+ export declare function ServerlessEvent(): ParameterDecorator;
@@ -0,0 +1,6 @@
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";
package/package.json CHANGED
@@ -1,22 +1,25 @@
1
1
  {
2
2
  "name": "@tsed/platform-serverless-http",
3
- "version": "7.79.4",
4
3
  "description": "Module to support Serverless HTTP function with Ts.ED",
4
+ "type": "commonjs",
5
+ "version": "7.80.0",
5
6
  "source": "./src/index.ts",
6
7
  "main": "./lib/cjs/index.js",
7
8
  "module": "./lib/esm/index.js",
8
9
  "typings": "./lib/types/index.d.ts",
9
10
  "exports": {
10
- "types": "./lib/types/index.d.ts",
11
- "import": "./lib/esm/index.js",
12
- "require": "./lib/cjs/index.js",
13
- "default": "./lib/esm/index.js"
11
+ ".": {
12
+ "types": "./lib/types/index.d.ts",
13
+ "import": "./lib/esm/index.js",
14
+ "default": "./lib/cjs/index.js"
15
+ }
14
16
  },
15
17
  "scripts": {
16
18
  "build": "yarn barrels && yarn build:ts",
17
19
  "barrels": "barrels",
18
- "test": "jest && jest-coverage-thresholds-bumper",
19
- "build:ts": "tsc --build tsconfig.json && tsc --build tsconfig.esm.json"
20
+ "test": "vitest run",
21
+ "build:ts": "tsc --build tsconfig.json",
22
+ "test:ci": "vitest run --coverage.thresholds.autoUpdate=true"
20
23
  },
21
24
  "keywords": [
22
25
  "aws",
@@ -54,25 +57,26 @@
54
57
  "tslib": "2.6.1"
55
58
  },
56
59
  "devDependencies": {
57
- "@tsed/barrels": "7.79.4",
58
- "@tsed/common": "7.79.4",
59
- "@tsed/core": "7.79.4",
60
- "@tsed/di": "7.79.4",
61
- "@tsed/platform-serverless-testing": "7.79.4",
62
- "@tsed/typescript": "7.79.4",
60
+ "@tsed/barrels": "7.80.0",
61
+ "@tsed/common": "7.80.0",
62
+ "@tsed/core": "7.80.0",
63
+ "@tsed/di": "7.80.0",
64
+ "@tsed/platform-serverless-testing": "7.80.0",
65
+ "@tsed/typescript": "7.80.0",
63
66
  "@types/aws-lambda": "^8.10.136",
64
67
  "eslint": "^8.57.0",
65
- "jest": "^29.7.0",
66
- "serverless-http": "^3.2.0"
68
+ "serverless-http": "^3.2.0",
69
+ "typescript": "4.9.5",
70
+ "vitest": "2.0.4"
67
71
  },
68
72
  "peerDependencies": {
69
- "@tsed/common": "7.79.4",
70
- "@tsed/core": "7.79.4",
71
- "@tsed/di": "7.79.4",
72
- "@tsed/json-mapper": "7.79.4",
73
+ "@tsed/common": "7.80.0",
74
+ "@tsed/core": "7.80.0",
75
+ "@tsed/di": "7.80.0",
76
+ "@tsed/json-mapper": "7.80.0",
73
77
  "@tsed/logger": ">=6.7.5",
74
- "@tsed/openspec": "7.79.4",
75
- "@tsed/schema": "7.79.4",
78
+ "@tsed/openspec": "7.80.0",
79
+ "@tsed/schema": "7.80.0",
76
80
  "serverless-http": ">=2.0.0"
77
81
  },
78
82
  "peerDependenciesMeta": {
@@ -0,0 +1,21 @@
1
+ // @ts-ignore
2
+ import {presets} from "@tsed/vitest/presets";
3
+ import {defineConfig} from "vitest/config";
4
+
5
+ export default defineConfig(
6
+ {
7
+ ...presets,
8
+ test: {
9
+ ...presets.test,
10
+ coverage: {
11
+ ...presets.test.coverage,
12
+ thresholds: {
13
+ statements: 0,
14
+ branches: 0,
15
+ functions: 0,
16
+ lines: 0
17
+ }
18
+ }
19
+ }
20
+ }
21
+ );
package/jest.config.js DELETED
@@ -1,20 +0,0 @@
1
- // For a detailed explanation regarding each configuration property, visit:
2
- // https://jestjs.io/docs/en/configuration.html
3
- const config = require("@tsed/jest-config");
4
-
5
- module.exports = {
6
- ...config,
7
- roots: ["<rootDir>/src", "<rootDir>/test"],
8
- moduleNameMapper: {
9
- ...config.moduleNameMapper,
10
- "@tsed/platform-serverless-http": "<rootDir>/src/index.ts"
11
- },
12
- coverageThreshold: {
13
- global: {
14
- branches: 100,
15
- functions: 100,
16
- lines: 100,
17
- statements: 100
18
- }
19
- }
20
- };
@@ -1,3 +0,0 @@
1
- {
2
- "type": "commonjs"
3
- }
@@ -1,3 +0,0 @@
1
- {
2
- "type": "module"
3
- }
package/tsconfig.esm.json DELETED
@@ -1,51 +0,0 @@
1
- {
2
- "extends": "@tsed/typescript/tsconfig.node.json",
3
- "compilerOptions": {
4
- "baseUrl": ".",
5
- "module": "ES2020",
6
- "rootDir": "src",
7
- "outDir": "./lib/esm",
8
- "declaration": true,
9
- "declarationDir": "./lib/types",
10
- "composite": true,
11
- "noEmit": false
12
- },
13
- "include": ["src", "src/**/*.json"],
14
- "exclude": [
15
- "node_modules",
16
- "test",
17
- "lib",
18
- "benchmark",
19
- "coverage",
20
- "spec",
21
- "**/*.benchmark.ts",
22
- "**/*.spec.ts",
23
- "keys",
24
- "jest.config.js",
25
- "**/__mock__/**",
26
- "webpack.config.js"
27
- ],
28
- "references": [
29
- {
30
- "path": "../common"
31
- },
32
- {
33
- "path": "../../core"
34
- },
35
- {
36
- "path": "../../di"
37
- },
38
- {
39
- "path": "../../specs/json-mapper"
40
- },
41
- {
42
- "path": "../../specs/openspec"
43
- },
44
- {
45
- "path": "../../specs/schema"
46
- },
47
- {
48
- "path": "../platform-serverless-testing"
49
- }
50
- ]
51
- }