Skip to content

feat(import): add --skip-taxonomy-publish flag, default true#197

Open
cs-raj wants to merge 1 commit into
feat/taxonomy-publishingfrom
enhc/DX-8556
Open

feat(import): add --skip-taxonomy-publish flag, default true#197
cs-raj wants to merge 1 commit into
feat/taxonomy-publishingfrom
enhc/DX-8556

Conversation

@cs-raj
Copy link
Copy Markdown
Contributor

@cs-raj cs-raj commented May 30, 2026

Summary

This PR adds a --skip-taxonomy-publish flag to the cm:stacks:import command, following the same pattern as the existing --skip-entries-publish and --skip-assets-publish flags.

Why default: true?

Unlike entries and assets where publishing happens by default, taxonomy publishing defaults to skipped because the taxonomy publish feature is not yet released on the platform. This ensures existing import workflows are not broken and no unexpected publish API calls are made. Once the feature is released, the default can be flipped to false.


Changes

src/commands/cm/stacks/import.ts

  • Added --skip-taxonomy-publish boolean flag with default: true and a description.

src/types/import-config.ts

  • Added skipTaxonomyPublish?: boolean to the ImportConfig interface (optional, consistent with skipEntriesPublish and skipAssetsPublish).

src/types/default-config.ts

  • Added skipTaxonomyPublish?: boolean to the DefaultConfig interface.

src/config/index.ts

  • Added skipTaxonomyPublish: true to the hardcoded default config object. This is the safety net for programmatic usage (e.g., config loaded from file without the CLI flag).

src/utils/import-config-handler.ts

  • Added config.skipTaxonomyPublish = importCmdFlags['skip-taxonomy-publish'] ?? true to always assign the flag value into config. Uses ?? true (not a conditional if).

src/import/modules/taxonomies.ts

  • Gated the taxonomy publish flow behind skipTaxonomyPublish === false in three places:
    1. start() — the publish progress block and processTaxonomyPublishing() call.
    2. initializeTaxonomiesProgress() — skips adding the TAXONOMIES_PUBLISH process to the progress manager.
    3. analyzeTaxonomies() — skips counting publish-eligible taxonomies (env mapper read + countPublishEligibleTaxonomies).
  • Uses explicit === false check (not !flag) so that undefined safely defaults to skip, not publish.

test/unit/import/modules/locales.test.ts

  • Added skipTaxonomyPublish: true to the mockConfig object literal (required because the variable is strictly typed as ImportConfig without an as cast).

test/unit/utils/import-config-handler.test.ts

  • Added two new test cases:
    • should set skipTaxonomyPublish to true by default — verifies the ?? true fallback.
    • should allow skipTaxonomyPublish to be overridden to false — verifies that passing 'skip-taxonomy-publish': false propagates correctly.

Behavior

Scenario skipTaxonomyPublish value Result
User does not pass flag true (default) Taxonomy publishing skipped
User passes --skip-taxonomy-publish true Taxonomy publishing skipped
Config loaded from file (no CLI) true (from config/index.ts) Taxonomy publishing skipped

Notes

  • No changes to the taxonomy publish API implementation in base-class.ts — the publish-taxonomies switch case, the TAXONOMIES_PUBLISH process constants, and the processTaxonomyPublishing() method were already scaffolded.
  • The flag follows the same naming convention as --skip-entries-publish and --skip-assets-publish.
  • When the taxonomy publish feature is released, the default on the CLI flag and the hardcoded value in config/index.ts should both be changed to false.

@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 1 41 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

ℹ️ 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: 0
  • High without fixes: 41
  • Medium without fixes: 0
  • Low without fixes: 0

✅ BUILD PASSED - All security checks passed

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.

1 participant