fix paths

This commit is contained in:
tresabhi committed 2026-05-15 22:30:52 -05:00
1 parent e1cc60ea5e
commit 0a4b81cde4
20 files changed
+56 -39

No files matched your search

+2 -2
View File
@@ -46,9 +46,9 @@
"build:ratingleaderboard": "bun src/buildRatingLeaderboard.ts",
"build:proxyclient": "bun src/buildProxyClient.ts",
"build:catalogitemaccesssor": "bun src/buildCatalogItemAccessor.ts",
"prunestrings": "bun src/pruneStrings.ts",
"build:protos": "bun src/protos.ts",
"patchnotes": "bun src/patchNotes.ts"
"patchnotes": "bun src/patchNotes.ts",
"download:protos": "bun src/downloadProtos.ts"
},
"type": "module"
}
@@ -40,7 +40,7 @@ for (const file of files) {
let content = "";
for (const _import of imports) {
content += `import { ${_import.name}Component } from "@protos/game/proto/legacy/${_import.file}";\n`;
content += `import { ${_import.name}Component } from "@protos/blitz/${_import.file}";\n`;
}
content +=
+2 -2
View File
@@ -1,8 +1,8 @@
import { readFile, writeFile } from "fs/promises";
const IMPORT = "@protos/game/proto/legacy/auto_legacy_proxy_client";
const IMPORT = "@protos/blitz/auto_legacy_proxy_client";
const SOURCE =
"../../packages/closed/protos/game/proto/legacy/auto_legacy_proxy_client.proto";
"../../packages/closed/protos/blitz/auto_legacy_proxy_client.proto";
const TARGET = "../../packages/closed/src/unreal/methodPopulatedProxyClient.ts";
const requestPattern = /^message (\w+)Request {/gm;
+12
View File
@@ -0,0 +1,12 @@
import { ProxyClient } from "@blitzkit/closed";
import { assertSecret } from "@blitzkit/core";
const proxyClient = await new ProxyClient(
assertSecret(import.meta.env.WOTB_SERVER),
).handshake(assertSecret(import.meta.env.WOTB_VERSION));
const hashes = await proxyClient.GetProtoHashes({});
console.log(hashes);
proxyClient.close();
+11 -7
View File
@@ -6,7 +6,7 @@ const TS_PROTO_EXECUTABLE_LOCATIONS = [
"./node_modules/.bin/protoc-gen-ts_proto",
"../../node_modules/.bin/protoc-gen-ts_proto",
];
const ROOT = "../../packages/closed/protos";
const ROOT = "../closed/protos";
let tsProtoExecutableLocation: string | undefined = undefined;
@@ -28,11 +28,10 @@ if (!tsProtoExecutableLocation) {
);
}
await mkdir("temp", { recursive: true });
await mkdir("../../temp", { recursive: true });
let args = "";
args += `-I=${ROOT}\n`;
args += `--plugin=${tsProtoExecutableLocation}\n`;
args += "--ts_proto_opt=esModuleInterop=true\n";
args += "--ts_proto_opt=oneof=unions-value\n";
@@ -40,10 +39,17 @@ 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`;
// }
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`;
@@ -52,11 +58,9 @@ for (const file of filesRaw) {
if (file.endsWith(".ts")) await rm(`${ROOT}/${file}`);
}
await writeFile("temp/protoc.txt", args);
await writeFile("../../temp/protoc.txt", args);
// throw "";
execFile("protoc", ["@temp/protoc.txt"], (error, stdout, stderr) => {
execFile("protoc", ["@../../temp/protoc.txt"], (error, stdout, stderr) => {
if (error) throw new Error(error.message);
if (stderr) console.error(stderr);
if (stdout) console.log(stdout);