Frontend (client-side): - Add JSZip dependency for ZIP creation/parsing - StyleCard: export style as ZIP with image in images/styles/ - MixCard: export mix as ZIP with referenced styles + all images - main.tsx: client-side ZIP parsing for small mix imports - Detect name collisions with existing library - Prompt user per conflicting item (OK=replace, Cancel=rename) - Rewrite JSON client-side before upload Backend (complementary/alternative): - Add import_mode (replace/merge) and duplicate_policy (rename/replace/skip) - _merge_data(): comprehensive merge with ID remapping, conflict resolution - _apply_import(): orchestrates import with validation and summary - POST /api/data: accepts import params, returns detailed summary - POST /api/restore.zip: accepts mode/policy query params, uses merge logic - Summary includes: added/conflicted styles and mixes (max 10 each)
29 lines
744 B
JSON
29 lines
744 B
JSON
{
|
|
"name": "comfyui-immac-style-mixer",
|
|
"private": true,
|
|
"version": "0.1.0",
|
|
"type": "module",
|
|
"scripts": {
|
|
"dev": "vite",
|
|
"build": "tsc && vite build",
|
|
"watch": "tsc && vite build --watch",
|
|
"typecheck": "tsc --noEmit",
|
|
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0"
|
|
},
|
|
"dependencies": {
|
|
"jszip": "^3.10.1",
|
|
"react": "^18.2.0",
|
|
"react-dom": "^18.2.0",
|
|
"react-resizable-panels": "^4.7.0"
|
|
},
|
|
"devDependencies": {
|
|
"@comfyorg/comfyui-frontend-types": "^1.20.2",
|
|
"@types/node": "^25.3.3",
|
|
"@types/react": "^18.2.66",
|
|
"@types/react-dom": "^18.2.22",
|
|
"@vitejs/plugin-react": "^4.2.1",
|
|
"typescript": "^5.4.2",
|
|
"vite": "^5.2.10"
|
|
}
|
|
}
|