Registry / devops / compsci399-grpc-client

compsci399-grpc-client

JSON →
library1.0.11jsnpmunverified

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.

npm install compsci399-grpc-client
INSTALL
IMPORT
SIG · COMPSCI399-GRPC-CL
C
compsci399-grpc-client
devopsjavascriptv1.0.11
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

user
import { user, userService } from 'compsci399-grpc-client'
import user from 'compsci399-grpc-client'
Package exports named exports 'user' and 'userService' (namespaces), not a default export.
userService
import { userService } from 'compsci399-grpc-client'
const userService = require('compsci399-grpc-client').userService
Both ESM and CJS are supported, but named import is preferred for TypeScript.
UserClient
const client = new userService.UserClient(...)
import { UserClient } from 'compsci399-grpc-client'
Client classes are nested under the 'userService' namespace. Direct import of UserClient is not available.

Demonstrates creating a gRPC client, building a request, making an RPC call, and handling the response with the TypeScript stubs.

import * as grpc from '@grpc/grpc-js'; import { user, userService } from 'compsci399-grpc-client'; const request = new user.GetUserRequest(); request.setId(123); const client = new userService.UserClient( 'localhost:50051', grpc.credentials.createInsecure() ); client.getUser(request, (err, response) => { if (err) { console.error(err); return; } console.log(`User name: ${response.getName()}`); console.log(`User email: ${response.getEmail()}`); });
Debug
Known issues
breakingAll packages share the same version number; version 1.0.3 is the current stable release, but npm shows 1.0.11.
fix
Check the npm registry for the latest version; README may be outdated.
affects: >=1.0.0
gotchaPackage exports are namespaced (user, userService), not flat exports. Attempting to import individual classes directly will fail.
fix
Use import { user, userService } from 'compsci399-grpc-client'.
affects: >=1.0.0
deprecatedThe README uses grpc.credentials.createInsecure() which is insecure for production.
fix
Use grpc.credentials.createSsl() with proper certificates for production environments.
affects: >=1.0.0
gotchaThe package requires @grpc/grpc-js as a peer dependency. Failing to install it will cause runtime errors.
fix
Run npm install @grpc/grpc-js alongside compsci399-grpc-client.
affects: >=1.0.0
Errors
Common errors & fixes
Error: Cannot find module '@grpc/grpc-js'
Missing peer dependency @grpc/grpc-js.
fix
Run 'npm install @grpc/grpc-js' in your project directory.
TypeError: user.GetUserRequest is not a constructor
Incorrect import - used default import instead of named import.
fix
Use 'import { user } from 'compsci399-grpc-client'' instead of 'import user from ...'.
TypeError: userService.UserClient is not a constructor
Incorrect import of userService or missing @grpc/grpc-js.
fix
Ensure you have installed @grpc/grpc-js and imported correctly: import { userService } from 'compsci399-grpc-client'.
Upgrade
Version history
1.0.11latest on npm
Audit
Dependencies
@grpc/grpc-jsrequiredRequired to create gRPC channels, clients, and servers. Peer dependency.
typescriptoptionalPeer dependency for type definitions.
Agent activity
8 hits · last 30 days
node
8
Resources
compsci399-grpc-client — npm install compsci399-grpc-client · libregistry