Skip to content

fix: resolve correct path in clone while running import#159

Merged
naman-contentstack merged 1 commit into
v2-devfrom
fix/DX-7606
May 22, 2026
Merged

fix: resolve correct path in clone while running import#159
naman-contentstack merged 1 commit into
v2-devfrom
fix/DX-7606

Conversation

@naman-contentstack
Copy link
Copy Markdown
Contributor


Summary

  • During the clone flow, the export phase resolves and sets contentDir to the local contents/ folder under the package root, but this value was not being persisted on this.config
    before the import phase began.
  • When import later resolved contentDir, it fell back to pathDir or the default path, causing a path mismatch and failing to locate the exported content.
  • Fix: assign this.config.contentDir = exportDir immediately after computing it in cmdExport, and update the import-phase resolution to prefer the already-set
    this.config.contentDir before falling back to pathDir or the default.

Changes

  • clone-handler.ts (cmdExport): Persist the resolved export directory to this.config.contentDir so it's available downstream.
  • clone-handler.ts (import path resolution): Change fallback order from pathDir || default to contentDir || pathDir || default, ensuring the export-phase path is honoured.

@naman-contentstack naman-contentstack self-assigned this May 21, 2026
@naman-contentstack naman-contentstack requested a review from a team as a code owner May 21, 2026 11:52
@github-actions
Copy link
Copy Markdown

🔒 Security Scan Results

ℹ️ Note: Only vulnerabilities with available fixes (upgrades or patches) are counted toward thresholds.

Check Type Count (with fixes) Without fixes Threshold Result
🔴 Critical Severity 0 0 10 ✅ Passed
🟠 High Severity 0 0 25 ✅ Passed
🟡 Medium Severity 0 0 500 ✅ Passed
🔵 Low Severity 0 0 1000 ✅ Passed

⏱️ SLA Breach Summary

✅ No SLA breaches detected. All vulnerabilities are within acceptable time thresholds.

Severity Breaches (with fixes) Breaches (no fixes) SLA Threshold (with/no fixes) Status
🔴 Critical 0 0 15 / 30 days ✅ Passed
🟠 High 0 0 30 / 120 days ✅ Passed
🟡 Medium 0 0 90 / 365 days ✅ Passed
🔵 Low 0 0 180 / 365 days ✅ Passed

✅ BUILD PASSED - All security checks passed

Copy link
Copy Markdown

@aniket-shikhare-cstk aniket-shikhare-cstk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@naman-contentstack naman-contentstack merged commit 8d81f9a into v2-dev May 22, 2026
9 checks passed
@naman-contentstack naman-contentstack deleted the fix/DX-7606 branch May 22, 2026 06:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants