feat(admin): server-safe StatusCard and Import hub polish
Split OnlineUsersWidget from StatusCard, decouple ad delete button, sync badge import to ExternalTexts+WebsiteBadges, add Import section hub with cancelable SSE jobs and upload SQL option. Co-authored-by: Cursor <[email protected]>
This commit is contained in:
1 parent
db957d7fb1
commit
9c4949186c
21 files changed
+576
-249
No files matched your search
@@ -2,11 +2,13 @@ import { existsSync, readFileSync } from "node:fs";
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
const ROUTES = [
|
||||
"audit",
|
||||
"badges",
|
||||
"badges/edit",
|
||||
"clone",
|
||||
"clone/batch",
|
||||
"clone/icon",
|
||||
"clone/sync-all",
|
||||
"clothing",
|
||||
"clothing/batch",
|
||||
"clothing/sets",
|
||||
@@ -17,7 +19,9 @@ const ROUTES = [
|
||||
"furni/batch",
|
||||
"furni/batch-regen",
|
||||
"furni/nitro-editor",
|
||||
"furni/repair-icons",
|
||||
"furni/resync",
|
||||
"furni/upload",
|
||||
"pets",
|
||||
"pets/batch",
|
||||
"pets/icon",
|
||||
@@ -35,4 +39,17 @@ describe("admin import backend contract", () => {
|
||||
const source = readFileSync("src/actions/import-furni.ts", "utf8");
|
||||
expect(source).not.toContain("deleted: 0, remaining: 0");
|
||||
});
|
||||
|
||||
it("keeps badge import ExternalTexts + WebsiteBadges in sync", () => {
|
||||
const service = readFileSync("src/lib/services/import-badge.ts", "utf8");
|
||||
expect(service).toContain("ExternalTexts.json");
|
||||
expect(service).toContain("WebsiteBadges");
|
||||
expect(service).toContain("importBadgeSynced");
|
||||
expect(readFileSync("src/actions/import-badges.ts", "utf8")).toContain(
|
||||
"importBadgeSynced",
|
||||
);
|
||||
expect(
|
||||
readFileSync("src/app/api/admin/import/badges/route.ts", "utf8"),
|
||||
).toContain("importBadgeSynced");
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user