1
0
forked from baron/baron-sso

devfront RP 설정 표 공통화 및 레이아웃 정리

This commit is contained in:
2026-06-17 15:49:54 +09:00
parent 8b183cab61
commit c308d0a7d4
7 changed files with 656 additions and 448 deletions

View File

@@ -29,6 +29,23 @@ function mergeTomlObjects(base: TomlObject, override: TomlObject): TomlObject {
return result;
}
function setTomlValue(
target: TomlObject,
path: string[],
value: TomlValue,
): void {
let cursor: TomlObject = target;
for (let index = 0; index < path.length - 1; index += 1) {
const key = path[index];
const current = cursor[key];
if (!current || typeof current === "string") {
cursor[key] = {};
}
cursor = cursor[key] as TomlObject;
}
cursor[path[path.length - 1]] = value;
}
function isSupportedLocale(value: string): value is Locale {
return (SUPPORTED_LOCALES as readonly string[]).includes(value);
}
@@ -82,7 +99,7 @@ function parseToml(raw: string): TomlObject {
cursor = cursor[section] as TomlObject;
}
cursor[key] = value;
setTomlValue(cursor, key.split("."), value);
}
return root;