@staff0rd/assist 0.145.1 → 0.147.0

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 +43 -32
  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.145.1",
9
+ version: "0.147.0",
10
10
  type: "module",
11
11
  main: "dist/index.js",
12
12
  bin: {
@@ -2608,7 +2608,7 @@ async function list2(options2) {
2608
2608
 
2609
2609
  // src/commands/backlog/next.ts
2610
2610
  import chalk36 from "chalk";
2611
- import enquirer6 from "enquirer";
2611
+ import enquirer7 from "enquirer";
2612
2612
 
2613
2613
  // src/commands/backlog/run.ts
2614
2614
  import chalk35 from "chalk";
@@ -2717,7 +2717,21 @@ import chalk34 from "chalk";
2717
2717
  import { spawnSync as spawnSync2 } from "child_process";
2718
2718
  import { existsSync as existsSync16, unlinkSync as unlinkSync3 } from "fs";
2719
2719
  import chalk33 from "chalk";
2720
+ import enquirer6 from "enquirer";
2721
+
2722
+ // src/commands/backlog/handleIncompletePhase.ts
2720
2723
  import enquirer5 from "enquirer";
2724
+ async function handleIncompletePhase() {
2725
+ const { action } = await enquirer5.prompt({
2726
+ type: "select",
2727
+ name: "action",
2728
+ message: "Phase was not marked complete. What would you like to do?",
2729
+ choices: ["Retry this phase", "Skip to next phase", "Abort"]
2730
+ });
2731
+ if (action === "Retry this phase") return "retry";
2732
+ if (action === "Skip to next phase") return "skip";
2733
+ return "abort";
2734
+ }
2721
2735
 
2722
2736
  // src/commands/backlog/phaseDone.ts
2723
2737
  import { writeFileSync as writeFileSync13 } from "fs";
@@ -2780,7 +2794,7 @@ Phase ${phaseIndex + 1} completed. Running verify...`)
2780
2794
  return true;
2781
2795
  }
2782
2796
  while (true) {
2783
- const { action } = await enquirer5.prompt({
2797
+ const { action } = await enquirer6.prompt({
2784
2798
  type: "select",
2785
2799
  name: "action",
2786
2800
  message: "Verification failed. What would you like to do?",
@@ -2800,25 +2814,18 @@ Phase ${phaseIndex + 1} completed. Running verify...`)
2800
2814
  return action === "Continue to next phase";
2801
2815
  }
2802
2816
  }
