feat(studio): expand nitro cleanup with repair, auto-clean, and orphaned assets
Scan distinguishes fake, broken, and orphaned SWF/icon assets with age metadata, deletes per asset kind, re-downloads broken nitro bundles from configured sources, auto-cleans old fake leftovers, and exports a JSON manifest. Adds rebuild and auto-clean API endpoints with audit coverage and a housekeeping preview route under the hotel domain. Verified: full vitest suite (2213 tests), typecheck, and biome all pass.
This commit is contained in:
@@ -77,6 +77,7 @@ const expectedManifests = [
|
||||
labelKey: "pages.housekeeping.domains.operations.title",
|
||||
descriptionKey: "pages.housekeeping.domains.operations.description",
|
||||
slugs: [PERMS.ADMIN_DASHBOARD, PERMS.ASSETS_IMPORT],
|
||||
routes: [],
|
||||
},
|
||||
{
|
||||
id: "people",
|
||||
@@ -108,6 +109,7 @@ const expectedManifests = [
|
||||
PERMS.MOD_CFH_EDIT,
|
||||
PERMS.MOD_TICKETS_EDIT,
|
||||
],
|
||||
routes: [],
|
||||
},
|
||||
{
|
||||
id: "content",
|
||||
@@ -131,6 +133,7 @@ const expectedManifests = [
|
||||
PERMS.SETTINGS_VIEW,
|
||||
PERMS.SETTINGS_EDIT,
|
||||
],
|
||||
routes: [],
|
||||
},
|
||||
{
|
||||
id: "economy",
|
||||
@@ -144,6 +147,7 @@ const expectedManifests = [
|
||||
PERMS.CATALOG_EDIT,
|
||||
PERMS.SHOP_EDIT,
|
||||
],
|
||||
routes: [],
|
||||
},
|
||||
{
|
||||
id: "hotel",
|
||||
@@ -161,6 +165,14 @@ const expectedManifests = [
|
||||
PERMS.PAGES_VIEW,
|
||||
PERMS.CATALOG_EDIT,
|
||||
],
|
||||
routes: [
|
||||
{
|
||||
id: "nitro-cleanup",
|
||||
labelKey: "pages.housekeeping.domains.hotel.routes.nitroCleanup",
|
||||
href: "/admin-next/hotel/nitro-cleanup",
|
||||
capability: { mode: "any", slugs: [PERMS.ASSETS_IMPORT] },
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
id: "system",
|
||||
@@ -180,6 +192,7 @@ const expectedManifests = [
|
||||
PERMS.SETTINGS_EDIT,
|
||||
PERMS.NOTIFICATIONS_EDIT,
|
||||
],
|
||||
routes: [],
|
||||
},
|
||||
] as const;
|
||||
describe("housekeeping registry", () => {
|
||||
@@ -324,7 +337,7 @@ describe("housekeeping registry", () => {
|
||||
labelKey: expected.labelKey,
|
||||
descriptionKey: expected.descriptionKey,
|
||||
});
|
||||
expect(actual.routes).toEqual([]);
|
||||
expect(actual.routes).toEqual(expected.routes);
|
||||
expect(actual.searchProviders).toEqual([]);
|
||||
expect(actual.inboxSources).toEqual([]);
|
||||
expect(actual.widgets).toEqual([]);
|
||||
|
||||
Reference in New Issue
Block a user