pr-prism 1.0.11 → 1.1.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.
package/README.md CHANGED
@@ -10,6 +10,8 @@
10
10
 
11
11
  > Stateful GitHub PR review scraper for AI agent workflows. Filter noise, cache seen comments, deliver signal.
12
12
 
13
+ Built with [grimoire-wizard](https://github.com/YosefHayim/grimoire) for interactive CLI prompts.
14
+
13
15
  </div>
14
16
 
15
17
  ---
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pr-prism",
3
- "version": "1.0.11",
3
+ "version": "1.1.0",
4
4
  "description": "Stateful GitHub PR review scraper for AI agents — filter noise, cache seen comments, deliver signal",
5
5
  "type": "module",
6
6
  "bin": {
@@ -8,12 +8,11 @@
8
8
  "pr-resolve": "scripts/resolve-pr-threads.ts"
9
9
  },
10
10
  "dependencies": {
11
- "prompts": "^2.4.2",
11
+ "grimoire-wizard": "^0.5.2",
12
12
  "tsx": "^4.7.0"
13
13
  },
14
14
  "devDependencies": {
15
15
  "@types/node": "^20.10.6",
16
- "@types/prompts": "^2.4.9",
17
16
  "typescript": "^5.3.3"
18
17
  },
19
18
  "engines": {
@@ -20,7 +20,7 @@ import { execSync } from "node:child_process";
20
20
  import { writeFileSync, readFileSync, existsSync, mkdirSync, unlinkSync } from "node:fs";
21
21
  import { join } from "node:path";
22
22
  import { tmpdir } from "node:os";
23
- import prompts from "prompts";
23
+ import { defineWizard, runWizard } from "grimoire-wizard";
24
24
 
25
25
  const KNOWN_BOTS = ["github-actions", "dependabot", "coderabbitai", "changeset-bot", "codeantai"];
26
26
  const OUT_DIR = "pr-reviews";
@@ -84,14 +84,29 @@ function listOpenPrs(owner: string, repo: string): PrListItem[] {
84
84
 
85
85
  async function selectPr(prs: PrListItem[]): Promise<number> {
86
86
  if (prs.length === 0) { console.log("No open PRs found."); process.exit(0); }
87
- const { value } = await prompts({
88
- type: "select",
89
- name: "value",
90
- message: "Select a PR:",
91
- choices: prs.map((p) => ({ title: `#${p.number} ${p.title} (${p.author.login})`, value: p.number })),
87
+
88
+ const config = defineWizard({
89
+ meta: { name: "pr-prism" },
90
+ steps: [
91
+ {
92
+ id: "pr",
93
+ type: "select" as const,
94
+ message: "Select a PR:",
95
+ options: prs.map((p) => ({
96
+ value: String(p.number),
97
+ label: `#${p.number} ${p.title} (${p.author.login})`,
98
+ })),
99
+ },
100
+ ],
101
+ });
102
+
103
+ const answers = await runWizard(config, {
104
+ onCancel: () => process.exit(0),
92
105
  });
93
- if (value === undefined) process.exit(0);
94
- return value as number;
106
+
107
+ const selected = answers?.pr;
108
+ if (!selected) process.exit(0);
109
+ return parseInt(selected as string, 10);
95
110
  }
96
111
 
97
112
  function fetchPr(owner: string, repo: string, prNumber: number): PrPayload {