mobiletto 1.1.16 → 1.1.17

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mobiletto",
3
- "version": "1.1.16",
3
+ "version": "1.1.17",
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": [
package/test/api.spec.js CHANGED
@@ -100,9 +100,9 @@ async function writeRandomFile(fixture, size) {
100
100
  return await fixture.api.write(fixture.name, dataGenerator())
101
101
  }
102
102
 
103
- // const encryptionTests = () => [null, { key: rand(32) }]
103
+ const encryptionTests = () => [null, { key: rand(32) }]
104
104
  // const encryptionTests = () => [null]
105
- const encryptionTests = () => [{ key: rand(32) }]
105
+ // const encryptionTests = () => [{ key: rand(32) }]
106
106
 
107
107
  const REDIS_ENABLED = {
108
108
  name: 'redis-enabled',
@@ -111,7 +111,7 @@ const REDIS_ENABLED = {
111
111
  }
112
112
  const REDIS_DISABLED = {
113
113
  name: 'redis-disabled',
114
- enabled: false,
114
+ enabled: true,
115
115
  config: (cfg) => {
116
116
  const newConfig = Object.assign({}, cfg)
117
117
  if (!newConfig.opts) { newConfig.opts = {} }
package/util/logger.js CHANGED
@@ -2,7 +2,11 @@ const winston = require('winston')
2
2
 
3
3
  const logger = winston.createLogger({
4
4
  level: process.env.MOBILETTO_LOG_LEVEL || 'error',
5
- format: winston.format.timestamp(),
5
+ format: winston.format.combine(
6
+ winston.format.timestamp({ format: 'YYYY-MM-DD HH:mm:ss.SSS' }),
7
+ winston.format.printf((info) => {
8
+ return `${info.timestamp} [${info.level.toUpperCase()}] ${info.message}`
9
+ })),
6
10
  transports: process.env.MOBILETTO_LOG_FILE
7
11
  ? [ new winston.transports.File({ filename: process.env.MOBILETTO_LOG_FILE }) ]
8
12
  : [ new winston.transports.Console() ]