simplify imports

This commit is contained in:
tresabhi committed 2026-05-15 22:46:36 -05:00
1 parent 0a4b81cde4
commit f550386fd9
24 files changed
+59 -62

No files matched your search

@@ -40,7 +40,7 @@ for (const file of files) {
let content = "";
for (const _import of imports) {
content += `import { ${_import.name}Component } from "@protos/blitz/${_import.file}";\n`;
content += `import { ${_import.name}Component } from "@protos/${_import.file}";\n`;
}
content +=
+1 -1
View File
@@ -1,6 +1,6 @@
import { readFile, writeFile } from "fs/promises";
const IMPORT = "@protos/blitz/auto_legacy_proxy_client";
const IMPORT = "@protos/auto_legacy_proxy_client";
const SOURCE =
"../../packages/closed/protos/blitz/auto_legacy_proxy_client.proto";
const TARGET = "../../packages/closed/src/unreal/methodPopulatedProxyClient.ts";
+3 -6
View File
@@ -39,17 +39,14 @@ args += "--ts_proto_opt=unrecognizedEnum=false\n";
args += "--ts_proto_opt=snakeToCamel=false\n";
args += `--ts_proto_out=${ROOT}\n`;
args += `-I=${ROOT}\n`;
// for (const dir of await readdir(ROOT)) {
// args += `-I=${ROOT}/${dir}\n`;
// }
for (const dir of await readdir(ROOT)) {
args += `-I=${ROOT}/${dir}\n`;
}
const filesRaw = await readdir(`${ROOT}`, { recursive: true });
const files: string[] = [];
for (const file of filesRaw) {
if (!file.startsWith("blitz/")) continue;
if (file.endsWith(".proto")) {
files.push(file);
args += `${ROOT}/${file}\n`;