@staff0rd/assist 0.205.0 → 0.206.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 (3) hide show
  1. package/README.md +1 -1
  2. package/dist/index.js +84 -83
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -117,7 +117,7 @@ After installation, the `assist` command will be available globally. You can als
117
117
  - `assist config list` - List all config values
118
118
  - `assist verify` - Run all verify:* commands in parallel (from run configs in assist.yml and scripts in package.json)
119
119
  - `assist verify all` - Run all checks, ignoring diff-based filters
120
- - `assist verify init` - Add verify scripts to a project
120
+ - `assist verify init` - Add verify scripts to a project (writes to `assist.yml` by default; pass `--package-json` to write to `package.json` scripts instead)
121
121
  - `assist verify hardcoded-colors` - Check for hardcoded hex colors in src/ (supports `hardcodedColors.ignore` globs in config)
122
122
  - `assist lint [-f, --fix]` - Run lint checks for conventions not enforced by biomejs (use `-f` to auto-fix)
123
123
  - `assist lint init` - Initialize Biome with standard linter config
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.205.0",
9
+ version: "0.206.0",
10
10
  type: "module",
11
11
  main: "dist/index.js",
12
12
  bin: {
@@ -3192,10 +3192,7 @@ function detectExistingSetup(pkg) {
3192
3192
  ...buildToolStatuses(pkg, configScriptNames),
3193
3193
  hasVite: hasDep(pkg, "vite"),
3194
3194
  hasTypescript: !!pkg.devDependencies?.typescript,
3195
- hasOpenColor: hasDep(pkg, "open-color"),
3196
- hasConfigScripts: [...configScriptNames].some(
3197
- (n) => n.startsWith("verify:")
3198
- )
3195
+ hasOpenColor: hasDep(pkg, "open-color")
3199
3196
  };
3200
3197
  }
3201
3198
 
@@ -3326,12 +3323,12 @@ async function promptForScripts(availableOptions) {
3326
3323
  }
3327
3324
  return selected;
3328
3325
  }
