1
0
mirror of https://github.com/vrtmrz/obsidian-livesync.git synced 2025-02-10 19:41:57 +02:00

Fixed migration problem.

This commit is contained in:
vorotamoroz 2022-06-10 01:26:55 +09:00
parent fab2327937
commit 4cb908cf62
6 changed files with 11 additions and 11 deletions

View File

@ -1,7 +1,7 @@
{
"id": "obsidian-livesync",
"name": "Self-hosted LiveSync",
"version": "0.10.0",
"version": "0.10.1",
"minAppVersion": "0.9.12",
"description": "Community implementation of self-hosted livesync. Reflect your vault changes to some other devices immediately. Please make sure to disable other synchronize solutions to avoid content corruption or duplication.",
"author": "vorotamoroz",

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{
"name": "obsidian-livesync",
"version": "0.10.0",
"version": "0.10.1",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "obsidian-livesync",
"version": "0.10.0",
"version": "0.10.1",
"license": "MIT",
"dependencies": {
"diff-match-patch": "^1.0.5",

View File

@ -1,6 +1,6 @@
{
"name": "obsidian-livesync",
"version": "0.10.0",
"version": "0.10.1",
"description": "Reflect your vault changes to some other devices immediately. Please make sure to disable other synchronize solutions to avoid content corruption or duplication.",
"main": "main.js",
"type": "module",

View File

@ -158,7 +158,7 @@ export class LocalPouchDB {
async isOldDatabaseExists() {
const db = new PouchDB<EntryDoc>(this.dbname + "-livesync", {
auto_compaction: this.settings.useHistory ? false : true,
revs_limit: 100,
revs_limit: 20,
deterministic_revs: true,
skip_setup: true,
});
@ -253,9 +253,9 @@ export class LocalPouchDB {
Logger(newDbStatus);
if (this.settings.encrypt) {
enableEncryption(old, this.settings.passphrase);
enableEncryption(old, this.settings.passphrase, true);
}
const rep = old.replicate.to(this.localDatabase);
const rep = old.replicate.to(this.localDatabase, { batch_size: 25, batches_limit: 10 });
rep.on("change", (e) => {
progress.setMessage(`Converting ${e.docs_written} docs...`);
Logger(`Converting ${e.docs_written} docs...`, LOG_LEVEL.VERBOSE);

@ -1 +1 @@
Subproject commit 92c1bbc45dc7961d3af65dd151a9b3d3b48b18ec
Subproject commit b031e4e69d61ccbb5dce4024907705d4251b3d0e

View File

@ -607,9 +607,9 @@ export default class ObsidianLiveSyncPlugin extends Plugin {
this.logMessage = [].concat(this.logMessage).concat([newmessage]).slice(-100);
console.log(valutName + ":" + newmessage);
this.setStatusBarText(null, messagecontent.substring(0, 30));
if (message instanceof Error) {
console.trace(message);
}
// if (message instanceof Error) {
// console.trace(message);
// }
if (level >= LOG_LEVEL.NOTICE) {
if (messagecontent in this.notifies) {