mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2026-08-24 15:22:20 +10:00
refactor: remove dead code, unused exports and redundant dependencies
- drop dotenv (Node 24 process.loadEnvFile) and dompurify (only used by dead code) - delete unused ui components/hooks (card, progress, checkbox, use-confirm, use-prompt) - delete dead sanitizeHtml/sanitizeCss, url-security helpers, patch-resume tool, schema/page, createResumePatches, patch-proposal preview builder, fonts fallback helpers - inline single-caller wrappers (flags service, auth getSession, pdf renderer passthrough) - deduplicate template color helpers into shared/color-helpers - unexport 50+ internal-only symbols, remove dead export-map entries - replace hand-rolled unique()/useIsMobile with Set spread and usehooks-ts
This commit is contained in:
@@ -4,10 +4,13 @@ import { jsonrepair } from "jsonrepair";
|
||||
import { flattenError, ZodError } from "zod";
|
||||
import { resumeDataSchema } from "@reactive-resume/schema/resume/data";
|
||||
import { defaultResumeData } from "@reactive-resume/schema/resume/default";
|
||||
import { isObject } from "@reactive-resume/utils/sanitize";
|
||||
import { generateId } from "@reactive-resume/utils/string";
|
||||
import { buildAiExtractionTemplate } from "./extraction-template";
|
||||
|
||||
function isObject(value: unknown): value is Record<string, unknown> {
|
||||
return typeof value === "object" && value !== null && !Array.isArray(value);
|
||||
}
|
||||
|
||||
const aiExtractionTemplate = buildAiExtractionTemplate();
|
||||
|
||||
type SectionKey = keyof typeof sectionRequiredFieldMap;
|
||||
@@ -24,13 +27,13 @@ type DroppedSectionItemEntry = {
|
||||
reason: string;
|
||||
};
|
||||
|
||||
export type ResumeSanitizationDiagnostics = {
|
||||
type ResumeSanitizationDiagnostics = {
|
||||
coercions: CoercionEntry[];
|
||||
droppedSectionItems: DroppedSectionItemEntry[];
|
||||
salvageApplied: boolean;
|
||||
};
|
||||
|
||||
export type ResumeSanitizationResult = {
|
||||
type ResumeSanitizationResult = {
|
||||
data: ResumeData;
|
||||
diagnostics: ResumeSanitizationDiagnostics;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user