initial commit of actions

This commit is contained in:
Dominik Polakovics Polakovics 2026-01-31 18:56:04 +01:00
commit 949ece5785
44660 changed files with 12034344 additions and 0 deletions

View file

@ -0,0 +1,29 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.genIndexFile = void 0;
const file_1 = require("../file");
function genIndexFile(registry, files) {
const fileToExport = registry.allFiles()
.filter((fileDescriptor) => {
let hasExports = false;
registry.visitTypes(fileDescriptor, descriptor => {
// we are not interested in synthetic types like map entry messages
if (registry.isSyntheticElement(descriptor))
return;
hasExports = true;
});
return hasExports;
})
.map((file => { var _a; return (_a = file.name) === null || _a === void 0 ? void 0 : _a.replace(".proto", ""); }));
const compiledFiles = files.filter(file => file.getContent() !== "").map(file => {
return file.fileName.replace(".ts", "");
});
if (compiledFiles.length > 0) {
fileToExport.push(...compiledFiles);
}
const indexFile = new file_1.File('index.ts');
return indexFile.setContent(fileToExport.map((fileName) => {
return `export * from "./${fileName}";`;
}).join("\n"));
}
exports.genIndexFile = genIndexFile;