From f7933a129528097e3e9d0f9841fb4ed528a455b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tr=C3=A8sAbhi?= <43380238+tresabhi@users.noreply.github.com> Date: Thu, 9 Apr 2026 22:05:21 -0500 Subject: [PATCH] fix: update builders --- packages/scripts/src/buildCatalogItemAccessor.ts | 12 ++++++------ packages/scripts/src/buildProxyClient.ts | 5 +++-- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/packages/scripts/src/buildCatalogItemAccessor.ts b/packages/scripts/src/buildCatalogItemAccessor.ts index 8fb850e70..63b684365 100644 --- a/packages/scripts/src/buildCatalogItemAccessor.ts +++ b/packages/scripts/src/buildCatalogItemAccessor.ts @@ -1,6 +1,6 @@ import { readdir, readFile, writeFile } from "fs/promises"; -const SOURCES = "../../packages/closed/protos"; +const SOURCES = "../../packages/closed/protos/game/proto/legacy"; const TARGET = "../../packages/closed/src/unreal/catalogItemAccessor.ts"; const componentPattern = /^message (\w+)Component {/gm; @@ -8,15 +8,15 @@ const componentPattern = /^message (\w+)Component {/gm; const files = await readdir(SOURCES).then((files) => files.filter( (file) => - file.startsWith("blitz_static_") && file.endsWith("_component.proto") - ) + file.startsWith("blitz_static_") && file.endsWith("_component.proto"), + ), ); const imports: { name: string; file: string }[] = []; for (const file of files) { const content = await readFile(`${SOURCES}/${file}`).then((buffer) => - buffer.toString() + buffer.toString(), ); const components = content.matchAll(componentPattern); @@ -26,7 +26,7 @@ for (const file of files) { if (duplicate) { console.warn( - `Duplicate component ${name} across ${duplicate.file}.proto and ${file}` + `Duplicate component ${name} across ${duplicate.file}.proto and ${file}`, ); continue; } @@ -40,7 +40,7 @@ for (const file of files) { let content = ""; for (const _import of imports) { - content += `import { ${_import.name}Component } from "@protos/${_import.file}";\n`; + content += `import { ${_import.name}Component } from "@protos/game/proto/legacy/${_import.file}";\n`; } content += diff --git a/packages/scripts/src/buildProxyClient.ts b/packages/scripts/src/buildProxyClient.ts index 2f0cee0ab..08649bacd 100644 --- a/packages/scripts/src/buildProxyClient.ts +++ b/packages/scripts/src/buildProxyClient.ts @@ -1,7 +1,8 @@ import { readFile, writeFile } from "fs/promises"; -const IMPORT = "@protos/auto_legacy_proxy_client"; -const SOURCE = "../../packages/closed/protos/auto_legacy_proxy_client.proto"; +const IMPORT = "@protos/game/proto/legacy/auto_legacy_proxy_client"; +const SOURCE = + "../../packages/closed/protos/game/proto/legacy/auto_legacy_proxy_client.proto"; const TARGET = "../../packages/closed/src/unreal/methodPopulatedProxyClient.ts"; const requestPattern = /^message (\w+)Request {/gm;