{"id":47290,"library":"compsci399-grpc-client","title":"COMPSCI399 gRPC Client Stubs","description":"Auto-generated client stubs for COMPSCI399 gRPC services, providing typed interfaces for Node.js/TypeScript (version 1.0.11), C# (.NET), and Python. Supports both client-side calling and server-side implementation. The package includes TypeScript type definitions and requires @grpc/grpc-js as a peer dependency. All language packages share the same version number (1.0.3 as of latest). Stubs are regenerated from .proto files via GitHub Actions. Key differentiator: multi-language support with consistent API across TypeScript, C#, and Python. Release cadence is tied to proto updates.","status":"active","version":"1.0.11","language":"javascript","source_language":"en","source_url":"https://github.com/capstone2025uoa/grpc","tags":["javascript","grpc","protobuf","typescript","compsci399"],"install":[{"cmd":"npm install compsci399-grpc-client","lang":"bash","label":"npm"},{"cmd":"yarn add compsci399-grpc-client","lang":"bash","label":"yarn"},{"cmd":"pnpm add compsci399-grpc-client","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Required to create gRPC channels, clients, and servers. Peer dependency.","package":"@grpc/grpc-js","optional":false},{"reason":"Peer dependency for type definitions.","package":"typescript","optional":true}],"imports":[{"note":"Package exports named exports 'user' and 'userService' (namespaces), not a default export.","wrong":"import user from 'compsci399-grpc-client'","symbol":"user","correct":"import { user, userService } from 'compsci399-grpc-client'"},{"note":"Both ESM and CJS are supported, but named import is preferred for TypeScript.","wrong":"const userService = require('compsci399-grpc-client').userService","symbol":"userService","correct":"import { userService } from 'compsci399-grpc-client'"},{"note":"Client classes are nested under the 'userService' namespace. Direct import of UserClient is not available.","wrong":"import { UserClient } from 'compsci399-grpc-client'","symbol":"UserClient","correct":"const client = new userService.UserClient(...)"}],"quickstart":{"code":"import * as grpc from '@grpc/grpc-js';\nimport { user, userService } from 'compsci399-grpc-client';\n\nconst request = new user.GetUserRequest();\nrequest.setId(123);\n\nconst client = new userService.UserClient(\n  'localhost:50051',\n  grpc.credentials.createInsecure()\n);\n\nclient.getUser(request, (err, response) => {\n  if (err) {\n    console.error(err);\n    return;\n  }\n  console.log(`User name: ${response.getName()}`);\n  console.log(`User email: ${response.getEmail()}`);\n});","lang":"typescript","description":"Demonstrates creating a gRPC client, building a request, making an RPC call, and handling the response with the TypeScript stubs."},"warnings":[{"fix":"Check the npm registry for the latest version; README may be outdated.","message":"All packages share the same version number; version 1.0.3 is the current stable release, but npm shows 1.0.11.","severity":"breaking","affected_versions":">=1.0.0"},{"fix":"Use import { user, userService } from 'compsci399-grpc-client'.","message":"Package exports are namespaced (user, userService), not flat exports. Attempting to import individual classes directly will fail.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Use grpc.credentials.createSsl() with proper certificates for production environments.","message":"The README uses grpc.credentials.createInsecure() which is insecure for production.","severity":"deprecated","affected_versions":">=1.0.0"},{"fix":"Run npm install @grpc/grpc-js alongside compsci399-grpc-client.","message":"The package requires @grpc/grpc-js as a peer dependency. Failing to install it will cause runtime errors.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"search_vec":"'/typescript':20 '1.0.11':22 '1.0.3':59 'across':81 'action':71 'api':80 'auto':6 'auto-gener':5 'c':23,83 'cadenc':87 'call':32 'client':3,8,30 'client-sid':29 'compsci399':1,11,97 'consist':79 'definit':43 'depend':50 'differenti':73 'file':68 'generat':7 'github':70 'grpc':2,12,94 'grpc/grpc-js':46 'implement':37 'includ':40 'interfac':16 'javascript':93 'key':72 'languag':52,76 'latest':62 'multi':75 'multi-languag':74 'net':24 'node.js':19 'node.js/typescript':18 'number':58 'packag':39,53 'peer':49 'proto':67,91 'protobuf':95 'provid':14 'python':26,85 'regener':65 'releas':86 'requir':45 'server':35 'server-sid':34 'servic':13 'share':54 'side':31,36 'stub':4,9,63 'support':27,77 'tie':89 'type':15,42 'typescript':41,82,96 'updat':92 'version':21,57 'via':69","created_at":"2026-06-07T16:50:46.362998+00:00","updated_at":"2026-06-07T16:50:46.362998+00:00","problems":[{"fix":"Run 'npm install @grpc/grpc-js' in your project directory.","cause":"Missing peer dependency @grpc/grpc-js.","error":"Error: Cannot find module '@grpc/grpc-js'"},{"fix":"Use 'import { user } from 'compsci399-grpc-client'' instead of 'import user from ...'.","cause":"Incorrect import - used default import instead of named import.","error":"TypeError: user.GetUserRequest is not a constructor"},{"fix":"Ensure you have installed @grpc/grpc-js and imported correctly: import { userService } from 'compsci399-grpc-client'.","cause":"Incorrect import of userService or missing @grpc/grpc-js.","error":"TypeError: userService.UserClient is not a constructor"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/capstone2025uoa/grpc#readme","github":"https://github.com/capstone2025uoa/grpc","docs":null,"changelog":null,"pypi":null,"npm":"compsci399-grpc-client","openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-07","next_check":"2026-09-05","install_tag":null}}