mobiletto 1.1.31 → 1.1.33

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.
@@ -126,7 +126,7 @@ class StorageClient {
126
126
  const files = []
127
127
  await this.auth()
128
128
  const hasMax = opts && opts.max
129
- const maxFileCount = hasMax ? opts.max : 1000
129
+ const maxFileCount = hasMax ? opts.max : 10000
130
130
  const pfx = (this.prefix.length === 0 || this.prefix.endsWith(this.delimiter) ? this.prefix : this.prefix + this.delimiter) +
131
131
  (pth.startsWith(this.delimiter) ? pth.substring(0) : pth)
132
132
 
package/index.js CHANGED
@@ -523,21 +523,22 @@ async function mobiletto (driverPath, key, secret, opts, encryption = null) {
523
523
  return META_LOAD_QUEUE
524
524
  }
525
525
 
526
- const waitForFiles = (files, entries, resolve) => {
527
- if (files.length === entries.length) {
528
- resolve(files)
529
- } else {
530
- setTimeout(() => { waitForFiles(files, entries, resolve) }, 1000)
531
- }
532
- }
533
-
534
526
  const _loadMeta = async (dirent, entries) => {
535
527
  const files = []
528
+
529
+ const waitForFiles = (resolve) => {
530
+ if (files.length === entries.length) {
531
+ resolve(files)
532
+ } else {
533
+ setTimeout(() => waitForFiles(resolve), 1000)
534
+ }
535
+ }
536
+
536
537
  for (const entry of entries) {
537
538
  const job = { dirent, entry, files }
538
539
  metaLoadQueue().add(META_LOAD_JOB_NAME, job)
539
540
  }
540
- await new Promise(resolve => waitForFiles(files, entries, resolve))
541
+ await new Promise(resolve => waitForFiles(resolve))
541
542
  return files
542
543
  }
543
544
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mobiletto",
3
- "version": "1.1.31",
3
+ "version": "1.1.33",
4
4
  "description": "A storage layer that presents a uniform interface to Amazon S3, Backblaze B2, and local storage",
5
5
  "main": "index.js",
6
6
  "keywords": [