@gallop.software/studio 1.0.2 → 1.0.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.
- package/dist/{StudioUI-KCUI5YUD.mjs → StudioUI-ADLDMRJQ.mjs} +23 -25
- package/dist/{StudioUI-KCUI5YUD.mjs.map → StudioUI-ADLDMRJQ.mjs.map} +1 -1
- package/dist/{StudioUI-GWMM47P7.js → StudioUI-FCQJK23M.js} +23 -25
- package/dist/StudioUI-FCQJK23M.js.map +1 -0
- package/dist/handlers/index.js +8 -2
- package/dist/handlers/index.js.map +1 -1
- package/dist/handlers/index.mjs +8 -2
- 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-GWMM47P7.js.map +0 -1
|
@@ -4570,37 +4570,35 @@ function StudioDetailView() {
|
|
|
4570
4570
|
currentFile: focusedItem.name
|
|
4571
4571
|
});
|
|
4572
4572
|
try {
|
|
4573
|
+
const imageKey = focusedItem.path.replace(/^public\//, "");
|
|
4574
|
+
const formattedKey = imageKey.startsWith("/") ? imageKey : `/${imageKey}`;
|
|
4573
4575
|
const response = await fetch("/api/studio/reprocess", {
|
|
4574
4576
|
method: "POST",
|
|
4575
4577
|
headers: { "Content-Type": "application/json" },
|
|
4576
4578
|
body: JSON.stringify({
|
|
4577
|
-
|
|
4579
|
+
imageKeys: [formattedKey]
|
|
4578
4580
|
})
|
|
4579
4581
|
});
|
|
4582
|
+
const data = await response.json();
|
|
4580
4583
|
if (!response.ok) {
|
|
4581
|
-
throw new Error("Processing failed");
|
|
4582
|
-
}
|
|
4583
|
-
const reader = response.body?.getReader();
|
|
4584
|
-
if (!reader) {
|
|
4585
|
-
throw new Error("No response body");
|
|
4584
|
+
throw new Error(data.error || "Processing failed");
|
|
4586
4585
|
}
|
|
4587
|
-
|
|
4588
|
-
|
|
4589
|
-
|
|
4590
|
-
|
|
4591
|
-
|
|
4592
|
-
|
|
4593
|
-
|
|
4594
|
-
|
|
4595
|
-
|
|
4596
|
-
|
|
4597
|
-
|
|
4598
|
-
|
|
4599
|
-
|
|
4600
|
-
|
|
4601
|
-
|
|
4602
|
-
|
|
4603
|
-
}
|
|
4586
|
+
if (data.processed?.length > 0) {
|
|
4587
|
+
setProcessProgress({
|
|
4588
|
+
current: 1,
|
|
4589
|
+
total: 1,
|
|
4590
|
+
percent: 100,
|
|
4591
|
+
status: "complete",
|
|
4592
|
+
message: `Processed ${focusedItem.name}`
|
|
4593
|
+
});
|
|
4594
|
+
} else if (data.errors?.length > 0) {
|
|
4595
|
+
setProcessProgress({
|
|
4596
|
+
current: 0,
|
|
4597
|
+
total: 1,
|
|
4598
|
+
percent: 0,
|
|
4599
|
+
status: "error",
|
|
4600
|
+
message: `Failed to process: ${data.errors.join(", ")}`
|
|
4601
|
+
});
|
|
4604
4602
|
}
|
|
4605
4603
|
triggerRefresh();
|
|
4606
4604
|
} catch (error) {
|
|
@@ -4610,7 +4608,7 @@ function StudioDetailView() {
|
|
|
4610
4608
|
total: 1,
|
|
4611
4609
|
percent: 0,
|
|
4612
4610
|
status: "error",
|
|
4613
|
-
message: "Failed to process image"
|
|
4611
|
+
message: error instanceof Error ? error.message : "Failed to process image"
|
|
4614
4612
|
});
|
|
4615
4613
|
}
|
|
4616
4614
|
};
|
|
@@ -5762,4 +5760,4 @@ export {
|
|
|
5762
5760
|
StudioUI,
|
|
5763
5761
|
StudioUI_default as default
|
|
5764
5762
|
};
|
|
5765
|
-
//# sourceMappingURL=StudioUI-
|
|
5763
|
+
//# sourceMappingURL=StudioUI-ADLDMRJQ.mjs.map
|