Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
this.grpcMetadata.add('x-goog-api-client', [
'gl-node/' + process.versions.node,
'gccl/' + config.packageJson.version,
'grpc/' + require('grpc/package.json').version
].join(' '));
if (config.grpcMetadata) {
for (var prop in config.grpcMetadata) {
if (config.grpcMetadata.hasOwnProperty(prop)) {
this.grpcMetadata.add(prop, config.grpcMetadata[prop]);
}
}
}
this.maxRetries = options.maxRetries;
this.userAgent = util.getUserAgentFromPackageJson(config.packageJson);
this.activeServiceMap_ = new Map();
this.protos = {};
var protoServices = config.protoServices;
var self = this;
Object.keys(protoServices).forEach(function(name) {
var protoConfig = protoServices[name];
var service = self.loadProtoFile_(protoConfig, config);
self.protos[name] = service;
if (protoConfig.baseUrl) {
service.baseUrl = protoConfig.baseUrl;
this.grpcMetadata.add('x-goog-api-client', [
'gl-node/' + process.versions.node,
'gccl/' + config.packageJson.version,
'grpc/' + require('grpc/package.json').version
].join(' '));
if (config.grpcMetadata) {
for (var prop in config.grpcMetadata) {
if (config.grpcMetadata.hasOwnProperty(prop)) {
this.grpcMetadata.add(prop, config.grpcMetadata[prop]);
}
}
}
this.maxRetries = options.maxRetries;
this.userAgent = util.getUserAgentFromPackageJson(config.packageJson);
this.activeServiceMap_ = new Map();
this.protos = {};
var protoServices = config.protoServices;
var self = this;
Object.keys(protoServices).forEach(function(name) {
var protoConfig = protoServices[name];
var service = self.loadProtoFile_(protoConfig, config);
self.protos[name] = service;
if (protoConfig.baseUrl) {
service.baseUrl = protoConfig.baseUrl;