Registry / devops / eol-commons-grpc

eol-commons-grpc

JSON →
library3.8.0jsnpmunverified

Common utilities for gRPC servers in TypeScript, version 3.8.0. Includes a script (eol-protogen) to generate protobuf models from proto files, reducing boilerplate. Designed for internal use at Newline Studio; not actively maintained for the broader community. No notable alternatives in the npm ecosystem for this specific workflow.

npm install eol-commons-grpc
INSTALL
IMPORT
SIG · EOL-COMMONS-GRPC
E
eol-commons-grpc
devopsjavascriptv3.8.0
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.

eol-protogen
npx eol-protogen
npx eol-commons-grpc
The CLI tool is invoked via npx, not imported as a module.
MainGrpcServer
import { MainGrpcServer } from 'eol-commons-grpc';
const MainGrpcServer = require('eol-commons-grpc').MainGrpcServer;
ESM import is preferred; the package is written in TypeScript and exports named symbols.
generateModels
import { generateModels } from 'eol-commons-grpc';
import generateModels from 'eol-commons-grpc';
Only named export available.

Shows how to generate protobuf models using eol-protogen and start a gRPC server with eol-commons-grpc.

// First, generate proto models // Run: npx eol-protogen -m ./src/models -p ./proto-internal -s services.draft.drafts services.draft.lotteries // Then use generated models in a gRPC server import { MainGrpcServer } from 'eol-commons-grpc'; import { DraftService } from './generated/models'; const server = new MainGrpcServer({ host: '0.0.0.0', port: 50051, services: [new DraftService()], }); server.start(); console.log('gRPC server started on port 50051');
Debug
Known issues
deprecatedThe package may not receive frequent updates; version 3.8.0 is stable but not actively maintained.
fix
Consider alternatives like grpc-js or grpc-tools if more active development is needed.
affects: >=3.8.0
gotchaThe CLI tool eol-protogen requires service names without .proto extension.
fix
Provide service names as 'services.draft.drafts' not 'services.draft.drafts.proto'.
affects: >=3.0.0
gotchaGenerated models are placed relative to --model path; default is ./src/models. Ensure this path exists.
fix
Create the output directory before running the command.
affects: >=3.0.0
Errors
Common errors & fixes
Error: Cannot find module 'eol-commons-grpc'
Package not installed or not in node_modules.
fix
Run npm install eol-commons-grpc
Error: [ts] Cannot find module 'eol-commons-grpc' or its corresponding type declarations.
TypeScript cannot resolve the module, possibly missing types.
fix
Ensure package is installed and tsconfig.json is configured correctly (e.g., esModuleInterop, moduleResolution: node).
ReferenceError: exports is not defined in ES module scope
Mix of CJS and ESM imports.
fix
Use import syntax instead of require() for all imports from this package.
Upgrade
Version history
3.8.0latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
10 hits · last 30 days
node
10
Resources
eol-commons-grpc — npm install eol-commons-grpc · libregistry