@xube/kit-aws-hooks-infrastructure 0.0.25 → 0.0.27
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.
|
@@ -8,6 +8,7 @@ const aws_dynamodb_1 = require("aws-cdk-lib/aws-dynamodb");
|
|
|
8
8
|
const aws_lambda_1 = require("aws-cdk-lib/aws-lambda");
|
|
9
9
|
const aws_lambda_nodejs_1 = require("aws-cdk-lib/aws-lambda-nodejs");
|
|
10
10
|
const constructs_1 = require("constructs");
|
|
11
|
+
const path_1 = require("path");
|
|
11
12
|
exports.ADD_WEBHOOK_ENDPOINTS_FUNCTION_NAME = "add-webhook-endpoints";
|
|
12
13
|
exports.REMOVE_WEBHOOK_ENDPOINTS_FUNCTION_NAME = "remove-webhook-endpoints";
|
|
13
14
|
exports.GET_WEBHOOK_ENDPOINTS_FUNCTION_NAME = "get-webhook-endpoints";
|
|
@@ -33,21 +34,21 @@ class WebhookManagement extends constructs_1.Construct {
|
|
|
33
34
|
},
|
|
34
35
|
});
|
|
35
36
|
this.addWebhookEndpoints = new aws_lambda_nodejs_1.NodejsFunction(this, id + "-add-hooks-function", {
|
|
36
|
-
entry: __dirname
|
|
37
|
+
entry: (0, path_1.join)(__dirname, "functions", exports.ADD_WEBHOOK_ENDPOINTS_FUNCTION_NAME + ".ts"),
|
|
37
38
|
functionName: (props.name ?? "webhook") + "-add-hooks",
|
|
38
39
|
environment: {
|
|
39
40
|
WEBHOOK_TABLE_NAME_ENV_VAR: this.table.tableName,
|
|
40
41
|
},
|
|
41
42
|
});
|
|
42
43
|
this.removeWebhookEndpoint = new aws_lambda_nodejs_1.NodejsFunction(this, id + "-remove-hooks-function", {
|
|
43
|
-
entry: __dirname
|
|
44
|
+
entry: (0, path_1.join)(__dirname, "functions", exports.REMOVE_WEBHOOK_ENDPOINTS_FUNCTION_NAME + ".ts"),
|
|
44
45
|
functionName: (props.name ?? "webhook") + "-remove-hooks",
|
|
45
46
|
environment: {
|
|
46
47
|
WEBHOOK_TABLE_NAME_ENV_VAR: this.table.tableName,
|
|
47
48
|
},
|
|
48
49
|
});
|
|
49
50
|
this.getWebhookEndpoints = new aws_lambda_nodejs_1.NodejsFunction(this, id + "-get-hooks-function", {
|
|
50
|
-
entry: __dirname
|
|
51
|
+
entry: (0, path_1.join)(__dirname, "functions", exports.GET_WEBHOOK_ENDPOINTS_FUNCTION_NAME + ".ts"),
|
|
51
52
|
functionName: (props.name ?? "webhook") + "-get-hook",
|
|
52
53
|
environment: {
|
|
53
54
|
WEBHOOK_TABLE_NAME_ENV_VAR: this.table.tableName,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xube/kit-aws-hooks-infrastructure",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.27",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -17,14 +17,14 @@
|
|
|
17
17
|
},
|
|
18
18
|
"homepage": "https://github.com/XubeLtd/dev-kit#readme",
|
|
19
19
|
"devDependencies": {
|
|
20
|
-
"@xube/kit-build": "^0.0.
|
|
20
|
+
"@xube/kit-build": "^0.0.27"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@xube/kit-aws": "^0.0.
|
|
24
|
-
"@xube/kit-aws-hooks": "^0.0.
|
|
25
|
-
"@xube/kit-aws-infrastructure": "^0.0.
|
|
26
|
-
"@xube/kit-constants": "^0.0.
|
|
27
|
-
"@xube/kit-log": "^0.0.
|
|
23
|
+
"@xube/kit-aws": "^0.0.27",
|
|
24
|
+
"@xube/kit-aws-hooks": "^0.0.27",
|
|
25
|
+
"@xube/kit-aws-infrastructure": "^0.0.27",
|
|
26
|
+
"@xube/kit-constants": "^0.0.27",
|
|
27
|
+
"@xube/kit-log": "^0.0.27",
|
|
28
28
|
"aws-cdk-lib": "^2.100.0",
|
|
29
29
|
"aws-lambda": "^1.0.7",
|
|
30
30
|
"constructs": "^10.3.0"
|
|
@@ -13,6 +13,7 @@ import { AttributeType, ITable, Table } from "aws-cdk-lib/aws-dynamodb";
|
|
|
13
13
|
import { HttpMethod } from "aws-cdk-lib/aws-lambda";
|
|
14
14
|
import { NodejsFunction } from "aws-cdk-lib/aws-lambda-nodejs";
|
|
15
15
|
import { Construct } from "constructs";
|
|
16
|
+
import { join } from "path";
|
|
16
17
|
|
|
17
18
|
export const ADD_WEBHOOK_ENDPOINTS_FUNCTION_NAME = "add-webhook-endpoints";
|
|
18
19
|
export const REMOVE_WEBHOOK_ENDPOINTS_FUNCTION_NAME =
|
|
@@ -59,7 +60,11 @@ export class WebhookManagement extends Construct {
|
|
|
59
60
|
this,
|
|
60
61
|
id + "-add-hooks-function",
|
|
61
62
|
{
|
|
62
|
-
entry:
|
|
63
|
+
entry: join(
|
|
64
|
+
__dirname,
|
|
65
|
+
"functions",
|
|
66
|
+
ADD_WEBHOOK_ENDPOINTS_FUNCTION_NAME + ".ts"
|
|
67
|
+
),
|
|
63
68
|
functionName: (props.name ?? "webhook") + "-add-hooks",
|
|
64
69
|
environment: {
|
|
65
70
|
WEBHOOK_TABLE_NAME_ENV_VAR: this.table.tableName,
|
|
@@ -70,8 +75,11 @@ export class WebhookManagement extends Construct {
|
|
|
70
75
|
this,
|
|
71
76
|
id + "-remove-hooks-function",
|
|
72
77
|
{
|
|
73
|
-
entry:
|
|
74
|
-
__dirname
|
|
78
|
+
entry: join(
|
|
79
|
+
__dirname,
|
|
80
|
+
"functions",
|
|
81
|
+
REMOVE_WEBHOOK_ENDPOINTS_FUNCTION_NAME + ".ts"
|
|
82
|
+
),
|
|
75
83
|
functionName: (props.name ?? "webhook") + "-remove-hooks",
|
|
76
84
|
environment: {
|
|
77
85
|
WEBHOOK_TABLE_NAME_ENV_VAR: this.table.tableName,
|
|
@@ -82,7 +90,11 @@ export class WebhookManagement extends Construct {
|
|
|
82
90
|
this,
|
|
83
91
|
id + "-get-hooks-function",
|
|
84
92
|
{
|
|
85
|
-
entry:
|
|
93
|
+
entry: join(
|
|
94
|
+
__dirname,
|
|
95
|
+
"functions",
|
|
96
|
+
GET_WEBHOOK_ENDPOINTS_FUNCTION_NAME + ".ts"
|
|
97
|
+
),
|
|
86
98
|
functionName: (props.name ?? "webhook") + "-get-hook",
|
|
87
99
|
environment: {
|
|
88
100
|
WEBHOOK_TABLE_NAME_ENV_VAR: this.table.tableName,
|