Repository navigation
feat(deps): run Launch CLI V2 on csdx 2.x with cli-utilities 2 and cli-command 2 - #279
Merged
Merged
Conversation
csdx 2.x makes every plugin resolve @contentstack/cli-utilities to csdx's own 2.x copy, which ships inquirer 12, so Launch CLI V2 crashed on startup with "inquirer.registerPrompt is not a function". Rather than shim inquirer 8 and 12, move to the 2.x packages csdx now ships: - @contentstack/cli-utilities ^1.18.5 -> ^2.0.2 - @contentstack/cli-command ^1.8.7 -> ^2.0.2, which now shares that cli-utilities instead of carrying its own 1.x copy registerSearchList() registers the custom search-list on inquirer 12's registry (its default export, via promptLibrary()). The list/checkbox paging subclass is gone: inquirer 12 has no lib/prompts to extend, and it pages list and checkbox itself from the pageSize and loop: false options askOption and askChoices already pass. Tests read the registry through promptLibrary(). The prompt-types guard puts the original registry object back, because inquirer 12's restoreDefaultPrompts() swaps in a new one rather than resetting it. Refs CL-8328 #claude_code# 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
… own copy cli-command 2's Command extends cli-utilities' Command, so on csdx 2.x the errors it throws (this.exit, parse failures) come from csdx's @oclif/core, not Launch CLI's. reportFailure() matched them with instanceof, so a declined confirm's exit 3 came out as "error: EEXIT: 3" with exit 1, and an oclif error's own exit code was lost. isOclifError() recognises an oclif error by its shape (an oclif object, and code EEXIT for an exit request) whichever copy raised it. reportFailure() and asSafeArgvFailure() use it, so the secrets:set argv redaction also still applies to a parse failure raised by csdx's copy. Refs CL-8328 #claude_code# 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
🔒 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 |
Harshi-Shah-CS
approved these changes
Nov 3, 2026
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.
What
Upgrades Launch CLI V2 to the csdx 2.x libraries, so it runs on
@contentstack/cli2.x, the current npmlatest.On csdx 2.x every
launch:*command crashed at startup witherror: inquirer.registerPrompt is not a function. csdx 2.x'sbin/run.jsmakes plugins resolve@contentstack/cli-utilitiesto csdx's own 2.x copy (inquirer 12), whatever the plugin pins. The newLaunch-cli-v2-dev11-integration-sanityGoCD pipeline found it on its first run. This replaces the inquirer 8/12 compatibility shim in #278 (closed).Dependencies
@contentstack/cli-utilities^1.18.5→^2.0.2@contentstack/cli-command^1.8.7→^2.0.2, which now shares that cli-utilities instead of a nested 1.x copyregistry.npmjs.org.Prompts (
src/core/search-list.ts)search-listis registered on inquirer 12's registry (inquirer.default, viapromptLibrary()).lib/promptsto extend, and it pages list and checkbox itself from thepageSizeandloop: falseoptionsaskOption/askChoicesalready pass. The scroll window may look slightly different from the old custom scroller.Exit codes (
src/core/failure.ts,src/secrets/secret.rules.ts)Commandextends cli-utilities'Command, so on csdx 2.x its errors come from csdx's@oclif/core, andinstanceofagainst Launch CLI's copy failed. A declined confirm exited 1 witherror: EEXIT: 3instead of exit 3.isOclifError()now matches oclif errors by shape.reportFailure()and thesecrets:setargv redaction (asSafeArgvFailure) use it.Tests
npm test: 193 suites, 3819 tests pass.npm run lintandtscare clean.deployments:listtimeout while dev11's API was slow.(y/N)prompt answerednexiting 3, and the custom search picker.Note
Launch CLI V2 now targets csdx 2.x. It hasn't been run on csdx 1.x after this change. V2 is unreleased (npm
latestfor@contentstack/cli-launchis 1.11.4).Jira: https://contentstack.atlassian.net/browse/CL-8328
#claude_code#
🤖 Generated with Claude Code