zen-gitsync 2.11.14 → 2.11.16
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/README.md +1 -1
- package/package.json +1 -1
- package/src/config.js +2 -2
- package/src/ui/public/assets/index-CznTchnm.js +109 -0
- package/src/ui/public/assets/{index-BIm6dSSS.css → index-DKRuCE6_.css} +1 -1
- package/src/ui/public/assets/vendor-B0E7kpbo.css +1 -0
- package/src/ui/public/assets/{vendor-CqblImIq.js → vendor-CNQxajSy.js} +234 -241
- package/src/ui/public/index.html +4 -4
- package/src/ui/server/routes/git/diff.js +14 -0
- package/src/ui/public/assets/index-DUYNPYDG.js +0 -109
- package/src/ui/public/assets/vendor-5oPHSuwX.css +0 -1
package/src/ui/public/index.html
CHANGED
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
11
11
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
|
12
12
|
<link href="https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet" />
|
|
13
|
-
<script type="module" crossorigin src="/assets/index-
|
|
14
|
-
<link rel="modulepreload" crossorigin href="/assets/vendor-
|
|
15
|
-
<link rel="stylesheet" crossorigin href="/assets/vendor-
|
|
16
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
13
|
+
<script type="module" crossorigin src="/assets/index-CznTchnm.js"></script>
|
|
14
|
+
<link rel="modulepreload" crossorigin href="/assets/vendor-CNQxajSy.js">
|
|
15
|
+
<link rel="stylesheet" crossorigin href="/assets/vendor-B0E7kpbo.css">
|
|
16
|
+
<link rel="stylesheet" crossorigin href="/assets/index-DKRuCE6_.css">
|
|
17
17
|
</head>
|
|
18
18
|
<body>
|
|
19
19
|
<div id="app"></div>
|
|
@@ -88,6 +88,20 @@ export function registerGitDiffRoutes({
|
|
|
88
88
|
}
|
|
89
89
|
});
|
|
90
90
|
|
|
91
|
+
// 获取全量 diff(git diff HEAD,含已暂存与未暂存的所有变更)
|
|
92
|
+
app.get('/api/diff-head', async (req, res) => {
|
|
93
|
+
try {
|
|
94
|
+
const { stdout } = await execGitCommand('git diff HEAD');
|
|
95
|
+
const MAX = 500 * 1024;
|
|
96
|
+
const content = stdout.length > MAX
|
|
97
|
+
? stdout.slice(0, MAX) + '\n\n[内容过大,已截断]'
|
|
98
|
+
: stdout;
|
|
99
|
+
res.json({ success: true, diff: content });
|
|
100
|
+
} catch (error) {
|
|
101
|
+
res.status(500).json({ success: false, error: error.message });
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
|
|
91
105
|
// 获取文件内容 (用于未跟踪文件)
|
|
92
106
|
app.get('/api/file-content', async (req, res) => {
|
|
93
107
|
try {
|