@webiny/handler-aws 0.0.0-mt-3 → 0.0.0-unstable.06b2ede40f
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/createHandler.d.ts +2 -0
- package/createHandler.js +29 -0
- package/createHandler.js.map +1 -0
- package/dynamodb/index.d.ts +8 -0
- package/dynamodb/index.js +79 -0
- package/dynamodb/index.js.map +1 -0
- package/dynamodb/plugins/DynamoDBEventHandler.d.ts +20 -0
- package/dynamodb/plugins/DynamoDBEventHandler.js +21 -0
- package/dynamodb/plugins/DynamoDBEventHandler.js.map +1 -0
- package/dynamodb/register.d.ts +1 -0
- package/dynamodb/register.js +28 -0
- package/dynamodb/register.js.map +1 -0
- package/eventBridge/index.d.ts +8 -0
- package/eventBridge/index.js +79 -0
- package/eventBridge/index.js.map +1 -0
- package/eventBridge/plugins/EventBridgeEventHandler.d.ts +20 -0
- package/eventBridge/plugins/EventBridgeEventHandler.js +21 -0
- package/eventBridge/plugins/EventBridgeEventHandler.js.map +1 -0
- package/eventBridge/register.d.ts +4 -0
- package/eventBridge/register.js +21 -0
- package/eventBridge/register.js.map +1 -0
- package/execute.d.ts +7 -0
- package/execute.js +73 -0
- package/execute.js.map +1 -0
- package/gateway/index.d.ts +10 -0
- package/gateway/index.js +90 -0
- package/gateway/index.js.map +1 -0
- package/gateway/register.d.ts +1 -0
- package/gateway/register.js +21 -0
- package/gateway/register.js.map +1 -0
- package/index.d.ts +33 -17
- package/index.js +367 -33
- package/index.js.map +1 -0
- package/package.json +16 -24
- package/plugins/handlerClient.d.ts +2 -3
- package/plugins/handlerClient.js +46 -33
- package/plugins/handlerClient.js.map +1 -0
- package/plugins/index.d.ts +2 -0
- package/plugins/index.js +13 -0
- package/plugins/index.js.map +1 -0
- package/raw/index.d.ts +14 -0
- package/raw/index.js +89 -0
- package/raw/index.js.map +1 -0
- package/raw/plugins/RawEventHandler.d.ts +24 -0
- package/raw/plugins/RawEventHandler.js +34 -0
- package/raw/plugins/RawEventHandler.js.map +1 -0
- package/registry.d.ts +17 -0
- package/registry.js +44 -0
- package/registry.js.map +1 -0
- package/s3/index.d.ts +8 -0
- package/s3/index.js +79 -0
- package/s3/index.js.map +1 -0
- package/s3/plugins/S3EventHandler.d.ts +20 -0
- package/s3/plugins/S3EventHandler.js +21 -0
- package/s3/plugins/S3EventHandler.js.map +1 -0
- package/s3/register.d.ts +4 -0
- package/s3/register.js +25 -0
- package/s3/register.js.map +1 -0
- package/sns/index.d.ts +8 -0
- package/sns/index.js +79 -0
- package/sns/index.js.map +1 -0
- package/sns/plugins/SNSEventHandler.d.ts +20 -0
- package/sns/plugins/SNSEventHandler.js +21 -0
- package/sns/plugins/SNSEventHandler.js.map +1 -0
- package/sns/register.d.ts +1 -0
- package/sns/register.js +25 -0
- package/sns/register.js.map +1 -0
- package/sourceHandler.d.ts +2 -0
- package/sourceHandler.js +12 -0
- package/sourceHandler.js.map +1 -0
- package/sqs/index.d.ts +8 -0
- package/sqs/index.js +82 -0
- package/sqs/index.js.map +1 -0
- package/sqs/plugins/SQSEventHandler.d.ts +20 -0
- package/sqs/plugins/SQSEventHandler.js +21 -0
- package/sqs/plugins/SQSEventHandler.js.map +1 -0
- package/sqs/register.d.ts +1 -0
- package/sqs/register.js +28 -0
- package/sqs/register.js.map +1 -0
- package/types.d.ts +41 -0
- package/types.js +37 -0
- package/types.js.map +1 -0
- package/utils/composedHandler.d.ts +6 -0
- package/utils/composedHandler.js +24 -0
- package/utils/composedHandler.js.map +1 -0
- package/utils/index.d.ts +2 -0
- package/utils/index.js +29 -0
- package/utils/index.js.map +1 -0
- package/utils/timer/CustomTimer.d.ts +5 -0
- package/utils/timer/CustomTimer.js +19 -0
- package/utils/timer/CustomTimer.js.map +1 -0
- package/utils/timer/Timer.d.ts +10 -0
- package/utils/timer/Timer.js +24 -0
- package/utils/timer/Timer.js.map +1 -0
- package/utils/timer/abstractions/ITimer.d.ts +10 -0
- package/utils/timer/abstractions/ITimer.js +7 -0
- package/utils/timer/abstractions/ITimer.js.map +1 -0
- package/utils/timer/factory.d.ts +4 -0
- package/utils/timer/factory.js +20 -0
- package/utils/timer/factory.js.map +1 -0
- package/utils/timer/index.d.ts +4 -0
- package/utils/timer/index.js +51 -0
- package/utils/timer/index.js.map +1 -0
- package/plugins/handlerArgs.d.ts +0 -7
- package/plugins/handlerArgs.js +0 -16
- package/plugins/handlerHttp.d.ts +0 -5
- package/plugins/handlerHttp.js +0 -65
package/plugins/handlerHttp.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { HttpContext } from "@webiny/handler-http/types";
|
|
2
|
-
import { ContextPlugin } from "@webiny/handler/types";
|
|
3
|
-
import { ArgsContext } from "@webiny/handler-args/types";
|
|
4
|
-
declare const _default: ContextPlugin<HttpContext & ArgsContext<Record<string, any>>, import("@webiny/handler/types").Context<Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>>, import("@webiny/handler/types").Context<Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>>, import("@webiny/handler/types").Context<Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>>, import("@webiny/handler/types").Context<Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>>, import("@webiny/handler/types").Context<Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>>, import("@webiny/handler/types").Context<Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>>, import("@webiny/handler/types").Context<Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>>, import("@webiny/handler/types").Context<Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>>, import("@webiny/handler/types").Context<Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>>>;
|
|
5
|
-
export default _default;
|
package/plugins/handlerHttp.js
DELETED
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
|
|
8
|
-
const lowercaseKeys = obj => {
|
|
9
|
-
return Object.keys(obj).reduce((acc, key) => {
|
|
10
|
-
acc[key.toLowerCase()] = obj[key];
|
|
11
|
-
return acc;
|
|
12
|
-
}, {});
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
var _default = {
|
|
16
|
-
type: "context",
|
|
17
|
-
|
|
18
|
-
apply(context) {
|
|
19
|
-
const {
|
|
20
|
-
invocationArgs
|
|
21
|
-
} = context;
|
|
22
|
-
|
|
23
|
-
if (!invocationArgs || !invocationArgs.httpMethod) {
|
|
24
|
-
return;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
const {
|
|
28
|
-
isBase64Encoded
|
|
29
|
-
} = invocationArgs;
|
|
30
|
-
const request = {
|
|
31
|
-
method: invocationArgs.httpMethod,
|
|
32
|
-
body: invocationArgs.body,
|
|
33
|
-
headers: lowercaseKeys(invocationArgs.headers || {}),
|
|
34
|
-
cookies: invocationArgs.cookies,
|
|
35
|
-
path: {
|
|
36
|
-
base: invocationArgs.rawPath,
|
|
37
|
-
parameters: invocationArgs.pathParameters,
|
|
38
|
-
query: invocationArgs.queryStringParameters
|
|
39
|
-
}
|
|
40
|
-
};
|
|
41
|
-
context.http = {
|
|
42
|
-
request,
|
|
43
|
-
|
|
44
|
-
response({
|
|
45
|
-
statusCode = 200,
|
|
46
|
-
body = "",
|
|
47
|
-
headers = {}
|
|
48
|
-
}) {
|
|
49
|
-
return {
|
|
50
|
-
statusCode,
|
|
51
|
-
body: isBase64Encoded ? Buffer.from(body).toString("base64") : body,
|
|
52
|
-
headers,
|
|
53
|
-
isBase64Encoded
|
|
54
|
-
};
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
if (isBase64Encoded) {
|
|
60
|
-
context.http.request.body = Buffer.from(context.http.request.body, "base64").toString("utf-8");
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
};
|
|
65
|
-
exports.default = _default;
|