@staff0rd/assist 0.154.0 → 0.154.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 +12 -6
  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.154.0",
9
+ version: "0.154.1",
10
10
  type: "module",
11
11
  main: "dist/index.js",
12
12
  bin: {
@@ -425,14 +425,14 @@ function phaseDone(id, phase, summary) {
425
425
  })
426
426
  );
427
427
  const result = loadAndFindItem(id);
428
- if (result?.item.status === "done") {
429
- console.log(chalk5.dim(`Item #${id} already done, skipping phase advance.`));
430
- return;
431
- }
432
428
  if (result) {
433
429
  addPhaseSummary(result.item, summary, phaseIndex);
434
430
  saveBacklog(result.items);
435
431
  }
432
+ if (result?.item.status === "done") {
433
+ console.log(chalk5.dim(`Item #${id} already done, skipping phase advance.`));
434
+ return;
435
+ }
436
436
  setCurrentPhase(id, phaseIndex + 1);
437
437
  console.log(chalk5.green(`Phase ${phase} of item #${id} marked as complete.`));
438
438
  }
@@ -555,7 +555,7 @@ async function run(id, spawnOptions) {
555
555
  logProgress(id, item.name, startPhase, plan2.length);
556
556
  if (!await runPhases(item, startPhase, plan2, spawnOptions)) return;
557
557
  if (!await runReview(item, plan2, spawnOptions)) return;
558
- setStatus(id, "done");
558
+ ensureDone(id);
559
559
  console.log(chalk9.green(`
560
560
  All phases complete for #${id}: ${item.name}`));
561
561
  }
@@ -569,6 +569,12 @@ function logProgress(id, name, startPhase, total) {
569
569
  `));
570
570
  }
571
571
  }
572
+ function ensureDone(id) {
573
+ try {
574
+ setStatus(id, "done");
575
+ } catch {
576
+ }
577
+ }
572
578
  async function runPhases(item, startPhase, plan2, spawnOptions) {
573
579
  let phaseIndex = startPhase;
574
580
  while (phaseIndex < plan2.length) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@staff0rd/assist",
3
- "version": "0.154.0",
3
+ "version": "0.154.1",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "bin": {