3329
- async function init2() {
3326
+ async function init2(options2 = {}) {
3330
3327
  const { packageJsonPath, pkg } = requirePackageJson();
3331
3328
  const setup2 = detectExistingSetup(pkg);
3332
3329
  const selected = await promptForScripts(getAvailableOptions(setup2));
3333
3330
  if (!selected) return;
3334
- const writer = setup2.hasConfigScripts ? setupVerifyRunEntry : (name, cmd) => setupVerifyScript(packageJsonPath, name, cmd);
3331
+ const writer = options2.packageJson ? (name, cmd) => setupVerifyScript(packageJsonPath, name, cmd) : setupVerifyRunEntry;
3335
3332
  const handlers2 = getSetupHandlers(
3336
3333
  setup2.hasVite,
3337
3334
  setup2.hasTypescript,
@@ -7064,7 +7061,7 @@ function registerDeploy(program2) {
7064
7061
  }
7065
7062
 
7066
7063
  // src/commands/devlog/list/index.ts
7067
- import { execSync as execSync19 } from "child_process";
7064
+ import { execFileSync } from "child_process";
7068
7065
  import { basename as basename6 } from "path";
7069
7066
 
7070
7067
  // src/commands/devlog/loadBlogSkipDays.ts
@@ -7240,12 +7237,11 @@ function list3(options2) {
7240
7237
  const repoName = basename6(process.cwd());
7241
7238
  const skipDays = loadBlogSkipDays(repoName);
7242
7239
  const devlogEntries = loadDevlogEntries(repoName);
7243
- const reverseFlag = options2.reverse ? "--reverse " : "";
7244
- const limitFlag = options2.reverse ? "" : "-n 500 ";
7245
- const output = execSync19(
7246
- `git log ${reverseFlag}${limitFlag}--pretty=format:'%ad|%h|%s' --date=short`,
7247
- { encoding: "utf-8" }
7248
- );
7240
+ const args = ["log"];
7241
+ if (options2.reverse) args.push("--reverse");
7242
+ else args.push("-n", "500");
7243
+ args.push("--pretty=format:%ad|%h|%s", "--date=short");
7244
+ const output = execFileSync("git", args, { encoding: "utf-8" });
7249
7245
  const commitsByDate = parseGitLogCommits(output, ignore2);
7250
7246
  let dateCount = 0;
7251
7247
  let isFirst = true;
@@ -7268,11 +7264,11 @@ function list3(options2) {
7268
7264
  }
7269
7265
 
7270
7266
  // src/commands/devlog/getLastVersionInfo.ts
7271
- import { execSync as execSync20 } from "child_process";
7267
+ import { execFileSync as execFileSync2, execSync as execSync19 } from "child_process";
7272
7268
  import semver from "semver";
7273
7269
  function getVersionAtCommit(hash) {
7274
7270
  try {
7275
- const content = execSync20(`git show ${hash}:package.json`, {
7271
+ const content = execSync19(`git show ${hash}:package.json`, {
7276
7272
  encoding: "utf-8"
7277
7273
  });
7278
7274
  const pkg = JSON.parse(content);
@@ -7287,8 +7283,9 @@ function stripToMinor(version2) {
7287
7283
  }
7288
7284
  function getLastVersionInfoFromGit() {
7289
7285
  try {
7290
- const output = execSync20(
7291
- "git log -1 --pretty=format:'%ad|%h' --date=short",
7286
+ const output = execFileSync2(
7287
+ "git",
7288
+ ["log", "-1", "--pretty=format:%ad|%h", "--date=short"],
7292
7289
  {
7293
7290
  encoding: "utf-8"
7294
7291
  }
@@ -7331,7 +7328,7 @@ function bumpVersion(version2, type) {
7331
7328
  }
7332
7329
 
7333
7330
  // src/commands/devlog/next/displayNextEntry/index.ts
7334
- import { execSync as execSync21 } from "child_process";
7331
+ import { execFileSync as execFileSync3 } from "child_process";
7335
7332
  import chalk80 from "chalk";
7336
7333
 
7337
7334
  // src/commands/devlog/next/displayNextEntry/displayVersion.ts
@@ -7365,8 +7362,9 @@ function findTargetDate(commitsByDate, skipDays) {
7365
7362
  return Array.from(commitsByDate.keys()).filter((d) => !skipDays.has(d)).sort()[0];
7366
7363
  }
7367
7364
  function fetchCommitsByDate(ignore2, lastDate) {
7368
- const output = execSync21(
7369
- "git log --pretty=format:'%ad|%h|%s' --date=short -n 500",
7365
+ const output = execFileSync3(
7366
+ "git",
7367
+ ["log", "--pretty=format:%ad|%h|%s", "--date=short", "-n", "500"],
7370
7368
  { encoding: "utf-8" }
7371
7369
  );
7372
7370
  return parseGitLogCommits(output, ignore2, lastDate);
@@ -7443,7 +7441,7 @@ function next2(options2) {
7443
7441
  }
7444
7442
 
7445
7443
  // src/commands/devlog/repos/index.ts
7446
- import { execSync as execSync22 } from "child_process";
7444
+ import { execSync as execSync20 } from "child_process";
7447
7445
 
7448
7446
  // src/commands/devlog/repos/printReposTable.ts
7449
7447
  import chalk81 from "chalk";
@@ -7478,7 +7476,7 @@ function getStatus(lastPush, lastDevlog) {
7478
7476
  return lastDevlog < lastPush ? "outdated" : "ok";
7479
7477
  }
7480
7478
  function fetchRepos(days, all) {
7481
- const json = execSync22(
7479
+ const json = execSync20(
7482
7480
  "gh repo list staff0rd --json name,pushedAt,isArchived --limit 200",
7483
7481
  { encoding: "utf-8" }
7484
7482
  );
@@ -7838,7 +7836,7 @@ async function deps(csprojPath, options2) {
7838
7836
  }
7839
7837
 
7840
7838
  // src/commands/dotnet/getChangedCsFiles.ts
7841
- import { execSync as execSync23 } from "child_process";
7839
+ import { execSync as execSync21 } from "child_process";
7842
7840
  var SCOPE_ALL = "all";
7843
7841
  var SCOPE_BASE = "base:";
7844
7842
  var SCOPE_COMMIT = "commit:";
@@ -7862,7 +7860,7 @@ function getChangedCsFiles(scope) {
7862
7860
  } else {
7863
7861
  cmd = "git diff --name-only HEAD";
7864
7862
  }
7865
- const output = execSync23(cmd, { encoding: "utf-8" }).trim();
7863
+ const output = execSync21(cmd, { encoding: "utf-8" }).trim();
7866
7864
  if (output === "") return [];
7867
7865
  return output.split("\n").filter((f) => f.toLowerCase().endsWith(".cs"));
7868
7866
  }
@@ -8060,14 +8058,14 @@ function parseInspectReport(json) {
8060
8058
  }
8061
8059
 
8062
8060
  // src/commands/dotnet/runInspectCode.ts
8063
- import { execSync as execSync24 } from "child_process";
8061
+ import { execSync as execSync22 } from "child_process";
8064
8062
  import { existsSync as existsSync28, readFileSync as readFileSync25, unlinkSync as unlinkSync5 } from "fs";
8065
8063
  import { tmpdir as tmpdir2 } from "os";
8066
8064
  import path29 from "path";
8067
8065
  import chalk91 from "chalk";
8068
8066
  function assertJbInstalled() {
8069
8067
  try {
8070
- execSync24("jb inspectcode --version", { stdio: "pipe" });
8068
+ execSync22("jb inspectcode --version", { stdio: "pipe" });
8071
8069
  } catch {
8072
8070
  console.error(chalk91.red("jb is not installed. Install with:"));
8073
8071
  console.error(
@@ -8081,7 +8079,7 @@ function runInspectCode(slnPath, include, swea) {
8081
8079
  const includeFlag = include ? ` --include="${include}"` : "";
8082
8080
  const sweaFlag = swea ? " --swea" : "";
8083
8081
  try {
8084
- execSync24(
8082
+ execSync22(
8085
8083
  `jb inspectcode "${slnPath}" -o="${reportPath}"${includeFlag}${sweaFlag} --verbosity=OFF`,
8086
8084
  { stdio: "pipe" }
8087
8085
  );
@@ -8102,7 +8100,7 @@ function runInspectCode(slnPath, include, swea) {
8102
8100
  }
8103
8101
 
8104
8102
  // src/commands/dotnet/runRoslynInspect.ts
8105
- import { execSync as execSync25 } from "child_process";
8103
+ import { execSync as execSync23 } from "child_process";
8106
8104
  import chalk92 from "chalk";
8107
8105
  function resolveMsbuildPath() {
8108
8106
  const { run: run4 } = loadConfig();
@@ -8113,7 +8111,7 @@ function resolveMsbuildPath() {
8113
8111
  function assertMsbuildInstalled() {
8114
8112
  const msbuild = resolveMsbuildPath();
8115
8113
  try {
8116
- execSync25(`"${msbuild}" -version`, { stdio: "pipe" });
8114
+ execSync23(`"${msbuild}" -version`, { stdio: "pipe" });
8117
8115
  } catch {
8118
8116
  console.error(chalk92.red(`msbuild not found at: ${msbuild}`));
8119
8117
  console.error(
@@ -8139,7 +8137,7 @@ function runRoslynInspect(slnPath) {
8139
8137
  const msbuild = resolveMsbuildPath();
8140
8138
  let output;
8141
8139
  try {
8142
- output = execSync25(
8140
+ output = execSync23(
8143
8141
  `"${msbuild}" "${slnPath}" -t:Build -v:minimal -maxcpucount -p:EnforceCodeStyleInBuild=true -p:RunAnalyzersDuringBuild=true 2>&1`,
8144
8142
  { encoding: "utf-8", stdio: "pipe", maxBuffer: 50 * 1024 * 1024 }
8145
8143
  );
@@ -8271,12 +8269,12 @@ function adfToText(doc) {
8271
8269
  }
8272
8270
 
8273
8271
  // src/commands/jira/fetchIssue.ts
8274
- import { execSync as execSync26 } from "child_process";
8272
+ import { execSync as execSync24 } from "child_process";
8275
8273
  import chalk94 from "chalk";
8276
8274
  function fetchIssue(issueKey, fields) {
8277
8275
  let result;
8278
8276
  try {
8279
- result = execSync26(
8277
+ result = execSync24(
8280
8278
  `acli jira workitem view ${issueKey} -f ${fields} --json`,
8281
8279
  { encoding: "utf-8", stdio: ["pipe", "pipe", "pipe"] }
8282
8280
  );
@@ -8322,7 +8320,7 @@ function acceptanceCriteria(issueKey) {
8322
8320
  }
8323
8321
 
8324
8322
  // src/commands/jira/jiraAuth.ts
8325
- import { execSync as execSync27 } from "child_process";
8323
+ import { execSync as execSync25 } from "child_process";
8326
8324
 
8327
8325
  // src/shared/loadJson.ts
8328
8326
  import { existsSync as existsSync29, mkdirSync as mkdirSync7, readFileSync as readFileSync26, writeFileSync as writeFileSync20 } from "fs";
@@ -8386,7 +8384,7 @@ async function jiraAuth() {
8386
8384
  console.error("All fields are required.");
8387
8385
  process.exit(1);
8388
8386
  }
8389
- execSync27(`acli jira auth login --site ${site} --email "${email}" --token`, {
8387
+ execSync25(`acli jira auth login --site ${site} --email "${email}" --token`, {
8390
8388
  encoding: "utf-8",
8391
8389
  input: token,
8392
8390
  stdio: ["pipe", "inherit", "inherit"]
@@ -8721,7 +8719,7 @@ import { tmpdir as tmpdir3 } from "os";
8721
8719
  import { join as join29 } from "path";
8722
8720
 
8723
8721
  // src/commands/prs/shared.ts
8724
- import { execSync as execSync28 } from "child_process";
8722
+ import { execSync as execSync26 } from "child_process";
8725
8723
  function isGhNotInstalled(error) {
8726
8724
  if (error instanceof Error) {
8727
8725
  const msg = error.message.toLowerCase();
@@ -8737,14 +8735,14 @@ function isNotFound(error) {
8737
8735
  }
8738
8736
  function getRepoInfo() {
8739
8737
  const repoInfo = JSON.parse(
8740
- execSync28("gh repo view --json owner,name", { encoding: "utf-8" })
8738
+ execSync26("gh repo view --json owner,name", { encoding: "utf-8" })
8741
8739
  );
8742
8740
  return { org: repoInfo.owner.login, repo: repoInfo.name };
8743
8741
  }
8744
8742
  function getCurrentPrNumber() {
8745
8743
  try {
8746
8744
  const prInfo = JSON.parse(
8747
- execSync28("gh pr view --json number", { encoding: "utf-8" })
8745
+ execSync26("gh pr view --json number", { encoding: "utf-8" })
8748
8746
  );
8749
8747
  return prInfo.number;
8750
8748
  } catch (error) {
@@ -8758,7 +8756,7 @@ function getCurrentPrNumber() {
8758
8756
  function getCurrentPrNodeId() {
8759
8757
  try {
8760
8758
  const prInfo = JSON.parse(
8761
- execSync28("gh pr view --json id", { encoding: "utf-8" })
8759
+ execSync26("gh pr view --json id", { encoding: "utf-8" })
8762
8760
  );
8763
8761
  return prInfo.id;
8764
8762
  } catch (error) {
@@ -8829,10 +8827,10 @@ function comment2(path53, line, body) {
8829
8827
  }
8830
8828
 
8831
8829
  // src/commands/prs/fixed.ts
8832
- import { execSync as execSync30 } from "child_process";
8830
+ import { execSync as execSync28 } from "child_process";
8833
8831
 
8834
8832
  // src/commands/prs/resolveCommentWithReply.ts
8835
- import { execSync as execSync29 } from "child_process";
8833
+ import { execSync as execSync27 } from "child_process";
8836
8834
  import { unlinkSync as unlinkSync8, writeFileSync as writeFileSync22 } from "fs";
8837
8835
  import { tmpdir as tmpdir4 } from "os";
8838
8836
  import { join as join31 } from "path";
@@ -8862,7 +8860,7 @@ function deleteCommentsCache(prNumber) {
8862
8860
 
8863
8861
  // src/commands/prs/resolveCommentWithReply.ts
8864
8862
  function replyToComment(org, repo, prNumber, commentId, message) {
8865
- execSync29(
8863
+ execSync27(
8866
8864
  `gh api repos/${org}/${repo}/pulls/${prNumber}/comments -f body="${message.replace(/"/g, '\\"')}" -F in_reply_to=${commentId}`,
8867
8865
  { stdio: ["inherit", "pipe", "inherit"] }
8868
8866
  );
@@ -8872,7 +8870,7 @@ function resolveThread(threadId) {
8872
8870
  const queryFile = join31(tmpdir4(), `gh-mutation-${Date.now()}.graphql`);
8873
8871
  writeFileSync22(queryFile, mutation);
8874
8872
  try {
8875
- execSync29(
8873
+ execSync27(
8876
8874
  `gh api graphql -F query=@${queryFile} -f threadId="${threadId}"`,
8877
8875
  { stdio: ["inherit", "pipe", "inherit"] }
8878
8876
  );
@@ -8924,7 +8922,7 @@ function resolveCommentWithReply(commentId, message) {
8924
8922
  // src/commands/prs/fixed.ts
8925
8923
  function verifySha(sha) {
8926
8924
  try {
8927
- return execSync30(`git rev-parse --verify ${sha}`, {
8925
+ return execSync28(`git rev-parse --verify ${sha}`, {
8928
8926
  encoding: "utf-8"
8929
8927
  }).trim();
8930
8928
  } catch {
@@ -8938,7 +8936,7 @@ function fixed(commentId, sha) {
8938
8936
  const { org, repo } = getRepoInfo();
8939
8937
  const repoUrl = `https://github.com/${org}/${repo}`;
8940
8938
  const message = `Fixed in [${fullSha}](${repoUrl}/commit/${fullSha})`;
8941
- execSync30("git push", { stdio: "inherit" });
8939
+ execSync28("git push", { stdio: "inherit" });
8942
8940
  resolveCommentWithReply(commentId, message);
8943
8941
  } catch (error) {
8944
8942
  if (isGhNotInstalled(error)) {
@@ -8956,7 +8954,7 @@ import { join as join33 } from "path";
8956
8954
  import { stringify } from "yaml";
8957
8955
 
8958
8956
  // src/commands/prs/fetchThreadIds.ts
8959
- import { execSync as execSync31 } from "child_process";
8957
+ import { execSync as execSync29 } from "child_process";
8960
8958
  import { unlinkSync as unlinkSync9, writeFileSync as writeFileSync23 } from "fs";
8961
8959
  import { tmpdir as tmpdir5 } from "os";
8962
8960
  import { join as join32 } from "path";
@@ -8965,7 +8963,7 @@ function fetchThreadIds(org, repo, prNumber) {
8965
8963
  const queryFile = join32(tmpdir5(), `gh-query-${Date.now()}.graphql`);
8966
8964
  writeFileSync23(queryFile, THREAD_QUERY);
8967
8965
  try {
8968
- const result = execSync31(
8966
+ const result = execSync29(
8969
8967
  `gh api graphql -F query=@${queryFile} -F owner="${org}" -F repo="${repo}" -F prNumber=${prNumber}`,
8970
8968
  { encoding: "utf-8" }
8971
8969
  );
@@ -8987,9 +8985,9 @@ function fetchThreadIds(org, repo, prNumber) {
8987
8985
  }
8988
8986
 
8989
8987
  // src/commands/prs/listComments/fetchReviewComments.ts
8990
- import { execSync as execSync32 } from "child_process";
8988
+ import { execSync as execSync30 } from "child_process";
8991
8989
  function fetchJson(endpoint) {
8992
- const result = execSync32(`gh api --paginate ${endpoint}`, {
8990
+ const result = execSync30(`gh api --paginate ${endpoint}`, {
8993
8991
  encoding: "utf-8"
8994
8992
  });
8995
8993
  if (!result.trim()) return [];
@@ -9128,7 +9126,7 @@ async function listComments() {
9128
9126
  }
9129
9127
 
9130
9128
  // src/commands/prs/prs/index.ts
9131
- import { execSync as execSync33 } from "child_process";
9129
+ import { execSync as execSync31 } from "child_process";
9132
9130
 
9133
9131
  // src/commands/prs/prs/displayPaginated/index.ts
9134
9132
  import enquirer9 from "enquirer";
@@ -9234,7 +9232,7 @@ async function displayPaginated(pullRequests) {
9234
9232
  async function prs(options2) {
9235
9233
  const state = options2.open ? "open" : options2.closed ? "closed" : "all";
9236
9234
  try {
9237
- const result = execSync33(
9235
+ const result = execSync31(
9238
9236
  `gh pr list --state ${state} --json number,title,url,author,createdAt,mergedAt,closedAt,state,changedFiles --limit 100`,
9239
9237
  { encoding: "utf-8" }
9240
9238
  );
@@ -9257,7 +9255,7 @@ async function prs(options2) {
9257
9255
  }
9258
9256
 
9259
9257
  // src/commands/prs/wontfix.ts
9260
- import { execSync as execSync34 } from "child_process";
9258
+ import { execSync as execSync32 } from "child_process";
9261
9259
  function validateReason(reason) {
9262
9260
  const lowerReason = reason.toLowerCase();
9263
9261
  if (lowerReason.includes("claude") || lowerReason.includes("opus")) {
@@ -9274,7 +9272,7 @@ function validateShaReferences(reason) {
9274
9272
  const invalidShas = [];
9275
9273
  for (const sha of shas) {
9276
9274
  try {
9277
- execSync34(`git cat-file -t ${sha}`, { stdio: "pipe" });
9275
+ execSync32(`git cat-file -t ${sha}`, { stdio: "pipe" });
9278
9276
  } catch {
9279
9277
  invalidShas.push(sha);
9280
9278
  }
@@ -9388,10 +9386,10 @@ import chalk104 from "chalk";
9388
9386
  import Enquirer2 from "enquirer";
9389
9387
 
9390
9388
  // src/commands/ravendb/searchItems.ts
9391
- import { execSync as execSync35 } from "child_process";
9389
+ import { execSync as execSync33 } from "child_process";
9392
9390
  import chalk103 from "chalk";
9393
9391
  function opExec(args) {
9394
- return execSync35(`op ${args}`, {
9392
+ return execSync33(`op ${args}`, {
9395
9393
  encoding: "utf-8",
9396
9394
  stdio: ["pipe", "pipe", "pipe"]
9397
9395
  }).trim();
@@ -9543,7 +9541,7 @@ ${errorText}`
9543
9541
  }
9544
9542
 
9545
9543
  // src/commands/ravendb/resolveOpSecret.ts
9546
- import { execSync as execSync36 } from "child_process";
9544
+ import { execSync as execSync34 } from "child_process";
9547
9545
  import chalk108 from "chalk";
9548
9546
  function resolveOpSecret(reference) {
9549
9547
  if (!reference.startsWith("op://")) {
@@ -9551,7 +9549,7 @@ function resolveOpSecret(reference) {
9551
9549
  process.exit(1);
9552
9550
  }
9553
9551
  try {
9554
- return execSync36(`op read "${reference}"`, {
9552
+ return execSync34(`op read "${reference}"`, {
9555
9553
  encoding: "utf-8",
9556
9554
  stdio: ["pipe", "pipe", "pipe"]
9557
9555
  }).trim();
@@ -9800,7 +9798,7 @@ Refactor check failed:
9800
9798
  }
9801
9799
 
9802
9800
  // src/commands/refactor/check/getViolations/index.ts
9803
- import { execSync as execSync37 } from "child_process";
9801
+ import { execSync as execSync35 } from "child_process";
9804
9802
  import fs18 from "fs";
9805
9803
  import { minimatch as minimatch4 } from "minimatch";
9806
9804
 
@@ -9850,7 +9848,7 @@ function getGitFiles(options2) {
9850
9848
  }
9851
9849
  const files = /* @__PURE__ */ new Set();
9852
9850
  if (options2.staged || options2.modified) {
9853
- const staged = execSync37("git diff --cached --name-only", {
9851
+ const staged = execSync35("git diff --cached --name-only", {
9854
9852
  encoding: "utf-8"
9855
9853
  });
9856
9854
  for (const file of staged.trim().split("\n").filter(Boolean)) {
@@ -9858,7 +9856,7 @@ function getGitFiles(options2) {
9858
9856
  }
9859
9857
  }
9860
9858
  if (options2.unstaged || options2.modified) {
9861
- const unstaged = execSync37("git diff --name-only", { encoding: "utf-8" });
9859
+ const unstaged = execSync35("git diff --name-only", { encoding: "utf-8" });
9862
9860
  for (const file of unstaged.trim().split("\n").filter(Boolean)) {
9863
9861
  files.add(file);
9864
9862
  }
@@ -12209,7 +12207,10 @@ function registerVerify(program2) {
12209
12207
  run2({ ...options2, all: scope === "all" });
12210
12208
  });
12211
12209
  verifyCommand.command("list").description("List configured verify commands").action(list);
12212
- verifyCommand.command("init").description("Add verify scripts to a project").action(init2);
12210
+ verifyCommand.command("init").description("Add verify scripts to a project").option(
12211
+ "--package-json",
12212
+ "Write scripts to package.json instead of assist.yml"
12213
+ ).action(init2);
12213
12214
  verifyCommand.command("hardcoded-colors").description("Check for hardcoded hex colors in src/").action(hardcodedColors);
12214
12215
  verifyCommand.command("no-venv").description("Check that no venv folders exist in the repo").action(noVenv);
12215
12216
  }
@@ -12285,7 +12286,7 @@ import { mkdirSync as mkdirSync12 } from "fs";
12285
12286
  import { join as join43 } from "path";
12286
12287
 
12287
12288
  // src/commands/voice/checkLockFile.ts
12288
- import { execSync as execSync38 } from "child_process";
12289
+ import { execSync as execSync36 } from "child_process";
12289
12290
  import { existsSync as existsSync38, mkdirSync as mkdirSync11, readFileSync as readFileSync31, writeFileSync as writeFileSync26 } from "fs";
12290
12291
  import { join as join42 } from "path";
12291
12292
  function isProcessAlive2(pid) {
@@ -12314,7 +12315,7 @@ function bootstrapVenv() {
12314
12315
  if (existsSync38(getVenvPython())) return;
12315
12316
  console.log("Setting up Python environment...");
12316
12317
  const pythonDir = getPythonDir();
12317
- execSync38(
12318
+ execSync36(
12318
12319
  `uv sync --project "${pythonDir}" --extra runtime --no-install-project`,
12319
12320
  {
12320
12321
  stdio: "inherit",
@@ -12481,11 +12482,11 @@ import { randomBytes } from "crypto";
12481
12482
  import chalk132 from "chalk";
12482
12483
 
12483
12484
  // src/lib/openBrowser.ts
12484
- import { execSync as execSync39 } from "child_process";
12485
+ import { execSync as execSync37 } from "child_process";
12485
12486
  function tryExec(commands) {
12486
12487
  for (const cmd of commands) {
12487
12488
  try {
12488
- execSync39(cmd);
12489
+ execSync37(cmd);
12489
12490
  return true;
12490
12491
  } catch {
12491
12492
  }
@@ -12680,7 +12681,7 @@ async function auth() {
12680
12681
  }
12681
12682
 
12682
12683
  // src/commands/roam/postRoamActivity.ts
12683
- import { execFileSync } from "child_process";
12684
+ import { execFileSync as execFileSync4 } from "child_process";
12684
12685
  import { readFileSync as readFileSync34 } from "fs";
12685
12686
  import { join as join45 } from "path";
12686
12687
  function postRoamActivity(app, event) {
@@ -12695,7 +12696,7 @@ function postRoamActivity(app, event) {
12695
12696
  }
12696
12697
  const url = `http://127.0.0.1:${port}/api/v1/activity/${app}/${event}?pid=${app === "codex" ? 99998 : 99999}`;
12697
12698
  try {
12698
- execFileSync("curl", ["-sf", "--max-time", "0.2", "-X", "POST", url], {
12699
+ execFileSync4("curl", ["-sf", "--max-time", "0.2", "-X", "POST", url], {
12699
12700
  stdio: "ignore"
12700
12701
  });
12701
12702
  } catch {
@@ -12809,11 +12810,11 @@ function resolveParams(params, cliArgs) {
12809
12810
  }
12810
12811
 
12811
12812
  // src/commands/run/runPreCommands.ts
12812
- import { execSync as execSync40 } from "child_process";
12813
+ import { execSync as execSync38 } from "child_process";
12813
12814
  function runPreCommands(pre, cwd) {
12814
12815
  for (const cmd of pre) {
12815
12816
  try {
12816
- execSync40(cmd, { stdio: "inherit", cwd });
12817
+ execSync38(cmd, { stdio: "inherit", cwd });
12817
12818
  } catch (err) {
12818
12819
  const code = err && typeof err === "object" && "status" in err ? err.status : 1;
12819
12820
  process.exit(code);
@@ -12822,13 +12823,13 @@ function runPreCommands(pre, cwd) {
12822
12823
  }
12823
12824
 
12824
12825
  // src/commands/run/spawnRunCommand.ts
12825
- import { execFileSync as execFileSync2, spawn as spawn7 } from "child_process";
12826
+ import { execFileSync as execFileSync5, spawn as spawn7 } from "child_process";
12826
12827
  import { existsSync as existsSync41 } from "fs";
12827
12828
  import { dirname as dirname25, join as join46, resolve as resolve9 } from "path";
12828
12829
  function resolveCommand2(command) {
12829
12830
  if (process.platform !== "win32" || command !== "bash") return command;
12830
12831
  try {
12831
- const gitPath = execFileSync2("where", ["git"], { encoding: "utf8" }).trim().split("\r\n")[0];
12832
+ const gitPath = execFileSync5("where", ["git"], { encoding: "utf8" }).trim().split("\r\n")[0];
12832
12833
  const gitRoot = resolve9(dirname25(gitPath), "..");
12833
12834
  const gitBash = join46(gitRoot, "bin", "bash.exe");
12834
12835
  if (existsSync41(gitBash)) return gitBash;
@@ -13064,7 +13065,7 @@ function registerRun(program2) {
13064
13065
  }
13065
13066
 
13066
13067
  // src/commands/screenshot/index.ts
13067
- import { execSync as execSync41 } from "child_process";
13068
+ import { execSync as execSync39 } from "child_process";
13068
13069
  import { existsSync as existsSync43, mkdirSync as mkdirSync15, unlinkSync as unlinkSync12, writeFileSync as writeFileSync29 } from "fs";
13069
13070
  import { tmpdir as tmpdir6 } from "os";
13070
13071
  import { join as join49, resolve as resolve11 } from "path";
@@ -13207,7 +13208,7 @@ function runPowerShellScript(processName, outputPath) {
13207
13208
  const scriptPath = join49(tmpdir6(), `assist-screenshot-${Date.now()}.ps1`);
13208
13209
  writeFileSync29(scriptPath, captureWindowPs1, "utf-8");
13209
13210
  try {
13210
- execSync41(
13211
+ execSync39(
13211
13212
  `powershell -NoProfile -ExecutionPolicy Bypass -File "${scriptPath}" -ProcessName "${processName}" -OutputPath "${outputPath}"`,
13212
13213
  { stdio: ["ignore", "pipe", "pipe"], encoding: "utf-8" }
13213
13214
  );
@@ -13248,7 +13249,7 @@ function summaryPathFor(jsonlPath) {
13248
13249
  }
13249
13250
 
13250
13251
  // src/commands/sessions/summarise/summariseSession.ts
13251
- import { execFileSync as execFileSync3 } from "child_process";
13252
+ import { execFileSync as execFileSync6 } from "child_process";
13252
13253
 
13253
13254
  // src/commands/sessions/summarise/iterateUserMessages.ts
13254
13255
  import * as fs26 from "fs";
@@ -13338,7 +13339,7 @@ function summariseSession(jsonlPath) {
13338
13339
  }
13339
13340
  const prompt = buildPrompt2(firstMessage, backlogIds);
13340
13341
  try {
13341
- const output = execFileSync3("claude", ["-p", "--model", "haiku", prompt], {
13342
+ const output = execFileSync6("claude", ["-p", "--model", "haiku", prompt], {
13342
13343
  encoding: "utf8",
13343
13344
  timeout: 3e4,
13344
13345
  stdio: ["ignore", "pipe", "ignore"]
@@ -13608,7 +13609,7 @@ function syncCommands(claudeDir, targetBase) {
13608
13609
  }
13609
13610
 
13610
13611
  // src/commands/update.ts
13611
- import { execSync as execSync42 } from "child_process";
13612
+ import { execSync as execSync40 } from "child_process";
13612
13613
  import * as path52 from "path";
13613
13614
  function isGlobalNpmInstall(dir) {
13614
13615
  try {
@@ -13616,7 +13617,7 @@ function isGlobalNpmInstall(dir) {
13616
13617
  if (resolved.split(path52.sep).includes("node_modules")) {
13617
13618
  return true;
13618
13619
  }
13619
- const globalPrefix = execSync42("npm prefix -g", { stdio: "pipe" }).toString().trim();
13620
+ const globalPrefix = execSync40("npm prefix -g", { stdio: "pipe" }).toString().trim();
13620
13621
  return resolved.toLowerCase().startsWith(path52.resolve(globalPrefix).toLowerCase());
13621
13622
  } catch {
13622
13623
  return false;
@@ -13627,18 +13628,18 @@ async function update2() {
13627
13628
  console.log(`Assist is installed at: ${installDir}`);
13628
13629
  if (isGitRepo(installDir)) {
13629
13630
  console.log("Detected git repo installation, pulling latest...");
13630
- execSync42("git pull", { cwd: installDir, stdio: "inherit" });
13631
+ execSync40("git pull", { cwd: installDir, stdio: "inherit" });
13631
13632
  console.log("Installing dependencies...");
13632
- execSync42("npm i", { cwd: installDir, stdio: "inherit" });
13633
+ execSync40("npm i", { cwd: installDir, stdio: "inherit" });
13633
13634
  console.log("Building...");
13634
- execSync42("npm run build", { cwd: installDir, stdio: "inherit" });
13635
+ execSync40("npm run build", { cwd: installDir, stdio: "inherit" });
13635
13636
  console.log("Syncing commands...");
13636
- execSync42("assist sync", { stdio: "inherit" });
13637
+ execSync40("assist sync", { stdio: "inherit" });
13637
13638
  } else if (isGlobalNpmInstall(installDir)) {
13638
13639
  console.log("Detected global npm installation, updating...");
13639
- execSync42("npm i -g @staff0rd/assist@latest", { stdio: "inherit" });
13640
+ execSync40("npm i -g @staff0rd/assist@latest", { stdio: "inherit" });
13640
13641
  console.log("Syncing commands...");
13641
- execSync42("assist sync", { stdio: "inherit" });
13642
+ execSync40("assist sync", { stdio: "inherit" });
13642
13643
  } else {
13643
13644
  console.error(
13644
13645
  "Could not determine installation method. Expected a git repo or global npm install."
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@staff0rd/assist",
3
- "version": "0.205.0",
3
+ "version": "0.206.0",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "bin": {