@staff0rd/assist 0.172.0 → 0.172.1

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 (2) hide show
  1. package/dist/index.js +9 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -6,7 +6,7 @@ import { Command } from "commander";
6
6
  // package.json
7
7
  var package_default = {
8
8
  name: "@staff0rd/assist",
9
- version: "0.172.0",
9
+ version: "0.172.1",
10
10
  type: "module",
11
11
  main: "dist/index.js",
12
12
  bin: {
@@ -793,8 +793,14 @@ function cleanupSignal() {
793
793
  unlinkSync2(statusPath);
794
794
  }
795
795
  }
796
- async function resolvePhaseResult(phaseIndex) {
796
+ function isTerminalStatus(itemId) {
797
+ const items = loadBacklog();
798
+ const item = items.find((i) => i.id === itemId);
799
+ return item?.status === "done" || item?.status === "wontdo";
800
+ }
801
+ async function resolvePhaseResult(phaseIndex, itemId) {
797
802
  if (!existsSync3(getSignalPath())) {
803
+ if (isTerminalStatus(itemId)) return -1;
798
804
  const action = await handleIncompletePhase();
799
805
  if (action === "abort") return -1;
800
806
  return action === "skip" ? 1 : 0;
@@ -872,7 +878,7 @@ async function executePhase(item, phaseIndex, phases, spawnOptions) {
872
878
  watchForMarker(child);
873
879
  await done2;
874
880
  stopWatching();
875
- const delta = await resolvePhaseResult(phaseIndex);
881
+ const delta = await resolvePhaseResult(phaseIndex, item.id);
876
882
  return delta < 0 ? -1 : phaseIndex + delta;
877
883
  }
878
884
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@staff0rd/assist",
3
- "version": "0.172.0",
3
+ "version": "0.172.1",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "bin": {