{"id":16017167,"url":"https://github.com/beoum/grpc-client-promise-wrapper","last_synced_at":"2025-03-18T03:30:45.670Z","repository":{"id":38288297,"uuid":"449109559","full_name":"Beoum/grpc-client-promise-wrapper","owner":"Beoum","description":null,"archived":false,"fork":false,"pushed_at":"2022-12-19T03:26:42.000Z","size":15,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-10-15T16:15:20.234Z","etag":null,"topics":["grpc","javascript","nodejs","typescript","wrapper"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/grpc-client-promise-wrapper","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Beoum.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-01-18T02:07:24.000Z","updated_at":"2024-04-18T05:56:16.000Z","dependencies_parsed_at":"2023-01-29T20:30:28.165Z","dependency_job_id":null,"html_url":"https://github.com/Beoum/grpc-client-promise-wrapper","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Beoum%2Fgrpc-client-promise-wrapper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Beoum%2Fgrpc-client-promise-wrapper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Beoum%2Fgrpc-client-promise-wrapper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Beoum%2Fgrpc-client-promise-wrapper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Beoum","download_url":"https://codeload.github.com/Beoum/grpc-client-promise-wrapper/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221705094,"owners_count":16866889,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["grpc","javascript","nodejs","typescript","wrapper"],"created_at":"2024-10-08T16:04:17.604Z","updated_at":"2025-03-18T03:30:45.665Z","avatar_url":"https://github.com/Beoum.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# grpc-client-promise-wrapper\n\n## Documentation\nUse async/await for @grpc/grpc-js package\n\n## Installation\n```sh\n$ npm install grpc-client-promise-wrapper\n```\n## Javascript\n```js\nconst promiseWrapper = require('grpc-client-promise-wrapper');\n```\n## Typescript\n```ts\nimport * as promiseWrapper from 'grpc-client-promise-wrapper';\n```\n\n## Example\n* test.proto\n```protobuf\nsyntax = \"proto3\";\n\npackage test;\n\nservice TestService {\n  rpc GetTestFn (inputParam) returns (returnValue);\n}\n\nmessage InputParam {\n  string inputParam = 1;\n}\n\nmessage ReturnValue {\n  string returnValue = 1;\n}\n```\n* app.js\n```javascript\nconst grpc = require('@grpc/grpc-js');\nconst protoLoader = require('@grpc/proto-loader');\nconst promiseWrapper = require('grpc-client-promise-wrapper');\n\nconst testStub = () =\u003e {\n  const packageDefinition = protoLoader.loadSync(path.join(__dirname, './test.proto'));\n  const testService = grpc.loadPackageDefinition(packageDefinition).test;\n  return promiseWrapper(new testService.TestService('localhost:3001', grpc.credentials.createInsecure()));\n};\n\nconst getTestFn = async (params) =\u003e {\n  return testStub().getTestFn(params);\n};\n```\n\n\n## License\n\n[MIT License](https://andreasonny.mit-license.org/2019)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeoum%2Fgrpc-client-promise-wrapper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbeoum%2Fgrpc-client-promise-wrapper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeoum%2Fgrpc-client-promise-wrapper/lists"}