Socket
Socket
Sign inDemoInstall

nice-grpc-web

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nice-grpc-web - npm Package Compare versions

Comparing version 1.0.8 to 1.1.0

8

package.json
{
"name": "nice-grpc-web",
"version": "1.0.8",
"version": "1.1.0",
"description": "A Browser gRPC library that is nice to you",

@@ -30,3 +30,3 @@ "keywords": [

"prepare:proto:grpc-web": "mkdirp ./fixtures/grpc-web && grpc_tools_node_protoc --plugin=protoc-gen-ts=./node_modules/.bin/protoc-gen-ts --js_out=import_style=commonjs,binary:./fixtures/grpc-web --ts_out=service=grpc-web:./fixtures/grpc-web -I fixtures fixtures/*.proto",
"prepare:proto:ts-proto": "mkdirp ./fixtures/ts-proto && grpc_tools_node_protoc --ts_proto_out=./fixtures/ts-proto --ts_proto_opt=outputServices=generic-definitions,outputJsonMethods=false,useExactTypes=false,esModuleInterop=true -I fixtures fixtures/*.proto",
"prepare:proto:ts-proto": "mkdirp ./fixtures/ts-proto && grpc_tools_node_protoc --ts_proto_out=./fixtures/ts-proto --ts_proto_opt=outputServices=nice-grpc,outputServices=generic-definitions,outputJsonMethods=false,useExactTypes=false,esModuleInterop=true -I fixtures fixtures/*.proto",
"prepare:proto": "npm run prepare:proto:grpc-js && npm run prepare:proto:grpc-web && npm run prepare:proto:ts-proto",

@@ -49,3 +49,3 @@ "prepare": "npm run prepare:grpcwebproxy && npm run prepare:proto"

"tcp-port-used": "^1.0.2",
"ts-proto": "^1.97.0",
"ts-proto": "^1.112.0",
"ts-protoc-gen": "^0.15.0",

@@ -62,3 +62,3 @@ "unzipper": "^0.10.11",

},
"gitHead": "560ec0721e2a59cf3c3d6ffdfded79d31c464db1"
"gitHead": "77acb86429dbf13439b3335812c9b01daef94641"
}

@@ -54,2 +54,4 @@ # nice-grpc-web [![npm version][npm-image]][npm-url] <!-- omit in toc -->

> Use `ts-proto` version not older than `1.112.0`.
Given a Protobuf file `./proto/example.proto`, generate TypeScript code into

@@ -62,3 +64,3 @@ directory `./compiled_proto`:

--ts_proto_out=./compiled_proto \
--ts_proto_opt=env=browser,outputServices=generic-definitions,outputJsonMethods=false,useExactTypes=false \
--ts_proto_opt=env=browser,outputServices=nice-grpc,outputServices=generic-definitions,outputJsonMethods=false,useExactTypes=false \
--proto_path=./proto \

@@ -135,7 +137,10 @@ ./proto/example.proto

import {createChannel, createClient} from 'nice-grpc-web';
import {ExampleServiceDefinition} from './compiled_proto/example';
import {
ExampleServiceClient,
ExampleServiceDefinition,
} from './compiled_proto/example';
const channel = createChannel('http://localhost:8080');
const client: Client<typeof ExampleServiceDefinition> = createClient(
const client: ExampleServiceClient = createClient(
ExampleServiceDefinition,

@@ -142,0 +147,0 @@ channel,

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