data: switch to recovered game DB and refresh cards and charts
Publish GitHub Pages output / publish (push) Successful in 44s

This commit is contained in:
2026-09-29 22:48:08 +09:00
parent 5783072b12
commit 07b98db520
1259 changed files with 11228 additions and 6809 deletions
+6 -6
View File
@@ -1,12 +1,12 @@
import { writeFileSync } from 'node:fs';
import { prepareHolodoriDbSource, readHolodoriDbText } from './holodoridb-source.mjs';
import { prepareGameDbSource, readGameDbText, sourceMetadata } from './game-db-source.mjs';
const source = prepareHolodoriDbSource('kor');
const missions = JSON.parse(readHolodoriDbText(source, 'Mission.json')).map((row) => row.data)
const source = prepareGameDbSource('kor');
const missions = JSON.parse(readGameDbText(source, 'Mission.json')).map((row) => row.data)
.filter((mission) => mission.characterId
&& mission.categoryType === 'MissionCategoryType_MISSION_CATEGORY_TYPE_ACHIEVEMENT'
&& mission.type === 'MissionType_MISSION_TYPE_INCREMENT_WORK_FINISH_COUNT');
const progress = JSON.parse(readHolodoriDbText(source, 'MissionProgress.json')).map((row) => row.data);
const progress = JSON.parse(readGameDbText(source, 'MissionProgress.json')).map((row) => row.data);
if (!missions.length) throw new Error('No member Holo-work achievements found.');
const thresholdsByMember = Object.fromEntries(missions.sort((a, b) => a.characterId.localeCompare(b.characterId)).map((mission) => {
const thresholds = [...new Set(progress.filter((row) => row.missionId === mission.id).map((row) => Number(row.threshold)))].sort((a, b) => a - b);
@@ -16,7 +16,7 @@ const thresholdsByMember = Object.fromEntries(missions.sort((a, b) => a.characte
return [mission.characterId, thresholds];
}));
writeFileSync(new URL('../src/lib/data/holo-work-achievements.json', import.meta.url), JSON.stringify({
source: { repository: source.repository, commit: source.commit, files: ['Mission.json', 'MissionProgress.json'] },
source: { ...sourceMetadata(source), files: ['Mission.json', 'MissionProgress.json'] },
thresholdsByMember
}, null, 2) + '\n');
console.log(`Collected Holo-work achievements for ${missions.length} members at ${source.commit}.`);
console.log(`Collected Holo-work achievements for ${missions.length} members at ${source.masterDataVersion}.`);