feat(catalog): store furniture bundles as .hab instead of .nitro
Gitea Actions Runner Test / test-job (push) Successful in 1s
CI / check (push) Successful in 29s
CI / tests-unit (push) Failing after 1m37s
CI / tests-integration (push) Successful in 1m37s
CI / tests-ui (push) Successful in 2m17s
CI / preflight (push) Skipped
CI / deploy (push) Skipped

Every bundle the CMS writes — upload, clone, sync, repair and the pet /
effect / figure importers — now lands as `<classname>.hab`, the extension
this deployment's renderer asks for. `.hab` and `.nitro` are the same
container, so an upload of either extension is accepted.

Resolution goes through one module, src/lib/furni/bundle-file.ts, so
nothing has to know the extension twice. Every existence check probes
`.hab` first and falls back to `.nitro`: the on-disk asset set is still
predominantly `.nitro`, and without the fallback Studio would report every
imported item as missing and the cleanup scan would classify 18k live
bundles as fake leftovers. Downloads are unchanged — Habbo's CDN and every
configured clone source still serve `.nitro`, so the conversion happens on
write, not on request.

Deliberately unchanged: the staged-attachment store in furni-attachment.ts
keys on a UUID and never reaches the client, so renaming it would break
in-flight recovery jobs.

Adds scripts/migrate-nitro-to-hab.ts to rename the existing asset set. It
refuses to run without --dry-run or --yes, never overwrites an existing
.hab, never deletes, and is idempotent.

Note: renderer-config.json lives outside this repo and was patched to
.hab separately; that file is served with a 30-day max-age, so returning
clients need a cms-client cache purge to pick the change up.
This commit is contained in:
openhands committed 2026-10-10 17:09:36 +02:00
1 parent fdb7af7ef5
commit adffac7360
46 files changed
+1001 -210

No files matched your search

+12 -12
View File
@@ -4740,8 +4740,8 @@
"GenerateSQL": "Generate SQL",
"Customparams": "Custom params",
"Files": "Files",
"nitrofile": ".nitro file *",
"Thenitrobundlefilemax50MB": "The .nitro bundle file (max 50MB)",
"nitrofile": ".hab file *",
"Thenitrobundlefilemax50MB": "The furniture bundle file (max 50MB). Stored as .hab; a .nitro is accepted too.",
"IconPNG": "Icon (PNG)",
"Optional64x64PNGiconmax2MBLeaveemptytoskip": "Optional 64x64 PNG icon (max 2MB). Leave empty to skip.",
"ImportSuccessful": "Import Successful",
@@ -4780,14 +4780,14 @@
"Noitems": "No items.",
"Deleteall": "Delete all",
"errorClassname": "Classname required",
"errorNitroRequired": ".nitro file required",
"errorNitroSize": ".nitro file must be under 50MB"
"errorNitroRequired": ".hab file required",
"errorNitroSize": ".hab file must be under 50MB"
}
}
},
"furniDescription": "Import furniture definitions, SWF files, and icons.",
"upload": "Upload .nitro",
"uploadDescription": "Upload .nitro bundles and icons directly without SWF conversion.",
"upload": "Upload .hab",
"uploadDescription": "Upload .hab bundles and icons directly without SWF conversion.",
"clothing": {
"importClothingClient": {
"libraries": "libraries",
@@ -5598,7 +5598,7 @@
"1Select2Review3Import": "1. Select → 2. Review → 3. Import",
"Source": "Source:",
"Destination": "Destination:",
"localcatalogfurnidatanitroandicons": "local catalog, furnidata, .nitro and icons",
"localcatalogfurnidatanitroandicons": "local catalog, furnidata, bundle and icons",
"Translation`": "Translation:",
"Selection": "Selection:",
"furnitureitems": "furniture items",
@@ -5650,8 +5650,8 @@
"Scanthenitrodirectoriesforfakebundlesnomatchingfurnitureandbrokenbundlesunparseableandremovethem": "Scan the nitro directories for fake bundles (no matching furniture) and broken bundles (unparseable) and remove them.",
"RepairMissingIcons": "Repair Missing Icons",
"ScanallexistingfurnitureanddownloadanymissingiconfilesIconsareextractedfromlocalnitrobundlesorfetchedfromconfiguredclonesources": "Scan all existing furniture and download any missing icon files. Icons are extracted from local .nitro bundles or fetched from configured clone sources.",
"UploadnitroFurniture": "Upload .nitro Furniture",
"UploadanitrobundleandoptionalicontoimportfurnitureintothehotelThedatabaseentrycatalogitemandFurnitureDatajsonwillbeupdatedautomatically": "Upload a .nitro bundle and optional icon to import furniture into the hotel. The database entry, catalog item, and FurnitureData.json will be updated automatically.",
"UploadnitroFurniture": "Upload .hab Furniture",
"UploadanitrobundleandoptionalicontoimportfurnitureintothehotelThedatabaseentrycatalogitemandFurnitureDatajsonwillbeupdatedautomatically": "Upload a .hab bundle and optional icon to import furniture into the hotel. The database entry, catalog item, and FurnitureData.json will be updated automatically.",
"NewBanner": "New Banner",
"Title": "Title",
"Subtitle": "Subtitle",
@@ -5715,7 +5715,7 @@
"Price": "Price",
"credits`": "credits",
"Importaddtocatalog": "Import & add to catalog",
"ThisfurniisintheDBbutthenitrofileismissing": "This furni is in the DB but the .nitro file is missing.",
"ThisfurniisintheDBbutthenitrofileismissing": "This furni is in the DB but its bundle file is missing.",
"Regeneratenitro": "Regenerate .nitro",
"Editnitro": "Edit nitro",
"Deleteimportedfurni": "Delete imported furni",
@@ -6743,11 +6743,11 @@
"available": "File found; content will be verified during import",
"recover": "Attach original file and resume",
"recoveryHint": "Choose {file} for this furniture (maximum 50 MB). Its identity is checked before use. Resuming retries the failed items and preserves completed imports.",
"attach": "Choose the original .nitro file",
"attach": "Choose the original .hab file",
"working": "Validating file or resuming import...",
"attached": "Matching original file attached",
"resume": "Resume failed imports with this file",
"invalidFile": "Could not attach the file. Select a valid original .nitro for this furniture, up to 50 MB, and try again.",
"invalidFile": "Could not attach the file. Select a valid original .hab for this furniture, up to 50 MB, and try again.",
"resumeError": "Could not resume. Refresh the history and use the latest retry; check the original file and try again.",
"mismatchedFile": "This file belongs to different furniture.",
"alreadyStarted": "Recovery already started. Refresh the history and use the latest retry.",