mirror of
https://github.com/vrtmrz/obsidian-livesync.git
synced 2026-11-01 13:58:18 +00:00
Fixed:
- Fixed the corrupted display of the help message. - Remove some unnecessary codes.
This commit is contained in:
3 files changed
+5
-19
No files matched your search
@@ -2,3 +2,4 @@
|
||||
test/*
|
||||
!test/*.sh
|
||||
node_modules
|
||||
.*.json
|
||||
+4
-18
@@ -45,23 +45,6 @@ import { stripAllPrefixes } from "@lib/string_and_binary/path";
|
||||
const SETTINGS_FILE = ".livesync/settings.json";
|
||||
defaultLoggerEnv.minLogLevel = LOG_LEVEL_DEBUG;
|
||||
|
||||
// DI the log again.
|
||||
// const recentLogEntries = reactiveSource<LogEntry[]>([]);
|
||||
// const globalLogFunction = (message: any, level?: number, key?: string) => {
|
||||
// const messageX =
|
||||
// message instanceof Error
|
||||
// ? new LiveSyncError("[Error Logged]: " + message.message, { cause: message })
|
||||
// : message;
|
||||
// const entry = { message: messageX, level, key } as LogEntry;
|
||||
// recentLogEntries.value = [...recentLogEntries.value, entry];
|
||||
// };
|
||||
|
||||
// setGlobalLogFunction((msg, level) => {
|
||||
// console.error(`[${level}] ${typeof msg === "string" ? msg : JSON.stringify(msg)}`);
|
||||
// if (msg instanceof Error) {
|
||||
// console.error(msg);
|
||||
// }
|
||||
// });
|
||||
function printHelp(): void {
|
||||
console.log(`
|
||||
Self-hosted LiveSync CLI
|
||||
@@ -353,7 +336,10 @@ export async function main() {
|
||||
(core: LiveSyncBaseCore<NodeServiceContext, any>, serviceHub: InjectableServiceHub<NodeServiceContext>) => {
|
||||
return initialiseServiceModulesCLI(vaultPath, core, serviceHub);
|
||||
},
|
||||
(core) => [new ModuleReplicatorP2P(core)], // Register P2P replicator for CLI (useP2PReplicator is not used here)
|
||||
(core) => [
|
||||
// No modules need to be registered for P2P replication in CLI. Directly using Replicators in p2p.ts
|
||||
// new ModuleReplicatorP2P(core),
|
||||
],
|
||||
() => [], // No add-ons
|
||||
(core) => {
|
||||
// Add target filter to prevent internal files are handled
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
"test:e2e:p2p-upload-download-repro": "bash test/test-p2p-upload-download-repro-linux.sh",
|
||||
"test:e2e:p2p-host": "bash test/test-p2p-host-linux.sh",
|
||||
"test:e2e:p2p-sync": "bash test/test-p2p-sync-linux.sh",
|
||||
"test:e2e:p2p-peers:local-relay": "bash test/test-p2p-peers-local-relay.sh",
|
||||
"test:e2e:mirror": "bash test/test-mirror-linux.sh",
|
||||
"pretest:e2e:all": "npm run build",
|
||||
"test:e2e:all": " export RUN_BUILD=0 && npm run test:e2e:setup-put-cat && npm run test:e2e:push-pull && npm run test:e2e:sync-two-local && npm run test:e2e:p2p && npm run test:e2e:mirror && npm run test:e2e:two-vaults && npm run test:e2e:p2p"
|
||||
|
||||
Reference in new issue
Block a user