zen-gitsync 2.14.3 → 2.15.2
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/AppVersionBadge-9TpgyH6h.js +2 -0
- package/src/ui/public/assets/BranchSelector-C0xJ5O5y.js +1 -0
- package/src/ui/public/assets/CommitForm-DRCkTbcQ.js +6 -0
- package/src/ui/public/assets/ConsoleView-8BaM8HZy.css +1 -0
- package/src/ui/public/assets/ConsoleView-Bi1yhOrF.js +17 -0
- package/src/ui/public/assets/CustomCommandManager-CCPQ4oG8.js +1 -0
- package/src/ui/public/assets/EditorView-DNDHHVxO.js +0 -0
- package/src/ui/public/assets/{FlowExecutionViewer-BvXlaQai.js → FlowExecutionViewer-Bd5rDsy-.js} +1 -1
- package/src/ui/public/assets/FlowOrchestrationWorkspace-BnxWvF7c.js +21 -0
- package/src/ui/public/assets/{LogList-uF4tir23.js → LogList-D6GVPxGk.js} +5 -5
- package/src/ui/public/assets/MindmapView-BzVqyW95.js +1 -0
- package/src/ui/public/assets/MonitorView-BynVSuRY.js +1 -0
- package/src/ui/public/assets/ProjectStartupButton-CMonyvWZ.js +1 -0
- package/src/ui/public/assets/RemoteRepoCard-BJQgSYGu.js +1 -0
- package/src/ui/public/assets/SourceMapView-CNw8GHm_.js +3 -0
- package/src/ui/public/assets/SourceMapView-DG_a_076.css +1 -0
- package/src/ui/public/assets/SvgIcon-CVSYDtNO.js +1 -0
- package/src/ui/public/assets/TemplateManager-C0rm8xfC.css +1 -0
- package/src/ui/public/assets/TemplateManager-D8f0RivS.js +1 -0
- package/src/ui/public/assets/UserInputNode-BpIFJ8Kq.js +1 -0
- package/src/ui/public/assets/WorkbenchView-7uXNRGkb.js +12 -0
- package/src/ui/public/assets/{_plugin-vue_export-helper-CJMndG_W.js → _plugin-vue_export-helper-DCUswitV.js} +4 -4
- package/src/ui/public/assets/commandParser-wwLxoJ92.js +1 -0
- package/src/ui/public/assets/{configStore-DDnE5eie.js → configStore-BEUBCuQ4.js} +1 -1
- package/src/ui/public/assets/{element-plus-B6Owr5jY.js → element-plus-DB-NeCl9.js} +1 -1
- package/src/ui/public/assets/element-plus-R1nMzM9j.css +1 -0
- package/src/ui/public/assets/{flow-mindmap-CAkGY2ir.js → flow-mindmap-DYBM6P0r.js} +4 -4
- package/src/ui/public/assets/index-BUUVsQTV.js +23 -0
- package/src/ui/public/assets/index-BiyC8HRp.css +1 -0
- package/src/ui/public/assets/{vendor-BuiZXcjj.js → vendor-DTvkqYXo.js} +5 -5
- package/src/ui/public/assets/vue-flow-D5lw7RxP.js +39 -0
- package/src/ui/public/index.html +9 -11
- package/src/ui/server/routes/branchStatus.test.js +37 -0
- package/src/ui/server/routes/npm.js +1387 -1327
- package/src/utils/index.js +10 -3
- package/src/ui/public/assets/AppVersionBadge-z2kqhmtD.js +0 -2
- package/src/ui/public/assets/BranchSelector-CSjsCeeJ.js +0 -1
- package/src/ui/public/assets/CommandConsole-96MUoG1F.js +0 -17
- package/src/ui/public/assets/CommandConsole-Da3j09oc.css +0 -1
- package/src/ui/public/assets/CommitForm-BBKQ0GqO.js +0 -6
- package/src/ui/public/assets/CommonDialog-CgQovpCJ.js +0 -1
- package/src/ui/public/assets/CommonDialog-Cyh3xu0p.css +0 -1
- package/src/ui/public/assets/EditorView-aoA30emq.js +0 -0
- package/src/ui/public/assets/FlowOrchestrationWorkspace-CgWUF1Jc.js +0 -21
- package/src/ui/public/assets/MindmapView-B8wr0EFL.js +0 -1
- package/src/ui/public/assets/MonitorView-DaJ0h8Im.js +0 -1
- package/src/ui/public/assets/ProjectStartupButton-CcH1NL2W.js +0 -1
- package/src/ui/public/assets/RemoteRepoCard-BDbJ76uf.js +0 -1
- package/src/ui/public/assets/SourceMapView-2HjAlHnp.js +0 -3
- package/src/ui/public/assets/SourceMapView-DjYKJZLj.css +0 -1
- package/src/ui/public/assets/SvgIcon-CK6VGHb5.js +0 -1
- package/src/ui/public/assets/UserInputNode-Cx8r5geA.js +0 -1
- package/src/ui/public/assets/WorkbenchView-CG54iND-.js +0 -12
- package/src/ui/public/assets/element-plus-D06ZgZjR.css +0 -1
- package/src/ui/public/assets/index-B7FGNx_l.js +0 -23
- package/src/ui/public/assets/index-f6UhuE5j.css +0 -1
- package/src/ui/public/assets/vue-flow-C6RXt-U3.js +0 -39
|
@@ -216,6 +216,43 @@ test('branchStatus: 无 upstream 时 → hasUpstream:false', async () => {
|
|
|
216
216
|
assert.equal(cacheSet.currentBranch, null)
|
|
217
217
|
})
|
|
218
218
|
|
|
219
|
+
// 回归:真实 git 在新建分支(无 upstream)上跑 rev-parse @{u} 会抛
|
|
220
|
+
// "fatal: no upstream configured"。execGitCommand 的 ignoreError 选项应把
|
|
221
|
+
// 这个错误吞成 resolve({stdout:''}) 而非 reject,否则 /api/branch-status
|
|
222
|
+
// 直接 500(曾发生在线上:切到无 upstream 的 test 分支后接口红)。
|
|
223
|
+
// 旧测试用 mock 返回空 stdout 屏蔽了这条抛错路径,这里用真抛 mock 复现。
|
|
224
|
+
test('branchStatus: rev-parse @{u} 抛错(no upstream) → ignoreError 吞下,返回 hasUpstream:false(非 500)', async () => {
|
|
225
|
+
const app = makeApp()
|
|
226
|
+
let cacheSet = null
|
|
227
|
+
registerBranchStatusRoutes({
|
|
228
|
+
app,
|
|
229
|
+
execGitCommand: async (args, opts) => {
|
|
230
|
+
if (args[0] === 'symbolic-ref') return { stdout: 'test\n' }
|
|
231
|
+
if (args[0] === 'rev-parse' && args.includes('@{u}')) {
|
|
232
|
+
// 复刻真实 git 行为:无 upstream 时非零退出 + stderr
|
|
233
|
+
const err = new Error("Command failed: git rev-parse --abbrev-ref --symbolic-full-name @{u}\nfatal: no upstream configured for branch 'test'\n")
|
|
234
|
+
err.code = 128
|
|
235
|
+
err.stderr = "fatal: no upstream configured for branch 'test'\n"
|
|
236
|
+
err.stdout = ''
|
|
237
|
+
// execGitCommand 真实实现:ignoreError=true → resolve({stdout:''})
|
|
238
|
+
if (opts && opts.ignoreError) return { stdout: '' }
|
|
239
|
+
throw err
|
|
240
|
+
}
|
|
241
|
+
return { stdout: '' }
|
|
242
|
+
},
|
|
243
|
+
getIsGitRepo: () => true,
|
|
244
|
+
getBranchStatusCache: () => ({ currentBranch: null, upstreamBranch: null, lastUpdate: 0, cacheTimeout: 5000 }),
|
|
245
|
+
setBranchStatusCache: (v) => { cacheSet = v },
|
|
246
|
+
getRecentPushStatus: () => ({ justPushed: false, pushTime: 0, validDuration: 10000 }),
|
|
247
|
+
setRecentPushStatus: () => {}
|
|
248
|
+
})
|
|
249
|
+
const res = makeRes()
|
|
250
|
+
await app.invoke('GET', '/api/branch-status', { query: {} }, res)
|
|
251
|
+
assert.equal(res.statusCode, 200, '应 200,不应 500')
|
|
252
|
+
assert.deepEqual(res.payload, { hasUpstream: false, ahead: 0, behind: 0 })
|
|
253
|
+
assert.ok(cacheSet, '无 upstream 时应清空缓存')
|
|
254
|
+
})
|
|
255
|
+
|
|
219
256
|
// ========== /api/branch ==========
|
|
220
257
|
|
|
221
258
|
test('branchStatus: /api/branch 返回 trim 后的分支名', async () => {
|