wip
This commit is contained in:
parent
31a5bac054
commit
4c002f9acd
1 changed files with 14543 additions and 4367 deletions
|
|
@ -62,7 +62,6 @@ vaultlink \
|
|||
| `--ignore-pattern <pattern>` | - | Glob pattern to ignore (repeatable) |
|
||||
| `--websocket-retry-interval-ms <ms>` | `3500` | WebSocket reconnection interval |
|
||||
| `--log-level <level>` | `INFO` | Log level: DEBUG, INFO, WARNING, ERROR |
|
||||
| `--line-endings <mode>` | `auto` | Line ending style: auto, lf, crlf |
|
||||
| `-q, --quiet` | - | Suppress startup banner for non-interactive use |
|
||||
| `-h, --help` | - | Show help |
|
||||
| `-V, --version` | - | Show version |
|
||||
|
|
@ -96,12 +95,7 @@ vaultlink -l ./vault -r wss://sync.example.com -t token123 -v default \
|
|||
--log-level DEBUG --quiet
|
||||
```
|
||||
|
||||
Force LF line endings (useful for cross-platform vaults):
|
||||
|
||||
```bash
|
||||
vaultlink -l ./vault -r wss://sync.example.com -t token123 -v default \
|
||||
--line-endings lf
|
||||
```
|
||||
File bytes, including line endings, are preserved on every platform.
|
||||
|
||||
## Docker Deployment
|
||||
|
||||
|
|
@ -211,10 +205,21 @@ docker build -f local-client-cli/Dockerfile -t vault-link-cli:test .
|
|||
|
||||
1. Creates `.vaultlink` directory for sync metadata
|
||||
2. Performs initial sync of local files to server
|
||||
3. Watches filesystem for changes using Node's `fs.watch`
|
||||
3. Uses filesystem events to wake a fresh scan, including atomic editor saves
|
||||
4. Syncs changes bidirectionally in real-time
|
||||
5. Handles graceful shutdown on SIGINT/SIGTERM
|
||||
|
||||
The complete client record (database, settings, queued logical notifications and
|
||||
server history checkpoint) is saved atomically in `.vaultlink/sync-data.json`.
|
||||
Existing database-only files migrate on the next save. Invalid or unreadable
|
||||
metadata is reported instead of silently starting with empty state.
|
||||
|
||||
File moves use an exclusive copy followed by deletion of the source. An
|
||||
interruption may leave both files; the next scan reconciles the visible files.
|
||||
Raw watcher events do not distinguish user edits from sync writes. A rename
|
||||
preserves identity when the scan finds a unique matching nonempty content hash;
|
||||
a simultaneous rename and edit may instead appear as deletion and creation.
|
||||
|
||||
## License
|
||||
|
||||
MIT
|
||||
|
|
|
|||
Loading…
Reference in a new issue