grpc-ts-health-check
Advanced tools
Comparing version 3.1.2 to 3.1.3
@@ -22,7 +22,7 @@ "use strict"; | ||
const status = this.statusMap[service]; | ||
if (!status) { | ||
callback(grpc_boom_1.default.notFound(`Unknown service: ${service}`), undefined); | ||
if (status) { | ||
callback(undefined, { status }); | ||
} | ||
else { | ||
callback(undefined, { status }); | ||
callback(grpc_boom_1.default.notFound(`Unknown service: ${service}`), undefined); | ||
} | ||
@@ -44,3 +44,8 @@ } | ||
this.watchStatusMap[service] = updatedStatus; | ||
if (!this.watchErrorMap[service]) { | ||
if (this.watchErrorMap[service]) { | ||
clearInterval(interval); | ||
// Terminate the stream | ||
call.end(this.watchErrorMap[service]); | ||
} | ||
else { | ||
const lastStatus = this.statusMap[service] || -1; | ||
@@ -58,7 +63,2 @@ if (lastStatus !== updatedStatus) { | ||
} | ||
else { | ||
clearInterval(interval); | ||
// Terminate the stream | ||
call.end(this.watchErrorMap[service]); | ||
} | ||
}, 1000); | ||
@@ -65,0 +65,0 @@ } |
import type * as grpc from '@grpc/grpc-js'; | ||
import type { MessageTypeDefinition } from '@grpc/proto-loader'; | ||
import type { HealthClient as _grpc_health_v1_HealthClient, HealthDefinition as _grpc_health_v1_HealthDefinition } from './grpc/health/v1/Health'; | ||
declare type SubtypeConstructor<Constructor extends new (...args: any) => any, Subtype> = { | ||
type SubtypeConstructor<Constructor extends new (...args: any) => any, Subtype> = { | ||
new (...args: ConstructorParameters<Constructor>): Subtype; | ||
@@ -6,0 +6,0 @@ }; |
{ | ||
"name": "grpc-ts-health-check", | ||
"version": "3.1.2", | ||
"version": "3.1.3", | ||
"description": "An implementation of gRPC health checks, written in typescript.", | ||
@@ -35,22 +35,22 @@ "license": "MIT", | ||
"dependencies": { | ||
"google-protobuf": "^3.20.1", | ||
"google-protobuf": "3.21.2", | ||
"grpc-boom": "npm:^3.0.11" | ||
}, | ||
"devDependencies": { | ||
"@grpc/grpc-js": "^1.6.8", | ||
"@grpc/proto-loader": "^0.7.0", | ||
"@types/google-protobuf": "^3.15.6", | ||
"@types/jest": "^28.1.6", | ||
"@types/node": "^18.6.1", | ||
"@grpc/grpc-js": "1.8.14", | ||
"@grpc/proto-loader": "0.7.7", | ||
"@types/google-protobuf": "3.15.6", | ||
"@types/jest": "29.5.1", | ||
"@types/node": "18.16.15", | ||
"grpc-boom": "link:../grpc-boom/src", | ||
"jest": "^28.1.3", | ||
"jest": "29.5.0", | ||
"kalos": "workspace:*", | ||
"protobufjs": "^7.0.0", | ||
"rimraf": "^3.0.2", | ||
"typescript": "^4.7.4" | ||
"protobufjs": "7.2.3", | ||
"rimraf": "5.0.1", | ||
"typescript": "5.0.4" | ||
}, | ||
"peerDependencies": { | ||
"@grpc/grpc-js": "^1.6.8", | ||
"@grpc/proto-loader": "^0.7.0" | ||
"@grpc/grpc-js": "1.8.14", | ||
"@grpc/proto-loader": "0.7.7" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
20948
+ Added@grpc/grpc-js@1.8.14(transitive)
+ Added@grpc/proto-loader@0.7.7(transitive)
+ Added@types/long@4.0.2(transitive)
+ Addedgoogle-protobuf@3.21.2(transitive)
+ Addedlong@4.0.0(transitive)
- Removed@grpc/grpc-js@1.12.4(transitive)
- Removed@grpc/proto-loader@0.7.13(transitive)
- Removed@js-sdsl/ordered-map@4.4.2(transitive)
- Removedgoogle-protobuf@3.21.4(transitive)
Updatedgoogle-protobuf@3.21.2