Socket
Socket
Sign inDemoInstall

@grpc/grpc-js

Package Overview
Dependencies
Maintainers
3
Versions
178
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@grpc/grpc-js - npm Package Compare versions

Comparing version 1.8.7 to 1.8.8

22

build/src/generated/grpc/channelz/v1/ChannelConnectivityState.d.ts

@@ -1,9 +0,11 @@

export declare enum _grpc_channelz_v1_ChannelConnectivityState_State {
UNKNOWN = 0,
IDLE = 1,
CONNECTING = 2,
READY = 3,
TRANSIENT_FAILURE = 4,
SHUTDOWN = 5
}
export declare const _grpc_channelz_v1_ChannelConnectivityState_State: {
readonly UNKNOWN: "UNKNOWN";
readonly IDLE: "IDLE";
readonly CONNECTING: "CONNECTING";
readonly READY: "READY";
readonly TRANSIENT_FAILURE: "TRANSIENT_FAILURE";
readonly SHUTDOWN: "SHUTDOWN";
};
export type _grpc_channelz_v1_ChannelConnectivityState_State = 'UNKNOWN' | 0 | 'IDLE' | 1 | 'CONNECTING' | 2 | 'READY' | 3 | 'TRANSIENT_FAILURE' | 4 | 'SHUTDOWN' | 5;
export type _grpc_channelz_v1_ChannelConnectivityState_State__Output = typeof _grpc_channelz_v1_ChannelConnectivityState_State[keyof typeof _grpc_channelz_v1_ChannelConnectivityState_State];
/**

@@ -14,3 +16,3 @@ * These come from the specified states in this document:

export interface ChannelConnectivityState {
'state'?: (_grpc_channelz_v1_ChannelConnectivityState_State | keyof typeof _grpc_channelz_v1_ChannelConnectivityState_State);
'state'?: (_grpc_channelz_v1_ChannelConnectivityState_State);
}

@@ -22,3 +24,3 @@ /**

export interface ChannelConnectivityState__Output {
'state': (keyof typeof _grpc_channelz_v1_ChannelConnectivityState_State);
'state': (_grpc_channelz_v1_ChannelConnectivityState_State__Output);
}

@@ -6,11 +6,10 @@ "use strict";

// Original file: proto/channelz.proto
var _grpc_channelz_v1_ChannelConnectivityState_State;
(function (_grpc_channelz_v1_ChannelConnectivityState_State) {
_grpc_channelz_v1_ChannelConnectivityState_State[_grpc_channelz_v1_ChannelConnectivityState_State["UNKNOWN"] = 0] = "UNKNOWN";
_grpc_channelz_v1_ChannelConnectivityState_State[_grpc_channelz_v1_ChannelConnectivityState_State["IDLE"] = 1] = "IDLE";
_grpc_channelz_v1_ChannelConnectivityState_State[_grpc_channelz_v1_ChannelConnectivityState_State["CONNECTING"] = 2] = "CONNECTING";
_grpc_channelz_v1_ChannelConnectivityState_State[_grpc_channelz_v1_ChannelConnectivityState_State["READY"] = 3] = "READY";
_grpc_channelz_v1_ChannelConnectivityState_State[_grpc_channelz_v1_ChannelConnectivityState_State["TRANSIENT_FAILURE"] = 4] = "TRANSIENT_FAILURE";
_grpc_channelz_v1_ChannelConnectivityState_State[_grpc_channelz_v1_ChannelConnectivityState_State["SHUTDOWN"] = 5] = "SHUTDOWN";
})(_grpc_channelz_v1_ChannelConnectivityState_State = exports._grpc_channelz_v1_ChannelConnectivityState_State || (exports._grpc_channelz_v1_ChannelConnectivityState_State = {}));
exports._grpc_channelz_v1_ChannelConnectivityState_State = {
UNKNOWN: 'UNKNOWN',
IDLE: 'IDLE',
CONNECTING: 'CONNECTING',
READY: 'READY',
TRANSIENT_FAILURE: 'TRANSIENT_FAILURE',
SHUTDOWN: 'SHUTDOWN',
};
//# sourceMappingURL=ChannelConnectivityState.js.map

@@ -7,9 +7,17 @@ import type { Timestamp as _google_protobuf_Timestamp, Timestamp__Output as _google_protobuf_Timestamp__Output } from '../../../google/protobuf/Timestamp';

*/
export declare enum _grpc_channelz_v1_ChannelTraceEvent_Severity {
CT_UNKNOWN = 0,
CT_INFO = 1,
CT_WARNING = 2,
CT_ERROR = 3
}
export declare const _grpc_channelz_v1_ChannelTraceEvent_Severity: {
readonly CT_UNKNOWN: "CT_UNKNOWN";
readonly CT_INFO: "CT_INFO";
readonly CT_WARNING: "CT_WARNING";
readonly CT_ERROR: "CT_ERROR";
};
/**
* The supported severity levels of trace events.
*/
export type _grpc_channelz_v1_ChannelTraceEvent_Severity = 'CT_UNKNOWN' | 0 | 'CT_INFO' | 1 | 'CT_WARNING' | 2 | 'CT_ERROR' | 3;
/**
* The supported severity levels of trace events.
*/
export type _grpc_channelz_v1_ChannelTraceEvent_Severity__Output = typeof _grpc_channelz_v1_ChannelTraceEvent_Severity[keyof typeof _grpc_channelz_v1_ChannelTraceEvent_Severity];
/**
* A trace event is an interesting thing that happened to a channel or

@@ -26,3 +34,3 @@ * subchannel, such as creation, address resolution, subchannel creation, etc.

*/
'severity'?: (_grpc_channelz_v1_ChannelTraceEvent_Severity | keyof typeof _grpc_channelz_v1_ChannelTraceEvent_Severity);
'severity'?: (_grpc_channelz_v1_ChannelTraceEvent_Severity);
/**

@@ -54,3 +62,3 @@ * When this event occurred.

*/
'severity': (keyof typeof _grpc_channelz_v1_ChannelTraceEvent_Severity);
'severity': (_grpc_channelz_v1_ChannelTraceEvent_Severity__Output);
/**

@@ -57,0 +65,0 @@ * When this event occurred.

@@ -9,9 +9,8 @@ "use strict";

*/
var _grpc_channelz_v1_ChannelTraceEvent_Severity;
(function (_grpc_channelz_v1_ChannelTraceEvent_Severity) {
_grpc_channelz_v1_ChannelTraceEvent_Severity[_grpc_channelz_v1_ChannelTraceEvent_Severity["CT_UNKNOWN"] = 0] = "CT_UNKNOWN";
_grpc_channelz_v1_ChannelTraceEvent_Severity[_grpc_channelz_v1_ChannelTraceEvent_Severity["CT_INFO"] = 1] = "CT_INFO";
_grpc_channelz_v1_ChannelTraceEvent_Severity[_grpc_channelz_v1_ChannelTraceEvent_Severity["CT_WARNING"] = 2] = "CT_WARNING";
_grpc_channelz_v1_ChannelTraceEvent_Severity[_grpc_channelz_v1_ChannelTraceEvent_Severity["CT_ERROR"] = 3] = "CT_ERROR";
})(_grpc_channelz_v1_ChannelTraceEvent_Severity = exports._grpc_channelz_v1_ChannelTraceEvent_Severity || (exports._grpc_channelz_v1_ChannelTraceEvent_Severity = {}));
exports._grpc_channelz_v1_ChannelTraceEvent_Severity = {
CT_UNKNOWN: 'CT_UNKNOWN',
CT_INFO: 'CT_INFO',
CT_WARNING: 'CT_WARNING',
CT_ERROR: 'CT_ERROR',
};
//# sourceMappingURL=ChannelTraceEvent.js.map

