ts-proto 2.11.0 → 2.11.2
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.
|
@@ -37,7 +37,7 @@ function generateNestjsServiceController(ctx, fileDesc, sourceInfo, serviceDesc)
|
|
|
37
37
|
// Return observable for interface only configuration, passing returnObservable=true and methodDesc.serverStreaming=true
|
|
38
38
|
let returns;
|
|
39
39
|
if ((0, types_1.isEmptyType)(methodDesc.outputType)) {
|
|
40
|
-
returns = (0, ts_poet_1.code) `void
|
|
40
|
+
returns = (0, ts_poet_1.code) `void | Promise<void>`;
|
|
41
41
|
}
|
|
42
42
|
else if (options.returnObservable || methodDesc.serverStreaming) {
|
|
43
43
|
returns = (0, ts_poet_1.code) `${(0, types_1.responseObservable)(ctx, methodDesc)}`;
|
package/build/src/schema.js
CHANGED
|
@@ -70,7 +70,7 @@ function generateSchema(ctx, fileDesc, sourceInfo) {
|
|
|
70
70
|
}
|
|
71
71
|
});
|
|
72
72
|
const dependencies = fileDesc.dependency.map((dep) => {
|
|
73
|
-
return (0, ts_poet_1.code) `${(0, utils_1.impFile)(options, `protoMetadata@./${dep.replace(".proto", "")}`)}`;
|
|
73
|
+
return (0, ts_poet_1.code) `${(0, utils_1.impFile)(options, `protoMetadata@./${dep.replace(".proto", "")}${options.fileSuffix}`)}`;
|
|
74
74
|
});
|
|
75
75
|
// Use toObject so that we get enums as numbers (instead of the default toJSON behavior)
|
|
76
76
|
const descriptor = ts_proto_descriptors_1.FileDescriptorProto.fromPartial(fileDesc);
|