Commit Graph

25 Commits

Author SHA1 Message Date
vorotamoroz
cda27fb7f8 - Update trystero to v0.23.0
- Add dockerfile for CLI
- Change relay image for testing on arm64
2026-03-31 07:17:51 +00:00
vorotamoroz
a937feed3f Merge pull request #833 from rewse/fix/cli-sync-locked-error-message
fix(cli): show actionable error when sync fails due to locked remote DB
2026-03-28 23:58:34 +09:00
Shibata, Tats
e01f7f4d92 test(cli): add TODO comment and locked-remote-DB test script
- Add inline TODO comment in runCommand.ts about standardising
  replication failure cause identification logic.
- Add test-sync-locked-remote-linux.sh that verifies:
  1. sync succeeds when the remote milestone is not locked.
  2. sync fails with an actionable error when the remote milestone
     has locked=true and accepted_nodes is empty.
2026-03-26 00:58:51 +09:00
Shibata, Tats
985004bc0e fix(cli): show actionable error when sync fails due to locked remote DB
When the remote database is locked and the CLI device is not in the
accepted_nodes list, openReplication returns false with no CLI-specific
guidance. The existing log message ('Fetch rebuilt DB, explicit
unlocking or chunk clean-up is required') is aimed at the Obsidian
plugin UI.

Check the replicator's remoteLockedAndDeviceNotAccepted flag after
sync failure and print a clear message directing the user to unlock
from the Obsidian plugin.

Ref: #832
2026-03-22 12:37:17 +09:00
Shibata, Tats
967a78d657 fix(cli): handle incomplete localStorage in Node.js v25+
Node.js v25 provides a built-in localStorage on globalThis, but without
`--localstorage-file` it is an empty object lacking getItem/setItem.
The existing check `!("localStorage" in globalThis)` passes, so the
polyfill is skipped and the CLI crashes with:

  TypeError: localStorage.getItem is not a function

Check for getItem as well so the polyfill is applied when the native
implementation is incomplete.
2026-03-22 11:57:47 +09:00
vorotamoroz
c2bfaeb5a9 Fixed: wrong import 2026-03-18 12:03:51 +01:00
vorotamoroz
075d260fdd Fixed:
- Fixed the corrupted display of the help message.
- Remove some unnecessary codes.
2026-03-18 11:46:52 +01:00
vorotamoroz
6c69547cef ### Fixed
- Fixed flaky timing issues in P2P synchronisation.
- Fixed more binary file handling issues in CLI.

### Tests

- Rewrite P2P end-to-end tests to use the CLI as host.
2026-03-16 00:48:22 +09:00
vorotamoroz
89bf0488c3 Refactor: More refactor P2P Replicator 2026-03-15 04:07:47 +09:00
vorotamoroz
653cf8dfbe Refactor: Refactor P2P Replicator 2026-03-15 03:33:03 +09:00
vorotamoroz
9dd479e597 Fix for an issue where conflicts cannot be resolved in Journal Sync
Remove unnecessary test calling in CLI
2026-03-14 16:51:30 +09:00
vorotamoroz
8cad4cdf80 Add workaround for my mac 2026-03-14 16:50:43 +09:00
vorotamoroz
beced219c7 Fix: exit code 2026-03-14 16:13:14 +09:00
vorotamoroz
dfe13b1abd Fixed:
- No longer unexpected `Unhandled Rejections` during P2P operations (waiting acceptance).
CLI new features
- P2P sync has been implemented.
2026-03-14 15:08:31 +09:00
vorotamoroz
338a9ba9fa Add: mirror command
Tidy: test
2026-03-13 18:01:38 +09:00
vorotamoroz
29ce9a5df4 remove todo 2026-03-12 12:45:39 +01:00
vorotamoroz
84110aee97 update readme 2026-03-12 19:46:52 +09:00
vorotamoroz
822d957976 Refactor: separate entrypoint and main,
Fix: readlng binary file
2026-03-12 19:41:10 +09:00
vorotamoroz
d4aedf59f3 A- Add more tests.
- Object Storage support has also been confirmed (and fixed) in CLI.
2026-03-12 18:20:55 +09:00
vorotamoroz
5d80258a77 Add e2e-test (not passed yet)
Refine readme
2026-03-12 12:20:39 +09:00
vorotamoroz
fa14531599 Add note 2026-03-12 03:03:03 +09:00
vorotamoroz
7992b3c2b9 Wrote the test (but untested) 2026-03-12 03:01:46 +09:00
vorotamoroz
5872cad1e5 Implement commands 2026-03-12 02:56:30 +09:00
vorotamoroz
16c0dfef4c Remove the grandiloquence from the note written in work in progress. 2026-03-11 23:51:35 +09:00
vorotamoroz
0742773e1e Add self-hosted-livesync-cli to src/apps/cli as a headless, and a dedicated version. 2026-03-11 14:51:01 +01:00