mobiletto 1.0.14 → 1.0.15

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.
@@ -127,7 +127,8 @@ class StorageClient {
127
127
  if (recursive && objectCount === 0 && path !== '') {
128
128
  throw new MobilettoNotFoundError(path)
129
129
  }
130
- return objects
130
+ const filtered = objects.filter(o => o.name !== path)
131
+ return filtered
131
132
  }
132
133
 
133
134
  normalizeKey = (path) => {
package/index.js CHANGED
@@ -91,6 +91,7 @@ const UTILITY_FUNCTIONS = {
91
91
  if (obj.type && obj.type === M_FILE) {
92
92
  logger.verbose(`mirror: mirroring file: ${obj.name}`)
93
93
  const tempPath = `${MOBILETTO_TMP}/mobiletto_${shasum(JSON.stringify(obj))}.${randomstring.generate(10)}`
94
+ logger.debug(`mirror: writing ${obj.name} to temp file ${tempPath} ...`)
94
95
  try {
95
96
  // write from source -> write to temp file
96
97
  const fd = fs.openSync(tempPath, 'wx', 0o0600)
@@ -100,6 +101,7 @@ const UTILITY_FUNCTIONS = {
100
101
  }, () => {
101
102
  writer.close((err) => {
102
103
  if (err) { throw new MobilettoError(`mirror: error closing temp file: ${err}`) }
104
+ logger.debug(`mirror: finished writing ${obj.name} to temp file ${tempPath}`)
103
105
  })
104
106
  }).then(async () => {
105
107
  // read from temp file -> write to mirror
@@ -108,7 +110,9 @@ const UTILITY_FUNCTIONS = {
108
110
  const destName = obj.name.startsWith(sourcePath)
109
111
  ? obj.name.substring(sourcePath.length)
110
112
  : obj.name
113
+ logger.debug(`mirror: writing temp file ${tempPath} to destination: ${clientPath + destName}`)
111
114
  await client.write(clientPath + destName, reader)
115
+ logger.debug(`mirror: finished writing temp file ${tempPath} to destination: ${clientPath + destName}`)
112
116
  })
113
117
  results.success++
114
118
  } catch (e) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mobiletto",
3
- "version": "1.0.14",
3
+ "version": "1.0.15",
4
4
  "description": "A storage abstraction layer",
5
5
  "main": "index.js",
6
6
  "author": "Jonathan Cobb",