feat: geonic cli update コマンドを追加#94
Conversation
`npm update -g @geolonia/geonicdb-cli` のエイリアスとして `geonic cli update` で CLI を最新版に更新できるようにした。
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughCLIに Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/commands/cli.ts`:
- Around line 282-290: The update command currently always runs execSync("npm
update -g `@geolonia/geonicdb-cli`") even when the global --dry-run is set; modify
the action handler for the update command (the function wrapped by
withErrorHandler) to check the parsed global option (e.g., read opts().dryRun or
program.opts().dryRun depending on how global options are accessed in this CLI)
before executing execSync: if dry-run is true, print the planned action with
printInfo/printSuccess and return early without calling execSync; otherwise
proceed to run execSync as before. Ensure the check references the update
command's action function and the execSync, printInfo, and printSuccess symbols
so the change is localized to this block.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 2e4029a5-8dc3-4dea-957c-c4958df5a7d2
📒 Files selected for processing (2)
CHANGELOG.mdsrc/commands/cli.ts
Summary
geonic cli updateコマンドを追加 —npm update -g @geolonia/geonicdb-cliのエイリアスChanges
src/commands/cli.ts:cli updateサブコマンドを追加(execSyncでnpm update -gを実行)Test plan
geonic cli update --helpで正しくヘルプ表示を確認Summary by CodeRabbit
geonic cli updateコマンドを追加しました。CLI を最新バージョンへ更新できます。実行中に進行メッセージが表示されます。--dry-run相当の出力で、実際に更新を行わずに実行結果を確認できます。geonic cli updateの使い方)を追加しました。