feat(import): add --skip-taxonomy-publish flag, default true#197
Open
cs-raj wants to merge 1 commit into
Open
Conversation
🔒 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds a
--skip-taxonomy-publishflag to thecm:stacks:importcommand, following the same pattern as the existing--skip-entries-publishand--skip-assets-publishflags.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--skip-taxonomy-publishboolean flag withdefault: trueand a description.src/types/import-config.tsskipTaxonomyPublish?: booleanto theImportConfiginterface (optional, consistent withskipEntriesPublishandskipAssetsPublish).src/types/default-config.tsskipTaxonomyPublish?: booleanto theDefaultConfiginterface.src/config/index.tsskipTaxonomyPublish: trueto 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.tsconfig.skipTaxonomyPublish = importCmdFlags['skip-taxonomy-publish'] ?? trueto always assign the flag value into config. Uses?? true(not a conditionalif).src/import/modules/taxonomies.tsskipTaxonomyPublish === falsein three places:start()— the publish progress block andprocessTaxonomyPublishing()call.initializeTaxonomiesProgress()— skips adding theTAXONOMIES_PUBLISHprocess to the progress manager.analyzeTaxonomies()— skips counting publish-eligible taxonomies (env mapper read +countPublishEligibleTaxonomies).=== falsecheck (not!flag) so thatundefinedsafely defaults to skip, not publish.test/unit/import/modules/locales.test.tsskipTaxonomyPublish: trueto themockConfigobject literal (required because the variable is strictly typed asImportConfigwithout anascast).test/unit/utils/import-config-handler.test.tsshould set skipTaxonomyPublish to true by default— verifies the?? truefallback.should allow skipTaxonomyPublish to be overridden to false— verifies that passing'skip-taxonomy-publish': falsepropagates correctly.Behavior
skipTaxonomyPublishvaluetrue(default)--skip-taxonomy-publishtruetrue(fromconfig/index.ts)Notes
base-class.ts— thepublish-taxonomiesswitch case, theTAXONOMIES_PUBLISHprocess constants, and theprocessTaxonomyPublishing()method were already scaffolded.--skip-entries-publishand--skip-assets-publish.defaulton the CLI flag and the hardcoded value inconfig/index.tsshould both be changed tofalse.