ts-proto 2.11.8 → 2.11.10
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/build/src/schema.js +3 -2
- package/build/src/types.js +2 -1
- package/package.json +1 -1
package/build/src/schema.js
CHANGED
|
@@ -66,7 +66,8 @@ function generateSchema(ctx, fileDesc, sourceInfo) {
|
|
|
66
66
|
});
|
|
67
67
|
(0, visit_1.visitServices)(fileDesc, sourceInfo, (serviceDesc) => {
|
|
68
68
|
if (options.outputClientImpl) {
|
|
69
|
-
|
|
69
|
+
const suffix = options.outputServices.includes(options_1.ServiceOption.GRPC) ? "Client" : "ClientImpl";
|
|
70
|
+
addReference(serviceDesc.name, `${serviceDesc.name}${suffix}`);
|
|
70
71
|
}
|
|
71
72
|
});
|
|
72
73
|
const dependencies = fileDesc.dependency.map((dep) => {
|
|
@@ -178,7 +179,7 @@ function getExtensionValue(ctx, extension, data) {
|
|
|
178
179
|
const reader = new wire_1.BinaryReader(data[0]);
|
|
179
180
|
let value = reader[(0, types_1.toReaderCall)(extension)]();
|
|
180
181
|
if (typeof value === "string") {
|
|
181
|
-
value = (
|
|
182
|
+
value = JSON.stringify(value);
|
|
182
183
|
}
|
|
183
184
|
return (0, ts_poet_1.code) `'${extension.name}': ${value}`;
|
|
184
185
|
}
|
package/build/src/types.js
CHANGED
|
@@ -707,7 +707,8 @@ function shouldGenerateJSMapType(ctx, message, field) {
|
|
|
707
707
|
return false;
|
|
708
708
|
}
|
|
709
709
|
return (mapType.keyField.type === ts_proto_descriptors_1.FieldDescriptorProto_Type.TYPE_BOOL ||
|
|
710
|
-
(isLong(mapType.keyField) &&
|
|
710
|
+
(isLong(mapType.keyField) &&
|
|
711
|
+
(ctx.options.forceLong === options_1.LongOption.LONG || ctx.options.forceLong === options_1.LongOption.BIGINT)));
|
|
711
712
|
}
|
|
712
713
|
function detectMapType(ctx, messageDesc, fieldDesc) {
|
|
713
714
|
const { typeMap } = ctx;
|