@gallop.software/studio 1.2.0 → 1.2.1
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-FCQJK23M.js → StudioUI-7GX4ZLF3.js} +423 -423
- package/dist/{StudioUI-FCQJK23M.js.map → StudioUI-7GX4ZLF3.js.map} +1 -1
- package/dist/{StudioUI-ADLDMRJQ.mjs → StudioUI-GLI2IYCZ.mjs} +2 -2
- package/dist/{chunk-UFCWGUAG.js → chunk-N6JYTJCB.js} +2 -1
- package/dist/chunk-N6JYTJCB.js.map +1 -0
- package/dist/{chunk-HXE6XCG2.mjs → chunk-RHI3UROE.mjs} +2 -1
- package/dist/chunk-RHI3UROE.mjs.map +1 -0
- package/dist/handlers/index.js +5 -5
- package/dist/handlers/index.js.map +1 -1
- package/dist/handlers/index.mjs +5 -5
- package/dist/handlers/index.mjs.map +1 -1
- package/dist/index.js +15 -15
- package/dist/index.mjs +2 -2
- package/package.json +1 -1
- package/dist/chunk-HXE6XCG2.mjs.map +0 -1
- package/dist/chunk-UFCWGUAG.js.map +0 -1
- /package/dist/{StudioUI-ADLDMRJQ.mjs.map → StudioUI-GLI2IYCZ.mjs.map} +0 -0
package/dist/handlers/index.mjs
CHANGED
|
@@ -705,11 +705,10 @@ async function handleUpload(request) {
|
|
|
705
705
|
try {
|
|
706
706
|
const metadata = await sharp2(buffer).metadata();
|
|
707
707
|
meta[imageKey] = {
|
|
708
|
-
w: metadata.width || 0,
|
|
709
|
-
h: metadata.height || 0
|
|
708
|
+
o: { w: metadata.width || 0, h: metadata.height || 0 }
|
|
710
709
|
};
|
|
711
710
|
} catch {
|
|
712
|
-
meta[imageKey] = { w: 0, h: 0 };
|
|
711
|
+
meta[imageKey] = { o: { w: 0, h: 0 } };
|
|
713
712
|
}
|
|
714
713
|
} else {
|
|
715
714
|
meta[imageKey] = {};
|
|
@@ -744,7 +743,7 @@ async function handleDelete(request) {
|
|
|
744
743
|
const absolutePath = path6.join(process.cwd(), itemPath);
|
|
745
744
|
const imageKey = "/" + itemPath.replace(/^public\//, "");
|
|
746
745
|
const entry = meta[imageKey];
|
|
747
|
-
const isPushedToCloud = entry?.c
|
|
746
|
+
const isPushedToCloud = entry?.c !== void 0;
|
|
748
747
|
try {
|
|
749
748
|
const stats = await fs5.stat(absolutePath);
|
|
750
749
|
if (stats.isDirectory()) {
|
|
@@ -752,7 +751,8 @@ async function handleDelete(request) {
|
|
|
752
751
|
const prefix = imageKey + "/";
|
|
753
752
|
for (const key of Object.keys(meta)) {
|
|
754
753
|
if (key.startsWith(prefix) || key === imageKey) {
|
|
755
|
-
|
|
754
|
+
const keyEntry = meta[key];
|
|
755
|
+
if (keyEntry && keyEntry.c === void 0) {
|
|
756
756
|
for (const thumbPath of getAllThumbnailPaths(key)) {
|
|
757
757
|
const absoluteThumbPath = path6.join(process.cwd(), "public", thumbPath);
|
|
758
758
|
try {
|