feat: add manual update commands#27
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughAdds npm update detection and installation: new ChangesPackage Update Check and Installation
Sequence DiagramsequenceDiagram
participant User
participant CLI as sshshot CLI
participant UpdateModule as update module
participant NPM as npm registry
User->>CLI: sshshot update-check
CLI->>UpdateModule: checkForUpdate(currentVersion)
UpdateModule->>NPM: npm view `@flamerged/sshshot` version --silent
NPM-->>UpdateModule: latest version / error
UpdateModule-->>CLI: UpdateCheckResult
CLI-->>User: formatted status
User->>CLI: sshshot update
CLI->>UpdateModule: updateToLatest()
UpdateModule->>NPM: npm install -g `@flamerged/sshshot`@latest
NPM-->>UpdateModule: exit code
UpdateModule-->>CLI: exit code
CLI-->>User: follow-up instructions / exit code
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 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 current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/menubar.ts`:
- Around line 169-186: The block that runs the update commands (currently using
{ ... } redirected to "$UPDATE_LOG") must be run in a subshell so its internal
exit does not terminate the surrounding script: change the brace block to a
subshell (use ( ... ) with the same redirection) so the internal exit only
affects the subshell, then capture its exit status into RC (RC=$? after the
subshell) and keep the subsequent notify calls (notify "Updated sshshot..." /
notify "Update failed...") and final exit "$RC" in the outer script; reference
the same symbols SSHSHOT, UPDATE_LOG, notify and RC when making this change.
🪄 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: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 87140d49-b16c-4bcd-a090-081a801bc038
📒 Files selected for processing (7)
README.mdSECURITY.mdsrc/index.tssrc/menubar.tssrc/update.tstest/menubar.test.tstest/update.test.ts
|
🎉 This PR is included in version 0.10.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Summary
sshshot update-checkandsshshot updatecommands backed by npm version lookupVerification
yarn typecheckyarn testyarn lintyarn format:checkyarn buildnode dist/index.js update-checkSummary by CodeRabbit
New Features
Documentation
Tests