@sideboard-ai/core 0.1.49 → 0.1.50

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.cjs CHANGED
@@ -7927,6 +7927,15 @@ async function resolveMergeBase(worktreePath, base, repoPath) {
7927
7927
  return mb || baseRef;
7928
7928
  }
7929
7929
  async function countUnpushedCommits(worktreePath) {
7930
+ const head = await git(["rev-parse", "--abbrev-ref", "HEAD"], worktreePath, {
7931
+ reject: false
7932
+ });
7933
+ const branch = head.stdout.trim();
7934
+ if (branch && branch !== "HEAD") {
7935
+ await git(["fetch", "origin", branch, "--quiet"], worktreePath, {
7936
+ reject: false
7937
+ });
7938
+ }
7930
7939
  const upstream = await git(
7931
7940
  ["rev-list", "--count", "@{upstream}..HEAD"],
7932
7941
  worktreePath,
@@ -7936,10 +7945,6 @@ async function countUnpushedCommits(worktreePath) {
7936
7945
  const n2 = Number(upstream.stdout.trim());
7937
7946
  return Number.isFinite(n2) ? n2 : 0;
7938
7947
  }
7939
- const head = await git(["rev-parse", "--abbrev-ref", "HEAD"], worktreePath, {
7940
- reject: false
7941
- });
7942
- const branch = head.stdout.trim();
7943
7948
  if (!branch || branch === "HEAD") return 0;
7944
7949
  const remote = await git(
7945
7950
  ["rev-list", "--count", `origin/${branch}..HEAD`],
package/dist/index.js CHANGED
@@ -1433,6 +1433,15 @@ async function resolveMergeBase(worktreePath, base, repoPath) {
1433
1433
  return mb || baseRef;
1434
1434
  }
1435
1435
  async function countUnpushedCommits(worktreePath) {
1436
+ const head = await git(["rev-parse", "--abbrev-ref", "HEAD"], worktreePath, {
1437
+ reject: false
1438
+ });
1439
+ const branch = head.stdout.trim();
1440
+ if (branch && branch !== "HEAD") {
1441
+ await git(["fetch", "origin", branch, "--quiet"], worktreePath, {
1442
+ reject: false
1443
+ });
1444
+ }
1436
1445
  const upstream = await git(
1437
1446
  ["rev-list", "--count", "@{upstream}..HEAD"],
1438
1447
  worktreePath,
@@ -1442,10 +1451,6 @@ async function countUnpushedCommits(worktreePath) {
1442
1451
  const n2 = Number(upstream.stdout.trim());
1443
1452
  return Number.isFinite(n2) ? n2 : 0;
1444
1453
  }
1445
- const head = await git(["rev-parse", "--abbrev-ref", "HEAD"], worktreePath, {
1446
- reject: false
1447
- });
1448
- const branch = head.stdout.trim();
1449
1454
  if (!branch || branch === "HEAD") return 0;
1450
1455
  const remote = await git(
1451
1456
  ["rev-list", "--count", `origin/${branch}..HEAD`],
@@ -8290,6 +8290,15 @@ async function resolveMergeBase(worktreePath, base, repoPath) {
8290
8290
  return mb || baseRef;
8291
8291
  }
8292
8292
  async function countUnpushedCommits(worktreePath) {
8293
+ const head = await git(["rev-parse", "--abbrev-ref", "HEAD"], worktreePath, {
8294
+ reject: false
8295
+ });
8296
+ const branch = head.stdout.trim();
8297
+ if (branch && branch !== "HEAD") {
8298
+ await git(["fetch", "origin", branch, "--quiet"], worktreePath, {
8299
+ reject: false
8300
+ });
8301
+ }
8293
8302
  const upstream = await git(
8294
8303
  ["rev-list", "--count", "@{upstream}..HEAD"],
8295
8304
  worktreePath,
@@ -8299,10 +8308,6 @@ async function countUnpushedCommits(worktreePath) {
8299
8308
  const n2 = Number(upstream.stdout.trim());
8300
8309
  return Number.isFinite(n2) ? n2 : 0;
8301
8310
  }
8302
- const head = await git(["rev-parse", "--abbrev-ref", "HEAD"], worktreePath, {
8303
- reject: false
8304
- });
8305
- const branch = head.stdout.trim();
8306
8311
  if (!branch || branch === "HEAD") return 0;
8307
8312
  const remote = await git(
8308
8313
  ["rev-list", "--count", `origin/${branch}..HEAD`],
@@ -2294,6 +2294,15 @@ async function resolveMergeBase(worktreePath, base, repoPath) {
2294
2294
  return mb || baseRef;
2295
2295
  }
2296
2296
  async function countUnpushedCommits(worktreePath) {
2297
+ const head = await git(["rev-parse", "--abbrev-ref", "HEAD"], worktreePath, {
2298
+ reject: false
2299
+ });
2300
+ const branch = head.stdout.trim();
2301
+ if (branch && branch !== "HEAD") {
2302
+ await git(["fetch", "origin", branch, "--quiet"], worktreePath, {
2303
+ reject: false
2304
+ });
2305
+ }
2297
2306
  const upstream = await git(
2298
2307
  ["rev-list", "--count", "@{upstream}..HEAD"],
2299
2308
  worktreePath,
@@ -2303,10 +2312,6 @@ async function countUnpushedCommits(worktreePath) {
2303
2312
  const n2 = Number(upstream.stdout.trim());
2304
2313
  return Number.isFinite(n2) ? n2 : 0;
2305
2314
  }
2306
- const head = await git(["rev-parse", "--abbrev-ref", "HEAD"], worktreePath, {
2307
- reject: false
2308
- });
2309
- const branch = head.stdout.trim();
2310
2315
  if (!branch || branch === "HEAD") return 0;
2311
2316
  const remote = await git(
2312
2317
  ["rev-list", "--count", `origin/${branch}..HEAD`],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sideboard-ai/core",
3
- "version": "0.1.49",
3
+ "version": "0.1.50",
4
4
  "description": "Sideboard core — orchestration, agents, git worktrees, MCP server",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",