Skip to content

fix(cli): dev entry point works without a build; lists show seven options and never wrap round - #251

Merged
SakshiKoli-CS merged 9 commits into
v2-devfrom
cl-7168
Oct 26, 2026
Merged

SakshiKoli-CS merged 9 commits into
v2-devfrom
cl-7168

Conversation

@SakshiKoli-CS

@SakshiKoli-CS SakshiKoli-CS commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

What

Ticket: CL-7168. Follow-ups to #248.

1. Dev entry point (bin/dev.js), from #248's code review

#248 made bin/dev.js load its error handler from the build output (../dist/core/failure):

  • On a fresh clone with no build, every dev command crashed with Cannot find module.
  • With a stale dist/, it silently used the old handler.

Loading ../src/core/failure at startup instead only worked under the ts-node shebang (./bin/dev.js), not plain node bin/dev. The handler is now resolved when a failure happens:

  1. The source handler, when ts-node is registered.
  2. Otherwise the build's handler.
  3. Otherwise oclif's own handler.

bin/run.js (the published entry point) is unchanged.

2. Lists show seven options at a time and never wrap round

  • Every arrow-key list and checklist shows at most 7 options and scrolls for the rest: PROMPT_PAGE_SIZE drops 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.
  • The organization and project pickers used to wrap from the last entry to the first and scroll endlessly: inquirer-search-list wraps on the up and down arrows, and its bundled inquirer 3 paginator repeats the list three times. LaunchSearchList now:
    • stops the arrow at both ends;
    • shows 7 rows;
    • swaps the paginator for scrollWindow, a window that stops at both ends.
  • Every scrolling list, checklist and picker says (Use ↑/↓ to see more options) instead of inquirer's (Move up and down to reveal more choices). The list and checkbox prompts are registered as LaunchPaginated subclasses that swap the hint, and scrollWindow prints the same text.
  • AGENTS.md is updated to match.

Tests

  • npm test: 139 suites, 2431 tests pass (after merging the latest v2-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, and scrollWindow's first, middle and last pages.
  • On a real terminal, against dev11:
    • The framework list shows 7 of its 11 options with (Use ↑/↓ to see more options), and stays on "Other" after 14 presses of ↓.
    • The env:update checklist opens on Name through Output directory (7 settings) with the same hint, and stops on "Password protection" after 20 presses of ↓.
    • The organization picker stays on the last organization after 40 presses of ↓; before, it wrapped to the first.
  • The dev entry point: node bin/dev and ./bin/dev.js, each with and without dist/, run commands and print one error: line with the right exit code.

#claude_code#
🤖 Generated with Claude Code

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>
@SakshiKoli-CS
SakshiKoli-CS requested review from a team as code owners October 26, 2026 07:26
@snyk-io

snyk-io Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

✅ Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
✅ Open Source Security 0 0 0 0 0 issues
✅ Licenses 0 0 0 0 0 issues
✅ Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@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 9 25 ✅ Passed
🟡 Medium Severity 0 4 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: 9
  • Medium without fixes: 4
  • Low without fixes: 0

✅ 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>
@SakshiKoli-CS SakshiKoli-CS changed the title fix(cli): load the dev entry point's error handler from src, not dist fix(cli): make the dev entry point's error handler work without a build and under plain node Oct 26, 2026
@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 9 25 ✅ Passed
🟡 Medium Severity 0 4 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: 9
  • Medium without fixes: 4
  • Low without fixes: 0

✅ 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>
@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 9 25 ✅ Passed
🟡 Medium Severity 0 4 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: 9
  • Medium without fixes: 4
  • Low without fixes: 0

✅ BUILD PASSED - All security checks passed

SakshiKoli-CS and others added 2 commits October 26, 2026 15:54
…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>
@SakshiKoli-CS SakshiKoli-CS changed the title fix(cli): make the dev entry point's error handler work without a build and under plain node fix(cli): dev entry point works without a build; lists show five options and never wrap round Oct 26, 2026
@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 9 25 ✅ Passed
🟡 Medium Severity 0 4 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: 9
  • Medium without fixes: 4
  • Low without fixes: 0

✅ 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>
@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 9 25 ✅ Passed
🟡 Medium Severity 0 4 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: 9
  • Medium without fixes: 4
  • Low without fixes: 0

✅ 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>
@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 9 25 ✅ Passed
🟡 Medium Severity 0 4 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: 9
  • Medium without fixes: 4
  • Low without fixes: 0

✅ 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>
@SakshiKoli-CS SakshiKoli-CS changed the title fix(cli): dev entry point works without a build; lists show five options and never wrap round fix(cli): dev entry point works without a build; lists show seven options and never wrap round Oct 26, 2026
@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 9 25 ✅ Passed
🟡 Medium Severity 0 4 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: 9
  • Medium without fixes: 4
  • Low without fixes: 0

✅ 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>
@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 9 25 ✅ Passed
🟡 Medium Severity 0 4 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: 9
  • Medium without fixes: 4
  • Low without fixes: 0

✅ BUILD PASSED - All security checks passed

@SakshiKoli-CS
SakshiKoli-CS merged commit e14ba09 into v2-dev Oct 26, 2026
7 checks passed
@SakshiKoli-CS
SakshiKoli-CS deleted the cl-7168 branch October 26, 2026 13:14
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.

3 participants