@staff0rd/assist 0.154.0 → 0.154.2
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/dist/index.js +14 -8
- 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.
|
|
9
|
+
version: "0.154.2",
|
|
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
|
-
|
|
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) {
|
|
@@ -10616,12 +10622,12 @@ async function update() {
|
|
|
10616
10622
|
console.log("Building...");
|
|
10617
10623
|
execSync41("npm run build", { cwd: installDir, stdio: "inherit" });
|
|
10618
10624
|
console.log("Syncing commands...");
|
|
10619
|
-
execSync41("assist sync", { stdio: "inherit" });
|
|
10625
|
+
execSync41("assist sync --yes", { stdio: "inherit" });
|
|
10620
10626
|
} else if (isGlobalNpmInstall(installDir)) {
|
|
10621
10627
|
console.log("Detected global npm installation, updating...");
|
|
10622
10628
|
execSync41("npm i -g @staff0rd/assist@latest", { stdio: "inherit" });
|
|
10623
10629
|
console.log("Syncing commands...");
|
|
10624
|
-
execSync41("assist sync", { stdio: "inherit" });
|
|
10630
|
+
execSync41("assist sync --yes", { stdio: "inherit" });
|
|
10625
10631
|
} else {
|
|
10626
10632
|
console.error(
|
|
10627
10633
|
"Could not determine installation method. Expected a git repo or global npm install."
|