@xube/kit-aws-hooks-infrastructure 0.0.35 → 0.0.37

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.
@@ -4,7 +4,7 @@ exports.handler = exports.webhookTableName = void 0;
4
4
  const kit_aws_hooks_1 = require("@xube/kit-aws-hooks");
5
5
  const kit_constants_1 = require("@xube/kit-constants");
6
6
  const kit_log_1 = require("@xube/kit-log");
7
- exports.webhookTableName = process.env.WEBHOOK_TABLE_NAME_ENV_VAR || "";
7
+ exports.webhookTableName = process.env[kit_aws_hooks_1.WEBHOOK_TABLE_NAME_ENV_VAR] ?? "";
8
8
  const handler = async (event) => {
9
9
  if (!exports.webhookTableName) {
10
10
  return {
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.handler = exports.invertedIndexName = exports.tableName = void 0;
4
4
  const kit_aws_1 = require("@xube/kit-aws");
5
5
  const kit_aws_hooks_1 = require("@xube/kit-aws-hooks");
6
- exports.tableName = process.env.WEBHOOK_TABLE_NAME || "";
7
- exports.invertedIndexName = process.env.WEBHOOK_TABLE_INVERTED_INDEX_NAME || "";
6
+ exports.tableName = process.env[kit_aws_hooks_1.WEBHOOK_TABLE_NAME_ENV_VAR] || "";
7
+ exports.invertedIndexName = process.env[kit_aws_hooks_1.WEBHOOK_TABLE_INVERTED_INDEX_NAME_ENV_VAR] ?? "";
8
8
  const handler = async (event, context, callback) => {
9
9
  if (!exports.tableName) {
10
10
  console.log("No table name found");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xube/kit-aws-hooks-infrastructure",
3
- "version": "0.0.35",
3
+ "version": "0.0.37",
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.35"
20
+ "@xube/kit-build": "^0.0.37"
21
21
  },
22
22
  "dependencies": {
23
- "@xube/kit-aws": "^0.0.35",
24
- "@xube/kit-aws-hooks": "^0.0.35",
25
- "@xube/kit-aws-infrastructure": "^0.0.35",
26
- "@xube/kit-constants": "^0.0.35",
27
- "@xube/kit-log": "^0.0.35",
23
+ "@xube/kit-aws": "^0.0.37",
24
+ "@xube/kit-aws-hooks": "^0.0.37",
25
+ "@xube/kit-aws-infrastructure": "^0.0.37",
26
+ "@xube/kit-constants": "^0.0.37",
27
+ "@xube/kit-log": "^0.0.37",
28
28
  "aws-cdk-lib": "^2.100.0",
29
29
  "aws-lambda": "^1.0.7",
30
30
  "constructs": "^10.3.0"
@@ -1,4 +1,5 @@
1
1
  import {
2
+ WEBHOOK_TABLE_NAME_ENV_VAR,
2
3
  createWebhookForAccount,
3
4
  isCreateWebhookForAccountRequest,
4
5
  } from "@xube/kit-aws-hooks";
@@ -9,7 +10,7 @@ import {
9
10
  APIGatewayProxyWithCognitoAuthorizerEvent,
10
11
  } from "aws-lambda";
11
12
 
12
- export const webhookTableName = process.env.WEBHOOK_TABLE_NAME_ENV_VAR || "";
13
+ export const webhookTableName = process.env[WEBHOOK_TABLE_NAME_ENV_VAR] ?? "";
13
14
 
14
15
  export const handler = async (
15
16
  event: APIGatewayProxyWithCognitoAuthorizerEvent
@@ -1,12 +1,16 @@
1
1
  import { isTableItem, unmarshallItem } from "@xube/kit-aws";
2
- import { sendDataToEndpoints } from "@xube/kit-aws-hooks";
2
+ import {
3
+ WEBHOOK_TABLE_INVERTED_INDEX_NAME_ENV_VAR,
4
+ WEBHOOK_TABLE_NAME_ENV_VAR,
5
+ sendDataToEndpoints,
6
+ } from "@xube/kit-aws-hooks";
3
7
  import { Callback, Context, DynamoDBStreamEvent } from "aws-lambda";
4
8
  import { TableItem } from "@xube/kit-aws";
5
9
  import { XubeResponse } from "@xube/kit-request";
6
10
 
7
- export const tableName = process.env.WEBHOOK_TABLE_NAME || "";
11
+ export const tableName = process.env[WEBHOOK_TABLE_NAME_ENV_VAR] || "";
8
12
  export const invertedIndexName =
9
- process.env.WEBHOOK_TABLE_INVERTED_INDEX_NAME || "";
13
+ process.env[WEBHOOK_TABLE_INVERTED_INDEX_NAME_ENV_VAR] ?? "";
10
14
 
11
15
  export const handler = async (
12
16
  event: DynamoDBStreamEvent,