zen-gitsync 2.8.3 → 2.8.5
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/package.json +1 -1
- package/src/ui/public/assets/index-Bwje85Kx.js +78 -0
- package/src/ui/public/assets/index-CFnuGkZZ.css +1 -0
- package/src/ui/public/assets/vendor-B1z91bUn.css +1 -0
- package/src/ui/public/assets/vendor-CysQL2Yr.js +102 -0
- package/src/ui/public/index.html +4 -4
- package/src/ui/server/index.js +47 -2
- package/src/ui/public/assets/index-C9p4J1dI.css +0 -1
- package/src/ui/public/assets/index-mVMo_U3z.js +0 -78
- package/src/ui/public/assets/vendor-BWT9SBHo.css +0 -1
- package/src/ui/public/assets/vendor-BZoR2k4d.js +0 -77
package/src/ui/public/index.html
CHANGED
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
|
7
7
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
8
8
|
<title>Zen GitSync</title>
|
|
9
|
-
<script type="module" crossorigin src="/assets/index-
|
|
10
|
-
<link rel="modulepreload" crossorigin href="/assets/vendor-
|
|
11
|
-
<link rel="stylesheet" crossorigin href="/assets/vendor-
|
|
12
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
9
|
+
<script type="module" crossorigin src="/assets/index-Bwje85Kx.js"></script>
|
|
10
|
+
<link rel="modulepreload" crossorigin href="/assets/vendor-CysQL2Yr.js">
|
|
11
|
+
<link rel="stylesheet" crossorigin href="/assets/vendor-B1z91bUn.css">
|
|
12
|
+
<link rel="stylesheet" crossorigin href="/assets/index-CFnuGkZZ.css">
|
|
13
13
|
</head>
|
|
14
14
|
<body>
|
|
15
15
|
<div id="app"></div>
|
package/src/ui/server/index.js
CHANGED
|
@@ -1869,7 +1869,8 @@ async function startUIServer(noOpen = false, savePort = false) {
|
|
|
1869
1869
|
id,
|
|
1870
1870
|
name: orchestration.name,
|
|
1871
1871
|
description: orchestration.description || '',
|
|
1872
|
-
steps: orchestration.steps
|
|
1872
|
+
steps: orchestration.steps,
|
|
1873
|
+
flowData: orchestration.flowData || null
|
|
1873
1874
|
}
|
|
1874
1875
|
|
|
1875
1876
|
config.orchestrations.push(newOrchestration)
|
|
@@ -1924,7 +1925,8 @@ async function startUIServer(noOpen = false, savePort = false) {
|
|
|
1924
1925
|
id,
|
|
1925
1926
|
name: orchestration.name,
|
|
1926
1927
|
description: orchestration.description || '',
|
|
1927
|
-
steps: orchestration.steps
|
|
1928
|
+
steps: orchestration.steps,
|
|
1929
|
+
flowData: orchestration.flowData || null
|
|
1928
1930
|
}
|
|
1929
1931
|
await configManager.saveConfig(config)
|
|
1930
1932
|
} else {
|
|
@@ -3567,6 +3569,49 @@ async function startUIServer(noOpen = false, savePort = false) {
|
|
|
3567
3569
|
}
|
|
3568
3570
|
});
|
|
3569
3571
|
|
|
3572
|
+
// 保存部分文件的stash
|
|
3573
|
+
app.post('/api/stash-save-partial', async (req, res) => {
|
|
3574
|
+
try {
|
|
3575
|
+
const { files, message, includeUntracked } = req.body;
|
|
3576
|
+
|
|
3577
|
+
if (!files || !Array.isArray(files) || files.length === 0) {
|
|
3578
|
+
return res.json({ success: false, message: '请选择要储藏的文件' });
|
|
3579
|
+
}
|
|
3580
|
+
|
|
3581
|
+
// 构建 git stash push 命令
|
|
3582
|
+
let command = 'git stash push';
|
|
3583
|
+
if (message) {
|
|
3584
|
+
command += ` -m "${message}"`;
|
|
3585
|
+
}
|
|
3586
|
+
if (includeUntracked) {
|
|
3587
|
+
command += ' --include-untracked';
|
|
3588
|
+
}
|
|
3589
|
+
|
|
3590
|
+
// 添加文件列表
|
|
3591
|
+
const args = files.map(f => `"${f}"`).join(' ');
|
|
3592
|
+
command += ` -- ${args}`;
|
|
3593
|
+
|
|
3594
|
+
const { stdout } = await execGitCommand(command);
|
|
3595
|
+
|
|
3596
|
+
if (stdout.includes('No local changes to save')) {
|
|
3597
|
+
return res.json({ success: false, message: '没有本地更改需要保存' });
|
|
3598
|
+
}
|
|
3599
|
+
|
|
3600
|
+
res.json({
|
|
3601
|
+
success: true,
|
|
3602
|
+
message: `成功储藏 ${files.length} 个文件`,
|
|
3603
|
+
output: stdout
|
|
3604
|
+
});
|
|
3605
|
+
} catch (error) {
|
|
3606
|
+
const msg = error?.message || '';
|
|
3607
|
+
if (msg.includes('No valid patches in input')) {
|
|
3608
|
+
return res.json({ success: false, message: '没有可储藏的更改' });
|
|
3609
|
+
}
|
|
3610
|
+
console.error('保存部分stash失败:', error);
|
|
3611
|
+
res.status(500).json({ success: false, error: error.message });
|
|
3612
|
+
}
|
|
3613
|
+
});
|
|
3614
|
+
|
|
3570
3615
|
// 应用特定的stash
|
|
3571
3616
|
app.post('/api/stash-apply', async (req, res) => {
|
|
3572
3617
|
try {
|