Skip to content

Commit

Permalink
Migrate grpc-web-node-http-transport package so it's under the @impro…
Browse files Browse the repository at this point in the history
…bable-eng org. on npm. (#299)

* Migrate grpc-web-node-http-transport package so it's under the @improbable-eng org. on npm.

To further disambiguate that this transport is specifically for use with the `@improbable-eng/grpc-web` package.

Note I've also fixed an issue with the dependencies; `@improbable-eng/grpc-web` should have been listed as a peer-dependency as it's intended to be used as a plugin (ie: the consumer is expected to have `@improbable-eng/grpc-web` somewhere in their dependency tree)

* Mess around with package lock files...
  • Loading branch information
jonny-improbable authored Jan 13, 2019
1 parent 0b66909 commit 0c7a81a
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 14 deletions.
6 changes: 3 additions & 3 deletions client/grpc-web-node-http-transport/README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# grpc-web-node-http-transport
# @improbable-eng/grpc-web-node-http-transport
Node HTTP Transport for use with [@improbable-eng/grpc-web](https://github.com/improbable-eng/grpc-web)

## Usage
When making a gRPC request, specify this transport:

```typescript
import { grpc } from '@improbable-eng/grpc-web';
import { NodeHttpTransport } from 'grpc-web-node-http-transport';
import { NodeHttpTransport } from '@improbable-eng/grpc-web-node-http-transport';

grpc.invoke(MyService.DoQuery, {
host: "https://example.com",
Expand All @@ -18,7 +18,7 @@ grpc.invoke(MyService.DoQuery, {
Alternatively specify the Default Transport when your server/application bootstraps:
```typescript
import { grpc } from "@improbable-eng/grpc-web";
import { NodeHttpTransport } from "grpc-web-node-http-transport";
import { NodeHttpTransport } from "@improbable-eng/grpc-web-node-http-transport";

// Do this first, before you make any grpc requests!
grpc.setDefaultTransport(NodeHttpTransport());
Expand Down
10 changes: 8 additions & 2 deletions client/grpc-web-node-http-transport/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 8 additions & 6 deletions client/grpc-web-node-http-transport/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "grpc-web-node-http-transport",
"version": "0.0.1",
"name": "@improbable-eng/grpc-web-node-http-transport",
"version": "0.0.2",
"description": "Node HTTP Transport for use with @improbable-eng/grpc-web",
"main": "lib/index.js",
"repository": {
Expand All @@ -13,13 +13,15 @@
"build": "tsc",
"test": "echo \"Error: no test specified\" && exit 1"
},
"dependencies": {
"@improbable-eng/grpc-web": "^0.8.0"
},
"author": "",
"author": "Improbable",
"license": "Apache-2.0",
"peerDependencies": {
"@improbable-eng/grpc-web": ">=0.7.0"
},
"devDependencies": {
"@improbable-eng/grpc-web": "^0.8.0",
"@types/node": "^10.12.0",
"google-protobuf": "^3.2.0",
"typescript": "^3.1.3"
}
}
1 change: 0 additions & 1 deletion client/grpc-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
"dist"
],
"peerDependencies": {
"@types/google-protobuf": "^3.2.5",
"google-protobuf": "^3.2.0"
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion integration_test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"event-stream": "^3.3.4",
"google-protobuf": "^3.2.0",
"@improbable-eng/grpc-web": "^0.8.0",
"grpc-web-node-http-transport": "^0.0.1",
"@improbable-eng/grpc-web-node-http-transport": "^0.0.2",
"typedarray": "0.0.6"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion integration_test/ts/src/testRpcCombinations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
corsHost
} from "../../hosts-config";
import {grpc} from "@improbable-eng/grpc-web";
import {NodeHttpTransport} from "grpc-web-node-http-transport";
import {NodeHttpTransport} from "@improbable-eng/grpc-web-node-http-transport";

type TestConfig = {
testHostUrl: string,
Expand Down

0 comments on commit 0c7a81a

Please sign in to comment.