@staff0rd/assist 0.597.0 → 0.598.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/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.597.0",
9
+ version: "0.598.0",
10
10
  type: "module",
11
11
  main: "dist/index.js",
12
12
  bin: {
@@ -19050,17 +19050,28 @@ async function criteriaExtension() {
19050
19050
  // src/commands/criteriaExtension/signCriteriaExtension.ts
19051
19051
  import { rm as rm3 } from "fs/promises";
19052
19052
  import { homedir as homedir19, tmpdir as tmpdir4 } from "os";
19053
- import { join as join46 } from "path";
19053
+ import { join as join47 } from "path";
19054
19054
  import chalk141 from "chalk";
19055
19055
 
19056
+ // src/commands/criteriaExtension/copySignedXpi.ts
19057
+ import { copyFile } from "fs/promises";
19058
+ import { join as join43 } from "path";
19059
+ var SIGNED_XPI_NAME = "criteria-extension.xpi";
19060
+ async function copySignedXpi(xpi, dir) {
19061
+ const fixed2 = join43(dir, SIGNED_XPI_NAME);
19062
+ if (fixed2 === xpi) return fixed2;
19063
+ await copyFile(xpi, fixed2);
19064
+ return fixed2;
19065
+ }
19066
+
19056
19067
  // src/commands/criteriaExtension/findSignedXpi.ts
19057
19068
  import { existsSync as existsSync44 } from "fs";
19058
19069
  import { readdir } from "fs/promises";
19059
- import { join as join43 } from "path";
19070
+ import { join as join44 } from "path";
19060
19071
  async function findSignedXpi(dir) {
19061
19072
  if (!existsSync44(dir)) return null;
19062
19073
  const name = (await readdir(dir)).find((entry) => entry.endsWith(".xpi"));
19063
- return name ? join43(dir, name) : null;
19074
+ return name ? join44(dir, name) : null;
19064
19075
  }
19065
19076
 
19066
19077
  // src/commands/criteriaExtension/signedAddonInstallPath.ts
@@ -19083,10 +19094,10 @@ async function signedAddonInstallPath(xpi) {
19083
19094
 
19084
19095
  // src/commands/criteriaExtension/signPreflightProblem.ts
19085
19096
  import { existsSync as existsSync45 } from "fs";
19086
- import { join as join44 } from "path";
19097
+ import { join as join45 } from "path";
19087
19098
  var KEY_URL = "https://addons.mozilla.org/en-US/developers/addon/api/key/";
19088
19099
  function signPreflightProblem(source) {
19089
- if (!existsSync45(join44(source, "content.js")))
19100
+ if (!existsSync45(join45(source, "content.js")))
19090
19101
  return {
19091
19102
  message: `no content.js in ${source}`,
19092
19103
  hint: "run npm run build to bundle the content script"
@@ -19101,7 +19112,7 @@ function signPreflightProblem(source) {
19101
19112
 
19102
19113
  // src/commands/criteriaExtension/stageCriteriaExtension.ts
19103
19114
  import { cp as cp3, mkdir as mkdir4, readFile as readFile4, rm as rm2, writeFile as writeFile4 } from "fs/promises";
19104
- import { join as join45 } from "path";
19115
+ import { join as join46 } from "path";
19105
19116
 
19106
19117
  // src/commands/criteriaExtension/stampManifestVersion.ts
19107
19118
  function stampManifestVersion(manifest, version2) {
@@ -19115,7 +19126,7 @@ async function stageCriteriaExtension(source, staging, version2) {
19115
19126
  await rm2(staging, { recursive: true, force: true });
19116
19127
  await mkdir4(staging, { recursive: true });
19117
19128
  await cp3(source, staging, { recursive: true });
19118
- const manifest = join45(staging, "manifest.json");
19129
+ const manifest = join46(staging, "manifest.json");
19119
19130
  const stamped = stampManifestVersion(
19120
19131
  await readFile4(manifest, "utf8"),
19121
19132
  version2
@@ -19124,8 +19135,8 @@ async function stageCriteriaExtension(source, staging, version2) {
19124
19135
  }
19125
19136
 
19126
19137
  // src/commands/criteriaExtension/signCriteriaExtension.ts
19127
- var ARTIFACTS_DIR = join46(homedir19(), ".assist", "criteria-extension");
19128
- var STAGING_DIR = join46(tmpdir4(), "assist-criteria-extension");
19138
+ var ARTIFACTS_DIR = join47(homedir19(), ".assist", "criteria-extension");
19139
+ var STAGING_DIR = join47(tmpdir4(), "assist-criteria-extension");
19129
19140
  async function signCriteriaExtension() {
19130
19141
  const source = criteriaExtensionDir();
19131
19142
  const problem = signPreflightProblem(source);
@@ -19158,7 +19169,9 @@ async function signCriteriaExtension() {
19158
19169
  process.exitCode = 1;
19159
19170
  return;
19160
19171
  }
19161
- const path84 = await signedAddonInstallPath(xpi);
19172
+ const path84 = await signedAddonInstallPath(
19173
+ await copySignedXpi(xpi, ARTIFACTS_DIR)
19174
+ );
19162
19175
  console.log(chalk141.dim(`install the signed add-on from ${path84}`));
19163
19176
  }
19164
19177
 
@@ -19246,12 +19259,12 @@ import { unlinkSync as unlinkSync9, writeFileSync as writeFileSync26 } from "fs"
19246
19259
  import chalk143 from "chalk";
19247
19260
 
19248
19261
  // src/commands/dbMigration/getMigrationPinPath.ts
19249
- import { join as join47 } from "path";
19262
+ import { join as join48 } from "path";
19250
19263
  function getMigrationPinPath(pin) {
19251
- return join47(getRestrictedDir(), `db-migration-pin-${pin}.json`);
19264
+ return join48(getRestrictedDir(), `db-migration-pin-${pin}.json`);
19252
19265
  }
19253
19266
  function getMigrationApprovalPath(migrationId) {
19254
- return join47(getRestrictedDir(), `db-migration-approval-${migrationId}.json`);
19267
+ return join48(getRestrictedDir(), `db-migration-approval-${migrationId}.json`);
19255
19268
  }
19256
19269
 
19257
19270
  // src/commands/dbMigration/readMigrationPinState.ts
@@ -19389,10 +19402,10 @@ import { basename as basename13 } from "path";
19389
19402
 
19390
19403
  // src/commands/devlog/loadBlogSkipDays.ts
19391
19404
  import { homedir as homedir20 } from "os";
19392
- import { join as join48 } from "path";
19393
- var BLOG_REPO_ROOT = join48(homedir20(), "git/blog");
19405
+ import { join as join49 } from "path";
19406
+ var BLOG_REPO_ROOT = join49(homedir20(), "git/blog");
19394
19407
  function loadBlogSkipDays(repoName) {
19395
- const config = loadRawYaml(join48(BLOG_REPO_ROOT, "assist.yml"));
19408
+ const config = loadRawYaml(join49(BLOG_REPO_ROOT, "assist.yml"));
19396
19409
  const devlog = config.devlog;
19397
19410
  const skip2 = devlog?.skip;
19398
19411
  return new Set(skip2?.[repoName]);
@@ -19404,13 +19417,13 @@ import chalk146 from "chalk";
19404
19417
 
19405
19418
  // src/shared/getRepoName.ts
19406
19419
  import { existsSync as existsSync48, readFileSync as readFileSync33 } from "fs";
19407
- import { basename as basename12, join as join49 } from "path";
19420
+ import { basename as basename12, join as join50 } from "path";
19408
19421
  function getRepoName() {
19409
19422
  const config = loadConfig();
19410
19423
  if (config.devlog?.name) {
19411
19424
  return config.devlog.name;
19412
19425
  }
19413
- const packageJsonPath = join49(process.cwd(), "package.json");
19426
+ const packageJsonPath = join50(process.cwd(), "package.json");
19414
19427
  if (existsSync48(packageJsonPath)) {
19415
19428
  try {
19416
19429
  const content = readFileSync33(packageJsonPath, "utf8");
@@ -19426,8 +19439,8 @@ function getRepoName() {
19426
19439
 
19427
19440
  // src/commands/devlog/loadDevlogEntries.ts
19428
19441
  import { readdirSync as readdirSync6, readFileSync as readFileSync34 } from "fs";
19429
- import { join as join50 } from "path";
19430
- var DEVLOG_DIR = join50(BLOG_REPO_ROOT, "src/content/devlog");
19442
+ import { join as join51 } from "path";
19443
+ var DEVLOG_DIR = join51(BLOG_REPO_ROOT, "src/content/devlog");
19431
19444
  function extractFrontmatter(content) {
19432
19445
  const fm = content.match(/^---\n([\s\S]*?)\n---/);
19433
19446
  return fm?.[1] ?? null;
@@ -19455,7 +19468,7 @@ function readDevlogFiles(callback) {
19455
19468
  try {
19456
19469
  const files = readdirSync6(DEVLOG_DIR).filter((f) => f.endsWith(".md"));
19457
19470
  for (const file of files) {
19458
- const content = readFileSync34(join50(DEVLOG_DIR, file), "utf8");
19471
+ const content = readFileSync34(join51(DEVLOG_DIR, file), "utf8");
19459
19472
  const parsed = parseFrontmatter(content, file);
19460
19473
  if (parsed) callback(parsed);
19461
19474
  }
@@ -19843,11 +19856,11 @@ function repos(options2) {
19843
19856
 
19844
19857
  // src/commands/devlog/skip.ts
19845
19858
  import { writeFileSync as writeFileSync29 } from "fs";
19846
- import { join as join51 } from "path";
19859
+ import { join as join52 } from "path";
19847
19860
  import chalk151 from "chalk";
19848
19861
  import { stringify as stringifyYaml3 } from "yaml";
19849
19862
  function getBlogConfigPath() {
19850
- return join51(BLOG_REPO_ROOT, "assist.yml");
19863
+ return join52(BLOG_REPO_ROOT, "assist.yml");
19851
19864
  }
19852
19865
  function skip(date) {
19853
19866
  if (!/^\d{4}-\d{2}-\d{2}$/.test(date)) {
@@ -19909,7 +19922,7 @@ function registerDevlog(program2) {
19909
19922
 
19910
19923
  // src/commands/dotnet/checkBuildLocks.ts
19911
19924
  import { closeSync as closeSync3, openSync as openSync3, readdirSync as readdirSync7 } from "fs";
19912
- import { join as join52 } from "path";
19925
+ import { join as join53 } from "path";
19913
19926
  import chalk153 from "chalk";
19914
19927
  var SKIP_DIRS = /* @__PURE__ */ new Set(["node_modules", ".git", "packages"]);
19915
19928
  function isLockedDll(debugDir) {
@@ -19921,7 +19934,7 @@ function isLockedDll(debugDir) {
19921
19934
  }
19922
19935
  for (const file of files) {
19923
19936
  if (!file.toLowerCase().endsWith(".dll")) continue;
19924
- const dllPath = join52(debugDir, file);
19937
+ const dllPath = join53(debugDir, file);
19925
19938
  try {
19926
19939
  const fd = openSync3(dllPath, "r+");
19927
19940
  closeSync3(fd);
@@ -19939,13 +19952,13 @@ function findFirstLockedDll(dir) {
19939
19952
  return null;
19940
19953
  }
19941
19954
  if (entries.includes("bin")) {
19942
- const locked = isLockedDll(join52(dir, "bin", "Debug"));
19955
+ const locked = isLockedDll(join53(dir, "bin", "Debug"));
19943
19956
  if (locked) return locked;
19944
19957
  }
19945
19958
  for (const entry of entries) {
19946
19959
  if (SKIP_DIRS.has(entry) || entry === "bin" || entry.startsWith("."))
19947
19960
  continue;
19948
- const found = findFirstLockedDll(join52(dir, entry));
19961
+ const found = findFirstLockedDll(join53(dir, entry));
19949
19962
  if (found) return found;
19950
19963
  }
19951
19964
  return null;
@@ -20292,11 +20305,11 @@ import chalk159 from "chalk";
20292
20305
 
20293
20306
  // src/commands/dotnet/findSolution.ts
20294
20307
  import { readdirSync as readdirSync9 } from "fs";
20295
- import { dirname as dirname25, join as join53 } from "path";
20308
+ import { dirname as dirname25, join as join54 } from "path";
20296
20309
  import chalk158 from "chalk";
20297
20310
  function findSlnInDir(dir) {
20298
20311
  try {
20299
- return readdirSync9(dir).filter((f) => f.endsWith(".sln")).map((f) => join53(dir, f));
20312
+ return readdirSync9(dir).filter((f) => f.endsWith(".sln")).map((f) => join54(dir, f));
20300
20313
  } catch {
20301
20314
  return [];
20302
20315
  }
@@ -20811,7 +20824,7 @@ function aggregateCommitters(authorLists) {
20811
20824
  import { spawnSync as spawnSync4 } from "child_process";
20812
20825
  import { unlinkSync as unlinkSync12, writeFileSync as writeFileSync30 } from "fs";
20813
20826
  import { tmpdir as tmpdir6 } from "os";
20814
- import { join as join54 } from "path";
20827
+ import { join as join55 } from "path";
20815
20828
 
20816
20829
  // src/shared/throwOnGraphqlErrors.ts
20817
20830
  function throwOnGraphqlErrors(stdout) {
@@ -20840,7 +20853,7 @@ function buildArgs2(queryFile, vars) {
20840
20853
  return args;
20841
20854
  }
20842
20855
  function runGhGraphql(mutation, vars) {
20843
- const queryFile = join54(tmpdir6(), `gh-query-${Date.now()}.graphql`);
20856
+ const queryFile = join55(tmpdir6(), `gh-query-${Date.now()}.graphql`);
20844
20857
  writeFileSync30(queryFile, mutation);
20845
20858
  try {
20846
20859
  const result = spawnSync4("gh", buildArgs2(queryFile, vars), {
@@ -21750,14 +21763,14 @@ function fetchIssue2(number, repo) {
21750
21763
  import { existsSync as existsSync53, readFileSync as readFileSync38 } from "fs";
21751
21764
 
21752
21765
  // src/commands/github/issue/issueWorkingFile.ts
21753
- import { join as join55 } from "path";
21766
+ import { join as join56 } from "path";
21754
21767
  function issueWorkingFile(slug, number) {
21755
21768
  const [owner = "unknown", repo = "unknown"] = slug.split("/");
21756
- const dir = join55(getStoreDir(), "github-issues", owner, repo);
21769
+ const dir = join56(getStoreDir(), "github-issues", owner, repo);
21757
21770
  return {
21758
21771
  dir,
21759
- bodyPath: join55(dir, `${number}.md`),
21760
- metaPath: join55(dir, `${number}.json`)
21772
+ bodyPath: join56(dir, `${number}.md`),
21773
+ metaPath: join56(dir, `${number}.json`)
21761
21774
  };
21762
21775
  }
21763
21776
 
@@ -21963,18 +21976,18 @@ import {
21963
21976
  rmSync as rmSync3,
21964
21977
  statSync as statSync9
21965
21978
  } from "fs";
21966
- import { basename as basename14, join as join58 } from "path";
21979
+ import { basename as basename14, join as join59 } from "path";
21967
21980
 
21968
21981
  // src/commands/handover/getHandoverPath.ts
21969
- import { join as join56 } from "path";
21982
+ import { join as join57 } from "path";
21970
21983
  function getHandoverPath(cwd = process.cwd()) {
21971
- return join56(cwd, ".assist", "HANDOVER.md");
21984
+ return join57(cwd, ".assist", "HANDOVER.md");
21972
21985
  }
21973
21986
 
21974
21987
  // src/commands/handover/getHandoversDir.ts
21975
- import { join as join57 } from "path";
21988
+ import { join as join58 } from "path";
21976
21989
  function getHandoversDir(cwd = process.cwd()) {
21977
- return join57(cwd, ".assist", "handovers");
21990
+ return join58(cwd, ".assist", "handovers");
21978
21991
  }
21979
21992
 
21980
21993
  // src/commands/handover/parseArchiveTimestamp.ts
@@ -22015,7 +22028,7 @@ function collectMarkdown(dir) {
22015
22028
  if (!existsSync54(dir)) return [];
22016
22029
  const out = [];
22017
22030
  for (const entry of readdirSync10(dir, { withFileTypes: true })) {
22018
- const full = join58(dir, entry.name);
22031
+ const full = join59(dir, entry.name);
22019
22032
  if (entry.isDirectory()) out.push(...collectMarkdown(full));
22020
22033
  else if (entry.isFile() && entry.name.endsWith(".md")) out.push(full);
22021
22034
  }
@@ -22400,14 +22413,14 @@ import { existsSync as existsSync55 } from "fs";
22400
22413
  import { basename as basename16, dirname as dirname26 } from "path";
22401
22414
 
22402
22415
  // src/commands/sessions/daemon/worktree/planAllocation.ts
22403
- import { basename as basename15, join as join59 } from "path";
22416
+ import { basename as basename15, join as join60 } from "path";
22404
22417
  function planAllocation(clone, boundTreeRoots2) {
22405
22418
  return boundTreeRoots2.has(clone) ? "spill" : "primary";
22406
22419
  }
22407
22420
  function nextWorktreePath(clone, base, isTaken) {
22408
22421
  const name = basename15(clone);
22409
22422
  for (let n = 2; n < 1e3; n++) {
22410
- const candidate = join59(base, `${name}-${n}`);
22423
+ const candidate = join60(base, `${name}-${n}`);
22411
22424
  if (!isTaken(candidate)) return candidate;
22412
22425
  }
22413
22426
  throw new Error(`no free worktree suffix for ${clone}`);
@@ -22751,19 +22764,19 @@ function persistedTreeRoots() {
22751
22764
 
22752
22765
  // src/commands/sessions/daemon/worktree/seedWorktree.ts
22753
22766
  import { copyFileSync, existsSync as existsSync58, mkdirSync as mkdirSync17 } from "fs";
22754
- import { dirname as dirname27, join as join61 } from "path";
22767
+ import { dirname as dirname27, join as join62 } from "path";
22755
22768
 
22756
22769
  // src/commands/sessions/daemon/worktree/runInstall.ts
22757
22770
  import { spawn as spawn5 } from "child_process";
22758
22771
 
22759
22772
  // src/commands/sessions/daemon/worktree/resolveInstallCommand.ts
22760
22773
  import { existsSync as existsSync57 } from "fs";
22761
- import { join as join60 } from "path";
22774
+ import { join as join61 } from "path";
22762
22775
  function detectInstallCommand(repoRoot2) {
22763
- if (!existsSync57(join60(repoRoot2, "package.json"))) return null;
22764
- if (existsSync57(join60(repoRoot2, "pnpm-lock.yaml"))) return "pnpm install";
22765
- if (existsSync57(join60(repoRoot2, "yarn.lock"))) return "yarn install";
22766
- if (existsSync57(join60(repoRoot2, "bun.lockb"))) return "bun install";
22776
+ if (!existsSync57(join61(repoRoot2, "package.json"))) return null;
22777
+ if (existsSync57(join61(repoRoot2, "pnpm-lock.yaml"))) return "pnpm install";
22778
+ if (existsSync57(join61(repoRoot2, "yarn.lock"))) return "yarn install";
22779
+ if (existsSync57(join61(repoRoot2, "bun.lockb"))) return "bun install";
22767
22780
  return "npm install";
22768
22781
  }
22769
22782
  function resolveInstallCommand(repoRoot2, install) {
@@ -22875,9 +22888,9 @@ function seedWorktree(worktreePath, clone, onSeeded = () => {
22875
22888
  }
22876
22889
  function copyConfigFiles(worktreePath, clone, copy) {
22877
22890
  for (const rel of copy) {
22878
- const src = join61(clone, rel);
22891
+ const src = join62(clone, rel);
22879
22892
  if (!existsSync58(src)) continue;
22880
- const dest = join61(worktreePath, rel);
22893
+ const dest = join62(worktreePath, rel);
22881
22894
  try {
22882
22895
  mkdirSync17(dirname27(dest), { recursive: true });
22883
22896
  copyFileSync(src, dest);
@@ -23836,15 +23849,15 @@ function createNetcapHandler(options2) {
23836
23849
  // src/commands/netcap/prepareExtensionForLoad.ts
23837
23850
  import { cp as cp4, readFile as readFile5, writeFile as writeFile5 } from "fs/promises";
23838
23851
  import { networkInterfaces } from "os";
23839
- import { join as join63 } from "path";
23852
+ import { join as join64 } from "path";
23840
23853
  import chalk176 from "chalk";
23841
23854
 
23842
23855
  // src/commands/netcap/netcapExtensionDir.ts
23843
- import { dirname as dirname29, join as join62 } from "path";
23856
+ import { dirname as dirname29, join as join63 } from "path";
23844
23857
  import { fileURLToPath as fileURLToPath7 } from "url";
23845
23858
  var moduleDir2 = dirname29(fileURLToPath7(import.meta.url));
23846
23859
  function netcapExtensionDir() {
23847
- return join62(moduleDir2, "commands", "netcap", "netcap-extension");
23860
+ return join63(moduleDir2, "commands", "netcap", "netcap-extension");
23848
23861
  }
23849
23862
 
23850
23863
  // src/commands/netcap/prepareExtensionForLoad.ts
@@ -23859,7 +23872,7 @@ function lanIPv4() {
23859
23872
  return void 0;
23860
23873
  }
23861
23874
  async function configureBackground(dir, host, port, filter) {
23862
- const file = join63(dir, "background.js");
23875
+ const file = join64(dir, "background.js");
23863
23876
  const source = await readFile5(file, "utf8");
23864
23877
  await writeFile5(
23865
23878
  file,
@@ -23899,20 +23912,20 @@ async function prepareExtensionForLoad(port, filter = "") {
23899
23912
  }
23900
23913
 
23901
23914
  // src/commands/netcap/resolveNetcapOutPath.ts
23902
- import { isAbsolute as isAbsolute4, join as join65, resolve as resolve18 } from "path";
23915
+ import { isAbsolute as isAbsolute4, join as join66, resolve as resolve18 } from "path";
23903
23916
 
23904
23917
  // src/commands/netcap/defaultCapturePath.ts
23905
23918
  import { homedir as homedir21 } from "os";
23906
- import { join as join64 } from "path";
23919
+ import { join as join65 } from "path";
23907
23920
  function defaultCapturePath() {
23908
- return join64(homedir21(), ".assist", "netcap", "capture.jsonl");
23921
+ return join65(homedir21(), ".assist", "netcap", "capture.jsonl");
23909
23922
  }
23910
23923
 
23911
23924
  // src/commands/netcap/resolveNetcapOutPath.ts
23912
23925
  function resolveNetcapOutPath(out) {
23913
23926
  if (!out) return defaultCapturePath();
23914
23927
  const dir = isAbsolute4(out) ? out : resolve18(process.cwd(), out);
23915
- return join65(dir, "capture.jsonl");
23928
+ return join66(dir, "capture.jsonl");
23916
23929
  }
23917
23930
 
23918
23931
  // src/commands/netcap/netcap.ts
@@ -23959,7 +23972,7 @@ netcap stopped \u2014 captured ${count8} ${count8 === 1 ? "entry" : "entries"} t
23959
23972
 
23960
23973
  // src/commands/netcap/netcapExtract.ts
23961
23974
  import { writeFileSync as writeFileSync34 } from "fs";
23962
- import { join as join66 } from "path";
23975
+ import { join as join67 } from "path";
23963
23976
  import chalk178 from "chalk";
23964
23977
 
23965
23978
  // src/commands/netcap/extractPostsFromCapture.ts
@@ -24404,7 +24417,7 @@ function extractPostsFromCapture(captureFile) {
24404
24417
  function netcapExtract(file) {
24405
24418
  const captureFile = file ?? defaultCapturePath();
24406
24419
  const posts = extractPostsFromCapture(captureFile);
24407
- const outFile = join66(captureFile, "..", "posts.json");
24420
+ const outFile = join67(captureFile, "..", "posts.json");
24408
24421
  writeFileSync34(outFile, `${JSON.stringify(posts, null, 2)}
24409
24422
  `);
24410
24423
  console.log(
@@ -24930,7 +24943,7 @@ import { execSync as execSync45 } from "child_process";
24930
24943
  import { execSync as execSync44 } from "child_process";
24931
24944
  import { unlinkSync as unlinkSync14, writeFileSync as writeFileSync35 } from "fs";
24932
24945
  import { tmpdir as tmpdir7 } from "os";
24933
- import { join as join68 } from "path";
24946
+ import { join as join69 } from "path";
24934
24947
 
24935
24948
  // src/commands/prs/loadCommentsCache.ts
24936
24949
  import { existsSync as existsSync60, readFileSync as readFileSync44, unlinkSync as unlinkSync13 } from "fs";
@@ -24938,9 +24951,9 @@ import { parse as parse3 } from "yaml";
24938
24951
 
24939
24952
  // src/commands/prs/commentsCachePath.ts
24940
24953
  import { homedir as homedir22 } from "os";
24941
- import { join as join67 } from "path";
24954
+ import { join as join68 } from "path";
24942
24955
  function commentsCachePath(org, repo, prNumber) {
24943
- return join67(
24956
+ return join68(
24944
24957
  homedir22(),
24945
24958
  ".assist",
24946
24959
  "pr-comments",
@@ -24989,7 +25002,7 @@ function replyToComment(org, repo, prNumber, commentId, message3) {
24989
25002
  // src/commands/prs/resolveCommentWithReply.ts
24990
25003
  function resolveThread(threadId) {
24991
25004
  const mutation = `mutation($threadId: ID!) { resolveReviewThread(input: {threadId: $threadId}) { thread { isResolved } } }`;
24992
- const queryFile = join68(tmpdir7(), `gh-mutation-${Date.now()}.graphql`);
25005
+ const queryFile = join69(tmpdir7(), `gh-mutation-${Date.now()}.graphql`);
24993
25006
  writeFileSync35(queryFile, mutation);
24994
25007
  try {
24995
25008
  execSync44(
@@ -25074,10 +25087,10 @@ function fixed(commentId, sha) {
25074
25087
  import { execSync as execSync46 } from "child_process";
25075
25088
  import { unlinkSync as unlinkSync15, writeFileSync as writeFileSync36 } from "fs";
25076
25089
  import { tmpdir as tmpdir8 } from "os";
25077
- import { join as join69 } from "path";
25090
+ import { join as join70 } from "path";
25078
25091
  var THREAD_QUERY = `query($owner: String!, $repo: String!, $prNumber: Int!) { repository(owner: $owner, name: $repo) { pullRequest(number: $prNumber) { reviewThreads(first: 100) { nodes { id isResolved comments(first: 100) { nodes { databaseId } } } } } } }`;
25079
25092
  function fetchThreadIds(org, repo, prNumber) {
25080
- const queryFile = join69(tmpdir8(), `gh-query-${Date.now()}.graphql`);
25093
+ const queryFile = join70(tmpdir8(), `gh-query-${Date.now()}.graphql`);
25081
25094
  writeFileSync36(queryFile, THREAD_QUERY);
25082
25095
  try {
25083
25096
  const result = execSync46(
@@ -25152,10 +25165,10 @@ import { stringify as stringify3 } from "yaml";
25152
25165
 
25153
25166
  // src/commands/prs/removeStaleCommentsCaches.ts
25154
25167
  import { readdirSync as readdirSync12, unlinkSync as unlinkSync16 } from "fs";
25155
- import { join as join70 } from "path";
25168
+ import { join as join71 } from "path";
25156
25169
  var STALE_PATTERN = /^pr-\d+-comments\.yaml$/;
25157
25170
  function removeStaleCommentsCaches(cwd = process.cwd()) {
25158
- const dir = join70(cwd, ".assist");
25171
+ const dir = join71(cwd, ".assist");
25159
25172
  let entries;
25160
25173
  try {
25161
25174
  entries = readdirSync12(dir);
@@ -25163,7 +25176,7 @@ function removeStaleCommentsCaches(cwd = process.cwd()) {
25163
25176
  return;
25164
25177
  }
25165
25178
  for (const entry of entries.filter((e) => STALE_PATTERN.test(e))) {
25166
- unlinkSync16(join70(dir, entry));
25179
+ unlinkSync16(join71(dir, entry));
25167
25180
  }
25168
25181
  }
25169
25182
 
@@ -28352,9 +28365,9 @@ ${annotateDiffWithLineNumbers(context.diff.trimEnd())}
28352
28365
 
28353
28366
  // src/commands/review/buildReviewPaths.ts
28354
28367
  import { homedir as homedir23 } from "os";
28355
- import { basename as basename18, join as join71 } from "path";
28368
+ import { basename as basename18, join as join72 } from "path";
28356
28369
  function buildReviewPaths(repoRoot2, key) {
28357
- const reviewDir = join71(
28370
+ const reviewDir = join72(
28358
28371
  homedir23(),
28359
28372
  ".assist",
28360
28373
  "reviews",
@@ -28363,10 +28376,10 @@ function buildReviewPaths(repoRoot2, key) {
28363
28376
  );
28364
28377
  return {
28365
28378
  reviewDir,
28366
- requestPath: join71(reviewDir, "request.md"),
28367
- claudePath: join71(reviewDir, "claude.md"),
28368
- codexPath: join71(reviewDir, "codex.md"),
28369
- synthesisPath: join71(reviewDir, "synthesis.md")
28379
+ requestPath: join72(reviewDir, "request.md"),
28380
+ claudePath: join72(reviewDir, "claude.md"),
28381
+ codexPath: join72(reviewDir, "codex.md"),
28382
+ synthesisPath: join72(reviewDir, "synthesis.md")
28370
28383
  };
28371
28384
  }
28372
28385
 
@@ -31549,20 +31562,20 @@ async function configure() {
31549
31562
 
31550
31563
  // src/commands/transcript/list.ts
31551
31564
  import { existsSync as existsSync69, readdirSync as readdirSync19, statSync as statSync11 } from "fs";
31552
- import { join as join82 } from "path";
31565
+ import { join as join83 } from "path";
31553
31566
  function list4() {
31554
31567
  const { vttDir } = getTranscriptConfig();
31555
31568
  if (!existsSync69(vttDir)) return;
31556
31569
  for (const entry of readdirSync19(vttDir)) {
31557
31570
  if (!entry.endsWith(".vtt")) continue;
31558
- if (statSync11(join82(vttDir, entry)).isDirectory()) continue;
31571
+ if (statSync11(join83(vttDir, entry)).isDirectory()) continue;
31559
31572
  console.log(entry);
31560
31573
  }
31561
31574
  }
31562
31575
 
31563
31576
  // src/commands/transcript/move.ts
31564
31577
  import { existsSync as existsSync70, mkdirSync as mkdirSync27, renameSync as renameSync2, writeFileSync as writeFileSync43 } from "fs";
31565
- import { basename as basename21, join as join83 } from "path";
31578
+ import { basename as basename21, join as join84 } from "path";
31566
31579
 
31567
31580
  // src/commands/transcript/convertVttToMarkdown.ts
31568
31581
  function convertVttToMarkdown(inputPath) {
@@ -31572,9 +31585,9 @@ function convertVttToMarkdown(inputPath) {
31572
31585
  // src/commands/transcript/move.ts
31573
31586
  var DATE_REGEX = /^\d{4}-\d{2}-\d{2}$/;
31574
31587
  function archiveRawVtt(vttDir, sourcePath, filename) {
31575
- const processedDir = join83(vttDir, "processed");
31588
+ const processedDir = join84(vttDir, "processed");
31576
31589
  mkdirSync27(processedDir, { recursive: true });
31577
- renameSync2(sourcePath, join83(processedDir, filename));
31590
+ renameSync2(sourcePath, join84(processedDir, filename));
31578
31591
  }
31579
31592
  function move(file, options2) {
31580
31593
  const { date, client } = options2;
@@ -31584,19 +31597,19 @@ function move(file, options2) {
31584
31597
  }
31585
31598
  const { vttDir, transcriptsDir, summaryDir } = getTranscriptConfig();
31586
31599
  const filename = basename21(file);
31587
- const sourcePath = join83(vttDir, filename);
31600
+ const sourcePath = join84(vttDir, filename);
31588
31601
  if (!existsSync70(sourcePath)) {
31589
31602
  console.error(`Error: VTT file not found: ${sourcePath}`);
31590
31603
  process.exit(1);
31591
31604
  }
31592
31605
  const base = basename21(filename, ".vtt").replace(/ Transcription$/, "");
31593
31606
  const outputName = `${date} ${base}.md`;
31594
- const formattedDir = join83(transcriptsDir, client);
31607
+ const formattedDir = join84(transcriptsDir, client);
31595
31608
  mkdirSync27(formattedDir, { recursive: true });
31596
- const formattedPath = join83(formattedDir, outputName);
31609
+ const formattedPath = join84(formattedDir, outputName);
31597
31610
  writeFileSync43(formattedPath, convertVttToMarkdown(sourcePath), "utf8");
31598
31611
  archiveRawVtt(vttDir, sourcePath, filename);
31599
- const summaryPath = join83(summaryDir, client, outputName);
31612
+ const summaryPath = join84(summaryDir, client, outputName);
31600
31613
  console.log(`Formatted transcript: ${formattedPath}`);
31601
31614
  console.log(`Summary target: ${summaryPath}`);
31602
31615
  }
@@ -31679,38 +31692,38 @@ function registerVerify(program2) {
31679
31692
 
31680
31693
  // src/commands/voice/devices.ts
31681
31694
  import { spawnSync as spawnSync8 } from "child_process";
31682
- import { join as join85 } from "path";
31695
+ import { join as join86 } from "path";
31683
31696
 
31684
31697
  // src/commands/voice/shared.ts
31685
31698
  import { homedir as homedir25 } from "os";
31686
- import { dirname as dirname36, join as join84 } from "path";
31699
+ import { dirname as dirname36, join as join85 } from "path";
31687
31700
  import { fileURLToPath as fileURLToPath9 } from "url";
31688
31701
  var __dirname6 = dirname36(fileURLToPath9(import.meta.url));
31689
- var VOICE_DIR = join84(homedir25(), ".assist", "voice");
31702
+ var VOICE_DIR = join85(homedir25(), ".assist", "voice");
31690
31703
  var voicePaths = {
31691
31704
  dir: VOICE_DIR,
31692
- pid: join84(VOICE_DIR, "voice.pid"),
31693
- log: join84(VOICE_DIR, "voice.log"),
31694
- venv: join84(VOICE_DIR, ".venv"),
31695
- lock: join84(VOICE_DIR, "voice.lock")
31705
+ pid: join85(VOICE_DIR, "voice.pid"),
31706
+ log: join85(VOICE_DIR, "voice.log"),
31707
+ venv: join85(VOICE_DIR, ".venv"),
31708
+ lock: join85(VOICE_DIR, "voice.lock")
31696
31709
  };
31697
31710
  function getPythonDir() {
31698
- return join84(__dirname6, "commands", "voice", "python");
31711
+ return join85(__dirname6, "commands", "voice", "python");
31699
31712
  }
31700
31713
  function getVenvPython() {
31701
- return process.platform === "win32" ? join84(voicePaths.venv, "Scripts", "python.exe") : join84(voicePaths.venv, "bin", "python");
31714
+ return process.platform === "win32" ? join85(voicePaths.venv, "Scripts", "python.exe") : join85(voicePaths.venv, "bin", "python");
31702
31715
  }
31703
31716
  function getLockDir() {
31704
31717
  const config = loadConfig();
31705
31718
  return config.voice?.lockDir ?? VOICE_DIR;
31706
31719
  }
31707
31720
  function getLockFile() {
31708
- return join84(getLockDir(), "voice.lock");
31721
+ return join85(getLockDir(), "voice.lock");
31709
31722
  }
31710
31723
 
31711
31724
  // src/commands/voice/devices.ts
31712
31725
  function devices() {
31713
- const script = join85(getPythonDir(), "list_devices.py");
31726
+ const script = join86(getPythonDir(), "list_devices.py");
31714
31727
  spawnSync8(getVenvPython(), [script], { stdio: "inherit" });
31715
31728
  }
31716
31729
 
@@ -31745,12 +31758,12 @@ function logs(options2) {
31745
31758
  // src/commands/voice/setup.ts
31746
31759
  import { spawnSync as spawnSync9 } from "child_process";
31747
31760
  import { mkdirSync as mkdirSync29 } from "fs";
31748
- import { join as join87 } from "path";
31761
+ import { join as join88 } from "path";
31749
31762
 
31750
31763
  // src/commands/voice/checkLockFile.ts
31751
31764
  import { execSync as execSync58 } from "child_process";
31752
31765
  import { existsSync as existsSync72, mkdirSync as mkdirSync28, readFileSync as readFileSync53, writeFileSync as writeFileSync44 } from "fs";
31753
- import { join as join86 } from "path";
31766
+ import { join as join87 } from "path";
31754
31767
  function isProcessAlive2(pid) {
31755
31768
  try {
31756
31769
  process.kill(pid, 0);
@@ -31787,7 +31800,7 @@ function bootstrapVenv() {
31787
31800
  }
31788
31801
  function writeLockFile(pid) {
31789
31802
  const lockFile = getLockFile();
31790
- mkdirSync28(join86(lockFile, ".."), { recursive: true });
31803
+ mkdirSync28(join87(lockFile, ".."), { recursive: true });
31791
31804
  writeFileSync44(
31792
31805
  lockFile,
31793
31806
  JSON.stringify({
@@ -31803,7 +31816,7 @@ function setup() {
31803
31816
  mkdirSync29(voicePaths.dir, { recursive: true });
31804
31817
  bootstrapVenv();
31805
31818
  console.log("\nDownloading models...\n");
31806
- const script = join87(getPythonDir(), "setup_models.py");
31819
+ const script = join88(getPythonDir(), "setup_models.py");
31807
31820
  const result = spawnSync9(getVenvPython(), [script], {
31808
31821
  stdio: "inherit",
31809
31822
  env: { ...process.env, VOICE_LOG_FILE: voicePaths.log }
@@ -31817,7 +31830,7 @@ function setup() {
31817
31830
  // src/commands/voice/start.ts
31818
31831
  import { spawn as spawn8 } from "child_process";
31819
31832
  import { mkdirSync as mkdirSync30, writeFileSync as writeFileSync45 } from "fs";
31820
- import { join as join88 } from "path";
31833
+ import { join as join89 } from "path";
31821
31834
 
31822
31835
  // src/commands/voice/buildDaemonEnv.ts
31823
31836
  function buildDaemonEnv(options2) {
@@ -31855,7 +31868,7 @@ function start2(options2) {
31855
31868
  bootstrapVenv();
31856
31869
  const debug = options2.debug || options2.foreground || process.platform === "win32";
31857
31870
  const env = buildDaemonEnv({ debug });
31858
- const script = join88(getPythonDir(), "voice_daemon.py");
31871
+ const script = join89(getPythonDir(), "voice_daemon.py");
31859
31872
  const python = getVenvPython();
31860
31873
  if (options2.foreground) {
31861
31874
  spawnForeground(python, script, env);
@@ -31986,11 +31999,11 @@ function changedPaths(from, cwd) {
31986
31999
  }
31987
32000
 
31988
32001
  // src/commands/watch/readBuiltVersion.ts
31989
- import { join as join89 } from "path";
32002
+ import { join as join90 } from "path";
31990
32003
  function readBuiltVersion(cwd) {
31991
32004
  try {
31992
32005
  const root = runGit3(["rev-parse", "--show-toplevel"], cwd);
31993
- return readPackageJson(join89(root, "package.json")).version ?? "unknown";
32006
+ return readPackageJson(join90(root, "package.json")).version ?? "unknown";
31994
32007
  } catch {
31995
32008
  return "unknown";
31996
32009
  }
@@ -32351,13 +32364,13 @@ import { existsSync as existsSync77 } from "fs";
32351
32364
  // src/commands/run/resolveCommand.ts
32352
32365
  import { execFileSync as execFileSync16 } from "child_process";
32353
32366
  import { existsSync as existsSync76 } from "fs";
32354
- import { dirname as dirname37, join as join90, resolve as resolve20 } from "path";
32367
+ import { dirname as dirname37, join as join91, resolve as resolve20 } from "path";
32355
32368
  function resolveCommand2(command) {
32356
32369
  if (process.platform !== "win32" || command !== "bash") return command;
32357
32370
  try {
32358
32371
  const gitPath = execFileSync16("where", ["git"], { encoding: "utf8" }).trim().split("\r\n")[0];
32359
32372
  const gitRoot = resolve20(dirname37(gitPath), "..");
32360
- const gitBash = join90(gitRoot, "bin", "bash.exe");
32373
+ const gitBash = join91(gitRoot, "bin", "bash.exe");
32361
32374
  if (existsSync76(gitBash)) return gitBash;
32362
32375
  } catch {
32363
32376
  return command;
@@ -32785,7 +32798,7 @@ async function auth() {
32785
32798
  // src/commands/roam/postRoamActivity.ts
32786
32799
  import { execFileSync as execFileSync18 } from "child_process";
32787
32800
  import { readdirSync as readdirSync20, readFileSync as readFileSync56, statSync as statSync12 } from "fs";
32788
- import { join as join91 } from "path";
32801
+ import { join as join92 } from "path";
32789
32802
  function findPortFile(roamDir) {
32790
32803
  let entries;
32791
32804
  try {
@@ -32794,7 +32807,7 @@ function findPortFile(roamDir) {
32794
32807
  return void 0;
32795
32808
  }
32796
32809
  const candidates = entries.filter((name) => /^roam-local-api(-[^.]+)?\.port$/.test(name)).map((name) => {
32797
- const path84 = join91(roamDir, name);
32810
+ const path84 = join92(roamDir, name);
32798
32811
  try {
32799
32812
  return { path: path84, mtimeMs: statSync12(path84).mtimeMs };
32800
32813
  } catch {
@@ -32806,7 +32819,7 @@ function findPortFile(roamDir) {
32806
32819
  function postRoamActivity(app, event) {
32807
32820
  const appData = process.env.APPDATA;
32808
32821
  if (!appData) return;
32809
- const portFile = findPortFile(join91(appData, "Roam"));
32822
+ const portFile = findPortFile(join92(appData, "Roam"));
32810
32823
  if (!portFile) return;
32811
32824
  let port;
32812
32825
  try {
@@ -32939,7 +32952,7 @@ async function run3(name, args) {
32939
32952
 
32940
32953
  // src/commands/run/add.ts
32941
32954
  import { mkdirSync as mkdirSync31, writeFileSync as writeFileSync46 } from "fs";
32942
- import { join as join92 } from "path";
32955
+ import { join as join93 } from "path";
32943
32956
 
32944
32957
  // src/commands/run/extractOption.ts
32945
32958
  function extractOption(args, flag) {
@@ -33000,7 +33013,7 @@ function saveNewRunConfig(name, command, args, cwd) {
33000
33013
  saveConfig(config);
33001
33014
  }
33002
33015
  function createCommandFile(name) {
33003
- const dir = join92(".claude", "commands");
33016
+ const dir = join93(".claude", "commands");
33004
33017
  mkdirSync31(dir, { recursive: true });
33005
33018
  const content = `---
33006
33019
  description: Run ${name}
@@ -33008,7 +33021,7 @@ description: Run ${name}
33008
33021
 
33009
33022
  Run \`assist run ${name} $ARGUMENTS 2>&1\`.
33010
33023
  `;
33011
- const filePath = join92(dir, `${name}.md`);
33024
+ const filePath = join93(dir, `${name}.md`);
33012
33025
  writeFileSync46(filePath, content);
33013
33026
  console.log(`Created command file: ${filePath}`);
33014
33027
  }
@@ -33065,7 +33078,7 @@ function link2() {
33065
33078
 
33066
33079
  // src/commands/run/remove.ts
33067
33080
  import { existsSync as existsSync78, unlinkSync as unlinkSync21 } from "fs";
33068
- import { join as join93 } from "path";
33081
+ import { join as join94 } from "path";
33069
33082
  function findRemoveIndex() {
33070
33083
  const idx = process.argv.indexOf("remove");
33071
33084
  if (idx === -1 || idx + 1 >= process.argv.length) return -1;
@@ -33080,7 +33093,7 @@ function parseRemoveName() {
33080
33093
  return process.argv[idx + 1];
33081
33094
  }
33082
33095
  function deleteCommandFile(name) {
33083
- const filePath = join93(".claude", "commands", `${name}.md`);
33096
+ const filePath = join94(".claude", "commands", `${name}.md`);
33084
33097
  if (existsSync78(filePath)) {
33085
33098
  unlinkSync21(filePath);
33086
33099
  console.log(`Deleted command file: ${filePath}`);
@@ -33128,7 +33141,7 @@ function registerRun(program2) {
33128
33141
  import { execSync as execSync60 } from "child_process";
33129
33142
  import { existsSync as existsSync79, mkdirSync as mkdirSync32, unlinkSync as unlinkSync22, writeFileSync as writeFileSync47 } from "fs";
33130
33143
  import { tmpdir as tmpdir9 } from "os";
33131
- import { join as join94, resolve as resolve21 } from "path";
33144
+ import { join as join95, resolve as resolve21 } from "path";
33132
33145
  import chalk225 from "chalk";
33133
33146
 
33134
33147
  // src/commands/screenshot/captureWindowPs1.ts
@@ -33265,7 +33278,7 @@ function buildOutputPath(outputDir, processName) {
33265
33278
  return resolve21(outputDir, `${processName}-${timestamp6}.png`);
33266
33279
  }
33267
33280
  function runPowerShellScript(processName, outputPath) {
33268
- const scriptPath = join94(tmpdir9(), `assist-screenshot-${Date.now()}.ps1`);
33281
+ const scriptPath = join95(tmpdir9(), `assist-screenshot-${Date.now()}.ps1`);
33269
33282
  writeFileSync47(scriptPath, captureWindowPs1, "utf8");
33270
33283
  try {
33271
33284
  execSync60(
@@ -34014,12 +34027,12 @@ import { basename as basename22 } from "path";
34014
34027
 
34015
34028
  // src/commands/sessions/daemon/worktree/deleteStrandedTree.ts
34016
34029
  import { existsSync as existsSync83 } from "fs";
34017
- import { join as join97 } from "path";
34030
+ import { join as join98 } from "path";
34018
34031
 
34019
34032
  // src/commands/sessions/daemon/worktree/deleteTreeDirectly.ts
34020
34033
  import { statSync as statSync14 } from "fs";
34021
34034
  import { rm as rm4 } from "fs/promises";
34022
- import { join as join96 } from "path";
34035
+ import { join as join97 } from "path";
34023
34036
  async function deleteTreeDirectly(clone, worktreePath, why) {
34024
34037
  if (holdsAGitDirectoryRatherThanALink(worktreePath)) {
34025
34038
  const refusal = "it is a clone of its own, not a linked worktree";
@@ -34047,7 +34060,7 @@ async function deleteTreeDirectly(clone, worktreePath, why) {
34047
34060
  return { removed: true };
34048
34061
  }
34049
34062
  function holdsAGitDirectoryRatherThanALink(worktreePath) {
34050
- return statSync14(join96(worktreePath, ".git"), {
34063
+ return statSync14(join97(worktreePath, ".git"), {
34051
34064
  throwIfNoEntry: false
34052
34065
  })?.isDirectory() === true;
34053
34066
  }
@@ -34083,7 +34096,7 @@ async function deleteStrandedTree(clone, worktreePath, cause) {
34083
34096
  );
34084
34097
  }
34085
34098
  function strandedReason(worktreePath, cause) {
34086
- if (!existsSync83(join97(worktreePath, ".git")))
34099
+ if (!existsSync83(join98(worktreePath, ".git")))
34087
34100
  return "its .git link is already gone";
34088
34101
  if (/not a working tree|not a git repository/i.test(reason2(cause)))
34089
34102
  return "git no longer recognises it as a working tree";
@@ -38184,7 +38197,7 @@ import { existsSync as existsSync93 } from "fs";
38184
38197
 
38185
38198
  // src/commands/sessions/daemon/worktree/carryTranscriptToTree.ts
38186
38199
  import { copyFileSync as copyFileSync7, existsSync as existsSync92, mkdirSync as mkdirSync35 } from "fs";
38187
- import { join as join99 } from "path";
38200
+ import { join as join100 } from "path";
38188
38201
  function carryTranscriptToTree(claudeSessionId, fromCwd, toCwd) {
38189
38202
  const dir = projectDirForCwd(toCwd);
38190
38203
  if (dir === projectDirForCwd(fromCwd)) {
@@ -38193,7 +38206,7 @@ function carryTranscriptToTree(claudeSessionId, fromCwd, toCwd) {
38193
38206
  );
38194
38207
  return;
38195
38208
  }
38196
- const dest = join99(dir, `${claudeSessionId}.jsonl`);
38209
+ const dest = join100(dir, `${claudeSessionId}.jsonl`);
38197
38210
  if (existsSync92(dest)) {
38198
38211
  daemonLog(`transcript ${claudeSessionId} already present in ${dir}`);
38199
38212
  return;
@@ -39301,9 +39314,9 @@ function buildLimitsSegment(rateLimits) {
39301
39314
 
39302
39315
  // src/commands/readGitBranch.ts
39303
39316
  import { readFileSync as readFileSync62, statSync as statSync16 } from "fs";
39304
- import { isAbsolute as isAbsolute5, join as join100, resolve as resolve23 } from "path";
39317
+ import { isAbsolute as isAbsolute5, join as join101, resolve as resolve23 } from "path";
39305
39318
  function resolveGitDir(cwd) {
39306
- const dotGit = join100(cwd, ".git");
39319
+ const dotGit = join101(cwd, ".git");
39307
39320
  let stat4;
39308
39321
  try {
39309
39322
  stat4 = statSync16(dotGit);
@@ -39333,7 +39346,7 @@ function readGitBranch(cwd) {
39333
39346
  }
39334
39347
  let head;
39335
39348
  try {
39336
- head = readFileSync62(join100(gitDir, "HEAD"), "utf8");
39349
+ head = readFileSync62(join101(gitDir, "HEAD"), "utf8");
39337
39350
  } catch {
39338
39351
  return null;
39339
39352
  }