@socket.tech/dl-common 1.0.3-test.14 → 1.0.3-test.16
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.
|
@@ -87,6 +87,6 @@ function createSwitchboardId(switchboard) {
|
|
|
87
87
|
if (switchboard.srcSwitchboard &&
|
|
88
88
|
switchboard.srcChainSlug &&
|
|
89
89
|
switchboard.dstChainSlug)
|
|
90
|
-
switchboard.switchboardId = `${switchboard.srcChainSlug}-${switchboard.dstChainSlug}-${switchboard.
|
|
90
|
+
switchboard.switchboardId = `${switchboard.srcChainSlug}-${switchboard.dstChainSlug}-${switchboard.srcSwitchboard.toLowerCase()}`;
|
|
91
91
|
return switchboard;
|
|
92
92
|
}
|
|
@@ -10,6 +10,9 @@ exports.initEventBridgeClient = initEventBridgeClient;
|
|
|
10
10
|
const sendEvents = async (events) => {
|
|
11
11
|
// async/await.
|
|
12
12
|
try {
|
|
13
|
+
if (!client) {
|
|
14
|
+
throw new Error("EventBridge client is not initialized. Call initEventBridgeClient first.");
|
|
15
|
+
}
|
|
13
16
|
let entries = events.map((event) => {
|
|
14
17
|
let { eventBus, source, detailType, data } = event;
|
|
15
18
|
return {
|
package/dist/services/index.d.ts
CHANGED
package/dist/services/index.js
CHANGED
|
@@ -16,4 +16,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./queueService"), exports);
|
|
18
18
|
__exportStar(require("./cacheService"), exports);
|
|
19
|
+
__exportStar(require("./eventBridgeService"), exports);
|
|
19
20
|
// export * from "./apiService";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@socket.tech/dl-common",
|
|
3
|
-
"version": "1.0.3-test.
|
|
3
|
+
"version": "1.0.3-test.16",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"description": "common utilities for socket data layer.",
|
|
@@ -27,11 +27,13 @@
|
|
|
27
27
|
"eslint:check": "npx eslint src --ext ts,js",
|
|
28
28
|
"eslint:fix": "npx eslint src --ext ts,js --fix",
|
|
29
29
|
"lint": "tsc && npm run prettier:fix",
|
|
30
|
-
"prettier:fix": "npx prettier src dl-common --write ./**/*.{ts,js,json,yml,md}",
|
|
30
|
+
"prettier:fix": "npx prettier src dl-common __tests__ --write ./**/*.{ts,js,json,yml,md}",
|
|
31
31
|
"format": "prettier \"./**\" --write --ignore-unknown",
|
|
32
32
|
"format:check": "prettier \"./**\" --ignore-unknown --check",
|
|
33
33
|
"prepare": "husky install",
|
|
34
|
-
"publishp": "yarn lint && yarn build"
|
|
34
|
+
"publishp": "yarn lint && yarn build",
|
|
35
|
+
"testc": "jest --coverage",
|
|
36
|
+
"test": "jest"
|
|
35
37
|
},
|
|
36
38
|
"dependencies": {
|
|
37
39
|
"@aws-sdk/client-eventbridge": "^3.449.0",
|
|
@@ -47,13 +49,15 @@
|
|
|
47
49
|
"pg": "^8.8.0",
|
|
48
50
|
"pg-hstore": "^2.3.4",
|
|
49
51
|
"prom-client": "^14.2.0",
|
|
50
|
-
"sequelize": "^6.21.6"
|
|
52
|
+
"sequelize": "^6.21.6",
|
|
53
|
+
"ts-jest": "^29.1.1"
|
|
51
54
|
},
|
|
52
55
|
"devDependencies": {
|
|
53
56
|
"@commitlint/cli": "^16.2.3",
|
|
54
57
|
"@commitlint/config-conventional": "^16.2.1",
|
|
55
58
|
"@types/aws-lambda": "^8.10.108",
|
|
56
59
|
"@types/express": "^4.17.14",
|
|
60
|
+
"@types/jest": "^29.5.8",
|
|
57
61
|
"@types/node": "^17.0.23",
|
|
58
62
|
"@typescript-eslint/eslint-plugin": "^6.4.0",
|
|
59
63
|
"@typescript-eslint/parser": "^5.17.0",
|
|
@@ -69,6 +73,7 @@
|
|
|
69
73
|
"eslint-plugin-promise": "^6.0.0",
|
|
70
74
|
"eslint-plugin-tsdoc": "^0.2.14",
|
|
71
75
|
"husky": "^7.0.4",
|
|
76
|
+
"jest": "^29.7.0",
|
|
72
77
|
"lint-staged": "^12.3.7",
|
|
73
78
|
"nodemon": "^2.0.15",
|
|
74
79
|
"prettier": "2.7.1",
|
|
@@ -76,6 +81,7 @@
|
|
|
76
81
|
"serverless-domain-manager": "^7.1.2",
|
|
77
82
|
"serverless-dotenv-plugin": "4.0.0",
|
|
78
83
|
"serverless-esbuild": "^1.48.0",
|
|
84
|
+
"serverless-export-env": "arabold/serverless-export-env",
|
|
79
85
|
"serverless-lumigo": "1.14.1",
|
|
80
86
|
"serverless-offline": "12.0.4",
|
|
81
87
|
"serverless-plugin-aws-alerts": "^1.7.5",
|