@staff0rd/assist 0.97.0 → 0.98.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.
@@ -36,19 +36,21 @@
36
36
  "Bash(assist complexity:*)",
37
37
  "Bash(assist transcript format:*)",
38
38
  "Bash(assist voice:*)",
39
+ "Bash(head:*)",
40
+ "Bash(tail:*)",
41
+ "Bash(grep:*)",
42
+ "Bash(cat:*)",
43
+ "Bash(wc:*)",
44
+ "Bash(sort:*)",
45
+ "Bash(uniq:*)",
46
+ "Bash(cut:*)",
47
+ "Bash(tr:*)",
48
+ "Bash(tee:*)",
49
+ "Bash(find:*)",
50
+ "Bash(ls:*)",
51
+ "Bash(echo:*)",
52
+ "Bash(printf:*)",
39
53
  "Bash(date:*)",
40
- "Bash(git add:*)",
41
- "Bash(git status:*)",
42
- "Bash(git show:*)",
43
- "Bash(git diff:*)",
44
- "Bash(git grep:*)",
45
- "Bash(git log:*)",
46
- "Bash(gh repo view:*)",
47
- "Bash(gh pr checks:*)",
48
- "Bash(gh pr view:*)",
49
- "Bash(gh pr list:*)",
50
- "Bash(gh pr diff:*)",
51
- "Bash(gh run view:*)",
52
54
  "SlashCommand(/next-backlog-item)",
53
55
  "SlashCommand(/verify)",
54
56
  "SlashCommand(/commit)",
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.97.0",
9
+ version: "0.98.0",
10
10
  type: "module",
11
11
  main: "dist/index.js",
12
12
  bin: {
@@ -2601,7 +2601,6 @@ function extractGraphqlQuery(args) {
2601
2601
  }
2602
2602
 
2603
2603
  // src/shared/loadCliReads.ts
2604
- import { execFileSync } from "child_process";
2605
2604
  import { existsSync as existsSync16, readFileSync as readFileSync13, writeFileSync as writeFileSync12 } from "fs";
2606
2605
  import { dirname as dirname12, resolve as resolve2 } from "path";
2607
2606
  import { fileURLToPath as fileURLToPath4 } from "url";
@@ -2610,30 +2609,32 @@ var __dirname5 = dirname12(__filename2);
2610
2609
  function getCliReadsPath() {
2611
2610
  return resolve2(__dirname5, "..", "assist.cli-reads");
2612
2611
  }
2613
- function loadCliReads() {
2612
+ var cachedLines;
2613
+ function getCliReadsLines() {
2614
+ if (cachedLines) return cachedLines;
2614
2615
  const path31 = getCliReadsPath();
2615
- if (!existsSync16(path31)) return [];
2616
- return readFileSync13(path31, "utf-8").split("\n").filter((line) => line.trim() !== "");
2616
+ if (!existsSync16(path31)) {
2617
+ cachedLines = [];
2618
+ return cachedLines;
2619
+ }
2620
+ cachedLines = readFileSync13(path31, "utf-8").split("\n").filter((line) => line.trim() !== "");
2621
+ return cachedLines;
2622
+ }
2623
+ function loadCliReads() {
2624
+ return getCliReadsLines();
2617
2625
  }
2618
2626
  function saveCliReads(commands) {
2619
2627
  writeFileSync12(getCliReadsPath(), `${commands.join("\n")}
2620
2628
  `);
2629
+ cachedLines = void 0;
2621
2630
  }
2622
2631
  function findCliRead(command) {
2623
- const filePath = getCliReadsPath();
2624
- if (!existsSync16(filePath)) return void 0;
2625
2632
  const words = command.split(/\s+/);
2626
2633
  if (words.length < 2) return void 0;
2627
2634
  const prefix2 = `${words[0]} ${words[1]}`;
2628
- let candidates;
2629
- try {
2630
- const output = execFileSync("grep", ["-E", `^${prefix2}( |$)`, filePath], {
2631
- encoding: "utf-8"
2632
- });
2633
- candidates = output.split("\n").filter((l) => l !== "");
2634
- } catch {
2635
- return void 0;
2636
- }
2635
+ const candidates = getCliReadsLines().filter(
2636
+ (line) => line === prefix2 || line.startsWith(`${prefix2} `)
2637
+ );
2637
2638
  return candidates.sort((a, b) => b.length - a.length).find((rc) => command === rc || command.startsWith(`${rc} `));
2638
2639
  }
2639
2640
 
@@ -6809,6 +6810,8 @@ async function update() {
6809
6810
  if (isGitRepo(installDir)) {
6810
6811
  console.log("Detected git repo installation, pulling latest...");
6811
6812
  execSync29("git pull", { cwd: installDir, stdio: "inherit" });
6813
+ console.log("Installing dependencies...");
6814
+ execSync29("npm i", { cwd: installDir, stdio: "inherit" });
6812
6815
  console.log("Building...");
6813
6816
  execSync29("npm run build", { cwd: installDir, stdio: "inherit" });
6814
6817
  console.log("Syncing commands...");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@staff0rd/assist",
3
- "version": "0.97.0",
3
+ "version": "0.98.0",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "bin": {