@tsed/platform-serverless 7.0.0-alpha.1 → 7.0.0-beta.3
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/jest.config.js +4 -4
- package/lib/cjs/builder/PlatformServerless.js +156 -0
- package/lib/cjs/builder/PlatformServerless.js.map +1 -0
- package/lib/cjs/builder/PlatformServerlessHandler.js +93 -0
- package/lib/cjs/builder/PlatformServerlessHandler.js.map +1 -0
- package/lib/cjs/domain/ServerlessContext.js +26 -0
- package/lib/cjs/domain/ServerlessContext.js.map +1 -0
- package/lib/cjs/domain/ServerlessRequest.js +80 -0
- package/lib/cjs/domain/ServerlessRequest.js.map +1 -0
- package/lib/cjs/domain/ServerlessResponse.js +193 -0
- package/lib/cjs/domain/ServerlessResponse.js.map +1 -0
- package/lib/cjs/index.js +22 -0
- package/lib/cjs/index.js.map +1 -0
- package/lib/cjs/utils/getRequestId.js +13 -0
- package/lib/cjs/utils/getRequestId.js.map +1 -0
- package/lib/cjs/utils/setResponseHeaders.js +35 -0
- package/lib/cjs/utils/setResponseHeaders.js.map +1 -0
- package/lib/esm/builder/PlatformServerless.js +133 -0
- package/lib/esm/builder/PlatformServerless.js.map +1 -0
- package/lib/esm/builder/PlatformServerlessHandler.js +90 -0
- package/lib/esm/builder/PlatformServerlessHandler.js.map +1 -0
- package/lib/esm/domain/ServerlessContext.js +22 -0
- package/lib/esm/domain/ServerlessContext.js.map +1 -0
- package/lib/esm/domain/ServerlessRequest.js +76 -0
- package/lib/esm/domain/ServerlessRequest.js.map +1 -0
- package/lib/esm/domain/ServerlessResponse.js +189 -0
- package/lib/esm/domain/ServerlessResponse.js.map +1 -0
- package/lib/esm/index.js +10 -0
- package/lib/esm/index.js.map +1 -0
- package/lib/esm/utils/getRequestId.js +9 -0
- package/lib/esm/utils/getRequestId.js.map +1 -0
- package/lib/esm/utils/setResponseHeaders.js +31 -0
- package/lib/esm/utils/setResponseHeaders.js.map +1 -0
- package/lib/{builder → types/builder}/PlatformServerless.d.ts +14 -6
- package/lib/{builder → types/builder}/PlatformServerlessHandler.d.ts +2 -2
- package/lib/{domain → types/domain}/ServerlessContext.d.ts +0 -0
- package/lib/{domain → types/domain}/ServerlessRequest.d.ts +0 -0
- package/lib/{domain → types/domain}/ServerlessResponse.d.ts +1 -1
- package/lib/{index.d.ts → types/index.d.ts} +1 -2
- package/lib/types/utils/getRequestId.d.ts +2 -0
- package/lib/{utils → types/utils}/setResponseHeaders.d.ts +0 -0
- package/package.json +20 -15
- package/readme.md +271 -54
- package/tsconfig.compile.esm.json +23 -0
- package/lib/decorators/lambda.d.ts +0 -58
- package/lib/index.js +0 -1020
- package/lib/index.js.map +0 -1
- package/lib/index.modern.js +0 -978
- package/lib/index.modern.js.map +0 -1
- package/lib/services/PlatformServerlessTest.d.ts +0 -40
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "./tsconfig.compile.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"baseUrl": ".",
|
|
5
|
+
"module": "ES2020",
|
|
6
|
+
"rootDir": "src",
|
|
7
|
+
"outDir": "./lib/esm",
|
|
8
|
+
"declaration": true,
|
|
9
|
+
"declarationDir": "./lib/types"
|
|
10
|
+
},
|
|
11
|
+
"exclude": [
|
|
12
|
+
"node_modules",
|
|
13
|
+
"test",
|
|
14
|
+
"lib",
|
|
15
|
+
"benchmark",
|
|
16
|
+
"coverage",
|
|
17
|
+
"spec",
|
|
18
|
+
"**/*.benchmark.ts",
|
|
19
|
+
"**/*.spec.ts",
|
|
20
|
+
"keys",
|
|
21
|
+
"jest.config.js"
|
|
22
|
+
]
|
|
23
|
+
}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { OperationMethods } from "@tsed/schema";
|
|
2
|
-
export interface LambdaOptions {
|
|
3
|
-
name?: string;
|
|
4
|
-
path: string;
|
|
5
|
-
method: OperationMethods | string;
|
|
6
|
-
}
|
|
7
|
-
export interface LambdaChainedDecorators {
|
|
8
|
-
<T>(target: Object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<T>): TypedPropertyDescriptor<T> | void;
|
|
9
|
-
/**
|
|
10
|
-
*
|
|
11
|
-
* @param name
|
|
12
|
-
*/
|
|
13
|
-
Name(name: string): this;
|
|
14
|
-
Method(method: string): this;
|
|
15
|
-
Path(path: string): this;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Declare a lambda endpoint.
|
|
19
|
-
*
|
|
20
|
-
* ```typescript
|
|
21
|
-
* export class Lambda {
|
|
22
|
-
*
|
|
23
|
-
* }
|
|
24
|
-
* ```
|
|
25
|
-
*
|
|
26
|
-
* @decorator
|
|
27
|
-
*/
|
|
28
|
-
export declare function Lambda(name?: string): LambdaChainedDecorators;
|
|
29
|
-
/**
|
|
30
|
-
* @param path
|
|
31
|
-
* @decorators
|
|
32
|
-
* @ignore
|
|
33
|
-
*/
|
|
34
|
-
export declare function Get(path?: string): LambdaChainedDecorators;
|
|
35
|
-
/**
|
|
36
|
-
* @param path
|
|
37
|
-
* @decorators
|
|
38
|
-
* @ignore
|
|
39
|
-
*/
|
|
40
|
-
export declare function Post(path?: string): LambdaChainedDecorators;
|
|
41
|
-
/**
|
|
42
|
-
* @param path
|
|
43
|
-
* @decorators
|
|
44
|
-
* @ignore
|
|
45
|
-
*/
|
|
46
|
-
export declare function Put(path?: string): LambdaChainedDecorators;
|
|
47
|
-
/**
|
|
48
|
-
* @param path
|
|
49
|
-
* @decorators
|
|
50
|
-
* @ignore
|
|
51
|
-
*/
|
|
52
|
-
export declare function Patch(path?: string): LambdaChainedDecorators;
|
|
53
|
-
/**
|
|
54
|
-
* @param path
|
|
55
|
-
* @decorators
|
|
56
|
-
* @ignore
|
|
57
|
-
*/
|
|
58
|
-
export declare function Delete(path?: string): LambdaChainedDecorators;
|