feat: add project export and import#1103
Conversation
Export bundles a project's record + mapper stores into a <projectId>.zip (archiver). Import accepts that zip and recreates the project under the current user/org with a fresh id, rewriting internal projectId references. - api: export/import service + controllers, routes (multer upload); deps archiver, multer, adm-zip - ui: Export button in Settings; New Project dropdown (Create New / Import Existing); two-step modal fix: set Sitecore entry title/url from meta regardless of field mapping test: add export/import coverage for project service, controller, and routes
🔒 Security Scan Results
⏱️ SLA Breach Summary
🟡 Medium Severity - SLA Breached Issues (with fixes)Showing 2 issue(s) that have exceeded the 90-day SLA threshold:
ℹ️ Vulnerabilities Without Available Fixes (Informational Only)The following vulnerabilities were detected but do not have fixes available (no upgrade or patch). These are excluded from failure thresholds:
❌ BUILD FAILED - Security checks failed Please review and fix the security vulnerabilities before merging. |
🔒 Security Scan Results
⏱️ SLA Breach Summary
🟡 Medium Severity - SLA Breached Issues (with fixes)Showing 2 issue(s) that have exceeded the 90-day SLA threshold:
ℹ️ Vulnerabilities Without Available Fixes (Informational Only)The following vulnerabilities were detected but do not have fixes available (no upgrade or patch). These are excluded from failure thresholds:
❌ BUILD FAILED - Security checks failed Please review and fix the security vulnerabilities before merging. |
…mproved stability
🔒 Security Scan Results
⏱️ SLA Breach Summary
🟡 Medium Severity - SLA Breached Issues (with fixes)Showing 2 issue(s) that have exceeded the 90-day SLA threshold:
ℹ️ Vulnerabilities Without Available Fixes (Informational Only)The following vulnerabilities were detected but do not have fixes available (no upgrade or patch). These are excluded from failure thresholds:
❌ BUILD FAILED - Security checks failed Please review and fix the security vulnerabilities before merging. |
🔒 Security Scan Results
⏱️ SLA Breach Summary
🟡 Medium Severity - SLA Breached Issues (with fixes)Showing 2 issue(s) that have exceeded the 90-day SLA threshold:
ℹ️ Vulnerabilities Without Available Fixes (Informational Only)The following vulnerabilities were detected but do not have fixes available (no upgrade or patch). These are excluded from failure thresholds:
❌ BUILD FAILED - Security checks failed Please review and fix the security vulnerabilities before merging. |
…pendency and add new dependencies
🔒 Security Scan Results
⏱️ SLA Breach Summary
🟡 Medium Severity - SLA Breached Issues (with fixes)Showing 2 issue(s) that have exceeded the 90-day SLA threshold:
ℹ️ Vulnerabilities Without Available Fixes (Informational Only)The following vulnerabilities were detected but do not have fixes available (no upgrade or patch). These are excluded from failure thresholds:
❌ BUILD FAILED - Security checks failed Please review and fix the security vulnerabilities before merging. |
…d clean up package-lock.json
🔒 Security Scan Results
⏱️ SLA Breach Summary
🟡 Medium Severity - SLA Breached Issues (with fixes)Showing 2 issue(s) that have exceeded the 90-day SLA threshold:
ℹ️ Vulnerabilities Without Available Fixes (Informational Only)The following vulnerabilities were detected but do not have fixes available (no upgrade or patch). These are excluded from failure thresholds:
❌ BUILD FAILED - Security checks failed Please review and fix the security vulnerabilities before merging. |
🔒 Security Scan Results
⏱️ SLA Breach Summary
ℹ️ Vulnerabilities Without Available Fixes (Informational Only)The following vulnerabilities were detected but do not have fixes available (no upgrade or patch). These are excluded from failure thresholds:
✅ BUILD PASSED - All security checks passed |
|
Reviewed the full diff (service + controller + routes + Sitecore fix + UI service). Solid PR overall — the showdown churn nets out clean (fully removed, no dangling imports). One security blocker before this can merge, rest is minor. 🔴 Blocker — Zip Slip / path traversal in
|
- import: Zip Slip guard, zip-bomb size cap, rollback on partial import - sitecore: skip url when meta.key missing (no /undefined) - ui: correct export/import error labels - tests: Zip Slip + zip-bomb coverage
🔒 Security Scan Results
⏱️ SLA Breach Summary
ℹ️ Vulnerabilities Without Available Fixes (Informational Only)The following vulnerabilities were detected but do not have fixes available (no upgrade or patch). These are excluded from failure thresholds:
✅ BUILD PASSED - All security checks passed |
🔗 Jira Ticket
. CMG-1005
· CMG-1033
📋 PR Type
📝 Description
What changed?
Project Export / Import (feature)
contentTypesMapper,field-mapper, etc.) into a<projectId>.zip, streamed from the backend viaarchiver. Added an Export Project button in Settings.database/<newId>/with their internalprojectIdreferences rewritten.initialStep(project form vs zip file picker).exportProject/importProjectservice + controllers; routesGET /org/:orgId/project/:projectId/exportandPOST /org/:orgId/project/import(multer upload). Stash/restoretoken_payloadacross multer wipingreq.body.archiver,multer,adm-zip.Sitecore entry title/url (bug fix)
title/urlwere only set inside the field-mapping loop, so entries whose content type had no mappable user fields (only system__fields) never got a title and were skipped. Now pulled straight from the Sitecore meta block so those entries are created too.Tests
Why?
🧩 Affected Areas
api— Node.js backendui— React frontendupload-api— Upload API serverdocker/docker-compose🧪 How to Test
Export / Import
<projectId>.zipdownloads (containsproject.json+ the mapper folder).Sitecore fix
__) fields.Expected result: Export produces a valid zip; import recreates the project + mappers with a new id; Sitecore entries with no user fields are no longer skipped.
📸 Screenshots / Recordings
🔗 Related PRs / Dependencies
✅ Author Checklist
feature/,bugfix/, orhotfix/+ 5–30 lowercase chars.env/example.envupdated if new environment variables were addednpm test)README.md/ docs updated if behaviour changed👀 Reviewer Notes
archiverv8 is ESM-only (no factory fn) — we usenew ZipArchive(...).archiver/adm-zip/multerare imported untyped, same as the existingexpresspattern; runs undertsx, flagged only bytsc.importProject.