refactor: make match-collector export its types, and consume them in frontend
All checks were successful
pipeline / lint-and-format (push) Successful in 4m22s
pipeline / build-and-push-images (push) Successful in 2m11s

This commit is contained in:
2026-04-30 00:06:53 +02:00
parent db2ca353c5
commit e1ab81854a
36 changed files with 513 additions and 351 deletions

View File

@@ -1,3 +1,5 @@
import type { Build, ItemTree } from 'match_collector'
/**
* Gets all late game items from the item tree (items beyond first level)
* Returns a flat array of unique items with their counts
@@ -55,7 +57,9 @@ function trimTreeDepth(tree: ItemTree, maxDepth: number, currentDepth: number =
count: tree.count,
data: tree.data,
children: [],
tags: tree.tags
tags: tree.tags,
boughtWhen: tree.boughtWhen,
platformCount: tree.platformCount
}
// If we haven't reached maxDepth, include children