mirror of
https://github.com/zkldi/Tachi.git
synced 2026-10-12 09:18:25 +03:00
move src/types to src/common/types
This commit is contained in:
Vendored
+1
-1
@@ -1,6 +1,6 @@
|
||||
import { Session, SessionData } from "express-session";
|
||||
import { SYMBOL_KtchiData } from "../../src/constants/ktchi";
|
||||
import { KtchiRequestData, KtchiSessionData } from "../../src/types";
|
||||
import { KtchiRequestData, KtchiSessionData } from "../../src/common/types";
|
||||
|
||||
export {};
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { GoalDocument, integer, PBScoreDocument, Game } from "kamaitachi-common";
|
||||
import { grades, lamps } from "kamaitachi-common/js/config";
|
||||
import db from "../external/mongo/db";
|
||||
import { KtLogger } from "../types";
|
||||
import { KtLogger } from "./types";
|
||||
import { GetFolderChartIDs } from "./folder";
|
||||
import { FilterQuery } from "mongodb";
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import winston, { format, transports } from "winston";
|
||||
import { KtLogger } from "../types";
|
||||
import { KtLogger } from "./types";
|
||||
|
||||
const level = process.env.LOG_LEVEL ?? "info";
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import {
|
||||
GetDefaultTierlist,
|
||||
GetOneTierlistData,
|
||||
} from "../../../common/tierlist";
|
||||
import { KtLogger } from "../../../types";
|
||||
import { KtLogger } from "../../../common/types";
|
||||
import { DryScore } from "../common/types";
|
||||
import { CreateGameSpecific } from "./game-specific";
|
||||
import { CalculateCHUNITHMRating, CalculateGITADORARating } from "./game-specific-stats";
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { AnyChartDocument, ESDCore, integer, Grades, Lamps } from "kamaitachi-common";
|
||||
import db from "../../../external/mongo/db";
|
||||
import { KtLogger } from "../../../types";
|
||||
import { KtLogger } from "../../../common/types";
|
||||
import { DryScore } from "../common/types";
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { AnyChartDocument, ChartDocument, Game, Playtypes, Grades, Lamps } from "kamaitachi-common";
|
||||
import db from "../../../external/mongo/db";
|
||||
import { KtLogger } from "../../../types";
|
||||
import { KtLogger } from "../../../common/types";
|
||||
import { DryScore } from "../common/types";
|
||||
import {
|
||||
CalculateBPI,
|
||||
|
||||
@@ -2,7 +2,7 @@ import { ImportTypes, PublicUserDocument } from "kamaitachi-common";
|
||||
import crypto from "crypto";
|
||||
import { FormatUserDoc } from "../../../common/user";
|
||||
import { rootLogger } from "../../../common/logger";
|
||||
import { KtLogger } from "../../../types";
|
||||
import { KtLogger } from "../../../common/types";
|
||||
|
||||
export function CreateImportLoggerAndID(userDoc: PublicUserDocument, importType: ImportTypes) {
|
||||
const importID = crypto.randomBytes(20).toString("hex");
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { integer, Game, GoalDocument, UserGoalDocument } from "kamaitachi-common";
|
||||
import { EvaluateGoalForUser } from "../../../common/goal";
|
||||
import db from "../../../external/mongo/db";
|
||||
import { KtLogger } from "../../../types";
|
||||
import { KtLogger } from "../../../common/types";
|
||||
|
||||
/**
|
||||
* Update a user's progress on all of their set goals.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { KtLogger } from "../../../types";
|
||||
import { KtLogger } from "../../../common/types";
|
||||
import {
|
||||
integer,
|
||||
Game,
|
||||
|
||||
@@ -5,7 +5,7 @@ import { GetKTDataJSON, Testing511SPA, TestingIIDXSPScore } from "../../../test-
|
||||
import { CreatePBDoc } from "./create-pb-doc";
|
||||
import deepmerge from "deepmerge";
|
||||
import CreateLogCtx from "../../../common/logger";
|
||||
import { KtLogger } from "../../../types";
|
||||
import { KtLogger } from "../../../common/types";
|
||||
import { lamps } from "kamaitachi-common/js/config";
|
||||
|
||||
let IIDXScore = TestingIIDXSPScore;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import db from "../../../external/mongo/db";
|
||||
import { integer, PBScoreDocument, ScoreDocument } from "kamaitachi-common";
|
||||
|
||||
import { KtLogger } from "../../../types";
|
||||
import { KtLogger } from "../../../common/types";
|
||||
import { IIDXMergeFn, SDVXMergeFn } from "./game-specific-merge";
|
||||
import { BulkWriteUpdateOneOperation } from "mongodb";
|
||||
export type PBScoreDocumentNoRank = Omit<PBScoreDocument, "rankingData">;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { PBScoreDocument, ScoreDocument } from "kamaitachi-common";
|
||||
import { FindChartWithChartID } from "../../../common/database-lookup/chart";
|
||||
import db from "../../../external/mongo/db";
|
||||
import { KtLogger } from "../../../types";
|
||||
import { KtLogger } from "../../../common/types";
|
||||
import { CalculateVF4, CalculateVF5 } from "../calculated-data/game-specific-stats";
|
||||
import { InternalFailure } from "../common/converter-failures";
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { integer, PBScoreDocument } from "kamaitachi-common";
|
||||
import db from "../../../external/mongo/db";
|
||||
import { KtLogger } from "../../../types";
|
||||
import { KtLogger } from "../../../common/types";
|
||||
import { CreatePBDoc, UpdateChartRanking, PBScoreDocumentNoRank } from "./create-pb-doc";
|
||||
|
||||
export async function ProcessPBs(
|
||||
|
||||
@@ -8,7 +8,7 @@ import {
|
||||
integer,
|
||||
IDStrings,
|
||||
} from "kamaitachi-common";
|
||||
import { KtLogger } from "../../types";
|
||||
import { KtLogger } from "../../common/types";
|
||||
import { ImportAllIterableData } from "./score-importing/score-importing";
|
||||
import { CreateImportLoggerAndID } from "./common/import-logger";
|
||||
import { CreateSessions } from "./sessions/sessions";
|
||||
|
||||
@@ -5,7 +5,7 @@ import {
|
||||
ScoreDocument,
|
||||
AnySongDocument,
|
||||
} from "kamaitachi-common";
|
||||
import { KtLogger } from "../../../types";
|
||||
import { KtLogger } from "../../../common/types";
|
||||
import { CreateCalculatedData } from "../calculated-data/calculated-data";
|
||||
import { CalculateESDForGame } from "../common/score-utils";
|
||||
import { DryScore } from "../common/types";
|
||||
|
||||
@@ -18,7 +18,7 @@ import {
|
||||
import { CreateScoreID } from "./score-id";
|
||||
import db from "../../../external/mongo/db";
|
||||
import { AppendLogCtx } from "../../../common/logger";
|
||||
import { KtLogger } from "../../../types";
|
||||
import { KtLogger } from "../../../common/types";
|
||||
import {
|
||||
ConverterFunctionReturns,
|
||||
ConverterFnReturn,
|
||||
|
||||
@@ -15,7 +15,7 @@ import { GenerateRandomSessionName } from "./name-generation";
|
||||
import crypto from "crypto";
|
||||
import { CreateSessionCalcData } from "./performance-calc";
|
||||
import { GetScoresFromSession } from "../../../common/session";
|
||||
import { KtLogger } from "../../../types";
|
||||
import { KtLogger } from "../../../common/types";
|
||||
import { ScorePlaytypeMap } from "../common/types";
|
||||
|
||||
const TWO_HOURS = 1000 * 60 * 60 * 2;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Game, Playtypes, integer, UserGameStats, ClassDelta } from "kamaitachi-common";
|
||||
import { gameClassValues } from "kamaitachi-common/js/game-classes";
|
||||
import deepmerge from "deepmerge";
|
||||
import { KtLogger } from "../../../types";
|
||||
import { KtLogger } from "../../../common/types";
|
||||
import { CalculateGitadoraColour, CalculateJubeatColour } from "./builtin-class-handlers";
|
||||
import { ReturnClassIfGreater } from "../../../common/class";
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Game, Playtypes, integer, GameSpecificCalcLookup, IDStrings } from "kamaitachi-common";
|
||||
import db from "../../../external/mongo/db";
|
||||
import { KtLogger } from "../../../types";
|
||||
import { KtLogger } from "../../../common/types";
|
||||
|
||||
export async function CalculateRatings(
|
||||
game: Game,
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
import { Game, Playtypes, integer, UserGameStats, ClassDelta } from "kamaitachi-common";
|
||||
import db from "../../../external/mongo/db";
|
||||
import { KtLogger } from "../../../types";
|
||||
import { KtLogger } from "../../../common/types";
|
||||
import { CalculateClassDeltas, UpdateUGSClasses, ClassHandler } from "./classes";
|
||||
import { CalculateRatings, CalculateCustomRatings } from "./rating";
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { KtLogger } from "../../../../types";
|
||||
import { KtLogger } from "../../../../common/types";
|
||||
import { ParseKaiIIDX } from "../../common/api-kai/iidx/parser";
|
||||
import { KaiAuthDocument } from "kamaitachi-common";
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { KtLogger } from "../../../../types";
|
||||
import { KtLogger } from "../../../../common/types";
|
||||
import { KaiAuthDocument } from "kamaitachi-common";
|
||||
import { ParseKaiSDVX } from "../../common/api-kai/sdvx/parser";
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { KtLogger } from "../../../../types";
|
||||
import { KtLogger } from "../../../../common/types";
|
||||
import { ParseKaiIIDX } from "../../common/api-kai/iidx/parser";
|
||||
import { KaiAuthDocument } from "kamaitachi-common";
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { KtLogger } from "../../../../types";
|
||||
import { KtLogger } from "../../../../common/types";
|
||||
import { KaiAuthDocument } from "kamaitachi-common";
|
||||
import { ParseKaiSDVX } from "../../common/api-kai/sdvx/parser";
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { KtLogger } from "../../../../../types";
|
||||
import { KtLogger } from "../../../../../common/types";
|
||||
import nodeFetch from "../../../../../common/fetch";
|
||||
import { KaiAuthDocument } from "kamaitachi-common";
|
||||
import { KaiContext } from "../types";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { KtLogger } from "../../../../../types";
|
||||
import { KtLogger } from "../../../../../common/types";
|
||||
import nodeFetch from "../../../../../common/fetch";
|
||||
import { KaiAuthDocument } from "kamaitachi-common";
|
||||
import { KaiContext } from "../types";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { KtLogger } from "../../../../types";
|
||||
import { KtLogger } from "../../../../common/types";
|
||||
import ScoreImportFatalError from "../../../framework/score-importing/score-import-error";
|
||||
import nodeFetch from "../../../../common/fetch";
|
||||
import { KaiAuthDocument } from "kamaitachi-common";
|
||||
|
||||
@@ -17,7 +17,7 @@ import {
|
||||
AssertStrAsPositiveInt,
|
||||
} from "../../../framework/common/string-asserts";
|
||||
import { GenericGetGradeAndPercent } from "../../../framework/common/score-utils";
|
||||
import { KtLogger } from "../../../../types";
|
||||
import { KtLogger } from "../../../../common/types";
|
||||
import { DryScore } from "../../../framework/common/types";
|
||||
import { ConverterFunction, ConverterFnReturn } from "../types";
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { KtLogger } from "../../../../types";
|
||||
import { KtLogger } from "../../../../common/types";
|
||||
import ScoreImportFatalError from "../../../framework/score-importing/score-import-error";
|
||||
import { BatchManual, BatchManualContext, BatchManualScore } from "./types";
|
||||
import p, { PrudenceSchema, ValidSchemaValue } from "prudence";
|
||||
|
||||
@@ -10,7 +10,7 @@ import ScoreImportFatalError from "../../../framework/score-importing/score-impo
|
||||
import { GetGradeFromPercent } from "../../../framework/common/score-utils";
|
||||
import { AssertStrAsPositiveInt } from "../../../framework/common/string-asserts";
|
||||
import { EamusementScoreData, IIDXEamusementCSVContext, IIDXEamusementCSVData } from "./types";
|
||||
import { KtLogger } from "../../../../types";
|
||||
import { KtLogger } from "../../../../common/types";
|
||||
import { DryScore } from "../../../framework/common/types";
|
||||
import { ConverterFunction, ConverterFnReturn } from "../types";
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Difficulties } from "kamaitachi-common";
|
||||
import { KtLogger } from "../../../../types";
|
||||
import { KtLogger } from "../../../../common/types";
|
||||
import ScoreImportFatalError from "../../../framework/score-importing/score-import-error";
|
||||
import { ParserFunctionReturnsSync } from "../types";
|
||||
import ConverterFn from "./converter";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { EmptyObject, KtLogger } from "../../../types";
|
||||
import { EmptyObject, KtLogger } from "../../../common/types";
|
||||
import { MerScore } from "../file/mer-iidx/types";
|
||||
import { S3Score } from "../file/solid-state-squad/types";
|
||||
import { BarbatosScore } from "../ir/barbatos/types";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { KtLogger } from "../../../../types";
|
||||
import { KtLogger } from "../../../../common/types";
|
||||
import ScoreImportFatalError from "../../../framework/score-importing/score-import-error";
|
||||
import { ParseBatchManualFromObject } from "../../common/batch-manual/parser";
|
||||
import { BatchManualContext, BatchManualScore } from "../../common/batch-manual/types";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { KtLogger } from "../../../../types";
|
||||
import { KtLogger } from "../../../../common/types";
|
||||
import GenericParseEamIIDXCSV from "../../common/eamusement-iidx-csv/parser";
|
||||
import {
|
||||
IIDXEamusementCSVContext,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { FindIIDXChartOnInGameID } from "../../../../common/database-lookup/chart";
|
||||
import { FindSongOnID } from "../../../../common/database-lookup/song";
|
||||
import { EmptyObject } from "../../../../types";
|
||||
import { EmptyObject } from "../../../../common/types";
|
||||
import {
|
||||
InternalFailure,
|
||||
KTDataNotFoundFailure,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import p from "prudence";
|
||||
import { FormatPrError } from "../../../../common/prudence";
|
||||
import { EmptyObject, KtLogger } from "../../../../types";
|
||||
import { EmptyObject, KtLogger } from "../../../../common/types";
|
||||
import ScoreImportFatalError from "../../../framework/score-importing/score-import-error";
|
||||
import { ParserFunctionReturnsSync } from "../../common/types";
|
||||
import { ConvertFileMerIIDX } from "./converter";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { KtLogger } from "../../../../types";
|
||||
import { KtLogger } from "../../../../common/types";
|
||||
import GenericParseEamIIDXCSV from "../../common/eamusement-iidx-csv/parser";
|
||||
import {
|
||||
IIDXEamusementCSVContext,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { EmptyObject, KtLogger } from "../../../../types";
|
||||
import { EmptyObject, KtLogger } from "../../../../common/types";
|
||||
import {
|
||||
InvalidScoreFailure,
|
||||
KTDataNotFoundFailure,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { parse as FastParseXML } from "fast-xml-parser";
|
||||
import { EmptyObject, KtLogger } from "../../../../types";
|
||||
import { EmptyObject, KtLogger } from "../../../../common/types";
|
||||
import ScoreImportFatalError from "../../../framework/score-importing/score-import-error";
|
||||
import p, { PrudenceSchema } from "prudence";
|
||||
import { FormatPrError } from "../../../../common/prudence";
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { FindSDVXChartOnInGameID } from "../../../../common/database-lookup/chart";
|
||||
import { FindSongOnID } from "../../../../common/database-lookup/song";
|
||||
import { EmptyObject } from "../../../../types";
|
||||
import { EmptyObject } from "../../../../common/types";
|
||||
import { GenericGetGradeAndPercent } from "../../../framework/common/score-utils";
|
||||
import {
|
||||
InternalFailure,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { EmptyObject, KtLogger } from "../../../../types";
|
||||
import { EmptyObject, KtLogger } from "../../../../common/types";
|
||||
import p from "prudence";
|
||||
import ScoreImportFatalError from "../../../framework/score-importing/score-import-error";
|
||||
import { FormatPrError } from "../../../../common/prudence";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { KtLogger } from "../../../../types";
|
||||
import { KtLogger } from "../../../../common/types";
|
||||
import { ParseBatchManualFromObject } from "../../common/batch-manual/parser";
|
||||
import { BatchManualContext, BatchManualScore } from "../../common/batch-manual/types";
|
||||
import { ParserFunctionReturnsSync } from "../../common/types";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { KtLogger } from "../../../../types";
|
||||
import { KtLogger } from "../../../../common/types";
|
||||
import p, { PrudenceSchema } from "prudence";
|
||||
import ScoreImportFatalError from "../../../framework/score-importing/score-import-error";
|
||||
import { FormatPrError } from "../../../../common/prudence";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { KtLogger } from "../../../../types";
|
||||
import { KtLogger } from "../../../../common/types";
|
||||
import p, { PrudenceSchema, ValidSchemaValue } from "prudence";
|
||||
import ScoreImportFatalError from "../../../framework/score-importing/score-import-error";
|
||||
import { FormatPrError, optNull } from "../../../../common/prudence";
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { USCClientScore } from "../../../../server/router/ir/usc/common";
|
||||
import { FindSongOnID } from "../../../../common/database-lookup/song";
|
||||
import { KtLogger } from "../../../../types";
|
||||
import { KtLogger } from "../../../../common/types";
|
||||
import { InternalFailure, InvalidScoreFailure } from "../../../framework/common/converter-failures";
|
||||
import { GenericGetGradeAndPercent } from "../../../framework/common/score-utils";
|
||||
import { IRUSCContext } from "./types";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { KtLogger } from "../../../../types";
|
||||
import { KtLogger } from "../../../../common/types";
|
||||
import { ChartDocument } from "kamaitachi-common";
|
||||
import p, { PrudenceSchema } from "prudence";
|
||||
import { InvalidScoreFailure } from "../../../framework/common/converter-failures";
|
||||
|
||||
@@ -7,7 +7,7 @@ import CreateLogCtx from "../../../../common/logger";
|
||||
import prValidate from "../../../middleware/prudence-validate";
|
||||
import { RequireLoggedIn } from "../../../middleware/require-logged-in";
|
||||
import ScoreImportFatalError from "../../../../score-import/framework/score-importing/score-import-error";
|
||||
import { KtLogger } from "../../../../types";
|
||||
import { KtLogger } from "../../../../common/types";
|
||||
import { ExpressWrappedScoreImportMain } from "../../../../score-import/framework/express-wrapper";
|
||||
import { CreateMulterSingleUploadMiddleware } from "../../../../common/multer";
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ import CreateLogCtx from "../../../../common/logger";
|
||||
import { CreatePOSTScoresResponseBody, KtchiScoreToServerScore } from "./common";
|
||||
import { ExpressWrappedScoreImportMain } from "../../../../score-import/framework/express-wrapper";
|
||||
import { GetUserWithID } from "../../../../common/user";
|
||||
import { KtLogger } from "../../../../types";
|
||||
import { KtLogger } from "../../../../common/types";
|
||||
import { ParseIRUSC } from "../../../../score-import/import-types/ir/usc/parser";
|
||||
import { USCIR_MAX_LEADERBOARD_N } from "../../../../constants/usc-ir";
|
||||
import { CreateMulterSingleUploadMiddleware } from "../../../../common/multer";
|
||||
|
||||
Reference in New Issue
Block a user