mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-24 12:09:51 +02:00
fix paths
This commit is contained in:
1 parent
e1cc60ea5e
commit
0a4b81cde4
20 files changed
+56
-39
No files matched your search
+4
-3
@@ -4,16 +4,17 @@
|
|||||||
"license": "BlitzKit License",
|
"license": "BlitzKit License",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
"setup": "bun install && bun run build:protos && bun run build:proxyclient && bun run build:catalogitemaccesssor",
|
||||||
|
"dev": "bun run dev:website",
|
||||||
|
"dev:website": "cd packages/website-ue && bun run dev",
|
||||||
"build:game": "cd packages/game && bun run build",
|
"build:game": "cd packages/game && bun run build",
|
||||||
"build:website": "cd packages/website-ue && bun run build",
|
"build:website": "cd packages/website-ue && bun run build",
|
||||||
"build:proxyclient": "cd packages/scripts && bun run build:proxyclient",
|
"build:proxyclient": "cd packages/scripts && bun run build:proxyclient",
|
||||||
"build:catalogitemaccesssor": "cd packages/scripts && bun run build:catalogitemaccesssor",
|
"build:catalogitemaccesssor": "cd packages/scripts && bun run build:catalogitemaccesssor",
|
||||||
"build:protos": "cd packages/scripts && bun run build:protos",
|
"build:protos": "cd packages/scripts && bun run build:protos",
|
||||||
"dev": "bun run dev:website",
|
|
||||||
"dev:website": "cd packages/website-ue && bun run dev",
|
|
||||||
"lint": "tsc",
|
"lint": "tsc",
|
||||||
"lint:website": "cd packages/website-ue && bun run lint",
|
"lint:website": "cd packages/website-ue && bun run lint",
|
||||||
"setup": "bun install && bun run build:protos && bun run build:proxyclient && bun run build:catalogitemaccesssor"
|
"download:protos": "cd packages/scripts && bun run download:protos"
|
||||||
},
|
},
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"workspaces": [
|
"workspaces": [
|
||||||
|
|||||||
+1
-1
Submodule packages/closed updated: 0999b4f394...d8bf9642b0.
@@ -46,9 +46,9 @@
|
|||||||
"build:ratingleaderboard": "bun src/buildRatingLeaderboard.ts",
|
"build:ratingleaderboard": "bun src/buildRatingLeaderboard.ts",
|
||||||
"build:proxyclient": "bun src/buildProxyClient.ts",
|
"build:proxyclient": "bun src/buildProxyClient.ts",
|
||||||
"build:catalogitemaccesssor": "bun src/buildCatalogItemAccessor.ts",
|
"build:catalogitemaccesssor": "bun src/buildCatalogItemAccessor.ts",
|
||||||
"prunestrings": "bun src/pruneStrings.ts",
|
|
||||||
"build:protos": "bun src/protos.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"
|
"type": "module"
|
||||||
}
|
}
|
||||||
@@ -40,7 +40,7 @@ for (const file of files) {
|
|||||||
let content = "";
|
let content = "";
|
||||||
|
|
||||||
for (const _import of imports) {
|
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 +=
|
content +=
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import { readFile, writeFile } from "fs/promises";
|
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 =
|
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 TARGET = "../../packages/closed/src/unreal/methodPopulatedProxyClient.ts";
|
||||||
|
|
||||||
const requestPattern = /^message (\w+)Request {/gm;
|
const requestPattern = /^message (\w+)Request {/gm;
|
||||||
|
|||||||
@@ -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();
|
||||||
@@ -6,7 +6,7 @@ const TS_PROTO_EXECUTABLE_LOCATIONS = [
|
|||||||
"./node_modules/.bin/protoc-gen-ts_proto",
|
"./node_modules/.bin/protoc-gen-ts_proto",
|
||||||
"../../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;
|
let tsProtoExecutableLocation: string | undefined = undefined;
|
||||||
|
|
||||||
@@ -28,11 +28,10 @@ if (!tsProtoExecutableLocation) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
await mkdir("temp", { recursive: true });
|
await mkdir("../../temp", { recursive: true });
|
||||||
|
|
||||||
let args = "";
|
let args = "";
|
||||||
|
|
||||||
args += `-I=${ROOT}\n`;
|
|
||||||
args += `--plugin=${tsProtoExecutableLocation}\n`;
|
args += `--plugin=${tsProtoExecutableLocation}\n`;
|
||||||
args += "--ts_proto_opt=esModuleInterop=true\n";
|
args += "--ts_proto_opt=esModuleInterop=true\n";
|
||||||
args += "--ts_proto_opt=oneof=unions-value\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_opt=snakeToCamel=false\n";
|
||||||
args += `--ts_proto_out=${ROOT}\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 filesRaw = await readdir(`${ROOT}`, { recursive: true });
|
||||||
const files: string[] = [];
|
const files: string[] = [];
|
||||||
|
|
||||||
for (const file of filesRaw) {
|
for (const file of filesRaw) {
|
||||||
|
if (!file.startsWith("blitz/")) continue;
|
||||||
|
|
||||||
if (file.endsWith(".proto")) {
|
if (file.endsWith(".proto")) {
|
||||||
files.push(file);
|
files.push(file);
|
||||||
args += `${ROOT}/${file}\n`;
|
args += `${ROOT}/${file}\n`;
|
||||||
@@ -52,11 +58,9 @@ for (const file of filesRaw) {
|
|||||||
if (file.endsWith(".ts")) await rm(`${ROOT}/${file}`);
|
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 (error) throw new Error(error.message);
|
||||||
if (stderr) console.error(stderr);
|
if (stderr) console.error(stderr);
|
||||||
if (stdout) console.log(stdout);
|
if (stdout) console.log(stdout);
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import type { MetadataAccessor } from "@blitzkit/closed";
|
import type { MetadataAccessor } from "@blitzkit/closed";
|
||||||
import type { Strings } from "@blitzkit/i18n";
|
import type { Strings } from "@blitzkit/i18n";
|
||||||
import locales from "@blitzkit/i18n/locales.json";
|
import locales from "@blitzkit/i18n/locales.json";
|
||||||
|
import type { TankUpgradePricePresetComponent } from "@protos/blitz/blitz_static_tank_upgrade_price_preset_component";
|
||||||
import type { Avatar } from "@protos/blitzkit/avatar";
|
import type { Avatar } from "@protos/blitzkit/avatar";
|
||||||
import type { AvatarList } from "@protos/blitzkit/avatar_list";
|
import type { AvatarList } from "@protos/blitzkit/avatar_list";
|
||||||
import type { Avatars } from "@protos/blitzkit/avatars";
|
import type { Avatars } from "@protos/blitzkit/avatars";
|
||||||
@@ -11,7 +12,6 @@ import type { Tank } from "@protos/blitzkit/tank";
|
|||||||
import type { TankList } from "@protos/blitzkit/tank_list";
|
import type { TankList } from "@protos/blitzkit/tank_list";
|
||||||
import type { Tanks } from "@protos/blitzkit/tanks";
|
import type { Tanks } from "@protos/blitzkit/tanks";
|
||||||
import type { Tiers } from "@protos/blitzkit/tiers";
|
import type { Tiers } from "@protos/blitzkit/tiers";
|
||||||
import type { TankUpgradePricePresetComponent } from "@protos/game/proto/legacy/blitz_static_tank_upgrade_price_preset_component";
|
|
||||||
|
|
||||||
export abstract class AbstractAPI {
|
export abstract class AbstractAPI {
|
||||||
abstract metadata: MetadataAccessor;
|
abstract metadata: MetadataAccessor;
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
import { fetchPB } from "@blitzkit/core";
|
import { fetchPB } from "@blitzkit/core";
|
||||||
import type { Strings } from "@blitzkit/i18n";
|
import type { Strings } from "@blitzkit/i18n";
|
||||||
|
import { TankUpgradePricePresetComponent } from "@protos/blitz/blitz_static_tank_upgrade_price_preset_component";
|
||||||
import { Avatars } from "@protos/blitzkit/avatars";
|
import { Avatars } from "@protos/blitzkit/avatars";
|
||||||
import { PopularTanks } from "@protos/blitzkit/popular_tanks";
|
import { PopularTanks } from "@protos/blitzkit/popular_tanks";
|
||||||
import { TankList } from "@protos/blitzkit/tank_list";
|
import { TankList } from "@protos/blitzkit/tank_list";
|
||||||
import { Tanks } from "@protos/blitzkit/tanks";
|
import { Tanks } from "@protos/blitzkit/tanks";
|
||||||
import { Tiers } from "@protos/blitzkit/tiers";
|
import { Tiers } from "@protos/blitzkit/tiers";
|
||||||
import { TankUpgradePricePresetComponent } from "@protos/game/proto/legacy/blitz_static_tank_upgrade_price_preset_component";
|
|
||||||
import { AbstractAPI, Cache } from "./abstract";
|
import { AbstractAPI, Cache } from "./abstract";
|
||||||
|
|
||||||
const rejected = Promise.reject("Not implemented on client");
|
const rejected = Promise.reject("Not implemented on client");
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import type { MetadataAccessor } from "@blitzkit/closed";
|
|||||||
import { assertSecret, sluggify } from "@blitzkit/core";
|
import { assertSecret, sluggify } from "@blitzkit/core";
|
||||||
import type { Strings } from "@blitzkit/i18n";
|
import type { Strings } from "@blitzkit/i18n";
|
||||||
import locales from "@blitzkit/i18n/locales.json";
|
import locales from "@blitzkit/i18n/locales.json";
|
||||||
|
import type { RemoteStorageComponent } from "@protos/blitz/blitz_static_remote_storage_component";
|
||||||
import type { Avatar, DeepPartial } from "@protos/blitzkit/avatar";
|
import type { Avatar, DeepPartial } from "@protos/blitzkit/avatar";
|
||||||
import type { Background } from "@protos/blitzkit/background";
|
import type { Background } from "@protos/blitzkit/background";
|
||||||
import type { PopularTanks } from "@protos/blitzkit/popular_tanks";
|
import type { PopularTanks } from "@protos/blitzkit/popular_tanks";
|
||||||
@@ -9,7 +10,6 @@ import type { Tank } from "@protos/blitzkit/tank";
|
|||||||
import type { TankListEntry } from "@protos/blitzkit/tank_list";
|
import type { TankListEntry } from "@protos/blitzkit/tank_list";
|
||||||
import type { Tanks } from "@protos/blitzkit/tanks";
|
import type { Tanks } from "@protos/blitzkit/tanks";
|
||||||
import type { Tiers } from "@protos/blitzkit/tiers";
|
import type { Tiers } from "@protos/blitzkit/tiers";
|
||||||
import type { RemoteStorageComponent } from "@protos/game/proto/legacy/blitz_static_remote_storage_component";
|
|
||||||
import { existsSync } from "fs";
|
import { existsSync } from "fs";
|
||||||
import { mkdir, readFile, writeFile } from "fs/promises";
|
import { mkdir, readFile, writeFile } from "fs/promises";
|
||||||
import { google } from "googleapis";
|
import { google } from "googleapis";
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { literals } from "@blitzkit/i18n";
|
import { literals } from "@blitzkit/i18n";
|
||||||
|
import { Grade } from "@protos/blitz/blitz_static_standard_grades_enum";
|
||||||
import type { Avatar } from "@protos/blitzkit/avatar";
|
import type { Avatar } from "@protos/blitzkit/avatar";
|
||||||
import { Grade } from "@protos/game/proto/legacy/blitz_static_standard_grades_enum";
|
|
||||||
import { DownloadIcon, StarFilledIcon } from "@radix-ui/react-icons";
|
import { DownloadIcon, StarFilledIcon } from "@radix-ui/react-icons";
|
||||||
import { useGameStrings } from "../../hooks/useGameStrings";
|
import { useGameStrings } from "../../hooks/useGameStrings";
|
||||||
import { useStrings } from "../../hooks/useStrings";
|
import { useStrings } from "../../hooks/useStrings";
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { formatCompact } from "@blitzkit/core";
|
import { formatCompact } from "@blitzkit/core";
|
||||||
import type { StandardPrice } from "@protos/game/proto/legacy/blitz_static_standard_price";
|
import type { StandardPrice } from "@protos/blitz/blitz_static_standard_price";
|
||||||
import type { StandardSinglePrice } from "@protos/game/proto/legacy/blitz_static_standard_single_price";
|
import type { StandardSinglePrice } from "@protos/blitz/blitz_static_standard_single_price";
|
||||||
import type { ComponentProps } from "react";
|
import type { ComponentProps } from "react";
|
||||||
import { useLocale } from "../../hooks/useLocale";
|
import { useLocale } from "../../hooks/useLocale";
|
||||||
import { classNames } from "../../ui/classNames";
|
import { classNames } from "../../ui/classNames";
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import { romanize } from "@blitzkit/core";
|
import { romanize } from "@blitzkit/core";
|
||||||
import { Grade } from "@protos/game/proto/legacy/blitz_static_standard_grades_enum";
|
import { Grade } from "@protos/blitz/blitz_static_standard_grades_enum";
|
||||||
import type { StandardPrice } from "@protos/game/proto/legacy/blitz_static_standard_price";
|
import type { StandardPrice } from "@protos/blitz/blitz_static_standard_price";
|
||||||
import type { UpgradeLine } from "@protos/game/proto/legacy/blitz_static_tank_upgrade_line";
|
import type { UpgradeLine } from "@protos/blitz/blitz_static_tank_upgrade_line";
|
||||||
import type { StageParameters } from "@protos/game/proto/legacy/blitz_static_tank_upgrade_single_stage";
|
import type { StageParameters } from "@protos/blitz/blitz_static_tank_upgrade_single_stage";
|
||||||
import { DoubleArrowDownIcon, DoubleArrowUpIcon } from "@radix-ui/react-icons";
|
import { DoubleArrowDownIcon, DoubleArrowUpIcon } from "@radix-ui/react-icons";
|
||||||
import { useMemo } from "react";
|
import { useMemo } from "react";
|
||||||
import {
|
import {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Nation } from "@protos/game/proto/legacy/blitz_static_tank_component";
|
import { Nation } from "@protos/blitz/blitz_static_tank_component";
|
||||||
import type { APIContext, GetStaticPaths } from "astro";
|
import type { APIContext, GetStaticPaths } from "astro";
|
||||||
import { clientUnmountedResponse } from "../../../../api/responses";
|
import { clientUnmountedResponse } from "../../../../api/responses";
|
||||||
import { game } from "../../../../game/game";
|
import { game } from "../../../../game/game";
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { TankUpgradePricePresetComponent } from "@protos/game/proto/legacy/blitz_static_tank_upgrade_price_preset_component";
|
import { TankUpgradePricePresetComponent } from "@protos/blitz/blitz_static_tank_upgrade_price_preset_component";
|
||||||
import type { APIContext, GetStaticPaths } from "astro";
|
import type { APIContext, GetStaticPaths } from "astro";
|
||||||
import { api } from "../../../../../api/dynamic";
|
import { api } from "../../../../../api/dynamic";
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { StandardSinglePrice } from "@protos/game/proto/legacy/blitz_static_standard_single_price";
|
import { StandardSinglePrice } from "@protos/blitz/blitz_static_standard_single_price";
|
||||||
import type { TankCatalogComponent } from "@protos/game/proto/legacy/blitz_static_tank_component";
|
import type { TankCatalogComponent } from "@protos/blitz/blitz_static_tank_component";
|
||||||
import { PenetrationGroup } from "@protos/game/proto/legacy/blitz_static_tank_penetration_group";
|
import { PenetrationGroup } from "@protos/blitz/blitz_static_tank_penetration_group";
|
||||||
import {
|
import {
|
||||||
ModuleUpgrade,
|
ModuleUpgrade,
|
||||||
ModuleUpgrade_Modifier,
|
ModuleUpgrade_Modifier,
|
||||||
@@ -13,7 +13,7 @@ import {
|
|||||||
TankAttributeChange_AttributeName,
|
TankAttributeChange_AttributeName,
|
||||||
TankAttributeChange_Modifier,
|
TankAttributeChange_Modifier,
|
||||||
VisualChanges,
|
VisualChanges,
|
||||||
} from "@protos/game/proto/legacy/blitz_static_tank_upgrade_single_stage";
|
} from "@protos/blitz/blitz_static_tank_upgrade_single_stage";
|
||||||
import {
|
import {
|
||||||
isAlternativeLine,
|
isAlternativeLine,
|
||||||
originalLineName,
|
originalLineName,
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { normalizeAngleDeg } from "@blitzkit/core";
|
import { normalizeAngleDeg } from "@blitzkit/core";
|
||||||
import type { PitchLimit } from "@protos/game/proto/legacy/blitz_static_tank_upgrade_single_stage";
|
import type { PitchLimit } from "@protos/blitz/blitz_static_tank_upgrade_single_stage";
|
||||||
import { clamp, degToRad, lerp, radToDeg } from "three/src/math/MathUtils.js";
|
import { clamp, degToRad, lerp, radToDeg } from "three/src/math/MathUtils.js";
|
||||||
|
|
||||||
export function applyPitchYawLimits(
|
export function applyPitchYawLimits(
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
import type { Tank } from "@protos/blitzkit/tank";
|
import { TankClass } from "@protos/blitz/blitz_static_tank_component";
|
||||||
import { TankClass } from "@protos/game/proto/legacy/blitz_static_tank_component";
|
|
||||||
import {
|
import {
|
||||||
ShellUpgradeSingleChange_AttributeName,
|
ShellUpgradeSingleChange_AttributeName,
|
||||||
StageParameters,
|
StageParameters,
|
||||||
TankAttributeChange_AttributeName,
|
TankAttributeChange_AttributeName,
|
||||||
} from "@protos/game/proto/legacy/blitz_static_tank_upgrade_single_stage";
|
} from "@protos/blitz/blitz_static_tank_upgrade_single_stage";
|
||||||
|
import type { Tank } from "@protos/blitzkit/tank";
|
||||||
import { radToDeg } from "three/src/math/MathUtils.js";
|
import { radToDeg } from "three/src/math/MathUtils.js";
|
||||||
import { applyPitchYawLimits } from "./applyPitchYawLimits";
|
import { applyPitchYawLimits } from "./applyPitchYawLimits";
|
||||||
import { TerrainHardness, type TankState } from "./tankState";
|
import { TerrainHardness, type TankState } from "./tankState";
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import {
|
|||||||
Nation,
|
Nation,
|
||||||
TankClass,
|
TankClass,
|
||||||
TankType,
|
TankType,
|
||||||
} from "@protos/game/proto/legacy/blitz_static_tank_component";
|
} from "@protos/blitz/blitz_static_tank_component";
|
||||||
import type { ReactNode } from "react";
|
import type { ReactNode } from "react";
|
||||||
import { VintageIcon } from "../icons/Vintage";
|
import { VintageIcon } from "../icons/Vintage";
|
||||||
import {
|
import {
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import type { Tank } from "@protos/blitzkit/tank";
|
|
||||||
import {
|
import {
|
||||||
ShellUpgradeSingleChange_AttributeName,
|
ShellUpgradeSingleChange_AttributeName,
|
||||||
TankAttributeChange_AttributeName,
|
TankAttributeChange_AttributeName,
|
||||||
} from "@protos/game/proto/legacy/blitz_static_tank_upgrade_single_stage";
|
} from "@protos/blitz/blitz_static_tank_upgrade_single_stage";
|
||||||
|
import type { Tank } from "@protos/blitzkit/tank";
|
||||||
import { aggregateParameters } from "./aggregateParameters";
|
import { aggregateParameters } from "./aggregateParameters";
|
||||||
import {
|
import {
|
||||||
characteristics,
|
characteristics,
|
||||||
|
|||||||
Reference in new issue
Block a user