mentie 0.3.10 → 0.3.12
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/modules/cache.js +1 -1
- package/modules/environment.js +1 -1
- package/package.json +1 -1
package/modules/cache.js
CHANGED
|
@@ -67,7 +67,7 @@ cache.stats = () => {
|
|
|
67
67
|
const keys = Object.keys( _cache )
|
|
68
68
|
|
|
69
69
|
// Get the size in bytes of the cache
|
|
70
|
-
const size_bytes = keys.reduce( ( acc, key ) => acc + JSON.stringify( _cache[key] ).length, 0 )
|
|
70
|
+
const size_bytes = keys.reduce( ( acc, key ) => acc + JSON.stringify( _cache[key] ).length + JSON.stringify( key ).length, 0 )
|
|
71
71
|
|
|
72
72
|
// Calculate side to MiB and GiB, both rounded to 2 decimal places
|
|
73
73
|
const size_mib = ( size_bytes / ( 1024 * 1024 ) ).toFixed( 2 )
|
package/modules/environment.js
CHANGED
|
@@ -69,7 +69,7 @@ env.web_loglevel = () => env.is_web() && new URLSearchParams( location?.search )
|
|
|
69
69
|
* Retrieves the log level set via environment variables in a Node.js environment.
|
|
70
70
|
* @returns {string|undefined} The log level from environment variables, or undefined if not set.
|
|
71
71
|
*/
|
|
72
|
-
env.node_loglevel = () => env.is_node() && process.env?.
|
|
72
|
+
env.node_loglevel = () => env.is_node() && process.env?.LOGLEVEL
|
|
73
73
|
|
|
74
74
|
/**
|
|
75
75
|
* Retrieves the effective log level based on the environment. Defaults to 'info' in development environments, 'error' otherwise.
|