sillyspec 3.17.11 → 3.17.13
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/run.js +14 -2
package/package.json
CHANGED
package/src/run.js
CHANGED
|
@@ -1127,7 +1127,7 @@ export async function runCommand(args, cwd, specDir = null) {
|
|
|
1127
1127
|
|
|
1128
1128
|
// --reset
|
|
1129
1129
|
if (isReset) {
|
|
1130
|
-
return await resetStage(pm, progress, stageName, cwd, effectiveChange)
|
|
1130
|
+
return await resetStage(pm, progress, stageName, cwd, effectiveChange, platformOpts)
|
|
1131
1131
|
}
|
|
1132
1132
|
|
|
1133
1133
|
// 确保步骤已初始化
|
|
@@ -1859,6 +1859,18 @@ async function completeStep(pm, progress, stageName, cwd, outputText, inputText
|
|
|
1859
1859
|
if (steps[wsIdx].waitReason) console.log(` 原因:${steps[wsIdx].waitReason}`)
|
|
1860
1860
|
return { stageCompleted: false, currentIdx, nextPendingIdx: -1 }
|
|
1861
1861
|
}
|
|
1862
|
+
// quick 阶段完成前强制检查 quicklog 是否创建
|
|
1863
|
+
if (stageName === 'quick') {
|
|
1864
|
+
const quicklogDir = join(specBase, '.sillyspec', 'quicklog')
|
|
1865
|
+
const hasQuicklog = existsSync(quicklogDir) && readdirSync(quicklogDir).some(f => f.endsWith('.md') && f.startsWith('QUICKLOG'))
|
|
1866
|
+
if (!hasQuicklog) {
|
|
1867
|
+
console.error(`\n❌ quick 阶段完成校验失败:未检测到 QUICKLOG 记录文件。`)
|
|
1868
|
+
console.error(` step 2 要求创建 quicklog 记录,但文件不存在。`)
|
|
1869
|
+
console.error(` 请先创建 quicklog 记录再 --done,或使用 --skip-approval 跳过此校验。`)
|
|
1870
|
+
return { stageCompleted: false, currentIdx, nextPendingIdx: -1 }
|
|
1871
|
+
}
|
|
1872
|
+
}
|
|
1873
|
+
|
|
1862
1874
|
stageData.status = 'completed'
|
|
1863
1875
|
stageData.completedAt = new Date().toLocaleString('zh-CN',{hour12:false})
|
|
1864
1876
|
progress.lastActive = new Date().toLocaleString('zh-CN',{hour12:false})
|
|
@@ -2262,7 +2274,7 @@ function showStatus(progress, stageName) {
|
|
|
2262
2274
|
})
|
|
2263
2275
|
}
|
|
2264
2276
|
|
|
2265
|
-
async function resetStage(pm, progress, stageName, cwd, changeName) {
|
|
2277
|
+
async function resetStage(pm, progress, stageName, cwd, changeName, platformOpts = {}) {
|
|
2266
2278
|
const defSteps = await getStageSteps(stageName, cwd, progress)
|
|
2267
2279
|
progress.stages[stageName] = {
|
|
2268
2280
|
status: 'in-progress',
|