@naturalcycles/cloud-storage-lib 1.11.0 → 1.12.0
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/dist/cloudStorage.js +6 -0
- package/package.json +1 -1
- package/src/cloudStorage.ts +6 -0
package/dist/cloudStorage.js
CHANGED
|
@@ -172,6 +172,12 @@ class CloudStorage {
|
|
|
172
172
|
async combineFiles(bucketName, filePaths, toPath, toBucket, currentRecursionDepth = 0) {
|
|
173
173
|
(0, js_lib_1._assert)(currentRecursionDepth <= MAX_RECURSION_DEPTH, `combineFiles reached max recursion depth of ${MAX_RECURSION_DEPTH}`);
|
|
174
174
|
const { logger, debug } = this.cfg;
|
|
175
|
+
if (filePaths.length === 0) {
|
|
176
|
+
if (debug) {
|
|
177
|
+
logger.log(`[${currentRecursionDepth}] Nothing to compose, returning early!`);
|
|
178
|
+
}
|
|
179
|
+
return;
|
|
180
|
+
}
|
|
175
181
|
if (debug) {
|
|
176
182
|
logger.log(`[${currentRecursionDepth}] Will compose ${filePaths.length} files, by batches of ${BATCH_SIZE}`);
|
|
177
183
|
}
|
package/package.json
CHANGED
package/src/cloudStorage.ts
CHANGED
|
@@ -291,6 +291,12 @@ export class CloudStorage implements CommonStorage {
|
|
|
291
291
|
`combineFiles reached max recursion depth of ${MAX_RECURSION_DEPTH}`,
|
|
292
292
|
)
|
|
293
293
|
const { logger, debug } = this.cfg
|
|
294
|
+
if (filePaths.length === 0) {
|
|
295
|
+
if (debug) {
|
|
296
|
+
logger.log(`[${currentRecursionDepth}] Nothing to compose, returning early!`)
|
|
297
|
+
}
|
|
298
|
+
return
|
|
299
|
+
}
|
|
294
300
|
|
|
295
301
|
if (debug) {
|
|
296
302
|
logger.log(
|