@staff0rd/assist 0.385.0 → 0.385.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.
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.385.0",
9
+ version: "0.385.1",
10
10
  type: "module",
11
11
  main: "dist/index.js",
12
12
  bin: {
@@ -115,7 +115,7 @@ var package_default = {
115
115
  };
116
116
 
117
117
  // src/commands/commit.ts
118
- import { execSync as execSync4 } from "child_process";
118
+ import { execSync as execSync6 } from "child_process";
119
119
 
120
120
  // src/shared/resolveSessionItemId.ts
121
121
  var ITEM_ID_ENV = "ASSIST_BACKLOG_ITEM_ID";
@@ -1090,17 +1090,6 @@ async function persist(itemId2, refs) {
1090
1090
  function ignore() {
1091
1091
  }
1092
1092
 
1093
- // src/shared/shellQuote.ts
1094
- function shellQuote(arg) {
1095
- if (/[^a-zA-Z0-9_./:=@%^+,-]/.test(arg)) {
1096
- if (process.platform === "win32") {
1097
- return `"${arg.replace(/"/g, String.raw`\"`)}"`;
1098
- }
1099
- return `'${arg.replace(/'/g, String.raw`'\''`)}'`;
1100
- }
1101
- return arg;
1102
- }
1103
-
1104
1093
  // src/shared/warnIfUnexpectedBranch.ts
1105
1094
  import { execSync } from "child_process";
1106
1095
  import chalk3 from "chalk";
@@ -1133,11 +1122,98 @@ function currentBranch() {
1133
1122
  }
1134
1123
  }
1135
1124
 
1125
+ // src/commands/commit/findConflictMarkers.ts
1126
+ import { execSync as execSync2 } from "child_process";
1127
+
1128
+ // src/shared/shellQuote.ts
1129
+ function shellQuote(arg) {
1130
+ if (/[^a-zA-Z0-9_./:=@%^+,-]/.test(arg)) {
1131
+ if (process.platform === "win32") {
1132
+ return `"${arg.replace(/"/g, String.raw`\"`)}"`;
1133
+ }
1134
+ return `'${arg.replace(/'/g, String.raw`'\''`)}'`;
1135
+ }
1136
+ return arg;
1137
+ }
1138
+
1139
+ // src/commands/commit/findConflictMarkers.ts
1140
+ function gitCheckOutput(cmd) {
1141
+ try {
1142
+ return execSync2(cmd, { encoding: "utf8", stdio: ["pipe", "pipe", "pipe"] });
1143
+ } catch (error) {
1144
+ const stdout = error.stdout;
1145
+ if (typeof stdout === "string") return stdout;
1146
+ return stdout?.toString() ?? "";
1147
+ }
1148
+ }
1149
+ function checkCommands(files) {
1150
+ if (files.length === 0) return ["git diff --cached --check"];
1151
+ const scope = files.map(shellQuote).join(" ");
1152
+ return [
1153
+ `git diff --check -- ${scope}`,
1154
+ `git diff --cached --check -- ${scope}`
1155
+ ];
1156
+ }
1157
+ function findConflictMarkers(files) {
1158
+ const found = /* @__PURE__ */ new Set();
1159
+ for (const cmd of checkCommands(files)) {
1160
+ for (const line of gitCheckOutput(cmd).split("\n")) {
1161
+ if (!line.includes("leftover conflict marker")) continue;
1162
+ const file = line.slice(0, line.indexOf(":"));
1163
+ if (file) found.add(file);
1164
+ }
1165
+ }
1166
+ return [...found];
1167
+ }
1168
+ function findUnmergedPaths() {
1169
+ let output;
1170
+ try {
1171
+ output = execSync2("git ls-files -u", {
1172
+ encoding: "utf8",
1173
+ stdio: ["pipe", "pipe", "pipe"]
1174
+ });
1175
+ } catch {
1176
+ return [];
1177
+ }
1178
+ const found = /* @__PURE__ */ new Set();
1179
+ for (const line of output.split("\n")) {
1180
+ const path60 = line.split(" ")[1];
1181
+ if (path60) found.add(path60.trim());
1182
+ }
1183
+ return [...found];
1184
+ }
1185
+
1186
+ // src/commands/commit/abortOnConflicts.ts
1187
+ function abort(headline, guidance) {
1188
+ console.error(`Error: refusing to commit \u2014 ${headline}`);
1189
+ console.error(guidance);
1190
+ console.error("Nothing was committed or pushed.");
1191
+ process.exit(1);
1192
+ }
1193
+ function abortOnConflicts(files, pulled) {
1194
+ if (pulled) {
1195
+ const unmerged = findUnmergedPaths();
1196
+ if (unmerged.length > 0) {
1197
+ abort(
1198
+ `git pull --autostash left unresolved conflicts in: ${unmerged.join(", ")}`,
1199
+ "Your local changes are safe in the stash. Resolve the autostash conflict manually (edit the files, then `git stash drop`, or run `git stash pop`), then re-run the commit."
1200
+ );
1201
+ }
1202
+ }
1203
+ const conflicted = findConflictMarkers(files);
1204
+ if (conflicted.length > 0) {
1205
+ abort(
1206
+ `merge-conflict markers found in: ${conflicted.join(", ")}`,
1207
+ "Resolve the conflict markers, then re-run the commit."
1208
+ );
1209
+ }
1210
+ }
1211
+
1136
1212
  // src/commands/commit/collectCommitRefs.ts
1137
- import { execSync as execSync3 } from "child_process";
1213
+ import { execSync as execSync4 } from "child_process";
1138
1214
 
1139
1215
  // src/commands/prs/getPreferredRemoteRepo.ts
1140
- import { execSync as execSync2 } from "child_process";
1216
+ import { execSync as execSync3 } from "child_process";
1141
1217
  var GITHUB_URL_PATTERN = /(?:git@github\.com:|https:\/\/github\.com\/)([^/]+)\/([^/]+?)(?:\.git)?\/?$/;
