initial commit of actions
This commit is contained in:
commit
949ece5785
44660 changed files with 12034344 additions and 0 deletions
29
github/codeql-action-v2/node_modules/twirp-ts/build/protoc-gen-twirp-ts/gen/index-file.js
generated
vendored
Normal file
29
github/codeql-action-v2/node_modules/twirp-ts/build/protoc-gen-twirp-ts/gen/index-file.js
generated
vendored
Normal 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;
|
||||
Loading…
Add table
Add a link
Reference in a new issue