@h4ad/serverless-adapter 2.17.0 → 3.0.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.
- package/README.md +7 -0
- package/lib/@types/binary-settings.js +2 -11
- package/lib/@types/binary-settings.js.map +1 -1
- package/lib/@types/digital-ocean/digital-ocean-http-event.js +2 -7
- package/lib/@types/digital-ocean/digital-ocean-http-event.js.map +1 -1
- package/lib/@types/digital-ocean/digital-ocean-http-response.js +2 -7
- package/lib/@types/digital-ocean/digital-ocean-http-response.js.map +1 -1
- package/lib/@types/digital-ocean/index.js +2 -18
- package/lib/@types/digital-ocean/index.js.map +1 -1
- package/lib/@types/headers.js +2 -11
- package/lib/@types/headers.js.map +1 -1
- package/lib/@types/helpers.js +2 -6
- package/lib/@types/helpers.js.map +1 -1
- package/lib/@types/huawei/huawei-api-gateway-event.js +2 -14
- package/lib/@types/huawei/huawei-api-gateway-event.js.map +1 -1
- package/lib/@types/huawei/huawei-api-gateway-response.js +2 -7
- package/lib/@types/huawei/huawei-api-gateway-response.js.map +1 -1
- package/lib/@types/huawei/huawei-context.js +2 -36
- package/lib/@types/huawei/huawei-context.js.map +1 -1
- package/lib/@types/huawei/index.js +2 -20
- package/lib/@types/huawei/index.js.map +1 -1
- package/lib/@types/index.js +2 -20
- package/lib/@types/index.js.map +1 -1
- package/lib/adapters/apollo-server/apollo-server-mutation.adapter.js +2 -86
- package/lib/adapters/apollo-server/apollo-server-mutation.adapter.js.map +1 -1
- package/lib/adapters/apollo-server/index.js +2 -18
- package/lib/adapters/apollo-server/index.js.map +1 -1
- package/lib/adapters/aws/alb.adapter.js +2 -129
- package/lib/adapters/aws/alb.adapter.js.map +1 -1
- package/lib/adapters/aws/api-gateway-v1.adapter.js +2 -140
- package/lib/adapters/aws/api-gateway-v1.adapter.js.map +1 -1
- package/lib/adapters/aws/api-gateway-v2.adapter.js +2 -134
- package/lib/adapters/aws/api-gateway-v2.adapter.js.map +1 -1
- package/lib/adapters/aws/base/aws-simple-adapter.js +2 -99
- package/lib/adapters/aws/base/aws-simple-adapter.js.map +1 -1
- package/lib/adapters/aws/base/index.js +2 -18
- package/lib/adapters/aws/base/index.js.map +1 -1
- package/lib/adapters/aws/dynamodb.adapter.js +2 -64
- package/lib/adapters/aws/dynamodb.adapter.js.map +1 -1
- package/lib/adapters/aws/event-bridge.adapter.js +2 -75
- package/lib/adapters/aws/event-bridge.adapter.js.map +1 -1
- package/lib/adapters/aws/index.js +2 -27
- package/lib/adapters/aws/index.js.map +1 -1
- package/lib/adapters/aws/lambda-edge.adapter.js +2 -284
- package/lib/adapters/aws/lambda-edge.adapter.js.map +1 -1
- package/lib/adapters/aws/s3.adapter.js +2 -63
- package/lib/adapters/aws/s3.adapter.js.map +1 -1
- package/lib/adapters/aws/sns.adapter.js +2 -63
- package/lib/adapters/aws/sns.adapter.js.map +1 -1
- package/lib/adapters/aws/sqs.adapter.js +2 -64
- package/lib/adapters/aws/sqs.adapter.js.map +1 -1
- package/lib/adapters/azure/http-trigger-v4.adapter.js +2 -202
- package/lib/adapters/azure/http-trigger-v4.adapter.js.map +1 -1
- package/lib/adapters/azure/index.js +2 -18
- package/lib/adapters/azure/index.js.map +1 -1
- package/lib/adapters/digital-ocean/http-function.adapter.js +2 -118
- package/lib/adapters/digital-ocean/http-function.adapter.js.map +1 -1
- package/lib/adapters/digital-ocean/index.js +2 -18
- package/lib/adapters/digital-ocean/index.js.map +1 -1
- package/lib/adapters/dummy/dummy.adapter.js +2 -54
- package/lib/adapters/dummy/dummy.adapter.js.map +1 -1
- package/lib/adapters/dummy/index.js +2 -18
- package/lib/adapters/dummy/index.js.map +1 -1
- package/lib/adapters/huawei/huawei-api-gateway.adapter.js +2 -126
- package/lib/adapters/huawei/huawei-api-gateway.adapter.js.map +1 -1
- package/lib/adapters/huawei/index.js +2 -18
- package/lib/adapters/huawei/index.js.map +1 -1
- package/lib/contracts/adapter.contract.js +2 -18
- package/lib/contracts/adapter.contract.js.map +1 -1
- package/lib/contracts/framework.contract.js +2 -7
- package/lib/contracts/framework.contract.js.map +1 -1
- package/lib/contracts/handler.contract.js +2 -13
- package/lib/contracts/handler.contract.js.map +1 -1
- package/lib/contracts/index.js +2 -21
- package/lib/contracts/index.js.map +1 -1
- package/lib/contracts/resolver.contract.js +2 -15
- package/lib/contracts/resolver.contract.js.map +1 -1
- package/lib/core/base-handler.js +2 -67
- package/lib/core/base-handler.js.map +1 -1
- package/lib/core/constants.js +2 -33
- package/lib/core/constants.js.map +1 -1
- package/lib/core/current-invoke.js +2 -46
- package/lib/core/current-invoke.js.map +1 -1
- package/lib/core/event-body.js +2 -31
- package/lib/core/event-body.js.map +1 -1
- package/lib/core/headers.js +3 -97
- package/lib/core/headers.js.map +1 -1
- package/lib/core/index.js +2 -28
- package/lib/core/index.js.map +1 -1
- package/lib/core/is-binary.js +2 -118
- package/lib/core/is-binary.js.map +1 -1
- package/lib/core/logger.js +2 -115
- package/lib/core/logger.js.map +1 -1
- package/lib/core/no-op.js +2 -12
- package/lib/core/no-op.js.map +1 -1
- package/lib/core/optional.js +2 -31
- package/lib/core/optional.js.map +1 -1
- package/lib/core/path.js +2 -68
- package/lib/core/path.js.map +1 -1
- package/lib/core/stream.js +2 -63
- package/lib/core/stream.js.map +1 -1
- package/lib/frameworks/apollo-server/apollo-server.framework.js +2 -87
- package/lib/frameworks/apollo-server/apollo-server.framework.js.map +1 -1
- package/lib/frameworks/apollo-server/index.js +2 -18
- package/lib/frameworks/apollo-server/index.js.map +1 -1
- package/lib/frameworks/body-parser/base-body-parser.framework.js +2 -66
- package/lib/frameworks/body-parser/base-body-parser.framework.js.map +1 -1
- package/lib/frameworks/body-parser/index.js +2 -22
- package/lib/frameworks/body-parser/index.js.map +1 -1
- package/lib/frameworks/body-parser/json-body-parser.framework.js +2 -29
- package/lib/frameworks/body-parser/json-body-parser.framework.js.map +1 -1
- package/lib/frameworks/body-parser/raw-body-parser.framework.js +2 -29
- package/lib/frameworks/body-parser/raw-body-parser.framework.js.map +1 -1
- package/lib/frameworks/body-parser/text-body-parser.framework.js +2 -29
- package/lib/frameworks/body-parser/text-body-parser.framework.js.map +1 -1
- package/lib/frameworks/body-parser/urlencoded-body-parser.framework.js +2 -29
- package/lib/frameworks/body-parser/urlencoded-body-parser.framework.js.map +1 -1
- package/lib/frameworks/cors/cors.framework.js +3 -145
- package/lib/frameworks/cors/cors.framework.js.map +1 -1
- package/lib/frameworks/cors/index.js +2 -18
- package/lib/frameworks/cors/index.js.map +1 -1
- package/lib/frameworks/deepkit/http-deepkit.framework.js +2 -33
- package/lib/frameworks/deepkit/http-deepkit.framework.js.map +1 -1
- package/lib/frameworks/deepkit/index.js +2 -18
- package/lib/frameworks/deepkit/index.js.map +1 -1
- package/lib/frameworks/express/express.framework.js +2 -22
- package/lib/frameworks/express/express.framework.js.map +1 -1
- package/lib/frameworks/express/index.js +2 -18
- package/lib/frameworks/express/index.js.map +1 -1
- package/lib/frameworks/fastify/fastify.framework.js +2 -23
- package/lib/frameworks/fastify/fastify.framework.js.map +1 -1
- package/lib/frameworks/fastify/helpers/no-op-content-parser.js +2 -27
- package/lib/frameworks/fastify/helpers/no-op-content-parser.js.map +1 -1
- package/lib/frameworks/fastify/index.js +2 -18
- package/lib/frameworks/fastify/index.js.map +1 -1
- package/lib/frameworks/hapi/hapi.framework.js +2 -23
- package/lib/frameworks/hapi/hapi.framework.js.map +1 -1
- package/lib/frameworks/hapi/index.js +2 -18
- package/lib/frameworks/hapi/index.js.map +1 -1
- package/lib/frameworks/koa/index.js +2 -18
- package/lib/frameworks/koa/index.js.map +1 -1
- package/lib/frameworks/koa/koa.framework.js +2 -22
- package/lib/frameworks/koa/koa.framework.js.map +1 -1
- package/lib/frameworks/lazy/index.js +2 -18
- package/lib/frameworks/lazy/index.js.map +1 -1
- package/lib/frameworks/lazy/lazy.framework.js +2 -82
- package/lib/frameworks/lazy/lazy.framework.js.map +1 -1
- package/lib/frameworks/trpc/index.js +2 -18
- package/lib/frameworks/trpc/index.js.map +1 -1
- package/lib/frameworks/trpc/trpc.framework.js +2 -153
- package/lib/frameworks/trpc/trpc.framework.js.map +1 -1
- package/lib/handlers/aws/aws-stream.handler.js +2 -169
- package/lib/handlers/aws/aws-stream.handler.js.map +1 -1
- package/lib/handlers/aws/index.js +2 -18
- package/lib/handlers/aws/index.js.map +1 -1
- package/lib/handlers/azure/azure.handler.js +2 -74
- package/lib/handlers/azure/azure.handler.js.map +1 -1
- package/lib/handlers/azure/index.js +2 -18
- package/lib/handlers/azure/index.js.map +1 -1
- package/lib/handlers/base/index.js +2 -18
- package/lib/handlers/base/index.js.map +1 -1
- package/lib/handlers/base/raw-request.js +2 -65
- package/lib/handlers/base/raw-request.js.map +1 -1
- package/lib/handlers/default/default.handler.js +2 -191
- package/lib/handlers/default/default.handler.js.map +1 -1
- package/lib/handlers/default/index.js +2 -18
- package/lib/handlers/default/index.js.map +1 -1
- package/lib/handlers/digital-ocean/digital-ocean.handler.js +2 -34
- package/lib/handlers/digital-ocean/digital-ocean.handler.js.map +1 -1
- package/lib/handlers/digital-ocean/index.js +2 -18
- package/lib/handlers/digital-ocean/index.js.map +1 -1
- package/lib/handlers/firebase/http-firebase-v2.handler.js +2 -50
- package/lib/handlers/firebase/http-firebase-v2.handler.js.map +1 -1
- package/lib/handlers/firebase/http-firebase.handler.js +2 -27
- package/lib/handlers/firebase/http-firebase.handler.js.map +1 -1
- package/lib/handlers/firebase/index.js +2 -19
- package/lib/handlers/firebase/index.js.map +1 -1
- package/lib/handlers/gcp/gcp.handler.js +2 -40
- package/lib/handlers/gcp/gcp.handler.js.map +1 -1
- package/lib/handlers/gcp/index.js +2 -18
- package/lib/handlers/gcp/index.js.map +1 -1
- package/lib/handlers/huawei/http-huawei.handler.js +2 -106
- package/lib/handlers/huawei/http-huawei.handler.js.map +1 -1
- package/lib/handlers/huawei/index.js +2 -18
- package/lib/handlers/huawei/index.js.map +1 -1
- package/lib/index.doc.js +2 -0
- package/lib/index.doc.js.map +1 -0
- package/lib/index.js +2 -22
- package/lib/index.js.map +1 -1
- package/lib/network/index.js +2 -21
- package/lib/network/index.js.map +1 -1
- package/lib/network/request.js +2 -46
- package/lib/network/request.js.map +1 -1
- package/lib/network/response-stream.js +7 -88
- package/lib/network/response-stream.js.map +1 -1
- package/lib/network/response.js +4 -127
- package/lib/network/response.js.map +1 -1
- package/lib/network/utils.js +2 -21
- package/lib/network/utils.js.map +1 -1
- package/lib/resolvers/aws-context/aws-context.resolver.js +2 -59
- package/lib/resolvers/aws-context/aws-context.resolver.js.map +1 -1
- package/lib/resolvers/aws-context/index.js +2 -18
- package/lib/resolvers/aws-context/index.js.map +1 -1
- package/lib/resolvers/callback/callback.resolver.js +2 -53
- package/lib/resolvers/callback/callback.resolver.js.map +1 -1
- package/lib/resolvers/callback/index.js +2 -18
- package/lib/resolvers/callback/index.js.map +1 -1
- package/lib/resolvers/dummy/dummy.resolver.js +2 -24
- package/lib/resolvers/dummy/dummy.resolver.js.map +1 -1
- package/lib/resolvers/dummy/index.js +2 -18
- package/lib/resolvers/dummy/index.js.map +1 -1
- package/lib/resolvers/promise/index.js +2 -18
- package/lib/resolvers/promise/index.js.map +1 -1
- package/lib/resolvers/promise/promise.resolver.js +2 -48
- package/lib/resolvers/promise/promise.resolver.js.map +1 -1
- package/lib/serverless-adapter.js +2 -176
- package/lib/serverless-adapter.js.map +1 -1
- package/package.json +61 -79
- package/lib/@types/binary-settings.d.ts +0 -43
- package/lib/@types/digital-ocean/digital-ocean-http-event.d.ts +0 -37
- package/lib/@types/digital-ocean/digital-ocean-http-response.d.ts +0 -22
- package/lib/@types/digital-ocean/index.d.ts +0 -1
- package/lib/@types/headers.d.ts +0 -39
- package/lib/@types/helpers.d.ts +0 -10
- package/lib/@types/huawei/huawei-api-gateway-event.d.ts +0 -84
- package/lib/@types/huawei/huawei-api-gateway-response.d.ts +0 -27
- package/lib/@types/huawei/huawei-context.d.ts +0 -203
- package/lib/@types/huawei/index.d.ts +0 -3
- package/lib/@types/index.d.ts +0 -3
- package/lib/adapters/apollo-server/apollo-server-mutation.adapter.d.ts +0 -56
- package/lib/adapters/apollo-server/index.d.ts +0 -1
- package/lib/adapters/aws/alb.adapter.d.ts +0 -66
- package/lib/adapters/aws/api-gateway-v1.adapter.d.ts +0 -71
- package/lib/adapters/aws/api-gateway-v2.adapter.d.ts +0 -70
- package/lib/adapters/aws/base/aws-simple-adapter.d.ts +0 -85
- package/lib/adapters/aws/base/index.d.ts +0 -1
- package/lib/adapters/aws/dynamodb.adapter.d.ts +0 -56
- package/lib/adapters/aws/event-bridge.adapter.d.ts +0 -64
- package/lib/adapters/aws/index.d.ts +0 -10
- package/lib/adapters/aws/lambda-edge.adapter.d.ts +0 -213
- package/lib/adapters/aws/s3.adapter.d.ts +0 -56
- package/lib/adapters/aws/sns.adapter.d.ts +0 -56
- package/lib/adapters/aws/sqs.adapter.d.ts +0 -56
- package/lib/adapters/azure/http-trigger-v4.adapter.d.ts +0 -81
- package/lib/adapters/azure/index.d.ts +0 -1
- package/lib/adapters/digital-ocean/http-function.adapter.d.ts +0 -65
- package/lib/adapters/digital-ocean/index.d.ts +0 -1
- package/lib/adapters/dummy/dummy.adapter.d.ts +0 -30
- package/lib/adapters/dummy/index.d.ts +0 -1
- package/lib/adapters/huawei/huawei-api-gateway.adapter.d.ts +0 -66
- package/lib/adapters/huawei/index.d.ts +0 -1
- package/lib/contracts/adapter.contract.d.ts +0 -155
- package/lib/contracts/framework.contract.d.ts +0 -19
- package/lib/contracts/handler.contract.d.ts +0 -26
- package/lib/contracts/index.d.ts +0 -4
- package/lib/contracts/resolver.contract.d.ts +0 -86
- package/lib/core/base-handler.d.ts +0 -31
- package/lib/core/constants.d.ts +0 -31
- package/lib/core/current-invoke.d.ts +0 -48
- package/lib/core/event-body.d.ts +0 -21
- package/lib/core/headers.d.ts +0 -47
- package/lib/core/index.d.ts +0 -11
- package/lib/core/is-binary.d.ts +0 -72
- package/lib/core/logger.d.ts +0 -67
- package/lib/core/no-op.d.ts +0 -7
- package/lib/core/optional.d.ts +0 -21
- package/lib/core/path.d.ts +0 -36
- package/lib/core/stream.d.ts +0 -20
- package/lib/frameworks/apollo-server/apollo-server.framework.d.ts +0 -71
- package/lib/frameworks/apollo-server/index.d.ts +0 -1
- package/lib/frameworks/body-parser/base-body-parser.framework.d.ts +0 -69
- package/lib/frameworks/body-parser/index.d.ts +0 -5
- package/lib/frameworks/body-parser/json-body-parser.framework.d.ts +0 -26
- package/lib/frameworks/body-parser/raw-body-parser.framework.d.ts +0 -26
- package/lib/frameworks/body-parser/text-body-parser.framework.d.ts +0 -26
- package/lib/frameworks/body-parser/urlencoded-body-parser.framework.d.ts +0 -26
- package/lib/frameworks/cors/cors.framework.d.ts +0 -78
- package/lib/frameworks/cors/index.d.ts +0 -1
- package/lib/frameworks/deepkit/http-deepkit.framework.d.ts +0 -17
- package/lib/frameworks/deepkit/index.d.ts +0 -1
- package/lib/frameworks/express/express.framework.d.ts +0 -16
- package/lib/frameworks/express/index.d.ts +0 -1
- package/lib/frameworks/fastify/fastify.framework.d.ts +0 -16
- package/lib/frameworks/fastify/helpers/no-op-content-parser.d.ts +0 -13
- package/lib/frameworks/fastify/index.d.ts +0 -1
- package/lib/frameworks/hapi/hapi.framework.d.ts +0 -16
- package/lib/frameworks/hapi/index.d.ts +0 -1
- package/lib/frameworks/koa/index.d.ts +0 -1
- package/lib/frameworks/koa/koa.framework.d.ts +0 -16
- package/lib/frameworks/lazy/index.d.ts +0 -1
- package/lib/frameworks/lazy/lazy.framework.d.ts +0 -55
- package/lib/frameworks/trpc/index.d.ts +0 -1
- package/lib/frameworks/trpc/trpc.framework.d.ts +0 -155
- package/lib/handlers/aws/aws-stream.handler.d.ts +0 -83
- package/lib/handlers/aws/index.d.ts +0 -1
- package/lib/handlers/azure/azure.handler.d.ts +0 -45
- package/lib/handlers/azure/index.d.ts +0 -1
- package/lib/handlers/base/index.d.ts +0 -1
- package/lib/handlers/base/raw-request.d.ts +0 -30
- package/lib/handlers/default/default.handler.d.ts +0 -87
- package/lib/handlers/default/index.d.ts +0 -1
- package/lib/handlers/digital-ocean/digital-ocean.handler.d.ts +0 -16
- package/lib/handlers/digital-ocean/index.d.ts +0 -1
- package/lib/handlers/firebase/http-firebase-v2.handler.d.ts +0 -26
- package/lib/handlers/firebase/http-firebase.handler.d.ts +0 -18
- package/lib/handlers/firebase/index.d.ts +0 -2
- package/lib/handlers/gcp/gcp.handler.d.ts +0 -25
- package/lib/handlers/gcp/index.d.ts +0 -1
- package/lib/handlers/huawei/http-huawei.handler.d.ts +0 -59
- package/lib/handlers/huawei/index.d.ts +0 -1
- package/lib/index.d.ts +0 -5
- package/lib/network/index.d.ts +0 -4
- package/lib/network/request.d.ts +0 -44
- package/lib/network/response-stream.d.ts +0 -41
- package/lib/network/response.d.ts +0 -48
- package/lib/network/utils.d.ts +0 -7
- package/lib/resolvers/aws-context/aws-context.resolver.d.ts +0 -18
- package/lib/resolvers/aws-context/index.d.ts +0 -1
- package/lib/resolvers/callback/callback.resolver.d.ts +0 -23
- package/lib/resolvers/callback/index.d.ts +0 -1
- package/lib/resolvers/dummy/dummy.resolver.d.ts +0 -13
- package/lib/resolvers/dummy/index.d.ts +0 -1
- package/lib/resolvers/promise/index.d.ts +0 -1
- package/lib/resolvers/promise/promise.resolver.d.ts +0 -13
- package/lib/serverless-adapter.d.ts +0 -118
package/lib/core/logger.d.ts
DELETED
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The type representing the possible log levels to choose from.
|
|
3
|
-
*
|
|
4
|
-
* @breadcrumb Core / Logger
|
|
5
|
-
* @public
|
|
6
|
-
*/
|
|
7
|
-
export declare type LogLevels = 'debug' | 'verbose' | 'info' | 'warn' | 'error' | 'none';
|
|
8
|
-
/**
|
|
9
|
-
* The options to customize {@link ILogger}
|
|
10
|
-
*
|
|
11
|
-
* @breadcrumb Core / Logger
|
|
12
|
-
* @public
|
|
13
|
-
*/
|
|
14
|
-
export declare type LoggerOptions = {
|
|
15
|
-
/**
|
|
16
|
-
* Select the log level, {@link LogLevels | see more}.
|
|
17
|
-
*
|
|
18
|
-
* @defaultValue error
|
|
19
|
-
*/
|
|
20
|
-
level: LogLevels;
|
|
21
|
-
};
|
|
22
|
-
/**
|
|
23
|
-
* The log function used in any level.
|
|
24
|
-
*
|
|
25
|
-
* @breadcrumb Core / Logger
|
|
26
|
-
* @public
|
|
27
|
-
*/
|
|
28
|
-
export declare type LoggerFN = (message: any, ...additional: any[]) => void;
|
|
29
|
-
/**
|
|
30
|
-
* The interface representing the logger, you can provide a custom logger by implementing this interface.
|
|
31
|
-
*
|
|
32
|
-
* @breadcrumb Core / Logger
|
|
33
|
-
* @public
|
|
34
|
-
*/
|
|
35
|
-
export declare type ILogger = Record<Exclude<LogLevels, 'none'>, LoggerFN>;
|
|
36
|
-
/**
|
|
37
|
-
* The method used to create a simple logger instance to use in this library.
|
|
38
|
-
*
|
|
39
|
-
* @remarks Behind the scenes, this simple logger sends the message to the `console` methods.
|
|
40
|
-
*
|
|
41
|
-
* @example
|
|
42
|
-
* ```typescript
|
|
43
|
-
* const logger = createDefaultLogger();
|
|
44
|
-
*
|
|
45
|
-
* logger.error('An error happens.');
|
|
46
|
-
* // An error happens.
|
|
47
|
-
* ```
|
|
48
|
-
*
|
|
49
|
-
* @param level - Select the level of the log
|
|
50
|
-
*
|
|
51
|
-
* @breadcrumb Core / Logger
|
|
52
|
-
* @public
|
|
53
|
-
*/
|
|
54
|
-
export declare function createDefaultLogger({ level }?: LoggerOptions): ILogger;
|
|
55
|
-
/**
|
|
56
|
-
* The method used to chck if logger was created by this library, or it was defined by the user.
|
|
57
|
-
*
|
|
58
|
-
* @param logger - The instance of the logger to check
|
|
59
|
-
*
|
|
60
|
-
* @breadcrumb Core / Logger
|
|
61
|
-
* @public
|
|
62
|
-
*/
|
|
63
|
-
export declare function isInternalLogger(logger: ILogger): boolean;
|
|
64
|
-
export declare type __ΩLogLevels = any[];
|
|
65
|
-
export declare type __ΩLoggerOptions = any[];
|
|
66
|
-
export declare type __ΩLoggerFN = any[];
|
|
67
|
-
export declare type __ΩILogger = any[];
|
package/lib/core/no-op.d.ts
DELETED
package/lib/core/optional.d.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Return the defaultValue whether the value is undefined, otherwise, return the value.
|
|
3
|
-
*
|
|
4
|
-
* @example
|
|
5
|
-
* ```typescript
|
|
6
|
-
* const value1 = getDefaultIfUndefined(undefined, true);
|
|
7
|
-
* const value2 = getDefaultIfUndefined(false, true);
|
|
8
|
-
*
|
|
9
|
-
* console.log(value1);
|
|
10
|
-
* // true
|
|
11
|
-
* console.log(value2);
|
|
12
|
-
* // false
|
|
13
|
-
* ```
|
|
14
|
-
*
|
|
15
|
-
* @param value - The value to be checked
|
|
16
|
-
* @param defaultValue - The default value when value is undefined
|
|
17
|
-
*
|
|
18
|
-
* @breadcrumb Core
|
|
19
|
-
* @public
|
|
20
|
-
*/
|
|
21
|
-
export declare function getDefaultIfUndefined<T>(value: T | undefined, defaultValue: T): T;
|
package/lib/core/path.d.ts
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Transform the path and a map of query params to a string with formatted query params
|
|
3
|
-
*
|
|
4
|
-
* @example
|
|
5
|
-
* ```typescript
|
|
6
|
-
* const path = '/pets/search';
|
|
7
|
-
* const queryParams = { batata: undefined, petType: [ 'dog', 'fish' ] };
|
|
8
|
-
* const result = getPathWithQueryStringParams(path, queryParams);
|
|
9
|
-
* console.log(result);
|
|
10
|
-
* // /pets/search?batata=&petType=dog&petType=fish
|
|
11
|
-
* ```
|
|
12
|
-
*
|
|
13
|
-
* @param path - The path
|
|
14
|
-
* @param queryParams - The query params
|
|
15
|
-
*
|
|
16
|
-
* @breadcrumb Core / Path
|
|
17
|
-
* @public
|
|
18
|
-
*/
|
|
19
|
-
export declare function getPathWithQueryStringParams(path: string, queryParams: string | Record<string, string | string[] | undefined> | undefined | null): string;
|
|
20
|
-
/**
|
|
21
|
-
* Map query params to a string with formatted query params
|
|
22
|
-
*
|
|
23
|
-
* @example
|
|
24
|
-
* ```typescript
|
|
25
|
-
* const queryParams = { batata: undefined, petType: [ 'dog', 'fish' ] };
|
|
26
|
-
* const result = getQueryParamsStringFromRecord(queryParams);
|
|
27
|
-
* console.log(result);
|
|
28
|
-
* // batata=&petType=dog&petType=fish
|
|
29
|
-
* ```
|
|
30
|
-
*
|
|
31
|
-
* @param queryParamsRecord - The query params record
|
|
32
|
-
*
|
|
33
|
-
* @breadcrumb Core / Path
|
|
34
|
-
* @public
|
|
35
|
-
*/
|
|
36
|
-
export declare function getQueryParamsStringFromRecord(queryParamsRecord: Record<string, string | string[] | undefined> | undefined | null): string;
|
package/lib/core/stream.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import { Readable, Writable } from 'stream';
|
|
3
|
-
/**
|
|
4
|
-
* Check if stream already ended
|
|
5
|
-
*
|
|
6
|
-
* @param stream - The stream
|
|
7
|
-
*
|
|
8
|
-
* @breadcrumb Core / Stream
|
|
9
|
-
* @public
|
|
10
|
-
*/
|
|
11
|
-
export declare function isStreamEnded(stream: Readable | Writable): boolean;
|
|
12
|
-
/**
|
|
13
|
-
* Wait asynchronous the stream to complete
|
|
14
|
-
*
|
|
15
|
-
* @param stream - The stream
|
|
16
|
-
*
|
|
17
|
-
* @breadcrumb Core / Stream
|
|
18
|
-
* @public
|
|
19
|
-
*/
|
|
20
|
-
export declare function waitForStreamComplete<TStream extends Readable | Writable>(stream: TStream): Promise<TStream>;
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import { IncomingMessage, ServerResponse } from 'http';
|
|
3
|
-
import { ApolloServer, BaseContext } from '@apollo/server';
|
|
4
|
-
import { FrameworkContract } from '../../contracts';
|
|
5
|
-
import { ServerlessRequest } from '../../network';
|
|
6
|
-
/**
|
|
7
|
-
* The default context of Apollo Server when you integrate and don't pass any context.
|
|
8
|
-
*
|
|
9
|
-
* @breadcrumb Frameworks / ApolloServerFramework
|
|
10
|
-
* @public
|
|
11
|
-
*/
|
|
12
|
-
export interface DefaultServerlessApolloServerContext extends BaseContext {
|
|
13
|
-
/**
|
|
14
|
-
* The request reference
|
|
15
|
-
*/
|
|
16
|
-
request: IncomingMessage;
|
|
17
|
-
/**
|
|
18
|
-
* The response reference
|
|
19
|
-
*/
|
|
20
|
-
response: ServerResponse;
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* The arguments used to create a Context inside {@link ApolloServerOptions}
|
|
24
|
-
*
|
|
25
|
-
* @breadcrumb Frameworks / ApolloServerFramework
|
|
26
|
-
* @public
|
|
27
|
-
*/
|
|
28
|
-
export declare type ApolloServerContextArguments = {
|
|
29
|
-
/**
|
|
30
|
-
* The request reference
|
|
31
|
-
*/
|
|
32
|
-
request: IncomingMessage;
|
|
33
|
-
/**
|
|
34
|
-
* The response reference
|
|
35
|
-
*/
|
|
36
|
-
response: ServerResponse;
|
|
37
|
-
};
|
|
38
|
-
/**
|
|
39
|
-
* The options to customize {@link ApolloServerFramework}
|
|
40
|
-
*
|
|
41
|
-
* @breadcrumb Frameworks / ApolloServerFramework
|
|
42
|
-
* @public
|
|
43
|
-
*/
|
|
44
|
-
export interface ApolloServerOptions<TContext extends BaseContext> {
|
|
45
|
-
/**
|
|
46
|
-
* Define a function to create the context of Apollo Server
|
|
47
|
-
*
|
|
48
|
-
* @param options - Default options passed by library
|
|
49
|
-
*/
|
|
50
|
-
context?: (options: ApolloServerContextArguments) => Promise<TContext>;
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* The framework that forwards requests to Apollo Server
|
|
54
|
-
*
|
|
55
|
-
* @breadcrumb Frameworks / ApolloServerFramework
|
|
56
|
-
* @public
|
|
57
|
-
*/
|
|
58
|
-
export declare class ApolloServerFramework<TContext extends BaseContext> implements FrameworkContract<ApolloServer<TContext>> {
|
|
59
|
-
protected readonly options?: ApolloServerOptions<TContext> | undefined;
|
|
60
|
-
/**
|
|
61
|
-
* Construtor padrão
|
|
62
|
-
*/
|
|
63
|
-
constructor(options?: ApolloServerOptions<TContext> | undefined);
|
|
64
|
-
/**
|
|
65
|
-
* {@inheritDoc}
|
|
66
|
-
*/
|
|
67
|
-
sendRequest(app: ApolloServer<TContext>, request: ServerlessRequest, response: ServerResponse): void;
|
|
68
|
-
}
|
|
69
|
-
export declare type __ΩDefaultServerlessApolloServerContext = any[];
|
|
70
|
-
export declare type __ΩApolloServerContextArguments = any[];
|
|
71
|
-
export declare type __ΩApolloServerOptions = any[];
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './apollo-server.framework';
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import { IncomingMessage, ServerResponse } from 'http';
|
|
3
|
-
import type { NextHandleFunction } from 'connect';
|
|
4
|
-
import type { HttpError } from 'http-errors';
|
|
5
|
-
import { FrameworkContract } from '../../contracts';
|
|
6
|
-
/**
|
|
7
|
-
* The options for {@link BaseBodyParserFramework}
|
|
8
|
-
*
|
|
9
|
-
* @breadcrumb Frameworks / BodyParserFramework
|
|
10
|
-
* @public
|
|
11
|
-
*/
|
|
12
|
-
export declare type BodyParserOptions = {
|
|
13
|
-
/**
|
|
14
|
-
* Implements a custom way of handling error.
|
|
15
|
-
*
|
|
16
|
-
* @defaultValue {@link BaseBodyParserFramework.defaultHandleOnError}
|
|
17
|
-
*
|
|
18
|
-
* @example
|
|
19
|
-
* ```typescript
|
|
20
|
-
* customErrorHandler: (req: IncomingMessage, response: ServerResponse, error: HttpError<any>) => {
|
|
21
|
-
* response.setHeader('content-type', 'text/plain');
|
|
22
|
-
* response.statusCode = error.statusCode;
|
|
23
|
-
* // always call end to return the error
|
|
24
|
-
* response.end(error.message);
|
|
25
|
-
* }
|
|
26
|
-
* ```
|
|
27
|
-
*
|
|
28
|
-
* @param request - The referecene for request
|
|
29
|
-
* @param response - The reference for response
|
|
30
|
-
* @param error - The error throwed by body-parser
|
|
31
|
-
*/
|
|
32
|
-
customErrorHandler?: (request: IncomingMessage, response: ServerResponse, error: HttpError<any>) => void;
|
|
33
|
-
};
|
|
34
|
-
/**
|
|
35
|
-
* The base class used by other body-parser functions to parse a specific content-type
|
|
36
|
-
*
|
|
37
|
-
* @breadcrumb Frameworks / BodyParserFramework
|
|
38
|
-
* @public
|
|
39
|
-
*/
|
|
40
|
-
export declare class BaseBodyParserFramework<TApp> implements FrameworkContract<TApp> {
|
|
41
|
-
protected readonly framework: FrameworkContract<TApp>;
|
|
42
|
-
protected readonly middleware: NextHandleFunction;
|
|
43
|
-
protected readonly options?: BodyParserOptions | undefined;
|
|
44
|
-
/**
|
|
45
|
-
* Default Constructor
|
|
46
|
-
*/
|
|
47
|
-
protected constructor(framework: FrameworkContract<TApp>, middleware: NextHandleFunction, options?: BodyParserOptions | undefined);
|
|
48
|
-
/**
|
|
49
|
-
* The selected error handler
|
|
50
|
-
*/
|
|
51
|
-
protected readonly errorHandler: NonNullable<BodyParserOptions['customErrorHandler']>;
|
|
52
|
-
/**
|
|
53
|
-
* {@inheritDoc}
|
|
54
|
-
*/
|
|
55
|
-
sendRequest(app: TApp, request: IncomingMessage, response: ServerResponse): void;
|
|
56
|
-
/**
|
|
57
|
-
* Handle next execution called by the cors package
|
|
58
|
-
*/
|
|
59
|
-
protected onBodyParserFinished(app: TApp, request: IncomingMessage, response: ServerResponse): () => void;
|
|
60
|
-
/**
|
|
61
|
-
* The default function to handle errors
|
|
62
|
-
*
|
|
63
|
-
* @param request - The referecene for request
|
|
64
|
-
* @param response - The reference for response
|
|
65
|
-
* @param error - The error throwed by body-parser
|
|
66
|
-
*/
|
|
67
|
-
protected defaultHandleOnError(request: IncomingMessage, response: ServerResponse, error: HttpError<any>): void;
|
|
68
|
-
}
|
|
69
|
-
export declare type __ΩBodyParserOptions = any[];
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { OptionsJson } from 'body-parser';
|
|
2
|
-
import { FrameworkContract } from '../../contracts';
|
|
3
|
-
import { BaseBodyParserFramework, BodyParserOptions } from './base-body-parser.framework';
|
|
4
|
-
/**
|
|
5
|
-
* The body-parser options for application/json
|
|
6
|
-
*
|
|
7
|
-
* @remarks {@link https://github.com/expressjs/body-parser#bodyparserjsonoptions}
|
|
8
|
-
*
|
|
9
|
-
* @breadcrumb Frameworks / BodyParserFramework / JsonBodyParserFramework
|
|
10
|
-
* @public
|
|
11
|
-
*/
|
|
12
|
-
export declare type JsonBodyParserFrameworkOptions = OptionsJson & BodyParserOptions;
|
|
13
|
-
/**
|
|
14
|
-
* The body-parser class used to parse application/json.
|
|
15
|
-
*
|
|
16
|
-
* @breadcrumb Frameworks / BodyParserFramework / JsonBodyParserFramework
|
|
17
|
-
* @public
|
|
18
|
-
*/
|
|
19
|
-
export declare class JsonBodyParserFramework<TApp> extends BaseBodyParserFramework<TApp> implements FrameworkContract<TApp> {
|
|
20
|
-
protected readonly framework: FrameworkContract<TApp>;
|
|
21
|
-
/**
|
|
22
|
-
* Default Constructor
|
|
23
|
-
*/
|
|
24
|
-
constructor(framework: FrameworkContract<TApp>, options?: JsonBodyParserFrameworkOptions);
|
|
25
|
-
}
|
|
26
|
-
export declare type __ΩJsonBodyParserFrameworkOptions = any[];
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { Options } from 'body-parser';
|
|
2
|
-
import { FrameworkContract } from '../../contracts';
|
|
3
|
-
import { BaseBodyParserFramework, BodyParserOptions } from './base-body-parser.framework';
|
|
4
|
-
/**
|
|
5
|
-
* The body-parser options for application/octet-stream
|
|
6
|
-
*
|
|
7
|
-
* @remarks {@link https://github.com/expressjs/body-parser#bodyparserrawoptions}
|
|
8
|
-
*
|
|
9
|
-
* @breadcrumb Frameworks / BodyParserFramework / RawBodyParserFramework
|
|
10
|
-
* @public
|
|
11
|
-
*/
|
|
12
|
-
export declare type RawBodyParserFrameworkOptions = Options & BodyParserOptions;
|
|
13
|
-
/**
|
|
14
|
-
* The body-parser class used to parse application/octet-stream.
|
|
15
|
-
*
|
|
16
|
-
* @breadcrumb Frameworks / BodyParserFramework / RawBodyParserFramework
|
|
17
|
-
* @public
|
|
18
|
-
*/
|
|
19
|
-
export declare class RawBodyParserFramework<TApp> extends BaseBodyParserFramework<TApp> implements FrameworkContract<TApp> {
|
|
20
|
-
protected readonly framework: FrameworkContract<TApp>;
|
|
21
|
-
/**
|
|
22
|
-
* Default Constructor
|
|
23
|
-
*/
|
|
24
|
-
constructor(framework: FrameworkContract<TApp>, options?: RawBodyParserFrameworkOptions);
|
|
25
|
-
}
|
|
26
|
-
export declare type __ΩRawBodyParserFrameworkOptions = any[];
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { OptionsText } from 'body-parser';
|
|
2
|
-
import { FrameworkContract } from '../../contracts';
|
|
3
|
-
import { BaseBodyParserFramework, BodyParserOptions } from './base-body-parser.framework';
|
|
4
|
-
/**
|
|
5
|
-
* The body-parser options for text/plain
|
|
6
|
-
*
|
|
7
|
-
* @remarks {@link https://github.com/expressjs/body-parser#bodyparsertextoptions}
|
|
8
|
-
*
|
|
9
|
-
* @breadcrumb Frameworks / BodyParserFramework / TextBodyParserFramework
|
|
10
|
-
* @public
|
|
11
|
-
*/
|
|
12
|
-
export declare type TextBodyParserFrameworkOptions = OptionsText & BodyParserOptions;
|
|
13
|
-
/**
|
|
14
|
-
* The body-parser class used to parse text/plain.
|
|
15
|
-
*
|
|
16
|
-
* @breadcrumb Frameworks / BodyParserFramework / TextBodyParserFramework
|
|
17
|
-
* @public
|
|
18
|
-
*/
|
|
19
|
-
export declare class TextBodyParserFramework<TApp> extends BaseBodyParserFramework<TApp> implements FrameworkContract<TApp> {
|
|
20
|
-
protected readonly framework: FrameworkContract<TApp>;
|
|
21
|
-
/**
|
|
22
|
-
* Default Constructor
|
|
23
|
-
*/
|
|
24
|
-
constructor(framework: FrameworkContract<TApp>, options?: TextBodyParserFrameworkOptions);
|
|
25
|
-
}
|
|
26
|
-
export declare type __ΩTextBodyParserFrameworkOptions = any[];
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { OptionsUrlencoded } from 'body-parser';
|
|
2
|
-
import { FrameworkContract } from '../../contracts';
|
|
3
|
-
import { BaseBodyParserFramework, BodyParserOptions } from './base-body-parser.framework';
|
|
4
|
-
/**
|
|
5
|
-
* The body parser options for application/x-www-form-urlencoded
|
|
6
|
-
*
|
|
7
|
-
* @remarks {@link https://github.com/expressjs/body-parser#bodyparserurlencodedoptions}
|
|
8
|
-
*
|
|
9
|
-
* @breadcrumb Frameworks / BodyParserFramework / UrlencodedBodyParserFramework
|
|
10
|
-
* @public
|
|
11
|
-
*/
|
|
12
|
-
export declare type UrlencodedBodyParserFrameworkOptions = OptionsUrlencoded & BodyParserOptions;
|
|
13
|
-
/**
|
|
14
|
-
* The body-parser class used to parse application/x-www-form-urlencoded.
|
|
15
|
-
*
|
|
16
|
-
* @breadcrumb Frameworks / BodyParserFramework / UrlencodedBodyParserFramework
|
|
17
|
-
* @public
|
|
18
|
-
*/
|
|
19
|
-
export declare class UrlencodedBodyParserFramework<TApp> extends BaseBodyParserFramework<TApp> implements FrameworkContract<TApp> {
|
|
20
|
-
protected readonly framework: FrameworkContract<TApp>;
|
|
21
|
-
/**
|
|
22
|
-
* Default Constructor
|
|
23
|
-
*/
|
|
24
|
-
constructor(framework: FrameworkContract<TApp>, options?: UrlencodedBodyParserFrameworkOptions);
|
|
25
|
-
}
|
|
26
|
-
export declare type __ΩUrlencodedBodyParserFrameworkOptions = any[];
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import { IncomingMessage, ServerResponse } from 'http';
|
|
3
|
-
import cors, { CorsOptions } from 'cors';
|
|
4
|
-
import { FrameworkContract } from '../../contracts';
|
|
5
|
-
/**
|
|
6
|
-
* The options to customize {@link CorsFramework}
|
|
7
|
-
*
|
|
8
|
-
* @breadcrumb Frameworks / CorsFramework
|
|
9
|
-
* @public
|
|
10
|
-
*/
|
|
11
|
-
export declare type CorsFrameworkOptions = CorsOptions & {
|
|
12
|
-
/**
|
|
13
|
-
* Send error 403 when cors is invalid. From what I read in `cors`, `fastify/cors` and [this problem](https://stackoverflow.com/questions/57212248/why-is-http-request-been-processed-in-action-even-when-cors-is-not-enabled)
|
|
14
|
-
* it is normal to process the request even if the origin is invalid.
|
|
15
|
-
* So this option will respond with error if this method was called from an invalid origin (or not allowed method) like [access control lib](https://github.com/primus/access-control/blob/master/index.js#L95-L115) .
|
|
16
|
-
*
|
|
17
|
-
* @defaultValue true
|
|
18
|
-
*/
|
|
19
|
-
forbiddenOnInvalidOriginOrMethod?: boolean;
|
|
20
|
-
};
|
|
21
|
-
/**
|
|
22
|
-
* The framework that handles cors for your api without relying on internals of the framework
|
|
23
|
-
*
|
|
24
|
-
* @example
|
|
25
|
-
* ```typescript
|
|
26
|
-
* import express from 'express';
|
|
27
|
-
* import { ServerlessAdapter } from '@h4ad/serverless-adapter';
|
|
28
|
-
* import { ExpressFramework } from '@h4ad/serverless-adapter/lib/frameworks/express';
|
|
29
|
-
* import { CorsFramework } from '@h4ad/serverless-adapter/lib/frameworks/cors';
|
|
30
|
-
*
|
|
31
|
-
* const expressFramework = new ExpressFramework();
|
|
32
|
-
* const options: CorsOptions = {}; // customize the options
|
|
33
|
-
* const framework = new CorsFramework(expressFramework, options);
|
|
34
|
-
*
|
|
35
|
-
* export const handler = ServerlessAdapter.new(null)
|
|
36
|
-
* .setFramework(framework)
|
|
37
|
-
* // set other configurations and then build
|
|
38
|
-
* .build();
|
|
39
|
-
* ```
|
|
40
|
-
*
|
|
41
|
-
* @breadcrumb Frameworks / CorsFramework
|
|
42
|
-
* @public
|
|
43
|
-
*/
|
|
44
|
-
export declare class CorsFramework<TApp> implements FrameworkContract<TApp> {
|
|
45
|
-
protected readonly framework: FrameworkContract<TApp>;
|
|
46
|
-
protected readonly options?: CorsFrameworkOptions | undefined;
|
|
47
|
-
/**
|
|
48
|
-
* Default Constructor
|
|
49
|
-
*/
|
|
50
|
-
constructor(framework: FrameworkContract<TApp>, options?: CorsFrameworkOptions | undefined);
|
|
51
|
-
/**
|
|
52
|
-
* All cors headers that can be added by cors package
|
|
53
|
-
*/
|
|
54
|
-
protected readonly corsHeaders: string[];
|
|
55
|
-
/**
|
|
56
|
-
* The cached instance of cors
|
|
57
|
-
*/
|
|
58
|
-
protected readonly cachedCorsInstance: ReturnType<typeof cors>;
|
|
59
|
-
/**
|
|
60
|
-
* {@inheritDoc}
|
|
61
|
-
*/
|
|
62
|
-
sendRequest(app: TApp, request: IncomingMessage, response: ServerResponse): void;
|
|
63
|
-
/**
|
|
64
|
-
* Handle next execution called by the cors package
|
|
65
|
-
*/
|
|
66
|
-
protected onCorsNext(app: TApp, request: IncomingMessage, response: ServerResponse): () => void;
|
|
67
|
-
/**
|
|
68
|
-
* Format the headers to be standardized with the rest of the library, such as ApiGatewayV2.
|
|
69
|
-
* Also, some frameworks don't support headers as an array, so we need to format the values.
|
|
70
|
-
*/
|
|
71
|
-
protected formatHeaderValuesAddedByCorsPackage(response: ServerResponse): void;
|
|
72
|
-
/**
|
|
73
|
-
* Check if the origin is invalid or if the method is not allowed.
|
|
74
|
-
* Highly inspired by [access-control](https://github.com/primus/access-control/blob/master/index.js#L95-L115)
|
|
75
|
-
*/
|
|
76
|
-
protected isInvalidOriginOrMethodIsNotAllowed(request: IncomingMessage, allowedOrigin: number | string | string[] | undefined): boolean;
|
|
77
|
-
}
|
|
78
|
-
export declare type __ΩCorsFrameworkOptions = any[];
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './cors.framework';
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import { ServerResponse } from 'http';
|
|
3
|
-
import { HttpKernel } from '@deepkit/http';
|
|
4
|
-
import { FrameworkContract } from '../../contracts';
|
|
5
|
-
import { ServerlessRequest } from '../../network';
|
|
6
|
-
/**
|
|
7
|
-
* The framework that forwards requests to express handler
|
|
8
|
-
*
|
|
9
|
-
* @breadcrumb Frameworks / HttpDeepkitFramework
|
|
10
|
-
* @public
|
|
11
|
-
*/
|
|
12
|
-
export declare class HttpDeepkitFramework implements FrameworkContract<HttpKernel> {
|
|
13
|
-
/**
|
|
14
|
-
* {@inheritDoc}
|
|
15
|
-
*/
|
|
16
|
-
sendRequest(app: HttpKernel, request: ServerlessRequest, response: ServerResponse): void;
|
|
17
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './http-deepkit.framework';
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import { IncomingMessage, ServerResponse } from 'http';
|
|
3
|
-
import type { Express } from 'express';
|
|
4
|
-
import { FrameworkContract } from '../../contracts';
|
|
5
|
-
/**
|
|
6
|
-
* The framework that forwards requests to express handler
|
|
7
|
-
*
|
|
8
|
-
* @breadcrumb Frameworks / ExpressFramework
|
|
9
|
-
* @public
|
|
10
|
-
*/
|
|
11
|
-
export declare class ExpressFramework implements FrameworkContract<Express> {
|
|
12
|
-
/**
|
|
13
|
-
* {@inheritDoc}
|
|
14
|
-
*/
|
|
15
|
-
sendRequest(app: Express, request: IncomingMessage, response: ServerResponse): void;
|
|
16
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './express.framework';
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import { IncomingMessage, ServerResponse } from 'http';
|
|
3
|
-
import type { FastifyInstance } from 'fastify';
|
|
4
|
-
import { FrameworkContract } from '../../contracts';
|
|
5
|
-
/**
|
|
6
|
-
* The framework that forwards requests to fastify handler
|
|
7
|
-
*
|
|
8
|
-
* @breadcrumb Frameworks / FastifyFramework
|
|
9
|
-
* @public
|
|
10
|
-
*/
|
|
11
|
-
export declare class FastifyFramework implements FrameworkContract<FastifyInstance> {
|
|
12
|
-
/**
|
|
13
|
-
* {@inheritDoc}
|
|
14
|
-
*/
|
|
15
|
-
sendRequest(app: FastifyInstance, request: IncomingMessage, response: ServerResponse): void;
|
|
16
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { FastifyInstance } from 'fastify';
|
|
2
|
-
/**
|
|
3
|
-
* Just return the current body as it was parsed.
|
|
4
|
-
*
|
|
5
|
-
* @remarks This function is intended to be used with BodyParserFrameworks.
|
|
6
|
-
*
|
|
7
|
-
* @param app - The instance of fastify
|
|
8
|
-
* @param contentType - The content type to be anuled
|
|
9
|
-
*
|
|
10
|
-
* @breadcrumb Frameworks / FastifyFramework / Helpers
|
|
11
|
-
* @public
|
|
12
|
-
*/
|
|
13
|
-
export declare function setNoOpForContentType(app: FastifyInstance, contentType: string): void;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './fastify.framework';
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import { IncomingMessage, ServerResponse } from 'http';
|
|
3
|
-
import type { Server } from 'hapi';
|
|
4
|
-
import { FrameworkContract } from '../../contracts';
|
|
5
|
-
/**
|
|
6
|
-
* The framework that forwards requests to hapi handler
|
|
7
|
-
*
|
|
8
|
-
* @breadcrumb Frameworks / HapiFramework
|
|
9
|
-
* @public
|
|
10
|
-
*/
|
|
11
|
-
export declare class HapiFramework implements FrameworkContract<Server> {
|
|
12
|
-
/**
|
|
13
|
-
* {@inheritDoc}
|
|
14
|
-
*/
|
|
15
|
-
sendRequest(app: Server, request: IncomingMessage, response: ServerResponse): void;
|
|
16
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './hapi.framework';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './koa.framework';
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import { IncomingMessage, ServerResponse } from 'http';
|
|
3
|
-
import type Application from 'koa';
|
|
4
|
-
import { FrameworkContract } from '../../contracts';
|
|
5
|
-
/**
|
|
6
|
-
* The framework that forwards requests to koa handler
|
|
7
|
-
*
|
|
8
|
-
* @breadcrumb Frameworks / KoaFramework
|
|
9
|
-
* @public
|
|
10
|
-
*/
|
|
11
|
-
export declare class KoaFramework implements FrameworkContract<Application> {
|
|
12
|
-
/**
|
|
13
|
-
* {@inheritDoc}
|
|
14
|
-
*/
|
|
15
|
-
sendRequest(app: Application, request: IncomingMessage, response: ServerResponse): void;
|
|
16
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './lazy.framework';
|