@h4ad/serverless-adapter 2.17.0 → 3.1.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.d.ts +3 -5
- package/lib/@types/binary-settings.d.ts.map +1 -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.d.ts +1 -1
- package/lib/@types/digital-ocean/digital-ocean-http-event.d.ts.map +1 -0
- 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.d.ts +1 -1
- package/lib/@types/digital-ocean/digital-ocean-http-response.d.ts.map +1 -0
- 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.d.ts +1 -0
- package/lib/@types/digital-ocean/index.d.ts.map +1 -0
- package/lib/@types/digital-ocean/index.js +2 -18
- package/lib/@types/digital-ocean/index.js.map +1 -1
- package/lib/@types/headers.d.ts +4 -6
- package/lib/@types/headers.d.ts.map +1 -0
- package/lib/@types/headers.js +2 -11
- package/lib/@types/headers.js.map +1 -1
- package/lib/@types/helpers.d.ts +2 -2
- package/lib/@types/helpers.d.ts.map +1 -0
- package/lib/@types/helpers.js +2 -6
- package/lib/@types/helpers.js.map +1 -1
- package/lib/@types/huawei/huawei-api-gateway-event.d.ts +3 -6
- package/lib/@types/huawei/huawei-api-gateway-event.d.ts.map +1 -0
- 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.d.ts +1 -1
- package/lib/@types/huawei/huawei-api-gateway-response.d.ts.map +1 -0
- 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.d.ts +16 -31
- package/lib/@types/huawei/huawei-context.d.ts.map +1 -0
- package/lib/@types/huawei/huawei-context.js +2 -36
- package/lib/@types/huawei/huawei-context.js.map +1 -1
- package/lib/@types/huawei/index.d.ts +1 -0
- package/lib/@types/huawei/index.d.ts.map +1 -0
- package/lib/@types/huawei/index.js +2 -20
- package/lib/@types/huawei/index.js.map +1 -1
- package/lib/@types/index.d.ts +1 -0
- package/lib/@types/index.d.ts.map +1 -0
- package/lib/@types/index.js +2 -20
- package/lib/@types/index.js.map +1 -1
- package/lib/adapters/apollo-server/apollo-server-mutation.adapter.d.ts +2 -2
- package/lib/adapters/apollo-server/apollo-server-mutation.adapter.d.ts.map +1 -0
- 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.d.ts +1 -0
- package/lib/adapters/apollo-server/index.d.ts.map +1 -0
- 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.d.ts +6 -1
- package/lib/adapters/aws/alb.adapter.d.ts.map +1 -0
- 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.d.ts +6 -1
- package/lib/adapters/aws/api-gateway-v1.adapter.d.ts.map +1 -0
- 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.d.ts +6 -1
- package/lib/adapters/aws/api-gateway-v2.adapter.d.ts.map +1 -0
- 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.d.ts +3 -5
- package/lib/adapters/aws/base/aws-simple-adapter.d.ts.map +1 -0
- 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.d.ts +1 -0
- package/lib/adapters/aws/base/index.d.ts.map +1 -0
- 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.d.ts +1 -1
- package/lib/adapters/aws/dynamodb.adapter.d.ts.map +1 -0
- 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.d.ts +2 -3
- package/lib/adapters/aws/event-bridge.adapter.d.ts.map +1 -0
- 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.d.ts +2 -0
- package/lib/adapters/aws/index.d.ts.map +1 -0
- package/lib/adapters/aws/index.js +2 -27
- package/lib/adapters/aws/index.js.map +1 -1
- package/lib/adapters/aws/lambda-edge.adapter.d.ts +5 -9
- package/lib/adapters/aws/lambda-edge.adapter.d.ts.map +1 -0
- 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/request-lambda-edge.adapter.d.ts +131 -0
- package/lib/adapters/aws/request-lambda-edge.adapter.d.ts.map +1 -0
- package/lib/adapters/aws/request-lambda-edge.adapter.js +2 -0
- package/lib/adapters/aws/request-lambda-edge.adapter.js.map +1 -0
- package/lib/adapters/aws/s3.adapter.d.ts +2 -2
- package/lib/adapters/aws/s3.adapter.d.ts.map +1 -0
- 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.d.ts +2 -2
- package/lib/adapters/aws/sns.adapter.d.ts.map +1 -0
- 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.d.ts +2 -2
- package/lib/adapters/aws/sqs.adapter.d.ts.map +1 -0
- 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.d.ts +1 -1
- package/lib/adapters/azure/http-trigger-v4.adapter.d.ts.map +1 -0
- 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.d.ts +1 -0
- package/lib/adapters/azure/index.d.ts.map +1 -0
- 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.d.ts +1 -1
- package/lib/adapters/digital-ocean/http-function.adapter.d.ts.map +1 -0
- 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.d.ts +1 -0
- package/lib/adapters/digital-ocean/index.d.ts.map +1 -0
- 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.d.ts +1 -0
- package/lib/adapters/dummy/dummy.adapter.d.ts.map +1 -0
- package/lib/adapters/dummy/dummy.adapter.js +2 -54
- package/lib/adapters/dummy/dummy.adapter.js.map +1 -1
- package/lib/adapters/dummy/index.d.ts +1 -0
- package/lib/adapters/dummy/index.d.ts.map +1 -0
- 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.d.ts +1 -1
- package/lib/adapters/huawei/huawei-api-gateway.adapter.d.ts.map +1 -0
- 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.d.ts +1 -0
- package/lib/adapters/huawei/index.d.ts.map +1 -0
- package/lib/adapters/huawei/index.js +2 -18
- package/lib/adapters/huawei/index.js.map +1 -1
- package/lib/contracts/adapter.contract.d.ts +1 -4
- package/lib/contracts/adapter.contract.d.ts.map +1 -0
- package/lib/contracts/adapter.contract.js +2 -18
- package/lib/contracts/adapter.contract.js.map +1 -1
- package/lib/contracts/framework.contract.d.ts +1 -1
- package/lib/contracts/framework.contract.d.ts.map +1 -0
- package/lib/contracts/framework.contract.js +2 -7
- package/lib/contracts/framework.contract.js.map +1 -1
- package/lib/contracts/handler.contract.d.ts +2 -3
- package/lib/contracts/handler.contract.d.ts.map +1 -0
- package/lib/contracts/handler.contract.js +2 -13
- package/lib/contracts/handler.contract.js.map +1 -1
- package/lib/contracts/index.d.ts +1 -0
- package/lib/contracts/index.d.ts.map +1 -0
- package/lib/contracts/index.js +2 -21
- package/lib/contracts/index.js.map +1 -1
- package/lib/contracts/resolver.contract.d.ts +4 -7
- package/lib/contracts/resolver.contract.d.ts.map +1 -0
- package/lib/contracts/resolver.contract.js +2 -15
- package/lib/contracts/resolver.contract.js.map +1 -1
- package/lib/core/base-handler.d.ts +1 -0
- package/lib/core/base-handler.d.ts.map +1 -0
- package/lib/core/base-handler.js +2 -67
- package/lib/core/base-handler.js.map +1 -1
- package/lib/core/constants.d.ts +4 -4
- package/lib/core/constants.d.ts.map +1 -0
- package/lib/core/constants.js +2 -33
- package/lib/core/constants.js.map +1 -1
- package/lib/core/current-invoke.d.ts +2 -2
- package/lib/core/current-invoke.d.ts.map +1 -0
- package/lib/core/current-invoke.js +2 -46
- package/lib/core/current-invoke.js.map +1 -1
- package/lib/core/event-body.d.ts +1 -0
- package/lib/core/event-body.d.ts.map +1 -0
- package/lib/core/event-body.js +2 -31
- package/lib/core/event-body.js.map +1 -1
- package/lib/core/headers.d.ts +26 -0
- package/lib/core/headers.d.ts.map +1 -0
- package/lib/core/headers.js +3 -97
- package/lib/core/headers.js.map +1 -1
- package/lib/core/index.d.ts +1 -0
- package/lib/core/index.d.ts.map +1 -0
- package/lib/core/index.js +2 -28
- package/lib/core/index.js.map +1 -1
- package/lib/core/is-binary.d.ts +8 -7
- package/lib/core/is-binary.d.ts.map +1 -0
- package/lib/core/is-binary.js +2 -118
- package/lib/core/is-binary.js.map +1 -1
- package/lib/core/logger.d.ts +5 -8
- package/lib/core/logger.d.ts.map +1 -0
- package/lib/core/logger.js +2 -115
- package/lib/core/logger.js.map +1 -1
- package/lib/core/no-op.d.ts +1 -0
- package/lib/core/no-op.d.ts.map +1 -0
- package/lib/core/no-op.js +2 -12
- package/lib/core/no-op.js.map +1 -1
- package/lib/core/optional.d.ts +1 -0
- package/lib/core/optional.d.ts.map +1 -0
- package/lib/core/optional.js +2 -31
- package/lib/core/optional.js.map +1 -1
- package/lib/core/path.d.ts +17 -0
- package/lib/core/path.d.ts.map +1 -0
- package/lib/core/path.js +2 -68
- package/lib/core/path.js.map +1 -1
- package/lib/core/stream.d.ts +1 -0
- package/lib/core/stream.d.ts.map +1 -0
- package/lib/core/stream.js +2 -63
- package/lib/core/stream.js.map +1 -1
- package/lib/frameworks/apollo-server/apollo-server.framework.d.ts +2 -4
- package/lib/frameworks/apollo-server/apollo-server.framework.d.ts.map +1 -0
- 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.d.ts +1 -0
- package/lib/frameworks/apollo-server/index.d.ts.map +1 -0
- 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.d.ts +2 -2
- package/lib/frameworks/body-parser/base-body-parser.framework.d.ts.map +1 -0
- 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.d.ts +1 -0
- package/lib/frameworks/body-parser/index.d.ts.map +1 -0
- 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.d.ts +2 -2
- package/lib/frameworks/body-parser/json-body-parser.framework.d.ts.map +1 -0
- 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.d.ts +2 -2
- package/lib/frameworks/body-parser/raw-body-parser.framework.d.ts.map +1 -0
- 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.d.ts +2 -2
- package/lib/frameworks/body-parser/text-body-parser.framework.d.ts.map +1 -0
- 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.d.ts +2 -2
- package/lib/frameworks/body-parser/urlencoded-body-parser.framework.d.ts.map +1 -0
- 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.d.ts +2 -2
- package/lib/frameworks/cors/cors.framework.d.ts.map +1 -0
- package/lib/frameworks/cors/cors.framework.js +3 -145
- package/lib/frameworks/cors/cors.framework.js.map +1 -1
- package/lib/frameworks/cors/index.d.ts +1 -0
- package/lib/frameworks/cors/index.d.ts.map +1 -0
- package/lib/frameworks/cors/index.js +2 -18
- package/lib/frameworks/cors/index.js.map +1 -1
- package/lib/frameworks/deepkit/http-deepkit.framework.d.ts +1 -0
- package/lib/frameworks/deepkit/http-deepkit.framework.d.ts.map +1 -0
- 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.d.ts +1 -0
- package/lib/frameworks/deepkit/index.d.ts.map +1 -0
- package/lib/frameworks/deepkit/index.js +2 -18
- package/lib/frameworks/deepkit/index.js.map +1 -1
- package/lib/frameworks/express/express.framework.d.ts +1 -0
- package/lib/frameworks/express/express.framework.d.ts.map +1 -0
- package/lib/frameworks/express/express.framework.js +2 -22
- package/lib/frameworks/express/express.framework.js.map +1 -1
- package/lib/frameworks/express/index.d.ts +1 -0
- package/lib/frameworks/express/index.d.ts.map +1 -0
- package/lib/frameworks/express/index.js +2 -18
- package/lib/frameworks/express/index.js.map +1 -1
- package/lib/frameworks/fastify/fastify.framework.d.ts +1 -0
- package/lib/frameworks/fastify/fastify.framework.d.ts.map +1 -0
- 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.d.ts +1 -0
- package/lib/frameworks/fastify/helpers/no-op-content-parser.d.ts.map +1 -0
- 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.d.ts +1 -0
- package/lib/frameworks/fastify/index.d.ts.map +1 -0
- package/lib/frameworks/fastify/index.js +2 -18
- package/lib/frameworks/fastify/index.js.map +1 -1
- package/lib/frameworks/hapi/hapi.framework.d.ts +2 -1
- package/lib/frameworks/hapi/hapi.framework.d.ts.map +1 -0
- package/lib/frameworks/hapi/hapi.framework.js +2 -23
- package/lib/frameworks/hapi/hapi.framework.js.map +1 -1
- package/lib/frameworks/hapi/index.d.ts +1 -0
- package/lib/frameworks/hapi/index.d.ts.map +1 -0
- package/lib/frameworks/hapi/index.js +2 -18
- package/lib/frameworks/hapi/index.js.map +1 -1
- package/lib/frameworks/koa/index.d.ts +1 -0
- package/lib/frameworks/koa/index.d.ts.map +1 -0
- package/lib/frameworks/koa/index.js +2 -18
- package/lib/frameworks/koa/index.js.map +1 -1
- package/lib/frameworks/koa/koa.framework.d.ts +1 -0
- package/lib/frameworks/koa/koa.framework.d.ts.map +1 -0
- package/lib/frameworks/koa/koa.framework.js +2 -22
- package/lib/frameworks/koa/koa.framework.js.map +1 -1
- package/lib/frameworks/lazy/index.d.ts +1 -0
- package/lib/frameworks/lazy/index.d.ts.map +1 -0
- package/lib/frameworks/lazy/index.js +2 -18
- package/lib/frameworks/lazy/index.js.map +1 -1
- package/lib/frameworks/lazy/lazy.framework.d.ts +1 -0
- package/lib/frameworks/lazy/lazy.framework.d.ts.map +1 -0
- package/lib/frameworks/lazy/lazy.framework.js +2 -82
- package/lib/frameworks/lazy/lazy.framework.js.map +1 -1
- package/lib/frameworks/trpc/index.d.ts +1 -0
- package/lib/frameworks/trpc/index.d.ts.map +1 -0
- package/lib/frameworks/trpc/index.js +2 -18
- package/lib/frameworks/trpc/index.js.map +1 -1
- package/lib/frameworks/trpc/trpc.framework.d.ts +5 -7
- package/lib/frameworks/trpc/trpc.framework.d.ts.map +1 -0
- 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.d.ts +12 -6
- package/lib/handlers/aws/aws-stream.handler.d.ts.map +1 -0
- 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.d.ts +1 -0
- package/lib/handlers/aws/index.d.ts.map +1 -0
- package/lib/handlers/aws/index.js +2 -18
- package/lib/handlers/aws/index.js.map +1 -1
- package/lib/handlers/azure/azure.handler.d.ts +1 -1
- package/lib/handlers/azure/azure.handler.d.ts.map +1 -0
- package/lib/handlers/azure/azure.handler.js +2 -74
- package/lib/handlers/azure/azure.handler.js.map +1 -1
- package/lib/handlers/azure/index.d.ts +1 -0
- package/lib/handlers/azure/index.d.ts.map +1 -0
- package/lib/handlers/azure/index.js +2 -18
- package/lib/handlers/azure/index.js.map +1 -1
- package/lib/handlers/base/index.d.ts +1 -0
- package/lib/handlers/base/index.d.ts.map +1 -0
- package/lib/handlers/base/index.js +2 -18
- package/lib/handlers/base/index.js.map +1 -1
- package/lib/handlers/base/raw-request.d.ts +1 -0
- package/lib/handlers/base/raw-request.d.ts.map +1 -0
- 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.d.ts +1 -0
- package/lib/handlers/default/default.handler.d.ts.map +1 -0
- package/lib/handlers/default/default.handler.js +2 -191
- package/lib/handlers/default/default.handler.js.map +1 -1
- package/lib/handlers/default/index.d.ts +1 -0
- package/lib/handlers/default/index.d.ts.map +1 -0
- 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.d.ts +1 -0
- package/lib/handlers/digital-ocean/digital-ocean.handler.d.ts.map +1 -0
- 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.d.ts +1 -0
- package/lib/handlers/digital-ocean/index.d.ts.map +1 -0
- 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.d.ts +1 -0
- package/lib/handlers/firebase/http-firebase-v2.handler.d.ts.map +1 -0
- 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.d.ts +1 -0
- package/lib/handlers/firebase/http-firebase.handler.d.ts.map +1 -0
- 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.d.ts +1 -0
- package/lib/handlers/firebase/index.d.ts.map +1 -0
- package/lib/handlers/firebase/index.js +2 -19
- package/lib/handlers/firebase/index.js.map +1 -1
- package/lib/handlers/gcp/gcp.handler.d.ts +2 -1
- package/lib/handlers/gcp/gcp.handler.d.ts.map +1 -0
- package/lib/handlers/gcp/gcp.handler.js +2 -40
- package/lib/handlers/gcp/gcp.handler.js.map +1 -1
- package/lib/handlers/gcp/index.d.ts +1 -0
- package/lib/handlers/gcp/index.d.ts.map +1 -0
- package/lib/handlers/gcp/index.js +2 -18
- package/lib/handlers/gcp/index.js.map +1 -1
- package/lib/handlers/huawei/http-huawei.handler.d.ts +2 -2
- package/lib/handlers/huawei/http-huawei.handler.d.ts.map +1 -0
- 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.d.ts +1 -0
- package/lib/handlers/huawei/index.d.ts.map +1 -0
- package/lib/handlers/huawei/index.js +2 -18
- package/lib/handlers/huawei/index.js.map +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.d.ts.map +1 -0
- 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.d.ts +1 -0
- package/lib/network/index.d.ts.map +1 -0
- package/lib/network/index.js +2 -21
- package/lib/network/index.js.map +1 -1
- package/lib/network/request.d.ts +1 -1
- package/lib/network/request.d.ts.map +1 -0
- package/lib/network/request.js +2 -46
- package/lib/network/request.js.map +1 -1
- package/lib/network/response-stream.d.ts +1 -1
- package/lib/network/response-stream.d.ts.map +1 -0
- package/lib/network/response-stream.js +7 -88
- package/lib/network/response-stream.js.map +1 -1
- package/lib/network/response.d.ts +1 -1
- package/lib/network/response.d.ts.map +1 -0
- package/lib/network/response.js +4 -127
- package/lib/network/response.js.map +1 -1
- package/lib/network/utils.d.ts +2 -0
- package/lib/network/utils.d.ts.map +1 -0
- package/lib/network/utils.js +2 -21
- package/lib/network/utils.js.map +1 -1
- package/lib/resolvers/aws-context/aws-context.resolver.d.ts +1 -0
- package/lib/resolvers/aws-context/aws-context.resolver.d.ts.map +1 -0
- 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.d.ts +1 -0
- package/lib/resolvers/aws-context/index.d.ts.map +1 -0
- 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.d.ts +2 -2
- package/lib/resolvers/callback/callback.resolver.d.ts.map +1 -0
- package/lib/resolvers/callback/callback.resolver.js +2 -53
- package/lib/resolvers/callback/callback.resolver.js.map +1 -1
- package/lib/resolvers/callback/index.d.ts +1 -0
- package/lib/resolvers/callback/index.d.ts.map +1 -0
- package/lib/resolvers/callback/index.js +2 -18
- package/lib/resolvers/callback/index.js.map +1 -1
- package/lib/resolvers/dummy/dummy.resolver.d.ts +1 -0
- package/lib/resolvers/dummy/dummy.resolver.d.ts.map +1 -0
- package/lib/resolvers/dummy/dummy.resolver.js +2 -24
- package/lib/resolvers/dummy/dummy.resolver.js.map +1 -1
- package/lib/resolvers/dummy/index.d.ts +1 -0
- package/lib/resolvers/dummy/index.d.ts.map +1 -0
- package/lib/resolvers/dummy/index.js +2 -18
- package/lib/resolvers/dummy/index.js.map +1 -1
- package/lib/resolvers/promise/index.d.ts +1 -0
- package/lib/resolvers/promise/index.d.ts.map +1 -0
- package/lib/resolvers/promise/index.js +2 -18
- package/lib/resolvers/promise/index.js.map +1 -1
- package/lib/resolvers/promise/promise.resolver.d.ts +1 -0
- package/lib/resolvers/promise/promise.resolver.d.ts.map +1 -0
- package/lib/resolvers/promise/promise.resolver.js +2 -48
- package/lib/resolvers/promise/promise.resolver.js.map +1 -1
- package/lib/serverless-adapter.d.ts +1 -0
- package/lib/serverless-adapter.d.ts.map +1 -0
- package/lib/serverless-adapter.js +2 -176
- package/lib/serverless-adapter.js.map +1 -1
- package/package.json +60 -79
package/README.md
CHANGED
|
@@ -86,6 +86,13 @@ export const handler = ServerlessAdapter.new(app)
|
|
|
86
86
|
|
|
87
87
|
See how to use this library [here](https://viniciusl.com.br/serverless-adapter/docs/category/getting-started).
|
|
88
88
|
|
|
89
|
+
# Breaking Changes
|
|
90
|
+
|
|
91
|
+
I will not consider updating/breaking compatibility of a NodeJS framework as a breaking change,
|
|
92
|
+
because I had a lot of supported frameworks and if I created a major version for each one it would be a mess.
|
|
93
|
+
|
|
94
|
+
So if you want predictability, pin the version with `~` instead of `^`.
|
|
95
|
+
|
|
89
96
|
# Examples
|
|
90
97
|
|
|
91
98
|
You can see some examples of how to use this library [here](https://github.com/H4ad/serverless-adapter-examples).
|
|
@@ -23,7 +23,7 @@ export interface BinarySettingsContentHeaders {
|
|
|
23
23
|
/**
|
|
24
24
|
* The list of content types that will be treated as binary
|
|
25
25
|
*/
|
|
26
|
-
contentTypes:
|
|
26
|
+
contentTypes: string[];
|
|
27
27
|
/**
|
|
28
28
|
* The list of content encodings that will be treated as binary
|
|
29
29
|
*/
|
|
@@ -37,7 +37,5 @@ export interface BinarySettingsContentHeaders {
|
|
|
37
37
|
* @breadcrumb Types / BinarySettings
|
|
38
38
|
* @public
|
|
39
39
|
*/
|
|
40
|
-
export
|
|
41
|
-
|
|
42
|
-
export declare type __ΩBinarySettingsContentHeaders = any[];
|
|
43
|
-
export declare type __ΩBinarySettings = any[];
|
|
40
|
+
export type BinarySettings = BinarySettingsFunction | BinarySettingsContentHeaders;
|
|
41
|
+
//# sourceMappingURL=binary-settings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"binary-settings.d.ts","sourceRoot":"","sources":["../../src/@types/binary-settings.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,WAAW,sBAAsB;IACrC;;;;;OAKG;IACH,QAAQ,EACJ,CAAC,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAC,KAAK,OAAO,CAAC,GACrE,KAAK,CAAC;CACX;AAED;;;;;GAKG;AACH,MAAM,WAAW,4BAA4B;IAC3C;;OAEG;IACH,YAAY,EAAE,MAAM,EAAE,CAAC;IAEvB;;OAEG;IACH,gBAAgB,EAAE,MAAM,EAAE,CAAC;CAC5B;AAED;;;;;;;GAOG;AACH,MAAM,MAAM,cAAc,GACtB,sBAAsB,GACtB,4BAA4B,CAAC"}
|
|
@@ -1,11 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
exports.__ΩBinarySettings = exports.__ΩBinarySettingsContentHeaders = exports.__ΩBinarySettingsFunction = void 0;
|
|
4
|
-
const __ΩRecord = ['K', 'T', 'l\'e#"Rb!b"Pde"!N#!'];
|
|
5
|
-
const __ΩBinarySettingsFunction = [() => __ΩRecord, 'headers', '', false, 'isBinary', 'PPP&P&&F-Jo!#2")/#.$J4%M'];
|
|
6
|
-
exports.__ΩBinarySettingsFunction = __ΩBinarySettingsFunction;
|
|
7
|
-
const __ΩBinarySettingsContentHeaders = ['contentTypes', 'contentEncodings', 'PP&AJF4!&F4"M'];
|
|
8
|
-
exports.__ΩBinarySettingsContentHeaders = __ΩBinarySettingsContentHeaders;
|
|
9
|
-
const __ΩBinarySettings = [() => __ΩBinarySettingsFunction, () => __ΩBinarySettingsContentHeaders, 'Pn!n"J'];
|
|
10
|
-
exports.__ΩBinarySettings = __ΩBinarySettings;
|
|
11
|
-
//# sourceMappingURL=binary-settings.js.map
|
|
1
|
+
"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),binary_settings_exports={};module.exports=__toCommonJS(binary_settings_exports);
|
|
2
|
+
//# sourceMappingURL=binary-settings.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"binary-settings.js","
|
|
1
|
+
{"version":3,"file":"binary-settings.js","sources":["../../src/@types/binary-settings.ts"],"sourcesContent":["/**\n * The interface representing the binary settings implementation by function\n *\n * @breadcrumb Types / BinarySettings\n * @public\n */\nexport interface BinarySettingsFunction {\n /**\n * This property can be a function that receives the response headers and returns whether that response should be encoded as binary.\n * Otherwise, you can specify not to treat any response as binary by putting `false` in this property.\n *\n * @remarks Setting this property prevents the `contentTypes` and `contentEncodings` properties from being used.\n */\n isBinary:\n | ((headers: Record<string, string | string[] | undefined>) => boolean)\n | false;\n}\n\n/**\n * The interface representing the binary settings implementation by looking inside the headers\n *\n * @breadcrumb Types / BinarySettings\n * @public\n */\nexport interface BinarySettingsContentHeaders {\n /**\n * The list of content types that will be treated as binary\n */\n contentTypes: string[];\n\n /**\n * The list of content encodings that will be treated as binary\n */\n contentEncodings: string[];\n}\n\n/**\n * The interface representing the settings for whether the response should be treated as binary or not\n *\n * @remarks Encoded as binary means the response body will be converted to base64\n *\n * @breadcrumb Types / BinarySettings\n * @public\n */\nexport type BinarySettings =\n | BinarySettingsFunction\n | BinarySettingsContentHeaders;\n"],"names":[],"mappings":"kiBAAA,wBAAA,CAAA,EAAA,OAAA,QAAA,aAAA,uBAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"digital-ocean-http-event.d.ts","sourceRoot":"","sources":["../../../src/@types/digital-ocean/digital-ocean-http-event.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAIhD;;;;;;;;GAQG;AACH,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAE/B;;OAEG;IACH,YAAY,EAAE,kBAAkB,CAAC;IAEjC;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB"}
|
|
@@ -1,7 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
exports.__ΩDigitalOceanHttpEvent = void 0;
|
|
4
|
-
const { __ΩSingleValueHeaders } = require('../headers');
|
|
5
|
-
const __ΩDigitalOceanHttpEvent = ['__ow_method', '__ow_query', '__ow_body', '__ow_isBase64Encoded', () => __ΩSingleValueHeaders, '__ow_headers', '__ow_path', 'P&4!&4"&4#8)4$8n%4&&4\'M'];
|
|
6
|
-
exports.__ΩDigitalOceanHttpEvent = __ΩDigitalOceanHttpEvent;
|
|
7
|
-
//# sourceMappingURL=digital-ocean-http-event.js.map
|
|
1
|
+
"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),digital_ocean_http_event_exports={};module.exports=__toCommonJS(digital_ocean_http_event_exports);
|
|
2
|
+
//# sourceMappingURL=digital-ocean-http-event.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"digital-ocean-http-event.js","
|
|
1
|
+
{"version":3,"file":"digital-ocean-http-event.js","sources":["../../../src/@types/digital-ocean/digital-ocean-http-event.ts"],"sourcesContent":["//#region Imports\n\nimport { SingleValueHeaders } from '../headers';\n\n//#endregion\n\n/**\n * The interface to represents the values of args send when someone calls a function using HTTP Endpoint.\n * To be able to receive this event, inside your `project.yml`, instead of `web: true` change to `web: 'raw'`.\n *\n * {@link https://www.digitalocean.com/community/questions/digitalocean-functions-how-to-differentiate-query-params-from-body-params | Reference}\n *\n * @public\n * @breadcrumb Types / Digital Ocean / DigitalOceanHttpEvent\n */\nexport interface DigitalOceanHttpEvent {\n /**\n * The HTTP Method of the request\n */\n __ow_method: string;\n\n /**\n * The query porams of the request\n */\n __ow_query: string;\n\n /**\n * The body of the request.\n */\n __ow_body?: string;\n\n /**\n * Indicates if body is base64 string\n */\n __ow_isBase64Encoded?: boolean;\n\n /**\n * The HTTP Headers of the request\n */\n __ow_headers: SingleValueHeaders;\n\n /**\n * The path in the request\n */\n __ow_path: string;\n}\n"],"names":[],"mappings":"kiBAAA,iCAAA,CAAA,EAAA,OAAA,QAAA,aAAA,gCAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"digital-ocean-http-response.d.ts","sourceRoot":"","sources":["../../../src/@types/digital-ocean/digital-ocean-http-response.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAIhD;;;;;GAKG;AACH,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,OAAO,CAAC,EAAE,kBAAkB,CAAC;IAE7B;;OAEG;IACH,IAAI,EAAE,OAAO,CAAC;IAEd;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;CACpB"}
|
|
@@ -1,7 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
exports.__ΩDigitalOceanHttpResponse = void 0;
|
|
4
|
-
const { __ΩSingleValueHeaders } = require('../headers');
|
|
5
|
-
const __ΩDigitalOceanHttpResponse = [() => __ΩSingleValueHeaders, 'headers', 'body', 'statusCode', 'Pn!4"8#4#\'4$M'];
|
|
6
|
-
exports.__ΩDigitalOceanHttpResponse = __ΩDigitalOceanHttpResponse;
|
|
7
|
-
//# sourceMappingURL=digital-ocean-http-response.js.map
|
|
1
|
+
"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),digital_ocean_http_response_exports={};module.exports=__toCommonJS(digital_ocean_http_response_exports);
|
|
2
|
+
//# sourceMappingURL=digital-ocean-http-response.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"digital-ocean-http-response.js","
|
|
1
|
+
{"version":3,"file":"digital-ocean-http-response.js","sources":["../../../src/@types/digital-ocean/digital-ocean-http-response.ts"],"sourcesContent":["//#region Imports\n\nimport { SingleValueHeaders } from '../headers';\n\n//#endregion\n\n/**\n * The interface to represents the response of Digital Ocean Function.\n *\n * @public\n * @breadcrumb Types / Digital Ocean / DigitalOceanHttpResponse\n */\nexport interface DigitalOceanHttpResponse {\n /**\n * The HTTP Headers of the response\n */\n headers?: SingleValueHeaders;\n\n /**\n * The body of the response\n */\n body: unknown;\n\n /**\n * The HTTP Status code of the response\n */\n statusCode: number;\n}\n"],"names":[],"mappings":"kiBAAA,oCAAA,CAAA,EAAA,OAAA,QAAA,aAAA,mCAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/@types/digital-ocean/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC"}
|
|
@@ -1,18 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./digital-ocean-http-event"), exports);
|
|
18
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__reExport=(target,mod,secondTarget)=>(__copyProps(target,mod,"default"),secondTarget&&__copyProps(secondTarget,mod,"default")),__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),digital_ocean_exports={};module.exports=__toCommonJS(digital_ocean_exports);__reExport(digital_ocean_exports,require("./digital-ocean-http-event"),module.exports);
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/@types/digital-ocean/index.ts"],"sourcesContent":["export * from './digital-ocean-http-event';\n"],"names":[],"mappings":"kqBAAA,sBAAA,CAAA,EAAA,OAAA,QAAA,aAAA,qBAAA,EAAA,WAAA,sBAAc,QAAd,4BAAA,EAAA,OAAA,OAAA"}
|
package/lib/@types/headers.d.ts
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* @breadcrumb Types
|
|
10
10
|
* @public
|
|
11
11
|
*/
|
|
12
|
-
export
|
|
12
|
+
export type SingleValueHeaders = Record<string, string | undefined>;
|
|
13
13
|
/**
|
|
14
14
|
* The record that represents the headers that have multiple values in the value
|
|
15
15
|
*
|
|
@@ -21,7 +21,7 @@ export declare type SingleValueHeaders = Record<string, string | undefined>;
|
|
|
21
21
|
* @breadcrumb Types
|
|
22
22
|
* @public
|
|
23
23
|
*/
|
|
24
|
-
export
|
|
24
|
+
export type MultiValueHeaders = Record<string, string[] | undefined>;
|
|
25
25
|
/**
|
|
26
26
|
* The record that represents the headers that can both single or multiple values in the value
|
|
27
27
|
*
|
|
@@ -33,7 +33,5 @@ export declare type MultiValueHeaders = Record<string, string[] | undefined>;
|
|
|
33
33
|
* @breadcrumb Types
|
|
34
34
|
* @public
|
|
35
35
|
*/
|
|
36
|
-
export
|
|
37
|
-
|
|
38
|
-
export declare type __ΩMultiValueHeaders = any[];
|
|
39
|
-
export declare type __ΩBothValueHeaders = any[];
|
|
36
|
+
export type BothValueHeaders = Record<string, string | string[] | undefined>;
|
|
37
|
+
//# sourceMappingURL=headers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"headers.d.ts","sourceRoot":"","sources":["../../src/@types/headers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,MAAM,MAAM,kBAAkB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;AAEpE;;;;;;;;;;GAUG;AACH,MAAM,MAAM,iBAAiB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC,CAAC;AAErE;;;;;;;;;;GAUG;AACH,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAC,CAAC"}
|
package/lib/@types/headers.js
CHANGED
|
@@ -1,11 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
exports.__ΩBothValueHeaders = exports.__ΩMultiValueHeaders = exports.__ΩSingleValueHeaders = void 0;
|
|
4
|
-
const __ΩRecord = ['K', 'T', 'l\'e#"Rb!b"Pde"!N#!'];
|
|
5
|
-
const __ΩSingleValueHeaders = [() => __ΩRecord, '&P&-Jo!#'];
|
|
6
|
-
exports.__ΩSingleValueHeaders = __ΩSingleValueHeaders;
|
|
7
|
-
const __ΩMultiValueHeaders = [() => __ΩRecord, '&P&F-Jo!#'];
|
|
8
|
-
exports.__ΩMultiValueHeaders = __ΩMultiValueHeaders;
|
|
9
|
-
const __ΩBothValueHeaders = [() => __ΩRecord, '&P&&F-Jo!#'];
|
|
10
|
-
exports.__ΩBothValueHeaders = __ΩBothValueHeaders;
|
|
11
|
-
//# sourceMappingURL=headers.js.map
|
|
1
|
+
"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),headers_exports={};module.exports=__toCommonJS(headers_exports);
|
|
2
|
+
//# sourceMappingURL=headers.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"headers.js","
|
|
1
|
+
{"version":3,"file":"headers.js","sources":["../../src/@types/headers.ts"],"sourcesContent":["/**\n * The record that represents the headers that doesn't have multiple values in the value\n *\n * @example\n * ```typescript\n * { 'Accept-Encoding': 'gzip, deflate, br' }\n * ```\n *\n * @breadcrumb Types\n * @public\n */\nexport type SingleValueHeaders = Record<string, string | undefined>;\n\n/**\n * The record that represents the headers that have multiple values in the value\n *\n * @example\n * ```typescript\n * { 'Accept-Encoding': ['gzip', 'deflate', 'br'] }\n * ```\n *\n * @breadcrumb Types\n * @public\n */\nexport type MultiValueHeaders = Record<string, string[] | undefined>;\n\n/**\n * The record that represents the headers that can both single or multiple values in the value\n *\n * @example\n * ```typescript\n * { 'Accept-Encoding': ['gzip', 'deflate', 'br'], 'Host': 'xyz.execute-api.us-east-1.amazonaws.com' }\n * ```\n *\n * @breadcrumb Types\n * @public\n */\nexport type BothValueHeaders = Record<string, string | string[] | undefined>;\n"],"names":[],"mappings":"kiBAAA,gBAAA,CAAA,EAAA,OAAA,QAAA,aAAA,eAAA"}
|
package/lib/@types/helpers.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../src/@types/helpers.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,MAAM,QAAQ,CAAC,IAAI,IAAI;KAC1B,QAAQ,IAAI,MAAM,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC;CAC3C,CAAC"}
|
package/lib/@types/helpers.js
CHANGED
|
@@ -1,6 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
exports.__ΩConcrete = void 0;
|
|
4
|
-
const __ΩConcrete = ['Type', 'l+e#!e"!fRb!Pde"!gN##'];
|
|
5
|
-
exports.__ΩConcrete = __ΩConcrete;
|
|
6
|
-
//# sourceMappingURL=helpers.js.map
|
|
1
|
+
"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),helpers_exports={};module.exports=__toCommonJS(helpers_exports);
|
|
2
|
+
//# sourceMappingURL=helpers.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.js","
|
|
1
|
+
{"version":3,"file":"helpers.js","sources":["../../src/@types/helpers.ts"],"sourcesContent":["/**\n * Removes 'optional' attributes from a type's properties\n *\n * @breadcrumb Types\n * @public\n */\nexport type Concrete<Type> = {\n [Property in keyof Type]-?: Type[Property];\n};\n"],"names":[],"mappings":"kiBAAA,gBAAA,CAAA,EAAA,OAAA,QAAA,aAAA,eAAA"}
|
|
@@ -50,14 +50,14 @@ export interface HuaweiApiGatewayEvent {
|
|
|
50
50
|
* @public
|
|
51
51
|
* @breadcrumb Types / Huawei / HuaweiApiGatewayEvent
|
|
52
52
|
*/
|
|
53
|
-
export
|
|
53
|
+
export type HuaweiRequestPathParameters = Record<string, string>;
|
|
54
54
|
/**
|
|
55
55
|
* The query strings of the request
|
|
56
56
|
*
|
|
57
57
|
* @public
|
|
58
58
|
* @breadcrumb Types / Huawei / HuaweiApiGatewayEvent
|
|
59
59
|
*/
|
|
60
|
-
export
|
|
60
|
+
export type HuaweiRequestQueryStringParameters = Record<string, string | string[]>;
|
|
61
61
|
/**
|
|
62
62
|
* The interface that represents the values you can get inside request context.
|
|
63
63
|
*
|
|
@@ -78,7 +78,4 @@ export interface HuaweiRequestContext {
|
|
|
78
78
|
*/
|
|
79
79
|
stage: string;
|
|
80
80
|
}
|
|
81
|
-
|
|
82
|
-
export declare type __ΩHuaweiRequestPathParameters = any[];
|
|
83
|
-
export declare type __ΩHuaweiRequestQueryStringParameters = any[];
|
|
84
|
-
export declare type __ΩHuaweiRequestContext = any[];
|
|
81
|
+
//# sourceMappingURL=huawei-api-gateway-event.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"huawei-api-gateway-event.d.ts","sourceRoot":"","sources":["../../../src/@types/huawei/huawei-api-gateway-event.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAI5C;;;;;;GAMG;AACH,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,OAAO,EAAE,gBAAgB,CAAC;IAE1B;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,eAAe,EAAE,OAAO,CAAC;IAEzB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,cAAc,EAAE,2BAA2B,CAAC;IAE5C;;OAEG;IACH,qBAAqB,EAAE,kCAAkC,CAAC;IAE1D;;OAEG;IACH,cAAc,EAAE,oBAAoB,CAAC;IAErC;;OAEG;IACH,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAED;;;;;GAKG;AACH,MAAM,MAAM,2BAA2B,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAEjE;;;;;GAKG;AACH,MAAM,MAAM,kCAAkC,GAAG,MAAM,CACrD,MAAM,EACN,MAAM,GAAG,MAAM,EAAE,CAClB,CAAC;AAEF;;;;;GAKG;AACH,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;CACf"}
|
|
@@ -1,14 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
exports.__ΩHuaweiRequestContext = exports.__ΩHuaweiRequestQueryStringParameters = exports.__ΩHuaweiRequestPathParameters = exports.__ΩHuaweiApiGatewayEvent = void 0;
|
|
4
|
-
const { __ΩBothValueHeaders } = require('../index');
|
|
5
|
-
const __ΩRecord = ['K', 'T', 'l\'e#"Rb!b"Pde"!N#!'];
|
|
6
|
-
const __ΩHuaweiApiGatewayEvent = ['body', () => __ΩBothValueHeaders, 'headers', 'httpMethod', 'isBase64Encoded', 'path', () => __ΩHuaweiRequestPathParameters, 'pathParameters', () => __ΩHuaweiRequestQueryStringParameters, 'queryStringParameters', () => __ΩHuaweiRequestContext, 'requestContext', 'P&4!n"4#&4$)4%&4&n\'4(n)4*n+4,&"LM'];
|
|
7
|
-
exports.__ΩHuaweiApiGatewayEvent = __ΩHuaweiApiGatewayEvent;
|
|
8
|
-
const __ΩHuaweiRequestPathParameters = [() => __ΩRecord, '&&o!#'];
|
|
9
|
-
exports.__ΩHuaweiRequestPathParameters = __ΩHuaweiRequestPathParameters;
|
|
10
|
-
const __ΩHuaweiRequestQueryStringParameters = [() => __ΩRecord, '&P&&FJo!#'];
|
|
11
|
-
exports.__ΩHuaweiRequestQueryStringParameters = __ΩHuaweiRequestQueryStringParameters;
|
|
12
|
-
const __ΩHuaweiRequestContext = ['apiId', 'requestId', 'stage', 'P&4!&4"&4#M'];
|
|
13
|
-
exports.__ΩHuaweiRequestContext = __ΩHuaweiRequestContext;
|
|
14
|
-
//# sourceMappingURL=huawei-api-gateway-event.js.map
|
|
1
|
+
"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),huawei_api_gateway_event_exports={};module.exports=__toCommonJS(huawei_api_gateway_event_exports);
|
|
2
|
+
//# sourceMappingURL=huawei-api-gateway-event.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"huawei-api-gateway-event.js","
|
|
1
|
+
{"version":3,"file":"huawei-api-gateway-event.js","sources":["../../../src/@types/huawei/huawei-api-gateway-event.ts"],"sourcesContent":["//#region Imports\n\nimport { BothValueHeaders } from '../index';\n\n//#endregion\n\n/**\n * The interface that represents the Api Gateway Event of Huawei when integrate with Function Graph of Event Type.\n * See more in {@link https://support.huaweicloud.com/intl/en-us/devg-functiongraph/functiongraph_02_0102.html#functiongraph_02_0102__li5178638110137 | Reference}.\n *\n * @public\n * @breadcrumb Types / Huawei / HuaweiApiGatewayEvent\n */\nexport interface HuaweiApiGatewayEvent {\n /**\n * The body value with the content of this event serialized in JSON\n */\n body: string;\n\n /**\n * The headers of the request which this event represents\n */\n headers: BothValueHeaders;\n\n /**\n * The HTTP Method of the request which this event represents\n */\n httpMethod: string;\n\n /**\n * Tells if the body is base64 encoded\n */\n isBase64Encoded: boolean;\n\n /**\n * The path of the request which this event represents\n */\n path: string;\n\n /**\n * The path parameters of the request which this event represents\n */\n pathParameters: HuaweiRequestPathParameters;\n\n /**\n * The query strings of the request which this event represents\n */\n queryStringParameters: HuaweiRequestQueryStringParameters;\n\n /**\n * The request context with information about the stage, api and requestId\n */\n requestContext: HuaweiRequestContext;\n\n /**\n * It can have more properties that I could not discover yet\n */\n [key: string]: any;\n}\n\n/**\n * The path parameters of the request, usually is the name of the wildcard you create in FunctionGraph, such as /\\{proxy\\}.\n *\n * @public\n * @breadcrumb Types / Huawei / HuaweiApiGatewayEvent\n */\nexport type HuaweiRequestPathParameters = Record<string, string>;\n\n/**\n * The query strings of the request\n *\n * @public\n * @breadcrumb Types / Huawei / HuaweiApiGatewayEvent\n */\nexport type HuaweiRequestQueryStringParameters = Record<\n string,\n string | string[]\n>;\n\n/**\n * The interface that represents the values you can get inside request context.\n *\n * @public\n * @breadcrumb Types / Huawei / HuaweiApiGatewayEvent\n */\nexport interface HuaweiRequestContext {\n /**\n * The ID of your API inside Api Gateway\n */\n apiId: string;\n\n /**\n * The ID of this request\n */\n requestId: string;\n\n /**\n * The name of the stage running this Function Graph\n */\n stage: string;\n}\n"],"names":[],"mappings":"kiBAAA,iCAAA,CAAA,EAAA,OAAA,QAAA,aAAA,gCAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"huawei-api-gateway-response.d.ts","sourceRoot":"","sources":["../../../src/@types/huawei/huawei-api-gateway-response.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAI/C;;;;;;GAMG;AACH,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,eAAe,EAAE,OAAO,CAAC;IAEzB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,OAAO,EAAE,iBAAiB,CAAC;IAE3B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;CACd"}
|
|
@@ -1,7 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
exports.__ΩHuaweiApiGatewayResponse = void 0;
|
|
4
|
-
const { __ΩMultiValueHeaders } = require('../headers');
|
|
5
|
-
const __ΩHuaweiApiGatewayResponse = ['isBase64Encoded', 'statusCode', () => __ΩMultiValueHeaders, 'headers', 'body', 'P)4!\'4"n#4$&4%M'];
|
|
6
|
-
exports.__ΩHuaweiApiGatewayResponse = __ΩHuaweiApiGatewayResponse;
|
|
7
|
-
//# sourceMappingURL=huawei-api-gateway-response.js.map
|
|
1
|
+
"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),huawei_api_gateway_response_exports={};module.exports=__toCommonJS(huawei_api_gateway_response_exports);
|
|
2
|
+
//# sourceMappingURL=huawei-api-gateway-response.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"huawei-api-gateway-response.js","
|
|
1
|
+
{"version":3,"file":"huawei-api-gateway-response.js","sources":["../../../src/@types/huawei/huawei-api-gateway-response.ts"],"sourcesContent":["//#region Imports\n\nimport { MultiValueHeaders } from '../headers';\n\n//#endregion\n\n/**\n * The interface that represents the Api Gateway Response of Huawei when integrate with Function Graph of Event Type.\n * See more in {@link https://support.huaweicloud.com/intl/en-us/devg-functiongraph/functiongraph_02_0102.html#functiongraph_02_0102__li5178638110137 | Reference}.\n *\n * @public\n * @breadcrumb Types / Huawei / HuaweiApiGatewayResponse\n */\nexport interface HuaweiApiGatewayResponse {\n /**\n * Tells if the body was encoded as base64\n */\n isBase64Encoded: boolean;\n\n /**\n * The HTTP Status code of this response\n */\n statusCode: number;\n\n /**\n * The headers sent with this response\n */\n headers: MultiValueHeaders;\n\n /**\n * The body value with the content of this response serialized in JSON\n */\n body: string;\n}\n"],"names":[],"mappings":"kiBAAA,oCAAA,CAAA,EAAA,OAAA,QAAA,aAAA,mCAAA"}
|
|
@@ -4,98 +4,98 @@
|
|
|
4
4
|
* @public
|
|
5
5
|
* @breadcrumb Types / Huawei / HuaweiContext
|
|
6
6
|
*/
|
|
7
|
-
export
|
|
7
|
+
export type GetRequestIDSecondsReturn = string;
|
|
8
8
|
/**
|
|
9
9
|
* The return value of {@link HuaweiContext} getRemainingTimeInMilliSeconds
|
|
10
10
|
*
|
|
11
11
|
* @public
|
|
12
12
|
* @breadcrumb Types / Huawei / HuaweiContext
|
|
13
13
|
*/
|
|
14
|
-
export
|
|
14
|
+
export type GetRemainingTimeInMilliSecondsReturn = number;
|
|
15
15
|
/**
|
|
16
16
|
* The return value of {@link HuaweiContext} getAccessKey
|
|
17
17
|
*
|
|
18
18
|
* @public
|
|
19
19
|
* @breadcrumb Types / Huawei / HuaweiContext
|
|
20
20
|
*/
|
|
21
|
-
export
|
|
21
|
+
export type GetAccessKeyReturn = string;
|
|
22
22
|
/**
|
|
23
23
|
* The return value of {@link HuaweiContext} getSecretKey
|
|
24
24
|
*
|
|
25
25
|
* @public
|
|
26
26
|
* @breadcrumb Types / Huawei / HuaweiContext
|
|
27
27
|
*/
|
|
28
|
-
export
|
|
28
|
+
export type GetSecretKeyReturn = string;
|
|
29
29
|
/**
|
|
30
30
|
* The parameters of the method {@link HuaweiContext} getUserData
|
|
31
31
|
*
|
|
32
32
|
* @public
|
|
33
33
|
* @breadcrumb Types / Huawei / HuaweiContext
|
|
34
34
|
*/
|
|
35
|
-
export
|
|
35
|
+
export type GetUserDataKeyParameter = string;
|
|
36
36
|
/**
|
|
37
37
|
* The return value of {@link HuaweiContext} getUserData
|
|
38
38
|
*
|
|
39
39
|
* @public
|
|
40
40
|
* @breadcrumb Types / Huawei / HuaweiContext
|
|
41
41
|
*/
|
|
42
|
-
export
|
|
42
|
+
export type GetUserDataReturn = any;
|
|
43
43
|
/**
|
|
44
44
|
* The return value of {@link HuaweiContext} getFunctionName
|
|
45
45
|
*
|
|
46
46
|
* @public
|
|
47
47
|
* @breadcrumb Types / Huawei / HuaweiContext
|
|
48
48
|
*/
|
|
49
|
-
export
|
|
49
|
+
export type GetFunctionNameReturn = string;
|
|
50
50
|
/**
|
|
51
51
|
* The return value of {@link HuaweiContext} getRunningTimeInSeconds
|
|
52
52
|
*
|
|
53
53
|
* @public
|
|
54
54
|
* @breadcrumb Types / Huawei / HuaweiContext
|
|
55
55
|
*/
|
|
56
|
-
export
|
|
56
|
+
export type GetRunningTimeInSecondsReturn = number;
|
|
57
57
|
/**
|
|
58
58
|
* The return value of {@link HuaweiContext} getVersion
|
|
59
59
|
*
|
|
60
60
|
* @public
|
|
61
61
|
* @breadcrumb Types / Huawei / HuaweiContext
|
|
62
62
|
*/
|
|
63
|
-
export
|
|
63
|
+
export type GetVersionReturn = string;
|
|
64
64
|
/**
|
|
65
65
|
* The return value of {@link HuaweiContext} getMemorySize
|
|
66
66
|
*
|
|
67
67
|
* @public
|
|
68
68
|
* @breadcrumb Types / Huawei / HuaweiContext
|
|
69
69
|
*/
|
|
70
|
-
export
|
|
70
|
+
export type GetMemorySizeReturn = number;
|
|
71
71
|
/**
|
|
72
72
|
* The return value of {@link HuaweiContext} getCPUNumber
|
|
73
73
|
*
|
|
74
74
|
* @public
|
|
75
75
|
* @breadcrumb Types / Huawei / HuaweiContext
|
|
76
76
|
*/
|
|
77
|
-
export
|
|
77
|
+
export type GetCPUNumberReturn = number;
|
|
78
78
|
/**
|
|
79
79
|
* The return value of {@link HuaweiContext} getProjectID
|
|
80
80
|
*
|
|
81
81
|
* @public
|
|
82
82
|
* @breadcrumb Types / Huawei / HuaweiContext
|
|
83
83
|
*/
|
|
84
|
-
export
|
|
84
|
+
export type GetProjectIdReturn = number;
|
|
85
85
|
/**
|
|
86
86
|
* The return value of {@link HuaweiContext} getPackage
|
|
87
87
|
*
|
|
88
88
|
* @public
|
|
89
89
|
* @breadcrumb Types / Huawei / HuaweiContext
|
|
90
90
|
*/
|
|
91
|
-
export
|
|
91
|
+
export type GetPackageReturn = string;
|
|
92
92
|
/**
|
|
93
93
|
* The return value of {@link HuaweiContext} getToken
|
|
94
94
|
*
|
|
95
95
|
* @public
|
|
96
96
|
* @breadcrumb Types / Huawei / HuaweiContext
|
|
97
97
|
*/
|
|
98
|
-
export
|
|
98
|
+
export type GetTokenReturn = string;
|
|
99
99
|
/**
|
|
100
100
|
* The return value of {@link HuaweiContext} getLogger
|
|
101
101
|
*
|
|
@@ -104,7 +104,7 @@ export declare type GetTokenReturn = string;
|
|
|
104
104
|
* @public
|
|
105
105
|
* @breadcrumb Types / Huawei / HuaweiContext
|
|
106
106
|
*/
|
|
107
|
-
export
|
|
107
|
+
export type GetLoggerReturn = {
|
|
108
108
|
info(message: string): void;
|
|
109
109
|
};
|
|
110
110
|
/**
|
|
@@ -185,19 +185,4 @@ export interface HuaweiContext {
|
|
|
185
185
|
*/
|
|
186
186
|
getLogger(): GetLoggerReturn;
|
|
187
187
|
}
|
|
188
|
-
|
|
189
|
-
export declare type __ΩGetRemainingTimeInMilliSecondsReturn = any[];
|
|
190
|
-
export declare type __ΩGetAccessKeyReturn = any[];
|
|
191
|
-
export declare type __ΩGetSecretKeyReturn = any[];
|
|
192
|
-
export declare type __ΩGetUserDataKeyParameter = any[];
|
|
193
|
-
export declare type __ΩGetUserDataReturn = any[];
|
|
194
|
-
export declare type __ΩGetFunctionNameReturn = any[];
|
|
195
|
-
export declare type __ΩGetRunningTimeInSecondsReturn = any[];
|
|
196
|
-
export declare type __ΩGetVersionReturn = any[];
|
|
197
|
-
export declare type __ΩGetMemorySizeReturn = any[];
|
|
198
|
-
export declare type __ΩGetCPUNumberReturn = any[];
|
|
199
|
-
export declare type __ΩGetProjectIdReturn = any[];
|
|
200
|
-
export declare type __ΩGetPackageReturn = any[];
|
|
201
|
-
export declare type __ΩGetTokenReturn = any[];
|
|
202
|
-
export declare type __ΩGetLoggerReturn = any[];
|
|
203
|
-
export declare type __ΩHuaweiContext = any[];
|
|
188
|
+
//# sourceMappingURL=huawei-context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"huawei-context.d.ts","sourceRoot":"","sources":["../../../src/@types/huawei/huawei-context.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,MAAM,yBAAyB,GAAG,MAAM,CAAC;AAE/C;;;;;GAKG;AACH,MAAM,MAAM,oCAAoC,GAAG,MAAM,CAAC;AAE1D;;;;;GAKG;AACH,MAAM,MAAM,kBAAkB,GAAG,MAAM,CAAC;AAExC;;;;;GAKG;AACH,MAAM,MAAM,kBAAkB,GAAG,MAAM,CAAC;AAExC;;;;;GAKG;AACH,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAAC;AAE7C;;;;;GAKG;AACH,MAAM,MAAM,iBAAiB,GAAG,GAAG,CAAC;AAEpC;;;;;GAKG;AACH,MAAM,MAAM,qBAAqB,GAAG,MAAM,CAAC;AAE3C;;;;;GAKG;AACH,MAAM,MAAM,6BAA6B,GAAG,MAAM,CAAC;AAEnD;;;;;GAKG;AACH,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC;AAEtC;;;;;GAKG;AACH,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC;AAEzC;;;;;GAKG;AACH,MAAM,MAAM,kBAAkB,GAAG,MAAM,CAAC;AAExC;;;;;GAKG;AACH,MAAM,MAAM,kBAAkB,GAAG,MAAM,CAAC;AAExC;;;;;GAKG;AACH,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC;AAEtC;;;;;GAKG;AACH,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC;AAEpC;;;;;;;GAOG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,YAAY,IAAI,yBAAyB,CAAC;IAE1C;;OAEG;IACH,8BAA8B,IAAI,oCAAoC,CAAC;IAEvE;;OAEG;IACH,YAAY,IAAI,kBAAkB,CAAC;IAEnC;;OAEG;IACH,YAAY,IAAI,kBAAkB,CAAC;IAEnC;;;;OAIG;IACH,WAAW,CAAC,GAAG,EAAE,uBAAuB,GAAG,iBAAiB,CAAC;IAE7D;;OAEG;IACH,eAAe,IAAI,qBAAqB,CAAC;IAEzC;;OAEG;IACH,uBAAuB,IAAI,6BAA6B,CAAC;IAEzD;;OAEG;IACH,UAAU,IAAI,gBAAgB,CAAC;IAE/B;;OAEG;IACH,aAAa,IAAI,mBAAmB,CAAC;IAErC;;;;OAIG;IACH,YAAY,IAAI,kBAAkB,CAAC;IAEnC;;OAEG;IACH,YAAY,IAAI,kBAAkB,CAAC;IAEnC;;OAEG;IACH,UAAU,IAAI,gBAAgB,CAAC;IAE/B;;OAEG;IACH,QAAQ,IAAI,cAAc,CAAC;IAE3B;;;;;;;;;;;OAWG;IACH,SAAS,IAAI,eAAe,CAAC;CAC9B"}
|
|
@@ -1,36 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
exports.__ΩHuaweiContext = exports.__ΩGetLoggerReturn = exports.__ΩGetTokenReturn = exports.__ΩGetPackageReturn = exports.__ΩGetProjectIdReturn = exports.__ΩGetCPUNumberReturn = exports.__ΩGetMemorySizeReturn = exports.__ΩGetVersionReturn = exports.__ΩGetRunningTimeInSecondsReturn = exports.__ΩGetFunctionNameReturn = exports.__ΩGetUserDataReturn = exports.__ΩGetUserDataKeyParameter = exports.__ΩGetSecretKeyReturn = exports.__ΩGetAccessKeyReturn = exports.__ΩGetRemainingTimeInMilliSecondsReturn = exports.__ΩGetRequestIDSecondsReturn = void 0;
|
|
4
|
-
const __ΩGetRequestIDSecondsReturn = ['&'];
|
|
5
|
-
exports.__ΩGetRequestIDSecondsReturn = __ΩGetRequestIDSecondsReturn;
|
|
6
|
-
const __ΩGetRemainingTimeInMilliSecondsReturn = ['\''];
|
|
7
|
-
exports.__ΩGetRemainingTimeInMilliSecondsReturn = __ΩGetRemainingTimeInMilliSecondsReturn;
|
|
8
|
-
const __ΩGetAccessKeyReturn = ['&'];
|
|
9
|
-
exports.__ΩGetAccessKeyReturn = __ΩGetAccessKeyReturn;
|
|
10
|
-
const __ΩGetSecretKeyReturn = ['&'];
|
|
11
|
-
exports.__ΩGetSecretKeyReturn = __ΩGetSecretKeyReturn;
|
|
12
|
-
const __ΩGetUserDataKeyParameter = ['&'];
|
|
13
|
-
exports.__ΩGetUserDataKeyParameter = __ΩGetUserDataKeyParameter;
|
|
14
|
-
const __ΩGetUserDataReturn = ['"'];
|
|
15
|
-
exports.__ΩGetUserDataReturn = __ΩGetUserDataReturn;
|
|
16
|
-
const __ΩGetFunctionNameReturn = ['&'];
|
|
17
|
-
exports.__ΩGetFunctionNameReturn = __ΩGetFunctionNameReturn;
|
|
18
|
-
const __ΩGetRunningTimeInSecondsReturn = ['\''];
|
|
19
|
-
exports.__ΩGetRunningTimeInSecondsReturn = __ΩGetRunningTimeInSecondsReturn;
|
|
20
|
-
const __ΩGetVersionReturn = ['&'];
|
|
21
|
-
exports.__ΩGetVersionReturn = __ΩGetVersionReturn;
|
|
22
|
-
const __ΩGetMemorySizeReturn = ['\''];
|
|
23
|
-
exports.__ΩGetMemorySizeReturn = __ΩGetMemorySizeReturn;
|
|
24
|
-
const __ΩGetCPUNumberReturn = ['\''];
|
|
25
|
-
exports.__ΩGetCPUNumberReturn = __ΩGetCPUNumberReturn;
|
|
26
|
-
const __ΩGetProjectIdReturn = ['\''];
|
|
27
|
-
exports.__ΩGetProjectIdReturn = __ΩGetProjectIdReturn;
|
|
28
|
-
const __ΩGetPackageReturn = ['&'];
|
|
29
|
-
exports.__ΩGetPackageReturn = __ΩGetPackageReturn;
|
|
30
|
-
const __ΩGetTokenReturn = ['&'];
|
|
31
|
-
exports.__ΩGetTokenReturn = __ΩGetTokenReturn;
|
|
32
|
-
const __ΩGetLoggerReturn = ['message', 'info', 'PP&2!$1"M'];
|
|
33
|
-
exports.__ΩGetLoggerReturn = __ΩGetLoggerReturn;
|
|
34
|
-
const __ΩHuaweiContext = [() => __ΩGetRequestIDSecondsReturn, 'getRequestID', () => __ΩGetRemainingTimeInMilliSecondsReturn, 'getRemainingTimeInMilliSeconds', () => __ΩGetAccessKeyReturn, 'getAccessKey', () => __ΩGetSecretKeyReturn, 'getSecretKey', () => __ΩGetUserDataKeyParameter, 'key', () => __ΩGetUserDataReturn, 'getUserData', () => __ΩGetFunctionNameReturn, 'getFunctionName', () => __ΩGetRunningTimeInSecondsReturn, 'getRunningTimeInSeconds', () => __ΩGetVersionReturn, 'getVersion', () => __ΩGetMemorySizeReturn, 'getMemorySize', () => __ΩGetCPUNumberReturn, 'getCPUNumber', () => __ΩGetProjectIdReturn, 'getProjectID', () => __ΩGetPackageReturn, 'getPackage', () => __ΩGetTokenReturn, 'getToken', () => __ΩGetLoggerReturn, 'getLogger', 'PPn!1"Pn#1$Pn%1&Pn\'1(Pn)2*n+1,Pn-1.Pn/10Pn112Pn314Pn516Pn718Pn91:Pn;1<Pn=1>M'];
|
|
35
|
-
exports.__ΩHuaweiContext = __ΩHuaweiContext;
|
|
36
|
-
//# sourceMappingURL=huawei-context.js.map
|
|
1
|
+
"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),huawei_context_exports={};module.exports=__toCommonJS(huawei_context_exports);
|
|
2
|
+
//# sourceMappingURL=huawei-context.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"huawei-context.js","
|
|
1
|
+
{"version":3,"file":"huawei-context.js","sources":["../../../src/@types/huawei/huawei-context.ts"],"sourcesContent":["/**\n * The return value of {@link HuaweiContext} getRequestID\n *\n * @public\n * @breadcrumb Types / Huawei / HuaweiContext\n */\nexport type GetRequestIDSecondsReturn = string;\n\n/**\n * The return value of {@link HuaweiContext} getRemainingTimeInMilliSeconds\n *\n * @public\n * @breadcrumb Types / Huawei / HuaweiContext\n */\nexport type GetRemainingTimeInMilliSecondsReturn = number;\n\n/**\n * The return value of {@link HuaweiContext} getAccessKey\n *\n * @public\n * @breadcrumb Types / Huawei / HuaweiContext\n */\nexport type GetAccessKeyReturn = string;\n\n/**\n * The return value of {@link HuaweiContext} getSecretKey\n *\n * @public\n * @breadcrumb Types / Huawei / HuaweiContext\n */\nexport type GetSecretKeyReturn = string;\n\n/**\n * The parameters of the method {@link HuaweiContext} getUserData\n *\n * @public\n * @breadcrumb Types / Huawei / HuaweiContext\n */\nexport type GetUserDataKeyParameter = string;\n\n/**\n * The return value of {@link HuaweiContext} getUserData\n *\n * @public\n * @breadcrumb Types / Huawei / HuaweiContext\n */\nexport type GetUserDataReturn = any;\n\n/**\n * The return value of {@link HuaweiContext} getFunctionName\n *\n * @public\n * @breadcrumb Types / Huawei / HuaweiContext\n */\nexport type GetFunctionNameReturn = string;\n\n/**\n * The return value of {@link HuaweiContext} getRunningTimeInSeconds\n *\n * @public\n * @breadcrumb Types / Huawei / HuaweiContext\n */\nexport type GetRunningTimeInSecondsReturn = number;\n\n/**\n * The return value of {@link HuaweiContext} getVersion\n *\n * @public\n * @breadcrumb Types / Huawei / HuaweiContext\n */\nexport type GetVersionReturn = string;\n\n/**\n * The return value of {@link HuaweiContext} getMemorySize\n *\n * @public\n * @breadcrumb Types / Huawei / HuaweiContext\n */\nexport type GetMemorySizeReturn = number;\n\n/**\n * The return value of {@link HuaweiContext} getCPUNumber\n *\n * @public\n * @breadcrumb Types / Huawei / HuaweiContext\n */\nexport type GetCPUNumberReturn = number;\n\n/**\n * The return value of {@link HuaweiContext} getProjectID\n *\n * @public\n * @breadcrumb Types / Huawei / HuaweiContext\n */\nexport type GetProjectIdReturn = number;\n\n/**\n * The return value of {@link HuaweiContext} getPackage\n *\n * @public\n * @breadcrumb Types / Huawei / HuaweiContext\n */\nexport type GetPackageReturn = string;\n\n/**\n * The return value of {@link HuaweiContext} getToken\n *\n * @public\n * @breadcrumb Types / Huawei / HuaweiContext\n */\nexport type GetTokenReturn = string;\n\n/**\n * The return value of {@link HuaweiContext} getLogger\n *\n * Is the instance of logger that can be used to send logs to\n *\n * @public\n * @breadcrumb Types / Huawei / HuaweiContext\n */\nexport type GetLoggerReturn = {\n info(message: string): void;\n};\n\n/**\n * The interface that represents methods sent by huawei to get information about the function graph.\n * See more in {@link https://support.huaweicloud.com/intl/en-us/devg-functiongraph/functiongraph_02_0410.html#section1 | Context Methods}\n *\n * @public\n * @breadcrumb Types / Huawei / HuaweiContext\n */\nexport interface HuaweiContext {\n /**\n * Obtains a request ID.\n */\n getRequestID(): GetRequestIDSecondsReturn;\n\n /**\n * Obtains the remaining running time of a function.\n */\n getRemainingTimeInMilliSeconds(): GetRemainingTimeInMilliSecondsReturn;\n\n /**\n * Obtains the AK (valid for 24 hours) of an agency. If you use this method, you need to configure an agency for the function.\n */\n getAccessKey(): GetAccessKeyReturn;\n\n /**\n * Obtains the SK (valid for 24 hours) of an agency. If you use this method, you need to configure an agency for the function.\n */\n getSecretKey(): GetSecretKeyReturn;\n\n /**\n * Uses keys to obtain the values passed by environment variables.\n *\n * @param key - The key to get environment variables values\n */\n getUserData(key: GetUserDataKeyParameter): GetUserDataReturn;\n\n /**\n * Obtains the name of a function.\n */\n getFunctionName(): GetFunctionNameReturn;\n\n /**\n * Obtains the timeout of a function.\n */\n getRunningTimeInSeconds(): GetRunningTimeInSecondsReturn;\n\n /**\n * Obtains the version of a function.\n */\n getVersion(): GetVersionReturn;\n\n /**\n * Obtains the allocated memory.\n */\n getMemorySize(): GetMemorySizeReturn;\n\n /**\n * Number of CPU millicores used by the function (1 core = 1000 millicores).\n *\n * The value of this field is proportional to that of MemorySize. By default, 100 CPU millicores are required for 128 MB memory. The number of CPU millicores is calculated as follows: Memory/128 x 100 + 200 (basic CPU millicores).\n */\n getCPUNumber(): GetCPUNumberReturn;\n\n /**\n * Obtains a project ID.\n */\n getProjectID(): GetProjectIdReturn;\n\n /**\n * Obtains a function group, that is, an app.\n */\n getPackage(): GetPackageReturn;\n\n /**\n * Obtains the token (valid for 24 hours) of an agency. If you use this method, you need to configure an agency for the function.\n */\n getToken(): GetTokenReturn;\n\n /**\n * Obtains the logger method provided by the context and returns a log output class. Logs are output in the format of Time-Request ID-Content by using the info method.\n *\n * For example, use the info method to output logs:\n *\n * @example\n * ```typescript\n * logg = context.getLogger()\n *\n * logg.info(\"hello\")\n * ```\n */\n getLogger(): GetLoggerReturn;\n}\n"],"names":[],"mappings":"kiBAAA,uBAAA,CAAA,EAAA,OAAA,QAAA,aAAA,sBAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/@types/huawei/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,+BAA+B,CAAC"}
|
|
@@ -1,20 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./huawei-context"), exports);
|
|
18
|
-
__exportStar(require("./huawei-api-gateway-event"), exports);
|
|
19
|
-
__exportStar(require("./huawei-api-gateway-response"), exports);
|
|
20
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__reExport=(target,mod,secondTarget)=>(__copyProps(target,mod,"default"),secondTarget&&__copyProps(secondTarget,mod,"default")),__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),huawei_exports={};module.exports=__toCommonJS(huawei_exports);__reExport(huawei_exports,require("./huawei-context"),module.exports);__reExport(huawei_exports,require("./huawei-api-gateway-event"),module.exports);__reExport(huawei_exports,require("./huawei-api-gateway-response"),module.exports);
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/@types/huawei/index.ts"],"sourcesContent":["export * from './huawei-context';\nexport * from './huawei-api-gateway-event';\nexport * from './huawei-api-gateway-response';\n"],"names":[],"mappings":"kqBAAA,eAAA,CAAA,EAAA,OAAA,QAAA,aAAA,cAAA,EAAA,WAAA,eAAc,QAAd,kBAAA,EAAA,OAAA,OAAA,EACA,WAAA,eAAc,QADd,4BAAA,EAAA,OAAA,OAAA,EAEA,WAAA,eAAc,QAFd,+BAAA,EAAA,OAAA,OAAA"}
|
package/lib/@types/index.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/@types/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC"}
|