dsh-config-sync-plugin 0.4.7 → 0.4.9

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.
Files changed (5) hide show
  1. package/client.js +3798 -3790
  2. package/index.js +5053 -5041
  3. package/package.json +1 -1
  4. package/runtime/sync.ps1 +1117 -1029
  5. package/tools/selftest.mjs +22 -0
@@ -2019,5 +2019,27 @@ console.log('== 0.4.06:点 × 由后端窗口监视触发(不依赖前端信
2019
2019
  postSrc.includes('$waited -gt 300')
2020
2020
  && postSrc.includes('-and -not $hadVisible'), 'post-exit.ps1 让位收紧')
2021
2021
  }
2022
+
2023
+ console.log('')
2024
+ console.log('== 0.4.09:本地提交导致分叉,冲突检测展示处理方式 ==')
2025
+ {
2026
+ const syncSrc = readFileSync(join(pluginRootSelf, 'runtime', 'sync.ps1'), 'utf8')
2027
+ const idxSrc2 = readFileSync(join(pluginRootSelf, 'index.js'), 'utf8')
2028
+ const cliSrc = readFileSync(join(pluginRootSelf, 'client.js'), 'utf8')
2029
+ check('sync.ps1 新增 Get-DivergenceInfo 检测本地提交分叉',
2030
+ syncSrc.includes('function Get-DivergenceInfo') && syncSrc.includes('merge-base --is-ancestor HEAD '), 'sync.ps1 分叉检测')
2031
+ check('sync.ps1 pull 冲突检测阶段调用分叉判断并写入清单',
2032
+ /\$div = Get-DivergenceInfo \$remoteRef/.test(syncSrc) && syncSrc.includes('divergence = $div'), 'sync.ps1 分叉清单')
2033
+ check('sync.ps1 处理方式含保留(rebase)/丢弃(reset)与双机根因',
2034
+ syncSrc.includes('rebase origin/') && syncSrc.includes('reset --hard origin/') && syncSrc.includes('双机同时 push'), 'sync.ps1 处理方式')
2035
+ check('sync.ps1 diff 失败分类把 not possible to fast-forward 单独处理',
2036
+ /not possible to fast-forward\|Not possible to fast-forward\|Diverging branches/.test(syncSrc), 'sync.ps1 分叉分类')
2037
+ check('sync.ps1 备份 README 里展示分叉处理',
2038
+ syncSrc.includes('分支分叉 / Diverged branches') && syncSrc.includes('$Report.divergence'), 'sync.ps1 README 分叉')
2039
+ check('index.js 冲突接口透传 divergence 字段',
2040
+ idxSrc2.includes('divergence: obj.divergence') && idxSrc2.includes('localAhead: Number'), 'index.js divergence 透传')
2041
+ check('client.js 冲突卡展示分叉处理方式',
2042
+ cliSrc.includes('state.divergence ? h(') && cliSrc.includes('本地有提交导致分支分叉'), 'client.js 分叉展示')
2043
+ }
2022
2044
  process.exit(failures === 0 ? 0 : 1)
2023
2045