@@ -68,4 +68,4 @@ import { ClientDuplexStream, ClientReadableStream, ClientUnaryCall, ClientWritableStream, ServiceError } from './call';

export { StatusBuilder };
export { Listener } from './call-interface';
export { Requester, ListenerBuilder, RequesterBuilder, Interceptor, InterceptorOptions, InterceptorProvider, InterceptingCall, InterceptorConfigurationError, } from './client-interceptors';
export { Listener, InterceptingListener } from './call-interface';
export { Requester, ListenerBuilder, RequesterBuilder, Interceptor, InterceptorOptions, InterceptorProvider, InterceptingCall, InterceptorConfigurationError, NextCall } from './client-interceptors';
export { GrpcObject, ServiceClientConstructor, ProtobufTypeDefinition } from './make-client';

@@ -72,0 +72,0 @@ export { ChannelOptions } from './channel-options';

@@ -151,3 +151,8 @@ "use strict";

var _a;
(_a = this.listener) === null || _a === void 0 ? void 0 : _a.onReceiveStatus(statusObject);
// Explicitly construct status object to remove progress field
(_a = this.listener) === null || _a === void 0 ? void 0 : _a.onReceiveStatus({
code: statusObject.code,
details: statusObject.details,
metadata: statusObject.metadata
});
});

