bamboo-agents 0.1.5-dev.17 → 0.1.5-dev.18

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/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.5-dev.17
1
+ 0.1.5-dev.18
package/dist/index.js CHANGED
@@ -3037,7 +3037,7 @@ var VERSION;
3037
3037
  var init_version = __esm({
3038
3038
  "src/version.ts"() {
3039
3039
  "use strict";
3040
- VERSION = "0.1.5-dev.17";
3040
+ VERSION = "0.1.5-dev.18";
3041
3041
  }
3042
3042
  });
3043
3043
 
@@ -12277,9 +12277,8 @@ var init_provision_phase = __esm({
12277
12277
  } catch (err) {
12278
12278
  if (err instanceof ApiError && err.status === 401) {
12279
12279
  return {
12280
- status: "needs_action",
12281
- summary: "session expired",
12282
- reason: "Your Bamboo session expired. Run `bamboo-agents login` to refresh, then re-run."
12280
+ status: "needs_relogin",
12281
+ summary: "session expired \u2014 refreshing"
12283
12282
  };
12284
12283
  }
12285
12284
  return {
@@ -12664,7 +12663,26 @@ async function runOrchestrator() {
12664
12663
  cwd: process.cwd()
12665
12664
  };
12666
12665
  for (const phase of PHASES) {
12667
- const probe = await phase.probe(ctx);
12666
+ let probe = await phase.probe(ctx);
12667
+ if (probe.status === "needs_relogin") {
12668
+ console.log("");
12669
+ console.log(
12670
+ " Your Bamboo session expired \u2014 refreshing in your browser\u2026"
12671
+ );
12672
+ console.log("");
12673
+ const reloginResult = await loginSpec.execute(ctx);
12674
+ if (reloginResult.kind === "needs_action") {
12675
+ printNeedsAction(reloginResult.reason);
12676
+ process.exit(2);
12677
+ }
12678
+ probe = await phase.probe(ctx);
12679
+ if (probe.status === "needs_relogin") {
12680
+ printNeedsAction(
12681
+ "Couldn't refresh your Bamboo session. Try again in a minute, or run `bamboo-agents doctor`."
12682
+ );
12683
+ process.exit(2);
12684
+ }
12685
+ }
12668
12686
  if (probe.status === "needs_action") {
12669
12687
  printNeedsAction(probe.reason ?? probe.summary);
12670
12688
  process.exit(2);