mirror of https://github.com/grpc/grpc-node.git
Merge pull request #1079 from murgatroid99/upmerge_from_1.23.x
Upmerge from 1.23.x
This commit is contained in:
commit
69b19df486
|
@ -91,7 +91,7 @@
|
|||
'GPR_BACKWARDS_COMPATIBILITY_MODE',
|
||||
'GRPC_ARES=1',
|
||||
'GRPC_UV',
|
||||
'GRPC_NODE_VERSION="1.24.0"',
|
||||
'GRPC_NODE_VERSION="1.24.1"',
|
||||
'CARES_STATICLIB',
|
||||
'CARES_SYMBOL_HIDING'
|
||||
],
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
settings:
|
||||
'#': It's possible to have node_version here as a key to override the core's version.
|
||||
node_version: 1.24.1
|
|
@ -1 +1 @@
|
|||
Subproject commit 16fba7baa0a35d9028f1cd9827c907be7d97269e
|
||||
Subproject commit 85e22ef28d55f27e8efb3d5e2e43ca6f59971065
|
|
@ -1,3 +1,4 @@
|
|||
|
||||
/*
|
||||
* Copyright 2019 gRPC authors.
|
||||
*
|
||||
|
@ -15,11 +16,50 @@
|
|||
*
|
||||
*/
|
||||
|
||||
/// <reference types="bytebuffer" />
|
||||
|
||||
declare module "grpc" {
|
||||
import { Message, Service as ProtobufService } from "protobufjs";
|
||||
// add imports here, inside the "grpc" module, to keep it as an ambient module
|
||||
import { EventEmitter } from "events";
|
||||
import { Duplex, Readable, Writable } from "stream";
|
||||
import { SecureContext } from "tls";
|
||||
|
||||
/* The Message interface is copied and slightly modified from @types/protobuf
|
||||
* version 5.0.31, which was distributed under the following license:
|
||||
*
|
||||
* This project is licensed under the MIT license.
|
||||
* Copyrights are respective of each contributor listed at the beginning of each definition file.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
export interface ProtobufMessage {
|
||||
$add(key: string, value: any, noAssert?: boolean): ProtobufMessage;
|
||||
$get<T>(key: string): T;
|
||||
$set(key: string | {[key: string]: any}, value?: any | boolean, noAssert?: boolean): void;
|
||||
add(key: string, value: any, noAssert?: boolean): ProtobufMessage;
|
||||
calculate(): number;
|
||||
encode(buffer?: ByteBuffer | boolean, noVerify?: boolean): ByteBuffer;
|
||||
encode64(): string;
|
||||
encodeAB(): ArrayBuffer;
|
||||
encodeNB(): Buffer;
|
||||
encodeHex(): string;
|
||||
encodeJSON(): string;
|
||||
encodeDelimited(buffer?: ByteBuffer | boolean, noVerify?: boolean): ByteBuffer;
|
||||
get<T>(key: string, noAssert?: boolean): T;
|
||||
set(key: string | {[key: string]: any}, value?: any | boolean, noAssert?: boolean): void;
|
||||
toArrayBuffer(): ArrayBuffer;
|
||||
toBase64(): string;
|
||||
toBuffer(): Buffer;
|
||||
toHex(): string;
|
||||
toRaw(binaryAsBase64?: boolean, longsAsStrings?: boolean): {[key: string]: any};
|
||||
toString(): string;
|
||||
[field: string]: any;
|
||||
}
|
||||
|
||||
/**
|
||||
* Load a ProtoBuf.js object as a gRPC object.
|
||||
* @param value The ProtoBuf.js reflection object to load
|
||||
|
@ -83,7 +123,7 @@ declare module "grpc" {
|
|||
* - Anything else becomes the relevant reflection object that ProtoBuf.js would create
|
||||
*/
|
||||
export interface GrpcObject {
|
||||
[name: string]: GrpcObject | typeof Client | Message;
|
||||
[name: string]: GrpcObject | typeof Client | ProtobufMessage;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -341,7 +381,7 @@ declare module "grpc" {
|
|||
/**
|
||||
* An EventEmitter. Used for unary calls.
|
||||
*/
|
||||
export class ServerUnaryCall<RequestType> {
|
||||
export class ServerUnaryCall<RequestType> extends EventEmitter {
|
||||
/**
|
||||
* Indicates if the call has been cancelled
|
||||
*/
|
||||
|
@ -1231,7 +1271,7 @@ declare module "grpc" {
|
|||
/**
|
||||
* An EventEmitter. Used for unary calls.
|
||||
*/
|
||||
export class ClientUnaryCall {
|
||||
export class ClientUnaryCall extends EventEmitter {
|
||||
private constructor();
|
||||
|
||||
/**
|
||||
|
|
|
@ -312,7 +312,9 @@ exports.Client = client.Client;
|
|||
* @memberof grpc
|
||||
* @param {string} target The address of the server to connect to
|
||||
* @param {grpc.ChannelCredentials} credentials Channel credentials to use when connecting
|
||||
* @param {grpc~ChannelOptions} options A map of channel options that will be passed to the core
|
||||
* @param {grpc~ChannelOptions} options A map of channel options that will be passed to the core.
|
||||
* The available options are listed in
|
||||
* [this document]{@link https://grpc.github.io/grpc/core/group__grpc__arg__keys.html}.
|
||||
*/
|
||||
exports.Channel = grpc.Channel;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "grpc",
|
||||
"version": "1.24.0",
|
||||
"version": "1.24.1",
|
||||
"author": "Google Inc.",
|
||||
"description": "gRPC Library for Node",
|
||||
"homepage": "https://grpc.io/",
|
||||
|
@ -29,6 +29,7 @@
|
|||
"node-pre-gyp"
|
||||
],
|
||||
"dependencies": {
|
||||
"@types/bytebuffer": "^5.0.40",
|
||||
"lodash.camelcase": "^4.3.0",
|
||||
"lodash.clone": "^4.5.0",
|
||||
"nan": "^2.13.2",
|
||||
|
@ -75,6 +76,8 @@
|
|||
"deps/grpc/third_party/nanopb/*.{c,cc,h}",
|
||||
"deps/grpc/third_party/upb/**/*.{c,h,inc}",
|
||||
"deps/grpc/third_party/zlib/**/*.{c,cc,h}",
|
||||
"deps/grpc/third_party/address_sorting/**/*.{c,h}",
|
||||
"deps/grpc/third_party/cares/**/*.{c,h}",
|
||||
"binding.gyp"
|
||||
],
|
||||
"main": "index.js",
|
||||
|
|
|
@ -353,6 +353,42 @@ ClientDuplexStream.prototype.getPeer = getPeer;
|
|||
* should be used to make this particular call.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Properties of a call, for use with a {@link grpc.Client~callInvocationTransformer}.
|
||||
* @typedef {Object} grpc.Client~CallProperties
|
||||
* @property {*} argument The call argument. Only preset if the method is unary or server streaming.
|
||||
* @property {grpc.Metadata} metadata The request metadata
|
||||
* @property {grpc~Call} call The call object that will be returned by the client method
|
||||
* @property {grpc.Channel} channel The channel that will be used to make a request
|
||||
* @property {grpc~MethodDefinition} methodDefinition The MethodDefinition object that describes this method
|
||||
* @property {grpc.Client~CallOptions} options The call options passed when making this request
|
||||
* @property {grpc.Client~requestCallback} callback The callback that will handle the response.
|
||||
* Only present if this method is unary or client streaming.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Call invocation transformer. Has access to the full call properties before a
|
||||
* call is processed and can modify most of those properties. Some modifications
|
||||
* will have no effect or may cause problems.
|
||||
* @name grpc.Client~callInvocationTransformer
|
||||
* @function
|
||||
* @param {grpc.Client~CallProperties} callProperties The original call properties
|
||||
* @return {grpc.Client~CallProperties} The modified call properties.
|
||||
*/
|
||||
|
||||
/**
|
||||
* A function that functionally replaces the Channel constructor.
|
||||
* @name grpc.Client~channelFactory
|
||||
* @function
|
||||
* @param {string} target The address of the server to connect to
|
||||
* @param {grpc.ChannelCredentials} credentials Channel credentials to use when connecting
|
||||
* @param {grpc~ChannelOptions} options A map of channel options that will be passed to the core.
|
||||
* The available options are listed in
|
||||
* [this document]{@link https://grpc.github.io/grpc/core/group__grpc__arg__keys.html}.
|
||||
* @returns {grpc.Channel} This can either be an actual channel object, or an object with the
|
||||
* same API.
|
||||
*/
|
||||
|
||||
/**
|
||||
* A generic gRPC client. Primarily useful as a base class for generated clients
|
||||
* @memberof grpc
|
||||
|
@ -360,7 +396,19 @@ ClientDuplexStream.prototype.getPeer = getPeer;
|
|||
* @param {string} address Server address to connect to
|
||||
* @param {grpc.credentials~ChannelCredentials} credentials Credentials to use
|
||||
* to connect to the server
|
||||
* @param {Object} options Options to apply to channel creation
|
||||
* @param {Object} options Options to apply to channel creation. Any of
|
||||
* [the channel arguments]{@link https://grpc.github.io/grpc/core/group__grpc__arg__keys.html}
|
||||
* can be used here in addition to specific client options.
|
||||
* @param {grpc~Interceptor[]} [options.interceptors] Interceptors to apply to each request
|
||||
* @param {grpc~InterceptorProvider[]} [options.interceptor_providers] Interceptor providers
|
||||
* to apply interceptors to each request depending on the method definition. At most
|
||||
* one of the interceptors and interceptor_providers options may be set.
|
||||
* @param {grpc.Client~callInvocationTransformer=} options.callInvocationTransformer
|
||||
* @param {grpc.Channel=} options.channelOverride Channel to use instead of constructing a new one.
|
||||
* If set, the address, credentials, channel arguments options, and channelFactoryOverride
|
||||
* option will all be ignored.
|
||||
* @param {grpc.Client~channelFactory} options.channelFactoryOverride Function to use instead of
|
||||
* the Channel constructor when creating the Client's channel.
|
||||
*/
|
||||
function Client(address, credentials, options) {
|
||||
var self = this;
|
||||
|
|
|
@ -722,7 +722,8 @@ var streamHandlers = {
|
|||
* @memberof grpc
|
||||
* @constructor
|
||||
* @param {Object=} options Options that should be passed to the internal server
|
||||
* implementation
|
||||
* implementation. The available options are listed in
|
||||
* [this document]{@link https://grpc.github.io/grpc/core/group__grpc__arg__keys.html}.
|
||||
* @example
|
||||
* var server = new grpc.Server();
|
||||
* server.addProtoService(protobuf_service_descriptor, service_implementation);
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
"node-pre-gyp"
|
||||
],
|
||||
"dependencies": {
|
||||
"@types/bytebuffer": "^5.0.40",
|
||||
"lodash.camelcase": "^4.3.0",
|
||||
"lodash.clone": "^4.5.0",
|
||||
"nan": "^2.13.2",
|
||||
|
@ -77,6 +78,8 @@
|
|||
"deps/grpc/third_party/nanopb/*.{c,cc,h}",
|
||||
"deps/grpc/third_party/upb/**/*.{c,h,inc}",
|
||||
"deps/grpc/third_party/zlib/**/*.{c,cc,h}",
|
||||
"deps/grpc/third_party/address_sorting/**/*.{c,h}",
|
||||
"deps/grpc/third_party/cares/**/*.{c,h}",
|
||||
"binding.gyp"
|
||||
],
|
||||
"main": "index.js",
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
set arch_list=ia32 x64
|
||||
|
||||
set electron_versions=1.0.0 1.1.0 1.2.0 1.3.0 1.4.0 1.5.0 1.6.0 1.7.0 1.8.0 2.0.0 3.0.0 3.1.0 4.1.0 4.2.0 5.0.0
|
||||
set electron_versions=1.0.0 1.1.0 1.2.0 1.3.0 1.4.0 1.5.0 1.6.0 1.7.0 1.8.0 2.0.0 3.0.0 3.1.0 4.1.0 4.2.0 5.0.0 6.0.0
|
||||
|
||||
set PATH=%PATH%;C:\Program Files\nodejs\;%APPDATA%\npm
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
set -ex
|
||||
|
||||
arch_list=( ia32 x64 )
|
||||
electron_versions=( 1.0.0 1.1.0 1.2.0 1.3.0 1.4.0 1.5.0 1.6.0 1.7.0 1.8.0 2.0.0 3.0.0 3.1.0 4.1.0 4.2.0 5.0.0 )
|
||||
electron_versions=( 1.0.0 1.1.0 1.2.0 1.3.0 1.4.0 1.5.0 1.6.0 1.7.0 1.8.0 2.0.0 3.0.0 3.1.0 4.1.0 4.2.0 5.0.0 6.0.0 )
|
||||
|
||||
umask 022
|
||||
|
||||
|
|
|
@ -16,4 +16,4 @@
|
|||
|
||||
# Location of the continuous shell script in repository.
|
||||
build_file: "grpc-node/tools/release/kokoro-electron.bat"
|
||||
timeout_mins: 60
|
||||
timeout_mins: 120
|
||||
|
|
|
@ -20,7 +20,7 @@ SET PATH=%APPDATA%\nvm-ps;%APPDATA%\nvm-ps\nodejs;%PATH%
|
|||
call nvm install 10
|
||||
call nvm use 10
|
||||
|
||||
call npm install -g npm
|
||||
call npm install -g npm@6.10.x
|
||||
@rem https://github.com/mapbox/node-pre-gyp/issues/362
|
||||
call npm install -g node-gyp@3
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ SET PATH=%APPDATA%\nvm-ps;%APPDATA%\nvm-ps\nodejs;%PATH%
|
|||
call nvm install 10
|
||||
call nvm use 10
|
||||
|
||||
call npm install -g npm
|
||||
call npm install -g npm@6.10.x
|
||||
@rem https://github.com/mapbox/node-pre-gyp/issues/362
|
||||
call npm install -g node-gyp@3
|
||||
|
||||
|
|
Loading…
Reference in New Issue