branch-nexus 1.1.0 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
File without changes
package/dist/cli.d.ts CHANGED
File without changes
package/dist/cli.js CHANGED
@@ -626,14 +626,7 @@ function buildLayoutCommands(sessionName, layout, panePaths, colorTheme, paneBra
626
626
  if (customName !== "") return `${customName} [${branch}]`;
627
627
  return `Pane ${index} [${branch}]`;
628
628
  }
629
- commands.push([
630
- "tmux",
631
- "select-pane",
632
- "-t",
633
- `${sessionName}:0.0`,
634
- "-T",
635
- paneTitle(0)
636
- ]);
629
+ commands.push(["tmux", "select-pane", "-t", `${sessionName}:0.0`, "-T", paneTitle(0)]);
637
630
  for (let index = 1; index < panes; index++) {
638
631
  let splitFlag;
639
632
  if (layout === "horizontal") {
@@ -683,14 +676,7 @@ function buildLayoutCommands(sessionName, layout, panePaths, colorTheme, paneBra
683
676
  for (let i = 0; i < panes; i++) {
684
677
  const cmd = startupCommands[i];
685
678
  if (cmd !== void 0 && cmd.trim() !== "") {
686
- commands.push([
687
- "tmux",
688
- "send-keys",
689
- "-t",
690
- `${sessionName}:0.${i}`,
691
- cmd.trim(),
692
- "Enter"
693
- ]);
679
+ commands.push(["tmux", "send-keys", "-t", `${sessionName}:0.${i}`, cmd.trim(), "Enter"]);
694
680
  }
695
681
  }
696
682
  }
@@ -860,7 +846,15 @@ var WorktreeManager = class {
860
846
  return managed;
861
847
  }
862
848
  logger.warn(`Removing stale worktree at ${existingPath}`);
863
- const removeCmd = ["git", "-C", repoPath, "worktree", "remove", "--force", this.commandPath(existingPath)];
849
+ const removeCmd = [
850
+ "git",
851
+ "-C",
852
+ repoPath,
853
+ "worktree",
854
+ "remove",
855
+ "--force",
856
+ this.commandPath(existingPath)
857
+ ];
864
858
  try {
865
859
  if (distribution !== void 0 && distribution !== "") {
866
860
  await runCommandViaWSL(distribution, removeCmd);
@@ -1027,7 +1021,9 @@ function posixPath(path3) {
1027
1021
  // ts-src/github/api.ts
1028
1022
  init_esm_shims();
1029
1023
  function parseGitHubUrl(url) {
1030
- const httpsMatch = url.match(/^https?:\/\/(?:[^@]+@)?github\.com\/([^/]+)\/([^/\s]+?)(?:\.git)?$/);
1024
+ const httpsMatch = url.match(
1025
+ /^https?:\/\/(?:[^@]+@)?github\.com\/([^/]+)\/([^/\s]+?)(?:\.git)?$/
1026
+ );
1031
1027
  if (httpsMatch) {
1032
1028
  return { owner: httpsMatch[1], repo: httpsMatch[2] };
1033
1029
  }
@@ -1541,9 +1537,7 @@ async function showGitHubBrowser(token) {
1541
1537
  function draw() {
1542
1538
  process.stdout.write(first ? "\x1B[2J\x1B[H" : "\x1B[H");
1543
1539
  first = false;
1544
- process.stdout.write(
1545
- state.filtering ? "\x1B[?25h" : "\x1B[?25l"
1546
- );
1540
+ process.stdout.write(state.filtering ? "\x1B[?25h" : "\x1B[?25l");
1547
1541
  process.stdout.write(renderBrowser(state, pal) + "\x1B[J\n");
1548
1542
  }
1549
1543
  readline.emitKeypressEvents(process.stdin);
@@ -1570,9 +1564,7 @@ async function showGitHubBrowser(token) {
1570
1564
  state.filteredRepos = [...state.repos];
1571
1565
  } else {
1572
1566
  const lower = state.filterText.toLowerCase();
1573
- state.filteredRepos = state.repos.filter(
1574
- (r) => r.fullName.toLowerCase().includes(lower)
1575
- );
1567
+ state.filteredRepos = state.repos.filter((r) => r.fullName.toLowerCase().includes(lower));
1576
1568
  }
1577
1569
  state.selectedIndex = 0;
1578
1570
  state.scrollOffset = 0;
@@ -1664,9 +1656,7 @@ async function showGitHubBrowser(token) {
1664
1656
  state.repos = repos;
1665
1657
  state.filteredRepos = [...repos];
1666
1658
  state.loading = false;
1667
- updateGithubRepoCache(
1668
- repos.map((r) => ({ full_name: r.fullName, clone_url: r.cloneUrl }))
1669
- );
1659
+ updateGithubRepoCache(repos.map((r) => ({ full_name: r.fullName, clone_url: r.cloneUrl })));
1670
1660
  draw();
1671
1661
  }).catch((error) => {
1672
1662
  state.loading = false;
@@ -1798,7 +1788,13 @@ function renderPanel(state) {
1798
1788
  lines.push(boxMid2(W));
1799
1789
  lines.push(boxLine2("", W));
1800
1790
  const tokLabel = state.hasToken ? "Evet" : "Hay\u0131r";
1801
- lines.push(fRow(FIELD.HAS_TOKEN, "GitHub Token", selectDisplay(tokLabel, state.focusIndex === FIELD.HAS_TOKEN, pal)));
1791
+ lines.push(
1792
+ fRow(
1793
+ FIELD.HAS_TOKEN,
1794
+ "GitHub Token",
1795
+ selectDisplay(tokLabel, state.focusIndex === FIELD.HAS_TOKEN, pal)
1796
+ )
1797
+ );
1802
1798
  if (state.hasToken) {
1803
1799
  let tv;
1804
1800
  if (state.focusIndex === FIELD.TOKEN && state.editing) {
@@ -1821,12 +1817,36 @@ function renderPanel(state) {
1821
1817
  rv = chalk9.dim("(Enter ile girin)");
1822
1818
  }
1823
1819
  lines.push(fRow(FIELD.REPO, "Repository URL", rv));
1824
- lines.push(fRow(FIELD.LAYOUT, "Layout", selectDisplay(LAYOUTS[state.layoutIndex].label, state.focusIndex === FIELD.LAYOUT, pal)));
1825
- lines.push(fRow(FIELD.PANES, "Pane Say\u0131s\u0131", selectDisplay(String(PANE_OPTIONS[state.panesIndex]), state.focusIndex === FIELD.PANES, pal)));
1826
- lines.push(fRow(FIELD.CLEANUP, "Cleanup", selectDisplay(CLEANUP_OPTIONS[state.cleanupIndex].label, state.focusIndex === FIELD.CLEANUP, pal)));
1820
+ lines.push(
1821
+ fRow(
1822
+ FIELD.LAYOUT,
1823
+ "Layout",
1824
+ selectDisplay(LAYOUTS[state.layoutIndex].label, state.focusIndex === FIELD.LAYOUT, pal)
1825
+ )
1826
+ );
1827
+ lines.push(
1828
+ fRow(
1829
+ FIELD.PANES,
1830
+ "Pane Say\u0131s\u0131",
1831
+ selectDisplay(String(PANE_OPTIONS[state.panesIndex]), state.focusIndex === FIELD.PANES, pal)
1832
+ )
1833
+ );
1834
+ lines.push(
1835
+ fRow(
1836
+ FIELD.CLEANUP,
1837
+ "Cleanup",
1838
+ selectDisplay(
1839
+ CLEANUP_OPTIONS[state.cleanupIndex].label,
1840
+ state.focusIndex === FIELD.CLEANUP,
1841
+ pal
1842
+ )
1843
+ )
1844
+ );
1827
1845
  const colorLabel = COLOR_OPTIONS[state.colorIndex].label;
1828
1846
  const colorPreview = pal.primary("\u25A0 ") + colorLabel;
1829
- lines.push(fRow(FIELD.COLOR, "Renk", selectDisplay(colorPreview, state.focusIndex === FIELD.COLOR, pal)));
1847
+ lines.push(
1848
+ fRow(FIELD.COLOR, "Renk", selectDisplay(colorPreview, state.focusIndex === FIELD.COLOR, pal))
1849
+ );
1830
1850
  lines.push(boxLine2("", W));
1831
1851
  if (state.error !== "") {
1832
1852
  lines.push(boxLine2(" " + chalk9.red("\u26A0 " + state.error), W));
@@ -2713,7 +2733,9 @@ async function runCommand2(options) {
2713
2733
  return;
2714
2734
  } catch (error) {
2715
2735
  s2.stop("Geri y\xFCkleme ba\u015Far\u0131s\u0131z, yeni oturum ba\u015Flat\u0131l\u0131yor");
2716
- logger.warn(`Session restore failed: ${error instanceof Error ? error.message : String(error)}`);
2736
+ logger.warn(
2737
+ `Session restore failed: ${error instanceof Error ? error.message : String(error)}`
2738
+ );
2717
2739
  }
2718
2740
  }
2719
2741
  }
@@ -3064,7 +3086,9 @@ async function cleanupWorktreeDir(basePath, distribution) {
3064
3086
  const repoDirs = readdirSync(basePath, { withFileTypes: true }).filter((d) => d.isDirectory());
3065
3087
  for (const repoDir of repoDirs) {
3066
3088
  const repoWorktreeDir = join(basePath, repoDir.name);
3067
- const paneDirs = readdirSync(repoWorktreeDir, { withFileTypes: true }).filter((d) => d.isDirectory());
3089
+ const paneDirs = readdirSync(repoWorktreeDir, { withFileTypes: true }).filter(
3090
+ (d) => d.isDirectory()
3091
+ );
3068
3092
  for (const paneDir of paneDirs) {
3069
3093
  const panePath = join(repoWorktreeDir, paneDir.name);
3070
3094
  const gitFile = join(panePath, ".git");
@@ -3092,7 +3116,9 @@ async function cleanupWorktreeDir(basePath, distribution) {
3092
3116
  }
3093
3117
  }
3094
3118
  } catch (error) {
3095
- logger.warn(`Error cleaning worktree ${panePath}: ${error instanceof Error ? error.message : String(error)}`);
3119
+ logger.warn(
3120
+ `Error cleaning worktree ${panePath}: ${error instanceof Error ? error.message : String(error)}`
3121
+ );
3096
3122
  }
3097
3123
  }
3098
3124
  try {
@@ -3235,7 +3261,9 @@ Ge\xE7ersiz preset verisi: ${msg}
3235
3261
  console.log(chalk9.green(`
3236
3262
  \u2713 Preset "${name}" mevcut ayarlardan olu\u015Fturuldu.`));
3237
3263
  console.log(
3238
- chalk9.dim(` layout: ${preset.layout}, panes: ${preset.panes}, cleanup: ${preset.cleanup}`)
3264
+ chalk9.dim(
3265
+ ` layout: ${preset.layout}, panes: ${preset.panes}, cleanup: ${preset.cleanup}`
3266
+ )
3239
3267
  );
3240
3268
  console.log();
3241
3269
  }
@@ -3251,7 +3279,9 @@ Ge\xE7ersiz preset verisi: ${msg}
3251
3279
  console.log(chalk9.green(`
3252
3280
  \u2713 Preset "${name}" y\xFCklendi.`));
3253
3281
  console.log(
3254
- chalk9.dim(` layout: ${preset.layout}, panes: ${preset.panes}, cleanup: ${preset.cleanup}`)
3282
+ chalk9.dim(
3283
+ ` layout: ${preset.layout}, panes: ${preset.panes}, cleanup: ${preset.cleanup}`
3284
+ )
3255
3285
  );
3256
3286
  console.log();
3257
3287
  } catch (error) {
@@ -3287,9 +3317,11 @@ Preset "${name}" bulunamad\u0131.
3287
3317
  }
3288
3318
  try {
3289
3319
  renamePreset(name, extra);
3290
- console.log(chalk9.green(`
3320
+ console.log(
3321
+ chalk9.green(`
3291
3322
  \u2713 Preset "${name}" \u2192 "${extra}" olarak yeniden adland\u0131r\u0131ld\u0131.
3292
- `));
3323
+ `)
3324
+ );
3293
3325
  } catch (error) {
3294
3326
  const msg = error instanceof Error ? error.message : String(error);
3295
3327
  console.error(chalk9.red(`
@@ -3390,9 +3422,7 @@ async function statusCommand() {
3390
3422
  const hasToken = config.githubToken !== "";
3391
3423
  const envToken = process.env.BRANCHNEXUS_GH_TOKEN;
3392
3424
  const tokenSource = envToken !== void 0 && envToken !== "" ? " (env)" : " (config)";
3393
- console.log(
3394
- hasToken ? chalk9.green(` \u25CF Tan\u0131ml\u0131${tokenSource}`) : chalk9.dim(" \u25CB Tan\u0131ml\u0131 de\u011Fil")
3395
- );
3425
+ console.log(hasToken ? chalk9.green(` \u25CF Tan\u0131ml\u0131${tokenSource}`) : chalk9.dim(" \u25CB Tan\u0131ml\u0131 de\u011Fil"));
3396
3426
  console.log();
3397
3427
  console.log(chalk9.bold("Ayarlar:"));
3398
3428
  console.log(chalk9.dim(" Layout: ") + config.defaultLayout);