braidfs 0.0.117 → 0.0.119

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.
Files changed (2) hide show
  1. package/index.js +8 -5
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -332,16 +332,19 @@ async function scan_files() {
332
332
  scan_files.running = true
333
333
  while (scan_files.do_again) {
334
334
  scan_files.do_again = false
335
- var timestamp = new Date().toLocaleTimeString(
336
- 'en-US', {minute: '2-digit', second: '2-digit', hour: '2-digit'}
337
- )
338
- console.log(`scan files.. `, timestamp)
339
335
 
340
336
  if (watch_files?.watcher?.options?.usePolling)
341
337
  console.log('Warning: BAD PERFORMANCE!! Filesystem using polling!')
342
338
 
339
+ var st = Date.now()
340
+
343
341
  if (await f(sync_base))
344
342
  on_watcher_miss(`scanner picked up a change that the watcher should have gotten`, false)
343
+
344
+ var timestamp = new Date().toLocaleTimeString(
345
+ 'en-US', {minute: '2-digit', second: '2-digit', hour: '2-digit'}
346
+ )
347
+ console.log(`scan files.. ${timestamp}. ${Date.now() - st}ms`)
345
348
  }
346
349
  scan_files.running = false
347
350
 
@@ -816,7 +819,7 @@ async function sync_url(url) {
816
819
  if (freed || closed) return
817
820
 
818
821
  console.log(`sending to ${url}`)
819
- // console.log(JSON.stringify(stuff, null, 4).slice(0, 1000))
822
+ console.log(JSON.stringify(stuff, null, 4).slice(0, 1000))
820
823
 
821
824
  var r = await my_fetch({ method: "PUT", ...stuff })
822
825
  if (freed || closed) return
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "braidfs",
3
- "version": "0.0.117",
3
+ "version": "0.0.119",
4
4
  "description": "braid technology synchronizing files and webpages",
5
5
  "author": "Braid Working Group",
6
6
  "repository": "braid-org/braidfs",