Skip to content

enhc: Added taxonomy publish details for all taxonomy#112

Merged
cs-raj merged 1 commit intofeat/taxonomy-publishingfrom
enhc/DX-6002
Apr 27, 2026
Merged

enhc: Added taxonomy publish details for all taxonomy#112
cs-raj merged 1 commit intofeat/taxonomy-publishingfrom
enhc/DX-6002

Conversation

@cs-raj
Copy link
Copy Markdown
Contributor

@cs-raj cs-raj commented Apr 27, 2026

Summary

Ensures taxonomy export JSON files retain publish_details when the per-UID export API omits or returns empty publish metadata. This is achieved by caching publish_details from the taxonomy list (find) API and merging them only when the detailed export is empty.

Problem

  • The list call (taxonomy().query(…).find()) with include_publish_details: true can return publish_details on each taxonomy.
  • The detailed export per UID (export-taxonomy) may not include the same publish_details (it can be null, [], or {}).
  • This led to on-disk exports missing publish information even though the list response had it.

Solution

  • Cache list publish_details during fetch/sanitize, keyed by locale bucket (localeCode) or _default for non-localized list fetch.
  • After each successful detailed export, cloneDeep the response and merge cached list publish_details into taxonomy.publish_details only if the export value is considered empty (missing, null, empty array, or empty object).
  • Do not overwrite non-empty publish_details returned by the detailed export.
  • On legacy fallback (locale-based export not supported), reset publishDetailsByLocale along with other taxonomy state so buckets stay consistent.

Technical notes

  • Query continues to request include_publish_details: true via shared query settings (qs).
  • Merge runs in exportTaxonomies.onSuccess, immediately before writeFile for each {locale}/{uid}.json or legacy {uid}.json.

Files changed

  • cli-plugins/packages/contentstack-export/src/export/modules/taxonomies.ts: includes changes for publishDetailsByLocale, sanitize merge capture, mergeListPublishDetailsIntoExportPayload / helpers, legacy reset in determineExportStrategy
  • (If applicable in your branch)
    • cli-plugins/packages/contentstack-export/test/unit/export/modules/taxonomies.test.ts: coverage for merge behavior (legacy / locale, no clobber, empty fill)
    • (If applicable)
      • cli-plugins/packages/contentstack-export/src/export/modules/taxonomies-flow.md: flow/docs for publish cache and merge policy.

@cs-raj cs-raj requested a review from a team as a code owner April 27, 2026 05:38
@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 174 10 ✅ Passed
🟠 High Severity 0 174 25 ✅ Passed
🟡 Medium Severity 2 732 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

ℹ️ 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:

  • Critical without fixes: 174
  • High without fixes: 174
  • Medium without fixes: 732
  • Low without fixes: 0

✅ BUILD PASSED - All security checks passed

@cs-raj cs-raj merged commit 0f16186 into feat/taxonomy-publishing Apr 27, 2026
7 checks passed
@cs-raj cs-raj deleted the enhc/DX-6002 branch April 27, 2026 09:27
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.

3 participants