Finish basic setup for configuration loading

This commit is contained in:
Dominic Ferrando
2026-07-04 19:05:38 -04:00
parent a888d24bfd
commit 338a40d947
11 changed files with 5724 additions and 272 deletions
+3 -3
View File
@@ -10,8 +10,8 @@ import {
type Player,
} from "@blade-and-brawn/domain";
import { levenbergMarquardt as LM } from "ml-levenberg-marquardt";
import defaultStandardsParamsJson from "./data/standards/default-params.json" with { type: "json" };
import defaultStandardsDataJson from "./data/standards/default-data.json" with { type: "json" };
import defaultStandardsParamsJson from "./data/standards/fallback-params.json" with { type: "json" };
import defaultStandardsDataJson from "./data/standards/fallback-data.json" with { type: "json" };
import { getAvgWeight } from "./avg-weights";
import { StandardsDataSchema, StandardsParamsSchema, type LevelCalculatorOutput, type Levels, type NumberMetric, type Standard, type StandardsConfig, type StandardsData } from "./models";
import { Value } from "@sinclair/typebox/value";
@@ -36,7 +36,7 @@ const metricPriority = (m: NumberMetric) => {
Value.Assert(StandardsDataSchema, defaultStandardsDataJson);
Value.Assert(StandardsParamsSchema, defaultStandardsParamsJson);
export const DEFAULT_STANDARDS_CONFIG: StandardsConfig = {
export const FALLBACK_STANDARDS_CONFIG: StandardsConfig = {
data: defaultStandardsDataJson,
params: defaultStandardsParamsJson
};