@@ -210,6 +215,9 @@ }

commitCallWithMostMessages() {
if (this.state === 'COMMITTED') {
return;
}
let mostMessages = -1;
let callWithMostMessages = -1;
for (const [index, childCall] of this.underlyingCalls.entries()) {
if (childCall.nextMessageToSend > mostMessages) {
if (childCall.state === 'ACTIVE' && childCall.nextMessageToSend > mostMessages) {
mostMessages = childCall.nextMessageToSend;

@@ -219,3 +227,10 @@ callWithMostMessages = index;

}
this.commitCall(callWithMostMessages);
if (callWithMostMessages === -1) {
/* There are no active calls, disable retries to force the next call that
* is started to be committed. */
this.state = 'TRANSPARENT_ONLY';
}
else {
this.commitCall(callWithMostMessages);
}
}

@@ -543,2 +558,6 @@ isStatusCodeInList(list, code) {

this.commitCallWithMostMessages();
// commitCallWithMostMessages can fail if we are between ping attempts
if (this.committedCallIndex === null) {
return;
}
const call = this.underlyingCalls[this.committedCallIndex];

@@ -545,0 +564,0 @@ bufferEntry.callback = context.callback;

{
"name": "@grpc/grpc-js",
"version": "1.8.7",
"version": "1.8.8",
"description": "gRPC Library for Node - pure JS implementation",

@@ -5,0 +5,0 @@ "homepage": "https://grpc.io/",

@@ -6,11 +6,27 @@ // Original file: proto/channelz.proto

export enum _grpc_channelz_v1_ChannelConnectivityState_State {
UNKNOWN = 0,
IDLE = 1,
CONNECTING = 2,
READY = 3,
TRANSIENT_FAILURE = 4,
SHUTDOWN = 5,
}
export const _grpc_channelz_v1_ChannelConnectivityState_State = {
UNKNOWN: 'UNKNOWN',
IDLE: 'IDLE',
CONNECTING: 'CONNECTING',
READY: 'READY',
TRANSIENT_FAILURE: 'TRANSIENT_FAILURE',
SHUTDOWN: 'SHUTDOWN',
} as const;
export type _grpc_channelz_v1_ChannelConnectivityState_State =
| 'UNKNOWN'
| 0
| 'IDLE'
| 1
| 'CONNECTING'
| 2
| 'READY'
| 3
| 'TRANSIENT_FAILURE'
| 4
| 'SHUTDOWN'
| 5
export type _grpc_channelz_v1_ChannelConnectivityState_State__Output = typeof _grpc_channelz_v1_ChannelConnectivityState_State[keyof typeof _grpc_channelz_v1_ChannelConnectivityState_State]
/**

@@ -21,3 +37,3 @@ * These come from the specified states in this document:

export interface ChannelConnectivityState {
'state'?: (_grpc_channelz_v1_ChannelConnectivityState_State | keyof typeof _grpc_channelz_v1_ChannelConnectivityState_State);
'state'?: (_grpc_channelz_v1_ChannelConnectivityState_State);
}

@@ -30,3 +46,3 @@

export interface ChannelConnectivityState__Output {
'state': (keyof typeof _grpc_channelz_v1_ChannelConnectivityState_State);
'state': (_grpc_channelz_v1_ChannelConnectivityState_State__Output);
}

@@ -12,10 +12,28 @@ // Original file: proto/channelz.proto

*/
export enum _grpc_channelz_v1_ChannelTraceEvent_Severity {
CT_UNKNOWN = 0,
CT_INFO = 1,
CT_WARNING = 2,
CT_ERROR = 3,
}
export const _grpc_channelz_v1_ChannelTraceEvent_Severity = {
CT_UNKNOWN: 'CT_UNKNOWN',
CT_INFO: 'CT_INFO',
CT_WARNING: 'CT_WARNING',
CT_ERROR: 'CT_ERROR',
} as const;
/**
* The supported severity levels of trace events.
*/
export type _grpc_channelz_v1_ChannelTraceEvent_Severity =
| 'CT_UNKNOWN'
| 0
| 'CT_INFO'
| 1
| 'CT_WARNING'
| 2
| 'CT_ERROR'
| 3
/**
* The supported severity levels of trace events.
*/
export type _grpc_channelz_v1_ChannelTraceEvent_Severity__Output = typeof _grpc_channelz_v1_ChannelTraceEvent_Severity[keyof typeof _grpc_channelz_v1_ChannelTraceEvent_Severity]
/**
* A trace event is an interesting thing that happened to a channel or

@@ -32,3 +50,3 @@ * subchannel, such as creation, address resolution, subchannel creation, etc.

*/
'severity'?: (_grpc_channelz_v1_ChannelTraceEvent_Severity | keyof typeof _grpc_channelz_v1_ChannelTraceEvent_Severity);
'severity'?: (_grpc_channelz_v1_ChannelTraceEvent_Severity);
/**

@@ -61,3 +79,3 @@ * When this event occurred.

*/
'severity': (keyof typeof _grpc_channelz_v1_ChannelTraceEvent_Severity);
'severity': (_grpc_channelz_v1_ChannelTraceEvent_Severity__Output);
/**

@@ -64,0 +82,0 @@ * When this event occurred.

@@ -240,3 +240,3 @@ /*

export { Listener } from './call-interface';
export { Listener, InterceptingListener } from './call-interface';

@@ -252,2 +252,3 @@ export {

InterceptorConfigurationError,
NextCall
} from './client-interceptors';

@@ -254,0 +255,0 @@

@@ -215,3 +215,8 @@ /*

process.nextTick(() => {
this.listener?.onReceiveStatus(statusObject);
// Explicitly construct status object to remove progress field
this.listener?.onReceiveStatus({
code: statusObject.code,
details: statusObject.details,
metadata: statusObject.metadata
});
});

@@ -277,6 +282,9 @@ }

private commitCallWithMostMessages() {
if (this.state === 'COMMITTED') {
return;
}
let mostMessages = -1;
let callWithMostMessages = -1;
for (const [index, childCall] of this.underlyingCalls.entries()) {
if (childCall.nextMessageToSend > mostMessages) {
if (childCall.state === 'ACTIVE' && childCall.nextMessageToSend > mostMessages) {
mostMessages = childCall.nextMessageToSend;

@@ -286,3 +294,9 @@ callWithMostMessages = index;

}
this.commitCall(callWithMostMessages);
if (callWithMostMessages === -1) {
/* There are no active calls, disable retries to force the next call that
* is started to be committed. */
this.state = 'TRANSPARENT_ONLY';
} else {
this.commitCall(callWithMostMessages);
}
}

@@ -607,3 +621,7 @@

this.commitCallWithMostMessages();
const call = this.underlyingCalls[this.committedCallIndex!];
// commitCallWithMostMessages can fail if we are between ping attempts
if (this.committedCallIndex === null) {
return;
}
const call = this.underlyingCalls[this.committedCallIndex];
bufferEntry.callback = context.callback;

@@ -610,0 +628,0 @@ if (call.state === 'ACTIVE' && call.nextMessageToSend === messageIndex) {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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