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

grpc-reflection-js

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grpc-reflection-js - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

25

build/src/client.js

@@ -50,2 +50,5 @@ "use strict";

}
function errorCallback(e) {
reject(e);
}
const request = new reflection_pb_1.ServerReflectionRequest();

@@ -55,2 +58,3 @@ request.setListServices('*');

grpcCall.on('data', dataCallback);
grpcCall.on('error', errorCallback);
grpcCall.write(request);

@@ -77,7 +81,7 @@ grpcCall.end();

const fileDescriptorProtos = await this.resolveDescriptorRecursive(fileDescriptorProtoBytes);
lodash_set_1.default(fileDescriptorSet, 'file', fileDescriptorProtos);
lodash_set_1.default(fileDescriptorSet, 'file', Array.from(fileDescriptorProtos.values()));
return descriptor_1.getDescriptorRootFromDescriptorSet(fileDescriptorSet);
}
async resolveDescriptorRecursive(fileDescriptorProtoBytes) {
let fileDescriptorProtos = [];
let fileDescriptorProtos = new Map();
for (const descriptorByte of fileDescriptorProtoBytes) {

@@ -90,6 +94,11 @@ const fileDescriptorProto = descriptor_2.FileDescriptorProto.decode(descriptorByte);

const protoDependencies = await this.resolveDescriptorRecursive(depProtoBytes);
fileDescriptorProtos = fileDescriptorProtos.concat(protoDependencies);
fileDescriptorProtos = new Map([
...fileDescriptorProtos,
...protoDependencies,
]);
}
}
fileDescriptorProtos.push(fileDescriptorProto);
if (!fileDescriptorProtos.has(fileDescriptorProto.name)) {
fileDescriptorProtos.set(fileDescriptorProto.name, fileDescriptorProto);
}
}

@@ -109,2 +118,5 @@ return fileDescriptorProtos;

}
function errorCallback(e) {
reject(e);
}
const request = new reflection_pb_1.ServerReflectionRequest();

@@ -114,2 +126,3 @@ request.setFileContainingSymbol(symbol);

grpcCall.on('data', dataCallback);
grpcCall.on('error', errorCallback);
grpcCall.write(request);

@@ -130,2 +143,5 @@ grpcCall.end();

}
function errorCallback(e) {
reject(e);
}
const request = new reflection_pb_1.ServerReflectionRequest();

@@ -135,2 +151,3 @@ request.setFileByFilename(symbol);

grpcCall.on('data', dataCallback);
grpcCall.on('error', errorCallback);
grpcCall.write(request);

@@ -137,0 +154,0 @@ grpcCall.end();

2

package.json
{
"name": "grpc-reflection-js",
"version": "0.1.0",
"version": "0.1.1",
"main": "build/src/index.js",

@@ -5,0 +5,0 @@ "repository": "https://github.com/redhoyasa/grpc-reflection-js",

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