Extract @sendou/in-game-lists and @sendou/tournament-engine workspace packages

This commit is contained in:
Kalle
2026-08-16 09:29:49 +03:00
parent bbc8ea57af
commit 2c73764a17
399 changed files with 1160 additions and 877 deletions

View File

@@ -1,13 +1,13 @@
import type {
MainWeaponId,
ModeShort,
StageId,
} from "@sendou/in-game-lists/types";
import { sub } from "date-fns";
import { sql } from "kysely";
import { db } from "~/db/sql";
import type { Tables } from "~/db/tables";
import type { SkillTeamIdentifier } from "~/features/mmr/mmr-utils";
import type {
MainWeaponId,
ModeShort,
StageId,
} from "~/modules/in-game-lists/types";
import { databaseTimestampToDate } from "~/utils/dates";
import { logger } from "~/utils/logger";

View File

@@ -3,6 +3,16 @@
import fs from "node:fs";
import path from "node:path";
import { fileURLToPath } from "node:url";
import type {
MainWeaponId,
SpecialWeaponId,
SubWeaponId,
} from "@sendou/in-game-lists/types";
import {
SQUID_BEAKON_ID,
subWeaponIds,
weaponIdToBaseWeaponId,
} from "@sendou/in-game-lists/weapon-ids";
import { z } from "zod";
import type {
BaseWeaponStats,
@@ -11,16 +21,6 @@ import type {
SubWeaponParams,
WeaponKit,
} from "~/features/build-analyzer/analyzer-types";
import type {
MainWeaponId,
SpecialWeaponId,
SubWeaponId,
} from "~/modules/in-game-lists/types";
import {
SQUID_BEAKON_ID,
subWeaponIds,
weaponIdToBaseWeaponId,
} from "~/modules/in-game-lists/weapon-ids";
import invariant from "~/utils/invariant";
import { logger } from "~/utils/logger";
import {

View File

@@ -1,7 +1,7 @@
import fs from "node:fs";
import path from "node:path";
import { fileURLToPath } from "node:url";
import { brandIds } from "~/modules/in-game-lists/brand-ids";
import { brandIds } from "@sendou/in-game-lists/brand-ids";
import invariant from "~/utils/invariant";
import {
LANG_JSONS_TO_CREATE,

View File

@@ -1,8 +1,8 @@
import fs from "node:fs";
import path from "node:path";
import { fileURLToPath } from "node:url";
import { abilitiesShort } from "~/modules/in-game-lists/abilities";
import { brandIds } from "~/modules/in-game-lists/brand-ids";
import { abilitiesShort } from "@sendou/in-game-lists/abilities";
import { brandIds } from "@sendou/in-game-lists/brand-ids";
import invariant from "~/utils/invariant";
import {
LANG_JSONS_TO_CREATE,

View File

@@ -1,17 +1,17 @@
import fs from "node:fs";
import path from "node:path";
import { fileURLToPath } from "node:url";
import { DAMAGE_RECEIVERS } from "~/features/object-damage-calculator/calculator-constants";
import type {
MainWeaponId,
SpecialWeaponId,
SubWeaponId,
} from "~/modules/in-game-lists/types";
} from "@sendou/in-game-lists/types";
import {
mainWeaponIds,
specialWeaponIds,
subWeaponIds,
} from "~/modules/in-game-lists/weapon-ids";
} from "@sendou/in-game-lists/weapon-ids";
import { DAMAGE_RECEIVERS } from "~/features/object-damage-calculator/calculator-constants";
// To run this script drop the https://github.com/Leanny/splat3 repo into scripts/dicts/splat3
import {
loadDamageRateInfo,

View File

@@ -1,8 +1,8 @@
import type { MainWeaponId } from "@sendou/in-game-lists/types";
import { mainWeaponIds } from "@sendou/in-game-lists/weapon-ids";
import * as BadgeRepository from "~/features/badges/BadgeRepository.server";
import * as BuildRepository from "~/features/builds/BuildRepository.server";
import * as XRankPlacementRepository from "~/features/top-search/XRankPlacementRepository.server";
import type { MainWeaponId } from "~/modules/in-game-lists/types";
import { mainWeaponIds } from "~/modules/in-game-lists/weapon-ids";
import invariant from "~/utils/invariant";
import { logger } from "~/utils/logger";
import { xRankSchema } from "./schemas";

View File

@@ -27,10 +27,10 @@
*/
import { readdirSync, readFileSync, writeFileSync } from "node:fs";
import { join } from "node:path";
import { stageIds } from "@sendou/in-game-lists/stage-ids";
import type { ModeShort, StageId } from "@sendou/in-game-lists/types";
import { ALL_WEAPON_ENTRIES } from "../../app/features/scanner/core/detectors/death/weapon-names";
import type { ScannerLobby } from "../../app/features/scanner/scanner-types";
import { stageIds } from "../../app/modules/in-game-lists/stage-ids";
import type { ModeShort, StageId } from "../../app/modules/in-game-lists/types";
import gameMisc from "../../locales/en/game-misc.json";
const SPLAT3_DIR =
@@ -344,7 +344,7 @@ writeFileSync(
* mapped to the sendou.ink id it means (core/localized.ts derives the
* flattened match sets detectors snap OCR output against).`,
)}
import type { ModeShort, StageId } from "~/modules/in-game-lists/types";
import type { ModeShort, StageId } from "@sendou/in-game-lists/types";
import type { ScannerLobby } from "../scanner-types";
export interface LocalizedLobby {

View File

@@ -19,6 +19,15 @@
* Usage: pnpm scanner:status-audit <events.csv> [--all]
*/
import { readFileSync } from "node:fs";
import { modesShort } from "@sendou/in-game-lists/modes";
import { stageIds } from "@sendou/in-game-lists/stage-ids";
import type {
AbilityWithUnknown,
MainWeaponId,
ModeShort,
StageId,
} from "@sendou/in-game-lists/types";
import { mainWeaponIds } from "@sendou/in-game-lists/weapon-ids";
import { statusSpans } from "../../app/components/PlayerStatusTimeline";
import { formatTime } from "../../app/features/scanner/components/format";
import {
@@ -74,15 +83,6 @@ import type {
ScannerMatchPlayerStatusSample,
} from "../../app/features/scanner/core/scanner-match";
import type { ScannerLobby } from "../../app/features/scanner/scanner-types";
import { modesShort } from "../../app/modules/in-game-lists/modes";
import { stageIds } from "../../app/modules/in-game-lists/stage-ids";
import type {
AbilityWithUnknown,
MainWeaponId,
ModeShort,
StageId,
} from "../../app/modules/in-game-lists/types";
import { mainWeaponIds } from "../../app/modules/in-game-lists/weapon-ids";
/** Mirrors PlayerStatusTimeline's MAX_BRIDGE_SECONDS: longer sample gaps render as unobserved. */
const OBSERVATION_GAP_SECONDS = 15;

View File

@@ -5,7 +5,7 @@ import {
mainWeaponIds,
specialWeaponIds,
subWeaponIds,
} from "~/modules/in-game-lists/weapon-ids";
} from "@sendou/in-game-lists/weapon-ids";
import { logger } from "~/utils/logger";
import {
loadWeaponInfoMain,