mirror of
https://github.com/vrtmrz/obsidian-livesync.git
synced 2026-01-02 11:29:16 +00:00
Merge branch 'main' into main
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"id": "obsidian-livesync",
|
||||
"name": "Self-hosted LiveSync",
|
||||
"version": "0.24.8",
|
||||
"version": "0.24.10",
|
||||
"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",
|
||||
|
||||
922
package-lock.json
generated
922
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
28
package.json
28
package.json
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "obsidian-livesync",
|
||||
"version": "0.24.8",
|
||||
"version": "0.24.10",
|
||||
"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",
|
||||
@@ -32,17 +32,17 @@
|
||||
"@types/pouchdb-mapreduce": "^6.1.10",
|
||||
"@types/pouchdb-replication": "^6.4.7",
|
||||
"@types/transform-pouch": "^1.0.6",
|
||||
"@typescript-eslint/eslint-plugin": "^8.4.0",
|
||||
"@typescript-eslint/parser": "^8.4.0",
|
||||
"@typescript-eslint/eslint-plugin": "^8.23.0",
|
||||
"@typescript-eslint/parser": "^8.23.0",
|
||||
"builtin-modules": "^4.0.0",
|
||||
"esbuild": "0.23.1",
|
||||
"esbuild-svelte": "^0.8.1",
|
||||
"esbuild": "0.24.2",
|
||||
"esbuild-svelte": "^0.9.0",
|
||||
"eslint": "^8.57.0",
|
||||
"eslint-config-airbnb-base": "^15.0.0",
|
||||
"eslint-plugin-import": "^2.30.0",
|
||||
"eslint-plugin-import": "^2.31.0",
|
||||
"events": "^3.3.0",
|
||||
"obsidian": "^1.6.6",
|
||||
"postcss": "^8.4.45",
|
||||
"obsidian": "^1.7.2",
|
||||
"postcss": "^8.5.1",
|
||||
"postcss-load-config": "^6.0.1",
|
||||
"pouchdb-adapter-http": "^9.0.0",
|
||||
"pouchdb-adapter-idb": "^9.0.0",
|
||||
@@ -54,13 +54,13 @@
|
||||
"pouchdb-merge": "^9.0.0",
|
||||
"pouchdb-replication": "^9.0.0",
|
||||
"pouchdb-utils": "^9.0.0",
|
||||
"prettier": "^3.3.3",
|
||||
"prettier": "^3.4.2",
|
||||
"svelte": "^4.2.19",
|
||||
"svelte-preprocess": "^6.0.2",
|
||||
"terser": "^5.31.6",
|
||||
"terser": "^5.37.0",
|
||||
"transform-pouch": "^2.0.0",
|
||||
"tslib": "^2.7.0",
|
||||
"typescript": "^5.5.4"
|
||||
"tslib": "^2.8.1",
|
||||
"typescript": "^5.7.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"@aws-sdk/client-s3": "^3.645.0",
|
||||
@@ -70,10 +70,10 @@
|
||||
"diff-match-patch": "^1.0.5",
|
||||
"esbuild-plugin-inline-worker": "^0.1.1",
|
||||
"fflate": "^0.8.2",
|
||||
"idb": "^8.0.0",
|
||||
"idb": "^8.0.2",
|
||||
"minimatch": "^10.0.1",
|
||||
"octagonal-wheels": "^0.1.22",
|
||||
"svelte-check": "^4.0.4",
|
||||
"svelte-check": "^4.1.4",
|
||||
"xxhash-wasm-102": "npm:xxhash-wasm@^1.0.2"
|
||||
}
|
||||
}
|
||||
|
||||
2
src/lib
2
src/lib
Submodule src/lib updated: 6305e8952b...90ace6de16
@@ -205,13 +205,10 @@ export class ModuleFileHandler extends AbstractModule implements ICoreModule {
|
||||
): Promise<boolean> {
|
||||
const file = typeof info === "string" ? this.storage.getFileStub(info) : info;
|
||||
const mode = file == null ? "create" : "modify";
|
||||
|
||||
const docEntry =
|
||||
typeof entryInfo === "string"
|
||||
? await this.db.fetchEntryMeta(entryInfo, undefined, true)
|
||||
: await this.db.fetchEntryMeta(entryInfo.path, undefined, true);
|
||||
const pathFromEntryInfo = typeof entryInfo === "string" ? entryInfo : getPath(entryInfo);
|
||||
const docEntry = await this.db.fetchEntryMeta(pathFromEntryInfo, undefined, true);
|
||||
if (!docEntry) {
|
||||
this._log(`File ${entryInfo} is not exist on the database`, LOG_LEVEL_VERBOSE);
|
||||
this._log(`File ${pathFromEntryInfo} is not exist on the database`, LOG_LEVEL_VERBOSE);
|
||||
return false;
|
||||
}
|
||||
const path = getPath(docEntry);
|
||||
@@ -275,7 +272,7 @@ export class ModuleFileHandler extends AbstractModule implements ICoreModule {
|
||||
}
|
||||
// 2. if not, the content should be checked.
|
||||
|
||||
if (shouldApplied) {
|
||||
if (!shouldApplied) {
|
||||
const readFile = await this.readFileFromStub(existDoc);
|
||||
if (await isDocContentSame(docData, readFile.body)) {
|
||||
// The content is same. So, we do not need to update the file.
|
||||
|
||||
@@ -301,8 +301,8 @@ export class ObsidianLiveSyncSettingTab extends PluginSettingTab {
|
||||
const syncMode = this.editingSettings?.liveSync
|
||||
? "LIVESYNC"
|
||||
: this.editingSettings?.periodicReplication
|
||||
? "PERIODIC"
|
||||
: "ONEVENTS";
|
||||
? "PERIODIC"
|
||||
: "ONEVENTS";
|
||||
return {
|
||||
syncMode,
|
||||
};
|
||||
@@ -2032,7 +2032,7 @@ export class ObsidianLiveSyncSettingTab extends PluginSettingTab {
|
||||
text: "Please set device name to identify this device. This name should be unique among your devices. While not configured, we cannot enable this feature.",
|
||||
cls: "op-warn",
|
||||
},
|
||||
(c) => { },
|
||||
(c) => {},
|
||||
visibleOnly(() => this.isConfiguredAs("deviceAndVaultName", ""))
|
||||
);
|
||||
this.createEl(
|
||||
@@ -2042,7 +2042,7 @@ export class ObsidianLiveSyncSettingTab extends PluginSettingTab {
|
||||
text: "We cannot change the device name while this feature is enabled. Please disable this feature to change the device name.",
|
||||
cls: "op-warn-info",
|
||||
},
|
||||
(c) => { },
|
||||
(c) => {},
|
||||
visibleOnly(() => this.isConfiguredAs("usePluginSync", true))
|
||||
);
|
||||
|
||||
@@ -2134,8 +2134,8 @@ export class ObsidianLiveSyncSettingTab extends PluginSettingTab {
|
||||
const scheme = pluginConfig.couchDB_URI.startsWith("http:")
|
||||
? "(HTTP)"
|
||||
: pluginConfig.couchDB_URI.startsWith("https:")
|
||||
? "(HTTPS)"
|
||||
: "";
|
||||
? "(HTTPS)"
|
||||
: "";
|
||||
pluginConfig.couchDB_URI = isCloudantURI(pluginConfig.couchDB_URI)
|
||||
? "cloudant"
|
||||
: `self-hosted${scheme}`;
|
||||
@@ -2155,8 +2155,8 @@ export class ObsidianLiveSyncSettingTab extends PluginSettingTab {
|
||||
const endpointScheme = pluginConfig.endpoint.startsWith("http:")
|
||||
? "(HTTP)"
|
||||
: pluginConfig.endpoint.startsWith("https:")
|
||||
? "(HTTPS)"
|
||||
: "";
|
||||
? "(HTTPS)"
|
||||
: "";
|
||||
pluginConfig.endpoint = `${endpoint.indexOf(".r2.cloudflarestorage.") !== -1 ? "R2" : "self-hosted?"}(${endpointScheme})`;
|
||||
}
|
||||
const obsidianInfo = `Navigator: ${navigator.userAgent}
|
||||
@@ -2367,10 +2367,10 @@ ${stringifyYaml(pluginConfig)}`;
|
||||
Logger("Start verifying all files", LOG_LEVEL_NOTICE, "verify");
|
||||
const files = this.plugin.settings.syncInternalFiles
|
||||
? await this.plugin.storageAccess.getFilesIncludeHidden(
|
||||
"/",
|
||||
undefined,
|
||||
ignorePatterns
|
||||
)
|
||||
"/",
|
||||
undefined,
|
||||
ignorePatterns
|
||||
)
|
||||
: await this.plugin.storageAccess.getFileNames();
|
||||
const documents = [] as FilePath[];
|
||||
|
||||
|
||||
133
updates.md
133
updates.md
@@ -14,6 +14,25 @@ Thank you, and I hope your troubles will be resolved!
|
||||
|
||||
---
|
||||
|
||||
## 0.24.10
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fixed the issue which the filename is shown as `undefined`.
|
||||
- Fixed the issue where files transferred at short intervals were not reflected.
|
||||
|
||||
### Improved
|
||||
|
||||
- Add more translations: `ja-JP` (Japanese) by @kohki-shikata (Thank you so much)!
|
||||
|
||||
### Internal
|
||||
|
||||
- Some files have been prettified.
|
||||
|
||||
## 0.24.9
|
||||
|
||||
Skipped.
|
||||
|
||||
## 0.24.8
|
||||
|
||||
### Fixed
|
||||
@@ -76,118 +95,4 @@ Thank you, and I hope your troubles will be resolved!
|
||||
- The status line and the log summary are now displayed more smoothly and efficiently.
|
||||
- This improvement has also been applied to the logs displayed in the log pane.
|
||||
|
||||
## 0.24.4
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fixed so many inefficient and buggy modules inherited from the past.
|
||||
|
||||
### Improved
|
||||
|
||||
- Tasks are now executed in an efficient asynchronous library.
|
||||
- On-demand chunk fetching is now more efficient and keeps the interval between requests.
|
||||
- This will reduce the load on the server and the network.
|
||||
- And, safe for the Cloudant.
|
||||
|
||||
## 0.24.3
|
||||
|
||||
### Improved
|
||||
|
||||
- Many messages have been improved for better understanding as thanks to the fine works of @Volkor3-16! Thank you so much!
|
||||
- Documentations also have been updated to reflect the changes in the messages.
|
||||
- Now the style of In-Editor Status has been solid for some Android devices.
|
||||
|
||||
## 0.24.2
|
||||
|
||||
### Rewritten
|
||||
|
||||
- Hidden File Sync is now respects the file changes on the storage. Not simply comparing modified times.
|
||||
- This makes hidden file sync more robust and reliable.
|
||||
|
||||
### Fixed
|
||||
|
||||
- `Scan hidden files before replication` is now configurable again.
|
||||
- Some unexpected errors are now handled more gracefully.
|
||||
- Meaningless event passing during boot sequence is now prevented.
|
||||
- Error handling for non-existing files has been fixed.
|
||||
- Hidden files will not be batched to avoid the potential error.
|
||||
- This behaviour had been causing the error in the previous versions in specific situations.
|
||||
- The log which checking automatic conflict resolution is now in verbose level.
|
||||
- Replication log (skipping non-targetting files) shows the correct information.
|
||||
- The dialogue that asking enabling optional feature during `Rebuild Everything` now prevents to show the `overwrite` option.
|
||||
- The rebuilding device is the first, meaningless.
|
||||
- Files with different modified time but identical content are no longer processed repeatedly.
|
||||
- Some unexpected errors which caused after terminating plug-in are now avoided.
|
||||
-
|
||||
|
||||
### Improved
|
||||
|
||||
- JSON files are now more transferred efficiently.
|
||||
- Now the JSON files are transferred in more fine chunks, which makes the transfer more efficient.
|
||||
|
||||
## 0.24.1
|
||||
|
||||
### Fixed
|
||||
|
||||
- Vault History can show the correct information of match-or-not for each file and database even if it is a binary file.
|
||||
- `Sync settings via markdown` is now hidden during the setup wizard.
|
||||
- Verify and Fix will ignore the hidden files if the hidden file sync is disabled.
|
||||
|
||||
#### New feature
|
||||
|
||||
- Now we can fetch the tweaks from the remote database while the setting dialogue and wizard are processing.
|
||||
|
||||
### Improved
|
||||
|
||||
- More things are moved to the modules.
|
||||
- Includes the Main codebase. Now `main.ts` is almost stub.
|
||||
- EventHub is now more robust and typesafe.
|
||||
|
||||
## 0.24.0
|
||||
|
||||
### Improved
|
||||
|
||||
- The welcome message is now more simple to encourage the use of the Setup-URI.
|
||||
- The secondary message is also simpler to guide users to Minimal Setup.
|
||||
- But Setup-URI will be recommended again, due to its importance.
|
||||
- These dialogues contain a link to the documentation which can be clicked.
|
||||
- The minimal setup is more minimal now. And, the setup is more user-friendly.
|
||||
- Now the Configuration of the remote database is checked more robustly, but we can ignore the warning and proceed with the setup.
|
||||
- Before we are asked about each feature, we are asked if we want to use optional features in the first place.
|
||||
- This is to prevent the user from being overwhelmed by the features.
|
||||
- And made it clear that it is not recommended for new users.
|
||||
- Many messages have been improved for better understanding.
|
||||
- Ridiculous messages have been (carefully) refined.
|
||||
- Dialogues are more informative and friendly.
|
||||
- A lot of messages have been mostly rewritten, leveraging Markdown.
|
||||
- Especially auto-closing dialogues are now explicitly labelled: `To stop the countdown, tap anywhere on the dialogue`.
|
||||
- Now if the is plugin configured to ignore some events, we will get a chance to fix it, in addition to the warning.
|
||||
- And why that has happened is also explained in the dialogue.
|
||||
- A note relating to device names has been added to Customisation Sync on the setting dialogue.
|
||||
- We can verify and resolve also the hidden files now.
|
||||
|
||||
### Fixed
|
||||
|
||||
- We can resolve the conflict of the JSON file correctly now.
|
||||
- Verifying files between the local database and storage is now working correctly.
|
||||
- While restarting the plug-in, the shown dialogues will be automatically closed to avoid unexpected behaviour.
|
||||
- Replicated documents that the local device has configured to ignore are now correctly ignored.
|
||||
- The chunks of the document on the local device during the first transfer will be created correctly.
|
||||
- And why we should create them is now explained in the dialogue.
|
||||
- If optional features have been enabled in the wizard, `Enable advanced features` will be toggled correctly.
|
||||
The hidden file sync is now working correctly. - Now the deletion of hidden files is correctly synchronised.
|
||||
- Customisation Sync is now working correctly together with hidden file sync.
|
||||
- No longer database suffix is stored in the setting sharing markdown.
|
||||
- A fair number of bugs have been fixed.
|
||||
|
||||
### Changed
|
||||
|
||||
- Some default settings have been changed for an easier new user experience.
|
||||
- Preventing the meaningless migration of the settings.
|
||||
|
||||
### Tiding
|
||||
|
||||
- The codebase has been reorganised into clearly defined modules.
|
||||
- Commented-out codes have been gradually removed.
|
||||
|
||||
Older notes are in [updates_old.md](https://github.com/vrtmrz/obsidian-livesync/blob/main/updates_old.md).
|
||||
|
||||
2085
updates_old.md
2085
updates_old.md
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user