Use protopiler for protocol buffers

Co-authored-by: Jamie Kyle <jamie@signal.org>
This commit is contained in:
Fedor Indutny
2026-03-10 15:31:29 -07:00
committed by GitHub
parent b0e19f334e
commit c4ee32e9ee
97 changed files with 6197 additions and 6362 deletions

View File

@@ -0,0 +1,35 @@
// Copyright 2026 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
export default function transform() {
return {
visitor: {
CallExpression(path) {
const { node } = path;
if (node.arguments.length !== 0) {
return;
}
if (node.callee.type !== 'MemberExpression') {
return;
}
const { object, property } = node.callee;
if (object.type !== 'CallExpression') {
return;
}
if (property.type !== 'Identifier' || property.name !== 'finish') {
return;
}
if (
object.callee.type !== 'MemberExpression' ||
object.callee.property.type !== 'Identifier' ||
object.callee.property.name !== 'encode'
) {
return;
}
path.replaceWith(object);
},
},
};
}