@gallop.software/studio 1.5.8 → 1.5.10
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/{StudioUI-O53YFD6Q.js → StudioUI-GJK45R3T.js} +61 -57
- package/dist/StudioUI-GJK45R3T.js.map +1 -0
- package/dist/{StudioUI-6Q7GX6IY.mjs → StudioUI-QZ54STXE.mjs} +53 -49
- package/dist/StudioUI-QZ54STXE.mjs.map +1 -0
- package/dist/handlers/index.js +7 -8
- package/dist/handlers/index.js.map +1 -1
- package/dist/handlers/index.mjs +7 -8
- package/dist/handlers/index.mjs.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/dist/StudioUI-6Q7GX6IY.mjs.map +0 -1
- package/dist/StudioUI-O53YFD6Q.js.map +0 -1
package/dist/handlers/index.mjs
CHANGED
|
@@ -801,28 +801,27 @@ async function handleFolderImages(request) {
|
|
|
801
801
|
const folders = foldersParam.split(",");
|
|
802
802
|
const meta = await loadMeta();
|
|
803
803
|
const fileEntries = getFileEntries(meta);
|
|
804
|
-
const
|
|
804
|
+
const allFiles = [];
|
|
805
805
|
const prefixes = folders.map((f) => {
|
|
806
806
|
const rel = f.replace(/^public\/?/, "");
|
|
807
807
|
return rel ? `/${rel}/` : "/";
|
|
808
808
|
});
|
|
809
809
|
for (const [key] of fileEntries) {
|
|
810
|
-
const fileName = path5.basename(key);
|
|
811
|
-
if (!isImageFile(fileName)) continue;
|
|
812
810
|
for (const prefix of prefixes) {
|
|
813
811
|
if (key.startsWith(prefix) || prefix === "/" && key.startsWith("/")) {
|
|
814
|
-
|
|
812
|
+
allFiles.push(key.slice(1));
|
|
815
813
|
break;
|
|
816
814
|
}
|
|
817
815
|
}
|
|
818
816
|
}
|
|
819
817
|
return NextResponse.json({
|
|
820
|
-
count:
|
|
821
|
-
images:
|
|
818
|
+
count: allFiles.length,
|
|
819
|
+
images: allFiles
|
|
820
|
+
// Keep as 'images' for backwards compatibility
|
|
822
821
|
});
|
|
823
822
|
} catch (error) {
|
|
824
|
-
console.error("Failed to get folder
|
|
825
|
-
return NextResponse.json({ error: "Failed to get folder
|
|
823
|
+
console.error("Failed to get folder files:", error);
|
|
824
|
+
return NextResponse.json({ error: "Failed to get folder files" }, { status: 500 });
|
|
826
825
|
}
|
|
827
826
|
}
|
|
828
827
|
|