chore(publish): locale 决胜键;confirm 清单输出;并发窗口注释
- 候选查询 orderBy 第三键 entry_locales.locale(同 typeKey+slug 多 locale 决胜, 清单呈现稳定);mini 单 locale,既有测试期望三元组已含 locale 列、无需改 - CLI confirm 输出发布清单(result.candidates,与 dry-run 同行格式 published→current;>20 行截断为 …and M more——CONFIRM_LIST_CAP) - PublishSiteContentResult.candidates 注释钉死:confirm 期 candidates 是事务前 快照,权威数以 publishedCount 为准(并发窗口) Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
@@ -34,6 +34,9 @@ import {
|
||||
|
||||
const REPO_ROOT = resolve(dirname(fileURLToPath(import.meta.url)), '..')
|
||||
|
||||
/** confirm 输出的发布清单行数上限(超出以 "…and M more" 截断——192 条真实数据面可读性) */
|
||||
const CONFIRM_LIST_CAP = 20
|
||||
|
||||
/** 探测报告摘要(stdout):版本块之外的计数/清洗/耗时 + 致命错误 */
|
||||
function printProbeSummary(report: WxrAdapterReport): void {
|
||||
console.log(` rows=${report.totals.rows} terms=${report.totals.terms} unsupported=${report.totals.unsupported} failed=${report.totals.failed}`)
|
||||
@@ -271,6 +274,16 @@ program
|
||||
if (result.publishedCount === 0) {
|
||||
console.log(' 无待发布条目(no-op)')
|
||||
} else {
|
||||
// 发布清单(事务前快照面;与 dry-run 同行格式——修订对 published→current)
|
||||
const listed = result.candidates.slice(0, CONFIRM_LIST_CAP)
|
||||
for (const c of listed) {
|
||||
console.log(
|
||||
` ${c.typeKey}/${c.slug} [${c.locale}] ${c.publishedRevisionId === null ? 'NULL' : `${c.publishedRevisionId.slice(0, 8)}…`} → ${c.currentRevisionId.slice(0, 8)}…`,
|
||||
)
|
||||
}
|
||||
if (result.candidates.length > listed.length) {
|
||||
console.log(` …and ${result.candidates.length - listed.length} more`)
|
||||
}
|
||||
console.log(` audit: action=content.publish actor=${opts.actor}`)
|
||||
if (result.siteConfigRevision !== null) {
|
||||
console.log(
|
||||
|
||||
Reference in New Issue
Block a user