mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 19:49:50 +02:00
fix: port to core 1
This commit is contained in:
1 parent
fd2e2f9c7b
commit
5e989a16bc
24 files changed
+24
-14
No files matched your search
@@ -1,6 +1,6 @@
|
|||||||
import { Region } from '@blitzkit/core';
|
import { Region } from '@blitzkit/core';
|
||||||
|
import { searchCurrentRatingPlayers } from '@blitzkit/core/src/blitz/searchCurrentRatingPlayers';
|
||||||
import { NextResponse } from 'next/server';
|
import { NextResponse } from 'next/server';
|
||||||
import { searchCurrentRatingPlayers } from '../../../../../../../../website/src/core/blitz/searchCurrentRatingPlayers';
|
|
||||||
|
|
||||||
export async function GET(
|
export async function GET(
|
||||||
request: Request,
|
request: Request,
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { tankDefinitions, TankVotes, usersDatabase } from '@blitzkit/core';
|
import { tankDefinitions, TankVotes, usersDatabase } from '@blitzkit/core';
|
||||||
|
import { isValidBlitzId } from '@blitzkit/core/src/blitz/isValidBlitzId';
|
||||||
import { NextRequest, NextResponse } from 'next/server';
|
import { NextRequest, NextResponse } from 'next/server';
|
||||||
import { isValidBlitzId } from '../../../../../../website/src/core/blitz/isValidBlitzId';
|
|
||||||
import {
|
import {
|
||||||
BlitzkitResponse,
|
BlitzkitResponse,
|
||||||
BlitzkitResponseError,
|
BlitzkitResponseError,
|
||||||
|
|||||||
@@ -4,9 +4,9 @@ import {
|
|||||||
TankVoteCategory,
|
TankVoteCategory,
|
||||||
usersDatabase,
|
usersDatabase,
|
||||||
} from '@blitzkit/core';
|
} from '@blitzkit/core';
|
||||||
|
import { isValidBlitzId } from '@blitzkit/core/src/blitz/isValidBlitzId';
|
||||||
import { NextRequest, NextResponse } from 'next/server';
|
import { NextRequest, NextResponse } from 'next/server';
|
||||||
import { StarsInt } from '../../../../../../website/src/app/tools/tankopedia/[id]/components/Model/MetaSection/components/Stars';
|
import { StarsInt } from '../../../../../../website/src/app/tools/tankopedia/[id]/components/Model/MetaSection/components/Stars';
|
||||||
import { isValidBlitzId } from '../../../../../../website/src/core/blitz/isValidBlitzId';
|
|
||||||
import {
|
import {
|
||||||
BlitzkitResponse,
|
BlitzkitResponse,
|
||||||
BlitzkitResponseError,
|
BlitzkitResponseError,
|
||||||
|
|||||||
File renamed without changes.
@@ -1,5 +1,5 @@
|
|||||||
import { fetchBlitz, Region } from '@blitzkit/core';
|
import { fetchBlitz, Region } from '@blitzkit/core';
|
||||||
import { normalizeIds } from '../../../website/src/core/blitz/normalizeIds';
|
import { normalizeIds } from './normalizeIds';
|
||||||
|
|
||||||
interface IndividualAccountAchievements {
|
interface IndividualAccountAchievements {
|
||||||
achievements: {
|
achievements: {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import {
|
|||||||
Region,
|
Region,
|
||||||
fetchBlitz,
|
fetchBlitz,
|
||||||
} from '@blitzkit/core';
|
} from '@blitzkit/core';
|
||||||
import { normalizeIds } from '../../../website/src/core/blitz/normalizeIds';
|
import { normalizeIds } from './normalizeIds';
|
||||||
|
|
||||||
export interface SupplementaryStats {
|
export interface SupplementaryStats {
|
||||||
WN8?: number;
|
WN8?: number;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { fetchBlitz, Region } from '@blitzkit/core';
|
import { fetchBlitz, Region } from '@blitzkit/core';
|
||||||
import { normalizeIds } from '../../../website/src/core/blitz/normalizeIds';
|
import { normalizeIds } from './normalizeIds';
|
||||||
|
|
||||||
type IndividualClanAccountInfo = {
|
type IndividualClanAccountInfo = {
|
||||||
account_id: number;
|
account_id: number;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { fetchBlitz, Region } from '@blitzkit/core';
|
import { fetchBlitz, Region } from '@blitzkit/core';
|
||||||
import { normalizeIds } from '../../../website/src/core/blitz/normalizeIds';
|
import { normalizeIds } from './normalizeIds';
|
||||||
|
|
||||||
interface IndividualClanInfo {
|
interface IndividualClanInfo {
|
||||||
recruiting_options: {
|
recruiting_options: {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { RatingInfo, Region } from '@blitzkit/core';
|
import { RatingInfo, Region } from '@blitzkit/core';
|
||||||
import { regionToRegionSubdomain } from '../../../website/src/core/blitz/regionToRegionSubdomain';
|
|
||||||
import { context } from '../../../website/src/core/blitzkit/context';
|
|
||||||
import { patientFetch } from '../../../website/src/core/blitzkit/patientFetch';
|
import { patientFetch } from '../../../website/src/core/blitzkit/patientFetch';
|
||||||
|
import { context } from '../blitzkit/context';
|
||||||
|
import { regionToRegionSubdomain } from './regionToRegionSubdomain';
|
||||||
|
|
||||||
const cache: Partial<Record<Region, RatingInfo>> = {};
|
const cache: Partial<Record<Region, RatingInfo>> = {};
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { LeagueTop, RatingPlayer, Region } from '@blitzkit/core';
|
import { LeagueTop, RatingPlayer, Region } from '@blitzkit/core';
|
||||||
import { regionToRegionSubdomain } from '../../../website/src/core/blitz/regionToRegionSubdomain';
|
|
||||||
import { context } from '../../../website/src/core/blitzkit/context';
|
|
||||||
import { patientFetch } from '../../../website/src/core/blitzkit/patientFetch';
|
import { patientFetch } from '../../../website/src/core/blitzkit/patientFetch';
|
||||||
|
import { context } from '../blitzkit/context';
|
||||||
|
import { regionToRegionSubdomain } from './regionToRegionSubdomain';
|
||||||
|
|
||||||
export async function getRatingLeague(
|
export async function getRatingLeague(
|
||||||
region: Region,
|
region: Region,
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { RatingNeighbors, Region } from '@blitzkit/core';
|
import { RatingNeighbors, Region } from '@blitzkit/core';
|
||||||
import { regionToRegionSubdomain } from '../../../website/src/core/blitz/regionToRegionSubdomain';
|
|
||||||
import { patientFetch } from '../../../website/src/core/blitzkit/patientFetch';
|
import { patientFetch } from '../../../website/src/core/blitzkit/patientFetch';
|
||||||
import { withCORSProxy } from '../../../website/src/core/blitzkit/withCORSProxy';
|
import { withCORSProxy } from '../../../website/src/core/blitzkit/withCORSProxy';
|
||||||
|
import { regionToRegionSubdomain } from './regionToRegionSubdomain';
|
||||||
|
|
||||||
export async function getRatingNeighbors(
|
export async function getRatingNeighbors(
|
||||||
region: Region,
|
region: Region,
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
export * from './canSplash';
|
||||||
export * from './clans';
|
export * from './clans';
|
||||||
export * from './constants';
|
export * from './constants';
|
||||||
export * from './equipmentPrice';
|
export * from './equipmentPrice';
|
||||||
@@ -13,11 +14,19 @@ export * from './getRatingLeague';
|
|||||||
export * from './getRatingNeighbors';
|
export * from './getRatingNeighbors';
|
||||||
export * from './getTankStats';
|
export * from './getTankStats';
|
||||||
export * from './idToRegion';
|
export * from './idToRegion';
|
||||||
|
export * from './isOnGoingRatingSeason';
|
||||||
|
export * from './isValidBlitzId';
|
||||||
export * from './nations';
|
export * from './nations';
|
||||||
|
export * from './normalizeExtra';
|
||||||
|
export * from './normalizeIds';
|
||||||
export * from './permanentSkills';
|
export * from './permanentSkills';
|
||||||
export * from './rating';
|
export * from './rating';
|
||||||
export * from './regions';
|
export * from './regions';
|
||||||
export * from './regionSubdomainToRegion';
|
export * from './regionSubdomainToRegion';
|
||||||
|
export * from './regionToRegionSubdomain';
|
||||||
export * from './resolveNearPenetration';
|
export * from './resolveNearPenetration';
|
||||||
export * from './searchClansAcrossRegions';
|
export * from './searchClansAcrossRegions';
|
||||||
|
export * from './searchCurrentRatingPlayers';
|
||||||
export * from './searchPlayersAcrossRegions';
|
export * from './searchPlayersAcrossRegions';
|
||||||
|
export * from './toUniqueId';
|
||||||
|
export * from './writeDVPL';
|
||||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -6,6 +6,7 @@ export * from './camouflageDefinitions';
|
|||||||
export * from './checkConsumableProvisionInclusivity';
|
export * from './checkConsumableProvisionInclusivity';
|
||||||
export * from './coefficient';
|
export * from './coefficient';
|
||||||
export * from './consumableDefinitions';
|
export * from './consumableDefinitions';
|
||||||
|
export * from './context';
|
||||||
export * from './createDefaultSkills';
|
export * from './createDefaultSkills';
|
||||||
export * from './degressiveStat';
|
export * from './degressiveStat';
|
||||||
export * from './equipmentDefinitions';
|
export * from './equipmentDefinitions';
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { BlitzStats, tankDefinitions } from '@blitzkit/core';
|
import { BlitzStats, tankDefinitions } from '@blitzkit/core';
|
||||||
import { context } from '../../../website/src/core/blitzkit/context';
|
import { context } from '../blitzkit/context';
|
||||||
|
|
||||||
interface SpecialStats {
|
interface SpecialStats {
|
||||||
winrate: number;
|
winrate: number;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { context } from './context';
|
import { context } from '@blitzkit/core/src/blitzkit/context';
|
||||||
|
|
||||||
export function withCORSProxy(url: string) {
|
export function withCORSProxy(url: string) {
|
||||||
return context === 'website'
|
return context === 'website'
|
||||||
|
|||||||
Reference in new issue
Block a user