fix: probably fix import failures

This commit is contained in:
zkldi
2022-12-23 07:26:16 +00:00
parent 93caf2911f
commit c8b402da4a
5 changed files with 28 additions and 20 deletions
+2 -1
View File
@@ -6,7 +6,8 @@
"scripts": {
"start": "vite",
"build": "vite build",
"lint": "eslint src --fix"
"lint": "eslint src --fix",
"preview": "vite preview"
},
"browserslist": {
"production": [
+1 -1
View File
@@ -1,3 +1,4 @@
import { FormatSieglindeBMS, FormatSieglindePMS } from "./internal-utils";
import { COLOUR_SET } from "../constants/colour-set";
import {
BMSDPSlDans,
@@ -16,7 +17,6 @@ import {
WaccaColours,
WaccaStageUps,
} from "../game-classes";
import { FormatSieglindeBMS, FormatSieglindePMS } from "../utils/util";
import type { GPTTierlists } from "..";
import type { ClassInfo, GameClassSets } from "../game-classes";
import type { ESDJudgementFormat } from "../lib/esd";
+18
View File
@@ -0,0 +1,18 @@
// putting these in "utils/util.ts" would result in dependency cycles
// which are generally pretty awful
export function FormatSieglindeBMS(sgl: number): string {
if (sgl < 13) {
return `☆${sgl.toFixed(2)}`;
}
return `★${(sgl - 12).toFixed(2)}`;
}
export function FormatSieglindePMS(sgl: number): string {
if (sgl < 13) {
return `○${sgl.toFixed(2)}`;
}
return `●${(sgl - 12).toFixed(2)}`;
}
+7 -2
View File
@@ -2,13 +2,13 @@
// their name in the database to the object they schemaify.
// The schemas themselves are wrapped in functions that throw on error.
import { GetGameConfig, GetGamePTConfig } from "../config/config";
import { allIDStrings, allImportTypes, allSupportedGames } from "../config/static-config";
import { ALL_PERMISSIONS } from "../constants/permissions";
import { GetGameConfig, GetGamePTConfig } from "../index";
import { UserAuthLevels } from "../types";
import deepmerge from "deepmerge";
import p from "prudence";
import type { GamePTConfig } from "../index";
import type { GamePTConfig } from "../config/config";
import type { Game, IDStrings, NotificationBody, Playtype, Playtypes } from "../types";
import type {
PrudenceSchema,
@@ -1135,6 +1135,11 @@ const PRE_SCHEMAS = {
};
break;
}
case "SITE_ANNOUNCEMENT": {
subSchema = {};
break;
}
}
const err = p(self, subSchema);
-16
View File
@@ -305,22 +305,6 @@ export function GetCloserGradeDelta<I extends IDStrings = IDStrings>(
return lower;
}
export function FormatSieglindeBMS(sgl: number): string {
if (sgl < 13) {
return `☆${sgl.toFixed(2)}`;
}
return `★${(sgl - 12).toFixed(2)}`;
}
export function FormatSieglindePMS(sgl: number): string {
if (sgl < 13) {
return `○${sgl.toFixed(2)}`;
}
return `●${(sgl - 12).toFixed(2)}`;
}
export function CreateSongMap<G extends Game = Game>(songs: Array<SongDocument<G>>) {
const songMap = new Map<integer, SongDocument<G>>();