mirror of
https://github.com/vrtmrz/obsidian-livesync.git
synced 2026-05-04 23:01:51 +00:00
Compare commits
9 Commits
0.16.6
...
forprivacy
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
db68bc8e30 | ||
|
|
db3eb7e1a0 | ||
|
|
50f51393fc | ||
|
|
8a04e332d6 | ||
|
|
12ae17aa2f | ||
|
|
657f12f966 | ||
|
|
15a7bed448 | ||
|
|
420c3b94df | ||
|
|
239c087132 |
@@ -10,9 +10,11 @@ But some additional configurations are required in `local.ini` to use from Self-
|
|||||||
```
|
```
|
||||||
[couchdb]
|
[couchdb]
|
||||||
single_node=true
|
single_node=true
|
||||||
|
max_document_size = 50000000
|
||||||
|
|
||||||
[chttpd]
|
[chttpd]
|
||||||
require_valid_user = true
|
require_valid_user = true
|
||||||
|
max_http_request_size = 4294967296
|
||||||
|
|
||||||
[chttpd_auth]
|
[chttpd_auth]
|
||||||
require_valid_user = true
|
require_valid_user = true
|
||||||
@@ -94,4 +96,4 @@ Using Caddy is a handy way to serve the server with SSL automatically.
|
|||||||
|
|
||||||
I have published [docker-compose.yml and ini files](https://github.com/vrtmrz/self-hosted-livesync-server) that launches Caddy and CouchDB at once. Please try it out.
|
I have published [docker-compose.yml and ini files](https://github.com/vrtmrz/self-hosted-livesync-server) that launches Caddy and CouchDB at once. Please try it out.
|
||||||
|
|
||||||
And, be sure to check the server log and be careful of malicious access.
|
And, be sure to check the server log and be careful of malicious access.
|
||||||
|
|||||||
@@ -11,9 +11,11 @@
|
|||||||
```
|
```
|
||||||
[couchdb]
|
[couchdb]
|
||||||
single_node=true
|
single_node=true
|
||||||
|
max_document_size = 50000000
|
||||||
|
|
||||||
[chttpd]
|
[chttpd]
|
||||||
require_valid_user = true
|
require_valid_user = true
|
||||||
|
max_http_request_size = 4294967296
|
||||||
|
|
||||||
[chttpd_auth]
|
[chttpd_auth]
|
||||||
require_valid_user = true
|
require_valid_user = true
|
||||||
@@ -92,4 +94,4 @@ Note: 不推荐将 CouchDB 挂载到根目录
|
|||||||
|
|
||||||
提供了 [docker-compose.yml 和 ini 文件](https://github.com/vrtmrz/self-hosted-livesync-server) 可以同时启动 Caddy 和 CouchDB。
|
提供了 [docker-compose.yml 和 ini 文件](https://github.com/vrtmrz/self-hosted-livesync-server) 可以同时启动 Caddy 和 CouchDB。
|
||||||
|
|
||||||
注意检查服务器日志,当心恶意访问。
|
注意检查服务器日志,当心恶意访问。
|
||||||
|
|||||||
@@ -8,12 +8,14 @@ CouchDBを構築するには、[Dockerのイメージ](https://hub.docker.com/_/
|
|||||||
```
|
```
|
||||||
[couchdb]
|
[couchdb]
|
||||||
single_node=true
|
single_node=true
|
||||||
|
max_document_size = 50000000
|
||||||
|
|
||||||
[chttpd]
|
[chttpd]
|
||||||
require_valid_user = true
|
require_valid_user = true
|
||||||
|
|
||||||
[chttpd_auth]
|
[chttpd_auth]
|
||||||
require_valid_user = true
|
require_valid_user = true
|
||||||
|
max_http_request_size = 4294967296
|
||||||
authentication_redirect = /_utils/session.html
|
authentication_redirect = /_utils/session.html
|
||||||
|
|
||||||
[httpd]
|
[httpd]
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ if you want to view the source, please visit the github repository of this plugi
|
|||||||
const prod = process.argv[2] === "production";
|
const prod = process.argv[2] === "production";
|
||||||
const manifestJson = JSON.parse(fs.readFileSync("./manifest.json"));
|
const manifestJson = JSON.parse(fs.readFileSync("./manifest.json"));
|
||||||
const packageJson = JSON.parse(fs.readFileSync("./package.json"));
|
const packageJson = JSON.parse(fs.readFileSync("./package.json"));
|
||||||
const updateInfo = JSON.stringify(fs.readFileSync("./updates.md") + "");
|
const updateInfo = JSON.stringify("PATCHED-"+fs.readFileSync("./updates.md") + "");
|
||||||
esbuild
|
esbuild
|
||||||
.build({
|
.build({
|
||||||
banner: {
|
banner: {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"id": "obsidian-livesync",
|
"id": "obsidian-livesync",
|
||||||
"name": "Self-hosted LiveSync",
|
"name": "Self-hosted LiveSync",
|
||||||
"version": "0.16.6",
|
"version": "0.16.8",
|
||||||
"minAppVersion": "0.9.12",
|
"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.",
|
"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",
|
"author": "vorotamoroz",
|
||||||
|
|||||||
2765
package-lock.json
generated
2765
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
44
package.json
44
package.json
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "obsidian-livesync",
|
"name": "obsidian-livesync",
|
||||||
"version": "0.16.6",
|
"version": "0.16.8",
|
||||||
"description": "Reflect your vault changes to some other devices immediately. Please make sure to disable other synchronize solutions to avoid content corruption or duplication.",
|
"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",
|
"main": "main.js",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
@@ -13,34 +13,32 @@
|
|||||||
"author": "vorotamoroz",
|
"author": "vorotamoroz",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@rollup/plugin-commonjs": "^18.0.0",
|
|
||||||
"@rollup/plugin-node-resolve": "^11.2.1",
|
|
||||||
"@rollup/plugin-typescript": "^8.2.1",
|
|
||||||
"@types/diff-match-patch": "^1.0.32",
|
"@types/diff-match-patch": "^1.0.32",
|
||||||
"@types/pouchdb": "^6.4.0",
|
"@types/pouchdb": "^6.4.0",
|
||||||
"@types/pouchdb-browser": "^6.1.3",
|
"@types/pouchdb-browser": "^6.1.3",
|
||||||
"@typescript-eslint/eslint-plugin": "^5.7.0",
|
"@types/xxhashjs": "^0.2.2",
|
||||||
"@typescript-eslint/parser": "^5.0.0",
|
"@typescript-eslint/eslint-plugin": "^5.44.0",
|
||||||
"builtin-modules": "^3.2.0",
|
"@typescript-eslint/parser": "^5.44.0",
|
||||||
"esbuild": "0.13.12",
|
"builtin-modules": "^3.3.0",
|
||||||
"esbuild-svelte": "^0.7.0",
|
"esbuild": "0.15.15",
|
||||||
"eslint": "^7.32.0",
|
"esbuild-svelte": "^0.7.3",
|
||||||
"eslint-config-airbnb-base": "^14.2.1",
|
"eslint": "^8.28.0",
|
||||||
"eslint-plugin-import": "^2.25.2",
|
"eslint-config-airbnb-base": "^15.0.0",
|
||||||
|
"eslint-plugin-import": "^2.26.0",
|
||||||
"obsidian": "^0.16.3",
|
"obsidian": "^0.16.3",
|
||||||
"postcss": "^8.4.14",
|
"postcss": "^8.4.19",
|
||||||
"postcss-load-config": "^3.1.4",
|
"postcss-load-config": "^4.0.1",
|
||||||
"rollup": "^2.32.1",
|
"svelte": "^3.53.1",
|
||||||
"svelte": "^3.49.0",
|
|
||||||
"svelte-preprocess": "^4.10.7",
|
"svelte-preprocess": "^4.10.7",
|
||||||
"tslib": "^2.2.0",
|
"tslib": "^2.4.1",
|
||||||
"typescript": "^4.2.4"
|
"typescript": "^4.9.3"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"diff-match-patch": "^1.0.5",
|
"diff-match-patch": "^1.0.5",
|
||||||
"esbuild": "0.13.12",
|
"esbuild": "0.15.15",
|
||||||
"esbuild-svelte": "^0.7.0",
|
"esbuild-svelte": "^0.7.3",
|
||||||
"idb": "^7.0.2",
|
"idb": "^7.1.1",
|
||||||
"xxhash-wasm": "^0.4.2"
|
"xxhash-wasm": "^0.4.2",
|
||||||
|
"xxhashjs": "^0.2.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,31 +0,0 @@
|
|||||||
import typescript from "@rollup/plugin-typescript";
|
|
||||||
import { nodeResolve } from "@rollup/plugin-node-resolve";
|
|
||||||
import commonjs from "@rollup/plugin-commonjs";
|
|
||||||
|
|
||||||
const isProd = process.env.BUILD === "production";
|
|
||||||
|
|
||||||
const banner = `/*
|
|
||||||
THIS IS A GENERATED/BUNDLED FILE BY ROLLUP
|
|
||||||
if you want to view the source visit the plugins github repository
|
|
||||||
*/
|
|
||||||
`;
|
|
||||||
|
|
||||||
export default {
|
|
||||||
input: "./src/main.ts",
|
|
||||||
output: {
|
|
||||||
dir: ".",
|
|
||||||
sourcemap: "inline",
|
|
||||||
sourcemapExcludeSources: isProd,
|
|
||||||
format: "cjs",
|
|
||||||
exports: "default",
|
|
||||||
banner,
|
|
||||||
},
|
|
||||||
external: ["obsidian"],
|
|
||||||
plugins: [
|
|
||||||
typescript({ exclude: ["pouchdb-browser.js", "pouchdb-browser-webpack"] }),
|
|
||||||
nodeResolve({
|
|
||||||
browser: true,
|
|
||||||
}),
|
|
||||||
commonjs(),
|
|
||||||
],
|
|
||||||
};
|
|
||||||
@@ -7,6 +7,7 @@ import { EntryDoc, LOG_LEVEL } from "./lib/src/types.js";
|
|||||||
import { enableEncryption } from "./lib/src/utils.js";
|
import { enableEncryption } from "./lib/src/utils.js";
|
||||||
import { isCloudantURI, isValidRemoteCouchDBURI } from "./lib/src/utils_couchdb.js";
|
import { isCloudantURI, isValidRemoteCouchDBURI } from "./lib/src/utils_couchdb.js";
|
||||||
import { id2path, path2id } from "./utils.js";
|
import { id2path, path2id } from "./utils.js";
|
||||||
|
import XXH from "xxhashjs";
|
||||||
|
|
||||||
export class LocalPouchDB extends LocalPouchDBBase {
|
export class LocalPouchDB extends LocalPouchDBBase {
|
||||||
|
|
||||||
@@ -33,6 +34,13 @@ export class LocalPouchDB extends LocalPouchDBBase {
|
|||||||
await this.kvDB.destroy();
|
await this.kvDB.destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async prepareHashFunctions() {
|
||||||
|
if (this.h32 != null) return;
|
||||||
|
// const { h32, h32Raw } = await xxhash();
|
||||||
|
this.h32 = (input: string, seed: number) => (XXH.h32(input, seed).toString(16))// h32;
|
||||||
|
this.h32Raw = (input: Uint8Array, seed: number) => (XXH.h32(input.buffer, seed).toNumber())// h32;
|
||||||
|
}
|
||||||
|
|
||||||
last_successful_post = false;
|
last_successful_post = false;
|
||||||
getLastPostFailedBySize() {
|
getLastPostFailedBySize() {
|
||||||
return !this.last_successful_post;
|
return !this.last_successful_post;
|
||||||
|
|||||||
2
src/lib
2
src/lib
Submodule src/lib updated: 2734fe9632...85bb3556ba
@@ -26,6 +26,8 @@
|
|||||||
- Improved
|
- Improved
|
||||||
- Corrupted chunks will be detected automatically.
|
- Corrupted chunks will be detected automatically.
|
||||||
- Now on the case-insensitive system, `aaa.md` and `AAA.md` will be treated as the same file or path at applying changesets.
|
- Now on the case-insensitive system, `aaa.md` and `AAA.md` will be treated as the same file or path at applying changesets.
|
||||||
|
- 0.16.7 Nothing has been changed except toolsets, framework library, and as like them. Please inform me if something had been getting strange!
|
||||||
|
- 0.16.8 Now we can synchronise without `bad_request:invalid UTF-8 JSON` even while end-to-end encryption has been disabled.
|
||||||
|
|
||||||
Note:
|
Note:
|
||||||
Before 0.16.5, LiveSync had some issues making chunks. In this case, synchronisation had became been always failing after a corrupted one should be made. After 0.16.6, the corrupted chunk is automatically detected. Sorry for troubling you but please do `rebuild everything` when this plug-in notified so.
|
Before 0.16.5, LiveSync had some issues making chunks. In this case, synchronisation had became been always failing after a corrupted one should be made. After 0.16.6, the corrupted chunk is automatically detected. Sorry for troubling you but please do `rebuild everything` when this plug-in notified so.
|
||||||
|
|||||||
Reference in New Issue
Block a user