@gallop.software/studio 2.3.15 → 2.3.17
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/client/index.html
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
|
12
12
|
}
|
|
13
13
|
</style>
|
|
14
|
-
<script type="module" crossorigin src="/assets/index-
|
|
14
|
+
<script type="module" crossorigin src="/assets/index-CpFx3R91.js"></script>
|
|
15
15
|
</head>
|
|
16
16
|
<body>
|
|
17
17
|
<div id="root"></div>
|
package/dist/server/index.js
CHANGED
|
@@ -1119,6 +1119,7 @@ async function handleDelete(request) {
|
|
|
1119
1119
|
sourceFolders.add(path6.dirname(absolutePath));
|
|
1120
1120
|
const entry = meta[imageKey];
|
|
1121
1121
|
const isPushedToCloud = entry?.c !== void 0;
|
|
1122
|
+
const hasThumbnails = entry ? isProcessed(entry) : false;
|
|
1122
1123
|
try {
|
|
1123
1124
|
const stats = await fs6.stat(absolutePath);
|
|
1124
1125
|
if (stats.isDirectory()) {
|
|
@@ -1127,7 +1128,13 @@ async function handleDelete(request) {
|
|
|
1127
1128
|
for (const key of Object.keys(meta)) {
|
|
1128
1129
|
if (key.startsWith(prefix) || key === imageKey) {
|
|
1129
1130
|
const keyEntry = meta[key];
|
|
1130
|
-
|
|
1131
|
+
const keyHasThumbnails = keyEntry ? isProcessed(keyEntry) : false;
|
|
1132
|
+
if (keyEntry?.c !== void 0) {
|
|
1133
|
+
try {
|
|
1134
|
+
await deleteFromCdn(key, keyHasThumbnails);
|
|
1135
|
+
} catch {
|
|
1136
|
+
}
|
|
1137
|
+
} else {
|
|
1131
1138
|
for (const thumbPath of getAllThumbnailPaths(key)) {
|
|
1132
1139
|
const absoluteThumbPath = getPublicPath(thumbPath);
|
|
1133
1140
|
try {
|
|
@@ -1143,7 +1150,12 @@ async function handleDelete(request) {
|
|
|
1143
1150
|
await fs6.unlink(absolutePath);
|
|
1144
1151
|
const isInImagesFolder = itemPath.startsWith("public/images/");
|
|
1145
1152
|
if (!isInImagesFolder && entry) {
|
|
1146
|
-
if (
|
|
1153
|
+
if (isPushedToCloud) {
|
|
1154
|
+
try {
|
|
1155
|
+
await deleteFromCdn(imageKey, hasThumbnails);
|
|
1156
|
+
} catch {
|
|
1157
|
+
}
|
|
1158
|
+
} else {
|
|
1147
1159
|
for (const thumbPath of getAllThumbnailPaths(imageKey)) {
|
|
1148
1160
|
const absoluteThumbPath = getPublicPath(thumbPath);
|
|
1149
1161
|
try {
|
|
@@ -1157,12 +1169,26 @@ async function handleDelete(request) {
|
|
|
1157
1169
|
}
|
|
1158
1170
|
} catch {
|
|
1159
1171
|
if (entry) {
|
|
1172
|
+
if (isPushedToCloud) {
|
|
1173
|
+
try {
|
|
1174
|
+
await deleteFromCdn(imageKey, hasThumbnails);
|
|
1175
|
+
} catch {
|
|
1176
|
+
}
|
|
1177
|
+
}
|
|
1160
1178
|
delete meta[imageKey];
|
|
1161
1179
|
} else {
|
|
1162
1180
|
const prefix = imageKey + "/";
|
|
1163
1181
|
let foundAny = false;
|
|
1164
1182
|
for (const key of Object.keys(meta)) {
|
|
1165
1183
|
if (key.startsWith(prefix)) {
|
|
1184
|
+
const keyEntry = meta[key];
|
|
1185
|
+
const keyHasThumbnails = keyEntry ? isProcessed(keyEntry) : false;
|
|
1186
|
+
if (keyEntry?.c !== void 0) {
|
|
1187
|
+
try {
|
|
1188
|
+
await deleteFromCdn(key, keyHasThumbnails);
|
|
1189
|
+
} catch {
|
|
1190
|
+
}
|
|
1191
|
+
}
|
|
1166
1192
|
delete meta[key];
|
|
1167
1193
|
foundAny = true;
|
|
1168
1194
|
}
|