feat(housekeeping): integrate studio operations

This commit is contained in:
2026-08-30 15:29:58 +02:00
parent 020c06f172
commit 2e95a106e0
36 changed files with 2296 additions and 60 deletions
+8 -1
View File
@@ -635,14 +635,21 @@ export interface FixAllResult {
/** Run every repair in a sensible order, then return before/after health. */
export async function fixEverything(
opts: { dedupePages?: boolean } = {},
opts: { dedupePages?: boolean; signal?: AbortSignal } = {},
): Promise<FixAllResult> {
opts.signal?.throwIfAborted();
const healthBefore = await getFurniHealth();
opts.signal?.throwIfAborted();
const sprite = await fixSpriteIds();
opts.signal?.throwIfAborted();
const offers = await fixCatalogOffers();
opts.signal?.throwIfAborted();
const reconcile = await reconcileIds();
opts.signal?.throwIfAborted();
const dedup = await removeDuplicates(opts.dedupePages ?? true);
opts.signal?.throwIfAborted();
const align = await forceItemsBaseIdsToFurnidata(true);
opts.signal?.throwIfAborted();
const healthAfter = await getFurniHealth();
return { healthBefore, sprite, offers, reconcile, dedup, align, healthAfter };
}