From 843992e63197caae013a970f463b212663aebdf1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tr=C3=A8sAbhi?= <43380238+tresabhi@users.noreply.github.com> Date: Sun, 8 Sep 2024 10:17:40 -0500 Subject: [PATCH] fix: more imports 3 --- .../rating/current/league/[league]/route.ts | 3 +-- .../bot/src/commands/breakdown/render.tsx | 6 ++--- packages/bot/src/commands/evolution.tsx | 3 +-- packages/bot/src/commands/fullStats.tsx | 10 ++++--- packages/bot/src/commands/inactive.tsx | 3 +-- packages/bot/src/commands/link.tsx | 3 +-- packages/bot/src/commands/ownedTanks.tsx | 4 +-- packages/bot/src/commands/playerInfo.ts | 2 +- packages/bot/src/commands/rating.tsx | 8 +++--- .../bot/src/commands/ratingLeaderboard.tsx | 10 +++---- packages/bot/src/commands/replay.tsx | 2 +- packages/bot/src/commands/research.tsx | 6 ++--- packages/bot/src/commands/searchClans.ts | 3 +-- packages/bot/src/commands/searchPlayers.ts | 8 ++++-- packages/bot/src/commands/stats.tsx | 9 ++++--- .../src/components/AllStatsOverview/index.tsx | 7 +++-- .../src/components/GenericAllStats/index.tsx | 8 ++++-- .../blitzstars/getBlitzStarsLinkButton.ts | 3 +-- .../src/core/blitzstars/getPlayerHistories.ts | 3 +-- .../src/core/blitzstars/getTankHistories.ts | 3 +-- packages/bot/tsconfig.json | 2 +- .../core/src/blitz/getAccountAchievements.ts | 3 +-- packages/core/src/blitz/getAccountInfo.ts | 5 ++-- packages/core/src/blitz/getClanAccountInfo.ts | 3 +-- packages/core/src/blitz/getClanInfo.ts | 3 +-- packages/core/src/blitz/getTankStats.ts | 5 ++-- .../blitz/searchPlayersAcrossRegions/index.ts | 3 +-- .../blitzkit/getArchivedLatestSeasonNumber.ts | 3 +-- packages/scripts/src/averages.ts | 2 +- .../scripts/src/buildRatingLeaderboard.ts | 2 +- packages/scripts/src/discoverIds.ts | 4 +-- .../website/src/app/tools/rating/page.tsx | 14 +++++----- .../website/src/app/tools/session/page.tsx | 26 ++++++++----------- .../components/WargamingAccountName.tsx | 3 +-- .../src/core/blitz/isOnGoingRatingSeason.ts | 2 +- packages/website/src/stores/session.ts | 2 +- packages/website/tsconfig.json | 22 +--------------- 37 files changed, 95 insertions(+), 113 deletions(-) diff --git a/packages/api/src/app/[region]/rating/current/league/[league]/route.ts b/packages/api/src/app/[region]/rating/current/league/[league]/route.ts index b80eba10b..1e13c8019 100644 --- a/packages/api/src/app/[region]/rating/current/league/[league]/route.ts +++ b/packages/api/src/app/[region]/rating/current/league/[league]/route.ts @@ -1,5 +1,4 @@ -import { Region } from '@blitzkit/core'; -import { getRatingLeague } from '@blitzkit/core/src/blitz/getRatingLeague'; +import { getRatingLeague, Region } from '@blitzkit/core'; import { NextResponse } from 'next/server'; export async function GET( diff --git a/packages/bot/src/commands/breakdown/render.tsx b/packages/bot/src/commands/breakdown/render.tsx index c914129a5..fbc1cd828 100644 --- a/packages/bot/src/commands/breakdown/render.tsx +++ b/packages/bot/src/commands/breakdown/render.tsx @@ -3,14 +3,14 @@ import { BlitzStats, calculateWN8, filterStats, + getAccountInfo, + getClanAccountInfo, + getTankStats, getWN8Percentile, StatFilters, TankDefinition, tankDefinitions, } from '@blitzkit/core'; -import { getAccountInfo } from '@blitzkit/core/src/blitz/getAccountInfo'; -import { getClanAccountInfo } from '@blitzkit/core/src/blitz/getClanAccountInfo'; -import { getTankStats } from '@blitzkit/core/src/blitz/getTankStats'; import { Locale } from 'discord.js'; import { chunk } from 'lodash'; import { UserError } from '../../../../website/src/hooks/userError'; diff --git a/packages/bot/src/commands/evolution.tsx b/packages/bot/src/commands/evolution.tsx index 979f1bdee..8630d4f65 100644 --- a/packages/bot/src/commands/evolution.tsx +++ b/packages/bot/src/commands/evolution.tsx @@ -1,5 +1,4 @@ -import { getAccountInfo } from '@blitzkit/core/src/blitz/getAccountInfo'; -import { getClanAccountInfo } from '@blitzkit/core/src/blitz/getClanAccountInfo'; +import { getAccountInfo, getClanAccountInfo } from '@blitzkit/core'; import { Locale, SlashCommandSubcommandGroupBuilder } from 'discord.js'; import { emblemURL } from '../../../website/src/core/blitzkit/emblemURL'; import { CommandWrapper } from '../components/CommandWrapper'; diff --git a/packages/bot/src/commands/fullStats.tsx b/packages/bot/src/commands/fullStats.tsx index 7984b2ac2..6eac6606e 100644 --- a/packages/bot/src/commands/fullStats.tsx +++ b/packages/bot/src/commands/fullStats.tsx @@ -1,6 +1,10 @@ -import { StatFilters, filterStats, getTierWeights } from '@blitzkit/core'; -import { getAccountInfo } from '@blitzkit/core/src/blitz/getAccountInfo'; -import { getClanAccountInfo } from '@blitzkit/core/src/blitz/getClanAccountInfo'; +import { + StatFilters, + filterStats, + getAccountInfo, + getClanAccountInfo, + getTierWeights, +} from '@blitzkit/core'; import { Locale } from 'discord.js'; import { emblemURL } from '../../../website/src/core/blitzkit/emblemURL'; import { CommandWrapper } from '../components/CommandWrapper'; diff --git a/packages/bot/src/commands/inactive.tsx b/packages/bot/src/commands/inactive.tsx index f99a1ef7c..1d4aae2ce 100644 --- a/packages/bot/src/commands/inactive.tsx +++ b/packages/bot/src/commands/inactive.tsx @@ -1,5 +1,4 @@ -import { getAccountInfo } from '@blitzkit/core/src/blitz/getAccountInfo'; -import { getClanInfo } from '@blitzkit/core/src/blitz/getClanInfo'; +import { getAccountInfo, getClanInfo } from '@blitzkit/core'; import { Locale } from 'discord.js'; import { CommandWrapper } from '../components/CommandWrapper'; import { GenericStats } from '../components/GenericStats'; diff --git a/packages/bot/src/commands/link.tsx b/packages/bot/src/commands/link.tsx index fba057f9f..c64d27021 100644 --- a/packages/bot/src/commands/link.tsx +++ b/packages/bot/src/commands/link.tsx @@ -1,5 +1,4 @@ -import { getAccountInfo } from '@blitzkit/core/src/blitz/getAccountInfo'; -import { getClanAccountInfo } from '@blitzkit/core/src/blitz/getClanAccountInfo'; +import { getAccountInfo, getClanAccountInfo } from '@blitzkit/core'; import { teal } from '@radix-ui/colors'; import { linkBlitzAndDiscord } from '../../../website/src/core/blitzkit/linkBlitzAndDiscord'; import { Glow } from '../components/AllStatsOverview/components/HeroStat/components/Glow'; diff --git a/packages/bot/src/commands/ownedTanks.tsx b/packages/bot/src/commands/ownedTanks.tsx index de259dbd4..b42f2f41f 100644 --- a/packages/bot/src/commands/ownedTanks.tsx +++ b/packages/bot/src/commands/ownedTanks.tsx @@ -5,10 +5,10 @@ import { Tier, flags, gameDefinitions, + getAccountInfo, + getTankStats, tankDefinitions, } from '@blitzkit/core'; -import { getAccountInfo } from '@blitzkit/core/src/blitz/getAccountInfo'; -import { getTankStats } from '@blitzkit/core/src/blitz/getTankStats'; import { chunk } from 'lodash'; import markdownEscape from 'markdown-escape'; import { addTierChoices } from '../core/discord/addTierChoices'; diff --git a/packages/bot/src/commands/playerInfo.ts b/packages/bot/src/commands/playerInfo.ts index e6511f556..cdb7d7d72 100644 --- a/packages/bot/src/commands/playerInfo.ts +++ b/packages/bot/src/commands/playerInfo.ts @@ -1,4 +1,4 @@ -import { getAccountInfo } from '@blitzkit/core/src/blitz/getAccountInfo'; +import { getAccountInfo } from '@blitzkit/core'; import markdownEscape from 'markdown-escape'; import { addUsernameChoices } from '../core/discord/addUsernameChoices'; import { autocompleteUsername } from '../core/discord/autocompleteUsername'; diff --git a/packages/bot/src/commands/rating.tsx b/packages/bot/src/commands/rating.tsx index 1e7de47f1..c4cbfd2e1 100644 --- a/packages/bot/src/commands/rating.tsx +++ b/packages/bot/src/commands/rating.tsx @@ -1,13 +1,13 @@ import { BkrlFormat, deltaBkrlBlitzStats, + getAccountInfo, + getArchivedRatingMidnightLeaderboard, + getClanAccountInfo, getLeagueFromScore, getRatingInfo, + getRatingNeighbors, } from '@blitzkit/core'; -import { getAccountInfo } from '@blitzkit/core/src/blitz/getAccountInfo'; -import { getClanAccountInfo } from '@blitzkit/core/src/blitz/getClanAccountInfo'; -import { getRatingNeighbors } from '@blitzkit/core/src/blitz/getRatingNeighbors'; -import { getArchivedRatingMidnightLeaderboard } from '@blitzkit/core/src/blitzkit/getArchivedRatingMidnightLeaderboard'; import { SlashCommandSubcommandBuilder } from 'discord.js'; import markdownEscape from 'markdown-escape'; import { emblemURL } from '../../../website/src/core/blitzkit/emblemURL'; diff --git a/packages/bot/src/commands/ratingLeaderboard.tsx b/packages/bot/src/commands/ratingLeaderboard.tsx index b0ffa98d6..52f4ff827 100644 --- a/packages/bot/src/commands/ratingLeaderboard.tsx +++ b/packages/bot/src/commands/ratingLeaderboard.tsx @@ -1,19 +1,19 @@ import { BkrlDiscriminatedEntries, FIRST_MINIMAL_ARCHIVED_RATING_SEASON, + getAccountInfo, getArchivedLatestSeasonNumber, getArchivedRatingInfo, getArchivedRatingLeaderboard, + getArchivedRatingMidnightLeaderboard, + getClanAccountInfo, getRatingInfo, + getRatingLeague, + getRatingNeighbors, LEAGUES, RatingInfo, Region, } from '@blitzkit/core'; -import { getAccountInfo } from '@blitzkit/core/src/blitz/getAccountInfo'; -import { getClanAccountInfo } from '@blitzkit/core/src/blitz/getClanAccountInfo'; -import { getRatingLeague } from '@blitzkit/core/src/blitz/getRatingLeague'; -import { getRatingNeighbors } from '@blitzkit/core/src/blitz/getRatingNeighbors'; -import { getArchivedRatingMidnightLeaderboard } from '@blitzkit/core/src/blitzkit/getArchivedRatingMidnightLeaderboard'; import { APIApplicationCommandOptionChoice, Locale, diff --git a/packages/bot/src/commands/replay.tsx b/packages/bot/src/commands/replay.tsx index 5b93d1cf1..4a3fcff42 100644 --- a/packages/bot/src/commands/replay.tsx +++ b/packages/bot/src/commands/replay.tsx @@ -1,12 +1,12 @@ import { blitzStarsTankAverages, calculateWN8, + getClanAccountInfo, idToRegion, tankDefinitions, tankIcon, TIER_ROMAN_NUMERALS, } from '@blitzkit/core'; -import { getClanAccountInfo } from '@blitzkit/core/src/blitz/getClanAccountInfo'; import { clamp } from 'lodash'; import { emblemURL } from '../../../website/src/core/blitzkit/emblemURL'; import { iconPng } from '../../../website/src/core/blitzkit/iconPng'; diff --git a/packages/bot/src/commands/research.tsx b/packages/bot/src/commands/research.tsx index 3f7534a47..1306f02a2 100644 --- a/packages/bot/src/commands/research.tsx +++ b/packages/bot/src/commands/research.tsx @@ -1,13 +1,13 @@ import { asset, equipmentPriceMatrix, + getAccountInfo, + getClanAccountInfo, + getTankStats, TANK_ICONS, tankDefinitions, TIER_ROMAN_NUMERALS, } from '@blitzkit/core'; -import { getAccountInfo } from '@blitzkit/core/src/blitz/getAccountInfo'; -import { getClanAccountInfo } from '@blitzkit/core/src/blitz/getClanAccountInfo'; -import { getTankStats } from '@blitzkit/core/src/blitz/getTankStats'; import { escapeMarkdown, Locale } from 'discord.js'; import { buildTechTreeLine } from '../../../website/src/core/blitzkit/buildTechTreeLine'; import { emblemURL } from '../../../website/src/core/blitzkit/emblemURL'; diff --git a/packages/bot/src/commands/searchClans.ts b/packages/bot/src/commands/searchClans.ts index fc8a6d608..94541223b 100644 --- a/packages/bot/src/commands/searchClans.ts +++ b/packages/bot/src/commands/searchClans.ts @@ -1,5 +1,4 @@ -import { ClanList, Region } from '@blitzkit/core'; -import { fetchBlitz } from '@blitzkit/core/src/blitz/fetchBlitz'; +import { ClanList, fetchBlitz, Region } from '@blitzkit/core'; import { Locale } from 'discord.js'; import markdownEscape from 'markdown-escape'; import { addClanChoices } from '../core/discord/addClanChoices'; diff --git a/packages/bot/src/commands/searchPlayers.ts b/packages/bot/src/commands/searchPlayers.ts index 031967dd8..9e764861a 100644 --- a/packages/bot/src/commands/searchPlayers.ts +++ b/packages/bot/src/commands/searchPlayers.ts @@ -1,5 +1,9 @@ -import { AccountList, fetchBlitz, Region } from '@blitzkit/core'; -import { usernamePattern } from '@blitzkit/core/src/blitz/searchPlayersAcrossRegions/constants'; +import { + AccountList, + fetchBlitz, + Region, + usernamePattern, +} from '@blitzkit/core'; import { Locale } from 'discord.js'; import markdownEscape from 'markdown-escape'; import { addRegionChoices } from '../core/discord/addRegionChoices'; diff --git a/packages/bot/src/commands/stats.tsx b/packages/bot/src/commands/stats.tsx index a66aaeb48..33197986d 100644 --- a/packages/bot/src/commands/stats.tsx +++ b/packages/bot/src/commands/stats.tsx @@ -1,6 +1,9 @@ -import { StatFilters, filterStats } from '@blitzkit/core'; -import { getAccountInfo } from '@blitzkit/core/src/blitz/getAccountInfo'; -import { getClanAccountInfo } from '@blitzkit/core/src/blitz/getClanAccountInfo'; +import { + StatFilters, + filterStats, + getAccountInfo, + getClanAccountInfo, +} from '@blitzkit/core'; import { Locale } from 'discord.js'; import { emblemURL } from '../../../website/src/core/blitzkit/emblemURL'; import { AllStatsOverview } from '../components/AllStatsOverview'; diff --git a/packages/bot/src/components/AllStatsOverview/index.tsx b/packages/bot/src/components/AllStatsOverview/index.tsx index 5d6f949be..c7eccb958 100644 --- a/packages/bot/src/components/AllStatsOverview/index.tsx +++ b/packages/bot/src/components/AllStatsOverview/index.tsx @@ -1,5 +1,8 @@ -import { getWN8Percentile, Percentile } from '@blitzkit/core'; -import { SupplementaryStats } from '@blitzkit/core/src/blitz/getAccountInfo'; +import { + getWN8Percentile, + Percentile, + SupplementaryStats, +} from '@blitzkit/core'; import { Locale } from 'discord.js'; import { translator } from '../../core/localization/translator'; import { PERCENTILE_COLORS } from '../PercentileIndicator/constants'; diff --git a/packages/bot/src/components/GenericAllStats/index.tsx b/packages/bot/src/components/GenericAllStats/index.tsx index b8ac829e4..30e41cb8c 100644 --- a/packages/bot/src/components/GenericAllStats/index.tsx +++ b/packages/bot/src/components/GenericAllStats/index.tsx @@ -1,5 +1,9 @@ -import { BlitzStats, getWN8Percentile, isNumber } from '@blitzkit/core'; -import { SupplementaryStats } from '@blitzkit/core/src/blitz/getAccountInfo'; +import { + BlitzStats, + getWN8Percentile, + isNumber, + SupplementaryStats, +} from '@blitzkit/core'; import { Locale } from 'discord.js'; import { translator } from '../../core/localization/translator'; import { Card } from './components/Card'; diff --git a/packages/bot/src/core/blitzstars/getBlitzStarsLinkButton.ts b/packages/bot/src/core/blitzstars/getBlitzStarsLinkButton.ts index b4aa0afad..f732417f2 100644 --- a/packages/bot/src/core/blitzstars/getBlitzStarsLinkButton.ts +++ b/packages/bot/src/core/blitzstars/getBlitzStarsLinkButton.ts @@ -1,5 +1,4 @@ -import { Region } from '@blitzkit/core'; -import { getAccountInfo } from '@blitzkit/core/src/blitz/getAccountInfo'; +import { getAccountInfo, Region } from '@blitzkit/core'; import { buttonLink } from '../discord/buttonLink'; export async function getBlitzStarsLinkButton( diff --git a/packages/bot/src/core/blitzstars/getPlayerHistories.ts b/packages/bot/src/core/blitzstars/getPlayerHistories.ts index 6d41c9057..8babf352a 100644 --- a/packages/bot/src/core/blitzstars/getPlayerHistories.ts +++ b/packages/bot/src/core/blitzstars/getPlayerHistories.ts @@ -1,5 +1,4 @@ -import { Region, emptyAllStats } from '@blitzkit/core'; -import { getAccountInfo } from '@blitzkit/core/src/blitz/getAccountInfo'; +import { Region, emptyAllStats, getAccountInfo } from '@blitzkit/core'; import { GetHistoriesOptions, Histories, diff --git a/packages/bot/src/core/blitzstars/getTankHistories.ts b/packages/bot/src/core/blitzstars/getTankHistories.ts index 279435d82..edfc1157a 100644 --- a/packages/bot/src/core/blitzstars/getTankHistories.ts +++ b/packages/bot/src/core/blitzstars/getTankHistories.ts @@ -1,5 +1,4 @@ -import { Region, emptyAllStats } from '@blitzkit/core'; -import { getTankStats } from '@blitzkit/core/src/blitz/getTankStats'; +import { Region, emptyAllStats, getTankStats } from '@blitzkit/core'; import { Locale } from 'discord.js'; import { UserError } from '../../../../website/src/hooks/userError'; import { diff --git a/packages/bot/tsconfig.json b/packages/bot/tsconfig.json index ef0d84919..52d43eaaa 100644 --- a/packages/bot/tsconfig.json +++ b/packages/bot/tsconfig.json @@ -1,4 +1,4 @@ { "extends": "../../tsconfig.json", - "include": ["src/**/*", "../core/src/blitz/getRatingInfo.ts"] + "include": ["src/**/*"] } diff --git a/packages/core/src/blitz/getAccountAchievements.ts b/packages/core/src/blitz/getAccountAchievements.ts index 47f579ef9..57ca4c000 100644 --- a/packages/core/src/blitz/getAccountAchievements.ts +++ b/packages/core/src/blitz/getAccountAchievements.ts @@ -1,5 +1,4 @@ -import { Region } from '@blitzkit/core'; -import { fetchBlitz } from '@blitzkit/core/src/blitz/fetchBlitz'; +import { fetchBlitz, Region } from '@blitzkit/core'; import { normalizeIds } from '../../../website/src/core/blitz/normalizeIds'; interface IndividualAccountAchievements { diff --git a/packages/core/src/blitz/getAccountInfo.ts b/packages/core/src/blitz/getAccountInfo.ts index 508f7a667..498facba8 100644 --- a/packages/core/src/blitz/getAccountInfo.ts +++ b/packages/core/src/blitz/getAccountInfo.ts @@ -1,8 +1,9 @@ -import { BlitzStats, Region } from '@blitzkit/core'; import { + BlitzStats, FetchBlitzParams, + Region, fetchBlitz, -} from '@blitzkit/core/src/blitz/fetchBlitz'; +} from '@blitzkit/core'; import { normalizeIds } from '../../../website/src/core/blitz/normalizeIds'; export interface SupplementaryStats { diff --git a/packages/core/src/blitz/getClanAccountInfo.ts b/packages/core/src/blitz/getClanAccountInfo.ts index 43d314136..0d3b73255 100644 --- a/packages/core/src/blitz/getClanAccountInfo.ts +++ b/packages/core/src/blitz/getClanAccountInfo.ts @@ -1,5 +1,4 @@ -import { Region } from '@blitzkit/core'; -import { fetchBlitz } from '@blitzkit/core/src/blitz/fetchBlitz'; +import { fetchBlitz, Region } from '@blitzkit/core'; import { normalizeIds } from '../../../website/src/core/blitz/normalizeIds'; type IndividualClanAccountInfo = { diff --git a/packages/core/src/blitz/getClanInfo.ts b/packages/core/src/blitz/getClanInfo.ts index 0ebdf4391..f097488da 100644 --- a/packages/core/src/blitz/getClanInfo.ts +++ b/packages/core/src/blitz/getClanInfo.ts @@ -1,5 +1,4 @@ -import { Region } from '@blitzkit/core'; -import { fetchBlitz } from '@blitzkit/core/src/blitz/fetchBlitz'; +import { fetchBlitz, Region } from '@blitzkit/core'; import { normalizeIds } from '../../../website/src/core/blitz/normalizeIds'; interface IndividualClanInfo { diff --git a/packages/core/src/blitz/getTankStats.ts b/packages/core/src/blitz/getTankStats.ts index 25977890f..30c277a6a 100644 --- a/packages/core/src/blitz/getTankStats.ts +++ b/packages/core/src/blitz/getTankStats.ts @@ -1,8 +1,9 @@ -import { Region, TanksStats } from '@blitzkit/core'; import { fetchBlitz, FetchBlitzParams, -} from '@blitzkit/core/src/blitz/fetchBlitz'; + Region, + TanksStats, +} from '@blitzkit/core'; export async function getTankStats( region: Region, diff --git a/packages/core/src/blitz/searchPlayersAcrossRegions/index.ts b/packages/core/src/blitz/searchPlayersAcrossRegions/index.ts index 923f23a3b..c41882bf3 100644 --- a/packages/core/src/blitz/searchPlayersAcrossRegions/index.ts +++ b/packages/core/src/blitz/searchPlayersAcrossRegions/index.ts @@ -1,5 +1,4 @@ -import { Region } from '@blitzkit/core'; -import { fetchBlitz } from '@blitzkit/core/src/blitz/fetchBlitz'; +import { fetchBlitz, Region } from '@blitzkit/core'; import { usernamePattern } from './constants'; export interface AccountListItem { diff --git a/packages/core/src/blitzkit/getArchivedLatestSeasonNumber.ts b/packages/core/src/blitzkit/getArchivedLatestSeasonNumber.ts index dcecba115..7ba551583 100644 --- a/packages/core/src/blitzkit/getArchivedLatestSeasonNumber.ts +++ b/packages/core/src/blitzkit/getArchivedLatestSeasonNumber.ts @@ -1,5 +1,4 @@ -import { assertSecret } from '@blitzkit/core'; -import { getRatingInfo } from '@blitzkit/core/src/blitz/getRatingInfo'; +import { assertSecret, getRatingInfo } from '@blitzkit/core'; interface GitHubTrees { tree: { path: string; url: string }[]; diff --git a/packages/scripts/src/averages.ts b/packages/scripts/src/averages.ts index 8b3ad4ff2..bd5337984 100644 --- a/packages/scripts/src/averages.ts +++ b/packages/scripts/src/averages.ts @@ -10,10 +10,10 @@ import { averageDefinitionsAllStatsKeys, emptySamples, encodeProtobufToBase64, + getAccountInfo, getTankStats, idToRegion, } from '@blitzkit/core'; -import { getAccountInfo } from '@blitzkit/core/src/blitz/getAccountInfo'; import { chunk, times } from 'lodash'; import { commitAssets } from './core/github/commitAssets'; import { fetchPreDiscoveredIds } from './core/github/fetchPreDiscoveredIds'; diff --git a/packages/scripts/src/buildRatingLeaderboard.ts b/packages/scripts/src/buildRatingLeaderboard.ts index 3d6fc65ac..08cc43760 100644 --- a/packages/scripts/src/buildRatingLeaderboard.ts +++ b/packages/scripts/src/buildRatingLeaderboard.ts @@ -5,6 +5,7 @@ import { BkrlWriteStream, CdonValue, CdonWriteStream, + getAccountInfo, RatingInfo, RatingNeighbors, RatingPlayer, @@ -12,7 +13,6 @@ import { regionSubdomainToRegion, superCompress, } from '@blitzkit/core'; -import { getAccountInfo } from '@blitzkit/core/src/blitz/getAccountInfo'; import { chunk } from 'lodash'; import { argv } from 'process'; import { patientFetchJSON } from '../../website/src/core/blitzkit/patientFetchJSON'; diff --git a/packages/scripts/src/discoverIds.ts b/packages/scripts/src/discoverIds.ts index d3a10f81e..0d8af90e9 100644 --- a/packages/scripts/src/discoverIds.ts +++ b/packages/scripts/src/discoverIds.ts @@ -5,10 +5,10 @@ import { REGIONS, Region, asset, + getAccountInfo, idToRegion, + retryAbleBlitzFetchEvent, } from '@blitzkit/core'; -import { retryAbleBlitzFetchEvent } from '@blitzkit/core/src/blitz/fetchBlitz'; -import { getAccountInfo } from '@blitzkit/core/src/blitz/getAccountInfo'; import { chunk, times, uniq } from 'lodash'; import { compress, decompress } from 'lz4js'; import { DiscoveredIdsDefinitions } from '../../website/src/core/blitzkit/discoveredIdDefinitions'; diff --git a/packages/website/src/app/tools/rating/page.tsx b/packages/website/src/app/tools/rating/page.tsx index 0723f025a..327d98304 100644 --- a/packages/website/src/app/tools/rating/page.tsx +++ b/packages/website/src/app/tools/rating/page.tsx @@ -3,8 +3,15 @@ import { AccountList, AccountListItem, + fetchBlitz, FIRST_MINIMAL_ARCHIVED_RATING_SEASON, getArchivedLatestSeasonNumber, + getArchivedRatingInfo, + getArchivedRatingLeaderboard, + getClanAccountInfo, + getRatingInfo, + getRatingLeague, + getRatingNeighbors, LEAGUES, RatingInfo, RatingPlayer, @@ -13,13 +20,6 @@ import { UNLOCALIZED_REGION_NAMES, Var, } from '@blitzkit/core'; -import { fetchBlitz } from '@blitzkit/core/src/blitz/fetchBlitz'; -import { getClanAccountInfo } from '@blitzkit/core/src/blitz/getClanAccountInfo'; -import { getRatingInfo } from '@blitzkit/core/src/blitz/getRatingInfo'; -import { getRatingLeague } from '@blitzkit/core/src/blitz/getRatingLeague'; -import { getRatingNeighbors } from '@blitzkit/core/src/blitz/getRatingNeighbors'; -import { getArchivedRatingInfo } from '@blitzkit/core/src/blitzkit/getArchivedRatingInfo'; -import { getArchivedRatingLeaderboard } from '@blitzkit/core/src/blitzkit/getArchivedRatingLeaderboard'; import { blackA, orangeDark } from '@radix-ui/colors'; import { MagnifyingGlassIcon } from '@radix-ui/react-icons'; import { diff --git a/packages/website/src/app/tools/session/page.tsx b/packages/website/src/app/tools/session/page.tsx index 7dfb3aa14..d299591b9 100644 --- a/packages/website/src/app/tools/session/page.tsx +++ b/packages/website/src/app/tools/session/page.tsx @@ -2,27 +2,23 @@ import { AccountListWithServer, + IndividualAccountInfo, IndividualTankStats, - UNLOCALIZED_REGION_NAMES_SHORT, - blitzStarsTankAverages, - deltaTankStats, - idToRegion, - searchPlayersAcrossRegions, - tankDefinitions, -} from '@blitzkit/core'; -import { STAT_KEYS, STAT_NAMES, Stat, + UNLOCALIZED_REGION_NAMES_SHORT, + blitzStarsTankAverages, + deltaTankStats, generateStats, - prettifyStats, - sumBlitzStarsStats, -} from '@blitzkit/core/src/blitz/generateStats'; -import { - IndividualAccountInfo, getAccountInfo, -} from '@blitzkit/core/src/blitz/getAccountInfo'; -import { getTankStats } from '@blitzkit/core/src/blitz/getTankStats'; + getTankStats, + idToRegion, + prettifyStats, + searchPlayersAcrossRegions, + sumBlitzStarsStats, + tankDefinitions, +} from '@blitzkit/core'; import { ArrowDownIcon, MagnifyingGlassIcon, diff --git a/packages/website/src/components/Navbar/components/WargamingAccountName.tsx b/packages/website/src/components/Navbar/components/WargamingAccountName.tsx index ada5c5eef..45a16d352 100644 --- a/packages/website/src/components/Navbar/components/WargamingAccountName.tsx +++ b/packages/website/src/components/Navbar/components/WargamingAccountName.tsx @@ -1,5 +1,4 @@ -import { idToRegion } from '@blitzkit/core'; -import { getAccountInfo } from '@blitzkit/core/src/blitz/getAccountInfo'; +import { getAccountInfo, idToRegion } from '@blitzkit/core'; import { Text } from '@radix-ui/themes'; import { use, useMemo } from 'react'; import * as App from '../../../stores/app'; diff --git a/packages/website/src/core/blitz/isOnGoingRatingSeason.ts b/packages/website/src/core/blitz/isOnGoingRatingSeason.ts index adc43d089..b4adf9e7f 100644 --- a/packages/website/src/core/blitz/isOnGoingRatingSeason.ts +++ b/packages/website/src/core/blitz/isOnGoingRatingSeason.ts @@ -1,4 +1,4 @@ -import { getRatingInfo } from '@blitzkit/core/src/blitz/getRatingInfo'; +import { getRatingInfo } from '@blitzkit/core'; export async function isOnGoingRatingSeason() { const ratingInfo = await getRatingInfo('com'); diff --git a/packages/website/src/stores/session.ts b/packages/website/src/stores/session.ts index 3ff807806..e566de073 100644 --- a/packages/website/src/stores/session.ts +++ b/packages/website/src/stores/session.ts @@ -3,9 +3,9 @@ import { IndividualTankStats, Region, + Stat, createNextSafeStore, } from '@blitzkit/core'; -import { Stat } from '@blitzkit/core/src/blitz/generateStats'; import { merge } from 'lodash'; import { create } from 'zustand'; import { persist } from 'zustand/middleware'; diff --git a/packages/website/tsconfig.json b/packages/website/tsconfig.json index f199bfc9c..6e8705550 100644 --- a/packages/website/tsconfig.json +++ b/packages/website/tsconfig.json @@ -7,25 +7,5 @@ } ] }, - "include": [ - "src/**/*", - ".next/types/**/*.ts", - "../core/src/blitz/getRatingInfo.ts", - "../core/src/blitz/getLeagueFromScore.ts", - "../bot/src/core/blitz/normalizeLeagueIcon.ts", - "../core/src/blitzkit/getArchivedLatestSeasonNumber.ts", - "../core/src/blitzkit/getArchivedRatingInfo.ts", - "../core/src/blitzkit/getArchivedRatingLeaderboard.ts", - "../core/src/blitzkit/getArchivedRatingMidnightLeaderboard.ts", - "../core/src/blitz/fetchBlitz.ts", - "../core/src/blitz/regionSubdomainToRegion.ts", - "../core/src/blitz/generateStats.ts", - "../core/src/blitz/getAccountAchievements.ts", - "../core/src/blitz/getAccountInfo.ts", - "../core/src/blitz/getClanAccountInfo.ts", - "../core/src/blitz/getClanInfo.ts", - "../core/src/blitz/getRatingLeague.ts", - "../core/src/blitz/getRatingNeighbors.ts", - "../core/src/blitz/getTankStats.ts" - ] + "include": ["src/**/*", ".next/types/**/*.ts"] }