ts-proto 1.83.0 → 1.83.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [1.83.1](https://github.com/stephenh/ts-proto/compare/v1.83.0...v1.83.1) (2021-09-17)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * deprecated grpc and replace with @grpc/grpc-js ([#362](https://github.com/stephenh/ts-proto/issues/362)) ([1a11b97](https://github.com/stephenh/ts-proto/commit/1a11b97e9b5e92e79fdd4e22d3e8ea4536af243b))
7
+
1
8
  # [1.83.0](https://github.com/stephenh/ts-proto/compare/v1.82.5...v1.83.0) (2021-09-12)
2
9
 
3
10
 
@@ -6,12 +6,11 @@ const types_1 = require("./types");
6
6
  const sourceInfo_1 = require("./sourceInfo");
7
7
  const main_1 = require("./main");
8
8
  const utils_1 = require("./utils");
9
- const options_1 = require("./options");
10
9
  function generateNestjsServiceController(ctx, fileDesc, sourceInfo, serviceDesc) {
11
10
  var _a;
12
11
  const { options } = ctx;
13
12
  const chunks = [];
14
- const Metadata = options.outputServices === options_1.ServiceOption.GRPC ? ts_poet_1.imp('Metadata@@grpc/grpc-js') : ts_poet_1.imp('Metadata@grpc');
13
+ const Metadata = ts_poet_1.imp('Metadata@@grpc/grpc-js');
15
14
  utils_1.maybeAddComment(sourceInfo, chunks, (_a = serviceDesc.options) === null || _a === void 0 ? void 0 : _a.deprecated);
16
15
  const t = options.context ? `<${main_1.contextTypeVar}>` : '';
17
16
  chunks.push(ts_poet_1.code `
@@ -74,7 +73,7 @@ exports.generateNestjsServiceController = generateNestjsServiceController;
74
73
  function generateNestjsServiceClient(ctx, fileDesc, sourceInfo, serviceDesc) {
75
74
  const { options } = ctx;
76
75
  const chunks = [];
77
- const Metadata = options.outputServices === options_1.ServiceOption.GRPC ? ts_poet_1.imp('Metadata@@grpc/grpc-js') : ts_poet_1.imp('Metadata@grpc');
76
+ const Metadata = ts_poet_1.imp('Metadata@@grpc/grpc-js');
78
77
  utils_1.maybeAddComment(sourceInfo, chunks);
79
78
  const t = options.context ? `<${main_1.contextTypeVar}>` : ``;
80
79
  chunks.push(ts_poet_1.code `
@@ -48,7 +48,7 @@ function generateService(ctx, fileDesc, sourceInfo, serviceDesc) {
48
48
  params.push(ts_poet_1.code `metadata?: grpc.Metadata`);
49
49
  }
50
50
  else if (options.addGrpcMetadata) {
51
- const Metadata = ts_poet_1.imp('Metadata@grpc');
51
+ const Metadata = ts_poet_1.imp('Metadata@@grpc/grpc-js');
52
52
  const q = options.addNestjsRestParameter ? '' : '?';
53
53
  params.push(ts_poet_1.code `metadata${q}: ${Metadata}`);
54
54
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ts-proto",
3
- "version": "1.83.0",
3
+ "version": "1.83.1",
4
4
  "description": "",
5
5
  "main": "build/plugin.js",
6
6
  "repository": "github:stephenh/ts-proto",