speccrew 0.7.40 → 0.7.41
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.
|
@@ -160,7 +160,7 @@ ${api_list.error_codes}</field>
|
|
|
160
160
|
<block type="gateway" id="G4" mode="exclusive" desc="Update progress based on mode">
|
|
161
161
|
<branch test="${feature_id} != null" name="Feature mode">
|
|
162
162
|
<block type="task" id="B10" action="run-script" desc="Update workflow progress for feature">
|
|
163
|
-
<field name="command">node "${workspace_path}/scripts/update-progress.js" update-task --file "${iteration_path}/WORKFLOW-PROGRESS.json" --task-id "${feature_id}" --status confirmed --outputs '["02.feature-design/${feature_id}-${feature_name}-feature-spec.md","03.api-contract/${feature_id}-${feature_name}-api-contract.md"]'</field>
|
|
163
|
+
<field name="command">node "${workspace_path}/scripts/update-progress.js" update-task --file "${iteration_path}/WORKFLOW-PROGRESS.json" --stage 03_api_contract --task-id "${feature_id}" --status confirmed --outputs '["02.feature-design/${feature_id}-${feature_name}-feature-spec.md","03.api-contract/${feature_id}-${feature_name}-api-contract.md"]'</field>
|
|
164
164
|
</block>
|
|
165
165
|
</branch>
|
|
166
166
|
<branch default="true" name="Module mode">
|
package/package.json
CHANGED
|
@@ -652,13 +652,16 @@ function cmdUpdateTask(args) {
|
|
|
652
652
|
outputError(`Stage not found: ${args.stage}`);
|
|
653
653
|
}
|
|
654
654
|
targetStage = data.stages[args.stage];
|
|
655
|
-
if (!targetStage.features
|
|
656
|
-
|
|
655
|
+
if (!targetStage.features) {
|
|
656
|
+
targetStage.features = [];
|
|
657
657
|
}
|
|
658
658
|
taskArray = targetStage.features;
|
|
659
659
|
taskIndex = taskArray.findIndex(t => t.id === args.taskId);
|
|
660
660
|
if (taskIndex === -1) {
|
|
661
|
-
|
|
661
|
+
// UPSERT: Task not found, create new entry
|
|
662
|
+
console.error(`Info: Task ${args.taskId} not found in stage ${args.stage}, creating new entry`);
|
|
663
|
+
taskArray.push({ id: args.taskId, status: 'pending' });
|
|
664
|
+
taskIndex = taskArray.length - 1;
|
|
662
665
|
}
|
|
663
666
|
} else {
|
|
664
667
|
// Flat structure: data.tasks
|