@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.
@@ -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
@@ -35,7 +35,7 @@
35
35
  "engines": {
36
36
  "node": ">=18.12.0"
37
37
  },
38
- "version": "1.11.0",
38
+ "version": "1.12.0",
39
39
  "description": "CommonStorage implementation based on Google Cloud Storage",
40
40
  "author": "Natural Cycles Team",
41
41
  "license": "MIT"
@@ -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(