Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

grpc-server-js

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grpc-server-js - npm Package Compare versions

Comparing version 0.1.7 to 0.1.8

13

lib/index.d.ts

@@ -104,2 +104,4 @@ /// <reference types="node" />

export declare type ServiceError = StatusObject & Error;
export declare type ServerStatusResponse = Partial<StatusObject>;
export declare type ServerErrorResponse = ServerStatusResponse & Error;

@@ -123,3 +125,3 @@

export declare type sendUnaryData<ResponseType> =
(error: ServiceError | null,
(error: ServerErrorResponse | ServerStatusResponse | null,
value: ResponseType | null,

@@ -147,6 +149,13 @@ trailer?: Metadata,

export declare type UntypedHandleCall = HandleCall<any, any>;
export interface UntypedServiceImplementation {
[name: string]: UntypedHandleCall;
}
export declare class Server {
constructor(options?: object);
addProtoService(): void;
addService(service: ServiceDefinition, implementation: object): void;
addService(service: ServiceDefinition,
implementation: UntypedServiceImplementation): void;
bind(port: string, creds: ServerCredentials): Promise<void>;

@@ -153,0 +162,0 @@ bindAsync(port: string,

8

lib/server-call.js

@@ -155,3 +155,3 @@ 'use strict';

if (error.hasOwnProperty('message')) {
if ('message' in error) {
status.details = error.message;

@@ -162,6 +162,6 @@ } else {

if (error.hasOwnProperty('code') && Number.isInteger(error.code)) {
if ('code' in error && Number.isInteger(error.code)) {
status.code = error.code;
if (error.hasOwnProperty('details')) {
if ('details' in error && typeof error.details === 'string') {
status.details = error.details;

@@ -173,3 +173,3 @@ }

if (error.hasOwnProperty('metadata')) {
if ('metadata' in error && error.metadata !== undefined) {
status.metadata = error.metadata;

@@ -176,0 +176,0 @@ }

{
"name": "grpc-server-js",
"version": "0.1.7",
"version": "0.1.8",
"description": "Pure JavaScript gRPC Server",

@@ -26,3 +26,3 @@ "author": "Colin J. Ihrig <cjihrig@gmail.com> (http://www.cjihrig.com/)",

"dependencies": {
"@grpc/grpc-js": "0.5.1"
"@grpc/grpc-js": "0.5.3"
},

@@ -33,3 +33,3 @@ "devDependencies": {

"cb-barrier": "1.x.x",
"@hapi/lab": "19.x.x"
"@hapi/lab": "20.x.x"
},

@@ -36,0 +36,0 @@ "keywords": [

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc