grpc-inspect
Advanced tools
Comparing version 0.5.0 to 0.6.0
@@ -92,3 +92,3 @@ const _ = require('lodash') | ||
(v && typeof npv === 'function' && v.super_ && typeof v.super_ === 'function'))) { | ||
clients[this.key] = v | ||
clients[this.path.join('.')] = v | ||
} | ||
@@ -95,0 +95,0 @@ |
@@ -151,3 +151,3 @@ const _ = require('lodash') | ||
* Gets the gRPC service / client object / function | ||
* @param {serviceName} serviceName The service name | ||
* @param {serviceName} serviceName The service name. Can and should include package. | ||
* @return {Object} the Client object | ||
@@ -162,5 +162,15 @@ * @memberof descriptor | ||
* console.dir(d.client('RouteGuide')) | ||
* console.dir(d.client('routeguide.RouteGuide')) | ||
*/ | ||
client: function (serviceName) { | ||
return clients[serviceName] | ||
if (serviceName.indexOf('.') > 0) { | ||
return clients[serviceName] | ||
} | ||
return _.find(clients, (v, k) => { | ||
const lastDot = k.lastIndexOf('.') | ||
if (lastDot) { | ||
return k.substring(lastDot + 1) === serviceName | ||
} | ||
}) | ||
} | ||
@@ -167,0 +177,0 @@ } |
{ | ||
"name": "grpc-inspect", | ||
"version": "0.5.0", | ||
"version": "0.6.0", | ||
"description": "gRPC protocol buffer inspection utility", | ||
@@ -8,3 +8,3 @@ "main": "lib/inspect.js", | ||
"test": "ava -v", | ||
"docs": "jsdoc2md index.js --heading-depth 3 --template readme.hbs | md-wrap-code > README.md" | ||
"docs": "jsdoc2md lib/*.js --heading-depth 3 --template readme.hbs | md-wrap-code > README.md" | ||
}, | ||
@@ -30,12 +30,14 @@ "repository": { | ||
"dependencies": { | ||
"lodash": "^4.17.2", | ||
"lodash": "^4.17.11", | ||
"traverse": "^0.6.6" | ||
}, | ||
"devDependencies": { | ||
"ava": "^0.24.0", | ||
"grpc": "^1.8.0", | ||
"jsdoc-to-markdown": "^3.0.3", | ||
"@grpc/proto-loader": "^0.3.0", | ||
"ava": "^0.25.0", | ||
"greenkeeper-lockfile": "^1.15.1", | ||
"grpc": "^1.15.1", | ||
"jsdoc-to-markdown": "^4.0.1", | ||
"md-wrap-code": "^0.1.1", | ||
"protobufjs": "^6.8.4", | ||
"standard": "^10.0.3" | ||
"protobufjs": "^6.8.8", | ||
"standard": "^12.0.0" | ||
}, | ||
@@ -42,0 +44,0 @@ "directories": { |
@@ -7,2 +7,3 @@ # grpc-inspect | ||
[![License](https://img.shields.io/github/license/bojand/grpc-inspect.svg?style=flat-square)](https://raw.githubusercontent.com/bojand/grpc-inspect/master/LICENSE) | ||
[![Greenkeeper badge](https://badges.greenkeeper.io/bojand/grpc-inspect.svg)](https://greenkeeper.io/) | ||
@@ -268,3 +269,3 @@ gRPC Protocol Buffer utility module that generates a descriptor object representing a | ||
| --- | --- | --- | | ||
| serviceName | <code>serviceName</code> | The service name | | ||
| serviceName | <code>serviceName</code> | The service name. Can and should include package. | | ||
@@ -280,2 +281,3 @@ **Example** | ||
console.dir(d.client('RouteGuide')) | ||
console.dir(d.client('routeguide.RouteGuide')) | ||
``` | ||
@@ -282,0 +284,0 @@ |
Sorry, the diff of this file is not supported yet
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
38652
403
309
0
8
Updatedlodash@^4.17.11