Compare commits

...

2 Commits

Author SHA1 Message Date
vorotamoroz
b271b63efa bump 2023-09-20 07:05:18 +01:00
vorotamoroz
23419e476a - Fixed:
- Hidden files are no longer handled in the initial replication.
  - Report from `Making report` fixed
2023-09-20 07:04:31 +01:00
6 changed files with 32 additions and 7 deletions

View File

@@ -1,7 +1,7 @@
{
"id": "obsidian-livesync",
"name": "Self-hosted LiveSync",
"version": "0.19.20",
"version": "0.19.21",
"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.19.20",
"version": "0.19.21",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "obsidian-livesync",
"version": "0.19.20",
"version": "0.19.21",
"license": "MIT",
"dependencies": {
"diff-match-patch": "^1.0.5",

View File

@@ -1,6 +1,6 @@
{
"name": "obsidian-livesync",
"version": "0.19.20",
"version": "0.19.21",
"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

@@ -1508,10 +1508,12 @@ export class ObsidianLiveSyncSettingTab extends PluginSettingTab {
pluginConfig.passphrase = REDACTED;
pluginConfig.encryptedPassphrase = REDACTED;
pluginConfig.encryptedCouchDBConnection = REDACTED;
pluginConfig.pluginSyncExtendedSetting = {};
const msgConfig = `----remote config----
${stringifyYaml(responseConfig)}
---- Plug-in config ---
version:${manifestVersion}
${stringifyYaml(pluginConfig)}`;
console.log(msgConfig);
await navigator.clipboard.writeText(msgConfig);

View File

@@ -1415,10 +1415,10 @@ export default class ObsidianLiveSyncPlugin extends Plugin
const now = new Date().getTime();
if (queue.missingChildren.length == 0) {
queue.done = true;
if (isInternalMetadata(queue.entry._id)) {
if (isInternalMetadata(queue.entry._id) && this.settings.syncInternalFiles) {
//system file
const filename = this.getPathWithoutPrefix(queue.entry);
this.addOnHiddenFileSync.procInternalFile(filename);
this.isTargetFile(filename).then((ret) => ret ? this.addOnHiddenFileSync.procInternalFile(filename) : Logger(`Skipped (Not target:${filename})`, LOG_LEVEL_VERBOSE));
} else if (isValidPath(this.getPath(queue.entry))) {
this.handleDBChanged(queue.entry);
} else {
@@ -1460,7 +1460,14 @@ export default class ObsidianLiveSyncPlugin extends Plugin
if (!await this.isTargetFile(path)) return;
const skipOldFile = this.settings.skipOlderFilesOnSync && false; //patched temporary.
// Do not handle internal files if the feature has not been enabled.
if (isInternalMetadata(doc._id) && !this.settings.syncInternalFiles) return;
if (isInternalMetadata(doc._id) && !this.settings.syncInternalFiles) {
Logger(`Skipped: ${path} (${doc._id}, ${doc._rev}) Hidden file sync is disabled.`, LOG_LEVEL_VERBOSE);
return;
}
if (isCustomisationSyncMetadata(doc._id) && !this.settings.usePluginSync) {
Logger(`Skipped: ${path} (${doc._id}, ${doc._rev}) Customization sync is disabled.`, LOG_LEVEL_VERBOSE);
return;
}
// It is better for your own safety, not to handle the following files
const ignoreFiles = [
"_design/replicate",
@@ -1534,12 +1541,22 @@ export default class ObsidianLiveSyncPlugin extends Plugin
if (change.type != "leaf" && change.type != "versioninfo" && change.type != "milestoneinfo" && change.type != "nodeinfo") {
if (this.settings.suspendParseReplicationResult) {
if (isInternalMetadata(change._id) && !this.settings.syncInternalFiles) {
continue;
}
if (isCustomisationSyncMetadata(change._id) && !this.settings.usePluginSync) {
continue;
}
if (!change.path) {
continue;
}
const newQueue = {
entry: change,
missingChildren: [] as string[],
timeout: 0,
};
Logger(`Processing scheduled: ${change.path}`, LOG_LEVEL_INFO);
this.queuedFiles = this.queuedFiles.filter(e => e.entry.path != change.path);
this.queuedFiles.push(newQueue);
this.saveQueuedFiles();
continue;

View File

@@ -44,4 +44,10 @@ I hope you will give it a try.
- Missing dialogue titles have been shown now.
- We can click close buttons on mobile now.
- Conflicted Customisation sync files will be resolved automatically by their modified time.
- 0.19.21
- Fixed:
- Hidden files are no longer handled in the initial replication.
- Report from `Making report` fixed
- No longer contains customisation sync information.
- Version of LiveSync has been added.
... To continue on to `updates_old.md`.