mirror of
https://github.com/zkldi/Tachi.git
synced 2026-10-08 06:48:04 +03:00
Merge pull request #133 from zkldi/zkldi/issue132
The VSC plugin for in-editor issues is just absolutely atrocious. merging and closing.
This commit is contained in:
Vendored
+2
-2
@@ -1,6 +1,6 @@
|
||||
import { Session, SessionData } from "express-session";
|
||||
import { SYMBOL_KtchiData } from "../../src/constants/ktchi";
|
||||
import { KtchiRequestData, KtchiSessionData } from "../../src/types";
|
||||
import { SYMBOL_KtchiData } from "../../src/lib/constants/ktchi";
|
||||
import { KtchiRequestData, KtchiSessionData } from "../../src/utils/types";
|
||||
|
||||
export {};
|
||||
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@ import {
|
||||
UserMilestoneDocument,
|
||||
} from "kamaitachi-common";
|
||||
import monk from "monk";
|
||||
import CreateLogCtx from "../common/logger";
|
||||
import CreateLogCtx from "../../lib/logger/logger";
|
||||
|
||||
const logger = CreateLogCtx(__filename);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import connectRedis from "connect-redis";
|
||||
import expressSession from "express-session";
|
||||
import CreateLogCtx from "../common/logger";
|
||||
import CreateLogCtx from "../../lib/logger/logger";
|
||||
import redis from "redis";
|
||||
|
||||
const logger = CreateLogCtx(__filename);
|
||||
@@ -1,5 +1,5 @@
|
||||
import t from "tap";
|
||||
import { CloseMongoConnection } from "../db/db";
|
||||
import { CloseMongoConnection } from "../../external/mongo/db";
|
||||
import CreateLogCtx, { Transports } from "./logger";
|
||||
|
||||
t.test("Logger Tests", (t) => {
|
||||
@@ -1,5 +1,6 @@
|
||||
import winston, { format, transports } from "winston";
|
||||
import { KtLogger } from "../types";
|
||||
import winston, { format, transports, Logger, LeveledLogMethod } from "winston";
|
||||
|
||||
export type KtLogger = Logger & { severe: LeveledLogMethod };
|
||||
|
||||
const level = process.env.LOG_LEVEL ?? "info";
|
||||
|
||||
+6
-6
@@ -1,18 +1,18 @@
|
||||
import Pr from "prudence";
|
||||
import t from "tap";
|
||||
import db, { CloseMongoConnection } from "../../../db/db";
|
||||
import CreateLogCtx from "../../../common/logger";
|
||||
import { prAssert } from "../../../test-utils/asserts";
|
||||
import db, { CloseMongoConnection } from "../../../../external/mongo/db";
|
||||
import CreateLogCtx from "../../../logger/logger";
|
||||
import { prAssert } from "../../../../test-utils/asserts";
|
||||
import {
|
||||
Testing511SPA,
|
||||
TestingDoraChart,
|
||||
TestingGITADORADoraDryScore,
|
||||
TestingIIDXSPDryScore,
|
||||
} from "../../../test-utils/test-data";
|
||||
} from "../../../../test-utils/test-data";
|
||||
import { CreateCalculatedData, CalculateLampRating, CalculateRating } from "./calculated-data";
|
||||
import deepmerge from "deepmerge";
|
||||
import ResetDBState from "../../../test-utils/reset-db-state";
|
||||
import { GetDefaultTierlist } from "../../../common/tierlist";
|
||||
import ResetDBState from "../../../../test-utils/reset-db-state";
|
||||
import { GetDefaultTierlist } from "../../../../utils/tierlist";
|
||||
|
||||
const mockLogger = CreateLogCtx(__filename);
|
||||
|
||||
+2
-2
@@ -4,8 +4,8 @@ import {
|
||||
GetAllTierlistDataOfType,
|
||||
GetDefaultTierlist,
|
||||
GetOneTierlistData,
|
||||
} from "../../../common/tierlist";
|
||||
import { KtLogger } from "../../../types";
|
||||
} from "../../../../utils/tierlist";
|
||||
import { KtLogger } from "../../../logger/logger";
|
||||
import { DryScore } from "../common/types";
|
||||
import { CreateGameSpecific } from "./game-specific";
|
||||
import { CalculateCHUNITHMRating, CalculateGITADORARating } from "./game-specific-stats";
|
||||
+3
-3
@@ -1,5 +1,5 @@
|
||||
import t from "tap";
|
||||
import { CloseMongoConnection } from "../../../db/db";
|
||||
import { CloseMongoConnection } from "../../../../external/mongo/db";
|
||||
import { AnyChartDocument, Difficulties, Lamps, ScoreDocument } from "kamaitachi-common";
|
||||
import {
|
||||
CalculateBPI,
|
||||
@@ -11,8 +11,8 @@ import {
|
||||
CalculateVF5,
|
||||
KaidenPercentile,
|
||||
} from "./game-specific-stats";
|
||||
import CreateLogCtx from "../../../common/logger";
|
||||
import { isApproximately } from "../../../test-utils/asserts";
|
||||
import CreateLogCtx from "../../../logger/logger";
|
||||
import { isApproximately } from "../../../../test-utils/asserts";
|
||||
import { DryScore } from "../common/types";
|
||||
|
||||
t.test("#CalculateBPI", (t) => {
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
import { AnyChartDocument, ESDCore, integer, Grades, Lamps } from "kamaitachi-common";
|
||||
import db from "../../../db/db";
|
||||
import { KtLogger } from "../../../types";
|
||||
import db from "../../../../external/mongo/db";
|
||||
import { KtLogger } from "../../../logger/logger";
|
||||
import { DryScore } from "../common/types";
|
||||
|
||||
/**
|
||||
+4
-4
@@ -1,13 +1,13 @@
|
||||
import Pr from "prudence";
|
||||
import t from "tap";
|
||||
import { CloseMongoConnection } from "../../../db/db";
|
||||
import CreateLogCtx from "../../../common/logger";
|
||||
import { prAssert } from "../../../test-utils/asserts";
|
||||
import { CloseMongoConnection } from "../../../../external/mongo/db";
|
||||
import CreateLogCtx from "../../../logger/logger";
|
||||
import { prAssert } from "../../../../test-utils/asserts";
|
||||
import {
|
||||
Testing511SPA,
|
||||
TestingIIDXSPDryScore,
|
||||
TestingSDVXSingleDryScore,
|
||||
} from "../../../test-utils/test-data";
|
||||
} from "../../../../test-utils/test-data";
|
||||
import { CreateGameSpecific } from "./game-specific";
|
||||
const logger = CreateLogCtx(__filename);
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
import { AnyChartDocument, ChartDocument, Game, Playtypes, Grades, Lamps } from "kamaitachi-common";
|
||||
import db from "../../../db/db";
|
||||
import { KtLogger } from "../../../types";
|
||||
import db from "../../../../external/mongo/db";
|
||||
import { KtLogger } from "../../../logger/logger";
|
||||
import { DryScore } from "../common/types";
|
||||
import {
|
||||
CalculateBPI,
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
import t from "tap";
|
||||
import { CreateImportLoggerAndID } from "./import-logger";
|
||||
import { PublicUserDocument } from "kamaitachi-common";
|
||||
import { CloseMongoConnection } from "../../../db/db";
|
||||
import { CloseMongoConnection } from "../../../../external/mongo/db";
|
||||
|
||||
t.test("#CreateImportLoggerAndID", (t) => {
|
||||
const { importID, logger } = CreateImportLoggerAndID(
|
||||
+2
-3
@@ -1,8 +1,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 { FormatUserDoc } from "../../../../utils/user";
|
||||
import { rootLogger, KtLogger } from "../../../logger/logger";
|
||||
|
||||
export function CreateImportLoggerAndID(userDoc: PublicUserDocument, importType: ImportTypes) {
|
||||
const importID = crypto.randomBytes(20).toString("hex");
|
||||
+1
-1
@@ -10,7 +10,7 @@ import {
|
||||
Playtypes,
|
||||
} from "kamaitachi-common";
|
||||
import { judgementWindows, gamePercentMax } from "kamaitachi-common/js/config";
|
||||
import CreateLogCtx from "../../../common/logger";
|
||||
import CreateLogCtx from "../../../logger/logger";
|
||||
import { InternalFailure, InvalidScoreFailure } from "./converter-failures";
|
||||
|
||||
const logger = CreateLogCtx(__filename);
|
||||
+5
-5
@@ -1,6 +1,6 @@
|
||||
import t from "tap";
|
||||
import db, { CloseMongoConnection } from "../../../db/db";
|
||||
import ResetDBState from "../../../test-utils/reset-db-state";
|
||||
import db, { CloseMongoConnection } from "../../../../external/mongo/db";
|
||||
import ResetDBState from "../../../../test-utils/reset-db-state";
|
||||
import {
|
||||
GetRelevantFolderGoals,
|
||||
GetRelevantGoals,
|
||||
@@ -9,7 +9,7 @@ import {
|
||||
ProcessGoal,
|
||||
} from "./goals";
|
||||
import { GoalDocument, UserGoalDocument } from "kamaitachi-common";
|
||||
import { CreateFolderChartLookup } from "../../../common/folder";
|
||||
import { CreateFolderChartLookup } from "../../../../utils/folder";
|
||||
import {
|
||||
GetKTDataJSON,
|
||||
Testing511SPA,
|
||||
@@ -17,9 +17,9 @@ import {
|
||||
HC511Goal,
|
||||
HC511UserGoal,
|
||||
TestingIIDXFolderSP10,
|
||||
} from "../../../test-utils/test-data";
|
||||
} from "../../../../test-utils/test-data";
|
||||
import deepmerge from "deepmerge";
|
||||
import CreateLogCtx from "../../../common/logger";
|
||||
import CreateLogCtx from "../../../logger/logger";
|
||||
import crypto from "crypto";
|
||||
|
||||
const logger = CreateLogCtx(__filename);
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
import { integer, Game, GoalDocument, UserGoalDocument } from "kamaitachi-common";
|
||||
import { EvaluateGoalForUser } from "../../../common/goal";
|
||||
import db from "../../../db/db";
|
||||
import { KtLogger } from "../../../types";
|
||||
import { EvaluateGoalForUser } from "../../../../utils/goal";
|
||||
import db from "../../../../external/mongo/db";
|
||||
import { KtLogger } from "../../../logger/logger";
|
||||
|
||||
/**
|
||||
* Update a user's progress on all of their set goals.
|
||||
+4
-4
@@ -1,8 +1,8 @@
|
||||
import t from "tap";
|
||||
import db, { CloseMongoConnection } from "../../../db/db";
|
||||
import CreateLogCtx from "../../../common/logger";
|
||||
import ResetDBState from "../../../test-utils/reset-db-state";
|
||||
import { TestingIIDXSPMilestone } from "../../../test-utils/test-data";
|
||||
import db, { CloseMongoConnection } from "../../../../external/mongo/db";
|
||||
import CreateLogCtx from "../../../logger/logger";
|
||||
import ResetDBState from "../../../../test-utils/reset-db-state";
|
||||
import { TestingIIDXSPMilestone } from "../../../../test-utils/test-data";
|
||||
import { UpdateUsersMilestones } from "./milestones";
|
||||
import { GoalImportInfo } from "kamaitachi-common";
|
||||
import deepmerge from "deepmerge";
|
||||
+40
-3
@@ -1,4 +1,4 @@
|
||||
import { KtLogger } from "../../../types";
|
||||
import { KtLogger } from "../../../logger/logger";
|
||||
import {
|
||||
integer,
|
||||
Game,
|
||||
@@ -6,10 +6,47 @@ import {
|
||||
GoalImportInfo,
|
||||
UserMilestoneDocument,
|
||||
MilestoneImportInfo,
|
||||
MilestoneDocument,
|
||||
} from "kamaitachi-common";
|
||||
import db from "../../../db/db";
|
||||
import { ProcessMilestoneFromGII } from "../../../common/milestone";
|
||||
import db from "../../../../external/mongo/db";
|
||||
import { BulkWriteUpdateOneOperation } from "mongodb";
|
||||
import { CalculateMilestoneOutOf, GetGoalIDsFromMilestone } from "../../../../utils/milestone";
|
||||
|
||||
/**
|
||||
* Processes and updates a user's milestones from their Goal Import Info (i.e. what is returned
|
||||
* about goals from imports)
|
||||
*/
|
||||
export function ProcessMilestoneFromGII(
|
||||
milestone: MilestoneDocument,
|
||||
gii: Map<string, GoalImportInfo["new"]>
|
||||
) {
|
||||
const goalIDs = GetGoalIDsFromMilestone(milestone);
|
||||
|
||||
let progress = 0;
|
||||
|
||||
for (const goalID of goalIDs) {
|
||||
const userInfo = gii.get(goalID);
|
||||
|
||||
if (!userInfo) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!userInfo.achieved) {
|
||||
continue;
|
||||
}
|
||||
|
||||
progress++;
|
||||
}
|
||||
|
||||
const outOf = CalculateMilestoneOutOf(milestone, goalIDs);
|
||||
|
||||
// milestone achieved!
|
||||
if (progress >= outOf) {
|
||||
return { achieved: true, progress };
|
||||
}
|
||||
|
||||
return { achieved: false, progress };
|
||||
}
|
||||
|
||||
export async function UpdateUsersMilestones(
|
||||
importGoalInfo: GoalImportInfo[],
|
||||
+5
-5
@@ -1,11 +1,11 @@
|
||||
import t from "tap";
|
||||
import db, { CloseMongoConnection } from "../../../db/db";
|
||||
import ResetDBState from "../../../test-utils/reset-db-state";
|
||||
import { GetKTDataJSON, Testing511SPA, TestingIIDXSPScore } from "../../../test-utils/test-data";
|
||||
import db, { CloseMongoConnection } from "../../../../external/mongo/db";
|
||||
import ResetDBState from "../../../../test-utils/reset-db-state";
|
||||
import { GetKTDataJSON, Testing511SPA, TestingIIDXSPScore } from "../../../../test-utils/test-data";
|
||||
import { CreatePBDoc } from "./create-pb-doc";
|
||||
import deepmerge from "deepmerge";
|
||||
import CreateLogCtx from "../../../common/logger";
|
||||
import { KtLogger } from "../../../types";
|
||||
import CreateLogCtx, { KtLogger } from "../../../logger/logger";
|
||||
|
||||
import { lamps } from "kamaitachi-common/js/config";
|
||||
|
||||
let IIDXScore = TestingIIDXSPScore;
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
import db from "../../../db/db";
|
||||
import db from "../../../../external/mongo/db";
|
||||
import { integer, PBScoreDocument, ScoreDocument } from "kamaitachi-common";
|
||||
|
||||
import { KtLogger } from "../../../types";
|
||||
import { KtLogger } from "../../../logger/logger";
|
||||
import { IIDXMergeFn, SDVXMergeFn } from "./game-specific-merge";
|
||||
import { BulkWriteUpdateOneOperation } from "mongodb";
|
||||
export type PBScoreDocumentNoRank = Omit<PBScoreDocument, "rankingData">;
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
import { PBScoreDocument, ScoreDocument } from "kamaitachi-common";
|
||||
import { FindChartWithChartID } from "../../../common/database-lookup/chart";
|
||||
import db from "../../../db/db";
|
||||
import { KtLogger } from "../../../types";
|
||||
import { FindChartWithChartID } from "../../../../utils/queries/charts";
|
||||
import db from "../../../../external/mongo/db";
|
||||
import { KtLogger } from "../../../logger/logger";
|
||||
import { CalculateVF4, CalculateVF5 } from "../calculated-data/game-specific-stats";
|
||||
import { InternalFailure } from "../common/converter-failures";
|
||||
|
||||
+4
-4
@@ -1,8 +1,8 @@
|
||||
import t from "tap";
|
||||
import db, { CloseMongoConnection } from "../../../db/db";
|
||||
import CreateLogCtx from "../../../common/logger";
|
||||
import ResetDBState from "../../../test-utils/reset-db-state";
|
||||
import { Testing511SPA, TestingIIDXSPScore } from "../../../test-utils/test-data";
|
||||
import db, { CloseMongoConnection } from "../../../../external/mongo/db";
|
||||
import CreateLogCtx from "../../../logger/logger";
|
||||
import ResetDBState from "../../../../test-utils/reset-db-state";
|
||||
import { Testing511SPA, TestingIIDXSPScore } from "../../../../test-utils/test-data";
|
||||
import { ProcessPBs } from "./process-pbs";
|
||||
import deepmerge from "deepmerge";
|
||||
import crypto from "crypto";
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
import { integer, PBScoreDocument } from "kamaitachi-common";
|
||||
import db from "../../../db/db";
|
||||
import { KtLogger } from "../../../types";
|
||||
import db from "../../../../external/mongo/db";
|
||||
import { KtLogger } from "../../../logger/logger";
|
||||
import { CreatePBDoc, UpdateChartRanking, PBScoreDocumentNoRank } from "./create-pb-doc";
|
||||
|
||||
export async function ProcessPBs(
|
||||
+3
-3
@@ -8,14 +8,14 @@ import {
|
||||
integer,
|
||||
IDStrings,
|
||||
} from "kamaitachi-common";
|
||||
import { KtLogger } from "../../types";
|
||||
import { KtLogger } from "../../logger/logger";
|
||||
import { ImportAllIterableData } from "./score-importing/score-importing";
|
||||
import { CreateImportLoggerAndID } from "./common/import-logger";
|
||||
import { CreateSessions } from "./sessions/sessions";
|
||||
import { GetMilisecondsSince } from "../../common/util";
|
||||
import { GetMilisecondsSince } from "../../../utils/misc";
|
||||
import { ProcessPBs } from "./pb/process-pbs";
|
||||
import { UpdateUsersGamePlaytypeStats } from "./user-game-stats/update-ugs";
|
||||
import db from "../../db/db";
|
||||
import db from "../../../external/mongo/db";
|
||||
import { GetAndUpdateUsersGoals } from "./goals/goals";
|
||||
import { UpdateUsersMilestones } from "./milestones/milestones";
|
||||
import { ClassHandler } from "./user-game-stats/classes";
|
||||
+1
-1
@@ -5,7 +5,7 @@ import {
|
||||
ScoreDocument,
|
||||
AnySongDocument,
|
||||
} from "kamaitachi-common";
|
||||
import { KtLogger } from "../../../types";
|
||||
import { KtLogger } from "../../../logger/logger";
|
||||
import { CreateCalculatedData } from "../calculated-data/calculated-data";
|
||||
import { CalculateESDForGame } from "../common/score-utils";
|
||||
import { DryScore } from "../common/types";
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
import { ScoreDocument } from "kamaitachi-common";
|
||||
import t from "tap";
|
||||
import db, { CloseMongoConnection } from "../../../db/db";
|
||||
import ResetDBState from "../../../test-utils/reset-db-state";
|
||||
import db, { CloseMongoConnection } from "../../../../external/mongo/db";
|
||||
import ResetDBState from "../../../../test-utils/reset-db-state";
|
||||
import { InsertQueue, QueueScoreInsert } from "./insert-score";
|
||||
|
||||
// these two get the same tests, because they're too closely linked
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
import { ScoreDocument } from "kamaitachi-common";
|
||||
import db from "../../../db/db";
|
||||
import CreateLogCtx from "../../../common/logger";
|
||||
import db from "../../../../external/mongo/db";
|
||||
import CreateLogCtx from "../../../logger/logger";
|
||||
|
||||
const logger = CreateLogCtx(__filename);
|
||||
const ScoreQueue: ScoreDocument[] = [];
|
||||
+3
-3
@@ -1,8 +1,8 @@
|
||||
import { ScoreDocument } from "kamaitachi-common";
|
||||
import t from "tap";
|
||||
import { CloseMongoConnection } from "../../../db/db";
|
||||
import ResetDBState from "../../../test-utils/reset-db-state";
|
||||
import { Testing511SPA, TestingIIDXSPDryScore } from "../../../test-utils/test-data";
|
||||
import { CloseMongoConnection } from "../../../../external/mongo/db";
|
||||
import ResetDBState from "../../../../test-utils/reset-db-state";
|
||||
import { Testing511SPA, TestingIIDXSPDryScore } from "../../../../test-utils/test-data";
|
||||
import { CreateScoreID, GetWithScoreID } from "./score-id";
|
||||
|
||||
t.beforeEach(ResetDBState);
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
import crypto from "crypto";
|
||||
import db from "../../../db/db";
|
||||
import db from "../../../../external/mongo/db";
|
||||
import { integer } from "kamaitachi-common";
|
||||
import { DryScore } from "../common/types";
|
||||
|
||||
+3
-3
@@ -16,9 +16,9 @@ import {
|
||||
SkipScoreFailure,
|
||||
} from "../common/converter-failures";
|
||||
import { CreateScoreID } from "./score-id";
|
||||
import db from "../../../db/db";
|
||||
import { AppendLogCtx } from "../../../common/logger";
|
||||
import { KtLogger } from "../../../types";
|
||||
import db from "../../../../external/mongo/db";
|
||||
import { AppendLogCtx, KtLogger } from "../../../logger/logger";
|
||||
|
||||
import {
|
||||
ConverterFunctionReturns,
|
||||
ConverterFnReturn,
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import { GetRandomAdjective, GetRandomNoun } from "../../../data/words";
|
||||
import { GetRandomAdjective, GetRandomNoun } from "../../../../datasets/words";
|
||||
|
||||
export function GenerateRandomSessionName() {
|
||||
const adj1 = GetRandomAdjective();
|
||||
+4
-4
@@ -9,13 +9,13 @@ import {
|
||||
SessionInfoReturn,
|
||||
Game,
|
||||
} from "kamaitachi-common";
|
||||
import db from "../../../db/db";
|
||||
import { AppendLogCtx } from "../../../common/logger";
|
||||
import db from "../../../../external/mongo/db";
|
||||
import { AppendLogCtx, KtLogger } from "../../../logger/logger";
|
||||
import { GenerateRandomSessionName } from "./name-generation";
|
||||
import crypto from "crypto";
|
||||
import { CreateSessionCalcData } from "./performance-calc";
|
||||
import { GetScoresFromSession } from "../../../common/session";
|
||||
import { KtLogger } from "../../../types";
|
||||
import { GetScoresFromSession } from "../../../../utils/session";
|
||||
|
||||
import { ScorePlaytypeMap } from "../common/types";
|
||||
|
||||
const TWO_HOURS = 1000 * 60 * 60 * 2;
|
||||
+3
-3
@@ -1,8 +1,8 @@
|
||||
import { UserGameStats } from "kamaitachi-common";
|
||||
import t from "tap";
|
||||
import { CloseMongoConnection } from "../../../db/db";
|
||||
import CreateLogCtx from "../../../common/logger";
|
||||
import ResetDBState from "../../../test-utils/reset-db-state";
|
||||
import { CloseMongoConnection } from "../../../../external/mongo/db";
|
||||
import CreateLogCtx from "../../../logger/logger";
|
||||
import ResetDBState from "../../../../test-utils/reset-db-state";
|
||||
import { CalculateClassDeltas, UpdateUGSClasses } from "./classes";
|
||||
|
||||
const logger = CreateLogCtx(__filename);
|
||||
+2
-2
@@ -1,9 +1,9 @@
|
||||
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 "../../../logger/logger";
|
||||
import { CalculateGitadoraColour, CalculateJubeatColour } from "./builtin-class-handlers";
|
||||
import { ReturnClassIfGreater } from "../../../common/class";
|
||||
import { ReturnClassIfGreater } from "../../../../utils/class";
|
||||
|
||||
export interface ClassHandler {
|
||||
(
|
||||
+4
-4
@@ -1,10 +1,10 @@
|
||||
import t from "tap";
|
||||
import db, { CloseMongoConnection } from "../../../db/db";
|
||||
import ResetDBState from "../../../test-utils/reset-db-state";
|
||||
import { TestingIIDXSPScorePB } from "../../../test-utils/test-data";
|
||||
import db, { CloseMongoConnection } from "../../../../external/mongo/db";
|
||||
import ResetDBState from "../../../../test-utils/reset-db-state";
|
||||
import { TestingIIDXSPScorePB } from "../../../../test-utils/test-data";
|
||||
import { CalculateCustomRatings, CalculateRatings } from "./rating";
|
||||
import deepmerge from "deepmerge";
|
||||
import CreateLogCtx from "../../../common/logger";
|
||||
import CreateLogCtx from "../../../logger/logger";
|
||||
import crypto from "crypto";
|
||||
|
||||
const logger = CreateLogCtx(__filename);
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
import { Game, Playtypes, integer, GameSpecificCalcLookup, IDStrings } from "kamaitachi-common";
|
||||
import db from "../../../db/db";
|
||||
import { KtLogger } from "../../../types";
|
||||
import db from "../../../../external/mongo/db";
|
||||
import { KtLogger } from "../../../logger/logger";
|
||||
|
||||
export async function CalculateRatings(
|
||||
game: Game,
|
||||
+4
-4
@@ -1,12 +1,12 @@
|
||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||
import t from "tap";
|
||||
import db, { CloseMongoConnection } from "../../../db/db";
|
||||
import CreateLogCtx from "../../../common/logger";
|
||||
import ResetDBState from "../../../test-utils/reset-db-state";
|
||||
import db, { CloseMongoConnection } from "../../../../external/mongo/db";
|
||||
import CreateLogCtx from "../../../logger/logger";
|
||||
import ResetDBState from "../../../../test-utils/reset-db-state";
|
||||
import { UpdateUsersGamePlaytypeStats } from "./update-ugs";
|
||||
import deepmerge from "deepmerge";
|
||||
import crypto from "crypto";
|
||||
import { TestingIIDXSPScorePB } from "../../../test-utils/test-data";
|
||||
import { TestingIIDXSPScorePB } from "../../../../test-utils/test-data";
|
||||
|
||||
const logger = CreateLogCtx(__filename);
|
||||
|
||||
+2
-2
@@ -3,8 +3,8 @@
|
||||
// That's about all there is to it!
|
||||
|
||||
import { Game, Playtypes, integer, UserGameStats, ClassDelta } from "kamaitachi-common";
|
||||
import db from "../../../db/db";
|
||||
import { KtLogger } from "../../../types";
|
||||
import db from "../../../../external/mongo/db";
|
||||
import { KtLogger } from "../../../logger/logger";
|
||||
import { CalculateClassDeltas, UpdateUGSClasses, ClassHandler } from "./classes";
|
||||
import { CalculateRatings, CalculateCustomRatings } from "./rating";
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import { KtLogger } from "../../../../types";
|
||||
import { KtLogger } from "../../../../logger/logger";
|
||||
import { ParseKaiIIDX } from "../../common/api-kai/iidx/parser";
|
||||
import { KaiAuthDocument } from "kamaitachi-common";
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import { KtLogger } from "../../../../types";
|
||||
import { KtLogger } from "../../../../logger/logger";
|
||||
import { KaiAuthDocument } from "kamaitachi-common";
|
||||
import { ParseKaiSDVX } from "../../common/api-kai/sdvx/parser";
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import { KtLogger } from "../../../../types";
|
||||
import { KtLogger } from "../../../../logger/logger";
|
||||
import { ParseKaiIIDX } from "../../common/api-kai/iidx/parser";
|
||||
import { KaiAuthDocument } from "kamaitachi-common";
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import { KtLogger } from "../../../../types";
|
||||
import { KtLogger } from "../../../../logger/logger";
|
||||
import { KaiAuthDocument } from "kamaitachi-common";
|
||||
import { ParseKaiSDVX } from "../../common/api-kai/sdvx/parser";
|
||||
|
||||
+3
-3
@@ -1,4 +1,4 @@
|
||||
import { FindIIDXChartOnInGameIDVersion } from "../../../../../common/database-lookup/chart";
|
||||
import { FindIIDXChartOnInGameIDVersion } from "../../../../../../utils/queries/charts";
|
||||
import { KaiContext, KaiIIDXScore } from "../types";
|
||||
import p from "prudence";
|
||||
import {
|
||||
@@ -6,8 +6,8 @@ import {
|
||||
InvalidScoreFailure,
|
||||
KTDataNotFoundFailure,
|
||||
} from "../../../../framework/common/converter-failures";
|
||||
import { FormatPrError } from "../../../../../common/prudence";
|
||||
import { FindSongOnID } from "../../../../../common/database-lookup/song";
|
||||
import { FormatPrError } from "../../../../../../utils/prudence";
|
||||
import { FindSongOnID } from "../../../../../../utils/queries/songs";
|
||||
import {
|
||||
GenericGetGradeAndPercent,
|
||||
ParseDateFromString,
|
||||
+3
-3
@@ -1,8 +1,8 @@
|
||||
import { KtLogger } from "../../../../../types";
|
||||
import nodeFetch from "../../../../../common/fetch";
|
||||
import { KtLogger } from "../../../../../logger/logger";
|
||||
import nodeFetch from "../../../../../../utils/fetch";
|
||||
import { KaiAuthDocument } from "kamaitachi-common";
|
||||
import { KaiContext } from "../types";
|
||||
import { EAG_API_URL, FLO_API_URL } from "../../../../../secrets";
|
||||
import { EAG_API_URL, FLO_API_URL } from "../../../../../../secrets";
|
||||
import { ConvertAPIKaiIIDX } from "./converter";
|
||||
import { TraverseKaiAPI } from "../traverse-api";
|
||||
import { ParserFunctionReturnsAsync } from "../../types";
|
||||
+3
-3
@@ -1,4 +1,4 @@
|
||||
import { FindSDVXChartOnInGameIDVersion } from "../../../../../common/database-lookup/chart";
|
||||
import { FindSDVXChartOnInGameIDVersion } from "../../../../../../utils/queries/charts";
|
||||
import { KaiContext, KaiSDVXScore } from "../types";
|
||||
import p from "prudence";
|
||||
import {
|
||||
@@ -6,8 +6,8 @@ import {
|
||||
InvalidScoreFailure,
|
||||
KTDataNotFoundFailure,
|
||||
} from "../../../../framework/common/converter-failures";
|
||||
import { FormatPrError } from "../../../../../common/prudence";
|
||||
import { FindSongOnID } from "../../../../../common/database-lookup/song";
|
||||
import { FormatPrError } from "../../../../../../utils/prudence";
|
||||
import { FindSongOnID } from "../../../../../../utils/queries/songs";
|
||||
import {
|
||||
GenericGetGradeAndPercent,
|
||||
ParseDateFromString,
|
||||
+3
-3
@@ -1,8 +1,8 @@
|
||||
import { KtLogger } from "../../../../../types";
|
||||
import nodeFetch from "../../../../../common/fetch";
|
||||
import { KtLogger } from "../../../../../logger/logger";
|
||||
import nodeFetch from "../../../../../../utils/fetch";
|
||||
import { KaiAuthDocument } from "kamaitachi-common";
|
||||
import { KaiContext } from "../types";
|
||||
import { EAG_API_URL, FLO_API_URL } from "../../../../../secrets";
|
||||
import { EAG_API_URL, FLO_API_URL } from "../../../../../../secrets";
|
||||
import { ConvertAPIKaiSDVX } from "./converter";
|
||||
import { TraverseKaiAPI } from "../traverse-api";
|
||||
import { ParserFunctionReturnsAsync } from "../../types";
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
import { KtLogger } from "../../../../types";
|
||||
import { KtLogger } from "../../../../logger/logger";
|
||||
import ScoreImportFatalError from "../../../framework/score-importing/score-import-error";
|
||||
import nodeFetch from "../../../../common/fetch";
|
||||
import nodeFetch from "../../../../../utils/fetch";
|
||||
import { KaiAuthDocument } from "kamaitachi-common";
|
||||
|
||||
/**
|
||||
+5
-5
@@ -1,13 +1,13 @@
|
||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||
import t from "tap";
|
||||
import CreateLogCtx from "../../../../common/logger";
|
||||
import { GetKTDataJSON, Testing511Song, Testing511SPA } from "../../../../test-utils/test-data";
|
||||
import CreateLogCtx from "../../../../logger/logger";
|
||||
import { GetKTDataJSON, Testing511Song, Testing511SPA } from "../../../../../test-utils/test-data";
|
||||
import { ResolveChartFromSong, ResolveMatchTypeToKTData, ConverterBatchManual } from "./converter";
|
||||
import deepmerge from "deepmerge";
|
||||
import { EscapeStringRegexp } from "../../../../common/util";
|
||||
import db, { CloseMongoConnection } from "../../../../db/db";
|
||||
import { EscapeStringRegexp } from "../../../../../utils/misc";
|
||||
import db, { CloseMongoConnection } from "../../../../../external/mongo/db";
|
||||
import { Game } from "kamaitachi-common";
|
||||
import ResetDBState from "../../../../test-utils/reset-db-state";
|
||||
import ResetDBState from "../../../../../test-utils/reset-db-state";
|
||||
import { InvalidScoreFailure } from "../../../framework/common/converter-failures";
|
||||
|
||||
const baseBatchManualScore = {
|
||||
+4
-4
@@ -1,23 +1,23 @@
|
||||
import { BatchManualContext, BatchManualScore } from "../../common/batch-manual/types";
|
||||
import { BatchManualContext, BatchManualScore } from "./types";
|
||||
import { AnyChartDocument, AnySongDocument, ImportTypes } from "kamaitachi-common";
|
||||
import {
|
||||
InternalFailure,
|
||||
InvalidScoreFailure,
|
||||
KTDataNotFoundFailure,
|
||||
} from "../../../framework/common/converter-failures";
|
||||
import { FindSongOnID, FindSongOnTitleInsensitive } from "../../../../common/database-lookup/song";
|
||||
import { FindSongOnID, FindSongOnTitleInsensitive } from "../../../../../utils/queries/songs";
|
||||
import {
|
||||
FindBMSChartOnHash,
|
||||
FindChartWithPTDF,
|
||||
FindChartWithPTDFVersion,
|
||||
FindDDRChartOnSongHash,
|
||||
} from "../../../../common/database-lookup/chart";
|
||||
} from "../../../../../utils/queries/charts";
|
||||
import {
|
||||
AssertStrAsDifficulty,
|
||||
AssertStrAsPositiveInt,
|
||||
} from "../../../framework/common/string-asserts";
|
||||
import { GenericGetGradeAndPercent } from "../../../framework/common/score-utils";
|
||||
import { KtLogger } from "../../../../types";
|
||||
import { KtLogger } from "../../../../logger/logger";
|
||||
import { DryScore } from "../../../framework/common/types";
|
||||
import { ConverterFunction, ConverterFnReturn } from "../types";
|
||||
|
||||
+3
-3
@@ -1,10 +1,10 @@
|
||||
import t from "tap";
|
||||
import { CloseMongoConnection } from "../../../../db/db";
|
||||
import CreateLogCtx from "../../../../common/logger";
|
||||
import { CloseMongoConnection } from "../../../../../external/mongo/db";
|
||||
import CreateLogCtx from "../../../../logger/logger";
|
||||
import ScoreImportFatalError from "../../../framework/score-importing/score-import-error";
|
||||
import { ParseBatchManualFromObject as ParserFn } from "./parser";
|
||||
import { BatchManual } from "./types";
|
||||
import { EscapeStringRegexp } from "../../../../common/util";
|
||||
import { EscapeStringRegexp } from "../../../../../utils/misc";
|
||||
import deepmerge from "deepmerge";
|
||||
|
||||
const mockErr = (...msg: string[]) =>
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
import { KtLogger } from "../../../../types";
|
||||
import { KtLogger } from "../../../../logger/logger";
|
||||
import ScoreImportFatalError from "../../../framework/score-importing/score-import-error";
|
||||
import { BatchManual, BatchManualContext, BatchManualScore } from "./types";
|
||||
import p, { PrudenceSchema, ValidSchemaValue } from "prudence";
|
||||
@@ -6,7 +6,7 @@ import { lamps, supportedGames, validHitData, validPlaytypes } from "kamaitachi-
|
||||
import { Game, ImportTypes } from "kamaitachi-common";
|
||||
import { ConverterBatchManual } from "./converter";
|
||||
import deepmerge from "deepmerge";
|
||||
import { FormatPrError } from "../../../../common/prudence";
|
||||
import { FormatPrError } from "../../../../../utils/prudence";
|
||||
import { ParserFunctionReturnsSync } from "../types";
|
||||
|
||||
const optNull = (v: ValidSchemaValue) => p.optional(p.nullable(v));
|
||||
+4
-4
@@ -1,10 +1,10 @@
|
||||
import t from "tap";
|
||||
import db, { CloseMongoConnection } from "../../../../db/db";
|
||||
import CreateLogCtx from "../../../../common/logger";
|
||||
import ResetDBState from "../../../../test-utils/reset-db-state";
|
||||
import db, { CloseMongoConnection } from "../../../../../external/mongo/db";
|
||||
import CreateLogCtx from "../../../../logger/logger";
|
||||
import ResetDBState from "../../../../../test-utils/reset-db-state";
|
||||
import ConverterFn, { EamScoreConverter, EamScoreConverterWrapper } from "./converter";
|
||||
import p from "prudence";
|
||||
import { prAssert } from "../../../../test-utils/asserts";
|
||||
import { prAssert } from "../../../../../test-utils/asserts";
|
||||
import deepmerge from "deepmerge";
|
||||
import { EamusementScoreData } from "./types";
|
||||
import {
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
import { Lamps, AnySongDocument, ChartDocument } from "kamaitachi-common";
|
||||
import { FindChartWithPTDFVersion } from "../../../../common/database-lookup/chart";
|
||||
import { FindSongOnTitleInsensitive } from "../../../../common/database-lookup/song";
|
||||
import { FindChartWithPTDFVersion } from "../../../../../utils/queries/charts";
|
||||
import { FindSongOnTitleInsensitive } from "../../../../../utils/queries/songs";
|
||||
import {
|
||||
KTDataNotFoundFailure,
|
||||
InternalFailure,
|
||||
@@ -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 "../../../../logger/logger";
|
||||
import { DryScore } from "../../../framework/common/types";
|
||||
import { ConverterFunction, ConverterFnReturn } from "../types";
|
||||
|
||||
+4
-4
@@ -1,13 +1,13 @@
|
||||
import t from "tap";
|
||||
import CreateLogCtx from "../../../../common/logger";
|
||||
import CreateLogCtx from "../../../../logger/logger";
|
||||
import ScoreImportFatalError from "../../../framework/score-importing/score-import-error";
|
||||
import GenericParseEamIIDXCSV, { NaiveCSVParse, ResolveHeaders } from "./parser";
|
||||
import { CloseMongoConnection } from "../../../../db/db";
|
||||
import { CloseMongoConnection } from "../../../../../external/mongo/db";
|
||||
import {
|
||||
TestingIIDXEamusementCSV26,
|
||||
TestingIIDXEamusementCSV27,
|
||||
} from "../../../../test-utils/test-data";
|
||||
import { MockMulterFile } from "../../../../test-utils/mock-multer";
|
||||
} from "../../../../../test-utils/test-data";
|
||||
import { MockMulterFile } from "../../../../../test-utils/mock-multer";
|
||||
|
||||
const logger = CreateLogCtx(__filename);
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
import { Difficulties } from "kamaitachi-common";
|
||||
import { KtLogger } from "../../../../types";
|
||||
import { KtLogger } from "../../../../logger/logger";
|
||||
import ScoreImportFatalError from "../../../framework/score-importing/score-import-error";
|
||||
import { ParserFunctionReturnsSync } from "../types";
|
||||
import ConverterFn from "./converter";
|
||||
+2
-1
@@ -1,4 +1,5 @@
|
||||
import { EmptyObject, KtLogger } from "../../../types";
|
||||
import { EmptyObject } from "../../../../utils/types";
|
||||
import { KtLogger } from "../../../logger/logger";
|
||||
import { MerScore } from "../file/mer-iidx/types";
|
||||
import { S3Score } from "../file/solid-state-squad/types";
|
||||
import { BarbatosScore } from "../ir/barbatos/types";
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import { KtLogger } from "../../../../types";
|
||||
import { KtLogger } from "../../../../logger/logger";
|
||||
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
-1
@@ -1,4 +1,4 @@
|
||||
import { KtLogger } from "../../../../types";
|
||||
import { KtLogger } from "../../../../logger/logger";
|
||||
import GenericParseEamIIDXCSV from "../../common/eamusement-iidx-csv/parser";
|
||||
import {
|
||||
IIDXEamusementCSVContext,
|
||||
+4
-4
@@ -1,14 +1,14 @@
|
||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||
import t from "tap";
|
||||
import db, { CloseMongoConnection } from "../../../../db/db";
|
||||
import CreateLogCtx from "../../../../common/logger";
|
||||
import ResetDBState from "../../../../test-utils/reset-db-state";
|
||||
import db, { CloseMongoConnection } from "../../../../../external/mongo/db";
|
||||
import CreateLogCtx from "../../../../logger/logger";
|
||||
import ResetDBState from "../../../../../test-utils/reset-db-state";
|
||||
import {
|
||||
GetKTDataJSON,
|
||||
LoadKTBlackIIDXData,
|
||||
Testing511Song,
|
||||
Testing511SPA,
|
||||
} from "../../../../test-utils/test-data";
|
||||
} from "../../../../../test-utils/test-data";
|
||||
import { ConvertFileMerIIDX } from "./converter";
|
||||
import deepmerge from "deepmerge";
|
||||
import { MerScore } from "./types";
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
import { FindIIDXChartOnInGameID } from "../../../../common/database-lookup/chart";
|
||||
import { FindSongOnID } from "../../../../common/database-lookup/song";
|
||||
import { EmptyObject } from "../../../../types";
|
||||
import { FindIIDXChartOnInGameID } from "../../../../../utils/queries/charts";
|
||||
import { FindSongOnID } from "../../../../../utils/queries/songs";
|
||||
import { EmptyObject } from "../../../../../utils/types";
|
||||
import {
|
||||
InternalFailure,
|
||||
KTDataNotFoundFailure,
|
||||
+5
-5
@@ -1,10 +1,10 @@
|
||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||
import t from "tap";
|
||||
import { CloseMongoConnection } from "../../../../db/db";
|
||||
import CreateLogCtx from "../../../../common/logger";
|
||||
import { MockMulterFile } from "../../../../test-utils/mock-multer";
|
||||
import ResetDBState from "../../../../test-utils/reset-db-state";
|
||||
import { GetKTDataBuffer, GetKTDataJSON } from "../../../../test-utils/test-data";
|
||||
import { CloseMongoConnection } from "../../../../../external/mongo/db";
|
||||
import CreateLogCtx from "../../../../logger/logger";
|
||||
import { MockMulterFile } from "../../../../../test-utils/mock-multer";
|
||||
import ResetDBState from "../../../../../test-utils/reset-db-state";
|
||||
import { GetKTDataBuffer, GetKTDataJSON } from "../../../../../test-utils/test-data";
|
||||
import { ParseMerIIDX } from "./parser";
|
||||
import deepmerge from "deepmerge";
|
||||
|
||||
+3
-2
@@ -1,6 +1,7 @@
|
||||
import p from "prudence";
|
||||
import { FormatPrError } from "../../../../common/prudence";
|
||||
import { EmptyObject, KtLogger } from "../../../../types";
|
||||
import { FormatPrError } from "../../../../../utils/prudence";
|
||||
import { EmptyObject } from "../../../../../utils/types";
|
||||
import { KtLogger } from "../../../../logger/logger";
|
||||
import ScoreImportFatalError from "../../../framework/score-importing/score-import-error";
|
||||
import { ParserFunctionReturnsSync } from "../../common/types";
|
||||
import { ConvertFileMerIIDX } from "./converter";
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import { KtLogger } from "../../../../types";
|
||||
import { KtLogger } from "../../../../logger/logger";
|
||||
import GenericParseEamIIDXCSV from "../../common/eamusement-iidx-csv/parser";
|
||||
import {
|
||||
IIDXEamusementCSVContext,
|
||||
+4
-4
@@ -1,14 +1,14 @@
|
||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||
import t from "tap";
|
||||
import { CloseMongoConnection } from "../../../../db/db";
|
||||
import CreateLogCtx from "../../../../common/logger";
|
||||
import ResetDBState from "../../../../test-utils/reset-db-state";
|
||||
import { CloseMongoConnection } from "../../../../../external/mongo/db";
|
||||
import CreateLogCtx from "../../../../logger/logger";
|
||||
import ResetDBState from "../../../../../test-utils/reset-db-state";
|
||||
import {
|
||||
GetKTDataJSON,
|
||||
LoadKTBlackIIDXData,
|
||||
Testing511Song,
|
||||
Testing511SPA,
|
||||
} from "../../../../test-utils/test-data";
|
||||
} from "../../../../../test-utils/test-data";
|
||||
import { ConvertFileS3, ParseDifficulty, ResolveS3Lamp } from "./converter";
|
||||
import { S3Score } from "./types";
|
||||
import deepmerge from "deepmerge";
|
||||
+4
-3
@@ -1,4 +1,5 @@
|
||||
import { EmptyObject, KtLogger } from "../../../../types";
|
||||
import { EmptyObject } from "../../../../../utils/types";
|
||||
import { KtLogger } from "../../../../logger/logger";
|
||||
import {
|
||||
InvalidScoreFailure,
|
||||
KTDataNotFoundFailure,
|
||||
@@ -6,8 +7,8 @@ import {
|
||||
} from "../../../framework/common/converter-failures";
|
||||
import { S3Score } from "./types";
|
||||
import { Playtypes, Difficulties, Grades, Lamps } from "kamaitachi-common";
|
||||
import { FindSongOnTitleInsensitive } from "../../../../common/database-lookup/song";
|
||||
import { FindChartWithPTDFVersion } from "../../../../common/database-lookup/chart";
|
||||
import { FindSongOnTitleInsensitive } from "../../../../../utils/queries/songs";
|
||||
import { FindChartWithPTDFVersion } from "../../../../../utils/queries/charts";
|
||||
import {
|
||||
GenericGetGradeAndPercent,
|
||||
ParseDateFromString,
|
||||
+6
-6
@@ -1,11 +1,11 @@
|
||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||
import t from "tap";
|
||||
import { GetMilisecondsSince } from "../../../../common/util";
|
||||
import { CloseMongoConnection } from "../../../../db/db";
|
||||
import CreateLogCtx from "../../../../common/logger";
|
||||
import { MockMulterFile } from "../../../../test-utils/mock-multer";
|
||||
import ResetDBState from "../../../../test-utils/reset-db-state";
|
||||
import { GetKTDataBuffer } from "../../../../test-utils/test-data";
|
||||
import { GetMilisecondsSince } from "../../../../../utils/misc";
|
||||
import { CloseMongoConnection } from "../../../../../external/mongo/db";
|
||||
import CreateLogCtx from "../../../../logger/logger";
|
||||
import { MockMulterFile } from "../../../../../test-utils/mock-multer";
|
||||
import ResetDBState from "../../../../../test-utils/reset-db-state";
|
||||
import { GetKTDataBuffer } from "../../../../../test-utils/test-data";
|
||||
import { ParseSolidStateXML } from "./parser";
|
||||
|
||||
const logger = CreateLogCtx(__filename);
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
import { parse as FastParseXML } from "fast-xml-parser";
|
||||
import { EmptyObject, KtLogger } from "../../../../types";
|
||||
import { EmptyObject, KtLogger } from "../../../../../utils/types";
|
||||
import ScoreImportFatalError from "../../../framework/score-importing/score-import-error";
|
||||
import p, { PrudenceSchema } from "prudence";
|
||||
import { FormatPrError } from "../../../../common/prudence";
|
||||
import { FormatPrError } from "../../../../../utils/prudence";
|
||||
import { S3Score } from "./types";
|
||||
import { ConvertFileS3 } from "./converter";
|
||||
import { ParserFunctionReturnsSync } from "../../common/types";
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
import { FindSDVXChartOnInGameID } from "../../../../common/database-lookup/chart";
|
||||
import { FindSongOnID } from "../../../../common/database-lookup/song";
|
||||
import { EmptyObject } from "../../../../types";
|
||||
import { FindSDVXChartOnInGameID } from "../../../../../utils/queries/charts";
|
||||
import { FindSongOnID } from "../../../../../utils/queries/songs";
|
||||
import { EmptyObject } from "../../../../../utils/types";
|
||||
import { GenericGetGradeAndPercent } from "../../../framework/common/score-utils";
|
||||
import {
|
||||
InternalFailure,
|
||||
+3
-2
@@ -1,7 +1,8 @@
|
||||
import { EmptyObject, KtLogger } from "../../../../types";
|
||||
import { EmptyObject } from "../../../../../utils/types";
|
||||
import { KtLogger } from "../../../../logger/logger";
|
||||
import p from "prudence";
|
||||
import ScoreImportFatalError from "../../../framework/score-importing/score-import-error";
|
||||
import { FormatPrError } from "../../../../common/prudence";
|
||||
import { FormatPrError } from "../../../../../utils/prudence";
|
||||
import { BarbatosScore } from "./types";
|
||||
import { ConverterIRBarbatos } from "./converter";
|
||||
import { ParserFunctionReturnsSync } from "../../common/types";
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import { KtLogger } from "../../../../types";
|
||||
import { KtLogger } from "../../../../logger/logger";
|
||||
import { ParseBatchManualFromObject } from "../../common/batch-manual/parser";
|
||||
import { BatchManualContext, BatchManualScore } from "../../common/batch-manual/types";
|
||||
import { ParserFunctionReturnsSync } from "../../common/types";
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user