@xube/kit-aws-hooks 0.0.47 → 0.0.49

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/dist/generate.js CHANGED
@@ -17,7 +17,7 @@ const generateWebhookItems = (request) => {
17
17
  const time = new Date().getTime();
18
18
  if (!webhookItems[aggregateKey]) {
19
19
  webhookItems[aggregateKey] = {
20
- s: time / 1000,
20
+ s: Math.floor(time / 1000),
21
21
  us: time % 1000,
22
22
  type: constants_1.WEBHOOK_TYPE,
23
23
  account: request.account,
package/dist/send.js CHANGED
@@ -33,6 +33,8 @@ const sendDataToEndpoints = async (webhookTableName, indexName, items, log = kit
33
33
  }
34
34
  log.info(`Found webhook endpoint ${JSON.stringify(invertedWebhookKey)} for id: ${item.id}`);
35
35
  const webhookEndpoints = getWebhookEndpointsResponse.data;
36
+ log.info(`Found ${webhookEndpoints.length} webhook endpoints.`);
37
+ log.info(`Webhook endpoints: ${JSON.stringify(webhookEndpoints, null, 2)}`);
36
38
  for (const webhookEndpoint of webhookEndpoints) {
37
39
  if (!(0, webhook_1.isWebhookEndpoint)(webhookEndpoint)) {
38
40
  console.log(`Webhook endpoint ${webhookEndpoint.id} is not a valid webhook endpoint`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xube/kit-aws-hooks",
3
- "version": "0.0.47",
3
+ "version": "0.0.49",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -17,15 +17,15 @@
17
17
  },
18
18
  "homepage": "https://github.com/XubeLtd/dev-kit#readme",
19
19
  "devDependencies": {
20
- "@xube/kit-build": "^0.0.47"
20
+ "@xube/kit-build": "^0.0.49"
21
21
  },
22
22
  "dependencies": {
23
- "@xube/kit-aws": "^0.0.47",
24
- "@xube/kit-aws-schema": "^0.0.47",
25
- "@xube/kit-data-schema": "^0.0.47",
26
- "@xube/kit-log": "^0.0.47",
27
- "@xube/kit-request": "^0.0.47",
28
- "@xube/kit-schema": "^0.0.47",
23
+ "@xube/kit-aws": "^0.0.49",
24
+ "@xube/kit-aws-schema": "^0.0.49",
25
+ "@xube/kit-data-schema": "^0.0.49",
26
+ "@xube/kit-log": "^0.0.49",
27
+ "@xube/kit-request": "^0.0.49",
28
+ "@xube/kit-schema": "^0.0.49",
29
29
  "zod": "^3.22.4"
30
30
  }
31
31
  }
package/src/generate.ts CHANGED
@@ -23,7 +23,7 @@ export const generateWebhookItems = (
23
23
 
24
24
  if (!webhookItems[aggregateKey]) {
25
25
  webhookItems[aggregateKey] = {
26
- s: time / 1000,
26
+ s: Math.floor(time / 1000),
27
27
  us: time % 1000,
28
28
  type: WEBHOOK_TYPE,
29
29
  account: request.account,
package/src/send.ts CHANGED
@@ -64,6 +64,9 @@ export const sendDataToEndpoints = async (
64
64
 
65
65
  const webhookEndpoints: TableItem[] = getWebhookEndpointsResponse.data;
66
66
 
67
+ log.info(`Found ${webhookEndpoints.length} webhook endpoints.`);
68
+ log.info(`Webhook endpoints: ${JSON.stringify(webhookEndpoints, null, 2)}`);
69
+
67
70
  for (const webhookEndpoint of webhookEndpoints) {
68
71
  if (!isWebhookEndpoint(webhookEndpoint)) {
69
72
  console.log(