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.5.4 to 1.5.5

9

build/src/load-balancer-pick-first.js

@@ -134,3 +134,2 @@ "use strict";

* holding unused resources */
trace('Clearing out IDLE subchannel list');
this.resetSubchannelList();

@@ -235,5 +234,3 @@ this.updateState(connectivity_state_1.ConnectivityState.IDLE, new picker_1.QueuePicker(this));

connectivity_state_1.ConnectivityState.IDLE) {
trace('Start connecting to subchannel ' +
this.subchannels[subchannelIndex].getChannelzRef().id +
' with address ' +
trace('Start connecting to subchannel with address ' +
this.subchannels[subchannelIndex].getAddress());

@@ -249,3 +246,3 @@ process.nextTick(() => {

pickSubchannel(subchannel) {
trace('Pick subchannel ' + subchannel.getChannelzRef().id + ' with address ' + subchannel.getAddress());
trace('Pick subchannel with address ' + subchannel.getAddress());
if (this.currentPick !== null) {

@@ -337,7 +334,5 @@ this.currentPick.unref();

exitIdle() {
trace('exitIdle called');
for (const subchannel of this.subchannels) {
subchannel.startConnecting();
}
trace('state after trying to connect to existing subchannels: ' + connectivity_state_1.ConnectivityState[this.currentState]);
if (this.currentState === connectivity_state_1.ConnectivityState.IDLE) {

@@ -344,0 +339,0 @@ if (this.latestAddressList.length > 0) {

@@ -8,1 +8,2 @@ /// <reference types="node" />

export declare function trace(severity: LogVerbosity, tracer: string, text: string): void;
export declare function isTracerEnabled(tracer: string): boolean;

@@ -20,3 +20,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.trace = exports.log = exports.setLoggerVerbosity = exports.setLogger = exports.getLogger = void 0;
exports.isTracerEnabled = exports.trace = exports.log = exports.setLoggerVerbosity = exports.setLogger = exports.getLogger = void 0;
const constants_1 = require("./constants");

@@ -100,4 +100,3 @@ const DEFAULT_LOGGER = {

function trace(severity, tracer, text) {
if (!disabledTracers.has(tracer) &&
(allEnabled || enabledTracers.has(tracer))) {
if (isTracerEnabled(tracer)) {
exports.log(severity, new Date().toISOString() + ' | ' + tracer + ' | ' + text);

@@ -107,2 +106,7 @@ }

exports.trace = trace;
function isTracerEnabled(tracer) {
return !disabledTracers.has(tracer) &&
(allEnabled || enabledTracers.has(tracer));
}
exports.isTracerEnabled = isTracerEnabled;
//# sourceMappingURL=logging.js.map

@@ -116,2 +116,3 @@ import { ChannelCredentials } from './channel-credentials';

private refTrace;
private flowControlTrace;
private handleBackoffTimer;

@@ -118,0 +119,0 @@ /**

@@ -34,2 +34,3 @@ "use strict";

const TRACER_NAME = 'subchannel';
const FLOW_CONTROL_TRACER_NAME = 'subchannel_flowctrl';
const MIN_CONNECT_TIMEOUT_MS = 20000;

@@ -261,2 +262,5 @@ const INITIAL_BACKOFF_MS = 1000;

}
flowControlTrace(text) {
logging.trace(constants_1.LogVerbosity.DEBUG, FLOW_CONTROL_TRACER_NAME, '(' + this.channelzRef.id + ') ' + this.subchannelAddressString + ' ' + text);
}
handleBackoffTimer() {

@@ -433,2 +437,16 @@ if (this.continueConnecting) {

});
if (logging.isTracerEnabled(TRACER_NAME)) {
session.on('remoteSettings', (settings) => {
this.trace('new settings received' +
(this.session !== session ? ' on the old connection' : '') +
': ' +
JSON.stringify(settings));
});
session.on('localSettings', (settings) => {
this.trace('local settings acknowledged by remote' +
(this.session !== session ? ' on the old connection' : '') +
': ' +
JSON.stringify(settings));
});
}
}

@@ -656,2 +674,6 @@ startConnectingInternal() {

headersString);
this.flowControlTrace('local window size: ' +
this.session.state.localWindowSize +
' remote window size: ' +
this.session.state.remoteWindowSize);
const streamSession = this.session;

@@ -711,3 +733,2 @@ let statsTracker;

if (this.connectivityState === connectivity_state_1.ConnectivityState.TRANSIENT_FAILURE) {
this.trace('startConnecting deferred by backoff timer');
this.continueConnecting = true;

@@ -714,0 +735,0 @@ }

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

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

@@ -188,3 +188,2 @@ /*

* holding unused resources */
trace('Clearing out IDLE subchannel list');
this.resetSubchannelList();

@@ -303,5 +302,3 @@ this.updateState(ConnectivityState.IDLE, new QueuePicker(this));

trace(
'Start connecting to subchannel ' +
this.subchannels[subchannelIndex].getChannelzRef().id +
' with address ' +
'Start connecting to subchannel with address ' +
this.subchannels[subchannelIndex].getAddress()

@@ -319,3 +316,3 @@ );

private pickSubchannel(subchannel: Subchannel) {
trace('Pick subchannel ' + subchannel.getChannelzRef().id + ' with address ' + subchannel.getAddress());
trace('Pick subchannel with address ' + subchannel.getAddress());
if (this.currentPick !== null) {

@@ -434,7 +431,5 @@ this.currentPick.unref();

exitIdle() {
trace('exitIdle called');
for (const subchannel of this.subchannels) {
subchannel.startConnecting();
}
trace('state after trying to connect to existing subchannels: ' + ConnectivityState[this.currentState]);
if (this.currentState === ConnectivityState.IDLE) {

@@ -441,0 +436,0 @@ if (this.latestAddressList.length > 0) {

@@ -111,8 +111,10 @@ /*

): void {
if (
!disabledTracers.has(tracer) &&
(allEnabled || enabledTracers.has(tracer))
) {
if (isTracerEnabled(tracer)) {
log(severity, new Date().toISOString() + ' | ' + tracer + ' | ' + text);
}
}
export function isTracerEnabled(tracer: string): boolean {
return !disabledTracers.has(tracer) &&
(allEnabled || enabledTracers.has(tracer));
}

@@ -44,2 +44,3 @@ /*

const TRACER_NAME = 'subchannel';
const FLOW_CONTROL_TRACER_NAME = 'subchannel_flowctrl';

@@ -328,2 +329,6 @@ const MIN_CONNECT_TIMEOUT_MS = 20000;

private flowControlTrace(text: string): void {
logging.trace(LogVerbosity.DEBUG, FLOW_CONTROL_TRACER_NAME, '(' + this.channelzRef.id + ') ' + this.subchannelAddressString + ' ' + text);
}
private handleBackoffTimer() {

@@ -560,2 +565,20 @@ if (this.continueConnecting) {

});
if (logging.isTracerEnabled(TRACER_NAME)) {
session.on('remoteSettings', (settings: http2.Settings) => {
this.trace(
'new settings received' +
(this.session !== session ? ' on the old connection' : '') +
': ' +
JSON.stringify(settings)
);
});
session.on('localSettings', (settings: http2.Settings) => {
this.trace(
'local settings acknowledged by remote' +
(this.session !== session ? ' on the old connection' : '') +
': ' +
JSON.stringify(settings)
);
});
}
}

@@ -836,2 +859,8 @@

);
this.flowControlTrace(
'local window size: ' +
this.session!.state.localWindowSize +
' remote window size: ' +
this.session!.state.remoteWindowSize
);
const streamSession = this.session;

@@ -894,3 +923,2 @@ let statsTracker: SubchannelCallStatsTracker;

if (this.connectivityState === ConnectivityState.TRANSIENT_FAILURE) {
this.trace('startConnecting deferred by backoff timer')
this.continueConnecting = true;

@@ -897,0 +925,0 @@ }

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