mirror of
https://github.com/zkldi/Tachi.git
synced 2026-10-13 09:48:27 +03:00
build new config stuff
This commit is contained in:
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"esd-core.js","sourceRoot":"","sources":["../../src/common-core/esd-core.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,SAAS,GAAG,CAAC,CAAS,EAAE,IAAY,EAAE,QAAgB;IAClD,OAAO,GAAG,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;AACjE,CAAC;AAED;;;GAGG;AACH,SAAS,GAAG,CAAC,CAAS;IAClB,qBAAqB;IACrB,IAAI,IAAI,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC3B,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IAEhB,YAAY;IACZ,IAAI,EAAE,GAAG,WAAW,CAAC;IACrB,IAAI,EAAE,GAAG,CAAC,WAAW,CAAC;IACtB,IAAI,EAAE,GAAG,WAAW,CAAC;IACrB,IAAI,EAAE,GAAG,CAAC,WAAW,CAAC;IACtB,IAAI,EAAE,GAAG,WAAW,CAAC;IACrB,IAAI,CAAC,GAAG,SAAS,CAAC;IAElB,qBAAqB;IACrB,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;IAC5B,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;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AU,CAAC,EAAE,EAAE,EAAE,EAAE,IAAI,CAAC,CAAC;AACpC,CAAC;AATD,wCASC"}
|
||||
-3
@@ -1,3 +0,0 @@
|
||||
import { ScoreDocument } from "..";
|
||||
import { ICollection } from "monk";
|
||||
export declare function AutoCoerce(collection: ICollection<ScoreDocument>, scores: ScoreDocument[]): Promise<ScoreDocument[]>;
|
||||
@@ -1,55 +0,0 @@
|
||||
"use strict";
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.AutoCoerce = void 0;
|
||||
function AutoCoerce(collection, scores) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
let notPBsArr = [];
|
||||
for (const s of scores) {
|
||||
if (!s.isLampPB) {
|
||||
notPBsArr.push({
|
||||
userID: s.userID,
|
||||
chartID: s.chartID,
|
||||
isLampPB: true,
|
||||
});
|
||||
}
|
||||
}
|
||||
if (notPBsArr.length === 0) {
|
||||
return scores;
|
||||
}
|
||||
let lampPBsArr = yield collection.find({
|
||||
$or: notPBsArr,
|
||||
});
|
||||
let lampPBs = new Map();
|
||||
for (const score of lampPBsArr) {
|
||||
lampPBs.set(`${score.userID}-${score.chartID}`, score);
|
||||
}
|
||||
for (const score of scores) {
|
||||
if (!score.isLampPB) {
|
||||
let lampPB = lampPBs.get(`${score.userID}-${score.chartID}`);
|
||||
if (lampPB) {
|
||||
score.scoreData.lamp = lampPB.scoreData.lamp;
|
||||
score.scoreData.lampIndex = lampPB.scoreData.lampIndex;
|
||||
score.calculatedData.lampRating = lampPB.calculatedData.lampRating;
|
||||
// not too happy about this, this is a sign
|
||||
// of something not properly being generalised.
|
||||
if (score.game === "bms") {
|
||||
score.calculatedData.rating = lampPB.calculatedData.rating;
|
||||
}
|
||||
score.isLampPB = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return scores;
|
||||
});
|
||||
}
|
||||
exports.AutoCoerce = AutoCoerce;
|
||||
//# sourceMappingURL=score-core.js.map
|
||||
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"score-core.js","sourceRoot":"","sources":["../../src/common-core/score-core.ts"],"names":[],"mappings":";;;;;;;;;;;;AAGA,SAAsB,UAAU,CAC5B,UAAsC,EACtC,MAAuB;;QAEvB,IAAI,SAAS,GAAG,EAAE,CAAC;QAEnB,KAAK,MAAM,CAAC,IAAI,MAAM,EAAE;YACpB,IAAI,CAAC,CAAC,CAAC,QAAQ,EAAE;gBACb,SAAS,CAAC,IAAI,CAAC;oBACX,MAAM,EAAE,CAAC,CAAC,MAAM;oBAChB,OAAO,EAAE,CAAC,CAAC,OAAO;oBAClB,QAAQ,EAAE,IAAI;iBACjB,CAAC,CAAC;aACN;SACJ;QAED,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE;YACxB,OAAO,MAAM,CAAC;SACjB;QAED,IAAI,UAAU,GAAG,MAAM,UAAU,CAAC,IAAI,CAAC;YACnC,GAAG,EAAE,SAAS;SACjB,CAAC,CAAC;QAEH,IAAI,OAAO,GAA+B,IAAI,GAAG,EAAE,CAAC;QACpD,KAAK,MAAM,KAAK,IAAI,UAAU,EAAE;YAC5B,OAAO,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,OAAO,EAAE,EAAE,KAAK,CAAC,CAAC;SAC1D;QAED,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE;YACxB,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE;gBACjB,IAAI,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;gBAE7D,IAAI,MAAM,EAAE;oBACR,KAAK,CAAC,SAAS,CAAC,IAAI,GAAG,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC;oBAC7C,KAAK,CAAC,SAAS,CAAC,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC,SAAS,CAAC;oBACvD,KAAK,CAAC,cAAc,CAAC,UAAU,GAAG,MAAM,CAAC,cAAc,CAAC,UAAU,CAAC;oBAEnE,2CAA2C;oBAC3C,+CAA+C;oBAC/C,IAAI,KAAK,CAAC,IAAI,KAAK,KAAK,EAAE;wBACtB,KAAK,CAAC,cAAc,CAAC,MAAM,GAAG,MAAM,CAAC,cAAc,CAAC,MAAM,CAAC;qBAC9D;oBACD,KAAK,CAAC,QAAQ,GAAG,IAAI,CAAC;iBACzB;aACJ;SACJ;QAED,OAAO,MAAM,CAAC;IAClB,CAAC;CAAA;AAjDD,gCAiDC"}
|
||||
Vendored
-537
@@ -1,537 +0,0 @@
|
||||
import { Game, Playtypes, ImportTypes, FileUploadImportTypes, AnyChartDocument, IRImportTypes, APIImportTypes } from "./types";
|
||||
export declare const fileImportTypes: FileUploadImportTypes[];
|
||||
export declare const irImportTypes: IRImportTypes[];
|
||||
export declare const apiImportTypes: APIImportTypes[];
|
||||
export declare const importTypes: ImportTypes[];
|
||||
export declare const supportedGames: Game[];
|
||||
export declare const gameSpecificCalc: Partial<Record<Game, Partial<Record<Playtypes[Game], string[]>>>>;
|
||||
export declare const gameSpecificCalcDescriptions: {
|
||||
iidx: {
|
||||
SP: {
|
||||
BPI: string;
|
||||
"K%": string;
|
||||
};
|
||||
DP: {
|
||||
BPI: string;
|
||||
};
|
||||
};
|
||||
sdvx: {
|
||||
Single: {
|
||||
VF4: string;
|
||||
VF5: string;
|
||||
};
|
||||
};
|
||||
ddr: {
|
||||
SP: {
|
||||
MFCP: string;
|
||||
};
|
||||
DP: {
|
||||
MFCP: string;
|
||||
};
|
||||
};
|
||||
usc: {
|
||||
Single: {
|
||||
VF4: string;
|
||||
VF5: string;
|
||||
};
|
||||
};
|
||||
};
|
||||
export declare const validDifficulties: Record<Game, string[]>;
|
||||
export declare const defaultTable: Record<Game, string>;
|
||||
export declare const folderTables: Record<Game, string[]>;
|
||||
export declare const validHitData: Record<Game, string[]>;
|
||||
export declare const gameColours: Record<Game, string>;
|
||||
export declare const gameRelevantScoreBucket: Record<Game, "grade" | "lamp">;
|
||||
export declare const gameHuman: Record<Game, string>;
|
||||
export declare const versionHuman: Record<Game, Record<string, string>>;
|
||||
export declare const gameOrders: {
|
||||
iidx: string[];
|
||||
museca: string[];
|
||||
maimai: string[];
|
||||
jubeat: string[];
|
||||
popn: string[];
|
||||
sdvx: string[];
|
||||
ddr: string[];
|
||||
bms: string[];
|
||||
chunithm: string[];
|
||||
gitadora: string[];
|
||||
usc: string[];
|
||||
};
|
||||
export declare const defaultPlaytype: Record<Game, Playtypes[Game]>;
|
||||
export declare const defaultDifficulty: Record<Game, string>;
|
||||
export declare function humaniseGame<T extends Game>(game: T, pt?: Playtypes[T]): string;
|
||||
export declare const validPlaytypes: Record<Game, Playtypes[Game][]>;
|
||||
export declare const grades: Record<Game, string[]>;
|
||||
export declare const gradeBoundaries: Record<Game, number[]>;
|
||||
export declare const boundaryHCF: Record<Game, number>;
|
||||
export declare const expChartScale: Record<Game, number>;
|
||||
export declare const lamps: Record<Game, string[]>;
|
||||
export declare const clearLamp: Record<Game, string>;
|
||||
export declare const clearGrade: {
|
||||
iidx: string;
|
||||
bms: string;
|
||||
museca: string;
|
||||
maimai: string;
|
||||
jubeat: string;
|
||||
popn: string;
|
||||
sdvx: string;
|
||||
ddr: string;
|
||||
chunithm: string;
|
||||
gitadora: string;
|
||||
usc: string;
|
||||
};
|
||||
export declare const judgementWindows: {
|
||||
iidx: {
|
||||
SP: {
|
||||
name: string;
|
||||
msBorder: number;
|
||||
value: number;
|
||||
}[];
|
||||
DP: {
|
||||
name: string;
|
||||
msBorder: number;
|
||||
value: number;
|
||||
}[];
|
||||
};
|
||||
ddr: {
|
||||
SP: {
|
||||
name: string;
|
||||
msBorder: number;
|
||||
value: number;
|
||||
}[];
|
||||
DP: {
|
||||
name: string;
|
||||
msBorder: number;
|
||||
value: number;
|
||||
}[];
|
||||
};
|
||||
museca: {
|
||||
Single: {
|
||||
name: string;
|
||||
msBorder: number;
|
||||
value: number;
|
||||
}[];
|
||||
};
|
||||
gitadora: {
|
||||
Gita: {
|
||||
name: string;
|
||||
msBorder: number;
|
||||
value: number;
|
||||
}[];
|
||||
Dora: {
|
||||
name: string;
|
||||
msBorder: number;
|
||||
value: number;
|
||||
}[];
|
||||
};
|
||||
};
|
||||
export declare const COLOUR_SET: {
|
||||
gray: string;
|
||||
maroon: string;
|
||||
red: string;
|
||||
paleGreen: string;
|
||||
paleBlue: string;
|
||||
green: string;
|
||||
blue: string;
|
||||
gold: string;
|
||||
vibrantYellow: string;
|
||||
teal: string;
|
||||
white: string;
|
||||
purple: string;
|
||||
vibrantPurple: string;
|
||||
paleOrange: string;
|
||||
orange: string;
|
||||
vibrantOrange: string;
|
||||
vibrantBlue: string;
|
||||
vibrantGreen: string;
|
||||
};
|
||||
interface ColourStuff {
|
||||
[index: string]: {
|
||||
outline: Record<string, string>;
|
||||
fill?: Record<string, string>;
|
||||
};
|
||||
}
|
||||
export declare const gradeColours: ColourStuff;
|
||||
export declare const lampColours: ColourStuff;
|
||||
export declare const judgeColours: {
|
||||
iidx: {
|
||||
fill: {
|
||||
MISS: string;
|
||||
BAD: string;
|
||||
GOOD: string;
|
||||
GREAT: string;
|
||||
PGREAT: string;
|
||||
};
|
||||
outline: {
|
||||
MISS: string;
|
||||
BAD: string;
|
||||
GOOD: string;
|
||||
GREAT: string;
|
||||
PGREAT: string;
|
||||
};
|
||||
};
|
||||
bms: {
|
||||
fill: {
|
||||
MISS: string;
|
||||
BAD: string;
|
||||
GOOD: string;
|
||||
GREAT: string;
|
||||
PGREAT: string;
|
||||
};
|
||||
outline: {
|
||||
MISS: string;
|
||||
BAD: string;
|
||||
GOOD: string;
|
||||
GREAT: string;
|
||||
PGREAT: string;
|
||||
};
|
||||
};
|
||||
ddr: {
|
||||
fill: {
|
||||
MISS: string;
|
||||
BOO: string;
|
||||
GOOD: string;
|
||||
GREAT: string;
|
||||
PERFECT: string;
|
||||
MARVELOUS: string;
|
||||
};
|
||||
outline: {
|
||||
MISS: string;
|
||||
BOO: string;
|
||||
GOOD: string;
|
||||
GREAT: string;
|
||||
PERFECT: string;
|
||||
MARVELOUS: string;
|
||||
};
|
||||
};
|
||||
museca: {
|
||||
fill: {
|
||||
MISS: string;
|
||||
NEAR: string;
|
||||
CRITICAL: string;
|
||||
};
|
||||
outline: {
|
||||
MISS: string;
|
||||
NEAR: string;
|
||||
CRITICAL: string;
|
||||
};
|
||||
};
|
||||
sdvx: {
|
||||
fill: {
|
||||
MISS: string;
|
||||
NEAR: string;
|
||||
CRITICAL: string;
|
||||
};
|
||||
outline: {
|
||||
MISS: string;
|
||||
NEAR: string;
|
||||
CRITICAL: string;
|
||||
};
|
||||
};
|
||||
usc: {
|
||||
fill: {
|
||||
MISS: string;
|
||||
NEAR: string;
|
||||
CRITICAL: string;
|
||||
};
|
||||
outline: {
|
||||
MISS: string;
|
||||
NEAR: string;
|
||||
CRITICAL: string;
|
||||
};
|
||||
};
|
||||
popn: {
|
||||
fill: {
|
||||
BAD: string;
|
||||
GOOD: string;
|
||||
GREAT: string;
|
||||
PGREAT: string;
|
||||
};
|
||||
outline: {
|
||||
BAD: string;
|
||||
GOOD: string;
|
||||
GREAT: string;
|
||||
PGREAT: string;
|
||||
};
|
||||
};
|
||||
maimai: {
|
||||
fill: {
|
||||
MISS: string;
|
||||
GOOD: string;
|
||||
GREAT: string;
|
||||
PERFECT: string;
|
||||
};
|
||||
outline: {
|
||||
MISS: string;
|
||||
GOOD: string;
|
||||
GREAT: string;
|
||||
PERFECT: string;
|
||||
};
|
||||
};
|
||||
jubeat: {
|
||||
fill: {
|
||||
MISS: string;
|
||||
POOR: string;
|
||||
GOOD: string;
|
||||
GREAT: string;
|
||||
PERFECT: string;
|
||||
};
|
||||
outline: {
|
||||
MISS: string;
|
||||
POOR: string;
|
||||
GOOD: string;
|
||||
GREAT: string;
|
||||
PERFECT: string;
|
||||
};
|
||||
};
|
||||
chunithm: {
|
||||
outline: {
|
||||
MISS: string;
|
||||
ATTACK: string;
|
||||
JUSTICE: string;
|
||||
JCRIT: string;
|
||||
};
|
||||
fill: {
|
||||
MISS: string;
|
||||
ATTACK: string;
|
||||
JUSTICE: string;
|
||||
JCRIT: string;
|
||||
};
|
||||
};
|
||||
gitadora: {
|
||||
outline: {
|
||||
MISS: string;
|
||||
OK: string;
|
||||
GOOD: string;
|
||||
GREAT: string;
|
||||
PERFECT: string;
|
||||
};
|
||||
fill: {
|
||||
MISS: string;
|
||||
OK: string;
|
||||
GOOD: string;
|
||||
GREAT: string;
|
||||
PERFECT: string;
|
||||
};
|
||||
};
|
||||
};
|
||||
export declare const gameChartIndicators: {
|
||||
iidx: string[];
|
||||
popn: string[];
|
||||
ddr: string[];
|
||||
museca: never[];
|
||||
maimai: never[];
|
||||
jubeat: string[];
|
||||
sdvx: never[];
|
||||
usc: never[];
|
||||
bms: never[];
|
||||
chunithm: never[];
|
||||
gitadora: never[];
|
||||
};
|
||||
export declare const ratingParameters: {
|
||||
iidx: {
|
||||
failHarshnessMultiplier: number;
|
||||
pivotPercent: number;
|
||||
clearExpMultiplier: number;
|
||||
};
|
||||
bms: {
|
||||
failHarshnessMultiplier: number;
|
||||
pivotPercent: number;
|
||||
clearExpMultiplier: number;
|
||||
};
|
||||
museca: {
|
||||
failHarshnessMultiplier: number;
|
||||
pivotPercent: number;
|
||||
clearExpMultiplier: number;
|
||||
};
|
||||
popn: {
|
||||
failHarshnessMultiplier: number;
|
||||
pivotPercent: number;
|
||||
clearExpMultiplier: number;
|
||||
};
|
||||
maimai: {
|
||||
failHarshnessMultiplier: number;
|
||||
pivotPercent: number;
|
||||
clearExpMultiplier: number;
|
||||
};
|
||||
jubeat: {
|
||||
failHarshnessMultiplier: number;
|
||||
pivotPercent: number;
|
||||
clearExpMultiplier: number;
|
||||
};
|
||||
sdvx: {
|
||||
failHarshnessMultiplier: number;
|
||||
pivotPercent: number;
|
||||
clearExpMultiplier: number;
|
||||
};
|
||||
usc: {
|
||||
failHarshnessMultiplier: number;
|
||||
pivotPercent: number;
|
||||
clearExpMultiplier: number;
|
||||
};
|
||||
ddr: {
|
||||
failHarshnessMultiplier: number;
|
||||
pivotPercent: number;
|
||||
clearExpMultiplier: number;
|
||||
};
|
||||
chunithm: {
|
||||
failHarshnessMultiplier: number;
|
||||
pivotPercent: number;
|
||||
clearExpMultiplier: number;
|
||||
};
|
||||
gitadora: {
|
||||
failHarshnessMultiplier: number;
|
||||
pivotPercent: number;
|
||||
clearExpMultiplier: number;
|
||||
};
|
||||
};
|
||||
export declare function DirectScoreGradeDelta(game: Game, score: number, percent: number, chart: AnyChartDocument, delta: number): SGDReturn | null;
|
||||
export declare const supportsESD: Record<Game, boolean>;
|
||||
interface SGDReturn {
|
||||
grade: string;
|
||||
delta: number;
|
||||
formattedString: string;
|
||||
}
|
||||
interface PartialScore {
|
||||
scoreData: {
|
||||
score: number;
|
||||
grade: string;
|
||||
};
|
||||
}
|
||||
export declare function ScoreGradeDelta(game: Game, score: PartialScore, chart: AnyChartDocument, delta: number): SGDReturn | null;
|
||||
export declare function AbsoluteScoreGradeDelta(game: Game, score: number, percent: number, absDelta: number): SGDReturn | null;
|
||||
export declare function CalculateScore(game: Game, percent: number, chart: AnyChartDocument): number | null;
|
||||
export declare function PercentToScore(percent: number, game: Game, chartData: AnyChartDocument): number;
|
||||
export declare function FormatDifficulty(chart: AnyChartDocument, game: Game): string;
|
||||
export declare const gamePercentMax: {
|
||||
iidx: number;
|
||||
ddr: number;
|
||||
gitadora: number;
|
||||
popn: number;
|
||||
sdvx: number;
|
||||
museca: number;
|
||||
jubeat: number;
|
||||
bms: number;
|
||||
chunithm: number;
|
||||
maimai: number;
|
||||
maimaidx: number;
|
||||
usc: number;
|
||||
};
|
||||
export declare const defaultRatingAlgorithm: {
|
||||
iidx: {
|
||||
SP: string;
|
||||
DP: string;
|
||||
};
|
||||
popn: {
|
||||
"9B": string;
|
||||
};
|
||||
sdvx: {
|
||||
Single: string;
|
||||
};
|
||||
usc: {
|
||||
Single: string;
|
||||
};
|
||||
ddr: {
|
||||
SP: string;
|
||||
DP: string;
|
||||
};
|
||||
maimai: {
|
||||
Single: string;
|
||||
};
|
||||
jubeat: {
|
||||
Single: string;
|
||||
};
|
||||
museca: {
|
||||
Single: string;
|
||||
};
|
||||
bms: {
|
||||
"7K": string;
|
||||
"14K": string;
|
||||
};
|
||||
chunithm: {
|
||||
Single: string;
|
||||
};
|
||||
gitadora: {
|
||||
Gita: string;
|
||||
Dora: string;
|
||||
};
|
||||
};
|
||||
export declare const defaultScoreRatingAlgorithm: {
|
||||
iidx: {
|
||||
SP: string;
|
||||
DP: string;
|
||||
};
|
||||
popn: {
|
||||
"9B": string;
|
||||
};
|
||||
sdvx: {
|
||||
Single: string;
|
||||
};
|
||||
usc: {
|
||||
Single: string;
|
||||
};
|
||||
ddr: {
|
||||
SP: string;
|
||||
DP: string;
|
||||
};
|
||||
maimai: {
|
||||
Single: string;
|
||||
};
|
||||
jubeat: {
|
||||
Single: string;
|
||||
};
|
||||
museca: {
|
||||
Single: string;
|
||||
};
|
||||
bms: {
|
||||
"7K": string;
|
||||
"14K": string;
|
||||
};
|
||||
chunithm: {
|
||||
Single: string;
|
||||
};
|
||||
gitadora: {
|
||||
Gita: string;
|
||||
Dora: string;
|
||||
};
|
||||
};
|
||||
export declare const defaultSessionRatingAlgorithm: {
|
||||
iidx: {
|
||||
SP: string;
|
||||
DP: string;
|
||||
};
|
||||
popn: {
|
||||
"9B": string;
|
||||
};
|
||||
sdvx: {
|
||||
Single: string;
|
||||
};
|
||||
usc: {
|
||||
Single: string;
|
||||
};
|
||||
ddr: {
|
||||
SP: string;
|
||||
DP: string;
|
||||
};
|
||||
maimai: {
|
||||
Single: string;
|
||||
};
|
||||
jubeat: {
|
||||
Single: string;
|
||||
};
|
||||
museca: {
|
||||
Single: string;
|
||||
};
|
||||
bms: {
|
||||
"7K": string;
|
||||
"14K": string;
|
||||
};
|
||||
chunithm: {
|
||||
Single: string;
|
||||
};
|
||||
gitadora: {
|
||||
Gita: string;
|
||||
Dora: string;
|
||||
};
|
||||
};
|
||||
export {};
|
||||
-1584
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
Vendored
+71
@@ -0,0 +1,71 @@
|
||||
import { ESDJudgementFormat } from "../lib/esd";
|
||||
import { Playtypes, Game, Difficulties, IDStrings, ScoreCalculatedDataLookup, SessionCalculatedDataLookup, UGSRatingsLookup, Grades, Lamps } from "../types";
|
||||
export interface GameConfig<G extends Game = Game> {
|
||||
internalName: string;
|
||||
name: string;
|
||||
defaultPlaytype: Playtypes[G];
|
||||
validPlaytypes: Playtypes[G][];
|
||||
}
|
||||
interface BaseGamePTConfig<I extends IDStrings> {
|
||||
idString: I;
|
||||
percentMax: number;
|
||||
defaultScoreRatingAlg: ScoreCalculatedDataLookup[I];
|
||||
defaultSessionRatingAlg: SessionCalculatedDataLookup[I];
|
||||
defaultProfileRatingAlg: UGSRatingsLookup[I];
|
||||
difficulties: Difficulties[I][];
|
||||
defaultDifficulty: Difficulties[I];
|
||||
difficultyColours: Record<Difficulties[I], string | null>;
|
||||
grades: Grades[I][];
|
||||
gradeColours: Record<Grades[I], string>;
|
||||
clearGrade: Grades[I];
|
||||
gradeBoundaries: number[];
|
||||
lamps: Lamps[I][];
|
||||
lampColours: Record<Lamps[I], string>;
|
||||
clearLamp: Lamps[I];
|
||||
supportsESD: boolean;
|
||||
judgementWindows?: ESDJudgementFormat[];
|
||||
defaultTable: string;
|
||||
scoreBucket: "grade" | "lamp";
|
||||
}
|
||||
interface GamePTConfigWithESD<I extends IDStrings> extends BaseGamePTConfig<I> {
|
||||
supportsESD: true;
|
||||
judgementWindows: ESDJudgementFormat[];
|
||||
}
|
||||
interface GamePTConfigWithoutESD<I extends IDStrings> extends BaseGamePTConfig<I> {
|
||||
supportsESD: false;
|
||||
}
|
||||
export declare type GamePTConfig<I extends IDStrings = IDStrings> = GamePTConfigWithESD<I> | GamePTConfigWithoutESD<I>;
|
||||
/**
|
||||
* A collection of CSS colours we want to work with.
|
||||
*/
|
||||
export declare const COLOUR_SET: {
|
||||
gray: string;
|
||||
maroon: string;
|
||||
red: string;
|
||||
paleGreen: string;
|
||||
paleBlue: string;
|
||||
green: string;
|
||||
blue: string;
|
||||
gold: string;
|
||||
vibrantYellow: string;
|
||||
teal: string;
|
||||
white: string;
|
||||
purple: string;
|
||||
vibrantPurple: string;
|
||||
paleOrange: string;
|
||||
orange: string;
|
||||
vibrantOrange: string;
|
||||
vibrantBlue: string;
|
||||
vibrantGreen: string;
|
||||
};
|
||||
/**
|
||||
* Returns the configuration for this game.
|
||||
*/
|
||||
export declare function GetGameConfig<G extends Game>(game: G): GameConfig<G>;
|
||||
/**
|
||||
* Returns the configuration for this Game + Playtype.
|
||||
* Optionally, a generic parameter - IDStrings - can be passed
|
||||
* to indicate what IDString this configuration is for.
|
||||
*/
|
||||
export declare function GetGamePTConfig<I extends IDStrings = IDStrings>(game: Game, playtype: Playtypes[Game]): GamePTConfig<I>;
|
||||
export {};
|
||||
@@ -0,0 +1,820 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.GetGamePTConfig = exports.GetGameConfig = exports.COLOUR_SET = void 0;
|
||||
/**
|
||||
* A collection of CSS colours we want to work with.
|
||||
*/
|
||||
exports.COLOUR_SET = {
|
||||
gray: "rgba(105, 105, 105, 1)",
|
||||
maroon: "rgba(85, 17, 17, 1)",
|
||||
red: "rgba(170, 85, 85, 1)",
|
||||
paleGreen: "rgba(142,174,79, 1)",
|
||||
paleBlue: "rgba(92, 97, 153, 1)",
|
||||
green: "rgba(50, 205, 50, 1)",
|
||||
blue: "rgba(70, 130, 180, 1)",
|
||||
gold: "rgba(255, 215, 0, 1)",
|
||||
vibrantYellow: "rgba(245, 229, 27, 1)",
|
||||
teal: "rgba(127, 255, 212, 1)",
|
||||
white: "rgba(192, 192, 192, 1)",
|
||||
purple: "rgba(153, 50, 204, 1)",
|
||||
vibrantPurple: "rgba(161, 23, 230, 1)",
|
||||
paleOrange: "rgba(235, 151, 78, 1)",
|
||||
orange: "rgba(248, 148, 6, 1)",
|
||||
vibrantOrange: "rgba(248, 175, 6, 1)",
|
||||
vibrantBlue: "rgba(43, 149, 237, 1)",
|
||||
vibrantGreen: "rgba(26, 232, 26, 1)",
|
||||
};
|
||||
const GAME_CONFIGS = {
|
||||
iidx: {
|
||||
defaultPlaytype: "SP",
|
||||
name: "beatmania IIDX",
|
||||
internalName: "iidx",
|
||||
validPlaytypes: ["SP", "DP"],
|
||||
},
|
||||
museca: {
|
||||
defaultPlaytype: "Single",
|
||||
name: "MÚSECA",
|
||||
internalName: "museca",
|
||||
validPlaytypes: ["Single"],
|
||||
},
|
||||
chunithm: {
|
||||
defaultPlaytype: "Single",
|
||||
name: "CHUNITHM",
|
||||
internalName: "chunithm",
|
||||
validPlaytypes: ["Single"],
|
||||
},
|
||||
ddr: {
|
||||
defaultPlaytype: "SP",
|
||||
name: "DDR",
|
||||
internalName: "ddr",
|
||||
validPlaytypes: ["SP", "DP"],
|
||||
},
|
||||
bms: {
|
||||
defaultPlaytype: "7K",
|
||||
name: "BMS",
|
||||
internalName: "bms",
|
||||
validPlaytypes: ["7K", "14K"],
|
||||
},
|
||||
gitadora: {
|
||||
defaultPlaytype: "Dora",
|
||||
name: "GITADORA",
|
||||
internalName: "gitadora",
|
||||
validPlaytypes: ["Gita", "Dora"],
|
||||
},
|
||||
// jubeat: {
|
||||
// defaultPlaytype: "Single",
|
||||
// name: "jubeat",
|
||||
// internalName: "jubeat",
|
||||
// validPlaytypes: ["Single"],
|
||||
// },
|
||||
maimai: {
|
||||
defaultPlaytype: "Single",
|
||||
name: "maimai",
|
||||
internalName: "maimai",
|
||||
validPlaytypes: ["Single"],
|
||||
},
|
||||
// popn: {
|
||||
// defaultPlaytype: "9B",
|
||||
// name: "pop'n music",
|
||||
// internalName: "popn", // note: KAI servers use pnm as a name.
|
||||
// validPlaytypes: ["9B"],
|
||||
// },
|
||||
sdvx: {
|
||||
defaultPlaytype: "Single",
|
||||
name: "SOUND VOLTEX",
|
||||
internalName: "sdvx",
|
||||
validPlaytypes: ["Single"],
|
||||
},
|
||||
usc: {
|
||||
defaultPlaytype: "Single",
|
||||
name: "unnamed_sdvx_clone",
|
||||
internalName: "usc",
|
||||
validPlaytypes: ["Single"],
|
||||
},
|
||||
};
|
||||
const GAME_PT_CONFIGS = {
|
||||
"iidx:SP": {
|
||||
idString: "iidx:SP",
|
||||
percentMax: 100,
|
||||
defaultScoreRatingAlg: "ktRating",
|
||||
defaultSessionRatingAlg: "ktRating",
|
||||
defaultProfileRatingAlg: "ktRating",
|
||||
difficulties: ["BEGINNER", "NORMAL", "HYPER", "ANOTHER", "LEGGENDARIA"],
|
||||
defaultDifficulty: "ANOTHER",
|
||||
difficultyColours: {
|
||||
BEGINNER: exports.COLOUR_SET.paleGreen,
|
||||
NORMAL: exports.COLOUR_SET.blue,
|
||||
HYPER: exports.COLOUR_SET.orange,
|
||||
ANOTHER: exports.COLOUR_SET.red,
|
||||
LEGGENDARIA: exports.COLOUR_SET.purple,
|
||||
},
|
||||
grades: ["F", "E", "D", "C", "B", "A", "AA", "AAA", "MAX-", "MAX"],
|
||||
gradeColours: {
|
||||
F: exports.COLOUR_SET.gray,
|
||||
E: exports.COLOUR_SET.red,
|
||||
D: exports.COLOUR_SET.maroon,
|
||||
C: exports.COLOUR_SET.purple,
|
||||
B: exports.COLOUR_SET.paleBlue,
|
||||
A: exports.COLOUR_SET.green,
|
||||
AA: exports.COLOUR_SET.blue,
|
||||
AAA: exports.COLOUR_SET.gold,
|
||||
"MAX-": exports.COLOUR_SET.teal,
|
||||
MAX: exports.COLOUR_SET.white,
|
||||
},
|
||||
clearGrade: "A",
|
||||
gradeBoundaries: [0, 22.22, 33.33, 44.44, 55.55, 66.66, 77.77, 88.88, 94.44, 100.0],
|
||||
lamps: [
|
||||
"NO PLAY",
|
||||
"FAILED",
|
||||
"ASSIST CLEAR",
|
||||
"EASY CLEAR",
|
||||
"CLEAR",
|
||||
"HARD CLEAR",
|
||||
"EX HARD CLEAR",
|
||||
"FULL COMBO",
|
||||
],
|
||||
lampColours: {
|
||||
"NO PLAY": exports.COLOUR_SET.gray,
|
||||
FAILED: exports.COLOUR_SET.red,
|
||||
"ASSIST CLEAR": exports.COLOUR_SET.purple,
|
||||
"EASY CLEAR": exports.COLOUR_SET.green,
|
||||
CLEAR: exports.COLOUR_SET.blue,
|
||||
"HARD CLEAR": exports.COLOUR_SET.orange,
|
||||
"EX HARD CLEAR": exports.COLOUR_SET.gold,
|
||||
"FULL COMBO": exports.COLOUR_SET.teal,
|
||||
},
|
||||
clearLamp: "CLEAR",
|
||||
supportsESD: true,
|
||||
judgementWindows: [
|
||||
{ name: "PGREAT", msBorder: 16.667, value: 2 },
|
||||
{ name: "GREAT", msBorder: 33.333, value: 1 },
|
||||
{ name: "GOOD", msBorder: 116.667, value: 0 },
|
||||
],
|
||||
defaultTable: "Levels (N-1)",
|
||||
scoreBucket: "lamp",
|
||||
},
|
||||
"iidx:DP": {
|
||||
idString: "iidx:DP",
|
||||
percentMax: 100,
|
||||
defaultScoreRatingAlg: "ktRating",
|
||||
defaultSessionRatingAlg: "ktRating",
|
||||
defaultProfileRatingAlg: "ktRating",
|
||||
difficulties: ["NORMAL", "HYPER", "ANOTHER", "LEGGENDARIA"],
|
||||
defaultDifficulty: "ANOTHER",
|
||||
difficultyColours: {
|
||||
NORMAL: exports.COLOUR_SET.blue,
|
||||
HYPER: exports.COLOUR_SET.orange,
|
||||
ANOTHER: exports.COLOUR_SET.red,
|
||||
LEGGENDARIA: exports.COLOUR_SET.purple,
|
||||
},
|
||||
grades: ["F", "E", "D", "C", "B", "A", "AA", "AAA", "MAX-", "MAX"],
|
||||
gradeColours: {
|
||||
F: exports.COLOUR_SET.gray,
|
||||
E: exports.COLOUR_SET.red,
|
||||
D: exports.COLOUR_SET.maroon,
|
||||
C: exports.COLOUR_SET.purple,
|
||||
B: exports.COLOUR_SET.paleBlue,
|
||||
A: exports.COLOUR_SET.green,
|
||||
AA: exports.COLOUR_SET.blue,
|
||||
AAA: exports.COLOUR_SET.gold,
|
||||
"MAX-": exports.COLOUR_SET.teal,
|
||||
MAX: exports.COLOUR_SET.white,
|
||||
},
|
||||
clearGrade: "A",
|
||||
gradeBoundaries: [0, 22.22, 33.33, 44.44, 55.55, 66.66, 77.77, 88.88, 94.44, 100.0],
|
||||
lamps: [
|
||||
"NO PLAY",
|
||||
"FAILED",
|
||||
"ASSIST CLEAR",
|
||||
"EASY CLEAR",
|
||||
"CLEAR",
|
||||
"HARD CLEAR",
|
||||
"EX HARD CLEAR",
|
||||
"FULL COMBO",
|
||||
],
|
||||
lampColours: {
|
||||
"NO PLAY": exports.COLOUR_SET.gray,
|
||||
FAILED: exports.COLOUR_SET.red,
|
||||
"ASSIST CLEAR": exports.COLOUR_SET.purple,
|
||||
"EASY CLEAR": exports.COLOUR_SET.green,
|
||||
CLEAR: exports.COLOUR_SET.blue,
|
||||
"HARD CLEAR": exports.COLOUR_SET.orange,
|
||||
"EX HARD CLEAR": exports.COLOUR_SET.gold,
|
||||
"FULL COMBO": exports.COLOUR_SET.teal,
|
||||
},
|
||||
clearLamp: "CLEAR",
|
||||
supportsESD: true,
|
||||
judgementWindows: [
|
||||
{ name: "PGREAT", msBorder: 16.667, value: 2 },
|
||||
{ name: "GREAT", msBorder: 33.333, value: 1 },
|
||||
{ name: "GOOD", msBorder: 116.667, value: 0 },
|
||||
],
|
||||
defaultTable: "Levels (N-1)",
|
||||
scoreBucket: "lamp",
|
||||
},
|
||||
"chunithm:Single": {
|
||||
idString: "chunithm:Single",
|
||||
percentMax: 101,
|
||||
defaultScoreRatingAlg: "rating",
|
||||
defaultSessionRatingAlg: "rating",
|
||||
defaultProfileRatingAlg: "naiveRating",
|
||||
difficulties: ["BASIC", "ADVANCED", "EXPERT", "MASTER", "WORLD'S END"],
|
||||
defaultDifficulty: "MASTER",
|
||||
difficultyColours: {
|
||||
BASIC: exports.COLOUR_SET.blue,
|
||||
ADVANCED: exports.COLOUR_SET.orange,
|
||||
EXPERT: exports.COLOUR_SET.red,
|
||||
MASTER: exports.COLOUR_SET.purple,
|
||||
"WORLD'S END": exports.COLOUR_SET.vibrantYellow,
|
||||
},
|
||||
grades: ["D", "C", "B", "BB", "BBB", "A", "AA", "AAA", "S", "SS", "SSS"],
|
||||
gradeColours: {
|
||||
D: exports.COLOUR_SET.red,
|
||||
C: exports.COLOUR_SET.purple,
|
||||
B: exports.COLOUR_SET.paleBlue,
|
||||
BB: exports.COLOUR_SET.blue,
|
||||
BBB: exports.COLOUR_SET.vibrantBlue,
|
||||
A: exports.COLOUR_SET.paleGreen,
|
||||
AA: exports.COLOUR_SET.green,
|
||||
AAA: exports.COLOUR_SET.vibrantGreen,
|
||||
S: exports.COLOUR_SET.vibrantOrange,
|
||||
SS: exports.COLOUR_SET.vibrantYellow,
|
||||
SSS: exports.COLOUR_SET.teal,
|
||||
},
|
||||
clearGrade: "A",
|
||||
gradeBoundaries: [0, 50, 60, 70, 80, 90, 92.5, 95.0, 97.5, 100, 107.5, 101],
|
||||
lamps: ["FAILED", "CLEAR", "FULL COMBO", "ALL JUSTICE", "ALL JUSTICE CRITICAL"],
|
||||
lampColours: {
|
||||
FAILED: exports.COLOUR_SET.red,
|
||||
CLEAR: exports.COLOUR_SET.paleGreen,
|
||||
"FULL COMBO": exports.COLOUR_SET.paleBlue,
|
||||
"ALL JUSTICE": exports.COLOUR_SET.gold,
|
||||
"ALL JUSTICE CRITICAL": exports.COLOUR_SET.white,
|
||||
},
|
||||
clearLamp: "CLEAR",
|
||||
supportsESD: false,
|
||||
defaultTable: "Levels (N-1)",
|
||||
scoreBucket: "grade",
|
||||
},
|
||||
"sdvx:Single": {
|
||||
idString: "sdvx:Single",
|
||||
percentMax: 100,
|
||||
defaultScoreRatingAlg: "VF6",
|
||||
defaultSessionRatingAlg: "ProfileVF6",
|
||||
defaultProfileRatingAlg: "VF6",
|
||||
difficulties: ["NOV", "ADV", "EXH", "INF", "GRV", "HVN", "VVD", "MXM"],
|
||||
defaultDifficulty: "EXH",
|
||||
difficultyColours: {
|
||||
NOV: exports.COLOUR_SET.purple,
|
||||
ADV: exports.COLOUR_SET.vibrantYellow,
|
||||
EXH: exports.COLOUR_SET.red,
|
||||
INF: "TODO",
|
||||
GRV: exports.COLOUR_SET.orange,
|
||||
HVN: exports.COLOUR_SET.teal,
|
||||
VVD: "TODO",
|
||||
MXM: exports.COLOUR_SET.white,
|
||||
},
|
||||
grades: ["D", "C", "B", "A", "A+", "AA", "AA+", "AAA", "AAA+", "S"],
|
||||
gradeColours: {
|
||||
D: exports.COLOUR_SET.gray,
|
||||
C: exports.COLOUR_SET.red,
|
||||
B: exports.COLOUR_SET.maroon,
|
||||
A: exports.COLOUR_SET.paleBlue,
|
||||
"A+": exports.COLOUR_SET.blue,
|
||||
AA: exports.COLOUR_SET.paleGreen,
|
||||
"AA+": exports.COLOUR_SET.green,
|
||||
AAA: exports.COLOUR_SET.gold,
|
||||
"AAA+": exports.COLOUR_SET.vibrantYellow,
|
||||
S: exports.COLOUR_SET.teal,
|
||||
},
|
||||
clearGrade: "A",
|
||||
gradeBoundaries: [0, 70, 80, 87, 90, 93, 95, 97, 98, 99],
|
||||
lamps: ["FAILED", "CLEAR", "EXCESSIVE CLEAR", "ULTIMATE CHAIN", "PERFECT ULTIMATE CHAIN"],
|
||||
lampColours: {
|
||||
FAILED: exports.COLOUR_SET.red,
|
||||
CLEAR: exports.COLOUR_SET.green,
|
||||
"EXCESSIVE CLEAR": exports.COLOUR_SET.orange,
|
||||
"ULTIMATE CHAIN": exports.COLOUR_SET.teal,
|
||||
"PERFECT ULTIMATE CHAIN": exports.COLOUR_SET.gold,
|
||||
},
|
||||
clearLamp: "CLEAR",
|
||||
supportsESD: false,
|
||||
defaultTable: "Levels (N-1)",
|
||||
scoreBucket: "grade",
|
||||
},
|
||||
"usc:Single": {
|
||||
idString: "usc:Single",
|
||||
percentMax: 100,
|
||||
defaultScoreRatingAlg: "VF6",
|
||||
defaultSessionRatingAlg: "ProfileVF6",
|
||||
defaultProfileRatingAlg: "VF6",
|
||||
difficulties: ["NOV", "ADV", "EXH", "INF"],
|
||||
defaultDifficulty: "EXH",
|
||||
difficultyColours: {
|
||||
NOV: exports.COLOUR_SET.purple,
|
||||
ADV: exports.COLOUR_SET.vibrantYellow,
|
||||
EXH: exports.COLOUR_SET.red,
|
||||
INF: "TODO", // colour set light pink
|
||||
},
|
||||
grades: ["D", "C", "B", "A", "A+", "AA", "AA+", "AAA", "AAA+", "S"],
|
||||
gradeColours: {
|
||||
D: exports.COLOUR_SET.gray,
|
||||
C: exports.COLOUR_SET.red,
|
||||
B: exports.COLOUR_SET.maroon,
|
||||
A: exports.COLOUR_SET.paleBlue,
|
||||
"A+": exports.COLOUR_SET.blue,
|
||||
AA: exports.COLOUR_SET.paleGreen,
|
||||
"AA+": exports.COLOUR_SET.green,
|
||||
AAA: exports.COLOUR_SET.gold,
|
||||
"AAA+": exports.COLOUR_SET.vibrantYellow,
|
||||
S: exports.COLOUR_SET.teal,
|
||||
},
|
||||
clearGrade: "A",
|
||||
gradeBoundaries: [0, 70, 80, 87, 90, 93, 95, 97, 98, 99],
|
||||
lamps: ["FAILED", "CLEAR", "EXCESSIVE CLEAR", "ULTIMATE CHAIN", "PERFECT ULTIMATE CHAIN"],
|
||||
lampColours: {
|
||||
FAILED: exports.COLOUR_SET.red,
|
||||
CLEAR: exports.COLOUR_SET.green,
|
||||
"EXCESSIVE CLEAR": exports.COLOUR_SET.orange,
|
||||
"ULTIMATE CHAIN": exports.COLOUR_SET.teal,
|
||||
"PERFECT ULTIMATE CHAIN": exports.COLOUR_SET.gold,
|
||||
},
|
||||
clearLamp: "CLEAR",
|
||||
supportsESD: false,
|
||||
defaultTable: "Levels (N-1)",
|
||||
scoreBucket: "grade",
|
||||
},
|
||||
"museca:Single": {
|
||||
idString: "museca:Single",
|
||||
percentMax: 100,
|
||||
defaultScoreRatingAlg: "ktRating",
|
||||
defaultSessionRatingAlg: "ktRating",
|
||||
defaultProfileRatingAlg: "ktRating",
|
||||
difficulties: ["Green", "Yellow", "Red"],
|
||||
defaultDifficulty: "Red",
|
||||
difficultyColours: {
|
||||
Green: exports.COLOUR_SET.green,
|
||||
Yellow: exports.COLOUR_SET.vibrantYellow,
|
||||
Red: exports.COLOUR_SET.red,
|
||||
},
|
||||
grades: ["没", "拙", "凡", "佳", "良", "優", "秀", "傑", "傑G"],
|
||||
gradeColours: {
|
||||
没: exports.COLOUR_SET.gray,
|
||||
拙: exports.COLOUR_SET.maroon,
|
||||
凡: exports.COLOUR_SET.red,
|
||||
佳: exports.COLOUR_SET.paleGreen,
|
||||
良: exports.COLOUR_SET.paleBlue,
|
||||
優: exports.COLOUR_SET.green,
|
||||
秀: exports.COLOUR_SET.blue,
|
||||
傑: exports.COLOUR_SET.teal,
|
||||
傑G: exports.COLOUR_SET.gold,
|
||||
},
|
||||
clearGrade: "良",
|
||||
gradeBoundaries: [0, 60, 70, 80, 85, 90, 95, 97.5, 100],
|
||||
lamps: ["FAILED", "CLEAR", "CONNECT ALL", "PERFECT CONNECT ALL"],
|
||||
lampColours: {
|
||||
FAILED: exports.COLOUR_SET.red,
|
||||
CLEAR: exports.COLOUR_SET.green,
|
||||
"CONNECT ALL": exports.COLOUR_SET.teal,
|
||||
"PERFECT CONNECT ALL": exports.COLOUR_SET.gold,
|
||||
},
|
||||
clearLamp: "CLEAR",
|
||||
supportsESD: true,
|
||||
judgementWindows: [
|
||||
{ name: "CRITICAL", msBorder: 33.333, value: 2 },
|
||||
{ name: "NEAR", msBorder: 66.667, value: 1 },
|
||||
],
|
||||
defaultTable: "Levels (N-1)",
|
||||
scoreBucket: "grade",
|
||||
},
|
||||
"bms:7K": {
|
||||
idString: "bms:7K",
|
||||
percentMax: 100,
|
||||
defaultScoreRatingAlg: "ktLampRating",
|
||||
defaultSessionRatingAlg: "ktLampRating",
|
||||
defaultProfileRatingAlg: "ktLampRating",
|
||||
difficulties: ["CHART"],
|
||||
defaultDifficulty: "CHART",
|
||||
difficultyColours: {
|
||||
CHART: null,
|
||||
},
|
||||
grades: ["F", "E", "D", "C", "B", "A", "AA", "AAA", "MAX-", "MAX"],
|
||||
gradeColours: {
|
||||
F: exports.COLOUR_SET.gray,
|
||||
E: exports.COLOUR_SET.red,
|
||||
D: exports.COLOUR_SET.maroon,
|
||||
C: exports.COLOUR_SET.purple,
|
||||
B: exports.COLOUR_SET.paleBlue,
|
||||
A: exports.COLOUR_SET.green,
|
||||
AA: exports.COLOUR_SET.blue,
|
||||
AAA: exports.COLOUR_SET.gold,
|
||||
"MAX-": exports.COLOUR_SET.teal,
|
||||
MAX: exports.COLOUR_SET.white,
|
||||
},
|
||||
clearGrade: "A",
|
||||
gradeBoundaries: [0, 22.22, 33.33, 44.44, 55.55, 66.66, 77.77, 88.88, 94.44, 100.0],
|
||||
lamps: [
|
||||
"NO PLAY",
|
||||
"FAILED",
|
||||
"ASSIST CLEAR",
|
||||
"EASY CLEAR",
|
||||
"CLEAR",
|
||||
"HARD CLEAR",
|
||||
"EX HARD CLEAR",
|
||||
"FULL COMBO",
|
||||
],
|
||||
lampColours: {
|
||||
"NO PLAY": exports.COLOUR_SET.gray,
|
||||
FAILED: exports.COLOUR_SET.red,
|
||||
"ASSIST CLEAR": exports.COLOUR_SET.purple,
|
||||
"EASY CLEAR": exports.COLOUR_SET.green,
|
||||
CLEAR: exports.COLOUR_SET.blue,
|
||||
"HARD CLEAR": exports.COLOUR_SET.orange,
|
||||
"EX HARD CLEAR": exports.COLOUR_SET.gold,
|
||||
"FULL COMBO": exports.COLOUR_SET.teal,
|
||||
},
|
||||
clearLamp: "CLEAR",
|
||||
supportsESD: false,
|
||||
defaultTable: "Insane",
|
||||
scoreBucket: "lamp",
|
||||
},
|
||||
"bms:14K": {
|
||||
idString: "bms:14K",
|
||||
percentMax: 100,
|
||||
defaultScoreRatingAlg: "ktLampRating",
|
||||
defaultSessionRatingAlg: "ktLampRating",
|
||||
defaultProfileRatingAlg: "ktLampRating",
|
||||
difficulties: ["CHART"],
|
||||
defaultDifficulty: "CHART",
|
||||
difficultyColours: {
|
||||
CHART: null,
|
||||
},
|
||||
grades: ["F", "E", "D", "C", "B", "A", "AA", "AAA", "MAX-", "MAX"],
|
||||
gradeColours: {
|
||||
F: exports.COLOUR_SET.gray,
|
||||
E: exports.COLOUR_SET.red,
|
||||
D: exports.COLOUR_SET.maroon,
|
||||
C: exports.COLOUR_SET.purple,
|
||||
B: exports.COLOUR_SET.paleBlue,
|
||||
A: exports.COLOUR_SET.green,
|
||||
AA: exports.COLOUR_SET.blue,
|
||||
AAA: exports.COLOUR_SET.gold,
|
||||
"MAX-": exports.COLOUR_SET.teal,
|
||||
MAX: exports.COLOUR_SET.white,
|
||||
},
|
||||
clearGrade: "A",
|
||||
gradeBoundaries: [0, 22.22, 33.33, 44.44, 55.55, 66.66, 77.77, 88.88, 94.44, 100.0],
|
||||
lamps: [
|
||||
"NO PLAY",
|
||||
"FAILED",
|
||||
"ASSIST CLEAR",
|
||||
"EASY CLEAR",
|
||||
"CLEAR",
|
||||
"HARD CLEAR",
|
||||
"EX HARD CLEAR",
|
||||
"FULL COMBO",
|
||||
],
|
||||
lampColours: {
|
||||
"NO PLAY": exports.COLOUR_SET.gray,
|
||||
FAILED: exports.COLOUR_SET.red,
|
||||
"ASSIST CLEAR": exports.COLOUR_SET.purple,
|
||||
"EASY CLEAR": exports.COLOUR_SET.green,
|
||||
CLEAR: exports.COLOUR_SET.blue,
|
||||
"HARD CLEAR": exports.COLOUR_SET.orange,
|
||||
"EX HARD CLEAR": exports.COLOUR_SET.gold,
|
||||
"FULL COMBO": exports.COLOUR_SET.teal,
|
||||
},
|
||||
clearLamp: "CLEAR",
|
||||
supportsESD: false,
|
||||
defaultTable: "Insane",
|
||||
scoreBucket: "lamp",
|
||||
},
|
||||
"ddr:SP": {
|
||||
idString: "ddr:SP",
|
||||
percentMax: 100,
|
||||
defaultScoreRatingAlg: "ktRating",
|
||||
defaultSessionRatingAlg: "ktRating",
|
||||
defaultProfileRatingAlg: "ktRating",
|
||||
difficulties: ["BEGINNER", "BASIC", "DIFFICULT", "EXPERT", "CHALLENGE"],
|
||||
defaultDifficulty: "EXPERT",
|
||||
difficultyColours: {
|
||||
BEGINNER: exports.COLOUR_SET.paleBlue,
|
||||
BASIC: exports.COLOUR_SET.orange,
|
||||
DIFFICULT: exports.COLOUR_SET.red,
|
||||
EXPERT: exports.COLOUR_SET.green,
|
||||
CHALLENGE: exports.COLOUR_SET.purple,
|
||||
},
|
||||
grades: [
|
||||
"D",
|
||||
"D+",
|
||||
"C-",
|
||||
"C",
|
||||
"C+",
|
||||
"B-",
|
||||
"B",
|
||||
"B+",
|
||||
"A-",
|
||||
"A",
|
||||
"A+",
|
||||
"AA-",
|
||||
"AA",
|
||||
"AA+",
|
||||
"AAA",
|
||||
],
|
||||
gradeColours: {
|
||||
D: exports.COLOUR_SET.gray,
|
||||
"D+": exports.COLOUR_SET.maroon,
|
||||
"C-": exports.COLOUR_SET.red,
|
||||
C: exports.COLOUR_SET.purple,
|
||||
"C+": exports.COLOUR_SET.vibrantPurple,
|
||||
"B-": exports.COLOUR_SET.paleBlue,
|
||||
B: exports.COLOUR_SET.blue,
|
||||
"B+": exports.COLOUR_SET.vibrantBlue,
|
||||
"A-": exports.COLOUR_SET.paleGreen,
|
||||
A: exports.COLOUR_SET.green,
|
||||
"A+": exports.COLOUR_SET.vibrantGreen,
|
||||
"AA-": exports.COLOUR_SET.paleOrange,
|
||||
AA: exports.COLOUR_SET.orange,
|
||||
"AA+": exports.COLOUR_SET.vibrantOrange,
|
||||
AAA: exports.COLOUR_SET.gold,
|
||||
},
|
||||
clearGrade: "A",
|
||||
gradeBoundaries: [0, 55, 59, 60, 65, 69, 70, 75, 79, 80, 85, 89, 90, 95, 99],
|
||||
lamps: [
|
||||
"FAILED",
|
||||
"CLEAR",
|
||||
"LIFE4",
|
||||
"FULL COMBO",
|
||||
"GREAT FULL COMBO",
|
||||
"PERFECT FULL COMBO",
|
||||
"MARVELOUS FULL COMBO",
|
||||
],
|
||||
lampColours: {
|
||||
FAILED: exports.COLOUR_SET.red,
|
||||
CLEAR: exports.COLOUR_SET.paleGreen,
|
||||
LIFE4: exports.COLOUR_SET.orange,
|
||||
"FULL COMBO": exports.COLOUR_SET.paleBlue,
|
||||
"GREAT FULL COMBO": exports.COLOUR_SET.green,
|
||||
"PERFECT FULL COMBO": exports.COLOUR_SET.gold,
|
||||
"MARVELOUS FULL COMBO": exports.COLOUR_SET.teal,
|
||||
},
|
||||
clearLamp: "CLEAR",
|
||||
supportsESD: true,
|
||||
judgementWindows: [
|
||||
{ name: "MARVELOUS", msBorder: 15, value: 3 },
|
||||
{ name: "PERFECT", msBorder: 30, value: 2 },
|
||||
{ name: "GREAT", msBorder: 59, value: 1 },
|
||||
{ name: "GOOD", msBorder: 89, value: 0 },
|
||||
{ name: "BAD", msBorder: 119, value: 0 },
|
||||
],
|
||||
defaultTable: "Levels (N-1)",
|
||||
scoreBucket: "lamp",
|
||||
},
|
||||
"ddr:DP": {
|
||||
idString: "ddr:DP",
|
||||
percentMax: 100,
|
||||
defaultScoreRatingAlg: "ktRating",
|
||||
defaultSessionRatingAlg: "ktRating",
|
||||
defaultProfileRatingAlg: "ktRating",
|
||||
difficulties: ["BASIC", "DIFFICULT", "EXPERT", "CHALLENGE"],
|
||||
defaultDifficulty: "EXPERT",
|
||||
difficultyColours: {
|
||||
BASIC: exports.COLOUR_SET.orange,
|
||||
DIFFICULT: exports.COLOUR_SET.red,
|
||||
EXPERT: exports.COLOUR_SET.green,
|
||||
CHALLENGE: exports.COLOUR_SET.purple,
|
||||
},
|
||||
grades: [
|
||||
"D",
|
||||
"D+",
|
||||
"C-",
|
||||
"C",
|
||||
"C+",
|
||||
"B-",
|
||||
"B",
|
||||
"B+",
|
||||
"A-",
|
||||
"A",
|
||||
"A+",
|
||||
"AA-",
|
||||
"AA",
|
||||
"AA+",
|
||||
"AAA",
|
||||
],
|
||||
gradeColours: {
|
||||
D: exports.COLOUR_SET.gray,
|
||||
"D+": exports.COLOUR_SET.maroon,
|
||||
"C-": exports.COLOUR_SET.red,
|
||||
C: exports.COLOUR_SET.purple,
|
||||
"C+": exports.COLOUR_SET.vibrantPurple,
|
||||
"B-": exports.COLOUR_SET.paleBlue,
|
||||
B: exports.COLOUR_SET.blue,
|
||||
"B+": exports.COLOUR_SET.vibrantBlue,
|
||||
"A-": exports.COLOUR_SET.paleGreen,
|
||||
A: exports.COLOUR_SET.green,
|
||||
"A+": exports.COLOUR_SET.vibrantGreen,
|
||||
"AA-": exports.COLOUR_SET.paleOrange,
|
||||
AA: exports.COLOUR_SET.orange,
|
||||
"AA+": exports.COLOUR_SET.vibrantOrange,
|
||||
AAA: exports.COLOUR_SET.gold,
|
||||
},
|
||||
clearGrade: "A",
|
||||
gradeBoundaries: [0, 55, 59, 60, 65, 69, 70, 75, 79, 80, 85, 89, 90, 95, 99],
|
||||
lamps: [
|
||||
"FAILED",
|
||||
"CLEAR",
|
||||
"LIFE4",
|
||||
"FULL COMBO",
|
||||
"GREAT FULL COMBO",
|
||||
"PERFECT FULL COMBO",
|
||||
"MARVELOUS FULL COMBO",
|
||||
],
|
||||
lampColours: {
|
||||
FAILED: exports.COLOUR_SET.red,
|
||||
CLEAR: exports.COLOUR_SET.paleGreen,
|
||||
LIFE4: exports.COLOUR_SET.orange,
|
||||
"FULL COMBO": exports.COLOUR_SET.paleBlue,
|
||||
"GREAT FULL COMBO": exports.COLOUR_SET.green,
|
||||
"PERFECT FULL COMBO": exports.COLOUR_SET.gold,
|
||||
"MARVELOUS FULL COMBO": exports.COLOUR_SET.teal,
|
||||
},
|
||||
clearLamp: "CLEAR",
|
||||
supportsESD: true,
|
||||
judgementWindows: [
|
||||
{ name: "MARVELOUS", msBorder: 15, value: 3 },
|
||||
{ name: "PERFECT", msBorder: 30, value: 2 },
|
||||
{ name: "GREAT", msBorder: 59, value: 1 },
|
||||
{ name: "GOOD", msBorder: 89, value: 0 },
|
||||
{ name: "BAD", msBorder: 119, value: 0 },
|
||||
],
|
||||
defaultTable: "Levels (N-1)",
|
||||
scoreBucket: "lamp",
|
||||
},
|
||||
"maimai:Single": {
|
||||
idString: "maimai:Single",
|
||||
percentMax: 120,
|
||||
defaultScoreRatingAlg: "ktRating",
|
||||
defaultSessionRatingAlg: "ktRating",
|
||||
defaultProfileRatingAlg: "ktRating",
|
||||
difficulties: ["Easy", "Basic", "Advanced", "Expert", "Master", "Re:Master"],
|
||||
defaultDifficulty: "Master",
|
||||
difficultyColours: {
|
||||
Easy: exports.COLOUR_SET.blue,
|
||||
Basic: exports.COLOUR_SET.green,
|
||||
Advanced: exports.COLOUR_SET.orange,
|
||||
Expert: exports.COLOUR_SET.red,
|
||||
Master: exports.COLOUR_SET.purple,
|
||||
"Re:Master": exports.COLOUR_SET.white,
|
||||
},
|
||||
grades: ["F", "E", "D", "C", "B", "A", "AA", "AAA", "S", "S+", "SS", "SS+", "SSS", "SSS+"],
|
||||
gradeColours: {
|
||||
F: exports.COLOUR_SET.gray,
|
||||
E: exports.COLOUR_SET.red,
|
||||
D: exports.COLOUR_SET.maroon,
|
||||
C: exports.COLOUR_SET.purple,
|
||||
B: exports.COLOUR_SET.paleGreen,
|
||||
A: exports.COLOUR_SET.green,
|
||||
AA: exports.COLOUR_SET.paleBlue,
|
||||
AAA: exports.COLOUR_SET.blue,
|
||||
S: exports.COLOUR_SET.gold,
|
||||
"S+": exports.COLOUR_SET.vibrantYellow,
|
||||
SS: exports.COLOUR_SET.paleOrange,
|
||||
"SS+": exports.COLOUR_SET.orange,
|
||||
SSS: exports.COLOUR_SET.teal,
|
||||
"SSS+": exports.COLOUR_SET.white,
|
||||
},
|
||||
clearGrade: "A",
|
||||
// @hack Maimai's top grade depends on the chart's maximum percent
|
||||
// we just set it at percentMax, but it's not technically correct
|
||||
gradeBoundaries: [0, 10, 20, 40, 60, 80, 90, 94, 97, 98, 99, 99.5, 100, 120],
|
||||
lamps: ["FAILED", "CLEAR", "FULL COMBO", "ALL PERFECT", "ALL PERFECT+"],
|
||||
lampColours: {
|
||||
FAILED: exports.COLOUR_SET.red,
|
||||
CLEAR: exports.COLOUR_SET.green,
|
||||
"FULL COMBO": exports.COLOUR_SET.blue,
|
||||
"ALL PERFECT": exports.COLOUR_SET.gold,
|
||||
"ALL PERFECT+": exports.COLOUR_SET.teal,
|
||||
},
|
||||
clearLamp: "CLEAR",
|
||||
supportsESD: false,
|
||||
defaultTable: "Levels",
|
||||
scoreBucket: "grade",
|
||||
},
|
||||
"gitadora:Gita": {
|
||||
idString: "gitadora:Gita",
|
||||
percentMax: 100,
|
||||
defaultScoreRatingAlg: "skill",
|
||||
defaultSessionRatingAlg: "skill",
|
||||
defaultProfileRatingAlg: "skill",
|
||||
difficulties: [
|
||||
"BASIC",
|
||||
"ADVANCED",
|
||||
"EXTREME",
|
||||
"MASTER",
|
||||
"BASS BASIC",
|
||||
"BASS ADVANCED",
|
||||
"BASS EXTREME",
|
||||
"BASS MASTER",
|
||||
],
|
||||
defaultDifficulty: "EXTREME",
|
||||
difficultyColours: {
|
||||
BASIC: exports.COLOUR_SET.blue,
|
||||
ADVANCED: exports.COLOUR_SET.orange,
|
||||
EXTREME: exports.COLOUR_SET.red,
|
||||
MASTER: exports.COLOUR_SET.purple,
|
||||
"BASS BASIC": exports.COLOUR_SET.vibrantBlue,
|
||||
"BASS ADVANCED": exports.COLOUR_SET.vibrantOrange,
|
||||
"BASS EXTREME": "todo",
|
||||
"BASS MASTER": exports.COLOUR_SET.vibrantPurple,
|
||||
},
|
||||
grades: ["C", "B", "A", "S", "SS", "MAX"],
|
||||
gradeColours: {
|
||||
C: exports.COLOUR_SET.purple,
|
||||
B: exports.COLOUR_SET.blue,
|
||||
A: exports.COLOUR_SET.green,
|
||||
S: exports.COLOUR_SET.orange,
|
||||
SS: exports.COLOUR_SET.gold,
|
||||
MAX: exports.COLOUR_SET.white,
|
||||
},
|
||||
clearGrade: "A",
|
||||
gradeBoundaries: [0, 63, 73, 80, 95, 100],
|
||||
lamps: ["FAILED", "CLEAR", "FULL COMBO", "EXCELLENT"],
|
||||
lampColours: {
|
||||
FAILED: exports.COLOUR_SET.red,
|
||||
CLEAR: exports.COLOUR_SET.blue,
|
||||
"FULL COMBO": exports.COLOUR_SET.teal,
|
||||
EXCELLENT: exports.COLOUR_SET.gold,
|
||||
},
|
||||
clearLamp: "CLEAR",
|
||||
supportsESD: true,
|
||||
judgementWindows: [
|
||||
{ name: "PERFECT", msBorder: 33, value: 1 },
|
||||
{ name: "GREAT", msBorder: 57, value: 0.5 },
|
||||
{ name: "GOOD", msBorder: 81, value: 0.2 },
|
||||
{ name: "OK", msBorder: 116.667 /* not really, but yknow */, value: 0 },
|
||||
],
|
||||
defaultTable: "Levels (N-1)",
|
||||
scoreBucket: "grade",
|
||||
},
|
||||
"gitadora:Dora": {
|
||||
idString: "gitadora:Dora",
|
||||
percentMax: 100,
|
||||
defaultScoreRatingAlg: "skill",
|
||||
defaultSessionRatingAlg: "skill",
|
||||
defaultProfileRatingAlg: "skill",
|
||||
difficulties: ["BASIC", "ADVANCED", "EXTREME", "MASTER"],
|
||||
defaultDifficulty: "EXTREME",
|
||||
difficultyColours: {
|
||||
BASIC: exports.COLOUR_SET.blue,
|
||||
ADVANCED: exports.COLOUR_SET.orange,
|
||||
EXTREME: exports.COLOUR_SET.red,
|
||||
MASTER: exports.COLOUR_SET.purple,
|
||||
},
|
||||
grades: ["C", "B", "A", "S", "SS", "MAX"],
|
||||
gradeColours: {
|
||||
C: exports.COLOUR_SET.purple,
|
||||
B: exports.COLOUR_SET.blue,
|
||||
A: exports.COLOUR_SET.green,
|
||||
S: exports.COLOUR_SET.orange,
|
||||
SS: exports.COLOUR_SET.gold,
|
||||
MAX: exports.COLOUR_SET.white,
|
||||
},
|
||||
clearGrade: "A",
|
||||
gradeBoundaries: [0, 63, 73, 80, 95, 100],
|
||||
lamps: ["FAILED", "CLEAR", "FULL COMBO", "EXCELLENT"],
|
||||
lampColours: {
|
||||
FAILED: exports.COLOUR_SET.red,
|
||||
CLEAR: exports.COLOUR_SET.blue,
|
||||
"FULL COMBO": exports.COLOUR_SET.teal,
|
||||
EXCELLENT: exports.COLOUR_SET.gold,
|
||||
},
|
||||
clearLamp: "CLEAR",
|
||||
supportsESD: true,
|
||||
judgementWindows: [
|
||||
{ name: "PERFECT", msBorder: 27, value: 1 },
|
||||
{ name: "GREAT", msBorder: 48, value: 0.5 },
|
||||
{ name: "GOOD", msBorder: 72, value: 0.2 },
|
||||
{ name: "OK", msBorder: 116.667 /* not really, but yknow */, value: 0 },
|
||||
],
|
||||
defaultTable: "Levels (N-1)",
|
||||
scoreBucket: "grade",
|
||||
},
|
||||
};
|
||||
/**
|
||||
* Returns the configuration for this game.
|
||||
*/
|
||||
function GetGameConfig(game) {
|
||||
return GAME_CONFIGS[game];
|
||||
}
|
||||
exports.GetGameConfig = GetGameConfig;
|
||||
/**
|
||||
* Returns the configuration for this Game + Playtype.
|
||||
* Optionally, a generic parameter - IDStrings - can be passed
|
||||
* to indicate what IDString this configuration is for.
|
||||
*/
|
||||
function GetGamePTConfig(game, playtype) {
|
||||
const idString = `${game}:${playtype}`;
|
||||
return GAME_PT_CONFIGS[idString];
|
||||
}
|
||||
exports.GetGamePTConfig = GetGamePTConfig;
|
||||
//# sourceMappingURL=config.js.map
|
||||
File diff suppressed because one or more lines are too long
Vendored
+14
@@ -0,0 +1,14 @@
|
||||
import { FileUploadImportTypes, IRImportTypes, APIImportTypes, ImportTypes, Game } from "..";
|
||||
export declare const fileImportTypes: FileUploadImportTypes[];
|
||||
export declare const irImportTypes: IRImportTypes[];
|
||||
export declare const apiImportTypes: APIImportTypes[];
|
||||
export declare const allImportTypes: ImportTypes[];
|
||||
export declare const allSupportedGames: Game[];
|
||||
export interface ServerConfig {
|
||||
name: string;
|
||||
supportedGames: Game[];
|
||||
supportedImportTypes: ImportTypes[];
|
||||
}
|
||||
export declare const KTCHI_CONFIG: ServerConfig;
|
||||
export declare const BTCHI_CONFIG: ServerConfig;
|
||||
export declare const OMNI_CONFIG: ServerConfig;
|
||||
@@ -0,0 +1,78 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.OMNI_CONFIG = exports.BTCHI_CONFIG = exports.KTCHI_CONFIG = exports.allSupportedGames = exports.allImportTypes = exports.apiImportTypes = exports.irImportTypes = exports.fileImportTypes = void 0;
|
||||
exports.fileImportTypes = [
|
||||
"file/eamusement-iidx-csv",
|
||||
"file/batch-manual",
|
||||
"file/solid-state-squad",
|
||||
"file/mer-iidx",
|
||||
"file/pli-iidx-csv",
|
||||
];
|
||||
exports.irImportTypes = [
|
||||
"ir/direct-manual",
|
||||
"ir/barbatos",
|
||||
"ir/fervidex",
|
||||
"ir/fervidex-static",
|
||||
"ir/beatoraja",
|
||||
"ir/chunitachi",
|
||||
"ir/usc",
|
||||
];
|
||||
exports.apiImportTypes = [
|
||||
"api/arc-iidx",
|
||||
"api/arc-sdvx",
|
||||
"api/arc-ddr",
|
||||
"api/eag-iidx",
|
||||
"api/eag-sdvx",
|
||||
"api/flo-iidx",
|
||||
"api/flo-sdvx",
|
||||
];
|
||||
exports.allImportTypes = [
|
||||
...exports.fileImportTypes,
|
||||
...exports.irImportTypes,
|
||||
...exports.apiImportTypes,
|
||||
];
|
||||
exports.allSupportedGames = [
|
||||
"iidx",
|
||||
"museca",
|
||||
"maimai",
|
||||
// "jubeat",
|
||||
// "popn",
|
||||
"sdvx",
|
||||
"ddr",
|
||||
"bms",
|
||||
"chunithm",
|
||||
"gitadora",
|
||||
"usc",
|
||||
];
|
||||
exports.KTCHI_CONFIG = {
|
||||
name: "Kamaitachi",
|
||||
supportedGames: ["iidx", "gitadora", "chunithm", "maimai", "museca", "sdvx"],
|
||||
supportedImportTypes: [
|
||||
"api/arc-iidx",
|
||||
"api/arc-sdvx",
|
||||
"api/arc-ddr",
|
||||
"api/eag-iidx",
|
||||
"api/eag-sdvx",
|
||||
"api/flo-iidx",
|
||||
"api/flo-sdvx",
|
||||
"ir/direct-manual",
|
||||
"ir/fervidex",
|
||||
"ir/fervidex-static",
|
||||
"ir/chunitachi",
|
||||
"file/eamusement-iidx-csv",
|
||||
"file/solid-state-squad",
|
||||
"file/mer-iidx",
|
||||
"file/pli-iidx-csv",
|
||||
],
|
||||
};
|
||||
exports.BTCHI_CONFIG = {
|
||||
name: "Bokutachi",
|
||||
supportedGames: ["usc", "bms"],
|
||||
supportedImportTypes: ["ir/beatoraja", "ir/usc", "ir/direct-manual", "file/batch-manual"],
|
||||
};
|
||||
exports.OMNI_CONFIG = {
|
||||
name: "Omnitachi",
|
||||
supportedGames: exports.allSupportedGames,
|
||||
supportedImportTypes: exports.allImportTypes,
|
||||
};
|
||||
//# sourceMappingURL=static-config.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"static-config.js","sourceRoot":"","sources":["../../src/config/static-config.ts"],"names":[],"mappings":";;;AAEa,QAAA,eAAe,GAA4B;IACvD,0BAA0B;IAC1B,mBAAmB;IACnB,wBAAwB;IACxB,eAAe;IACf,mBAAmB;CACnB,CAAC;AAEW,QAAA,aAAa,GAAoB;IAC7C,kBAAkB;IAClB,aAAa;IACb,aAAa;IACb,oBAAoB;IACpB,cAAc;IACd,eAAe;IACf,QAAQ;CACR,CAAC;AAEW,QAAA,cAAc,GAAqB;IAC/C,cAAc;IACd,cAAc;IACd,aAAa;IACb,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;CACd,CAAC;AAEW,QAAA,cAAc,GAAkB;IAC5C,GAAG,uBAAe;IAClB,GAAG,qBAAa;IAChB,GAAG,sBAAc;CACjB,CAAC;AAEW,QAAA,iBAAiB,GAAW;IACxC,MAAM;IACN,QAAQ;IACR,QAAQ;IACR,YAAY;IACZ,UAAU;IACV,MAAM;IACN,KAAK;IACL,KAAK;IACL,UAAU;IACV,UAAU;IACV,KAAK;CACL,CAAC;AAQW,QAAA,YAAY,GAAiB;IACzC,IAAI,EAAE,YAAY;IAClB,cAAc,EAAE,CAAC,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,CAAC;IAC5E,oBAAoB,EAAE;QACrB,cAAc;QACd,cAAc;QACd,aAAa;QACb,cAAc;QACd,cAAc;QACd,cAAc;QACd,cAAc;QACd,kBAAkB;QAClB,aAAa;QACb,oBAAoB;QACpB,eAAe;QACf,0BAA0B;QAC1B,wBAAwB;QACxB,eAAe;QACf,mBAAmB;KACnB;CACD,CAAC;AAEW,QAAA,YAAY,GAAiB;IACzC,IAAI,EAAE,WAAW;IACjB,cAAc,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC;IAC9B,oBAAoB,EAAE,CAAC,cAAc,EAAE,QAAQ,EAAE,kBAAkB,EAAE,mBAAmB,CAAC;CACzF,CAAC;AAEW,QAAA,WAAW,GAAiB;IACxC,IAAI,EAAE,WAAW;IACjB,cAAc,EAAE,yBAAiB;IACjC,oBAAoB,EAAE,sBAAc;CACpC,CAAC"}
|
||||
File diff suppressed because one or more lines are too long
Vendored
+2
-2
@@ -1,4 +1,4 @@
|
||||
export * from "./types";
|
||||
export * as config from "./config";
|
||||
export * from "./config/config";
|
||||
export * as gameClasses from "./game-classes";
|
||||
export * as ESDCore from "./common-core/esd-core";
|
||||
export * as ESDCore from "./lib/esd";
|
||||
|
||||
+3
-3
@@ -22,9 +22,9 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
||||
return result;
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.ESDCore = exports.gameClasses = exports.config = void 0;
|
||||
exports.ESDCore = exports.gameClasses = void 0;
|
||||
__exportStar(require("./types"), exports);
|
||||
exports.config = __importStar(require("./config"));
|
||||
__exportStar(require("./config/config"), exports);
|
||||
exports.gameClasses = __importStar(require("./game-classes"));
|
||||
exports.ESDCore = __importStar(require("./common-core/esd-core"));
|
||||
exports.ESDCore = __importStar(require("./lib/esd"));
|
||||
//# sourceMappingURL=index.js.map
|
||||
@@ -1 +1 @@
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,0CAAwB;AAExB,mDAAmC;AACnC,8DAA8C;AAC9C,kEAAkD"}
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,0CAAwB;AAExB,kDAAgC;AAChC,8DAA8C;AAC9C,qDAAqC"}
|
||||
@@ -14,18 +14,18 @@ function cdf(x, mean, variance) {
|
||||
*/
|
||||
function erf(x) {
|
||||
// save the sign of x
|
||||
let sign = x >= 0 ? 1 : -1;
|
||||
const sign = x >= 0 ? 1 : -1;
|
||||
x = Math.abs(x);
|
||||
// constants
|
||||
let a1 = 0.254829592;
|
||||
let a2 = -0.284496736;
|
||||
let a3 = 1.421413741;
|
||||
let a4 = -1.453152027;
|
||||
let a5 = 1.061405429;
|
||||
let p = 0.3275911;
|
||||
const a1 = 0.254829592;
|
||||
const a2 = -0.284496736;
|
||||
const a3 = 1.421413741;
|
||||
const a4 = -1.453152027;
|
||||
const a5 = 1.061405429;
|
||||
const p = 0.3275911;
|
||||
// A&S formula 7.1.26
|
||||
let t = 1.0 / (1.0 + p * x);
|
||||
let y = 1.0 - ((((a5 * t + a4) * t + a3) * t + a2) * t + a1) * t * Math.exp(-x * x);
|
||||
const t = 1.0 / (1.0 + p * x);
|
||||
const y = 1.0 - ((((a5 * t + a4) * t + a3) * t + a2) * t + a1) * t * Math.exp(-x * x);
|
||||
return sign * y; // erf(-x) = -erf(x);
|
||||
}
|
||||
function CDFBetween(lowBound, highBound, mean, variance) {
|
||||
@@ -45,8 +45,8 @@ function StdDeviationToPercent(judgements, stddev, largestValue) {
|
||||
let lastJudgeMSBorder = 0;
|
||||
let prbSum = 0;
|
||||
for (let i = 0; i < judgements.length; i++) {
|
||||
let judge = judgements[i];
|
||||
let nVal = CDFBetween(lastJudgeMSBorder, judge.msBorder, MEAN, Math.pow(stddev, 2)) * judge.value;
|
||||
const judge = judgements[i];
|
||||
const nVal = CDFBetween(lastJudgeMSBorder, judge.msBorder, MEAN, Math.pow(stddev, 2)) * judge.value;
|
||||
lastJudgeMSBorder = judge.msBorder;
|
||||
prbSum += nVal;
|
||||
}
|
||||
@@ -67,7 +67,7 @@ function CalculateESD(judgements, percent, errOnInaccuracy = false) {
|
||||
if (percent > 1 || percent < 0 || Number.isNaN(percent)) {
|
||||
throw new Error("(ESD) Invalid percent. Percent must be between 0 and 1, and also a number.");
|
||||
}
|
||||
let largestValue = judgements.slice(0).sort((a, b) => b.value - a.value)[0].value;
|
||||
const largestValue = judgements.slice(0).sort((a, b) => b.value - a.value)[0].value;
|
||||
// massive optimisation possible here by using better initial estimates with precalc'd table of values.
|
||||
// until then, it's just kinda slow.
|
||||
let minSD = 0;
|
||||
@@ -80,7 +80,7 @@ function CalculateESD(judgements, percent, errOnInaccuracy = false) {
|
||||
// the defaults for these are 100 for iterations, and 0.001 for error.
|
||||
// for most of what i've tested, this has been fine.
|
||||
for (let i = 0; i < MAX_ITERATIONS; i++) {
|
||||
let estimatedPercent = StdDeviationToPercent(judgements, estSD, largestValue);
|
||||
const estimatedPercent = StdDeviationToPercent(judgements, estSD, largestValue);
|
||||
if (Math.abs(estimatedPercent - percent) < ACCEPTABLE_ERROR) {
|
||||
return estSD;
|
||||
}
|
||||
@@ -99,10 +99,7 @@ function CalculateESD(judgements, percent, errOnInaccuracy = false) {
|
||||
if (errOnInaccuracy) {
|
||||
throw `(ESD-JS) Did not reach value within MAX_ITERATIONS (${MAX_ITERATIONS})`;
|
||||
}
|
||||
else {
|
||||
console.warn(`(ESD-JS) Did not reach value within MAX_ITERATIONS (${MAX_ITERATIONS}), returning last estimate (${estSD}), which was generated from ${percent}.`);
|
||||
return estSD;
|
||||
}
|
||||
return estSD;
|
||||
}
|
||||
exports.CalculateESD = CalculateESD;
|
||||
/**
|
||||
@@ -127,7 +124,7 @@ function ESDCompare(baseESD, compareESD, cdeg = 1) {
|
||||
variance = Math.pow(baseESD, 2);
|
||||
bound = CONFIDENCE_DEGREE * compareESD;
|
||||
}
|
||||
let esdc = CDFBetween(-1 * bound, bound, 0, variance) / 2;
|
||||
const esdc = CDFBetween(-1 * bound, bound, 0, variance) / 2;
|
||||
let besdc = BASE_CASE - esdc;
|
||||
if (inv) {
|
||||
besdc *= -1;
|
||||
@@ -139,9 +136,9 @@ exports.ESDCompare = ESDCompare;
|
||||
* Converts two percents to ESD, then runs ESDCompare.
|
||||
*/
|
||||
function PercentCompare(judgements, baseP, compareP, cdeg = 1) {
|
||||
let e1 = CalculateESD(judgements, baseP);
|
||||
let e2 = CalculateESD(judgements, compareP);
|
||||
const e1 = CalculateESD(judgements, baseP);
|
||||
const e2 = CalculateESD(judgements, compareP);
|
||||
return ESDCompare(e1, e2, cdeg);
|
||||
}
|
||||
exports.PercentCompare = PercentCompare;
|
||||
//# sourceMappingURL=esd-core.js.map
|
||||
//# sourceMappingURL=esd.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"esd.js","sourceRoot":"","sources":["../../src/lib/esd.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,SAAS,GAAG,CAAC,CAAS,EAAE,IAAY,EAAE,QAAgB;IACrD,OAAO,GAAG,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,GAA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AAG,IAAI,CAAC;QACX,QAAQ,GAAG,SAAA,UAAU,EAAI,CAAC,CAAA,CAAC;QAC3B,KAAK,GAAG,iBAAiB,GAAG,OAAO,CAAC;KACpC;SAAM;QACN,QAAQ,GAAG,SAAA,OAAO,EAAI,CAAC,CAAA,CAAC;QACxB,KAAK,GAAG,iBAAiB,GAAG,UAAU,CAAC;KACvC;IAED,MAAM,IAAI,GAAG,UAAU,CAAC,CAAC,CAAC,GAAG,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC;IAE5D,IAAI,KAAK,GAAG,SAAS,GAAG,IAAI,CAAC;IAE7B,IAAI,GAAG,EAAE;QACR,KAAK,IAAI,CAAC,CAAC,CAAC;KACZ;IAED,OAAO,KAAK,GAAG,GAAG,CAAC;AACpB,CAAC;AAzBD,gCAyBC;AAED;;GAEG;AACH,SAAgB,cAAc,CAC7B,UAAgC,EAChC,KAAa,EACb,QAAgB,EAChB,IAAI,GAAG,CAAC;IAER,MAAM,EAAE,GAAG,YAAY,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;IAC3C,MAAM,EAAE,GAAG,YAAY,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;IAC9C,OAAO,UAAU,CAAC,EAAE,EAAE,EAAE,EAAE,IAAI,CAAC,CAAC;AACjC,CAAC;AATD,wCASC"}
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
import { Grades, integer } from "../types";
|
||||
export declare function CalculateGradeDeltaIIDX(cmpGrade: Grades["iidx:SP" | "iidx:DP"], score: integer, notecount: integer): string;
|
||||
@@ -0,0 +1,20 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.CalculateGradeDeltaIIDX = void 0;
|
||||
const config_1 = require("../config/config");
|
||||
const IIDXConfig = config_1.GetGamePTConfig("iidx", "SP");
|
||||
function CalculateGradeDeltaIIDX(cmpGrade, score, notecount) {
|
||||
const cmpGradeIDX = IIDXConfig.grades.indexOf(cmpGrade);
|
||||
const cmpGradePercent = IIDXConfig.gradeBoundaries[cmpGradeIDX];
|
||||
const cmpScore = Math.ceil(notecount * (cmpGradePercent / 100));
|
||||
const delta = score - cmpScore;
|
||||
if (delta >= 0) {
|
||||
return `${cmpGrade}+${delta}`;
|
||||
}
|
||||
else {
|
||||
// negative numbers implicitly stringify with the - prefix
|
||||
return `${cmpGrade}${delta}`;
|
||||
}
|
||||
}
|
||||
exports.CalculateGradeDeltaIIDX = CalculateGradeDeltaIIDX;
|
||||
//# sourceMappingURL=util.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"util.js","sourceRoot":"","sources":["../../src/lib/util.ts"],"names":[],"mappings":";;;AAAA,6CAAmD;AAGnD,MAAM,UAAU,GAAG,wBAAe,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;AAEjD,SAAgB,uBAAuB,CACtC,QAAuC,EACvC,KAAc,EACd,SAAkB;IAElB,MAAM,WAAW,GAAG,UAAU,CAAC,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IAExD,MAAM,eAAe,GAAG,UAAU,CAAC,eAAe,CAAC,WAAW,CAAC,CAAC;IAEhE,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,GAAG,CAAC,eAAe,GAAG,GAAG,CAAC,CAAC,CAAC;IAEhE,MAAM,KAAK,GAAG,KAAK,GAAG,QAAQ,CAAC;IAE/B,IAAI,KAAK,IAAI,CAAC,EAAE;QACf,OAAO,GAAG,QAAQ,IAAI,KAAK,EAAE,CAAC;KAC9B;SAAM;QACN,0DAA0D;QAC1D,OAAO,GAAG,QAAQ,GAAG,KAAK,EAAE,CAAC;KAC7B;AACF,CAAC;AAnBD,0DAmBC"}
|
||||
Vendored
+8
-10
@@ -11,7 +11,7 @@ export interface CounterDocument {
|
||||
* apply two levels of indexing to types, which makes writing generic interfaces
|
||||
* like the ScoreDocument (Especially the ScoreDocument) *very* hard!
|
||||
*/
|
||||
export declare type IDStrings = "iidx:SP" | "iidx:DP" | "popn:9B" | "sdvx:Single" | "usc:Single" | "ddr:SP" | "ddr:DP" | "maimai:Single" | "museca:Single" | "jubeat:Single" | "bms:7K" | "bms:14K" | "chunithm:Single" | "gitadora:Gita" | "gitadora:Dora";
|
||||
export declare type IDStrings = "iidx:SP" | "iidx:DP" | "sdvx:Single" | "usc:Single" | "ddr:SP" | "ddr:DP" | "maimai:Single" | "museca:Single" | "bms:7K" | "bms:14K" | "chunithm:Single" | "gitadora:Gita" | "gitadora:Dora";
|
||||
export interface IDStringToPlaytype {
|
||||
"iidx:SP": "SP";
|
||||
"iidx:DP": "DP";
|
||||
@@ -76,7 +76,7 @@ export declare type ValidDatabases = Databases | `songs-${Game}` | `charts-${Gam
|
||||
/**
|
||||
* Supported games by Kamaitachi.
|
||||
*/
|
||||
export declare type Game = "iidx" | "museca" | "maimai" | "jubeat" | "popn" | "sdvx" | "ddr" | "bms" | "chunithm" | "gitadora" | "usc";
|
||||
export declare type Game = "iidx" | "museca" | "maimai" | "sdvx" | "ddr" | "bms" | "chunithm" | "gitadora" | "usc";
|
||||
/**
|
||||
* This is the generic response from the Kamaitachi API in event of a failure.
|
||||
*/
|
||||
@@ -112,7 +112,7 @@ export interface Playtypes {
|
||||
}
|
||||
declare type IIDXGrades = "F" | "E" | "D" | "C" | "B" | "A" | "AA" | "AAA" | "MAX-" | "MAX";
|
||||
declare type SDVXGrades = "D" | "C" | "B" | "A" | "A+" | "AA" | "AA+" | "AAA" | "AAA+" | "S";
|
||||
declare type DDRGrades = "D" | "D+" | "C-" | "C" | "C+" | "B-" | "B" | "B+" | "A-" | "A" | "A+" | "AA-" | "AA" | "AA+" | "AAA" | "MAX";
|
||||
declare type DDRGrades = "D" | "D+" | "C-" | "C" | "C+" | "B-" | "B" | "B+" | "A-" | "A" | "A+" | "AA-" | "AA" | "AA+" | "AAA";
|
||||
declare type GitadoraGrades = "C" | "B" | "A" | "S" | "SS" | "MAX";
|
||||
export interface Grades {
|
||||
"iidx:SP": IIDXGrades;
|
||||
@@ -122,12 +122,12 @@ export interface Grades {
|
||||
"usc:Single": SDVXGrades;
|
||||
"ddr:SP": DDRGrades;
|
||||
"ddr:DP": DDRGrades;
|
||||
"maimai:Single": "E" | "D" | "C" | "B" | "A" | "AA" | "AAA" | "S" | "S+" | "SS" | "SS+" | "SSS" | "SSS+";
|
||||
"maimai:Single": "F" | "E" | "D" | "C" | "B" | "A" | "AA" | "AAA" | "S" | "S+" | "SS" | "SS+" | "SSS" | "SSS+";
|
||||
"jubeat:Single": "E" | "D" | "C" | "B" | "A" | "S" | "SS" | "SSS" | "EXC";
|
||||
"museca:Single": "没" | "拙" | "凡" | "佳" | "良" | "優" | "秀" | "傑" | "傑G";
|
||||
"bms:7K": IIDXGrades;
|
||||
"bms:14K": IIDXGrades;
|
||||
"chunithm:Single": "BASIC" | "ADVANCED" | "EXPERT" | "MASTER" | "WORLD'S END";
|
||||
"chunithm:Single": "D" | "C" | "B" | "BB" | "BBB" | "A" | "AA" | "AAA" | "S" | "SS" | "SSS";
|
||||
"gitadora:Gita": GitadoraGrades;
|
||||
"gitadora:Dora": GitadoraGrades;
|
||||
}
|
||||
@@ -163,8 +163,8 @@ export interface Difficulties {
|
||||
"maimai:Single": "Easy" | "Basic" | "Advanced" | "Expert" | "Master" | "Re:Master";
|
||||
"jubeat:Single": "BSC" | "ADV" | "EXT";
|
||||
"museca:Single": "Green" | "Yellow" | "Red";
|
||||
"bms:7K": "BEGINNER" | "NORMAL" | "HYPER" | "ANOTHER" | "INSANE" | "CUSTOM";
|
||||
"bms:14K": "BEGINNER" | "NORMAL" | "HYPER" | "ANOTHER" | "INSANE" | "CUSTOM";
|
||||
"bms:7K": "CHART";
|
||||
"bms:14K": "CHART";
|
||||
"chunithm:Single": "BASIC" | "ADVANCED" | "EXPERT" | "MASTER" | "WORLD'S END";
|
||||
"gitadora:Gita": "BASIC" | "ADVANCED" | "EXTREME" | "MASTER" | "BASS BASIC" | "BASS ADVANCED" | "BASS EXTREME" | "BASS MASTER";
|
||||
"gitadora:Dora": "BASIC" | "ADVANCED" | "EXTREME" | "MASTER";
|
||||
@@ -367,7 +367,7 @@ interface SessionScoreNewInfo {
|
||||
isNewScore: true;
|
||||
}
|
||||
export declare type SessionScoreInfo = SessionScorePBInfo | SessionScoreNewInfo;
|
||||
interface SessionCalculatedDataLookup {
|
||||
export interface SessionCalculatedDataLookup {
|
||||
"iidx:SP": "BPI" | "ktRating" | "ktLampRating";
|
||||
"iidx:DP": "BPI" | "ktRating" | "ktLampRating";
|
||||
"popn:9B": never;
|
||||
@@ -934,13 +934,11 @@ export interface JudgementLookup {
|
||||
export interface ScoreCalculatedDataLookup {
|
||||
"iidx:SP": "BPI" | "K%" | "ktRating" | "ktLampRating";
|
||||
"iidx:DP": "BPI" | "ktRating" | "ktLampRating";
|
||||
"popn:9B": never;
|
||||
"sdvx:Single": "VF6";
|
||||
"usc:Single": "VF6";
|
||||
"ddr:SP": "MFCP" | "ktRating";
|
||||
"ddr:DP": "MFCP" | "ktRating";
|
||||
"maimai:Single": "ktRating";
|
||||
"jubeat:Single": "jubility";
|
||||
"museca:Single": "ktRating";
|
||||
"bms:7K": "ktLampRating";
|
||||
"bms:14K": "ktLampRating";
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@
|
||||
"typescript": "^4.3.4"
|
||||
},
|
||||
"dependencies": {
|
||||
"monk": "^7.3.3",
|
||||
"monk": "^7.3.4",
|
||||
"tap": "^15.0.9"
|
||||
},
|
||||
"nyc": {
|
||||
|
||||
Generated
+9
-14
@@ -7,7 +7,7 @@ specifiers:
|
||||
eslint: ^7.22.0
|
||||
eslint-config-prettier: ^8.1.0
|
||||
eslint-plugin-prettier: ^3.3.1
|
||||
monk: ^7.3.3
|
||||
monk: ^7.3.4
|
||||
prettier: ^2.2.1
|
||||
tap: ^15.0.9
|
||||
ts-node: ^10.0.0
|
||||
@@ -413,27 +413,22 @@ packages:
|
||||
/@types/bson/4.0.3:
|
||||
resolution: {integrity: sha512-mVRvYnTOZJz3ccpxhr3wgxVmSeiYinW+zlzQz3SXWaJmD1DuL05Jeq7nKw3SnbKmbleW5qrLG5vdyWe/A9sXhw==}
|
||||
dependencies:
|
||||
'@types/node': 14.14.41
|
||||
'@types/node': 15.12.4
|
||||
dev: false
|
||||
|
||||
/@types/json-schema/7.0.7:
|
||||
resolution: {integrity: sha512-cxWFQVseBm6O9Gbw1IWb8r6OS4OhSt3hPZLkFApLjM8TEXROBuQGLAH2i2gZpcXdLBIrpXuTDhH7Vbm1iXmNGA==}
|
||||
dev: true
|
||||
|
||||
/@types/mongodb/3.6.12:
|
||||
resolution: {integrity: sha512-49aEzQD5VdHPxyd5dRyQdqEveAg9LanwrH8RQipnMuulwzKmODXIZRp0umtxi1eBUfEusRkoy8AVOMr+kVuFog==}
|
||||
/@types/mongodb/3.6.18:
|
||||
resolution: {integrity: sha512-JSVFt9p0rTfZ4EgzXmVHUB3ue00xe3CRbQho8nXfImzEDDM4O7I3po1bwbWl/EIbLENxUreZxqLOc8lvcnLVPA==}
|
||||
dependencies:
|
||||
'@types/bson': 4.0.3
|
||||
'@types/node': 14.14.41
|
||||
dev: false
|
||||
|
||||
/@types/node/14.14.41:
|
||||
resolution: {integrity: sha512-dueRKfaJL4RTtSa7bWeTK1M+VH+Gns73oCgzvYfHZywRCoPSd8EkXBL0mZ9unPTveBn+D9phZBaxuzpwjWkW0g==}
|
||||
'@types/node': 15.12.4
|
||||
dev: false
|
||||
|
||||
/@types/node/15.12.4:
|
||||
resolution: {integrity: sha512-zrNj1+yqYF4WskCMOHwN+w9iuD12+dGm0rQ35HLl9/Ouuq52cEtd0CH9qMgrdNmi5ejC1/V7vKEXYubB+65DkA==}
|
||||
dev: true
|
||||
|
||||
/@types/tap/15.0.3:
|
||||
resolution: {integrity: sha512-usOLtmMm1jfjPdkt9R9HMTU/J6m9QNYjgFs5U2tFiOzQSd7lDd/aAMprExYLnJnZb6tM4ujmGv7ITe+1smIRgg==}
|
||||
@@ -1799,8 +1794,8 @@ packages:
|
||||
hasBin: true
|
||||
dev: false
|
||||
|
||||
/mongodb/3.6.6:
|
||||
resolution: {integrity: sha512-WlirMiuV1UPbej5JeCMqE93JRfZ/ZzqE7nJTwP85XzjAF4rRSeq2bGCb1cjfoHLOF06+HxADaPGqT0g3SbVT1w==}
|
||||
/mongodb/3.6.9:
|
||||
resolution: {integrity: sha512-1nSCKgSunzn/CXwgOWgbPHUWOO5OfERcuOWISmqd610jn0s8BU9K4879iJVabqgpPPbA6hO7rG48eq+fGED3Mg==}
|
||||
engines: {node: '>=4'}
|
||||
peerDependencies:
|
||||
aws4: '*'
|
||||
@@ -1859,9 +1854,9 @@ packages:
|
||||
/monk/7.3.4:
|
||||
resolution: {integrity: sha512-PkPNiElwroVyKQj01usyziOvwiKYBUVSq7YU1FB4KFr0J3v0GeXW0TebYsLR4u33WB8JGqPiAcuzDspfdujqQg==}
|
||||
dependencies:
|
||||
'@types/mongodb': 3.6.12
|
||||
'@types/mongodb': 3.6.18
|
||||
debug: 4.3.1
|
||||
mongodb: 3.6.6
|
||||
mongodb: 3.6.9
|
||||
monk-middleware-cast-ids: 0.2.1
|
||||
monk-middleware-fields: 0.2.0
|
||||
monk-middleware-handle-callback: 0.2.2
|
||||
|
||||
@@ -11,6 +11,6 @@
|
||||
"typeRoots": [ "@types" ],
|
||||
"sourceMap": true
|
||||
},
|
||||
"include": ["src"],
|
||||
"exclude": ["node_modules"]
|
||||
"include": ["src/**/*.ts"],
|
||||
"exclude": ["src/**/*.test.ts", "src/legacy/**/*.ts"]
|
||||
}
|
||||
Reference in New Issue
Block a user