@gallop.software/studio 2.3.22 → 2.3.24
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-HYnbxDJg.js"></script>
|
|
15
15
|
</head>
|
|
16
16
|
<body>
|
|
17
17
|
<div id="root"></div>
|
package/dist/server/index.js
CHANGED
|
@@ -1355,15 +1355,16 @@ async function handleMoveStream(request) {
|
|
|
1355
1355
|
const newRelativePath = destWithoutPublic ? path6.join(destWithoutPublic, itemName) : itemName;
|
|
1356
1356
|
const oldKey = "/" + oldRelativePath;
|
|
1357
1357
|
const newKey = "/" + newRelativePath;
|
|
1358
|
-
sendEvent({
|
|
1359
|
-
type: "progress",
|
|
1360
|
-
current: i + 1,
|
|
1361
|
-
total,
|
|
1362
|
-
percent: Math.round((i + 1) / total * 100),
|
|
1363
|
-
currentFile: itemName
|
|
1364
|
-
});
|
|
1365
1358
|
if (meta[newKey]) {
|
|
1366
1359
|
errors.push(`${itemName} already exists in destination`);
|
|
1360
|
+
sendEvent({
|
|
1361
|
+
type: "progress",
|
|
1362
|
+
current: i + 1,
|
|
1363
|
+
total,
|
|
1364
|
+
moved: moved.length,
|
|
1365
|
+
percent: Math.round((i + 1) / total * 100),
|
|
1366
|
+
currentFile: itemName
|
|
1367
|
+
});
|
|
1367
1368
|
continue;
|
|
1368
1369
|
}
|
|
1369
1370
|
const entry = meta[oldKey];
|
|
@@ -1388,6 +1389,14 @@ async function handleMoveStream(request) {
|
|
|
1388
1389
|
delete meta[oldKey];
|
|
1389
1390
|
meta[newKey] = newEntry;
|
|
1390
1391
|
moved.push(itemPath);
|
|
1392
|
+
sendEvent({
|
|
1393
|
+
type: "progress",
|
|
1394
|
+
current: i + 1,
|
|
1395
|
+
total,
|
|
1396
|
+
moved: moved.length,
|
|
1397
|
+
percent: Math.round((i + 1) / total * 100),
|
|
1398
|
+
currentFile: itemName
|
|
1399
|
+
});
|
|
1391
1400
|
} else if (isPushedToR2 && isImage) {
|
|
1392
1401
|
const buffer = await downloadFromCdn(oldKey);
|
|
1393
1402
|
await fs6.mkdir(path6.dirname(newAbsolutePath), { recursive: true });
|
|
@@ -1416,21 +1425,53 @@ async function handleMoveStream(request) {
|
|
|
1416
1425
|
delete meta[oldKey];
|
|
1417
1426
|
meta[newKey] = newEntry;
|
|
1418
1427
|
moved.push(itemPath);
|
|
1428
|
+
sendEvent({
|
|
1429
|
+
type: "progress",
|
|
1430
|
+
current: i + 1,
|
|
1431
|
+
total,
|
|
1432
|
+
moved: moved.length,
|
|
1433
|
+
percent: Math.round((i + 1) / total * 100),
|
|
1434
|
+
currentFile: itemName
|
|
1435
|
+
});
|
|
1419
1436
|
} else {
|
|
1420
1437
|
const absolutePath = getWorkspacePath(safePath);
|
|
1421
1438
|
if (absoluteDestination.startsWith(absolutePath + path6.sep)) {
|
|
1422
1439
|
errors.push(`Cannot move ${itemName} into itself`);
|
|
1440
|
+
sendEvent({
|
|
1441
|
+
type: "progress",
|
|
1442
|
+
current: i + 1,
|
|
1443
|
+
total,
|
|
1444
|
+
moved: moved.length,
|
|
1445
|
+
percent: Math.round((i + 1) / total * 100),
|
|
1446
|
+
currentFile: itemName
|
|
1447
|
+
});
|
|
1423
1448
|
continue;
|
|
1424
1449
|
}
|
|
1425
1450
|
try {
|
|
1426
1451
|
await fs6.access(absolutePath);
|
|
1427
1452
|
} catch {
|
|
1428
1453
|
errors.push(`${itemName} not found`);
|
|
1454
|
+
sendEvent({
|
|
1455
|
+
type: "progress",
|
|
1456
|
+
current: i + 1,
|
|
1457
|
+
total,
|
|
1458
|
+
moved: moved.length,
|
|
1459
|
+
percent: Math.round((i + 1) / total * 100),
|
|
1460
|
+
currentFile: itemName
|
|
1461
|
+
});
|
|
1429
1462
|
continue;
|
|
1430
1463
|
}
|
|
1431
1464
|
try {
|
|
1432
1465
|
await fs6.access(newAbsolutePath);
|
|
1433
1466
|
errors.push(`${itemName} already exists in destination`);
|
|
1467
|
+
sendEvent({
|
|
1468
|
+
type: "progress",
|
|
1469
|
+
current: i + 1,
|
|
1470
|
+
total,
|
|
1471
|
+
moved: moved.length,
|
|
1472
|
+
percent: Math.round((i + 1) / total * 100),
|
|
1473
|
+
currentFile: itemName
|
|
1474
|
+
});
|
|
1434
1475
|
continue;
|
|
1435
1476
|
} catch {
|
|
1436
1477
|
}
|
|
@@ -1464,10 +1505,26 @@ async function handleMoveStream(request) {
|
|
|
1464
1505
|
}
|
|
1465
1506
|
}
|
|
1466
1507
|
moved.push(itemPath);
|
|
1508
|
+
sendEvent({
|
|
1509
|
+
type: "progress",
|
|
1510
|
+
current: i + 1,
|
|
1511
|
+
total,
|
|
1512
|
+
moved: moved.length,
|
|
1513
|
+
percent: Math.round((i + 1) / total * 100),
|
|
1514
|
+
currentFile: itemName
|
|
1515
|
+
});
|
|
1467
1516
|
}
|
|
1468
1517
|
} catch (err) {
|
|
1469
1518
|
console.error(`Failed to move ${itemName}:`, err);
|
|
1470
1519
|
errors.push(`Failed to move ${itemName}`);
|
|
1520
|
+
sendEvent({
|
|
1521
|
+
type: "progress",
|
|
1522
|
+
current: i + 1,
|
|
1523
|
+
total,
|
|
1524
|
+
moved: moved.length,
|
|
1525
|
+
percent: Math.round((i + 1) / total * 100),
|
|
1526
|
+
currentFile: itemName
|
|
1527
|
+
});
|
|
1471
1528
|
}
|
|
1472
1529
|
}
|
|
1473
1530
|
await saveMeta(meta);
|
|
@@ -2557,18 +2614,19 @@ async function handleImportUrls(request) {
|
|
|
2557
2614
|
for (let i = 0; i < urls.length; i++) {
|
|
2558
2615
|
const url = urls[i].trim();
|
|
2559
2616
|
if (!url) continue;
|
|
2560
|
-
sendEvent({
|
|
2561
|
-
type: "progress",
|
|
2562
|
-
current: i + 1,
|
|
2563
|
-
total,
|
|
2564
|
-
percent: Math.round((i + 1) / total * 100),
|
|
2565
|
-
currentFile: url
|
|
2566
|
-
});
|
|
2567
2617
|
try {
|
|
2568
2618
|
const { base, path: path10 } = parseImageUrl(url);
|
|
2569
2619
|
const existingEntry = getMetaEntry(meta, path10);
|
|
2570
2620
|
if (existingEntry) {
|
|
2571
2621
|
skipped.push(path10);
|
|
2622
|
+
sendEvent({
|
|
2623
|
+
type: "progress",
|
|
2624
|
+
current: i + 1,
|
|
2625
|
+
total,
|
|
2626
|
+
imported: added.length,
|
|
2627
|
+
percent: Math.round((i + 1) / total * 100),
|
|
2628
|
+
currentFile: url
|
|
2629
|
+
});
|
|
2572
2630
|
continue;
|
|
2573
2631
|
}
|
|
2574
2632
|
const cdnIndex = getOrAddCdnIndex(meta, base);
|
|
@@ -2579,9 +2637,25 @@ async function handleImportUrls(request) {
|
|
|
2579
2637
|
c: cdnIndex
|
|
2580
2638
|
});
|
|
2581
2639
|
added.push(path10);
|
|
2640
|
+
sendEvent({
|
|
2641
|
+
type: "progress",
|
|
2642
|
+
current: i + 1,
|
|
2643
|
+
total,
|
|
2644
|
+
imported: added.length,
|
|
2645
|
+
percent: Math.round((i + 1) / total * 100),
|
|
2646
|
+
currentFile: url
|
|
2647
|
+
});
|
|
2582
2648
|
} catch (error) {
|
|
2583
2649
|
console.error(`Failed to import ${url}:`, error);
|
|
2584
2650
|
errors.push(url);
|
|
2651
|
+
sendEvent({
|
|
2652
|
+
type: "progress",
|
|
2653
|
+
current: i + 1,
|
|
2654
|
+
total,
|
|
2655
|
+
imported: added.length,
|
|
2656
|
+
percent: Math.round((i + 1) / total * 100),
|
|
2657
|
+
currentFile: url
|
|
2658
|
+
});
|
|
2585
2659
|
}
|
|
2586
2660
|
}
|
|
2587
2661
|
await saveMeta(meta);
|
|
@@ -2698,13 +2772,6 @@ async function handleGenerateFavicon(request) {
|
|
|
2698
2772
|
});
|
|
2699
2773
|
for (let i = 0; i < FAVICON_CONFIGS.length; i++) {
|
|
2700
2774
|
const config = FAVICON_CONFIGS[i];
|
|
2701
|
-
sendEvent({
|
|
2702
|
-
type: "progress",
|
|
2703
|
-
current: i + 1,
|
|
2704
|
-
total,
|
|
2705
|
-
percent: Math.round((i + 1) / total * 100),
|
|
2706
|
-
message: `Generating ${config.name} (${config.size}x${config.size})...`
|
|
2707
|
-
});
|
|
2708
2775
|
try {
|
|
2709
2776
|
const outputPath = path9.join(outputDir, config.name);
|
|
2710
2777
|
await sharp5(sourcePath).resize(config.size, config.size, {
|
|
@@ -2712,9 +2779,25 @@ async function handleGenerateFavicon(request) {
|
|
|
2712
2779
|
position: "center"
|
|
2713
2780
|
}).png({ quality: 100 }).toFile(outputPath);
|
|
2714
2781
|
generated.push(config.name);
|
|
2782
|
+
sendEvent({
|
|
2783
|
+
type: "progress",
|
|
2784
|
+
current: i + 1,
|
|
2785
|
+
total,
|
|
2786
|
+
processed: generated.length,
|
|
2787
|
+
percent: Math.round((i + 1) / total * 100),
|
|
2788
|
+
message: `Generated ${config.name}`
|
|
2789
|
+
});
|
|
2715
2790
|
} catch (error) {
|
|
2716
2791
|
console.error(`Failed to generate ${config.name}:`, error);
|
|
2717
2792
|
errors.push(config.name);
|
|
2793
|
+
sendEvent({
|
|
2794
|
+
type: "progress",
|
|
2795
|
+
current: i + 1,
|
|
2796
|
+
total,
|
|
2797
|
+
processed: generated.length,
|
|
2798
|
+
percent: Math.round((i + 1) / total * 100),
|
|
2799
|
+
message: `Failed: ${config.name}`
|
|
2800
|
+
});
|
|
2718
2801
|
}
|
|
2719
2802
|
}
|
|
2720
2803
|
let message = `Generated ${generated.length} favicon${generated.length !== 1 ? "s" : ""} to src/app/.`;
|