mirror of https://github.com/grpc/grpc-node.git
grpc-js: Enable the noUnusedLocals TypeScript compiler option
This commit is contained in:
parent
45e277547f
commit
713a2c9bd1
|
@ -38,14 +38,6 @@ export type CheckServerIdentityCallback = (
|
||||||
cert: PeerCertificate
|
cert: PeerCertificate
|
||||||
) => Error | undefined;
|
) => Error | undefined;
|
||||||
|
|
||||||
function bufferOrNullEqual(buf1: Buffer | null, buf2: Buffer | null) {
|
|
||||||
if (buf1 === null && buf2 === null) {
|
|
||||||
return true;
|
|
||||||
} else {
|
|
||||||
return buf1 !== null && buf2 !== null && buf1.equals(buf2);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Additional peer verification options that can be set when creating
|
* Additional peer verification options that can be set when creating
|
||||||
* SSL credentials.
|
* SSL credentials.
|
||||||
|
@ -196,7 +188,7 @@ class SecureChannelCredentialsImpl extends ChannelCredentials {
|
||||||
private verifyOptions: VerifyOptions
|
private verifyOptions: VerifyOptions
|
||||||
) {
|
) {
|
||||||
super();
|
super();
|
||||||
this.connectionOptions = {
|
this.connectionOptions = {
|
||||||
secureContext
|
secureContext
|
||||||
};
|
};
|
||||||
// Node asserts that this option is a function, so we cannot pass undefined
|
// Node asserts that this option is a function, so we cannot pass undefined
|
||||||
|
@ -225,7 +217,7 @@ class SecureChannelCredentialsImpl extends ChannelCredentials {
|
||||||
}
|
}
|
||||||
if (other instanceof SecureChannelCredentialsImpl) {
|
if (other instanceof SecureChannelCredentialsImpl) {
|
||||||
return (
|
return (
|
||||||
this.secureContext === other.secureContext &&
|
this.secureContext === other.secureContext &&
|
||||||
this.verifyOptions.checkServerIdentity === other.verifyOptions.checkServerIdentity
|
this.verifyOptions.checkServerIdentity === other.verifyOptions.checkServerIdentity
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -32,7 +32,6 @@ import {
|
||||||
import { Status } from './constants';
|
import { Status } from './constants';
|
||||||
import { Channel } from './channel';
|
import { Channel } from './channel';
|
||||||
import { CallOptions } from './client';
|
import { CallOptions } from './client';
|
||||||
import { CallCredentials } from './call-credentials';
|
|
||||||
import { ClientMethodDefinition } from './make-client';
|
import { ClientMethodDefinition } from './make-client';
|
||||||
import { getErrorMessage } from './error';
|
import { getErrorMessage } from './error';
|
||||||
|
|
||||||
|
|
|
@ -282,7 +282,7 @@ export class CompressionFilter extends BaseFilter implements Filter {
|
||||||
export class CompressionFilterFactory
|
export class CompressionFilterFactory
|
||||||
implements FilterFactory<CompressionFilter> {
|
implements FilterFactory<CompressionFilter> {
|
||||||
private sharedFilterConfig: SharedCompressionFilterConfig = {};
|
private sharedFilterConfig: SharedCompressionFilterConfig = {};
|
||||||
constructor(private readonly channel: Channel, private readonly options: ChannelOptions) {}
|
constructor(channel: Channel, private readonly options: ChannelOptions) {}
|
||||||
createFilter(): CompressionFilter {
|
createFilter(): CompressionFilter {
|
||||||
return new CompressionFilter(this.options, this.sharedFilterConfig);
|
return new CompressionFilter(this.options, this.sharedFilterConfig);
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,9 +43,7 @@ import {
|
||||||
loadPackageDefinition,
|
loadPackageDefinition,
|
||||||
makeClientConstructor,
|
makeClientConstructor,
|
||||||
MethodDefinition,
|
MethodDefinition,
|
||||||
ProtobufTypeDefinition,
|
|
||||||
Serialize,
|
Serialize,
|
||||||
ServiceClientConstructor,
|
|
||||||
ServiceDefinition,
|
ServiceDefinition,
|
||||||
} from './make-client';
|
} from './make-client';
|
||||||
import { Metadata, MetadataOptions, MetadataValue } from './metadata';
|
import { Metadata, MetadataOptions, MetadataValue } from './metadata';
|
||||||
|
|
|
@ -20,7 +20,7 @@ import { ChannelOptions } from './channel-options';
|
||||||
import { ResolvingLoadBalancer } from './resolving-load-balancer';
|
import { ResolvingLoadBalancer } from './resolving-load-balancer';
|
||||||
import { SubchannelPool, getSubchannelPool } from './subchannel-pool';
|
import { SubchannelPool, getSubchannelPool } from './subchannel-pool';
|
||||||
import { ChannelControlHelper } from './load-balancer';
|
import { ChannelControlHelper } from './load-balancer';
|
||||||
import { UnavailablePicker, Picker, PickResultType } from './picker';
|
import { UnavailablePicker, Picker } from './picker';
|
||||||
import { Metadata } from './metadata';
|
import { Metadata } from './metadata';
|
||||||
import { Status, LogVerbosity, Propagate } from './constants';
|
import { Status, LogVerbosity, Propagate } from './constants';
|
||||||
import { FilterStackFactory } from './filter-stack';
|
import { FilterStackFactory } from './filter-stack';
|
||||||
|
@ -31,22 +31,19 @@ import {
|
||||||
getDefaultAuthority,
|
getDefaultAuthority,
|
||||||
mapUriDefaultScheme,
|
mapUriDefaultScheme,
|
||||||
} from './resolver';
|
} from './resolver';
|
||||||
import { trace, log } from './logging';
|
import { trace } from './logging';
|
||||||
import { SubchannelAddress } from './subchannel-address';
|
import { SubchannelAddress } from './subchannel-address';
|
||||||
import { MaxMessageSizeFilterFactory } from './max-message-size-filter';
|
import { MaxMessageSizeFilterFactory } from './max-message-size-filter';
|
||||||
import { mapProxyName } from './http_proxy';
|
import { mapProxyName } from './http_proxy';
|
||||||
import { GrpcUri, parseUri, splitHostPort, uriToString } from './uri-parser';
|
import { GrpcUri, parseUri, uriToString } from './uri-parser';
|
||||||
import { ServerSurfaceCall } from './server-call';
|
import { ServerSurfaceCall } from './server-call';
|
||||||
import { Filter } from './filter';
|
|
||||||
|
|
||||||
import { ConnectivityState } from './connectivity-state';
|
import { ConnectivityState } from './connectivity-state';
|
||||||
import { ChannelInfo, ChannelRef, ChannelzCallTracker, ChannelzChildrenTracker, ChannelzTrace, registerChannelzChannel, SubchannelRef, unregisterChannelzRef } from './channelz';
|
import { ChannelInfo, ChannelRef, ChannelzCallTracker, ChannelzChildrenTracker, ChannelzTrace, registerChannelzChannel, SubchannelRef, unregisterChannelzRef } from './channelz';
|
||||||
import { Subchannel } from './subchannel';
|
|
||||||
import { LoadBalancingCall } from './load-balancing-call';
|
import { LoadBalancingCall } from './load-balancing-call';
|
||||||
import { CallCredentials } from './call-credentials';
|
import { CallCredentials } from './call-credentials';
|
||||||
import { Call, CallStreamOptions, InterceptingListener, MessageContext, StatusObject } from './call-interface';
|
import { Call, CallStreamOptions, StatusObject } from './call-interface';
|
||||||
import { SubchannelCall } from './subchannel-call';
|
import { Deadline, deadlineToString } from './deadline';
|
||||||
import { Deadline, deadlineToString, getDeadlineTimeoutString } from './deadline';
|
|
||||||
import { ResolvingCall } from './resolving-call';
|
import { ResolvingCall } from './resolving-call';
|
||||||
import { getNextCallNumber } from './call-number';
|
import { getNextCallNumber } from './call-number';
|
||||||
import { restrictControlPlaneStatusCode } from './control-plane-status';
|
import { restrictControlPlaneStatusCode } from './control-plane-status';
|
||||||
|
@ -112,7 +109,7 @@ class ChannelSubchannelWrapper extends BaseSubchannelWrapper implements Subchann
|
||||||
}
|
}
|
||||||
|
|
||||||
export class InternalChannel {
|
export class InternalChannel {
|
||||||
|
|
||||||
private resolvingLoadBalancer: ResolvingLoadBalancer;
|
private resolvingLoadBalancer: ResolvingLoadBalancer;
|
||||||
private subchannelPool: SubchannelPool;
|
private subchannelPool: SubchannelPool;
|
||||||
private connectivityState: ConnectivityState = ConnectivityState.IDLE;
|
private connectivityState: ConnectivityState = ConnectivityState.IDLE;
|
||||||
|
@ -376,7 +373,7 @@ export class InternalChannel {
|
||||||
trace(
|
trace(
|
||||||
LogVerbosity.DEBUG,
|
LogVerbosity.DEBUG,
|
||||||
'connectivity_state',
|
'connectivity_state',
|
||||||
'(' + this.channelzRef.id + ') ' +
|
'(' + this.channelzRef.id + ') ' +
|
||||||
uriToString(this.target) +
|
uriToString(this.target) +
|
||||||
' ' +
|
' ' +
|
||||||
ConnectivityState[this.connectivityState] +
|
ConnectivityState[this.connectivityState] +
|
||||||
|
@ -601,7 +598,7 @@ export class InternalChannel {
|
||||||
/**
|
/**
|
||||||
* Get the channelz reference object for this channel. The returned value is
|
* Get the channelz reference object for this channel. The returned value is
|
||||||
* garbage if channelz is disabled for this channel.
|
* garbage if channelz is disabled for this channel.
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
getChannelzRef() {
|
getChannelzRef() {
|
||||||
return this.channelzRef;
|
return this.channelzRef;
|
||||||
|
|
|
@ -20,11 +20,9 @@ import { ConnectivityState } from "./connectivity-state";
|
||||||
import { LogVerbosity, Status } from "./constants";
|
import { LogVerbosity, Status } from "./constants";
|
||||||
import { durationToMs, isDuration, msToDuration } from "./duration";
|
import { durationToMs, isDuration, msToDuration } from "./duration";
|
||||||
import { ChannelControlHelper, createChildChannelControlHelper, registerLoadBalancerType } from "./experimental";
|
import { ChannelControlHelper, createChildChannelControlHelper, registerLoadBalancerType } from "./experimental";
|
||||||
import { BaseFilter, Filter, FilterFactory } from "./filter";
|
|
||||||
import { getFirstUsableConfig, LoadBalancer, LoadBalancingConfig, validateLoadBalancingConfig } from "./load-balancer";
|
import { getFirstUsableConfig, LoadBalancer, LoadBalancingConfig, validateLoadBalancingConfig } from "./load-balancer";
|
||||||
import { ChildLoadBalancerHandler } from "./load-balancer-child-handler";
|
import { ChildLoadBalancerHandler } from "./load-balancer-child-handler";
|
||||||
import { PickArgs, Picker, PickResult, PickResultType, QueuePicker, UnavailablePicker } from "./picker";
|
import { PickArgs, Picker, PickResult, PickResultType } from "./picker";
|
||||||
import { Subchannel } from "./subchannel";
|
|
||||||
import { SubchannelAddress, subchannelAddressToString } from "./subchannel-address";
|
import { SubchannelAddress, subchannelAddressToString } from "./subchannel-address";
|
||||||
import { BaseSubchannelWrapper, ConnectivityStateListener, SubchannelInterface } from "./subchannel-interface";
|
import { BaseSubchannelWrapper, ConnectivityStateListener, SubchannelInterface } from "./subchannel-interface";
|
||||||
import * as logging from './logging';
|
import * as logging from './logging';
|
||||||
|
|
|
@ -16,7 +16,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { ChannelOptions } from './channel-options';
|
import { ChannelOptions } from './channel-options';
|
||||||
import { Subchannel } from './subchannel';
|
|
||||||
import { SubchannelAddress } from './subchannel-address';
|
import { SubchannelAddress } from './subchannel-address';
|
||||||
import { ConnectivityState } from './connectivity-state';
|
import { ConnectivityState } from './connectivity-state';
|
||||||
import { Picker } from './picker';
|
import { Picker } from './picker';
|
||||||
|
@ -58,8 +57,8 @@ export interface ChannelControlHelper {
|
||||||
* parent while letting others pass through to the parent unmodified. This
|
* parent while letting others pass through to the parent unmodified. This
|
||||||
* allows other code to create these children without needing to know about
|
* allows other code to create these children without needing to know about
|
||||||
* all of the methods to be passed through.
|
* all of the methods to be passed through.
|
||||||
* @param parent
|
* @param parent
|
||||||
* @param overrides
|
* @param overrides
|
||||||
*/
|
*/
|
||||||
export function createChildChannelControlHelper(parent: ChannelControlHelper, overrides: Partial<ChannelControlHelper>): ChannelControlHelper {
|
export function createChildChannelControlHelper(parent: ChannelControlHelper, overrides: Partial<ChannelControlHelper>): ChannelControlHelper {
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -21,7 +21,6 @@ import { SubchannelCall } from "./subchannel-call";
|
||||||
import { ConnectivityState } from "./connectivity-state";
|
import { ConnectivityState } from "./connectivity-state";
|
||||||
import { LogVerbosity, Status } from "./constants";
|
import { LogVerbosity, Status } from "./constants";
|
||||||
import { Deadline, getDeadlineTimeoutString } from "./deadline";
|
import { Deadline, getDeadlineTimeoutString } from "./deadline";
|
||||||
import { FilterStack, FilterStackFactory } from "./filter-stack";
|
|
||||||
import { InternalChannel } from "./internal-channel";
|
import { InternalChannel } from "./internal-channel";
|
||||||
import { Metadata } from "./metadata";
|
import { Metadata } from "./metadata";
|
||||||
import { PickResultType } from "./picker";
|
import { PickResultType } from "./picker";
|
||||||
|
@ -48,7 +47,6 @@ export class LoadBalancingCall implements Call {
|
||||||
private readPending = false;
|
private readPending = false;
|
||||||
private pendingMessage: {context: MessageContext, message: Buffer} | null = null;
|
private pendingMessage: {context: MessageContext, message: Buffer} | null = null;
|
||||||
private pendingHalfClose = false;
|
private pendingHalfClose = false;
|
||||||
private pendingChildStatus: StatusObject | null = null;
|
|
||||||
private ended = false;
|
private ended = false;
|
||||||
private serviceUrl: string;
|
private serviceUrl: string;
|
||||||
private metadata: Metadata | null = null;
|
private metadata: Metadata | null = null;
|
||||||
|
@ -104,9 +102,9 @@ export class LoadBalancingCall implements Call {
|
||||||
}
|
}
|
||||||
this.trace('Pick called')
|
this.trace('Pick called')
|
||||||
const pickResult = this.channel.doPick(this.metadata, this.callConfig.pickInformation);
|
const pickResult = this.channel.doPick(this.metadata, this.callConfig.pickInformation);
|
||||||
const subchannelString = pickResult.subchannel ?
|
const subchannelString = pickResult.subchannel ?
|
||||||
'(' + pickResult.subchannel.getChannelzRef().id + ') ' + pickResult.subchannel.getAddress() :
|
'(' + pickResult.subchannel.getChannelzRef().id + ') ' + pickResult.subchannel.getAddress() :
|
||||||
'' + pickResult.subchannel;
|
'' + pickResult.subchannel;
|
||||||
this.trace(
|
this.trace(
|
||||||
'Pick result: ' +
|
'Pick result: ' +
|
||||||
PickResultType[pickResult.pickResultType] +
|
PickResultType[pickResult.pickResultType] +
|
||||||
|
@ -280,4 +278,4 @@ export class LoadBalancingCall implements Call {
|
||||||
getCallNumber(): number {
|
getCallNumber(): number {
|
||||||
return this.callNumber;
|
return this.callNumber;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,7 @@ export class MaxMessageSizeFilter extends BaseFilter implements Filter {
|
||||||
private maxSendMessageSize: number = DEFAULT_MAX_SEND_MESSAGE_LENGTH;
|
private maxSendMessageSize: number = DEFAULT_MAX_SEND_MESSAGE_LENGTH;
|
||||||
private maxReceiveMessageSize: number = DEFAULT_MAX_RECEIVE_MESSAGE_LENGTH;
|
private maxReceiveMessageSize: number = DEFAULT_MAX_RECEIVE_MESSAGE_LENGTH;
|
||||||
constructor(
|
constructor(
|
||||||
private readonly options: ChannelOptions
|
options: ChannelOptions
|
||||||
) {
|
) {
|
||||||
super();
|
super();
|
||||||
if ('grpc.max_send_message_length' in options) {
|
if ('grpc.max_send_message_length' in options) {
|
||||||
|
|
|
@ -229,11 +229,6 @@ export class Metadata {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
// For compatibility with the other Metadata implementation
|
|
||||||
private _getCoreRepresentation() {
|
|
||||||
return this.internalRepr;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This modifies the behavior of JSON.stringify to show an object
|
* This modifies the behavior of JSON.stringify to show an object
|
||||||
* representation of the metadata map.
|
* representation of the metadata map.
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { Duplex, Readable, Writable } from 'stream';
|
import { Readable, Writable } from 'stream';
|
||||||
import { EmitterAugmentation1 } from './events';
|
import { EmitterAugmentation1 } from './events';
|
||||||
|
|
||||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||||
|
|
|
@ -42,7 +42,7 @@ class IpResolver implements Resolver {
|
||||||
private addresses: SubchannelAddress[] = [];
|
private addresses: SubchannelAddress[] = [];
|
||||||
private error: StatusObject | null = null;
|
private error: StatusObject | null = null;
|
||||||
constructor(
|
constructor(
|
||||||
private target: GrpcUri,
|
target: GrpcUri,
|
||||||
private listener: ResolverListener,
|
private listener: ResolverListener,
|
||||||
channelOptions: ChannelOptions
|
channelOptions: ChannelOptions
|
||||||
) {
|
) {
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
import { CallCredentials } from "./call-credentials";
|
import { CallCredentials } from "./call-credentials";
|
||||||
import { Call, CallStreamOptions, InterceptingListener, MessageContext, StatusObject } from "./call-interface";
|
import { Call, CallStreamOptions, InterceptingListener, MessageContext, StatusObject } from "./call-interface";
|
||||||
import { LogVerbosity, Propagate, Status } from "./constants";
|
import { LogVerbosity, Propagate, Status } from "./constants";
|
||||||
import { Deadline, deadlineToString, getDeadlineTimeoutString, getRelativeTimeout, minDeadline } from "./deadline";
|
import { Deadline, deadlineToString, getRelativeTimeout, minDeadline } from "./deadline";
|
||||||
import { FilterStack, FilterStackFactory } from "./filter-stack";
|
import { FilterStack, FilterStackFactory } from "./filter-stack";
|
||||||
import { InternalChannel } from "./internal-channel";
|
import { InternalChannel } from "./internal-channel";
|
||||||
import { Metadata } from "./metadata";
|
import { Metadata } from "./metadata";
|
||||||
|
@ -276,4 +276,4 @@ export class ResolvingCall implements Call {
|
||||||
getCallNumber(): number {
|
getCallNumber(): number {
|
||||||
return this.callNumber;
|
return this.callNumber;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,7 +36,6 @@ import { SubchannelAddress } from './subchannel-address';
|
||||||
import { GrpcUri, uriToString } from './uri-parser';
|
import { GrpcUri, uriToString } from './uri-parser';
|
||||||
import { ChildLoadBalancerHandler } from './load-balancer-child-handler';
|
import { ChildLoadBalancerHandler } from './load-balancer-child-handler';
|
||||||
import { ChannelOptions } from './channel-options';
|
import { ChannelOptions } from './channel-options';
|
||||||
import { PickFirstLoadBalancingConfig } from './load-balancer-pick-first';
|
|
||||||
|
|
||||||
const TRACER_NAME = 'resolving_load_balancer';
|
const TRACER_NAME = 'resolving_load_balancer';
|
||||||
|
|
||||||
|
@ -44,8 +43,6 @@ function trace(text: string): void {
|
||||||
logging.trace(LogVerbosity.DEBUG, TRACER_NAME, text);
|
logging.trace(LogVerbosity.DEBUG, TRACER_NAME, text);
|
||||||
}
|
}
|
||||||
|
|
||||||
const DEFAULT_LOAD_BALANCER_NAME = 'pick_first';
|
|
||||||
|
|
||||||
function getDefaultConfigSelector(
|
function getDefaultConfigSelector(
|
||||||
serviceConfig: ServiceConfig | null
|
serviceConfig: ServiceConfig | null
|
||||||
): ConfigSelector {
|
): ConfigSelector {
|
||||||
|
@ -137,7 +134,7 @@ export class ResolvingLoadBalancer implements LoadBalancer {
|
||||||
constructor(
|
constructor(
|
||||||
private readonly target: GrpcUri,
|
private readonly target: GrpcUri,
|
||||||
private readonly channelControlHelper: ChannelControlHelper,
|
private readonly channelControlHelper: ChannelControlHelper,
|
||||||
private readonly channelOptions: ChannelOptions,
|
channelOptions: ChannelOptions,
|
||||||
private readonly onSuccessfulResolution: ResolutionCallback,
|
private readonly onSuccessfulResolution: ResolutionCallback,
|
||||||
private readonly onFailedResolution: ResolutionFailureCallback
|
private readonly onFailedResolution: ResolutionFailureCallback
|
||||||
) {
|
) {
|
||||||
|
|
|
@ -268,6 +268,9 @@ export class ServerDuplexStreamImpl<RequestType, ResponseType>
|
||||||
implements ServerDuplexStream<RequestType, ResponseType>
|
implements ServerDuplexStream<RequestType, ResponseType>
|
||||||
{
|
{
|
||||||
cancelled: boolean;
|
cancelled: boolean;
|
||||||
|
/* This field appears to be unsued, but it is actually used in _final, which is assiged from
|
||||||
|
* ServerWritableStreamImpl.prototype._final below. */
|
||||||
|
// @ts-ignore noUnusedLocals
|
||||||
private trailingMetadata: Metadata;
|
private trailingMetadata: Metadata;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
|
@ -419,7 +422,7 @@ export class Http2ServerCallStream<
|
||||||
constructor(
|
constructor(
|
||||||
private stream: http2.ServerHttp2Stream,
|
private stream: http2.ServerHttp2Stream,
|
||||||
private handler: Handler<RequestType, ResponseType>,
|
private handler: Handler<RequestType, ResponseType>,
|
||||||
private options: ChannelOptions
|
options: ChannelOptions
|
||||||
) {
|
) {
|
||||||
super();
|
super();
|
||||||
|
|
||||||
|
@ -720,7 +723,7 @@ export class Http2ServerCallStream<
|
||||||
[GRPC_MESSAGE_HEADER]: encodeURI(statusObj.details),
|
[GRPC_MESSAGE_HEADER]: encodeURI(statusObj.details),
|
||||||
...statusObj.metadata?.toHttp2Headers(),
|
...statusObj.metadata?.toHttp2Headers(),
|
||||||
};
|
};
|
||||||
|
|
||||||
this.stream.sendTrailers(trailersToSend);
|
this.stream.sendTrailers(trailersToSend);
|
||||||
this.statusSent = true;
|
this.statusSent = true;
|
||||||
});
|
});
|
||||||
|
|
|
@ -141,10 +141,6 @@ interface ChannelzSessionInfo {
|
||||||
lastMessageReceivedTimestamp: Date | null;
|
lastMessageReceivedTimestamp: Date | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface ChannelzListenerInfo {
|
|
||||||
ref: SocketRef;
|
|
||||||
}
|
|
||||||
|
|
||||||
export class Server {
|
export class Server {
|
||||||
private http2ServerList: { server: (http2.Http2Server | http2.Http2SecureServer), channelzRef: SocketRef }[] = [];
|
private http2ServerList: { server: (http2.Http2Server | http2.Http2SecureServer), channelzRef: SocketRef }[] = [];
|
||||||
|
|
||||||
|
@ -242,7 +238,7 @@ export class Server {
|
||||||
private trace(text: string): void {
|
private trace(text: string): void {
|
||||||
logging.trace(LogVerbosity.DEBUG, TRACER_NAME, '(' + this.channelzRef.id + ') ' + text);
|
logging.trace(LogVerbosity.DEBUG, TRACER_NAME, '(' + this.channelzRef.id + ') ' + text);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
addProtoService(): never {
|
addProtoService(): never {
|
||||||
throw new Error('Not implemented. Use addService() instead');
|
throw new Error('Not implemented. Use addService() instead');
|
||||||
|
@ -743,7 +739,7 @@ export class Server {
|
||||||
/**
|
/**
|
||||||
* Get the channelz reference object for this server. The returned value is
|
* Get the channelz reference object for this server. The returned value is
|
||||||
* garbage if channelz is disabled for this server.
|
* garbage if channelz is disabled for this server.
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
getChannelzRef() {
|
getChannelzRef() {
|
||||||
return this.channelzRef;
|
return this.channelzRef;
|
||||||
|
@ -792,14 +788,14 @@ export class Server {
|
||||||
|
|
||||||
return handler
|
return handler
|
||||||
}
|
}
|
||||||
|
|
||||||
private _respondWithError<T extends Partial<ServiceError>>(
|
private _respondWithError<T extends Partial<ServiceError>>(
|
||||||
err: T,
|
err: T,
|
||||||
stream: http2.ServerHttp2Stream,
|
stream: http2.ServerHttp2Stream,
|
||||||
channelzSessionInfo: ChannelzSessionInfo | null = null
|
channelzSessionInfo: ChannelzSessionInfo | null = null
|
||||||
) {
|
) {
|
||||||
const call = new Http2ServerCallStream(stream, null!, this.options);
|
const call = new Http2ServerCallStream(stream, null!, this.options);
|
||||||
|
|
||||||
if (err.code === undefined) {
|
if (err.code === undefined) {
|
||||||
err.code = Status.INTERNAL;
|
err.code = Status.INTERNAL;
|
||||||
}
|
}
|
||||||
|
@ -814,7 +810,7 @@ export class Server {
|
||||||
|
|
||||||
private _channelzHandler(stream: http2.ServerHttp2Stream, headers: http2.IncomingHttpHeaders) {
|
private _channelzHandler(stream: http2.ServerHttp2Stream, headers: http2.IncomingHttpHeaders) {
|
||||||
const channelzSessionInfo = this.sessions.get(stream.session as http2.ServerHttp2Session);
|
const channelzSessionInfo = this.sessions.get(stream.session as http2.ServerHttp2Session);
|
||||||
|
|
||||||
this.callTracker.addCallStarted();
|
this.callTracker.addCallStarted();
|
||||||
channelzSessionInfo?.streamTracker.addCallStarted();
|
channelzSessionInfo?.streamTracker.addCallStarted();
|
||||||
|
|
||||||
|
@ -834,9 +830,9 @@ export class Server {
|
||||||
}, stream, channelzSessionInfo)
|
}, stream, channelzSessionInfo)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
const call = new Http2ServerCallStream(stream, handler, this.options);
|
const call = new Http2ServerCallStream(stream, handler, this.options);
|
||||||
|
|
||||||
call.once('callEnd', (code: Status) => {
|
call.once('callEnd', (code: Status) => {
|
||||||
if (code === Status.OK) {
|
if (code === Status.OK) {
|
||||||
this.callTracker.addCallSucceeded();
|
this.callTracker.addCallSucceeded();
|
||||||
|
@ -844,7 +840,7 @@ export class Server {
|
||||||
this.callTracker.addCallFailed();
|
this.callTracker.addCallFailed();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
if (channelzSessionInfo) {
|
if (channelzSessionInfo) {
|
||||||
call.once('streamEnd', (success: boolean) => {
|
call.once('streamEnd', (success: boolean) => {
|
||||||
if (success) {
|
if (success) {
|
||||||
|
@ -954,8 +950,8 @@ export class Server {
|
||||||
}
|
}
|
||||||
this.serverAddressString = serverAddressString
|
this.serverAddressString = serverAddressString
|
||||||
|
|
||||||
const handler = this.channelzEnabled
|
const handler = this.channelzEnabled
|
||||||
? this._channelzHandler
|
? this._channelzHandler
|
||||||
: this._streamHandler
|
: this._streamHandler
|
||||||
|
|
||||||
http2Server.on('stream', handler.bind(this))
|
http2Server.on('stream', handler.bind(this))
|
||||||
|
|
|
@ -23,19 +23,11 @@ import { Metadata } from './metadata';
|
||||||
import { StreamDecoder } from './stream-decoder';
|
import { StreamDecoder } from './stream-decoder';
|
||||||
import * as logging from './logging';
|
import * as logging from './logging';
|
||||||
import { LogVerbosity } from './constants';
|
import { LogVerbosity } from './constants';
|
||||||
import { ServerSurfaceCall } from './server-call';
|
|
||||||
import { Deadline } from './deadline';
|
|
||||||
import { InterceptingListener, MessageContext, StatusObject, WriteCallback } from './call-interface';
|
import { InterceptingListener, MessageContext, StatusObject, WriteCallback } from './call-interface';
|
||||||
import { CallEventTracker, Transport } from './transport';
|
import { CallEventTracker, Transport } from './transport';
|
||||||
|
|
||||||
const TRACER_NAME = 'subchannel_call';
|
const TRACER_NAME = 'subchannel_call';
|
||||||
|
|
||||||
const {
|
|
||||||
HTTP2_HEADER_STATUS,
|
|
||||||
HTTP2_HEADER_CONTENT_TYPE,
|
|
||||||
NGHTTP2_CANCEL,
|
|
||||||
} = http2.constants;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* https://nodejs.org/api/errors.html#errors_class_systemerror
|
* https://nodejs.org/api/errors.html#errors_class_systemerror
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -46,10 +46,6 @@ const {
|
||||||
HTTP2_HEADER_USER_AGENT,
|
HTTP2_HEADER_USER_AGENT,
|
||||||
} = http2.constants;
|
} = http2.constants;
|
||||||
|
|
||||||
/* setInterval and setTimeout only accept signed 32 bit integers. JS doesn't
|
|
||||||
* have a constant for the max signed 32 bit integer, so this is a simple way
|
|
||||||
* to calculate it */
|
|
||||||
const KEEPALIVE_MAX_TIME_MS = ~(1 << 31);
|
|
||||||
const KEEPALIVE_TIMEOUT_MS = 20000;
|
const KEEPALIVE_TIMEOUT_MS = 20000;
|
||||||
|
|
||||||
export interface CallEventTracker {
|
export interface CallEventTracker {
|
||||||
|
@ -108,11 +104,6 @@ class Http2Transport implements Transport {
|
||||||
// Channelz info
|
// Channelz info
|
||||||
private channelzRef: SocketRef;
|
private channelzRef: SocketRef;
|
||||||
private readonly channelzEnabled: boolean = true;
|
private readonly channelzEnabled: boolean = true;
|
||||||
/**
|
|
||||||
* Name of the remote server, if it is not the same as the subchannel
|
|
||||||
* address, i.e. if connecting through an HTTP CONNECT proxy.
|
|
||||||
*/
|
|
||||||
private remoteName: string | null = null;
|
|
||||||
private streamTracker = new ChannelzCallTracker();
|
private streamTracker = new ChannelzCallTracker();
|
||||||
private keepalivesSent = 0;
|
private keepalivesSent = 0;
|
||||||
private messagesSent = 0;
|
private messagesSent = 0;
|
||||||
|
@ -123,7 +114,12 @@ class Http2Transport implements Transport {
|
||||||
constructor(
|
constructor(
|
||||||
private session: http2.ClientHttp2Session,
|
private session: http2.ClientHttp2Session,
|
||||||
subchannelAddress: SubchannelAddress,
|
subchannelAddress: SubchannelAddress,
|
||||||
options: ChannelOptions
|
options: ChannelOptions,
|
||||||
|
/**
|
||||||
|
* Name of the remote server, if it is not the same as the subchannel
|
||||||
|
* address, i.e. if connecting through an HTTP CONNECT proxy.
|
||||||
|
*/
|
||||||
|
private remoteName: string | null
|
||||||
) {
|
) {
|
||||||
// Build user-agent string.
|
// Build user-agent string.
|
||||||
this.userAgent = [
|
this.userAgent = [
|
||||||
|
@ -133,7 +129,7 @@ class Http2Transport implements Transport {
|
||||||
]
|
]
|
||||||
.filter((e) => e)
|
.filter((e) => e)
|
||||||
.join(' '); // remove falsey values first
|
.join(' '); // remove falsey values first
|
||||||
|
|
||||||
if ('grpc.keepalive_time_ms' in options) {
|
if ('grpc.keepalive_time_ms' in options) {
|
||||||
this.keepaliveTimeMs = options['grpc.keepalive_time_ms']!;
|
this.keepaliveTimeMs = options['grpc.keepalive_time_ms']!;
|
||||||
}
|
}
|
||||||
|
@ -271,7 +267,7 @@ class Http2Transport implements Transport {
|
||||||
* @param tooManyPings If true, this was triggered by a GOAWAY with data
|
* @param tooManyPings If true, this was triggered by a GOAWAY with data
|
||||||
* indicating that the session was closed becaues the client sent too many
|
* indicating that the session was closed becaues the client sent too many
|
||||||
* pings.
|
* pings.
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
private reportDisconnectToOwner(tooManyPings: boolean) {
|
private reportDisconnectToOwner(tooManyPings: boolean) {
|
||||||
if (this.disconnectHandled) {
|
if (this.disconnectHandled) {
|
||||||
|
@ -405,11 +401,11 @@ class Http2Transport implements Transport {
|
||||||
this.session.state.remoteWindowSize
|
this.session.state.remoteWindowSize
|
||||||
);
|
);
|
||||||
this.internalsTrace(
|
this.internalsTrace(
|
||||||
'session.closed=' +
|
'session.closed=' +
|
||||||
this.session.closed +
|
this.session.closed +
|
||||||
' session.destroyed=' +
|
' session.destroyed=' +
|
||||||
this.session.destroyed +
|
this.session.destroyed +
|
||||||
' session.socket.destroyed=' +
|
' session.socket.destroyed=' +
|
||||||
this.session.socket.destroyed);
|
this.session.socket.destroyed);
|
||||||
let eventTracker: CallEventTracker;
|
let eventTracker: CallEventTracker;
|
||||||
let call: Http2SubchannelCall;
|
let call: Http2SubchannelCall;
|
||||||
|
@ -565,12 +561,12 @@ export class Http2SubchannelConnector implements SubchannelConnector {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
connectionOptions = {
|
connectionOptions = {
|
||||||
...connectionOptions,
|
...connectionOptions,
|
||||||
...address,
|
...address,
|
||||||
};
|
};
|
||||||
|
|
||||||
/* http2.connect uses the options here:
|
/* http2.connect uses the options here:
|
||||||
* https://github.com/nodejs/node/blob/70c32a6d190e2b5d7b9ff9d5b6a459d14e8b7d59/lib/internal/http2/core.js#L3028-L3036
|
* https://github.com/nodejs/node/blob/70c32a6d190e2b5d7b9ff9d5b6a459d14e8b7d59/lib/internal/http2/core.js#L3028-L3036
|
||||||
* The spread operator overides earlier values with later ones, so any port
|
* The spread operator overides earlier values with later ones, so any port
|
||||||
|
@ -596,7 +592,7 @@ export class Http2SubchannelConnector implements SubchannelConnector {
|
||||||
session.unref();
|
session.unref();
|
||||||
session.once('connect', () => {
|
session.once('connect', () => {
|
||||||
session.removeAllListeners();
|
session.removeAllListeners();
|
||||||
resolve(new Http2Transport(session, address, options));
|
resolve(new Http2Transport(session, address, options, remoteName));
|
||||||
this.session = null;
|
this.session = null;
|
||||||
});
|
});
|
||||||
session.once('close', () => {
|
session.once('close', () => {
|
||||||
|
@ -666,4 +662,4 @@ export class Http2SubchannelConnector implements SubchannelConnector {
|
||||||
this.session?.close();
|
this.session?.close();
|
||||||
this.session = null;
|
this.session = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -165,7 +165,6 @@ describe('Call propagation', () => {
|
||||||
describe('Deadlines', () => {
|
describe('Deadlines', () => {
|
||||||
it('should work with unary requests', (done) => {
|
it('should work with unary requests', (done) => {
|
||||||
done = multiDone(done, 2);
|
done = multiDone(done, 2);
|
||||||
let call: grpc.ClientUnaryCall;
|
|
||||||
proxyServer.addService(Client.service, {
|
proxyServer.addService(Client.service, {
|
||||||
unary: (parent: grpc.ServerUnaryCall<any, any>, callback: grpc.sendUnaryData<any>) => {
|
unary: (parent: grpc.ServerUnaryCall<any, any>, callback: grpc.sendUnaryData<any>) => {
|
||||||
client.unary(parent.request, {parent: parent, propagate_flags: grpc.propagate.DEADLINE}, (error: grpc.ServiceError, value: unknown) => {
|
client.unary(parent.request, {parent: parent, propagate_flags: grpc.propagate.DEADLINE}, (error: grpc.ServiceError, value: unknown) => {
|
||||||
|
@ -178,7 +177,7 @@ describe('Call propagation', () => {
|
||||||
});
|
});
|
||||||
const deadline = new Date();
|
const deadline = new Date();
|
||||||
deadline.setMilliseconds(deadline.getMilliseconds() + 100);
|
deadline.setMilliseconds(deadline.getMilliseconds() + 100);
|
||||||
call = proxyClient.unary({}, {deadline}, (error: grpc.ServiceError, value: unknown) => {
|
proxyClient.unary({}, {deadline}, (error: grpc.ServiceError, value: unknown) => {
|
||||||
assert(error);
|
assert(error);
|
||||||
assert.strictEqual(error.code, grpc.status.DEADLINE_EXCEEDED);
|
assert.strictEqual(error.code, grpc.status.DEADLINE_EXCEEDED);
|
||||||
done();
|
done();
|
||||||
|
@ -186,7 +185,6 @@ describe('Call propagation', () => {
|
||||||
});
|
});
|
||||||
it('Should work with client streaming requests', (done) => {
|
it('Should work with client streaming requests', (done) => {
|
||||||
done = multiDone(done, 2);
|
done = multiDone(done, 2);
|
||||||
let call: grpc.ClientWritableStream<unknown>;
|
|
||||||
proxyServer.addService(Client.service, {
|
proxyServer.addService(Client.service, {
|
||||||
clientStream: (parent: grpc.ServerReadableStream<any, any>, callback: grpc.sendUnaryData<any>) => {
|
clientStream: (parent: grpc.ServerReadableStream<any, any>, callback: grpc.sendUnaryData<any>) => {
|
||||||
client.clientStream({parent: parent, propagate_flags: grpc.propagate.DEADLINE}, (error: grpc.ServiceError, value: unknown) => {
|
client.clientStream({parent: parent, propagate_flags: grpc.propagate.DEADLINE}, (error: grpc.ServiceError, value: unknown) => {
|
||||||
|
@ -199,7 +197,7 @@ describe('Call propagation', () => {
|
||||||
});
|
});
|
||||||
const deadline = new Date();
|
const deadline = new Date();
|
||||||
deadline.setMilliseconds(deadline.getMilliseconds() + 100);
|
deadline.setMilliseconds(deadline.getMilliseconds() + 100);
|
||||||
call = proxyClient.clientStream({deadline, propagate_flags: grpc.propagate.DEADLINE}, (error: grpc.ServiceError, value: unknown) => {
|
proxyClient.clientStream({deadline, propagate_flags: grpc.propagate.DEADLINE}, (error: grpc.ServiceError, value: unknown) => {
|
||||||
assert(error);
|
assert(error);
|
||||||
assert.strictEqual(error.code, grpc.status.DEADLINE_EXCEEDED);
|
assert.strictEqual(error.code, grpc.status.DEADLINE_EXCEEDED);
|
||||||
done();
|
done();
|
||||||
|
@ -250,4 +248,4 @@ describe('Call propagation', () => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -19,14 +19,11 @@ import * as assert from 'assert';
|
||||||
import * as fs from 'fs';
|
import * as fs from 'fs';
|
||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
import { promisify } from 'util';
|
import { promisify } from 'util';
|
||||||
import * as protoLoader from '@grpc/proto-loader';
|
|
||||||
|
|
||||||
import { CallCredentials } from '../src/call-credentials';
|
import { CallCredentials } from '../src/call-credentials';
|
||||||
import { ChannelCredentials } from '../src/channel-credentials';
|
import { ChannelCredentials } from '../src/channel-credentials';
|
||||||
import * as grpc from '../src';
|
import * as grpc from '../src';
|
||||||
import { ServiceClient, ServiceClientConstructor } from '../src/make-client';
|
import { ServiceClient, ServiceClientConstructor } from '../src/make-client';
|
||||||
import { TestServiceClient, TestServiceHandlers } from './generated/TestService';
|
|
||||||
import { ProtoGrpcType as TestServiceGrpcType } from './generated/test_service';
|
|
||||||
|
|
||||||
import { assert2, loadProtoFile, mockFunction } from './common';
|
import { assert2, loadProtoFile, mockFunction } from './common';
|
||||||
import { sendUnaryData, ServerUnaryCall, ServiceError } from '../src';
|
import { sendUnaryData, ServerUnaryCall, ServiceError } from '../src';
|
||||||
|
@ -171,7 +168,7 @@ describe('ChannelCredentials usage', () => {
|
||||||
callback(null, call.request);
|
callback(null, call.request);
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
server.bindAsync(
|
server.bindAsync(
|
||||||
'localhost:0',
|
'localhost:0',
|
||||||
serverCreds,
|
serverCreds,
|
||||||
|
@ -209,4 +206,4 @@ describe('ChannelCredentials usage', () => {
|
||||||
}));
|
}));
|
||||||
assert2.afterMustCallsSatisfied(done);
|
assert2.afterMustCallsSatisfied(done);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -21,8 +21,6 @@ import * as grpc from '../src';
|
||||||
|
|
||||||
import { ProtoGrpcType } from '../src/generated/channelz'
|
import { ProtoGrpcType } from '../src/generated/channelz'
|
||||||
import { ChannelzClient } from '../src/generated/grpc/channelz/v1/Channelz';
|
import { ChannelzClient } from '../src/generated/grpc/channelz/v1/Channelz';
|
||||||
import { Channel__Output } from '../src/generated/grpc/channelz/v1/Channel';
|
|
||||||
import { Server__Output } from '../src/generated/grpc/channelz/v1/Server';
|
|
||||||
import { ServiceClient, ServiceClientConstructor } from '../src/make-client';
|
import { ServiceClient, ServiceClientConstructor } from '../src/make-client';
|
||||||
import { loadProtoFile } from './common';
|
import { loadProtoFile } from './common';
|
||||||
|
|
||||||
|
@ -318,4 +316,4 @@ describe('Disabling channelz', () => {
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -19,14 +19,10 @@ import * as assert from 'assert';
|
||||||
|
|
||||||
import * as grpc from '../src';
|
import * as grpc from '../src';
|
||||||
import { experimental } from '../src';
|
import { experimental } from '../src';
|
||||||
import { ServerCredentials } from '../src';
|
|
||||||
import { ServiceClient, ServiceClientConstructor } from '../src/make-client';
|
import { ServiceClient, ServiceClientConstructor } from '../src/make-client';
|
||||||
import { loadProtoFile } from './common';
|
import { loadProtoFile } from './common';
|
||||||
import ServiceConfig = experimental.ServiceConfig;
|
import ServiceConfig = experimental.ServiceConfig;
|
||||||
|
|
||||||
const clientInsecureCreds = grpc.credentials.createInsecure();
|
|
||||||
const serverInsecureCreds = ServerCredentials.createInsecure();
|
|
||||||
|
|
||||||
const TIMEOUT_SERVICE_CONFIG: ServiceConfig = {
|
const TIMEOUT_SERVICE_CONFIG: ServiceConfig = {
|
||||||
loadBalancingConfig: [],
|
loadBalancingConfig: [],
|
||||||
methodConfig: [{
|
methodConfig: [{
|
||||||
|
@ -44,7 +40,7 @@ describe('Client with configured timeout', () => {
|
||||||
let server: grpc.Server;
|
let server: grpc.Server;
|
||||||
let Client: ServiceClientConstructor;
|
let Client: ServiceClientConstructor;
|
||||||
let client: ServiceClient;
|
let client: ServiceClient;
|
||||||
|
|
||||||
before(done => {
|
before(done => {
|
||||||
Client = loadProtoFile(__dirname + '/fixtures/test_service.proto').TestService as ServiceClientConstructor;
|
Client = loadProtoFile(__dirname + '/fixtures/test_service.proto').TestService as ServiceClientConstructor;
|
||||||
server = new grpc.Server();
|
server = new grpc.Server();
|
||||||
|
@ -87,4 +83,4 @@ describe('Client with configured timeout', () => {
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -20,7 +20,6 @@ import * as path from 'path';
|
||||||
import * as grpc from '../src';
|
import * as grpc from '../src';
|
||||||
import { loadProtoFile } from './common';
|
import { loadProtoFile } from './common';
|
||||||
import { OutlierDetectionLoadBalancingConfig } from '../src/load-balancer-outlier-detection'
|
import { OutlierDetectionLoadBalancingConfig } from '../src/load-balancer-outlier-detection'
|
||||||
import { ServiceClient } from '../src/make-client';
|
|
||||||
|
|
||||||
function multiDone(done: Mocha.Done, target: number) {
|
function multiDone(done: Mocha.Done, target: number) {
|
||||||
let count = 0;
|
let count = 0;
|
||||||
|
|
|
@ -686,7 +686,7 @@ describe('Compressed requests', () => {
|
||||||
},
|
},
|
||||||
|
|
||||||
ServerStream(call) {
|
ServerStream(call) {
|
||||||
const { metadata, request } = call;
|
const { request } = call;
|
||||||
|
|
||||||
for (let i = 0; i < 5; i++) {
|
for (let i = 0; i < 5; i++) {
|
||||||
call.write({ count: request.message.length });
|
call.write({ count: request.message.length });
|
||||||
|
@ -908,7 +908,7 @@ describe('Compressed requests', () => {
|
||||||
done();
|
done();
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
/* As of Node 16, Writable and Duplex streams validate the encoding
|
/* As of Node 16, Writable and Duplex streams validate the encoding
|
||||||
* argument to write, and the flags values we are passing there are not
|
* argument to write, and the flags values we are passing there are not
|
||||||
* valid. We don't currently have an alternative way to pass that flag
|
* valid. We don't currently have an alternative way to pass that flag
|
||||||
|
|
|
@ -7,7 +7,8 @@
|
||||||
"module": "commonjs",
|
"module": "commonjs",
|
||||||
"resolveJsonModule": true,
|
"resolveJsonModule": true,
|
||||||
"incremental": true,
|
"incremental": true,
|
||||||
"types": ["mocha"]
|
"types": ["mocha"],
|
||||||
|
"noUnusedLocals": true
|
||||||
},
|
},
|
||||||
"include": [
|
"include": [
|
||||||
"src/**/*.ts",
|
"src/**/*.ts",
|
||||||
|
|
Loading…
Reference in New Issue