Skip to content

Commit

Permalink
prune unused packages
Browse files Browse the repository at this point in the history
  • Loading branch information
redhoyasa committed Jun 30, 2020
1 parent f444bb6 commit 8aa15fe
Show file tree
Hide file tree
Showing 6 changed files with 259 additions and 257 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/github-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Create Release

on:
push:
tags:
- 'v*'

jobs:
build:
name: Create Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body:
draft: false
prerelease: false
27 changes: 27 additions & 0 deletions .github/workflows/npm-publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: NPM Publish

on:
push:
tags:
- 'v*'

jobs:
npm-publish:
name: npm-publish
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@master
- name: Set up Node.js
uses: actions/setup-node@master
with:
node-version: 10.0.0
- name: Publish if version has been updated
uses: pascalgn/npm-publish-action@4f4bf159e299f65d21cd1cbd96fc5d53228036df
with:
tag_name: "v%s"
tag_message: "v%s"
commit_pattern: "^Release (\\S+)"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,23 @@
[![codecov](https://codecov.io/gh/redhoyasa/grpc-reflection-js/branch/master/graph/badge.svg)](https://codecov.io/gh/redhoyasa/grpc-reflection-js)

A JS library for talking with any gRPC Server that implements [Reflection](https://github.com/grpc/grpc/blob/master/doc/server-reflection.md) protocol.

## Installation

```sh
npm install grpc-reflection-js
```

## Usage

```js
const grpc = require('grpc');
const grpcReflection = require('grpc-reflection-js');

const grpcReflectionServer = '<gRPC Reflection server host>'
const reflectionClient = new grpcReflection.Client(
grpcReflectionServer,
grpc.credentials.createInsecure()
);
const services = await reflectionClient.listServices()
```
10 changes: 2 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,15 @@
{
"name": "grpc-reflection-js",
"version": "0.0.1",
"version": "0.0.3",
"main": "build/src/index.js",
"repository": "https://github.com/redhoyasa/grpc-reflection-js",
"author": "[email protected]",
"license": "MIT",
"dependencies": {
"@grpc/grpc-js": "^1.0.3",
"@grpc/proto-loader": "^0.5.4",
"@types/async": "^3.2.3",
"@types/google-protobuf": "^3.7.2",
"@types/lodash.get": "^4.4.6",
"@types/lodash.set": "^4.3.6",
"@types/protobufjs": "^6.0.0",
"async": "^3.2.0",
"google-protobuf": "^3.12.2",
"grpc": "^1.24.2",
"lodash.get": "^4.4.2",
"lodash.set": "^4.3.2",
"protobufjs": "^6.9.0"
},
Expand Down
4 changes: 2 additions & 2 deletions src/reflection_grpc_pb.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ interface IServerReflectionService extends grpc.ServiceDefinition<grpc.UntypedSe

interface IServerReflectionService_IServerReflectionInfo extends grpc.MethodDefinition<reflection_pb.ServerReflectionRequest, reflection_pb.ServerReflectionResponse> {
path: string; // "/grpc.reflection.v1alpha.ServerReflection/ServerReflectionInfo"
requestStream: boolean; // true
responseStream: boolean; // true
requestStream: true;
responseStream: true;
requestSerialize: grpc.serialize<reflection_pb.ServerReflectionRequest>;
requestDeserialize: grpc.deserialize<reflection_pb.ServerReflectionRequest>;
responseSerialize: grpc.serialize<reflection_pb.ServerReflectionResponse>;
Expand Down
Loading

0 comments on commit 8aa15fe

Please sign in to comment.