Repository navigation
fix(cli): dev entry point works without a build; lists show seven options and never wrap round - #251
Conversation
bin/dev.js runs the TypeScript sources under ts-node, but required its standalone failure handler from ../dist/core/failure. On a fresh clone with no build it crashed with "Cannot find module '../dist/core/failure'" before any command ran, and with a stale dist it used an outdated handler instead of the source being edited. It now requires ../src/core/failure, which ts-node compiles on the fly. Found in review of #248. #claude_code# 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Harshi Shah <harshi.shah@contentstack.com> 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 |
…so plain `node bin/dev` works Requiring ../src/core/failure at startup only worked under the ts-node shebang (./bin/dev.js). `node bin/dev` is plain Node: it ignores the shebang, and ts-node is registered only once oclif's development mode loads a TypeScript command, so the require crashed every command with "Cannot find module '../src/core/failure'". The handler is now resolved when a failure happens: the source handler when ts-node is registered, else the build's, else oclif's own handler. Checked under `node bin/dev` and ./bin/dev.js, each with and without a dist/: commands run, and an unknown command, an unknown flag and an API error each print one `error:` line with their exit code. #claude_code# 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Harshi Shah <harshi.shah@contentstack.com> Co-Authored-By: Claude <noreply@anthropic.com>
🔒 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 |
#claude_code# 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Harshi Shah <harshi.shah@contentstack.com> Co-Authored-By: Claude <noreply@anthropic.com>
🔒 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 |
…ect pickers wrapping round Every arrow-key list and checklist (framework preset, response mode, Contentstack Authentication, project type, branch, the env:update and variables checklists) now shows at most five options and scrolls for the rest: PROMPT_PAGE_SIZE drops from 15 to 5. Those lists already passed loop: false, so the arrow stops at the last option. The organization and project pickers (search lists) wrapped from the last entry to the first and scrolled endlessly: inquirer-search-list's onDownKey/onUpKey wrap round, and its bundled inquirer 3 paginator repeats the list three times. LaunchSearchList now stops the arrow at both ends, defaults pageSize to PROMPT_PAGE_SIZE, and swaps the paginator for scrollWindow, a window that stops at both ends instead of repeating the list. #claude_code# 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Harshi Shah <harshi.shah@contentstack.com> Co-Authored-By: Claude <noreply@anthropic.com>
… change touched Each file already had an entry; the checksums went stale when the files changed. The findings are existing content (askSecret, password-protection prompts), not credentials. #claude_code# 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Harshi Shah <harshi.shah@contentstack.com> Co-Authored-By: Claude <noreply@anthropic.com>
🔒 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 |
…scrolls Every scrolling list, checklist and picker showed inquirer's "(Move up and down to reveal more choices)". The list and checkbox prompts are registered as LaunchPaginated subclasses that swap that hint for MORE_CHOICES_HINT, and scrollWindow (the org and project pickers) prints the same text. #claude_code# 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Harshi Shah <harshi.shah@contentstack.com> Co-Authored-By: Claude <noreply@anthropic.com>
🔒 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 |
Brings in #252 (--no-vars on the create commands, the stack picker scoped to the organization). The only conflict was the AGENTS.md checksum in .talismanrc: both branches edited AGENTS.md in different sections, so the merged file gets a fresh checksum rather than either side's. #claude_code# 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Harshi Shah <harshi.shah@contentstack.com> Co-Authored-By: Claude <noreply@anthropic.com>
🔒 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 |
PROMPT_PAGE_SIZE goes from 5 to 7, so every arrow-key list, checklist and the org and project pickers show seven options before scrolling. The framework presets show seven of eleven, and the env:update checklist opens on Name through Output directory. #claude_code# 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Harshi Shah <harshi.shah@contentstack.com> Co-Authored-By: Claude <noreply@anthropic.com>
🔒 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 |
Brings in #253 (the variables manual-entry choice, its summary and the unset messages reworded). No conflicts. #claude_code# 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Harshi Shah <harshi.shah@contentstack.com> Co-Authored-By: Claude <noreply@anthropic.com>
🔒 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
Ticket: CL-7168. Follow-ups to #248.
1. Dev entry point (
bin/dev.js), from #248's code review#248 made
bin/dev.jsload its error handler from the build output (../dist/core/failure):Cannot find module.dist/, it silently used the old handler.Loading
../src/core/failureat startup instead only worked under the ts-node shebang (./bin/dev.js), not plainnode bin/dev. The handler is now resolved when a failure happens:bin/run.js(the published entry point) is unchanged.2. Lists show seven options at a time and never wrap round
PROMPT_PAGE_SIZEdrops from 15 to 7. This covers framework preset, response mode, Contentstack Authentication, project type, branch, and the env:update and variables checklists. These lists already stopped at the last option.inquirer-search-listwraps on the up and down arrows, and its bundled inquirer 3 paginator repeats the list three times.LaunchSearchListnow:scrollWindow, a window that stops at both ends.(Use ↑/↓ to see more options)instead of inquirer's(Move up and down to reveal more choices). The list and checkbox prompts are registered asLaunchPaginatedsubclasses that swap the hint, andscrollWindowprints the same text.Tests
npm test: 139 suites, 2431 tests pass (after merging the latestv2-dev, including fix(variables): add --no-vars to the create commands and scope the stack picker to the organization (+Claude) #252). New tests cover the page size, the pickers stopping at both ends, andscrollWindow's first, middle and last pages.(Use ↑/↓ to see more options), and stays on "Other" after 14 presses of ↓.node bin/devand./bin/dev.js, each with and withoutdist/, run commands and print oneerror:line with the right exit code.#claude_code#
🤖 Generated with Claude Code