@gallop.software/studio 1.2.3 → 1.2.4

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.
@@ -355,6 +355,10 @@ async function handleList(request) {
355
355
  }
356
356
  for (const thumb of allThumbnails) {
357
357
  const thumbRelative = thumb.path.replace(/^\/images\/?/, "");
358
+ const originalEntry = fileEntries.find(([k]) => k === thumb.originalKey)?.[1];
359
+ const cdnIndex = originalEntry?.c;
360
+ const cdnBaseUrl = cdnIndex !== void 0 ? cdnUrls[cdnIndex] : void 0;
361
+ const thumbnailUrl = cdnBaseUrl ? `${cdnBaseUrl}${thumb.path}` : thumb.path;
358
362
  if (imagesSubPath === "") {
359
363
  const slashIndex = thumbRelative.indexOf("/");
360
364
  if (slashIndex === -1) {
@@ -363,7 +367,7 @@ async function handleList(request) {
363
367
  name: fileName,
364
368
  path: `public/images/${fileName}`,
365
369
  type: "file",
366
- thumbnail: thumb.path,
370
+ thumbnail: thumbnailUrl,
367
371
  hasThumbnail: false,
368
372
  isProtected: true
369
373
  });
@@ -394,7 +398,7 @@ async function handleList(request) {
394
398
  name: remaining,
395
399
  path: `public/images/${imagesSubPath}/${remaining}`,
396
400
  type: "file",
397
- thumbnail: thumb.path,
401
+ thumbnail: thumbnailUrl,
398
402
  hasThumbnail: false,
399
403
  isProtected: true
400
404
  });