Add local CLI #144
No reviewers
Labels
No labels
bug
dependencies
docker
documentation
duplicate
enhancement
good first issue
help wanted
invalid
javascript
question
rust
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: andras/vault-link#144
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "asch/local-cli"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Pull Request Overview
This PR adds a new standalone CLI application for VaultLink that enables local filesystem synchronization with real-time bidirectional sync and file watching capabilities.
Key Changes
local-client-cliworkspace package with full CLI implementation including argument parsing, file system operations, and file watchinginsert_document_versionmethodReviewed Changes
Copilot reviewed 22 out of 24 changed files in this pull request and generated 4 comments.
Show a summary per file
Files not reviewed (1)
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
@ -0,0 +1,207 @@import * as path from "path";This commented-out code creates a never-resolving promise that would block the program indefinitely. If this was intended to keep the process alive, it should either be removed or uncommented with a clear explanation. Currently, without this or any other blocking mechanism, the program may exit prematurely after starting the file watcher.
@ -0,0 +93,4 @@try {const content = await fs.readFile(dataFile, "utf-8");// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertiondatabase = JSON.parse(content) as Partial<StoredDatabase>;The type assertion bypasses type safety without validation. The parsed JSON should be validated to ensure it matches the expected StoredDatabase structure before casting, or handle potential type mismatches gracefully in case the data file is corrupted.
@ -42,0 +41,4 @@if [[ "$FIX_MODE" == true ]]; then$0fiRecursive call to the script without arguments will lose the FIX_MODE=true state, causing infinite recursion or unexpected behavior. The script should pass the original arguments or at least preserve the FIX_MODE flag:
$0 \"$@\"orFIX_MODE=true $0.The transaction ownership has changed from taking a mutable reference (
&mut Transaction) to taking ownership (Transaction). This prevents the caller from handling commit failures or performing additional operations. Consider documenting this breaking change in the function comment or reverting to the reference-based approach if callers need transaction control.