diff --git a/.circleci/config.yml b/.circleci/config.yml index fbec5cb..29031fe 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -39,7 +39,7 @@ jobs: - checkout - node/install-packages - run: npm run build - - run: npx semantic-release -d + - run: npx semantic-release workflows: version: 2 diff --git a/.npmignore b/.npmignore index 7f38592..cf148d9 100644 --- a/.npmignore +++ b/.npmignore @@ -1,4 +1,5 @@ .circleci/ +.husky/ coverage/ scripts/ test/ @@ -7,7 +8,8 @@ test/ .gitignore .nvmrc .prettierrc +.releaserc jest.config.js -jest.setup.js +jest.setup.ts tsconfig.src.json tsconfig.cli.json diff --git a/README.md b/README.md index b141337..a9f452c 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,20 @@ This library is an abstraction on [@grpc/grpc-js](https://github.com/grpc/grpc-node/tree/master) to provide a simpler interface for making requests from a gRPC client and generating fully typed gRPC clients from `.proto` files. +Go from this: + +```typescript +client.getName(new GetNameRequest(), (error: Error | null, response: GetNameResponse | undefined) => { + // handle response in callback +}); +``` + +to this: + +```typescript +const response = await client.unaryRequest("getName", new GetNameRequest()); +``` + ## Install ```bash diff --git a/package.json b/package.json index c30dc64..7637b24 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,9 @@ "promises", "async" ], + "publishConfig": { + "access": "public" + }, "homepage": "https://github.com/lewnelson/grpc-ts#readme", "bugs": { "url": "https://github.com/lewnelson/grpc-ts/issues"