1142
1218
  function parseGitHubUrl(url) {
1143
1219
  const match = url.match(GITHUB_URL_PATTERN);
@@ -1146,7 +1222,7 @@ function parseGitHubUrl(url) {
1146
1222
  }
1147
1223
  function tryGetRemoteUrl(remote, cwd) {
1148
1224
  try {
1149
- return execSync2(`git remote get-url ${remote}`, {
1225
+ return execSync3(`git remote get-url ${remote}`, {
1150
1226
  encoding: "utf8",
1151
1227
  stdio: ["pipe", "pipe", "pipe"],
1152
1228
  cwd
@@ -1157,7 +1233,7 @@ function tryGetRemoteUrl(remote, cwd) {
1157
1233
  }
1158
1234
  function getCurrentBranchRemote(cwd) {
1159
1235
  try {
1160
- const ref = execSync2(
1236
+ const ref = execSync3(
1161
1237
  "git rev-parse --abbrev-ref --symbolic-full-name @{u}",
1162
1238
  { encoding: "utf8", stdio: ["pipe", "pipe", "pipe"], cwd }
1163
1239
  ).trim();
@@ -1169,7 +1245,7 @@ function getCurrentBranchRemote(cwd) {
1169
1245
  }
1170
1246
  function listRemotes(cwd) {
1171
1247
  try {
1172
- return execSync2("git remote", {
1248
+ return execSync3("git remote", {
1173
1249
  encoding: "utf8",
1174
1250
  stdio: ["pipe", "pipe", "pipe"],
1175
1251
  cwd
@@ -1231,7 +1307,7 @@ function collectCommitRefs(message) {
1231
1307
  }
1232
1308
  function git(args) {
1233
1309
  try {
1234
- return execSync3(`git ${args}`, {
1310
+ return execSync4(`git ${args}`, {
1235
1311
  encoding: "utf8",
1236
1312
  stdio: ["pipe", "pipe", "pipe"]
1237
1313
  }).trim();
@@ -1240,6 +1316,20 @@ function git(args) {
1240
1316
  }
1241
1317
  }
1242
1318
 
1319
+ // src/commands/commit/stageAndCommit.ts
1320
+ import { execSync as execSync5 } from "child_process";
1321
+ function commitStaged(message) {
1322
+ execSync5(`git commit -m ${shellQuote(message)}`, { stdio: "inherit" });
1323
+ return execSync5("git rev-parse --short=7 HEAD", {
1324
+ encoding: "utf8"
1325
+ }).trim();
1326
+ }
1327
+ function stageAndCommit(files, message) {
1328
+ const escaped = files.map(shellQuote).join(" ");
1329
+ execSync5(`git add ${escaped}`, { stdio: "inherit" });
1330
+ return commitStaged(message);
1331
+ }
1332
+
1243
1333
  // src/commands/commit/validateMessage.ts
1244
1334
  var MAX_MESSAGE_LENGTH = 50;
1245
1335
  var CONVENTIONAL_COMMIT_REGEX = /^(feat|fix|docs|style|refactor|perf|test|build|ci|chore|revert)(!)?(\(.+\))?!?: .+$/;
@@ -1263,27 +1353,18 @@ function validateMessage(message, config) {
1263
1353
  }
1264
1354
 
1265
1355
  // src/commands/commit.ts
1266
- function commitStaged(message) {
1267
- execSync4(`git commit -m ${shellQuote(message)}`, { stdio: "inherit" });
1268
- return execSync4("git rev-parse --short=7 HEAD", {
1269
- encoding: "utf8"
1270
- }).trim();
1271
- }
1272
- function stageAndCommit(files, message) {
1273
- const escaped = files.map(shellQuote).join(" ");
1274
- execSync4(`git add ${escaped}`, { stdio: "inherit" });
1275
- return commitStaged(message);
1276
- }
1277
1356
  async function execCommit(files, message, config) {
1278
1357
  try {
1279
1358
  warnIfUnexpectedBranch(config);
1280
- if (config.commit?.pull) {
1281
- execSync4("git pull --autostash", { stdio: "inherit" });
1359
+ const pulled = Boolean(config.commit?.pull);
1360
+ if (pulled) {
1361
+ execSync6("git pull --autostash", { stdio: "inherit" });
1282
1362
  }
1363
+ abortOnConflicts(files, pulled);
1283
1364
  const sha = files.length > 0 ? stageAndCommit(files, message) : commitStaged(message);
1284
1365
  console.log(`Committed: ${sha}`);
1285
1366
  if (config.commit?.push) {
1286
- execSync4("git push", { stdio: "inherit" });
1367
+ execSync6("git push", { stdio: "inherit" });
1287
1368
  console.log("Pushed to remote");
1288
1369
  }
1289
1370
  await recordCommitActivity(message);
@@ -1298,7 +1379,7 @@ async function recordCommitActivity(message) {
1298
1379
  }
1299
1380
  async function commit(args) {
1300
1381
  if (args[0] === "status") {
1301
- execSync4("git status && echo '---DIFF---' && git diff", {
1382
+ execSync6("git status && echo '---DIFF---' && git diff", {
1302
1383
  stdio: "inherit"
1303
1384
  });
1304
1385
  return;
@@ -1315,9 +1396,9 @@ async function commit(args) {
1315
1396
  }
1316
1397
 
1317
1398
  // src/commands/coverage.ts
1318
- import { execSync as execSync5 } from "child_process";
1399
+ import { execSync as execSync7 } from "child_process";
1319
1400
  function coverage() {
1320
- const output = execSync5(
1401
+ const output = execSync7(
1321
1402
  "npx vitest run --coverage --coverage.include='src/**/*.ts' --coverage.all --coverage.reporter=text 2>&1",
1322
1403
  { encoding: "utf8", timeout: 12e4 }
1323
1404
  );
@@ -1417,7 +1498,7 @@ function findPackageJsonWithVerifyScripts(startDir) {
1417
1498
  }
1418
1499
 
1419
1500
  // src/commands/verify/installPackage.ts
1420
- import { execSync as execSync6 } from "child_process";
1501
+ import { execSync as execSync8 } from "child_process";
1421
1502
  import { writeFileSync as writeFileSync2 } from "fs";
1422
1503
  import chalk6 from "chalk";
1423
1504
  function writePackageJson(filePath, pkg) {
@@ -1436,7 +1517,7 @@ function addScript(pkg, name, command) {
1436
1517
  function installPackage(name, cwd) {
1437
1518
  console.log(chalk6.dim(`Installing ${name}...`));
1438
1519
  try {
1439
- execSync6(`npm install -D ${name}`, { stdio: "inherit", cwd });
1520
+ execSync8(`npm install -D ${name}`, { stdio: "inherit", cwd });
1440
1521
  return true;
1441
1522
  } catch {
1442
1523
  console.error(chalk6.red(`Failed to install ${name}`));
@@ -1680,7 +1761,7 @@ import { existsSync as existsSync8, readFileSync as readFileSync6, writeFileSync
1680
1761
  import chalk14 from "chalk";
1681
1762
 
1682
1763
  // src/shared/removeEslint/index.ts
1683
- import { execSync as execSync7 } from "child_process";
1764
+ import { execSync as execSync9 } from "child_process";
1684
1765
  import { existsSync as existsSync7, readFileSync as readFileSync5, writeFileSync as writeFileSync5 } from "fs";
1685
1766
 
1686
1767
  // src/shared/removeEslint/removeEslintConfigFiles.ts
@@ -1715,7 +1796,7 @@ function removeEslint(options2 = {}) {
1715
1796
  const removedConfigFiles = removeEslintConfigFiles();
1716
1797
  if (removedFromPackageJson || removedConfigFiles) {
1717
1798
  console.log("Running npm install...");
1718
- execSync7("npm install", { stdio: "inherit" });
1799
+ execSync9("npm install", { stdio: "inherit" });
1719
1800
  return true;
1720
1801
  }
1721
1802
  return false;
@@ -2563,11 +2644,11 @@ function lint(options2 = {}) {
2563
2644
  }
2564
2645
 
2565
2646
  // src/commands/new/registerNew/newCli/index.ts
2566
- import { execSync as execSync14 } from "child_process";
2647
+ import { execSync as execSync16 } from "child_process";
2567
2648
  import { basename, resolve as resolve5 } from "path";
2568
2649
 
2569
2650
  // src/commands/verify/blockComments/findComments.ts
2570
- import { execSync as execSync8 } from "child_process";
2651
+ import { execSync as execSync10 } from "child_process";
2571
2652
  import fs14 from "fs";
2572
2653
  import { minimatch } from "minimatch";
2573
2654
  import { Project as Project2 } from "ts-morph";
@@ -2793,7 +2874,7 @@ function shouldScan(file, ignoreGlobs) {
2793
2874
  return fs14.existsSync(file);
2794
2875
  }
2795
2876
  function findComments(options2) {
2796
- const diff2 = execSync8("git diff HEAD", {
2877
+ const diff2 = execSync10("git diff HEAD", {
2797
2878
  encoding: "utf8",
2798
2879
  maxBuffer: 64 * 1024 * 1024
2799
2880
  });
@@ -3003,13 +3084,13 @@ Total: ${violations.length} forbidden string(s).`);
3003
3084
  }
3004
3085
 
3005
3086
  // src/commands/verify/hardcodedColors.ts
3006
- import { execSync as execSync9 } from "child_process";
3087
+ import { execSync as execSync11 } from "child_process";
3007
3088
  import { minimatch as minimatch3 } from "minimatch";
3008
3089
  var pattern = "0x[0-9a-fA-F]{6}|#[0-9a-fA-F]{3,6}";
3009
3090
  function hardcodedColors() {
3010
3091
  const ignoreGlobs = loadConfig().hardcodedColors?.ignore ?? [];
3011
3092
  try {
3012
- const output = execSync9(`grep -rEnH '${pattern}' src/`, {
3093
+ const output = execSync11(`grep -rEnH '${pattern}' src/`, {
3013
3094
  encoding: "utf8"
3014
3095
  });
3015
3096
  const lines = output.trim().split("\n").filter((line) => {
@@ -3190,10 +3271,10 @@ function list() {
3190
3271
  }
3191
3272
 
3192
3273
  // src/commands/verify/noVenv.ts
3193
- import { execSync as execSync10 } from "child_process";
3274
+ import { execSync as execSync12 } from "child_process";
3194
3275
  function noVenv() {
3195
3276
  try {
3196
- const output = execSync10(
3277
+ const output = execSync12(
3197
3278
  "find . -type d -name venv -not -path '*/node_modules/*'",
3198
3279
  {
3199
3280
  encoding: "utf8"
@@ -3225,9 +3306,9 @@ Total: ${folders.length} venv folder(s)`);
3225
3306
  import { minimatch as minimatch4 } from "minimatch";
3226
3307
 
3227
3308
  // src/commands/verify/run/getChangedFiles.ts
3228
- import { execSync as execSync11 } from "child_process";
3309
+ import { execSync as execSync13 } from "child_process";
3229
3310
  function getChangedFiles() {
3230
- const output = execSync11("git diff --name-only HEAD", {
3311
+ const output = execSync13("git diff --name-only HEAD", {
3231
3312
  encoding: "utf8"
3232
3313
  }).trim();
3233
3314
  if (output === "") return [];
@@ -3399,25 +3480,25 @@ async function run(options2 = {}) {
3399
3480
  }
3400
3481
 
3401
3482
  // src/commands/new/registerNew/initGit.ts
3402
- import { execSync as execSync12 } from "child_process";
3483
+ import { execSync as execSync14 } from "child_process";
3403
3484
  import { writeFileSync as writeFileSync10 } from "fs";
3404
3485
  function initGit() {
3405
3486
  console.log("Initializing git repository...");
3406
- execSync12("git init", { stdio: "inherit" });
3487
+ execSync14("git init", { stdio: "inherit" });
3407
3488
  writeFileSync10(".gitignore", "dist\nnode_modules\n");
3408
3489
  }
3409
3490
 
3410
3491
  // src/commands/new/registerNew/newCli/initPackageJson.ts
3411
- import { execSync as execSync13 } from "child_process";
3492
+ import { execSync as execSync15 } from "child_process";
3412
3493
  function initPackageJson(name) {
3413
3494
  console.log("Initializing package.json...");
3414
- execSync13("npm init -y", { stdio: "inherit" });
3495
+ execSync15("npm init -y", { stdio: "inherit" });
3415
3496
  console.log("Configuring package.json...");
3416
- execSync13("npm pkg delete main", { stdio: "inherit" });
3417
- execSync13("npm pkg set type=module", { stdio: "inherit" });
3418
- execSync13(`npm pkg set bin.${name}=./dist/index.js`, { stdio: "inherit" });
3419
- execSync13("npm pkg set scripts.build=tsup", { stdio: "inherit" });
3420
- execSync13('npm pkg set scripts.start="node dist/index.js"', {
3497
+ execSync15("npm pkg delete main", { stdio: "inherit" });
3498
+ execSync15("npm pkg set type=module", { stdio: "inherit" });
3499
+ execSync15(`npm pkg set bin.${name}=./dist/index.js`, { stdio: "inherit" });
3500
+ execSync15("npm pkg set scripts.build=tsup", { stdio: "inherit" });
3501
+ execSync15('npm pkg set scripts.start="node dist/index.js"', {
3421
3502
  stdio: "inherit"
3422
3503
  });
3423
3504
  }
@@ -3482,8 +3563,8 @@ async function newCli() {
3482
3563
  initGit();
3483
3564
  initPackageJson(name);
3484
3565
  console.log("Installing dependencies...");
3485
- execSync14("npm install commander", { stdio: "inherit" });
3486
- execSync14("npm install -D tsup typescript @types/node", {
3566
+ execSync16("npm install commander", { stdio: "inherit" });
3567
+ execSync16("npm install -D tsup typescript @types/node", {
3487
3568
  stdio: "inherit"
3488
3569
  });
3489
3570
  writeCliTemplate(name);
@@ -3492,11 +3573,11 @@ async function newCli() {
3492
3573
  }
3493
3574
 
3494
3575
  // src/commands/new/registerNew/newProject.ts
3495
- import { execSync as execSync16 } from "child_process";
3576
+ import { execSync as execSync18 } from "child_process";
3496
3577
  import { existsSync as existsSync15, readFileSync as readFileSync11, writeFileSync as writeFileSync13 } from "fs";
3497
3578
 
3498
3579
  // src/commands/deploy/init/index.ts
3499
- import { execSync as execSync15 } from "child_process";
3580
+ import { execSync as execSync17 } from "child_process";
3500
3581
  import chalk28 from "chalk";
3501
3582
  import enquirer3 from "enquirer";
3502
3583
 
@@ -3549,7 +3630,7 @@ Created ${WORKFLOW_PATH}`));
3549
3630
  // src/commands/deploy/init/index.ts
3550
3631
  async function ensureNetlifyCli() {
3551
3632
  try {
3552
- execSync15("netlify sites:create --disable-linking", { stdio: "inherit" });
3633
+ execSync17("netlify sites:create --disable-linking", { stdio: "inherit" });
3553
3634
  } catch (error) {
3554
3635
  if (!(error instanceof Error) || !error.message.includes("command not found"))
3555
3636
  throw error;
@@ -3564,9 +3645,9 @@ async function ensureNetlifyCli() {
3564
3645
  process.exit(1);
3565
3646
  }
3566
3647
  console.log(chalk28.dim("\nInstalling netlify-cli...\n"));
3567
- execSync15("npm install -g netlify-cli", { stdio: "inherit" });
3648
+ execSync17("npm install -g netlify-cli", { stdio: "inherit" });
3568
3649
  console.log();
3569
- execSync15("netlify sites:create --disable-linking", { stdio: "inherit" });
3650
+ execSync17("netlify sites:create --disable-linking", { stdio: "inherit" });
3570
3651
  }
3571
3652
  }
3572
3653
  function printSetupInstructions() {
@@ -3609,7 +3690,7 @@ async function init6() {
3609
3690
  // src/commands/new/registerNew/newProject.ts
3610
3691
  async function newProject() {
3611
3692
  console.log("Initializing Vite with react-ts template...");
3612
- execSync16("npm create vite@latest . -- --template react-ts", {
3693
+ execSync18("npm create vite@latest . -- --template react-ts", {
3613
3694
  stdio: "inherit"
3614
3695
  });
3615
3696
  initGit();
@@ -3800,11 +3881,11 @@ function activityChart(data, range) {
3800
3881
  }
3801
3882
 
3802
3883
  // src/commands/activity/fetchCommitsPerDay.ts
3803
- import { execSync as execSync17 } from "child_process";
3884
+ import { execSync as execSync19 } from "child_process";
3804
3885
  function fetchContributions(from, to) {
3805
3886
  const query = `{ viewer { contributionsCollection(from: "${from}T00:00:00Z", to: "${to}T23:59:59Z") { contributionCalendar { weeks { contributionDays { date contributionCount } } } } } }`;
3806
3887
  const jq = ".data.viewer.contributionsCollection.contributionCalendar.weeks[].contributionDays[]";
3807
- const raw = execSync17(`gh api graphql -f query='${query}' --jq '${jq}'`, {
3888
+ const raw = execSync19(`gh api graphql -f query='${query}' --jq '${jq}'`, {
3808
3889
  encoding: "utf8"
3809
3890
  }).trim();
3810
3891
  if (!raw) return [];
@@ -3891,10 +3972,10 @@ import { join as join10 } from "path";
3891
3972
  import chalk29 from "chalk";
3892
3973
 
3893
3974
  // src/commands/backup/readCrontab.ts
3894
- import { execSync as execSync18 } from "child_process";
3975
+ import { execSync as execSync20 } from "child_process";
3895
3976
  function readCrontab() {
3896
3977
  try {
3897
- return execSync18("crontab -l", {
3978
+ return execSync20("crontab -l", {
3898
3979
  encoding: "utf8",
3899
3980
  stdio: ["ignore", "pipe", "ignore"]
3900
3981
  });
@@ -3904,7 +3985,7 @@ function readCrontab() {
3904
3985
  }
3905
3986
  function writeCrontab(content) {
3906
3987
  try {
3907
- execSync18("crontab -", {
3988
+ execSync20("crontab -", {
3908
3989
  input: content,
3909
3990
  stdio: ["pipe", "ignore", "pipe"]
3910
3991
  });
@@ -4245,7 +4326,7 @@ import chalk45 from "chalk";
4245
4326
  import enquirer5 from "enquirer";
4246
4327
 
4247
4328
  // src/shared/pullIfConfigured.ts
4248
- import { execSync as execSync19 } from "child_process";
4329
+ import { execSync as execSync21 } from "child_process";
4249
4330
  import chalk32 from "chalk";
4250
4331
  function pullIfConfigured() {
4251
4332
  const config = loadConfig();
@@ -4259,7 +4340,7 @@ function pullIfConfigured() {
4259
4340
  return;
4260
4341
  }
4261
4342
  try {
4262
- execSync19("git pull --ff-only", { stdio: "inherit" });
4343
+ execSync21("git pull --ff-only", { stdio: "inherit" });
4263
4344
  } catch {
4264
4345
  console.error(chalk32.red("git pull --ff-only failed; aborting."));
4265
4346
  process.exit(1);
@@ -4267,7 +4348,7 @@ function pullIfConfigured() {
4267
4348
  }
4268
4349
  function hasLocalChanges() {
4269
4350
  try {
4270
- const status2 = execSync19("git status --porcelain", {
4351
+ const status2 = execSync21("git status --porcelain", {
4271
4352
  encoding: "utf8"
4272
4353
  });
4273
4354
  return status2.trim().length > 0;
@@ -4570,7 +4651,7 @@ function consumePause(itemId2) {
4570
4651
  }
4571
4652
 
4572
4653
  // src/commands/branch/createBranch.ts
4573
- import { execSync as execSync21 } from "child_process";
4654
+ import { execSync as execSync23 } from "child_process";
4574
4655
 
4575
4656
  // src/commands/branch/buildBranchName.ts
4576
4657
  function buildBranchName({
@@ -4586,12 +4667,12 @@ function buildBranchName({
4586
4667
  }
4587
4668
 
4588
4669
  // src/commands/branch/resolveDefaultBranch.ts
4589
- import { execSync as execSync20 } from "child_process";
4670
+ import { execSync as execSync22 } from "child_process";
4590
4671
  var REMOTE_HEAD_REGEX = /^ref:\s+refs\/heads\/(\S+)\s+HEAD$/m;
4591
4672
  function resolveDefaultBranch(override, cwd) {
4592
4673
  if (override) return override;
4593
4674
  try {
4594
- const output = execSync20("git ls-remote --symref origin HEAD", {
4675
+ const output = execSync22("git ls-remote --symref origin HEAD", {
4595
4676
  encoding: "utf8",
4596
4677
  stdio: ["pipe", "pipe", "pipe"],
4597
4678
  cwd
@@ -4615,8 +4696,8 @@ async function createBranch({
4615
4696
  slug
4616
4697
  });
4617
4698
  const defaultBranch = resolveDefaultBranch(config.branch?.defaultBranch);
4618
- execSync21("git fetch", { stdio: "inherit" });
4619
- execSync21(
4699
+ execSync23("git fetch", { stdio: "inherit" });
4700
+ execSync23(
4620
4701
  `git switch -c ${shellQuote(branchName)} ${shellQuote(`origin/${defaultBranch}`)}`,
4621
4702
  { stdio: "inherit" }
4622
4703
  );
@@ -4746,11 +4827,11 @@ function backupLocalBacklogFiles(dir) {
4746
4827
  }
4747
4828
 
4748
4829
  // src/commands/backlog/gitPullBacklog.ts
4749
- import { execSync as execSync22 } from "child_process";
4830
+ import { execSync as execSync24 } from "child_process";
4750
4831
  import chalk35 from "chalk";
4751
4832
  function gitPullBacklog(dir) {
4752
4833
  try {
4753
- execSync22("git pull --ff-only", {
4834
+ execSync24("git pull --ff-only", {
4754
4835
  cwd: dir,
4755
4836
  stdio: ["pipe", "pipe", "pipe"]
4756
4837
  });
@@ -6791,7 +6872,7 @@ import chalk61 from "chalk";
6791
6872
  import { WebSocketServer } from "ws";
6792
6873
 
6793
6874
  // src/shared/getInstallDir.ts
6794
- import { execSync as execSync23 } from "child_process";
6875
+ import { execSync as execSync25 } from "child_process";
6795
6876
  import { dirname as dirname18, resolve as resolve7 } from "path";
6796
6877
  import { fileURLToPath as fileURLToPath2 } from "url";
6797
6878
  var __filename2 = fileURLToPath2(import.meta.url);
@@ -6801,7 +6882,7 @@ function getInstallDir() {
6801
6882
  }
6802
6883
  function isGitRepo(dir) {
6803
6884
  try {
6804
- const result = execSync23("git rev-parse --show-toplevel", {
6885
+ const result = execSync25("git rev-parse --show-toplevel", {
6805
6886
  cwd: dir,
6806
6887
  stdio: "pipe"
6807
6888
  }).toString().trim();
@@ -6818,11 +6899,11 @@ import {
6818
6899
  import chalk56 from "chalk";
6819
6900
 
6820
6901
  // src/lib/openBrowser.ts
6821
- import { execSync as execSync24 } from "child_process";
6902
+ import { execSync as execSync26 } from "child_process";
6822
6903
  function tryExec(commands) {
6823
6904
  for (const cmd of commands) {
6824
6905
  try {
6825
- execSync24(cmd, { stdio: "ignore" });
6906
+ execSync26(cmd, { stdio: "ignore" });
6826
6907
  return true;
6827
6908
  } catch {
6828
6909
  }
@@ -8604,12 +8685,12 @@ import chalk64 from "chalk";
8604
8685
  import { eq as eq17 } from "drizzle-orm";
8605
8686
 
8606
8687
  // src/commands/jira/fetchIssue.ts
8607
- import { execSync as execSync25 } from "child_process";
8688
+ import { execSync as execSync27 } from "child_process";
8608
8689
  import chalk63 from "chalk";
8609
8690
  function fetchIssue(issueKey, fields) {
8610
8691
  let result;
8611
8692
  try {
8612
- result = execSync25(
8693
+ result = execSync27(
8613
8694
  `acli jira workitem view ${issueKey} -f ${fields} --json`,
8614
8695
  { encoding: "utf8", stdio: ["pipe", "pipe", "pipe"] }
8615
8696
  );
@@ -11259,7 +11340,7 @@ import { homedir as homedir15 } from "os";
11259
11340
  import { join as join29 } from "path";
11260
11341
 
11261
11342
  // src/shared/checkCliAvailable.ts
11262
- import { execSync as execSync26 } from "child_process";
11343
+ import { execSync as execSync28 } from "child_process";
11263
11344
  function checkCliAvailable(cli) {
11264
11345
  const binary = cli.split(/\s+/)[0];
11265
11346
  const opts = {
@@ -11267,11 +11348,11 @@ function checkCliAvailable(cli) {
11267
11348
  stdio: ["ignore", "pipe", "pipe"]
11268
11349
  };
11269
11350
  try {
11270
- execSync26(`command -v ${binary}`, opts);
11351
+ execSync28(`command -v ${binary}`, opts);
11271
11352
  return true;
11272
11353
  } catch {
11273
11354
  try {
11274
- execSync26(`where ${binary}`, opts);
11355
+ execSync28(`where ${binary}`, opts);
11275
11356
  return true;
11276
11357
  } catch {
11277
11358
  return false;
@@ -12672,7 +12753,7 @@ function loadBlogSkipDays(repoName) {
12672
12753
  }
12673
12754
 
12674
12755
  // src/commands/devlog/shared.ts
12675
- import { execSync as execSync27 } from "child_process";
12756
+ import { execSync as execSync29 } from "child_process";
12676
12757
  import chalk123 from "chalk";
12677
12758
 
12678
12759
  // src/shared/getRepoName.ts
@@ -12764,7 +12845,7 @@ function loadAllDevlogLatestDates() {
12764
12845
  // src/commands/devlog/shared.ts
12765
12846
  function getCommitFiles(hash) {
12766
12847
  try {
12767
- const output = execSync27(`git show --name-only --format="" ${hash}`, {
12848
+ const output = execSync29(`git show --name-only --format="" ${hash}`, {
12768
12849
  encoding: "utf8"
12769
12850
  });
12770
12851
  return output.trim().split("\n").filter(Boolean);
@@ -12860,11 +12941,11 @@ function list3(options2) {
12860
12941
  }
12861
12942
 
12862
12943
  // src/commands/devlog/getLastVersionInfo.ts
12863
- import { execFileSync as execFileSync3, execSync as execSync28 } from "child_process";
12944
+ import { execFileSync as execFileSync3, execSync as execSync30 } from "child_process";
12864
12945
  import semver from "semver";
12865
12946
  function getVersionAtCommit(hash) {
12866
12947
  try {
12867
- const content = execSync28(`git show ${hash}:package.json`, {
12948
+ const content = execSync30(`git show ${hash}:package.json`, {
12868
12949
  encoding: "utf8"
12869
12950
  });
12870
12951
  const pkg = JSON.parse(content);
@@ -13037,7 +13118,7 @@ function next2(options2) {
13037
13118
  }
13038
13119
 
13039
13120
  // src/commands/devlog/repos/index.ts
13040
- import { execSync as execSync29 } from "child_process";
13121
+ import { execSync as execSync31 } from "child_process";
13041
13122
 
13042
13123
  // src/commands/devlog/repos/printReposTable.ts
13043
13124
  import chalk127 from "chalk";
@@ -13072,7 +13153,7 @@ function getStatus(lastPush, lastDevlog) {
13072
13153
  return lastDevlog < lastPush ? "outdated" : "ok";
13073
13154
  }
13074
13155
  function fetchRepos(days, all) {
13075
- const json = execSync29(
13156
+ const json = execSync31(
13076
13157
  "gh repo list staff0rd --json name,pushedAt,isArchived --limit 200",
13077
13158
  { encoding: "utf8" }
13078
13159
  );
@@ -13452,7 +13533,7 @@ async function deps(csprojPath, options2) {
13452
13533
  }
13453
13534
 
13454
13535
  // src/commands/dotnet/getChangedCsFiles.ts
13455
- import { execSync as execSync30 } from "child_process";
13536
+ import { execSync as execSync32 } from "child_process";
13456
13537
  var SCOPE_ALL = "all";
13457
13538
  var SCOPE_BASE = "base:";
13458
13539
  var SCOPE_COMMIT = "commit:";
@@ -13476,7 +13557,7 @@ function getChangedCsFiles(scope) {
13476
13557
  } else {
13477
13558
  cmd = "git diff --name-only HEAD";
13478
13559
  }
13479
- const output = execSync30(cmd, { encoding: "utf8" }).trim();
13560
+ const output = execSync32(cmd, { encoding: "utf8" }).trim();
13480
13561
  if (output === "") return [];
13481
13562
  return output.split("\n").filter((f) => f.toLowerCase().endsWith(".cs"));
13482
13563
  }
@@ -13674,14 +13755,14 @@ function parseInspectReport(json) {
13674
13755
  }
13675
13756
 
13676
13757
  // src/commands/dotnet/runInspectCode.ts
13677
- import { execSync as execSync31 } from "child_process";
13758
+ import { execSync as execSync33 } from "child_process";
13678
13759
  import { existsSync as existsSync37, readFileSync as readFileSync32, unlinkSync as unlinkSync9 } from "fs";
13679
13760
  import { tmpdir as tmpdir3 } from "os";
13680
13761
  import path31 from "path";
13681
13762
  import chalk137 from "chalk";
13682
13763
  function assertJbInstalled() {
13683
13764
  try {
13684
- execSync31("jb inspectcode --version", { stdio: "pipe" });
13765
+ execSync33("jb inspectcode --version", { stdio: "pipe" });
13685
13766
  } catch {
13686
13767
  console.error(chalk137.red("jb is not installed. Install with:"));
13687
13768
  console.error(
@@ -13695,7 +13776,7 @@ function runInspectCode(slnPath, include, swea) {
13695
13776
  const includeFlag = include ? ` --include="${include}"` : "";
13696
13777
  const sweaFlag = swea ? " --swea" : "";
13697
13778
  try {
13698
- execSync31(
13779
+ execSync33(
13699
13780
  `jb inspectcode "${slnPath}" -o="${reportPath}"${includeFlag}${sweaFlag} --verbosity=OFF`,
13700
13781
  { stdio: "pipe" }
13701
13782
  );
@@ -13716,7 +13797,7 @@ function runInspectCode(slnPath, include, swea) {
13716
13797
  }
13717
13798
 
13718
13799
  // src/commands/dotnet/runRoslynInspect.ts
13719
- import { execSync as execSync32 } from "child_process";
13800
+ import { execSync as execSync34 } from "child_process";
13720
13801
  import chalk138 from "chalk";
13721
13802
  function resolveMsbuildPath() {
13722
13803
  const { run: run4 } = loadConfig();
@@ -13727,7 +13808,7 @@ function resolveMsbuildPath() {
13727
13808
  function assertMsbuildInstalled() {
13728
13809
  const msbuild = resolveMsbuildPath();
13729
13810
  try {
13730
- execSync32(`"${msbuild}" -version`, { stdio: "pipe" });
13811
+ execSync34(`"${msbuild}" -version`, { stdio: "pipe" });
13731
13812
  } catch {
13732
13813
  console.error(chalk138.red(`msbuild not found at: ${msbuild}`));
13733
13814
  console.error(
@@ -13753,7 +13834,7 @@ function runRoslynInspect(slnPath) {
13753
13834
  const msbuild = resolveMsbuildPath();
13754
13835
  let output;
13755
13836
  try {
13756
- output = execSync32(
13837
+ output = execSync34(
13757
13838
  `"${msbuild}" "${slnPath}" -t:Build -v:minimal -maxcpucount -p:EnforceCodeStyleInBuild=true -p:RunAnalyzersDuringBuild=true 2>&1`,
13758
13839
  { encoding: "utf8", stdio: "pipe", maxBuffer: 50 * 1024 * 1024 }
13759
13840
  );
@@ -14563,7 +14644,7 @@ function acceptanceCriteria(issueKey) {
14563
14644
  }
14564
14645
 
14565
14646
  // src/commands/jira/jiraAuth.ts
14566
- import { execSync as execSync33 } from "child_process";
14647
+ import { execSync as execSync35 } from "child_process";
14567
14648
 
14568
14649
  // src/shared/promptInput.ts
14569
14650
  import Enquirer from "enquirer";
@@ -14598,7 +14679,7 @@ async function jiraAuth() {
14598
14679
  console.error("All fields are required.");
14599
14680
  process.exit(1);
14600
14681
  }
14601
- execSync33(`acli jira auth login --site ${site} --email "${email}" --token`, {
14682
+ execSync35(`acli jira auth login --site ${site} --email "${email}" --token`, {
14602
14683
  encoding: "utf8",
14603
14684
  input: token,
14604
14685
  stdio: ["pipe", "inherit", "inherit"]
@@ -15614,7 +15695,7 @@ function registerPrompts(program2) {
15614
15695
  }
15615
15696
 
15616
15697
  // src/commands/prs/shared.ts
15617
- import { execSync as execSync34 } from "child_process";
15698
+ import { execSync as execSync36 } from "child_process";
15618
15699
  function isGhNotInstalled(error) {
15619
15700
  if (error instanceof Error) {
15620
15701
  const msg = error.message.toLowerCase();
@@ -15632,12 +15713,12 @@ function getRepoInfo() {
15632
15713
  const preferred = getPreferredRemoteRepo();
15633
15714
  if (preferred) return preferred;
15634
15715
  const repoInfo = JSON.parse(
15635
- execSync34("gh repo view --json owner,name", { encoding: "utf8" })
15716
+ execSync36("gh repo view --json owner,name", { encoding: "utf8" })
15636
15717
  );
15637
15718
  return { org: repoInfo.owner.login, repo: repoInfo.name };
15638
15719
  }
15639
15720
  function getCurrentBranch2() {
15640
- return execSync34("git rev-parse --abbrev-ref HEAD", {
15721
+ return execSync36("git rev-parse --abbrev-ref HEAD", {
15641
15722
  encoding: "utf8"
15642
15723
  }).trim();
15643
15724
  }
@@ -15645,7 +15726,7 @@ function viewCurrentPr(fields) {
15645
15726
  const { org, repo } = getRepoInfo();
15646
15727
  const branch2 = getCurrentBranch2();
15647
15728
  return JSON.parse(
15648
- execSync34(`gh pr view ${branch2} --json ${fields} -R ${org}/${repo}`, {
15729
+ execSync36(`gh pr view ${branch2} --json ${fields} -R ${org}/${repo}`, {
15649
15730
  encoding: "utf8"
15650
15731
  })
15651
15732
  );
@@ -15749,7 +15830,7 @@ function comment2(path60, line, body, startLine) {
15749
15830
  }
15750
15831
 
15751
15832
  // src/commands/prs/edit.ts
15752
- import { execSync as execSync35 } from "child_process";
15833
+ import { execSync as execSync37 } from "child_process";
15753
15834
 
15754
15835
  // src/commands/prs/buildPrBody.ts
15755
15836
  function jiraBrowseUrl(key) {
@@ -15922,17 +16003,17 @@ function edit(options2) {
15922
16003
  if (options2.title) args.push(`--title ${shellQuote(options2.title)}`);
15923
16004
  args.push(`--body ${shellQuote(newBody)}`);
15924
16005
  try {
15925
- execSync35(args.join(" "), { stdio: "inherit" });
16006
+ execSync37(args.join(" "), { stdio: "inherit" });
15926
16007
  } catch {
15927
16008
  process.exit(1);
15928
16009
  }
15929
16010
  }
15930
16011
 
15931
16012
  // src/commands/prs/fixed.ts
15932
- import { execSync as execSync38 } from "child_process";
16013
+ import { execSync as execSync40 } from "child_process";
15933
16014
 
15934
16015
  // src/commands/prs/resolveCommentWithReply.ts
15935
- import { execSync as execSync37 } from "child_process";
16016
+ import { execSync as execSync39 } from "child_process";
15936
16017
  import { unlinkSync as unlinkSync12, writeFileSync as writeFileSync31 } from "fs";
15937
16018
  import { tmpdir as tmpdir5 } from "os";
15938
16019
  import { join as join48 } from "path";
@@ -15961,9 +16042,9 @@ function deleteCommentsCache(prNumber) {
15961
16042
  }
15962
16043
 
15963
16044
  // src/commands/prs/replyToComment.ts
15964
- import { execSync as execSync36 } from "child_process";
16045
+ import { execSync as execSync38 } from "child_process";
15965
16046
  function replyToComment(org, repo, prNumber, commentId, message) {
15966
- execSync36(
16047
+ execSync38(
15967
16048
  `gh api repos/${org}/${repo}/pulls/${prNumber}/comments -f body="${message.replace(/"/g, String.raw`\"`)}" -F in_reply_to=${commentId}`,
15968
16049
  { stdio: ["inherit", "pipe", "inherit"] }
15969
16050
  );
@@ -15975,7 +16056,7 @@ function resolveThread(threadId) {
15975
16056
  const queryFile = join48(tmpdir5(), `gh-mutation-${Date.now()}.graphql`);
15976
16057
  writeFileSync31(queryFile, mutation);
15977
16058
  try {
15978
- execSync37(
16059
+ execSync39(
15979
16060
  `gh api graphql -F query=@${queryFile} -f threadId="${threadId}"`,
15980
16061
  { stdio: ["inherit", "pipe", "inherit"] }
15981
16062
  );
@@ -16027,7 +16108,7 @@ function resolveCommentWithReply(commentId, message) {
16027
16108
  // src/commands/prs/fixed.ts
16028
16109
  function verifySha(sha) {
16029
16110
  try {
16030
- return execSync38(`git rev-parse --verify ${sha}`, {
16111
+ return execSync40(`git rev-parse --verify ${sha}`, {
16031
16112
  encoding: "utf8"
16032
16113
  }).trim();
16033
16114
  } catch {
@@ -16041,7 +16122,7 @@ function fixed(commentId, sha) {
16041
16122
  const { org, repo } = getRepoInfo();
16042
16123
  const repoUrl = `https://github.com/${org}/${repo}`;
16043
16124
  const message = `Fixed in [${fullSha}](${repoUrl}/commit/${fullSha})`;
16044
- execSync38("git push", { stdio: "inherit" });
16125
+ execSync40("git push", { stdio: "inherit" });
16045
16126
  resolveCommentWithReply(commentId, message);
16046
16127
  } catch (error) {
16047
16128
  if (isGhNotInstalled(error)) {
@@ -16059,7 +16140,7 @@ import { join as join50 } from "path";
16059
16140
  import { stringify } from "yaml";
16060
16141
 
16061
16142
  // src/commands/prs/fetchThreadIds.ts
16062
- import { execSync as execSync39 } from "child_process";
16143
+ import { execSync as execSync41 } from "child_process";
16063
16144
  import { unlinkSync as unlinkSync13, writeFileSync as writeFileSync32 } from "fs";
16064
16145
  import { tmpdir as tmpdir6 } from "os";
16065
16146
  import { join as join49 } from "path";
@@ -16068,7 +16149,7 @@ function fetchThreadIds(org, repo, prNumber) {
16068
16149
  const queryFile = join49(tmpdir6(), `gh-query-${Date.now()}.graphql`);
16069
16150
  writeFileSync32(queryFile, THREAD_QUERY);
16070
16151
  try {
16071
- const result = execSync39(
16152
+ const result = execSync41(
16072
16153
  `gh api graphql -F query=@${queryFile} -F owner="${org}" -F repo="${repo}" -F prNumber=${prNumber}`,
16073
16154
  { encoding: "utf8" }
16074
16155
  );
@@ -16090,9 +16171,9 @@ function fetchThreadIds(org, repo, prNumber) {
16090
16171
  }
16091
16172
 
16092
16173
  // src/commands/prs/listComments/fetchReviewComments.ts
16093
- import { execSync as execSync40 } from "child_process";
16174
+ import { execSync as execSync42 } from "child_process";
16094
16175
  function fetchJson(endpoint) {
16095
- const result = execSync40(`gh api --paginate ${endpoint}`, {
16176
+ const result = execSync42(`gh api --paginate ${endpoint}`, {
16096
16177
  encoding: "utf8"
16097
16178
  });
16098
16179
  if (!result.trim()) return [];
@@ -16231,7 +16312,7 @@ async function listComments() {
16231
16312
  }
16232
16313
 
16233
16314
  // src/commands/prs/prs/index.ts
16234
- import { execSync as execSync41 } from "child_process";
16315
+ import { execSync as execSync43 } from "child_process";
16235
16316
 
16236
16317
  // src/commands/prs/prs/displayPaginated/index.ts
16237
16318
  import enquirer9 from "enquirer";
@@ -16338,7 +16419,7 @@ async function prs(options2) {
16338
16419
  const state = options2.open ? "open" : options2.closed ? "closed" : "all";
16339
16420
  try {
16340
16421
  const { org, repo } = getRepoInfo();
16341
- const result = execSync41(
16422
+ const result = execSync43(
16342
16423
  `gh pr list --state ${state} --json number,title,url,author,createdAt,mergedAt,closedAt,state,changedFiles --limit 100 -R ${org}/${repo}`,
16343
16424
  { encoding: "utf8" }
16344
16425
  );
@@ -16361,7 +16442,7 @@ async function prs(options2) {
16361
16442
  }
16362
16443
 
16363
16444
  // src/commands/prs/raise.ts
16364
- import { execSync as execSync43 } from "child_process";
16445
+ import { execSync as execSync45 } from "child_process";
16365
16446
 
16366
16447
  // src/commands/prs/buildCreateArgs.ts
16367
16448
  function buildCreateArgs(title, body, options2) {
@@ -16394,16 +16475,16 @@ function buildCreateArgs(title, body, options2) {
16394
16475
  }
16395
16476
 
16396
16477
  // src/commands/prs/readSessionPrRef.ts
16397
- import { execSync as execSync42 } from "child_process";
16478
+ import { execSync as execSync44 } from "child_process";
16398
16479
  function readSessionPrRef() {
16399
16480
  try {
16400
- const branch2 = execSync42("git rev-parse --abbrev-ref HEAD", {
16481
+ const branch2 = execSync44("git rev-parse --abbrev-ref HEAD", {
16401
16482
  encoding: "utf8",
16402
16483
  stdio: ["pipe", "pipe", "pipe"]
16403
16484
  }).trim();
16404
16485
  if (!branch2 || branch2 === "HEAD") return null;
16405
16486
  const pr = JSON.parse(
16406
- execSync42(`gh pr view ${branch2} --json number,title,url,state`, {
16487
+ execSync44(`gh pr view ${branch2} --json number,title,url,state`, {
16407
16488
  encoding: "utf8",
16408
16489
  stdio: ["pipe", "pipe", "pipe"]
16409
16490
  })
@@ -16447,7 +16528,7 @@ async function raise(options2) {
16447
16528
  `--body ${shellQuote(body)}`
16448
16529
  ] : buildCreateArgs(options2.title, body, options2);
16449
16530
  try {
16450
- execSync43(args.join(" "), { stdio: "inherit" });
16531
+ execSync45(args.join(" "), { stdio: "inherit" });
16451
16532
  } catch {
16452
16533
  process.exit(1);
16453
16534
  }
@@ -16485,7 +16566,7 @@ function reply(commentId, body) {
16485
16566
  }
16486
16567
 
16487
16568
  // src/commands/prs/wontfix.ts
16488
- import { execSync as execSync44 } from "child_process";
16569
+ import { execSync as execSync46 } from "child_process";
16489
16570
  function validateReason(reason) {
16490
16571
  const lowerReason = reason.toLowerCase();
16491
16572
  if (lowerReason.includes("claude") || lowerReason.includes("opus")) {
@@ -16502,7 +16583,7 @@ function validateShaReferences(reason) {
16502
16583
  const invalidShas = [];
16503
16584
  for (const sha of shas) {
16504
16585
  try {
16505
- execSync44(`git cat-file -t ${sha}`, { stdio: "pipe" });
16586
+ execSync46(`git cat-file -t ${sha}`, { stdio: "pipe" });
16506
16587
  } catch {
16507
16588
  invalidShas.push(sha);
16508
16589
  }
@@ -16679,10 +16760,10 @@ import chalk157 from "chalk";
16679
16760
  import Enquirer2 from "enquirer";
16680
16761
 
16681
16762
  // src/commands/ravendb/searchItems.ts
16682
- import { execSync as execSync45 } from "child_process";
16763
+ import { execSync as execSync47 } from "child_process";
16683
16764
  import chalk156 from "chalk";
16684
16765
  function opExec(args) {
16685
- return execSync45(`op ${args}`, {
16766
+ return execSync47(`op ${args}`, {
16686
16767
  encoding: "utf8",
16687
16768
  stdio: ["pipe", "pipe", "pipe"]
16688
16769
  }).trim();
@@ -16834,7 +16915,7 @@ ${errorText}`
16834
16915
  }
16835
16916
 
16836
16917
  // src/commands/ravendb/resolveOpSecret.ts
16837
- import { execSync as execSync46 } from "child_process";
16918
+ import { execSync as execSync48 } from "child_process";
16838
16919
  import chalk161 from "chalk";
16839
16920
  function resolveOpSecret(reference) {
16840
16921
  if (!reference.startsWith("op://")) {
@@ -16842,7 +16923,7 @@ function resolveOpSecret(reference) {
16842
16923
  process.exit(1);
16843
16924
  }
16844
16925
  try {
16845
- return execSync46(`op read "${reference}"`, {
16926
+ return execSync48(`op read "${reference}"`, {
16846
16927
  encoding: "utf8",
16847
16928
  stdio: ["pipe", "pipe", "pipe"]
16848
16929
  }).trim();
@@ -17106,7 +17187,7 @@ Refactor check failed:
17106
17187
  }
17107
17188
 
17108
17189
  // src/commands/refactor/check/getViolations/index.ts
17109
- import { execSync as execSync47 } from "child_process";
17190
+ import { execSync as execSync49 } from "child_process";
17110
17191
  import fs24 from "fs";
17111
17192
  import { minimatch as minimatch6 } from "minimatch";
17112
17193
 
@@ -17156,7 +17237,7 @@ function getGitFiles(options2) {
17156
17237
  }
17157
17238
  const files = /* @__PURE__ */ new Set();
17158
17239
  if (options2.staged || options2.modified) {
17159
- const staged = execSync47("git diff --cached --name-only", {
17240
+ const staged = execSync49("git diff --cached --name-only", {
17160
17241
  encoding: "utf8"
17161
17242
  });
17162
17243
  for (const file of staged.trim().split("\n").filter(Boolean)) {
@@ -17164,7 +17245,7 @@ function getGitFiles(options2) {
17164
17245
  }
17165
17246
  }
17166
17247
  if (options2.unstaged || options2.modified) {
17167
- const unstaged = execSync47("git diff --name-only", { encoding: "utf8" });
17248
+ const unstaged = execSync49("git diff --name-only", { encoding: "utf8" });
17168
17249
  for (const file of unstaged.trim().split("\n").filter(Boolean)) {
17169
17250
  files.add(file);
17170
17251
  }
@@ -18818,9 +18899,9 @@ function buildReviewPaths(repoRoot, key) {
18818
18899
  }
18819
18900
 
18820
18901
  // src/commands/review/fetchExistingComments.ts
18821
- import { execSync as execSync48 } from "child_process";
18902
+ import { execSync as execSync50 } from "child_process";
18822
18903
  function fetchRawComments(org, repo, prNumber) {
18823
- const out = execSync48(
18904
+ const out = execSync50(
18824
18905
  `gh api --paginate repos/${org}/${repo}/pulls/${prNumber}/comments`,
18825
18906
  { encoding: "utf8", maxBuffer: 64 * 1024 * 1024 }
18826
18907
  );
@@ -18851,14 +18932,14 @@ function fetchExistingComments() {
18851
18932
  }
18852
18933
 
18853
18934
  // src/commands/review/gatherContext.ts
18854
- import { execSync as execSync51 } from "child_process";
18935
+ import { execSync as execSync53 } from "child_process";
18855
18936
 
18856
18937
  // src/commands/review/fetchPrDiff.ts
18857
- import { execSync as execSync49 } from "child_process";
18938
+ import { execSync as execSync51 } from "child_process";
18858
18939
  function fetchPrDiff(prNumber, baseSha, headSha) {
18859
18940
  const { org, repo } = getRepoInfo();
18860
18941
  try {
18861
- return execSync49(`gh pr diff ${prNumber} -R ${org}/${repo}`, {
18942
+ return execSync51(`gh pr diff ${prNumber} -R ${org}/${repo}`, {
18862
18943
  encoding: "utf8",
18863
18944
  maxBuffer: 256 * 1024 * 1024,
18864
18945
  stdio: ["ignore", "pipe", "pipe"]
@@ -18873,19 +18954,19 @@ function isDiffTooLarge(error) {
18873
18954
  }
18874
18955
  function fetchDiffViaGit(baseSha, headSha) {
18875
18956
  try {
18876
- execSync49(`git fetch origin ${baseSha} ${headSha}`, { stdio: "ignore" });
18957
+ execSync51(`git fetch origin ${baseSha} ${headSha}`, { stdio: "ignore" });
18877
18958
  } catch {
18878
18959
  }
18879
- return execSync49(`git diff ${baseSha}...${headSha}`, {
18960
+ return execSync51(`git diff ${baseSha}...${headSha}`, {
18880
18961
  encoding: "utf8",
18881
18962
  maxBuffer: 256 * 1024 * 1024
18882
18963
  });
18883
18964
  }
18884
18965
 
18885
18966
  // src/commands/review/fetchPrDiffInfo.ts
18886
- import { execSync as execSync50 } from "child_process";
18967
+ import { execSync as execSync52 } from "child_process";
18887
18968
  function getCurrentBranch3() {
18888
- return execSync50("git rev-parse --abbrev-ref HEAD", {
18969
+ return execSync52("git rev-parse --abbrev-ref HEAD", {
18889
18970
  encoding: "utf8"
18890
18971
  }).trim();
18891
18972
  }
@@ -18893,7 +18974,7 @@ function fetchPrDiffInfo() {
18893
18974
  const { org, repo } = getRepoInfo();
18894
18975
  const branch2 = getCurrentBranch3();
18895
18976
  const fields = "number,baseRefName,baseRefOid,headRefName,headRefOid";
18896
- const raw = execSync50(
18977
+ const raw = execSync52(
18897
18978
  `gh pr list --state open --head ${branch2} --json ${fields} -R ${org}/${repo}`,
18898
18979
  {
18899
18980
  encoding: "utf8",
@@ -18918,7 +18999,7 @@ function fetchPrDiffInfo() {
18918
18999
  }
18919
19000
  function fetchPrChangedFiles(prNumber) {
18920
19001
  const { org, repo } = getRepoInfo();
18921
- const out = execSync50(
19002
+ const out = execSync52(
18922
19003
  `gh api repos/${org}/${repo}/pulls/${prNumber}/files --paginate --jq ".[].filename"`,
18923
19004
  {
18924
19005
  encoding: "utf8",
@@ -18930,11 +19011,11 @@ function fetchPrChangedFiles(prNumber) {
18930
19011
 
18931
19012
  // src/commands/review/gatherContext.ts
18932
19013
  function gatherContext() {
18933
- const branch2 = execSync51("git rev-parse --abbrev-ref HEAD", {
19014
+ const branch2 = execSync53("git rev-parse --abbrev-ref HEAD", {
18934
19015
  encoding: "utf8"
18935
19016
  }).trim();
18936
- const sha = execSync51("git rev-parse HEAD", { encoding: "utf8" }).trim();
18937
- const shortSha = execSync51("git rev-parse --short=7 HEAD", {
19017
+ const sha = execSync53("git rev-parse HEAD", { encoding: "utf8" }).trim();
19018
+ const shortSha = execSync53("git rev-parse --short=7 HEAD", {
18938
19019
  encoding: "utf8"
18939
19020
  }).trim();
18940
19021
  const prInfo = fetchPrDiffInfo();
@@ -21579,7 +21660,7 @@ import { mkdirSync as mkdirSync20 } from "fs";
21579
21660
  import { join as join57 } from "path";
21580
21661
 
21581
21662
  // src/commands/voice/checkLockFile.ts
21582
- import { execSync as execSync52 } from "child_process";
21663
+ import { execSync as execSync54 } from "child_process";
21583
21664
  import { existsSync as existsSync47, mkdirSync as mkdirSync19, readFileSync as readFileSync41, writeFileSync as writeFileSync37 } from "fs";
21584
21665
  import { join as join56 } from "path";
21585
21666
  function isProcessAlive2(pid) {
@@ -21608,7 +21689,7 @@ function bootstrapVenv() {
21608
21689
  if (existsSync47(getVenvPython())) return;
21609
21690
  console.log("Setting up Python environment...");
21610
21691
  const pythonDir = getPythonDir();
21611
- execSync52(
21692
+ execSync54(
21612
21693
  `uv sync --project "${pythonDir}" --extra runtime --no-install-project`,
21613
21694
  {
21614
21695
  stdio: "inherit",
@@ -22204,11 +22285,11 @@ function resolveParams(params, cliArgs) {
22204
22285
  }
22205
22286
 
22206
22287
  // src/commands/run/runPreCommands.ts
22207
- import { execSync as execSync53 } from "child_process";
22288
+ import { execSync as execSync55 } from "child_process";
22208
22289
  function runPreCommands(pre, cwd) {
22209
22290
  for (const cmd of pre) {
22210
22291
  try {
22211
- execSync53(cmd, { stdio: "inherit", cwd });
22292
+ execSync55(cmd, { stdio: "inherit", cwd });
22212
22293
  } catch (error) {
22213
22294
  const code = error && typeof error === "object" && "status" in error ? error.status : 1;
22214
22295
  process.exit(code);
@@ -22509,7 +22590,7 @@ function registerRun(program2) {
22509
22590
  }
22510
22591
 
22511
22592
  // src/commands/screenshot/index.ts
22512
- import { execSync as execSync54 } from "child_process";
22593
+ import { execSync as execSync56 } from "child_process";
22513
22594
  import { existsSync as existsSync52, mkdirSync as mkdirSync23, unlinkSync as unlinkSync19, writeFileSync as writeFileSync40 } from "fs";
22514
22595
  import { tmpdir as tmpdir7 } from "os";
22515
22596
  import { join as join63, resolve as resolve15 } from "path";
@@ -22652,7 +22733,7 @@ function runPowerShellScript(processName, outputPath) {
22652
22733
  const scriptPath = join63(tmpdir7(), `assist-screenshot-${Date.now()}.ps1`);
22653
22734
  writeFileSync40(scriptPath, captureWindowPs1, "utf8");
22654
22735
  try {
22655
- execSync54(
22736
+ execSync56(
22656
22737
  `powershell -NoProfile -ExecutionPolicy Bypass -File "${scriptPath}" -ProcessName "${processName}" -OutputPath "${outputPath}"`,
22657
22738
  { stdio: ["ignore", "pipe", "pipe"], encoding: "utf8" }
22658
22739
  );
@@ -25830,7 +25911,7 @@ function syncCommands(claudeDir, targetBase) {
25830
25911
  }
25831
25912
 
25832
25913
  // src/commands/update.ts
25833
- import { execSync as execSync55 } from "child_process";
25914
+ import { execSync as execSync57 } from "child_process";
25834
25915
  import * as path59 from "path";
25835
25916
 
25836
25917
  // src/commands/restartDaemonAfterUpdate.ts
@@ -25854,7 +25935,7 @@ function isGlobalNpmInstall(dir) {
25854
25935
  if (resolved.split(path59.sep).includes("node_modules")) {
25855
25936
  return true;
25856
25937
  }
25857
- const globalPrefix = execSync55("npm prefix -g", { stdio: "pipe" }).toString().trim();
25938
+ const globalPrefix = execSync57("npm prefix -g", { stdio: "pipe" }).toString().trim();
25858
25939
  return resolved.toLowerCase().startsWith(path59.resolve(globalPrefix).toLowerCase());
25859
25940
  } catch {
25860
25941
  return false;
@@ -25865,18 +25946,18 @@ async function update2() {
25865
25946
  console.log(`Assist is installed at: ${installDir}`);
25866
25947
  if (isGitRepo(installDir)) {
25867
25948
  console.log("Detected git repo installation, pulling latest...");
25868
- execSync55("git pull", { cwd: installDir, stdio: "inherit" });
25949
+ execSync57("git pull", { cwd: installDir, stdio: "inherit" });
25869
25950
  console.log("Installing dependencies...");
25870
- execSync55("npm i", { cwd: installDir, stdio: "inherit" });
25951
+ execSync57("npm i", { cwd: installDir, stdio: "inherit" });
25871
25952
  console.log("Building...");
25872
- execSync55("npm run build", { cwd: installDir, stdio: "inherit" });
25953
+ execSync57("npm run build", { cwd: installDir, stdio: "inherit" });
25873
25954
  console.log("Syncing commands...");
25874
- execSync55("assist sync", { stdio: "inherit" });
25955
+ execSync57("assist sync", { stdio: "inherit" });
25875
25956
  } else if (isGlobalNpmInstall(installDir)) {
25876
25957
  console.log("Detected global npm installation, updating...");
25877
- execSync55("npm i -g @staff0rd/assist@latest", { stdio: "inherit" });
25958
+ execSync57("npm i -g @staff0rd/assist@latest", { stdio: "inherit" });
25878
25959
  console.log("Syncing commands...");
25879
- execSync55("assist sync", { stdio: "inherit" });
25960
+ execSync57("assist sync", { stdio: "inherit" });
25880
25961
  } else {
25881
25962
  console.error(
25882
25963
  "Could not determine installation method. Expected a git repo or global npm install."