feat(catalog): repair missing furniture components with verified status
CI / check (push) Successful in 1m33s
CI / deploy (push) Successful in 1m22s
CI / e2e (push) Successful in 24s

This commit is contained in:
Simo committed 2026-09-05 18:12:34 +02:00
1 parent 3c24df9b1d
commit 570f3dde44
13 files changed
+438 -164

No files matched your search

+10 -4
View File
@@ -513,6 +513,7 @@ export async function importSingleFurni(params: {
skipFurniDataWrite?: boolean;
updateExisting?: boolean;
repairExisting?: boolean;
preserveAssets?: boolean;
/** Validated matching bundle supplied by a queued import. */
providedNitro?: Buffer;
onProgress?: (status: string) => void;
@@ -702,14 +703,14 @@ export async function importSingleFurni(params: {
let iconFailure = "",
swfFailure = "";
const [iconOkResult, swfOk] = await Promise.all([
preservingExisting && existsSync(iconPath)
(preservingExisting || params.preserveAssets) && existsSync(iconPath)
? Promise.resolve(true)
: tryDownloadCandidates(iconUrls, iconPath, "png", (detail) => {
iconFailure = detail;
}),
params.providedNitro
params.providedNitro || (params.preserveAssets && existsSync(nitroPath))
? Promise.resolve(false)
: preservingExisting && existsSync(swfPath)
: (preservingExisting || params.preserveAssets) && existsSync(swfPath)
? Promise.resolve(true)
: tryDownloadCandidates(swfUrls, swfPath, "swf", (detail) => {
swfFailure = detail;
@@ -753,7 +754,12 @@ export async function importSingleFurni(params: {
);
}
if (!swfOk && !nitroDownloadOk && !params.providedNitro)
if (
!swfOk &&
!nitroDownloadOk &&
!params.providedNitro &&
!(params.preserveAssets && existsSync(nitroPath))
)
warnings.push(`SWF download failed: ${swfFailure || "unknown cause"}`);
// ── Convert SWF to Nitro ──────────────────────────────────────────