Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

grpc-inspect

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grpc-inspect - npm Package Compare versions

Comparing version 0.5.0 to 0.6.0

2

lib/inspect.js

@@ -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

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