diff --git a/api-docs/package.json b/api-docs/package.json index 044678fc30..a1c4d1b63e 100644 --- a/api-docs/package.json +++ b/api-docs/package.json @@ -1,6 +1,6 @@ { "name": "api-docs", - "version": "2.12.1", + "version": "2.12.2", "description": "Swagger Documentation", "main": "dist/index.js", "scripts": { diff --git a/api-gateway/package.json b/api-gateway/package.json index bbcb47f504..815bb0db02 100644 --- a/api-gateway/package.json +++ b/api-gateway/package.json @@ -8,8 +8,8 @@ }, "author": "Envision Blockchain Solutions ", "dependencies": { - "@guardian/common": "^2.12.1", - "@guardian/interfaces": "^2.12.1", + "@guardian/common": "^2.12.2", + "@guardian/interfaces": "^2.12.2", "@types/express-fileupload": "^1.4.1", "dotenv": "^16.0.0", "express": "^4.17.1", @@ -55,5 +55,5 @@ "start": "node dist/index.js", "test": "mocha tests/**/*.test.js --reporter mocha-junit-reporter --reporter-options mochaFile=../test_results/ui-service.xml" }, - "version": "2.12.1" + "version": "2.12.2" } diff --git a/api-tests/package.json b/api-tests/package.json index a71dbc293c..27c53692fe 100644 --- a/api-tests/package.json +++ b/api-tests/package.json @@ -1,6 +1,6 @@ { "name": "api-tests", - "version": "2.12.1", + "version": "2.12.2", "description": "API Tests", "main": "index.js", "scripts": { diff --git a/application-events/package.json b/application-events/package.json index c66bc77619..58ba5437b6 100644 --- a/application-events/package.json +++ b/application-events/package.json @@ -1,6 +1,6 @@ { "name": "application-events", - "version": "2.12.1", + "version": "2.12.2", "description": "", "main": "index.js", "scripts": { diff --git a/auth-service/package.json b/auth-service/package.json index 847587ca76..ee94740f81 100644 --- a/auth-service/package.json +++ b/auth-service/package.json @@ -6,8 +6,8 @@ }, "author": "Envision Blockchain Solutions ", "dependencies": { - "@guardian/common": "^2.12.1", - "@guardian/interfaces": "^2.12.1", + "@guardian/common": "^2.12.2", + "@guardian/interfaces": "^2.12.2", "@mikro-orm/core": "~5.7.5", "@mikro-orm/mongodb": "~5.7.5", "dotenv": "^16.0.0", @@ -47,5 +47,5 @@ "start": "node dist/index.js", "test": "mocha tests/**/*.test.js --reporter mocha-junit-reporter --reporter-options mochaFile=../test_results/ui-service.xml" }, - "version": "2.12.1" + "version": "2.12.2" } diff --git a/common/package.json b/common/package.json index c15911411d..bdb746c2cd 100644 --- a/common/package.json +++ b/common/package.json @@ -2,7 +2,7 @@ "author": "Envision Blockchain Solutions ", "dependencies": { "@aws-sdk/client-secrets-manager": "^3.319.0", - "@guardian/interfaces": "^2.12.1", + "@guardian/interfaces": "^2.12.2", "@hashgraph/sdk": "^2.22.0", "@mattrglobal/jsonld-signatures-bbs": "^1.1.2", "@meeco/cryppo": "^2.0.2", @@ -59,5 +59,5 @@ "test:local": "mocha tests/**/*.test.js --exit", "test:stability": "mocha tests/stability.test.js" }, - "version": "2.12.1" + "version": "2.12.2" } diff --git a/frontend/package.json b/frontend/package.json index 10307234ce..584ac04ad0 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -65,5 +65,5 @@ "test": "ng test", "watch": "ng build --watch --configuration development --output-path ../www-data" }, - "version": "2.12.1" + "version": "2.12.2" } diff --git a/guardian-service/package.json b/guardian-service/package.json index 659b486ee5..e55ef3a748 100644 --- a/guardian-service/package.json +++ b/guardian-service/package.json @@ -12,8 +12,8 @@ }, "author": "Envision Blockchain Solutions ", "dependencies": { - "@guardian/common": "^2.12.1", - "@guardian/interfaces": "^2.12.1", + "@guardian/common": "^2.12.2", + "@guardian/interfaces": "^2.12.2", "@hashgraph/sdk": "^2.22.0", "@mattrglobal/jsonld-signatures-bbs": "^1.1.2", "@meeco/cryppo": "^2.0.2", @@ -79,5 +79,5 @@ "test:local": "mocha tests/**/*.test.js --exit", "test:stability": "mocha tests/stability.test.js" }, - "version": "2.12.1" + "version": "2.12.2" } diff --git a/guardian-service/src/helpers/guardians.ts b/guardian-service/src/helpers/guardians.ts index c50cfbfce9..c0650fa5db 100644 --- a/guardian-service/src/helpers/guardians.ts +++ b/guardian-service/src/helpers/guardians.ts @@ -32,7 +32,7 @@ export class GuardiansService extends NatsService { * @param policyId */ public async checkIfPolicyAlive(policyId: string): Promise { - const exist = await this.sendPolicyMessage(PolicyEvents.CHECK_IF_ALIVE, policyId, {}) + const exist = await this.sendPolicyMessage(PolicyEvents.CHECK_IF_ALIVE, policyId, {}, 1000); return !!exist } @@ -41,13 +41,16 @@ export class GuardiansService extends NatsService { * @param subject * @param policyId * @param data + * @param customTimeout */ - public sendPolicyMessage(subject: string, policyId: string, data?: unknown): Promise{ + public sendPolicyMessage(subject: string, policyId: string, data?: unknown, customTimeout?: number): Promise{ const messageId = GenerateUUIDv4(); const head = headers(); head.append('messageId', messageId); head.append('policyId', policyId); + const timeout = customTimeout ? customTimeout : 60 * 1000; + return Promise.race([ new Promise(async (resolve, reject) => { this.responseCallbacksMap.set(messageId, (d: T, error?) => { @@ -66,7 +69,7 @@ export class GuardiansService extends NatsService { new Promise((resolve, reject) => { setTimeout(() => { resolve(null); - }, 60 * 1000) + }, timeout) }), ]) } diff --git a/interfaces/package.json b/interfaces/package.json index 99cea30b76..810221b876 100644 --- a/interfaces/package.json +++ b/interfaces/package.json @@ -25,5 +25,5 @@ "prepack": "npm run build", "test": "echo \"Error: no test specified\" && exit 1" }, - "version": "2.12.1" + "version": "2.12.2" } diff --git a/logger-service/package.json b/logger-service/package.json index 49738cea32..16fa0e7a07 100644 --- a/logger-service/package.json +++ b/logger-service/package.json @@ -1,8 +1,8 @@ { "author": "Envision Blockchain Solutions ", "dependencies": { - "@guardian/common": "^2.12.1", - "@guardian/interfaces": "^2.12.1", + "@guardian/common": "^2.12.2", + "@guardian/interfaces": "^2.12.2", "@mikro-orm/core": "~5.7.5", "@mikro-orm/mongodb": "~5.7.5", "@web-std/fetch": "3.0.0", @@ -37,5 +37,5 @@ "start": "node dist/index.js", "watch": "nodemon src/index.ts" }, - "version": "2.12.1" + "version": "2.12.2" } diff --git a/mrv-sender/package.json b/mrv-sender/package.json index ec24c7d403..088e99964a 100644 --- a/mrv-sender/package.json +++ b/mrv-sender/package.json @@ -1,7 +1,7 @@ { "author": "Envision Blockchain Solutions ", "dependencies": { - "@guardian/common": "^2.12.1", + "@guardian/common": "^2.12.2", "@transmute/credentials-context": "0.7.0-unstable.80", "@transmute/did-context": "0.7.0-unstable.80", "@transmute/ed25519-signature-2018": "0.7.0-unstable.80", @@ -30,5 +30,5 @@ "dev:docker": "nodemon .", "start": "node dist/index.js" }, - "version": "2.12.1" + "version": "2.12.2" } diff --git a/package.json b/package.json index d87da7b305..c08224784f 100644 --- a/package.json +++ b/package.json @@ -17,5 +17,5 @@ "policy-service", "api-tests" ], - "version": "2.12.1" + "version": "2.12.2" } diff --git a/policy-service/package.json b/policy-service/package.json index 89e117274c..9126097d38 100644 --- a/policy-service/package.json +++ b/policy-service/package.json @@ -11,8 +11,8 @@ }, "author": "Envision Blockchain Solutions ", "dependencies": { - "@guardian/common": "^2.12.1", - "@guardian/interfaces": "^2.12.1", + "@guardian/common": "^2.12.2", + "@guardian/interfaces": "^2.12.2", "@hashgraph/sdk": "^2.22.0", "@mattrglobal/jsonld-signatures-bbs": "^1.1.2", "@meeco/cryppo": "^2.0.2", @@ -79,5 +79,5 @@ "test:local": "mocha tests/**/*.test.js", "test:stability": "mocha tests/stability.test.js" }, - "version": "2.12.1" + "version": "2.12.2" } diff --git a/topic-viewer/package.json b/topic-viewer/package.json index a6219d3e64..e4f31ec638 100644 --- a/topic-viewer/package.json +++ b/topic-viewer/package.json @@ -20,5 +20,5 @@ "dev": "tsc -w", "start": "node dist/index.js" }, - "version": "2.12.1" + "version": "2.12.2" } diff --git a/tree-viewer/package.json b/tree-viewer/package.json index 77df11c831..a4fb58bfc3 100644 --- a/tree-viewer/package.json +++ b/tree-viewer/package.json @@ -20,5 +20,5 @@ "dev": "tsc -w", "start": "node dist/index.js" }, - "version": "2.12.1" + "version": "2.12.2" } diff --git a/worker-service/package.json b/worker-service/package.json index 6c6f29f963..fd050f05cc 100644 --- a/worker-service/package.json +++ b/worker-service/package.json @@ -1,8 +1,8 @@ { "author": "Envision Blockchain Solutions ", "dependencies": { - "@guardian/common": "^2.12.1", - "@guardian/interfaces": "^2.12.1", + "@guardian/common": "^2.12.2", + "@guardian/interfaces": "^2.12.2", "@hashgraph/sdk": "^2.22.0", "@transmute/credentials-context": "^0.7.0-unstable.80", "@transmute/did-context": "^0.7.0-unstable.80", @@ -49,5 +49,5 @@ "start": "node dist/index.js", "test": "mocha tests/**/*.test.js --reporter mocha-junit-reporter --reporter-options mochaFile=../test_results/worker-service.xml --exit" }, - "version": "2.12.1" + "version": "2.12.2" } diff --git a/yarn.lock b/yarn.lock index 578a85de26..dbc2a40834 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1051,12 +1051,12 @@ __metadata: languageName: node linkType: hard -"@guardian/common@^2.12.1, @guardian/common@workspace:common": +"@guardian/common@^2.12.2, @guardian/common@workspace:common": version: 0.0.0-use.local resolution: "@guardian/common@workspace:common" dependencies: "@aws-sdk/client-secrets-manager": ^3.319.0 - "@guardian/interfaces": ^2.12.1 + "@guardian/interfaces": ^2.12.2 "@hashgraph/sdk": ^2.22.0 "@mattrglobal/jsonld-signatures-bbs": ^1.1.2 "@meeco/cryppo": ^2.0.2 @@ -1095,7 +1095,7 @@ __metadata: languageName: unknown linkType: soft -"@guardian/interfaces@^2.12.1, @guardian/interfaces@workspace:interfaces": +"@guardian/interfaces@^2.12.2, @guardian/interfaces@workspace:interfaces": version: 0.0.0-use.local resolution: "@guardian/interfaces@workspace:interfaces" dependencies: @@ -2809,8 +2809,8 @@ __metadata: version: 0.0.0-use.local resolution: "api-gateway@workspace:api-gateway" dependencies: - "@guardian/common": ^2.12.1 - "@guardian/interfaces": ^2.12.1 + "@guardian/common": ^2.12.2 + "@guardian/interfaces": ^2.12.2 "@types/express": ^4.17.13 "@types/express-fileupload": ^1.4.1 "@types/jszip": ^3.4.1 @@ -3005,8 +3005,8 @@ __metadata: version: 0.0.0-use.local resolution: "auth-service@workspace:auth-service" dependencies: - "@guardian/common": ^2.12.1 - "@guardian/interfaces": ^2.12.1 + "@guardian/common": ^2.12.2 + "@guardian/interfaces": ^2.12.2 "@mikro-orm/core": ~5.7.5 "@mikro-orm/mongodb": ~5.7.5 "@types/jsonwebtoken": ^8.5.4 @@ -5608,8 +5608,8 @@ __metadata: version: 0.0.0-use.local resolution: "guardian-service@workspace:guardian-service" dependencies: - "@guardian/common": ^2.12.1 - "@guardian/interfaces": ^2.12.1 + "@guardian/common": ^2.12.2 + "@guardian/interfaces": ^2.12.2 "@hashgraph/sdk": ^2.22.0 "@mattrglobal/jsonld-signatures-bbs": ^1.1.2 "@meeco/cryppo": ^2.0.2 @@ -7661,8 +7661,8 @@ __metadata: version: 0.0.0-use.local resolution: "logger-service@workspace:logger-service" dependencies: - "@guardian/common": ^2.12.1 - "@guardian/interfaces": ^2.12.1 + "@guardian/common": ^2.12.2 + "@guardian/interfaces": ^2.12.2 "@mikro-orm/core": ~5.7.5 "@mikro-orm/mongodb": ~5.7.5 "@types/fs-extra": ^9.0.12 @@ -8300,7 +8300,7 @@ __metadata: version: 0.0.0-use.local resolution: "mrv-sender@workspace:mrv-sender" dependencies: - "@guardian/common": ^2.12.1 + "@guardian/common": ^2.12.2 "@transmute/credentials-context": 0.7.0-unstable.80 "@transmute/did-context": 0.7.0-unstable.80 "@transmute/ed25519-signature-2018": 0.7.0-unstable.80 @@ -9264,8 +9264,8 @@ __metadata: version: 0.0.0-use.local resolution: "policy-service@workspace:policy-service" dependencies: - "@guardian/common": ^2.12.1 - "@guardian/interfaces": ^2.12.1 + "@guardian/common": ^2.12.2 + "@guardian/interfaces": ^2.12.2 "@hashgraph/sdk": ^2.22.0 "@mattrglobal/jsonld-signatures-bbs": ^1.1.2 "@meeco/cryppo": ^2.0.2 @@ -11751,8 +11751,8 @@ __metadata: version: 0.0.0-use.local resolution: "worker-service@workspace:worker-service" dependencies: - "@guardian/common": ^2.12.1 - "@guardian/interfaces": ^2.12.1 + "@guardian/common": ^2.12.2 + "@guardian/interfaces": ^2.12.2 "@hashgraph/sdk": ^2.22.0 "@transmute/credentials-context": ^0.7.0-unstable.80 "@transmute/did-context": ^0.7.0-unstable.80