DX - 9363 - fix(flags)!: remove --ignore from auth:tokens:remove and -n from config:set:region#2628
DX - 9363 - fix(flags)!: remove --ignore from auth:tokens:remove and -n from config:set:region#2628cs-raj wants to merge 3 commits into
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 |
There was a problem hiding this comment.
Pull request overview
This PR continues the v2 short-flag normalization effort by removing command-specific short flags (and one long flag entirely) that have inconsistent semantics across the CLI monorepo.
Changes:
- Removed the
--ignore(previously-i) flag fromauth:tokens:remove, making “missing token” no longer silently succeed. - Removed the
-nshort flag fromconfig:set:region --nameto avoid conflicting meaning with the universal-nused for stack name elsewhere.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| packages/contentstack-auth/src/commands/auth/tokens/remove.ts | Removes the --ignore/-i flag and simplifies the token-removal decision logic. |
| packages/contentstack-config/src/commands/config/set/region.ts | Removes the -n short flag from --name to align with cross-command short-flag semantics. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| if (token) { | ||
| log.debug('Token found.', {...this.contextDetails, hasToken: !!token }); | ||
| configHandler.delete(`tokens.${alias}`); | ||
| log.debug('Token removed from configuration.', {...this.contextDetails, alias }); | ||
| return cliux.success(`CLI_AUTH_TOKENS_REMOVE_SUCCESS`); |
🔒 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 |
What
Two breaking changes in the
clirepo as part of the v2 short-flag normalization effort.Changes
contentstack-auth—src/commands/auth/tokens/remove.tsRemoved the
--ignoreflag entirely.--ignore(previously-i) allowedauth:tokens:removeto exit silently when the specified token did not exist — effectively making deletion idempotent. This was the only command in the entire codebase with this pattern.Removed in v2 as a deliberate breaking change:
-ia command-specific short flag with no consistent meaning.Before:
After:
Static flags after change: only
alias: flags.string({ char: 'a', ... }).contentstack-config—src/commands/config/set/region.tsRemoved
-nshort flag from--name.-nis the universal short flag for--stack-nameacrossbootstrap,clone,seed, andexport-to-csv. Inconfig:set:region,--namemeans the region name — a completely different semantic. Keeping-nhere would make the same short flag mean two different things depending on which command the user runs.The long flag
--nameis unchanged — no behavioral regression.Testing
--ignore,-i, or-nin these two commands. Verified by grep.--nameinconfig:set:regionis unchanged.auth:tokens:removerun logic simplified:--ignoreguard removed,if (token || ignore)→if (token).Files Changed