grpc_tools_node_protoc_ts
Advanced tools
Comparing version 5.0.1 to 5.1.0
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Debug = void 0; | ||
const LibUtil = require("util"); | ||
@@ -4,0 +5,0 @@ const LibFs = require("fs"); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.DependencyFilter = void 0; | ||
exports.DependencyFilter = [ | ||
@@ -4,0 +5,0 @@ "google/api/annotations.proto", |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ExportMap = void 0; | ||
class ExportMap { | ||
@@ -4,0 +5,0 @@ constructor() { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.EnumFormatter = void 0; | ||
var EnumFormatter; | ||
@@ -4,0 +5,0 @@ (function (EnumFormatter) { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ExtensionFormatter = void 0; | ||
const Utility_1 = require("../../Utility"); | ||
@@ -4,0 +5,0 @@ const FieldTypesFormatter_1 = require("./FieldTypesFormatter"); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.FieldTypesFormatter = exports.JS_NUMBER = exports.JS_STRING = exports.JS_NORMAL = exports.ENUM_TYPE = exports.BYTES_TYPE = exports.MESSAGE_TYPE = void 0; | ||
const Utility_1 = require("../../Utility"); | ||
@@ -4,0 +5,0 @@ exports.MESSAGE_TYPE = 11; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.MessageFormatter = exports.OBJECT_TYPE_NAME = void 0; | ||
const descriptor_pb_1 = require("google-protobuf/google/protobuf/descriptor_pb"); | ||
@@ -4,0 +5,0 @@ const Utility_1 = require("../../Utility"); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.OneofFormatter = void 0; | ||
const Utility_1 = require("../../Utility"); | ||
@@ -4,0 +5,0 @@ var OneofFormatter; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ProtoMsgTsdFormatter = void 0; | ||
const Utility_1 = require("../Utility"); | ||
@@ -4,0 +5,0 @@ const WellKnown_1 = require("../WellKnown"); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ProtoSvcTsdFormatter = void 0; | ||
const Utility_1 = require("../Utility"); | ||
@@ -4,0 +5,0 @@ const TplEngine_1 = require("../TplEngine"); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.TplEngine = void 0; | ||
const LibFs = require("fs"); | ||
@@ -4,0 +5,0 @@ const LibPath = require("path"); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Utility = void 0; | ||
const PROTO2_SYNTAX = "proto2"; | ||
@@ -4,0 +5,0 @@ var Utility; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.WellKnownTypesMap = void 0; | ||
exports.WellKnownTypesMap = { | ||
@@ -4,0 +5,0 @@ "google/protobuf/compiler/plugin.proto": "google-protobuf/google/protobuf/compiler/plugin_pb", |
{ | ||
"name": "grpc_tools_node_protoc_ts", | ||
"version": "5.0.1", | ||
"version": "5.1.0", | ||
"description": "Generate d.ts definitions for generated js files from grpc_tools_node_protoc", | ||
"main": "build/index.js", | ||
"scripts": { | ||
"build": "tsc -p . && cp -r src/lib/template build/lib", | ||
"build": "./node_modules/.bin/tsc -p . && cp -r src/lib/template build/lib", | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
@@ -32,3 +32,3 @@ }, | ||
"google-protobuf": "3.12.4", | ||
"handlebars": "4.7.4", | ||
"handlebars": "4.7.6", | ||
"handlebars-helpers": "0.10.0" | ||
@@ -38,6 +38,6 @@ }, | ||
"@types/google-protobuf": "3.7.2", | ||
"@types/node": "12.12.6", | ||
"@types/node": "14.14.16", | ||
"tslint": "5.9.1", | ||
"typescript": "2.7.2" | ||
"typescript": "4.1.3" | ||
} | ||
} |
@@ -31,2 +31,7 @@ grpc_tools_node_protoc_ts | ||
## Breaking changes | ||
### v5.1.0 | ||
Fix server implementation signature issue of `grpc_js` side. See: [Issue#79](https://github.com/agreatfool/grpc_tools_node_protoc_ts/issues/79). | ||
About the code changes, please read the doc at **Changes** part. | ||
### v4.0.0 | ||
@@ -384,3 +389,3 @@ Fix the issues along with [grpc-tools@1.9.0](https://github.com/grpc/grpc-node/releases/tag/grpc-tools%401.9.0), see: [PR#55](https://github.com/agreatfool/grpc_tools_node_protoc_ts/pull/55). If you are using grpc-tools with version under `1.9.0`, you should `NOT` upgrade. | ||
interface IBookServiceService_IGetBook extends grpc.MethodDefinition<book_pb.GetBookRequest, book_pb.Book> { | ||
path: string; // "/com.book.BookService/GetBook" | ||
path: "/com.book.BookService/GetBook"; | ||
requestStream: false; | ||
@@ -394,3 +399,3 @@ responseStream: false; | ||
interface IBookServiceService_IGetBooksViaAuthor extends grpc.MethodDefinition<book_pb.GetBookViaAuthor, book_pb.Book> { | ||
path: string; // "/com.book.BookService/GetBooksViaAuthor" | ||
path: "/com.book.BookService/GetBooksViaAuthor"; | ||
requestStream: false; | ||
@@ -404,3 +409,3 @@ responseStream: true; | ||
interface IBookServiceService_IGetGreatestBook extends grpc.MethodDefinition<book_pb.GetBookRequest, book_pb.Book> { | ||
path: string; // "/com.book.BookService/GetGreatestBook" | ||
path: "/com.book.BookService/GetGreatestBook"; | ||
requestStream: true; | ||
@@ -414,3 +419,3 @@ responseStream: false; | ||
interface IBookServiceService_IGetBooks extends grpc.MethodDefinition<book_pb.GetBookRequest, book_pb.Book> { | ||
path: string; // "/com.book.BookService/GetBooks" | ||
path: "/com.book.BookService/GetBooks"; | ||
requestStream: true; | ||
@@ -465,2 +470,35 @@ responseStream: true; | ||
## Changes | ||
### 5.1.0 | ||
Fix server implementation signature issue of `grpc_js` side. See: [Issue#79](https://github.com/agreatfool/grpc_tools_node_protoc_ts/issues/79). | ||
Breaking change, only `grpc_js` side would be affected. | ||
The interface of service server now extends `grpc.UntypedServiceImplementation` (examples/src/grpcjs/proto/book_grpc_pb.d.ts). | ||
```typescript | ||
// from | ||
export interface IBookServiceServer {} | ||
// to | ||
export interface IBookServiceServer extends grpc.UntypedServiceImplementation {} | ||
``` | ||
And the server implementation have to add a line of codes: | ||
```typescript | ||
class ServerImpl implements IBookServiceServer { | ||
[name: string]: grpc.UntypedHandleCall; | ||
// others ... | ||
} | ||
``` | ||
If this line of code not added, there will be some error: | ||
``` | ||
TS2420: Class 'ServerImpl' incorrectly implements interface 'IBookServiceServer'. | ||
Index signature is missing in type 'ServerImpl'. | ||
``` | ||
Have a look at: [Typescript: Index signature is missing in type](https://stackoverflow.com/questions/37006008/typescript-index-signature-is-missing-in-type). | ||
### 5.0.1 | ||
@@ -467,0 +505,0 @@ Fix array.includes issue. See: [Issue#73](https://github.com/agreatfool/grpc_tools_node_protoc_ts/issues/73), [Commit#1e4ae67](https://github.com/agreatfool/grpc_tools_node_protoc_ts/commit/1e4ae677d2f1f0066a21fe5e9dd48b10dd24f5af). |
{ | ||
"compilerOptions": { | ||
"target": "ES6", | ||
"target": "ES2017", | ||
"module": "commonjs", | ||
@@ -5,0 +5,0 @@ "sourceMap": true, |
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
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
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
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
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1734
689
349663
+ Addedhandlebars@4.7.6(transitive)
+ Addedminimist@1.2.8(transitive)
+ Addedwordwrap@1.0.0(transitive)
- Removedansi-regex@5.0.1(transitive)
- Removedansi-styles@4.3.0(transitive)
- Removedcamelcase@5.3.1(transitive)
- Removedcliui@6.0.0(transitive)
- Removedcolor-convert@2.0.1(transitive)
- Removedcolor-name@1.1.4(transitive)
- Removeddecamelize@1.2.0(transitive)
- Removedemoji-regex@8.0.0(transitive)
- Removedfind-up@4.1.0(transitive)
- Removedget-caller-file@2.0.5(transitive)
- Removedhandlebars@4.7.4(transitive)
- Removedis-fullwidth-code-point@3.0.0(transitive)
- Removedlocate-path@5.0.0(transitive)
- Removedp-limit@2.3.0(transitive)
- Removedp-locate@4.1.0(transitive)
- Removedp-try@2.2.0(transitive)
- Removedpath-exists@4.0.0(transitive)
- Removedrequire-directory@2.1.1(transitive)
- Removedrequire-main-filename@2.0.0(transitive)
- Removedset-blocking@2.0.0(transitive)
- Removedstring-width@4.2.3(transitive)
- Removedstrip-ansi@6.0.1(transitive)
- Removedwhich-module@2.0.1(transitive)
- Removedwrap-ansi@6.2.0(transitive)
- Removedy18n@4.0.3(transitive)
- Removedyargs@15.4.1(transitive)
- Removedyargs-parser@18.1.3(transitive)
Updatedhandlebars@4.7.6