New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@join-com/grpc

Package Overview
Dependencies
Maintainers
32
Versions
105
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@join-com/grpc - npm Package Compare versions

Comparing version 3.3.6 to 3.3.7

3

dist/Service.d.ts

@@ -31,4 +31,7 @@ import * as grpc from '@grpc/grpc-js';

private getGrpcStatusCode;
private failIfDisabled;
private getDisableServices;
private getServiceName;
}
export {};
//# sourceMappingURL=Service.d.ts.map

@@ -93,2 +93,3 @@ "use strict";

};
this.failIfDisabled(methodDefinition.path, call.metadata);
// Promise.resolve guarantees that the handler is always executed asynchronously.

@@ -170,2 +171,28 @@ // Ex. handler can be defined as a synchronous function returning promise and throwing error inside.

}
failIfDisabled(path, metadata) {
const serviceName = this.getServiceName(path);
const disableServices = this.getDisableServices(metadata);
if (serviceName && disableServices?.includes(serviceName)) {
throw new Error(`Remote call "${path}" cancelled. Found ${disableServices.toString()} disable-services in metadata`);
}
}
getDisableServices(metadata) {
const metadataValue = metadata.get('chaos_mode.disable_services');
if (metadataValue.length === 1) {
const val = metadataValue[0];
if (typeof val === 'string') {
return val.split(',');
}
}
return undefined;
}
getServiceName(path) {
const regex = /^\/([^.]+)/;
const matches = path.match(regex);
if (matches && matches[1]) {
const extractedString = matches[1];
return extractedString;
}
return undefined;
}
}

@@ -172,0 +199,0 @@ exports.Service = Service;

2

package.json
{
"name": "@join-com/grpc",
"version": "3.3.6",
"version": "3.3.7",
"description": "gRPC library",

@@ -5,0 +5,0 @@ "author": "JOIN Solutions",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc