staklink 0.3.15 → 0.3.16

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.
@@ -33928,7 +33928,7 @@ var SSEManager = class {
33928
33928
  var sseManager = new SSEManager();
33929
33929
 
33930
33930
  // src/proxy/version.ts
33931
- var VERSION = "0.3.15";
33931
+ var VERSION = "0.3.16";
33932
33932
 
33933
33933
  // node_modules/uuid/dist/esm/stringify.js
33934
33934
  var byteToHex = [];
@@ -80323,6 +80323,7 @@ async function startProxyServer() {
80323
80323
  const shouldCommit = req.query.commit === "true";
80324
80324
  const commits = [];
80325
80325
  const prs = {};
80326
+ const branches = {};
80326
80327
  console.log(`=> Commit requested: ${shouldCommit}`);
80327
80328
  console.log(`=> PR creation requested: ${createPR}`);
80328
80329
  console.log(
@@ -80346,14 +80347,17 @@ async function startProxyServer() {
80346
80347
  await repo.checkoutNew(uniqueBranchName);
80347
80348
  }
80348
80349
  await repo.addAll();
80349
- const currentBranch = (await repo.printCurrentBranch()).trim();
80350
- console.log(`=> COMMIT to ${r.url} on branch: ${currentBranch}`);
80350
+ const currentBranch2 = (await repo.printCurrentBranch()).trim();
80351
+ console.log(`=> COMMIT to ${r.url} on branch: ${currentBranch2}`);
80351
80352
  await repo.commitWithCredentials(r.commit_name, code.git_credentials);
80352
80353
  }
80353
80354
  console.log(`=> PUSH to ${r.url}`);
80354
80355
  await repo.pushCurrentBranchWithCredentials(code.git_credentials);
80355
80356
  const link = await repo.getLatestCommitLink();
80356
80357
  commits.push(link);
80358
+ const currentBranch = (await repo.printCurrentBranch()).trim();
80359
+ branches[repoName] = currentBranch;
80360
+ console.log(`=> Branch for ${repoName}: ${currentBranch}`);
80357
80361
  if (stashCreated) {
80358
80362
  await repo.popDevcontainerStash();
80359
80363
  }
@@ -80372,10 +80376,10 @@ async function startProxyServer() {
80372
80376
  const currentBranchRaw = await repo.execCommand(
80373
80377
  "git rev-parse --abbrev-ref HEAD"
80374
80378
  );
80375
- const currentBranch = currentBranchRaw.trim();
80376
- console.log(`=> Current branch: ${currentBranch}`);
80379
+ const currentBranch2 = currentBranchRaw.trim();
80380
+ console.log(`=> Current branch: ${currentBranch2}`);
80377
80381
  const baseBranch = r.base_branch || "main";
80378
- if (currentBranch === baseBranch) {
80382
+ if (currentBranch2 === baseBranch) {
80379
80383
  console.log(
80380
80384
  `=> Cannot create PR: currently on base branch (${baseBranch})`
80381
80385
  );
@@ -80388,9 +80392,9 @@ async function startProxyServer() {
80388
80392
  );
80389
80393
  if (!diff.trim()) {
80390
80394
  console.log(
80391
- `=> No commits between ${baseBranch} and ${currentBranch}`
80395
+ `=> No commits between ${baseBranch} and ${currentBranch2}`
80392
80396
  );
80393
- prs[repoName] = `Error: No commits to create PR - ${currentBranch} is up to date with ${baseBranch}`;
80397
+ prs[repoName] = `Error: No commits to create PR - ${currentBranch2} is up to date with ${baseBranch}`;
80394
80398
  continue;
80395
80399
  }
80396
80400
  console.log(`=> Commits to include in PR:
@@ -80402,7 +80406,7 @@ ${diff.trim()}`);
80402
80406
  await new Promise((resolve3) => setTimeout(resolve3, 2e3));
80403
80407
  const gh = new GitHubCLI(
80404
80408
  code.git_credentials.auth_data.token,
80405
- currentBranch,
80409
+ currentBranch2,
80406
80410
  repoLocation
80407
80411
  );
80408
80412
  await gh.init();
@@ -80412,8 +80416,8 @@ ${diff.trim()}`);
80412
80416
  prs[repoName] = existingPR.url;
80413
80417
  } else {
80414
80418
  const pr = await gh.createPR({
80415
- title: r.commit_name || `Changes from ${currentBranch}`,
80416
- body: `Automated PR from branch ${currentBranch}`,
80419
+ title: r.commit_name || `Changes from ${currentBranch2}`,
80420
+ body: `Automated PR from branch ${currentBranch2}`,
80417
80421
  base: baseBranch,
80418
80422
  draft: false
80419
80423
  });
@@ -80427,7 +80431,7 @@ ${diff.trim()}`);
80427
80431
  }
80428
80432
  }
80429
80433
  }
80430
- const response = { success: true, commits };
80434
+ const response = { success: true, commits, branches };
80431
80435
  if (createPR) {
80432
80436
  response.prs = prs;
80433
80437
  }
@@ -10905,7 +10905,7 @@ var glob = Object.assign(glob_, {
10905
10905
  glob.glob = glob;
10906
10906
 
10907
10907
  // src/proxy/version.ts
10908
- var VERSION = "0.3.15";
10908
+ var VERSION = "0.3.16";
10909
10909
 
10910
10910
  // src/cli.ts
10911
10911
  var STAKLINK_PROXY = "staklink-proxy";
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "staklink",
3
3
  "displayName": "staklink",
4
4
  "description": "staklink process manager",
5
- "version": "0.3.15",
5
+ "version": "0.3.16",
6
6
  "type": "module",
7
7
  "publisher": "stakwork",
8
8
  "engines": {