refactor: clean up duplicate imports and dead code
- Merge type and value imports from the same module into single imports - Remove dead import-badges action (flow uses /api/admin/import/badges) - Remove unused babel-plugin-react-compiler devDependency - Remove stray test.txt file - Update knip config: track css imports, drop redundant ignore entries - Update contract test to drop obsolete dead-action assertion
This commit is contained in:
1 parent
76730b84cf
commit
ae1393d3e3
15 files changed
+45
-75
No files matched your search
@@ -4,23 +4,6 @@ import { and, eq, type SQL, sql } from "drizzle-orm";
|
||||
import { CatalogPages, db, ItemsBase } from "@/lib/db";
|
||||
import { officialHabboEnrichmentWarning } from "@/lib/habbo-gamedata-hotel";
|
||||
import { logger } from "@/lib/logger";
|
||||
import {
|
||||
appendFurniEntry,
|
||||
buildFurniEntry,
|
||||
removeFurniEntry,
|
||||
} from "@/lib/services/furni-data";
|
||||
import type { OfficialHabboFurniEntry } from "@/lib/services/habbo-furnidata-cache";
|
||||
import { lookupOfficialHabboFurni } from "@/lib/services/habbo-furnidata-cache";
|
||||
import { getHabboGamedataHotel } from "@/lib/services/habbo-gamedata-hotel";
|
||||
|
||||
// Re-export the download helpers now owned by the shared import core.
|
||||
// Existing furni callers keep importing them from here.
|
||||
export {
|
||||
downloadFile,
|
||||
validatePngBytes,
|
||||
validateSwfBytes,
|
||||
} from "@/lib/services/import/core/download";
|
||||
|
||||
import {
|
||||
DEFAULT_FURNI_ICON_DIR,
|
||||
DEFAULT_FURNI_NITRO_DIR,
|
||||
@@ -28,14 +11,32 @@ import {
|
||||
getFurniAssetDirs,
|
||||
getFurniAssetWriteTargets,
|
||||
} from "@/lib/services/furni-asset-dirs";
|
||||
import { downloadFile } from "@/lib/services/import/core/download";
|
||||
import type { ConversionResult } from "@/lib/services/swf-to-nitro";
|
||||
import {
|
||||
appendFurniEntry,
|
||||
buildFurniEntry,
|
||||
removeFurniEntry,
|
||||
} from "@/lib/services/furni-data";
|
||||
import {
|
||||
lookupOfficialHabboFurni,
|
||||
type OfficialHabboFurniEntry,
|
||||
} from "@/lib/services/habbo-furnidata-cache";
|
||||
import { getHabboGamedataHotel } from "@/lib/services/habbo-gamedata-hotel";
|
||||
import {
|
||||
downloadFile,
|
||||
validatePngBytes,
|
||||
validateSwfBytes,
|
||||
} from "@/lib/services/import/core/download";
|
||||
import {
|
||||
type ConversionResult,
|
||||
convertSwfToNitro,
|
||||
extractIconFromSwf,
|
||||
} from "@/lib/services/swf-to-nitro";
|
||||
import type { ImportSingleResult } from "@/types/furni";
|
||||
|
||||
// Re-export the download helpers now owned by the shared import core.
|
||||
// Existing furni callers keep importing them from here.
|
||||
export { downloadFile, validatePngBytes, validateSwfBytes };
|
||||
|
||||
// ── Constants ────────────────────────────────────────────────────────
|
||||
|
||||
// turbopackIgnore hints: this module is reached by App Router routes; without
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { describe, expect, it, vi } from "vitest";
|
||||
import type { CurrencyDb } from "./send-currency";
|
||||
import { type CurrencyDb, sendCurrency } from "./send-currency";
|
||||
|
||||
vi.mock("@/lib/db", () => ({
|
||||
db: {},
|
||||
@@ -9,8 +9,6 @@ vi.mock("@/lib/db", () => ({
|
||||
|
||||
vi.mock("@/lib/services/rcon", () => ({}));
|
||||
|
||||
import { sendCurrency } from "./send-currency";
|
||||
|
||||
const mockDb = {} as CurrencyDb;
|
||||
|
||||
describe("sendCurrency", () => {
|
||||
|
||||
Reference in new issue
Block a user