Comparing version 1.166.4 to 1.167.0
@@ -14,3 +14,3 @@ "use strict"; | ||
let unrecognizedEnum = { present: false }; | ||
(0, utils_1.maybeAddComment)(sourceInfo, chunks, (_a = enumDesc.options) === null || _a === void 0 ? void 0 : _a.deprecated); | ||
(0, utils_1.maybeAddComment)(options, sourceInfo, chunks, (_a = enumDesc.options) === null || _a === void 0 ? void 0 : _a.deprecated); | ||
if (options.enumsAsLiterals) { | ||
@@ -31,3 +31,3 @@ chunks.push((0, ts_poet_1.code) `export const ${(0, ts_poet_1.def)(fullName)} = {`); | ||
} | ||
(0, utils_1.maybeAddComment)(info, chunks, (_a = valueDesc.options) === null || _a === void 0 ? void 0 : _a.deprecated, `${memberName} - `); | ||
(0, utils_1.maybeAddComment)(options, info, chunks, (_a = valueDesc.options) === null || _a === void 0 ? void 0 : _a.deprecated, `${memberName} - `); | ||
chunks.push((0, ts_poet_1.code) `${memberName} ${delimiter} ${options.stringEnums ? `"${valueName}"` : valueDesc.number.toString()},`); | ||
@@ -34,0 +34,0 @@ }); |
@@ -16,3 +16,3 @@ "use strict"; | ||
const chunks = []; | ||
(0, utils_1.maybeAddComment)(sourceInfo, chunks, (_a = serviceDesc.options) === null || _a === void 0 ? void 0 : _a.deprecated); | ||
(0, utils_1.maybeAddComment)(ctx.options, sourceInfo, chunks, (_a = serviceDesc.options) === null || _a === void 0 ? void 0 : _a.deprecated); | ||
// Service definition type | ||
@@ -35,3 +35,3 @@ const name = (0, ts_poet_1.def)(`${serviceDesc.name}Definition`); | ||
const info = sourceInfo.lookup(sourceInfo_1.Fields.service.method, index); | ||
(0, utils_1.maybeAddComment)(info, chunks, (_c = methodDesc.options) === null || _c === void 0 ? void 0 : _c.deprecated); | ||
(0, utils_1.maybeAddComment)(ctx.options, info, chunks, (_c = methodDesc.options) === null || _c === void 0 ? void 0 : _c.deprecated); | ||
chunks.push((0, ts_poet_1.code) ` | ||
@@ -38,0 +38,0 @@ ${(0, case_1.uncapitalize)(methodDesc.name)}: ${generateMethodDefinition(ctx, methodDesc)}, |
@@ -44,3 +44,3 @@ "use strict"; | ||
const chunks = []; | ||
(0, utils_1.maybeAddComment)(sourceInfo, chunks, (_a = serviceDesc.options) === null || _a === void 0 ? void 0 : _a.deprecated); | ||
(0, utils_1.maybeAddComment)(ctx.options, sourceInfo, chunks, (_a = serviceDesc.options) === null || _a === void 0 ? void 0 : _a.deprecated); | ||
// Service definition type | ||
@@ -60,3 +60,3 @@ const name = (0, ts_poet_1.def)(`${serviceDesc.name}Service`); | ||
const info = sourceInfo.lookup(sourceInfo_1.Fields.service.method, index); | ||
(0, utils_1.maybeAddComment)(info, chunks, (_b = methodDesc.options) === null || _b === void 0 ? void 0 : _b.deprecated); | ||
(0, utils_1.maybeAddComment)(ctx.options, info, chunks, (_b = methodDesc.options) === null || _b === void 0 ? void 0 : _b.deprecated); | ||
const inputEncoder = (0, encode_1.generateEncoder)(ctx, methodDesc.inputType); | ||
@@ -92,3 +92,3 @@ const outputEncoder = (0, encode_1.generateEncoder)(ctx, methodDesc.outputType); | ||
const info = sourceInfo.lookup(sourceInfo_1.Fields.service.method, index); | ||
(0, utils_1.maybeAddComment)(info, chunks, (_a = methodDesc.options) === null || _a === void 0 ? void 0 : _a.deprecated); | ||
(0, utils_1.maybeAddComment)(ctx.options, info, chunks, (_a = methodDesc.options) === null || _a === void 0 ? void 0 : _a.deprecated); | ||
const callType = methodDesc.clientStreaming | ||
@@ -117,3 +117,3 @@ ? methodDesc.serverStreaming | ||
const info = sourceInfo.lookup(sourceInfo_1.Fields.service.method, index); | ||
(0, utils_1.maybeAddComment)(info, chunks, (_a = methodDesc.options) === null || _a === void 0 ? void 0 : _a.deprecated); | ||
(0, utils_1.maybeAddComment)(ctx.options, info, chunks, (_a = methodDesc.options) === null || _a === void 0 ? void 0 : _a.deprecated); | ||
const responseCallback = (0, ts_poet_1.code) `(error: ${ServiceError} | null, response: ${outputType}) => void`; | ||
@@ -120,0 +120,0 @@ if (methodDesc.clientStreaming) { |
@@ -14,3 +14,3 @@ "use strict"; | ||
const Metadata = (0, ts_poet_1.imp)("Metadata@@grpc/grpc-js"); | ||
(0, utils_1.maybeAddComment)(sourceInfo, chunks, (_a = serviceDesc.options) === null || _a === void 0 ? void 0 : _a.deprecated); | ||
(0, utils_1.maybeAddComment)(options, sourceInfo, chunks, (_a = serviceDesc.options) === null || _a === void 0 ? void 0 : _a.deprecated); | ||
const t = options.context ? `<${main_1.contextTypeVar}>` : ""; | ||
@@ -24,3 +24,3 @@ chunks.push((0, ts_poet_1.code) ` | ||
const info = sourceInfo.lookup(sourceInfo_1.Fields.service.method, index); | ||
(0, utils_1.maybeAddComment)(info, chunks, (_a = serviceDesc.options) === null || _a === void 0 ? void 0 : _a.deprecated); | ||
(0, utils_1.maybeAddComment)(options, info, chunks, (_a = serviceDesc.options) === null || _a === void 0 ? void 0 : _a.deprecated); | ||
const params = []; | ||
@@ -79,3 +79,3 @@ if (options.context) { | ||
const Metadata = (0, ts_poet_1.imp)("Metadata@@grpc/grpc-js"); | ||
(0, utils_1.maybeAddComment)(sourceInfo, chunks); | ||
(0, utils_1.maybeAddComment)(options, sourceInfo, chunks); | ||
const t = options.context ? `<${main_1.contextTypeVar}>` : ``; | ||
@@ -104,3 +104,3 @@ chunks.push((0, ts_poet_1.code) ` | ||
const info = sourceInfo.lookup(sourceInfo_1.Fields.service.method, index); | ||
(0, utils_1.maybeAddComment)(info, chunks, (_a = methodDesc.options) === null || _a === void 0 ? void 0 : _a.deprecated); | ||
(0, utils_1.maybeAddComment)(options, info, chunks, (_a = methodDesc.options) === null || _a === void 0 ? void 0 : _a.deprecated); | ||
chunks.push((0, ts_poet_1.code) ` | ||
@@ -107,0 +107,0 @@ ${methodDesc.formattedName}( |
@@ -35,3 +35,3 @@ "use strict"; | ||
const info = sourceInfo.lookup(sourceInfo_1.Fields.service.method, index); | ||
(0, utils_1.maybeAddComment)(info, chunks, (_a = methodDesc.options) === null || _a === void 0 ? void 0 : _a.deprecated); | ||
(0, utils_1.maybeAddComment)(ctx.options, info, chunks, (_a = methodDesc.options) === null || _a === void 0 ? void 0 : _a.deprecated); | ||
if (methodDesc.clientStreaming) { | ||
@@ -93,3 +93,3 @@ if (methodDesc.serverStreaming) { | ||
const info = sourceInfo.lookup(sourceInfo_1.Fields.service.method, index); | ||
(0, utils_1.maybeAddComment)(info, chunks, (_a = methodDesc.options) === null || _a === void 0 ? void 0 : _a.deprecated); | ||
(0, utils_1.maybeAddComment)(ctx.options, info, chunks, (_a = methodDesc.options) === null || _a === void 0 ? void 0 : _a.deprecated); | ||
if (methodDesc.clientStreaming) { | ||
@@ -96,0 +96,0 @@ if (methodDesc.serverStreaming) { |
@@ -23,3 +23,3 @@ "use strict"; | ||
const chunks = []; | ||
(0, utils_1.maybeAddComment)(sourceInfo, chunks, (_a = serviceDesc.options) === null || _a === void 0 ? void 0 : _a.deprecated); | ||
(0, utils_1.maybeAddComment)(options, sourceInfo, chunks, (_a = serviceDesc.options) === null || _a === void 0 ? void 0 : _a.deprecated); | ||
const maybeTypeVar = options.context ? `<${main_1.contextTypeVar}>` : ""; | ||
@@ -31,3 +31,3 @@ chunks.push((0, ts_poet_1.code) `export interface ${(0, ts_poet_1.def)(serviceDesc.name)}${maybeTypeVar} {`); | ||
const info = sourceInfo.lookup(sourceInfo_1.Fields.service.method, index); | ||
(0, utils_1.maybeAddComment)(info, chunks, (_a = methodDesc.options) === null || _a === void 0 ? void 0 : _a.deprecated); | ||
(0, utils_1.maybeAddComment)(options, info, chunks, (_a = methodDesc.options) === null || _a === void 0 ? void 0 : _a.deprecated); | ||
const params = []; | ||
@@ -34,0 +34,0 @@ if (options.context) { |
@@ -100,2 +100,3 @@ "use strict"; | ||
rpcErrorHandler: false, | ||
comments: true, | ||
}; | ||
@@ -102,0 +103,0 @@ } |
@@ -82,3 +82,6 @@ "use strict"; | ||
/** Removes potentially harmful characters from comments and pushes it into chunks. */ | ||
function maybeAddComment(desc, chunks, deprecated, prefix = "") { | ||
function maybeAddComment(options, desc, chunks, deprecated, prefix = "") { | ||
if (!options.comments) { | ||
return; | ||
} | ||
let lines = []; | ||
@@ -85,0 +88,0 @@ if (desc.leadingComments || desc.trailingComments) { |
{ | ||
"name": "ts-proto", | ||
"version": "1.166.4", | ||
"version": "1.167.0", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "build/plugin.js", |
Sorry, the diff of this file is too big to display
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
343339
5968
947