@mblaney/holster 2.2.0 → 2.2.2

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.
@@ -39,8 +39,6 @@ const formatBytes = bytes => {
39
39
  return `${(bytes / 1073741824).toFixed(1)} GB`
40
40
  }
41
41
 
42
- const DEFAULT_STORAGE_LIMIT = 1 // MB
43
-
44
42
  const userStorage = readJSON(".user_storage.json")
45
43
  const userLimit = readJSON(".user_limit.json")
46
44
 
@@ -71,16 +69,19 @@ const page = users.slice(offset, offset + limit)
71
69
  console.log(` Total users: ${users.length}`)
72
70
  if (page.length > 0) {
73
71
  console.log(
74
- ` Showing full public keys for ${page.length} user${page.length !== 1 ? "s" : ""} (offset: ${offset}, limit: ${limit})`,
72
+ ` Showing public keys for ${page.length} user${page.length !== 1 ? "s" : ""} (query: --offset ${offset} --limit ${limit})`,
75
73
  )
76
74
  }
77
75
 
78
76
  const data = userLimit.data || {}
79
77
  for (const {pub, total} of page) {
80
- const pubLimit =
81
- typeof data[pub] === "number" ? data[pub] : DEFAULT_STORAGE_LIMIT
78
+ const pubLimit = data[pub]
82
79
  const limitStr =
83
- pubLimit === 0 ? "0 B (blocked)" : formatBytes(pubLimit * 1048576)
80
+ typeof pubLimit !== "number"
81
+ ? "server default"
82
+ : pubLimit === 0
83
+ ? "blocked"
84
+ : formatBytes(pubLimit * 1048576)
84
85
  console.log(` ${pub}`)
85
- console.log(` used: ${formatBytes(total)} / limit: ${limitStr}`)
86
+ console.log(` used: ${formatBytes(total)} / ${limitStr}`)
86
87
  }