Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions packages/grpc-native-core/binding.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
'GPR_BACKWARDS_COMPATIBILITY_MODE',
'GRPC_ARES=0',
'GRPC_UV',
'GRPC_NODE_VERSION="1.17.0"'
'GRPC_NODE_VERSION="1.18.0"'
],
'conditions': [
['grpc_gcov=="true"', {
Expand Down Expand Up @@ -779,6 +779,7 @@
'deps/grpc/src/core/ext/transport/chttp2/transport/bin_encoder.cc',
'deps/grpc/src/core/ext/transport/chttp2/transport/chttp2_plugin.cc',
'deps/grpc/src/core/ext/transport/chttp2/transport/chttp2_transport.cc',
'deps/grpc/src/core/ext/transport/chttp2/transport/context_list.cc',
'deps/grpc/src/core/ext/transport/chttp2/transport/flow_control.cc',
'deps/grpc/src/core/ext/transport/chttp2/transport/frame_data.cc',
'deps/grpc/src/core/ext/transport/chttp2/transport/frame_goaway.cc',
Expand Down Expand Up @@ -885,15 +886,16 @@
'deps/grpc/src/core/ext/filters/client_channel/http_connect_handshaker.cc',
'deps/grpc/src/core/ext/filters/client_channel/http_proxy.cc',
'deps/grpc/src/core/ext/filters/client_channel/lb_policy.cc',
'deps/grpc/src/core/ext/filters/client_channel/lb_policy_factory.cc',
'deps/grpc/src/core/ext/filters/client_channel/lb_policy_registry.cc',
'deps/grpc/src/core/ext/filters/client_channel/parse_address.cc',
'deps/grpc/src/core/ext/filters/client_channel/proxy_mapper.cc',
'deps/grpc/src/core/ext/filters/client_channel/proxy_mapper_registry.cc',
'deps/grpc/src/core/ext/filters/client_channel/request_routing.cc',
'deps/grpc/src/core/ext/filters/client_channel/resolver.cc',
'deps/grpc/src/core/ext/filters/client_channel/resolver_registry.cc',
'deps/grpc/src/core/ext/filters/client_channel/resolver_result_parsing.cc',
'deps/grpc/src/core/ext/filters/client_channel/retry_throttle.cc',
'deps/grpc/src/core/ext/filters/client_channel/server_address.cc',
'deps/grpc/src/core/ext/filters/client_channel/subchannel.cc',
'deps/grpc/src/core/ext/filters/client_channel/subchannel_index.cc',
'deps/grpc/src/core/ext/filters/deadline/deadline_filter.cc',
Expand Down
1 change: 0 additions & 1 deletion packages/grpc-native-core/build.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
settings:
'#': It's possible to have node_version here as a key to override the core's version.
node_version: 1.17.0
2 changes: 1 addition & 1 deletion packages/grpc-native-core/deps/grpc
Submodule grpc updated 835 files
15 changes: 14 additions & 1 deletion packages/grpc-native-core/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -259,11 +259,20 @@ declare module "grpc" {
readonly [I in keyof ImplementationType]: MethodDefinition<any, any>;
}

/**
* An object that defines a protobuf type
*/
export interface ProtobufTypeDefinition {
format: string;
type: object;
fileDescriptorProtos: Buffer[];
}

/**
* An object that defines a package containing multiple services
*/
export type PackageDefinition = {
readonly [fullyQualifiedName: string]: ServiceDefinition<any>;
readonly [fullyQualifiedName: string]: ServiceDefinition<any> | ProtobufTypeDefinition;
}

/**
Expand Down Expand Up @@ -567,6 +576,10 @@ declare module "grpc" {
* Trailing metadata sent with the status, if applicable
*/
metadata?: Metadata;
/**
* Original status details string
*/
details?: string;
}

/**
Expand Down
6 changes: 5 additions & 1 deletion packages/grpc-native-core/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,11 @@ exports.loadPackageDefinition = function loadPackageDefintion(packageDef) {
}
current = current[packageName];
}
current[serviceName] = client.makeClientConstructor(service, serviceName, {});
if (service.hasOwnProperty('format')) {
current[serviceName] = service;
} else {
current[serviceName] = client.makeClientConstructor(service, serviceName, {});
}
}
return result;
};
Expand Down
2 changes: 1 addition & 1 deletion packages/grpc-native-core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "grpc",
"version": "1.17.0",
"version": "1.18.0",
"author": "Google Inc.",
"description": "gRPC Library for Node",
"homepage": "https://grpc.io/",
Expand Down
11 changes: 10 additions & 1 deletion packages/grpc-native-core/src/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -317,9 +317,18 @@ exports.zipObject = function(props, values) {
* @typedef {Object.<string, grpc~MethodDefinition>} grpc~ServiceDefinition
*/

/**
* An object that defines a protobuf type
* @typedef {object} grpc~ProtobufTypeDefinition
* @param {string} format The format of the type definition object
* @param {*} type The type definition object
* @param {Buffer[]} fileDescriptorProtos Binary protobuf file
* descriptors for all files loaded to construct this type
*/

/**
* An object that defines a package hierarchy with multiple services
* @typedef {Object.<string, grpc~ServiceDefinition>} grpc~PackageDefinition
* @typedef {Object.<string, grpc~ServiceDefinition|grpc~ProtobufTypeDefinition>} grpc~PackageDefinition
*/

/**
Expand Down