braidfs 0.0.127 → 0.0.129
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +9 -2
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -400,6 +400,8 @@ async function sync_url(url) {
|
|
|
400
400
|
wasnt_normal = normalized_url != url
|
|
401
401
|
url = normalized_url
|
|
402
402
|
|
|
403
|
+
await braid_text.db_folder_init()
|
|
404
|
+
|
|
403
405
|
var is_external_link = url.match(/^https?:\/\//),
|
|
404
406
|
path = is_external_link ? url.replace(/^https?:\/\//, '') : url,
|
|
405
407
|
fullpath = `${sync_base}/${path}`,
|
|
@@ -717,6 +719,9 @@ async function sync_url(url) {
|
|
|
717
719
|
file_loop_pump_lock = 0
|
|
718
720
|
self.file_written_cbs = []
|
|
719
721
|
|
|
722
|
+
// hack: remvoe in future
|
|
723
|
+
var old_meta_fork_point = null
|
|
724
|
+
|
|
720
725
|
// store a recent mapping of content-hashes to their versions,
|
|
721
726
|
// to support the command line: braidfs editing filename < file
|
|
722
727
|
self.hash_to_version_cache = new Map()
|
|
@@ -776,7 +781,8 @@ async function sync_url(url) {
|
|
|
776
781
|
version: file_last_version,
|
|
777
782
|
digest: file_last_digest,
|
|
778
783
|
peer: self.peer,
|
|
779
|
-
local_edit_counter: self.local_edit_counter
|
|
784
|
+
local_edit_counter: self.local_edit_counter,
|
|
785
|
+
fork_point: old_meta_fork_point
|
|
780
786
|
} = Array.isArray(meta) ? { version: meta } : meta)
|
|
781
787
|
|
|
782
788
|
if (!self.peer) self.peer = Math.random().toString(36).slice(2)
|
|
@@ -816,7 +822,7 @@ async function sync_url(url) {
|
|
|
816
822
|
})
|
|
817
823
|
if (freed) return
|
|
818
824
|
|
|
819
|
-
file_loop_pump()
|
|
825
|
+
await file_loop_pump()
|
|
820
826
|
async function file_loop_pump() {
|
|
821
827
|
if (freed) return
|
|
822
828
|
if (file_loop_pump_lock) return
|
|
@@ -981,6 +987,7 @@ async function sync_url(url) {
|
|
|
981
987
|
|
|
982
988
|
// Use braid_text.sync for bidirectional sync with the remote URL
|
|
983
989
|
if (is_external_link) braid_text.sync(url, new URL(url), {
|
|
990
|
+
fork_point_hint: old_meta_fork_point,
|
|
984
991
|
signal: ac.signal,
|
|
985
992
|
headers: {
|
|
986
993
|
'Content-Type': 'text/plain',
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "braidfs",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.129",
|
|
4
4
|
"description": "braid technology synchronizing files and webpages",
|
|
5
5
|
"author": "Braid Working Group",
|
|
6
6
|
"repository": "braid-org/braidfs",
|
|
7
7
|
"homepage": "https://braid.org",
|
|
8
8
|
"dependencies": {
|
|
9
9
|
"braid-http": "~1.3.83",
|
|
10
|
-
"braid-text": "~0.2.
|
|
10
|
+
"braid-text": "~0.2.94",
|
|
11
11
|
"braid-blob": "~0.0.30",
|
|
12
12
|
"chokidar": "^4.0.3"
|
|
13
13
|
},
|