@h-rig/cli 0.0.6-alpha.39 → 0.0.6-alpha.40

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/bin/rig.js CHANGED
@@ -9698,6 +9698,7 @@ import {
9698
9698
  import {
9699
9699
  closeIssueAfterMergedPr,
9700
9700
  commitRunChanges,
9701
+ pushBranchSyncedWithOrigin,
9701
9702
  runPrAutomation
9702
9703
  } from "@rig/runtime/control-plane/native/pr-automation";
9703
9704
  function looksLikeGitHubToken(value) {
@@ -9889,12 +9890,6 @@ function appendPiStageLog(input) {
9889
9890
  });
9890
9891
  emitServerRunEvent({ type: "log", runId: input.runId, title: input.stage });
9891
9892
  }
9892
- async function runCheckedCommand(command, args, cwd, label = "git") {
9893
- const result = await command(args, { cwd });
9894
- if (result.exitCode !== 0) {
9895
- throw new Error(`${label} ${args.join(" ")} failed (${result.exitCode}): ${result.stderr ?? result.stdout ?? ""}`.trim());
9896
- }
9897
- }
9898
9893
  function createCommandRunner(binary) {
9899
9894
  return async (args, options) => {
9900
9895
  const child = spawn2(binary, [...args], {
@@ -9971,7 +9966,7 @@ async function runTaskRunPostValidationLifecycle(input) {
9971
9966
  command: gitCommand
9972
9967
  });
9973
9968
  stage("Commit", commit.committed ? "Committed run workspace changes." : "No workspace changes to commit.", "completed", "tool");
9974
- await runCheckedCommand(gitCommand, ["push", "--set-upstream", "origin", branch], workspace, "git");
9969
+ await pushBranchSyncedWithOrigin({ projectRoot: workspace, branch, gitCommand });
9975
9970
  stage("Open PR", `Opening PR from ${branch}.`, "running", "tool");
9976
9971
  const pr = await prAutomation({
9977
9972
  projectRoot: workspace,
@@ -44,6 +44,7 @@ import {
44
44
  import {
45
45
  closeIssueAfterMergedPr,
46
46
  commitRunChanges,
47
+ pushBranchSyncedWithOrigin,
47
48
  runPrAutomation
48
49
  } from "@rig/runtime/control-plane/native/pr-automation";
49
50
 
@@ -808,12 +809,6 @@ function appendPiStageLog(input) {
808
809
  });
809
810
  emitServerRunEvent({ type: "log", runId: input.runId, title: input.stage });
810
811
  }
811
- async function runCheckedCommand(command, args, cwd, label = "git") {
812
- const result = await command(args, { cwd });
813
- if (result.exitCode !== 0) {
814
- throw new Error(`${label} ${args.join(" ")} failed (${result.exitCode}): ${result.stderr ?? result.stdout ?? ""}`.trim());
815
- }
816
- }
817
812
  function createCommandRunner(binary) {
818
813
  return async (args, options) => {
819
814
  const child = spawn(binary, [...args], {
@@ -890,7 +885,7 @@ async function runTaskRunPostValidationLifecycle(input) {
890
885
  command: gitCommand
891
886
  });
892
887
  stage("Commit", commit.committed ? "Committed run workspace changes." : "No workspace changes to commit.", "completed", "tool");
893
- await runCheckedCommand(gitCommand, ["push", "--set-upstream", "origin", branch], workspace, "git");
888
+ await pushBranchSyncedWithOrigin({ projectRoot: workspace, branch, gitCommand });
894
889
  stage("Open PR", `Opening PR from ${branch}.`, "running", "tool");
895
890
  const pr = await prAutomation({
896
891
  projectRoot: workspace,
@@ -9504,6 +9504,7 @@ import {
9504
9504
  import {
9505
9505
  closeIssueAfterMergedPr,
9506
9506
  commitRunChanges,
9507
+ pushBranchSyncedWithOrigin,
9507
9508
  runPrAutomation
9508
9509
  } from "@rig/runtime/control-plane/native/pr-automation";
9509
9510
  function looksLikeGitHubToken(value) {
@@ -9695,12 +9696,6 @@ function appendPiStageLog(input) {
9695
9696
  });
9696
9697
  emitServerRunEvent({ type: "log", runId: input.runId, title: input.stage });
9697
9698
  }
9698
- async function runCheckedCommand(command, args, cwd, label = "git") {
9699
- const result = await command(args, { cwd });
9700
- if (result.exitCode !== 0) {
9701
- throw new Error(`${label} ${args.join(" ")} failed (${result.exitCode}): ${result.stderr ?? result.stdout ?? ""}`.trim());
9702
- }
9703
- }
9704
9699
  function createCommandRunner(binary) {
9705
9700
  return async (args, options) => {
9706
9701
  const child = spawn2(binary, [...args], {
@@ -9777,7 +9772,7 @@ async function runTaskRunPostValidationLifecycle(input) {
9777
9772
  command: gitCommand
9778
9773
  });
9779
9774
  stage("Commit", commit.committed ? "Committed run workspace changes." : "No workspace changes to commit.", "completed", "tool");
9780
- await runCheckedCommand(gitCommand, ["push", "--set-upstream", "origin", branch], workspace, "git");
9775
+ await pushBranchSyncedWithOrigin({ projectRoot: workspace, branch, gitCommand });
9781
9776
  stage("Open PR", `Opening PR from ${branch}.`, "running", "tool");
9782
9777
  const pr = await prAutomation({
9783
9778
  projectRoot: workspace,
package/dist/src/index.js CHANGED
@@ -9694,6 +9694,7 @@ import {
9694
9694
  import {
9695
9695
  closeIssueAfterMergedPr,
9696
9696
  commitRunChanges,
9697
+ pushBranchSyncedWithOrigin,
9697
9698
  runPrAutomation
9698
9699
  } from "@rig/runtime/control-plane/native/pr-automation";
9699
9700
  function looksLikeGitHubToken(value) {
@@ -9885,12 +9886,6 @@ function appendPiStageLog(input) {
9885
9886
  });
9886
9887
  emitServerRunEvent({ type: "log", runId: input.runId, title: input.stage });
9887
9888
  }
9888
- async function runCheckedCommand(command, args, cwd, label = "git") {
9889
- const result = await command(args, { cwd });
9890
- if (result.exitCode !== 0) {
9891
- throw new Error(`${label} ${args.join(" ")} failed (${result.exitCode}): ${result.stderr ?? result.stdout ?? ""}`.trim());
9892
- }
9893
- }
9894
9889
  function createCommandRunner(binary) {
9895
9890
  return async (args, options) => {
9896
9891
  const child = spawn2(binary, [...args], {
@@ -9967,7 +9962,7 @@ async function runTaskRunPostValidationLifecycle(input) {
9967
9962
  command: gitCommand
9968
9963
  });
9969
9964
  stage("Commit", commit.committed ? "Committed run workspace changes." : "No workspace changes to commit.", "completed", "tool");
9970
- await runCheckedCommand(gitCommand, ["push", "--set-upstream", "origin", branch], workspace, "git");
9965
+ await pushBranchSyncedWithOrigin({ projectRoot: workspace, branch, gitCommand });
9971
9966
  stage("Open PR", `Opening PR from ${branch}.`, "running", "tool");
9972
9967
  const pr = await prAutomation({
9973
9968
  projectRoot: workspace,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@h-rig/cli",
3
- "version": "0.0.6-alpha.39",
3
+ "version": "0.0.6-alpha.40",
4
4
  "type": "module",
5
5
  "description": "Rig package",
6
6
  "license": "UNLICENSED",
@@ -23,11 +23,11 @@
23
23
  },
24
24
  "dependencies": {
25
25
  "@clack/prompts": "^1.2.0",
26
- "@earendil-works/pi-coding-agent": "npm:@h-rig/pi-coding-agent@0.0.6-alpha.39",
27
- "@rig/core": "npm:@h-rig/core@0.0.6-alpha.39",
28
- "@rig/runtime": "npm:@h-rig/runtime@0.0.6-alpha.39",
29
- "@rig/client": "npm:@h-rig/client@0.0.6-alpha.39",
30
- "@rig/server": "npm:@h-rig/server@0.0.6-alpha.39",
26
+ "@earendil-works/pi-coding-agent": "npm:@h-rig/pi-coding-agent@0.0.6-alpha.40",
27
+ "@rig/core": "npm:@h-rig/core@0.0.6-alpha.40",
28
+ "@rig/runtime": "npm:@h-rig/runtime@0.0.6-alpha.40",
29
+ "@rig/client": "npm:@h-rig/client@0.0.6-alpha.40",
30
+ "@rig/server": "npm:@h-rig/server@0.0.6-alpha.40",
31
31
  "picocolors": "^1.1.1"
32
32
  }
33
33
  }