2803
- async function handleIncompletePhase() {
2804
- const { action } = await enquirer5.prompt({
2805
- type: "select",
2806
- name: "action",
2807
- message: "Phase was not marked complete. What would you like to do?",
2808
- choices: ["Retry this phase", "Skip to next phase", "Abort"]
2809
- });
2810
- if (action === "Retry this phase") return "retry";
2811
- if (action === "Skip to next phase") return "skip";
2812
- return "abort";
2813
- }
2814
- async function resolvePhaseResult(phaseIndex) {
2815
- if (existsSync16(getPhaseStatusPath())) {
2816
- const shouldContinue = await handleCompletedPhase(phaseIndex);
2817
- return shouldContinue ? 1 : -1;
2817
+ async function resolvePhaseResult(phaseIndex, options2) {
2818
+ if (!existsSync16(getPhaseStatusPath())) {
2819
+ const action = await handleIncompletePhase();
2820
+ if (action === "abort") return -1;
2821
+ return action === "skip" ? 1 : 0;
2818
2822
  }
2819
- const action = await handleIncompletePhase();
2820
- if (action === "abort") return -1;
2821
- return action === "skip" ? 1 : 0;
2823
+ if (options2?.skipVerify) {
2824
+ cleanupMarker();
2825
+ return 1;
2826
+ }
2827
+ const shouldContinue = await handleCompletedPhase(phaseIndex);
2828
+ return shouldContinue ? 1 : -1;
2822
2829
  }
2823
2830
 
2824
2831
  // src/commands/backlog/watchForMarker.ts
@@ -2837,7 +2844,7 @@ function stopWatching() {
2837
2844
  }
2838
2845
 
2839
2846
  // src/commands/backlog/executePhase.ts
2840
- async function executePhase(item, phaseIndex, phases) {
2847
+ async function executePhase(item, phaseIndex, phases, options2) {
2841
2848
  const phase = phases[phaseIndex];
2842
2849
  console.log(
2843
2850
  chalk34.bold(
@@ -2852,7 +2859,9 @@ async function executePhase(item, phaseIndex, phases) {
2852
2859
  watchForMarker(child);
2853
2860
  await done2;
2854
2861
  stopWatching();
2855
- const delta = await resolvePhaseResult(phaseIndex);
2862
+ const delta = await resolvePhaseResult(phaseIndex, {
2863
+ skipVerify: options2?.skipVerify
2864
+ });
2856
2865
  return delta < 0 ? -1 : phaseIndex + delta;
2857
2866
  }
2858
2867
 
@@ -2902,7 +2911,9 @@ async function run2(id) {
2902
2911
  const reviewPhase = buildReviewPhase();
2903
2912
  const allPhases = [...plan2, reviewPhase];
2904
2913
  const reviewIndex = plan2.length;
2905
- const reviewResult = await executePhase(item, reviewIndex, allPhases);
2914
+ const reviewResult = await executePhase(item, reviewIndex, allPhases, {
2915
+ skipVerify: true
2916
+ });
2906
2917
  if (reviewResult < 0) return;
2907
2918
  if (item.status !== "done") setStatus(id, "done");
2908
2919
  console.log(chalk35.green(`
@@ -2932,7 +2943,7 @@ async function next() {
2932
2943
  name: `${typeLabel(i.type)} #${i.id}: ${i.name}`,
2933
2944
  value: String(i.id)
2934
2945
  }));
2935
- const { selected } = await enquirer6.prompt({
2946
+ const { selected } = await enquirer7.prompt({
2936
2947
  type: "select",
2937
2948
  name: "selected",
2938
2949
  message: "Choose a backlog item to start:",
@@ -3184,7 +3195,7 @@ function registerItemCommands(cmd) {
3184
3195
  function registerStatusCommands(cmd) {
3185
3196
  cmd.command("start <id>").description("Set a backlog item to in-progress").action(start);
3186
3197
  cmd.command("done <id>").description("Set a backlog item to done").action(done);
3187
- cmd.command("delete <id>").description("Delete a backlog item").action(del);
3198
+ cmd.command("delete <id>").alias("remove").description("Delete a backlog item").action(del);
3188
3199
  cmd.command("web").description("Start a web view of the backlog").option("-p, --port <number>", "Port to listen on", "3000").action(web);
3189
3200
  }
3190
3201
  function registerOrchestrationCommands(cmd) {
@@ -5744,10 +5755,10 @@ function registerJira(program2) {
5744
5755
 
5745
5756
  // src/commands/news/add/index.ts
5746
5757
  import chalk68 from "chalk";
5747
- import enquirer7 from "enquirer";
5758
+ import enquirer8 from "enquirer";
5748
5759
  async function add2(url) {
5749
5760
  if (!url) {
5750
- const response = await enquirer7.prompt({
5761
+ const response = await enquirer8.prompt({
5751
5762
  type: "input",
5752
5763
  name: "url",
5753
5764
  message: "RSS feed URL:",
@@ -6383,7 +6394,7 @@ async function listComments() {
6383
6394
  import { execSync as execSync30 } from "child_process";
6384
6395
 
6385
6396
  // src/commands/prs/prs/displayPaginated/index.ts
6386
- import enquirer8 from "enquirer";
6397
+ import enquirer9 from "enquirer";
6387
6398
 
6388
6399
  // src/commands/prs/prs/displayPaginated/printPr.ts
6389
6400
  import chalk71 from "chalk";
@@ -6453,7 +6464,7 @@ function parseAction(action) {
6453
6464
  }
6454
6465
  async function promptNavigation(currentPage, totalPages) {
6455
6466
  const choices = buildNavChoices(currentPage, totalPages);
6456
- const { action } = await enquirer8.prompt({
6467
+ const { action } = await enquirer9.prompt({
6457
6468
  type: "select",
6458
6469
  name: "action",
6459
6470
  message: "Navigate",
@@ -9711,7 +9722,7 @@ async function exchangeToken(params) {
9711
9722
  }
9712
9723
 
9713
9724
  // src/commands/roam/promptCredentials.ts
9714
- import enquirer9 from "enquirer";
9725
+ import enquirer10 from "enquirer";
9715
9726
  function censor(value) {
9716
9727
  const visible = value.slice(-4);
9717
9728
  return `${"*".repeat(value.length - 4)}${visible}`;
@@ -9720,7 +9731,7 @@ function label(name, existing) {
9720
9731
  return existing ? `${name} (${censor(existing)})` : name;
9721
9732
  }
9722
9733
  async function promptField(name, existing) {
9723
- const { value } = await enquirer9.prompt({
9734
+ const { value } = await enquirer10.prompt({
9724
9735
  type: "input",
9725
9736
  name: "value",
9726
9737
  message: `${label(name, existing)}:`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@staff0rd/assist",
3
- "version": "0.145.1",
3
+ "version": "0.147.0",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "bin": {