git-stack-cli 2.5.0 → 2.5.2

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/js/index.js CHANGED
@@ -25202,17 +25202,17 @@ var require_utils4 = __commonJS((exports) => {
25202
25202
  Object.defineProperty(exports, "__esModule", { value: true });
25203
25203
  exports.shallowEqual = exports.assignUniqueKeysToParts = exports.DEFAULT_INTL_CONFIG = exports.invariantIntlContext = undefined;
25204
25204
  var tslib_1 = require_tslib();
25205
- var React11 = tslib_1.__importStar(react);
25205
+ var React12 = tslib_1.__importStar(react);
25206
25206
  var ecma402_abstract_1 = require_ecma402_abstract();
25207
25207
  var intl_1 = require_intl();
25208
25208
  function invariantIntlContext(intl) {
25209
25209
  (0, ecma402_abstract_1.invariant)(intl, "[React Intl] Could not find required `intl` object. " + "<IntlProvider> needs to exist in the component ancestry.");
25210
25210
  }
25211
25211
  exports.invariantIntlContext = invariantIntlContext;
25212
- exports.DEFAULT_INTL_CONFIG = tslib_1.__assign(tslib_1.__assign({}, intl_1.DEFAULT_INTL_CONFIG), { textComponent: React11.Fragment });
25212
+ exports.DEFAULT_INTL_CONFIG = tslib_1.__assign(tslib_1.__assign({}, intl_1.DEFAULT_INTL_CONFIG), { textComponent: React12.Fragment });
25213
25213
  function assignUniqueKeysToParts(formatXMLElementFn) {
25214
25214
  return function(parts) {
25215
- return formatXMLElementFn(React11.Children.toArray(parts));
25215
+ return formatXMLElementFn(React12.Children.toArray(parts));
25216
25216
  };
25217
25217
  }
25218
25218
  exports.assignUniqueKeysToParts = assignUniqueKeysToParts;
@@ -25246,13 +25246,13 @@ var require_injectIntl = __commonJS((exports) => {
25246
25246
  Object.defineProperty(exports, "__esModule", { value: true });
25247
25247
  exports.Context = exports.Provider = undefined;
25248
25248
  var tslib_1 = require_tslib();
25249
- var React11 = tslib_1.__importStar(react);
25249
+ var React12 = tslib_1.__importStar(react);
25250
25250
  var hoist_non_react_statics_1 = tslib_1.__importDefault(require_hoist_non_react_statics_cjs());
25251
25251
  var utils_1 = require_utils4();
25252
25252
  function getDisplayName(Component) {
25253
25253
  return Component.displayName || Component.name || "Component";
25254
25254
  }
25255
- var IntlContext = typeof window !== "undefined" && !window.__REACT_INTL_BYPASS_GLOBAL_CONTEXT__ ? window.__REACT_INTL_CONTEXT__ || (window.__REACT_INTL_CONTEXT__ = React11.createContext(null)) : React11.createContext(null);
25255
+ var IntlContext = typeof window !== "undefined" && !window.__REACT_INTL_BYPASS_GLOBAL_CONTEXT__ ? window.__REACT_INTL_CONTEXT__ || (window.__REACT_INTL_CONTEXT__ = React12.createContext(null)) : React12.createContext(null);
25256
25256
  var IntlConsumer = IntlContext.Consumer;
25257
25257
  var IntlProvider = IntlContext.Provider;
25258
25258
  exports.Provider = IntlProvider;
@@ -25260,20 +25260,20 @@ var require_injectIntl = __commonJS((exports) => {
25260
25260
  function injectIntl(WrappedComponent, options) {
25261
25261
  var _a = options || {}, _b = _a.intlPropName, intlPropName = _b === undefined ? "intl" : _b, _c = _a.forwardRef, forwardRef2 = _c === undefined ? false : _c, _d = _a.enforceContext, enforceContext = _d === undefined ? true : _d;
25262
25262
  var WithIntl = function(props) {
25263
- return React11.createElement(IntlConsumer, null, function(intl) {
25263
+ return React12.createElement(IntlConsumer, null, function(intl) {
25264
25264
  var _a2;
25265
25265
  if (enforceContext) {
25266
25266
  (0, utils_1.invariantIntlContext)(intl);
25267
25267
  }
25268
25268
  var intlProp = (_a2 = {}, _a2[intlPropName] = intl, _a2);
25269
- return React11.createElement(WrappedComponent, tslib_1.__assign({}, props, intlProp, { ref: forwardRef2 ? props.forwardedRef : null }));
25269
+ return React12.createElement(WrappedComponent, tslib_1.__assign({}, props, intlProp, { ref: forwardRef2 ? props.forwardedRef : null }));
25270
25270
  });
25271
25271
  };
25272
25272
  WithIntl.displayName = "injectIntl(".concat(getDisplayName(WrappedComponent), ")");
25273
25273
  WithIntl.WrappedComponent = WrappedComponent;
25274
25274
  if (forwardRef2) {
25275
- return (0, hoist_non_react_statics_1.default)(React11.forwardRef(function(props, ref) {
25276
- return React11.createElement(WithIntl, tslib_1.__assign({}, props, { forwardedRef: ref }));
25275
+ return (0, hoist_non_react_statics_1.default)(React12.forwardRef(function(props, ref) {
25276
+ return React12.createElement(WithIntl, tslib_1.__assign({}, props, { forwardedRef: ref }));
25277
25277
  }), WrappedComponent);
25278
25278
  }
25279
25279
  return (0, hoist_non_react_statics_1.default)(WithIntl, WrappedComponent);
@@ -25286,11 +25286,11 @@ var require_useIntl = __commonJS((exports) => {
25286
25286
  var react = __toESM(require_react(), 1);
25287
25287
  Object.defineProperty(exports, "__esModule", { value: true });
25288
25288
  var tslib_1 = require_tslib();
25289
- var React11 = tslib_1.__importStar(react);
25289
+ var React12 = tslib_1.__importStar(react);
25290
25290
  var injectIntl_1 = require_injectIntl();
25291
25291
  var utils_1 = require_utils4();
25292
25292
  function useIntl() {
25293
- var intl = React11.useContext(injectIntl_1.Context);
25293
+ var intl = React12.useContext(injectIntl_1.Context);
25294
25294
  (0, utils_1.invariantIntlContext)(intl);
25295
25295
  return intl;
25296
25296
  }
@@ -25303,7 +25303,7 @@ var require_createFormattedComponent = __commonJS((exports) => {
25303
25303
  Object.defineProperty(exports, "__esModule", { value: true });
25304
25304
  exports.createFormattedComponent = exports.createFormattedDateTimePartsComponent = exports.FormattedListParts = exports.FormattedNumberParts = undefined;
25305
25305
  var tslib_1 = require_tslib();
25306
- var React11 = tslib_1.__importStar(react);
25306
+ var React12 = tslib_1.__importStar(react);
25307
25307
  var useIntl_1 = tslib_1.__importDefault(require_useIntl());
25308
25308
  var DisplayName;
25309
25309
  (function(DisplayName2) {
@@ -25354,8 +25354,8 @@ var require_createFormattedComponent = __commonJS((exports) => {
25354
25354
  if (typeof children === "function") {
25355
25355
  return children(formattedValue);
25356
25356
  }
25357
- var Text2 = intl.textComponent || React11.Fragment;
25358
- return React11.createElement(Text2, null, formattedValue);
25357
+ var Text2 = intl.textComponent || React12.Fragment;
25358
+ return React12.createElement(Text2, null, formattedValue);
25359
25359
  };
25360
25360
  Component.displayName = DisplayName[name];
25361
25361
  return Component;
@@ -25370,7 +25370,7 @@ var require_provider = __commonJS((exports) => {
25370
25370
  exports.createIntl = undefined;
25371
25371
  var tslib_1 = require_tslib();
25372
25372
  var intl_1 = require_intl();
25373
- var React11 = tslib_1.__importStar(react);
25373
+ var React12 = tslib_1.__importStar(react);
25374
25374
  var utils_1 = require_utils4();
25375
25375
  var injectIntl_1 = require_injectIntl();
25376
25376
  var intl_messageformat_1 = require_intl_messageformat();
@@ -25413,7 +25413,7 @@ var require_provider = __commonJS((exports) => {
25413
25413
  values
25414
25414
  ], rest, false));
25415
25415
  if (Array.isArray(chunks)) {
25416
- return React11.Children.toArray(chunks);
25416
+ return React12.Children.toArray(chunks);
25417
25417
  }
25418
25418
  return chunks;
25419
25419
  };
@@ -25463,12 +25463,12 @@ var require_provider = __commonJS((exports) => {
25463
25463
  };
25464
25464
  IntlProvider2.prototype.render = function() {
25465
25465
  (0, utils_1.invariantIntlContext)(this.state.intl);
25466
- return React11.createElement(injectIntl_1.Provider, { value: this.state.intl }, this.props.children);
25466
+ return React12.createElement(injectIntl_1.Provider, { value: this.state.intl }, this.props.children);
25467
25467
  };
25468
25468
  IntlProvider2.displayName = "IntlProvider";
25469
25469
  IntlProvider2.defaultProps = utils_1.DEFAULT_INTL_CONFIG;
25470
25470
  return IntlProvider2;
25471
- }(React11.PureComponent);
25471
+ }(React12.PureComponent);
25472
25472
  exports.default = IntlProvider;
25473
25473
  });
25474
25474
 
@@ -25477,7 +25477,7 @@ var require_relative = __commonJS((exports) => {
25477
25477
  var react = __toESM(require_react(), 1);
25478
25478
  Object.defineProperty(exports, "__esModule", { value: true });
25479
25479
  var tslib_1 = require_tslib();
25480
- var React11 = tslib_1.__importStar(react);
25480
+ var React12 = tslib_1.__importStar(react);
25481
25481
  var ecma402_abstract_1 = require_ecma402_abstract();
25482
25482
  var useIntl_1 = tslib_1.__importDefault(require_useIntl());
25483
25483
  var MINUTE = 60;
@@ -25540,23 +25540,23 @@ var require_relative = __commonJS((exports) => {
25540
25540
  return children(formattedRelativeTime);
25541
25541
  }
25542
25542
  if (Text2) {
25543
- return React11.createElement(Text2, null, formattedRelativeTime);
25543
+ return React12.createElement(Text2, null, formattedRelativeTime);
25544
25544
  }
25545
- return React11.createElement(React11.Fragment, null, formattedRelativeTime);
25545
+ return React12.createElement(React12.Fragment, null, formattedRelativeTime);
25546
25546
  };
25547
25547
  var FormattedRelativeTime = function(_a) {
25548
25548
  var { value, unit, updateIntervalInSeconds } = _a, otherProps = tslib_1.__rest(_a, ["value", "unit", "updateIntervalInSeconds"]);
25549
25549
  (0, ecma402_abstract_1.invariant)(!updateIntervalInSeconds || !!(updateIntervalInSeconds && canIncrement(unit)), "Cannot schedule update with unit longer than hour");
25550
- var _b = React11.useState(), prevUnit = _b[0], setPrevUnit = _b[1];
25551
- var _c = React11.useState(0), prevValue = _c[0], setPrevValue = _c[1];
25552
- var _d = React11.useState(0), currentValueInSeconds = _d[0], setCurrentValueInSeconds = _d[1];
25550
+ var _b = React12.useState(), prevUnit = _b[0], setPrevUnit = _b[1];
25551
+ var _c = React12.useState(0), prevValue = _c[0], setPrevValue = _c[1];
25552
+ var _d = React12.useState(0), currentValueInSeconds = _d[0], setCurrentValueInSeconds = _d[1];
25553
25553
  var updateTimer;
25554
25554
  if (unit !== prevUnit || value !== prevValue) {
25555
25555
  setPrevValue(value || 0);
25556
25556
  setPrevUnit(unit);
25557
25557
  setCurrentValueInSeconds(canIncrement(unit) ? valueToSeconds(value, unit) : 0);
25558
25558
  }
25559
- React11.useEffect(function() {
25559
+ React12.useEffect(function() {
25560
25560
  function clearUpdateTimer() {
25561
25561
  clearTimeout(updateTimer);
25562
25562
  }
@@ -25588,7 +25588,7 @@ var require_relative = __commonJS((exports) => {
25588
25588
  var unitDuration = getDurationInSeconds(currentUnit);
25589
25589
  currentValue = Math.round(currentValueInSeconds / unitDuration);
25590
25590
  }
25591
- return React11.createElement(SimpleFormattedRelativeTime, tslib_1.__assign({ value: currentValue, unit: currentUnit }, otherProps));
25591
+ return React12.createElement(SimpleFormattedRelativeTime, tslib_1.__assign({ value: currentValue, unit: currentUnit }, otherProps));
25592
25592
  };
25593
25593
  FormattedRelativeTime.displayName = "FormattedRelativeTime";
25594
25594
  FormattedRelativeTime.defaultProps = {
@@ -25603,7 +25603,7 @@ var require_plural2 = __commonJS((exports) => {
25603
25603
  var react = __toESM(require_react(), 1);
25604
25604
  Object.defineProperty(exports, "__esModule", { value: true });
25605
25605
  var tslib_1 = require_tslib();
25606
- var React11 = tslib_1.__importStar(react);
25606
+ var React12 = tslib_1.__importStar(react);
25607
25607
  var useIntl_1 = tslib_1.__importDefault(require_useIntl());
25608
25608
  var FormattedPlural = function(props) {
25609
25609
  var _a = (0, useIntl_1.default)(), formatPlural = _a.formatPlural, Text2 = _a.textComponent;
@@ -25614,7 +25614,7 @@ var require_plural2 = __commonJS((exports) => {
25614
25614
  return children(formattedPlural);
25615
25615
  }
25616
25616
  if (Text2) {
25617
- return React11.createElement(Text2, null, formattedPlural);
25617
+ return React12.createElement(Text2, null, formattedPlural);
25618
25618
  }
25619
25619
  return formattedPlural;
25620
25620
  };
@@ -25630,7 +25630,7 @@ var require_message2 = __commonJS((exports) => {
25630
25630
  var react = __toESM(require_react(), 1);
25631
25631
  Object.defineProperty(exports, "__esModule", { value: true });
25632
25632
  var tslib_1 = require_tslib();
25633
- var React11 = tslib_1.__importStar(react);
25633
+ var React12 = tslib_1.__importStar(react);
25634
25634
  var useIntl_1 = tslib_1.__importDefault(require_useIntl());
25635
25635
  var utils_1 = require_utils4();
25636
25636
  function areEqual(prevProps, nextProps) {
@@ -25640,7 +25640,7 @@ var require_message2 = __commonJS((exports) => {
25640
25640
  }
25641
25641
  function FormattedMessage(props) {
25642
25642
  var intl = (0, useIntl_1.default)();
25643
- var { formatMessage, textComponent: _a } = intl, Text2 = _a === undefined ? React11.Fragment : _a;
25643
+ var { formatMessage, textComponent: _a } = intl, Text2 = _a === undefined ? React12.Fragment : _a;
25644
25644
  var { id, description, defaultMessage, values, children, tagName: _b } = props, Component = _b === undefined ? Text2 : _b, ignoreTag = props.ignoreTag;
25645
25645
  var descriptor = { id, description, defaultMessage };
25646
25646
  var nodes = formatMessage(descriptor, values, {
@@ -25650,12 +25650,12 @@ var require_message2 = __commonJS((exports) => {
25650
25650
  return children(Array.isArray(nodes) ? nodes : [nodes]);
25651
25651
  }
25652
25652
  if (Component) {
25653
- return React11.createElement(Component, null, React11.Children.toArray(nodes));
25653
+ return React12.createElement(Component, null, React12.Children.toArray(nodes));
25654
25654
  }
25655
- return React11.createElement(React11.Fragment, null, nodes);
25655
+ return React12.createElement(React12.Fragment, null, nodes);
25656
25656
  }
25657
25657
  FormattedMessage.displayName = "FormattedMessage";
25658
- var MemoizedFormattedMessage = React11.memo(FormattedMessage, areEqual);
25658
+ var MemoizedFormattedMessage = React12.memo(FormattedMessage, areEqual);
25659
25659
  MemoizedFormattedMessage.displayName = "MemoizedFormattedMessage";
25660
25660
  exports.default = MemoizedFormattedMessage;
25661
25661
  });
@@ -25665,7 +25665,7 @@ var require_dateTimeRange = __commonJS((exports) => {
25665
25665
  var react = __toESM(require_react(), 1);
25666
25666
  Object.defineProperty(exports, "__esModule", { value: true });
25667
25667
  var tslib_1 = require_tslib();
25668
- var React11 = tslib_1.__importStar(react);
25668
+ var React12 = tslib_1.__importStar(react);
25669
25669
  var useIntl_1 = tslib_1.__importDefault(require_useIntl());
25670
25670
  var FormattedDateTimeRange = function(props) {
25671
25671
  var intl = (0, useIntl_1.default)();
@@ -25674,8 +25674,8 @@ var require_dateTimeRange = __commonJS((exports) => {
25674
25674
  if (typeof children === "function") {
25675
25675
  return children(formattedValue);
25676
25676
  }
25677
- var Text2 = intl.textComponent || React11.Fragment;
25678
- return React11.createElement(Text2, null, formattedValue);
25677
+ var Text2 = intl.textComponent || React12.Fragment;
25678
+ return React12.createElement(Text2, null, formattedValue);
25679
25679
  };
25680
25680
  FormattedDateTimeRange.displayName = "FormattedDateTimeRange";
25681
25681
  exports.default = FormattedDateTimeRange;
@@ -28099,8 +28099,8 @@ var require_last = __commonJS((exports, module) => {
28099
28099
 
28100
28100
  // src/index.tsx
28101
28101
  var React55 = __toESM(require_react(), 1);
28102
- import fs14 from "node:fs/promises";
28103
- import path10 from "node:path";
28102
+ import fs12 from "node:fs/promises";
28103
+ import path9 from "node:path";
28104
28104
 
28105
28105
  // node_modules/.pnpm/ink-cjs@4.4.1_@types+react@18.2.33_react-devtools-core@4.19.1_react@18.2.0/node_modules/ink-cjs/build/render.js
28106
28106
  import { Stream } from "node:stream";
@@ -31938,9 +31938,7 @@ var import_react21 = __toESM(require_react(), 1);
31938
31938
  var React54 = __toESM(require_react(), 1);
31939
31939
 
31940
31940
  // src/app/AutoUpdate.tsx
31941
- var React17 = __toESM(require_react(), 1);
31942
- import fs3 from "node:fs/promises";
31943
- import path from "node:path";
31941
+ var React18 = __toESM(require_react(), 1);
31944
31942
 
31945
31943
  // src/app/Brackets.tsx
31946
31944
  var React10 = __toESM(require_react(), 1);
@@ -31970,38 +31968,48 @@ function Brackets(props) {
31970
31968
  }, "]"));
31971
31969
  }
31972
31970
 
31973
- // src/app/FormatText.tsx
31971
+ // src/app/Command.tsx
31974
31972
  var React11 = __toESM(require_react(), 1);
31973
+ function Command(props) {
31974
+ const text_color = colors.orange;
31975
+ return /* @__PURE__ */ React11.createElement(Text, {
31976
+ bold: true,
31977
+ color: text_color
31978
+ }, props.children);
31979
+ }
31980
+
31981
+ // src/app/FormatText.tsx
31982
+ var React12 = __toESM(require_react(), 1);
31975
31983
  var import_react_intl = __toESM(require_react_intl(), 1);
31976
31984
  function FormatText(props) {
31977
- const wrapper = props.wrapper || /* @__PURE__ */ React11.createElement(Text, null);
31978
- return /* @__PURE__ */ React11.createElement(import_react_intl.FormattedMessage, {
31985
+ const wrapper = props.wrapper || /* @__PURE__ */ React12.createElement(Text, null);
31986
+ return /* @__PURE__ */ React12.createElement(import_react_intl.FormattedMessage, {
31979
31987
  id: "FormatText",
31980
31988
  defaultMessage: props.message,
31981
31989
  values: props.values
31982
31990
  }, (chunks) => {
31983
- return React11.cloneElement(wrapper, {}, chunks);
31991
+ return React12.cloneElement(wrapper, {}, chunks);
31984
31992
  });
31985
31993
  }
31986
31994
 
31987
31995
  // src/app/YesNoPrompt.tsx
31988
- var React13 = __toESM(require_react(), 1);
31996
+ var React14 = __toESM(require_react(), 1);
31989
31997
 
31990
31998
  // src/app/Parens.tsx
31991
- var React12 = __toESM(require_react(), 1);
31999
+ var React13 = __toESM(require_react(), 1);
31992
32000
  function Parens(props) {
31993
32001
  const color = colors.blue;
31994
- return /* @__PURE__ */ React12.createElement(Text, null, /* @__PURE__ */ React12.createElement(Text, {
32002
+ return /* @__PURE__ */ React13.createElement(Text, null, /* @__PURE__ */ React13.createElement(Text, {
31995
32003
  color
31996
- }, "("), props.children, /* @__PURE__ */ React12.createElement(Text, {
32004
+ }, "("), props.children, /* @__PURE__ */ React13.createElement(Text, {
31997
32005
  color
31998
32006
  }, ")"));
31999
32007
  }
32000
32008
 
32001
32009
  // src/app/YesNoPrompt.tsx
32002
32010
  function YesNoPrompt(props) {
32003
- const [answer, set_answer] = React13.useState("");
32004
- const answered_ref = React13.useRef(false);
32011
+ const [answer, set_answer] = React14.useState("");
32012
+ const answered_ref = React14.useRef(false);
32005
32013
  use_input_default((input) => {
32006
32014
  if (answered_ref.current) {
32007
32015
  return;
@@ -32023,11 +32031,11 @@ function YesNoPrompt(props) {
32023
32031
  }
32024
32032
  });
32025
32033
  const choices = function get_choices() {
32026
- const y3 = /* @__PURE__ */ React13.createElement(Text, {
32034
+ const y3 = /* @__PURE__ */ React14.createElement(Text, {
32027
32035
  bold: true,
32028
32036
  color: colors.green
32029
32037
  }, "Y");
32030
- const n3 = /* @__PURE__ */ React13.createElement(Text, {
32038
+ const n3 = /* @__PURE__ */ React14.createElement(Text, {
32031
32039
  color: colors.red
32032
32040
  }, "n");
32033
32041
  switch (answer) {
@@ -32036,19 +32044,19 @@ function YesNoPrompt(props) {
32036
32044
  case "n":
32037
32045
  return n3;
32038
32046
  default:
32039
- return /* @__PURE__ */ React13.createElement(FormatText, {
32047
+ return /* @__PURE__ */ React14.createElement(FormatText, {
32040
32048
  message: "{y}/{n}",
32041
32049
  values: { y: y3, n: n3 }
32042
32050
  });
32043
32051
  }
32044
32052
  }();
32045
- return /* @__PURE__ */ React13.createElement(Box_default, {
32053
+ return /* @__PURE__ */ React14.createElement(Box_default, {
32046
32054
  flexDirection: "column"
32047
- }, /* @__PURE__ */ React13.createElement(Box_default, {
32055
+ }, /* @__PURE__ */ React14.createElement(Box_default, {
32048
32056
  alignItems: "flex-end"
32049
- }, typeof props.message === "object" ? props.message : /* @__PURE__ */ React13.createElement(Text, {
32057
+ }, typeof props.message === "object" ? props.message : /* @__PURE__ */ React14.createElement(Text, {
32050
32058
  color: colors.yellow
32051
- }, props.message), /* @__PURE__ */ React13.createElement(Text, null, " "), /* @__PURE__ */ React13.createElement(Parens, null, /* @__PURE__ */ React13.createElement(Text, {
32059
+ }, props.message), /* @__PURE__ */ React14.createElement(Text, null, " "), /* @__PURE__ */ React14.createElement(Parens, null, /* @__PURE__ */ React14.createElement(Text, {
32052
32060
  color: colors.gray
32053
32061
  }, choices))));
32054
32062
  }
@@ -32057,7 +32065,7 @@ function YesNoPrompt(props) {
32057
32065
  import * as child from "node:child_process";
32058
32066
 
32059
32067
  // src/app/Store.tsx
32060
- var React16 = __toESM(require_react(), 1);
32068
+ var React17 = __toESM(require_react(), 1);
32061
32069
 
32062
32070
  // node_modules/.pnpm/zustand@4.4.4_@types+react@18.2.33_immer@10.0.3_react@18.2.0/node_modules/zustand/esm/vanilla.mjs
32063
32071
  var createStoreImpl = (createState) => {
@@ -32688,7 +32696,7 @@ var immerImpl = (initializer) => (set2, get, store) => {
32688
32696
  var immer2 = immerImpl;
32689
32697
 
32690
32698
  // src/app/Exit.tsx
32691
- var React14 = __toESM(require_react(), 1);
32699
+ var React15 = __toESM(require_react(), 1);
32692
32700
 
32693
32701
  // src/core/sleep.ts
32694
32702
  async function sleep(time) {
@@ -32697,7 +32705,7 @@ async function sleep(time) {
32697
32705
 
32698
32706
  // src/app/Exit.tsx
32699
32707
  function Exit(props) {
32700
- React14.useEffect(() => {
32708
+ React15.useEffect(() => {
32701
32709
  Exit.handle_exit(props).catch((err) => {
32702
32710
  console.error(err);
32703
32711
  });
@@ -32714,7 +32722,7 @@ Exit.handle_exit = async function handle_exit(props) {
32714
32722
  }
32715
32723
  if (state.is_dirty_check_stash) {
32716
32724
  await cli("git stash pop");
32717
- actions.output(/* @__PURE__ */ React14.createElement(Text, {
32725
+ actions.output(/* @__PURE__ */ React15.createElement(Text, {
32718
32726
  color: colors.green
32719
32727
  }, "✅ Changes restored from stash"));
32720
32728
  }
@@ -32728,7 +32736,7 @@ Exit.handle_exit = async function handle_exit(props) {
32728
32736
  };
32729
32737
 
32730
32738
  // src/app/LogTimestamp.tsx
32731
- var React15 = __toESM(require_react(), 1);
32739
+ var React16 = __toESM(require_react(), 1);
32732
32740
 
32733
32741
  // node_modules/.pnpm/luxon@3.4.4/node_modules/luxon/src/errors.js
32734
32742
  class LuxonError extends Error {
@@ -37023,7 +37031,7 @@ function friendlyDateTime(dateTimeish) {
37023
37031
 
37024
37032
  // src/app/LogTimestamp.tsx
37025
37033
  function LogTimestamp() {
37026
- return /* @__PURE__ */ React15.createElement(Text, {
37034
+ return /* @__PURE__ */ React16.createElement(Text, {
37027
37035
  dimColor: true
37028
37036
  }, DateTime.now().toFormat("[yyyy-MM-dd HH:mm:ss.SSS] "));
37029
37037
  }
@@ -37066,7 +37074,7 @@ var BaseStore = createStore()(immer2((set2, get) => ({
37066
37074
  state.exit_mode = "normal";
37067
37075
  }
37068
37076
  let clear = args?.clear ?? true;
37069
- const node = /* @__PURE__ */ React16.createElement(Exit, {
37077
+ const node = /* @__PURE__ */ React17.createElement(Exit, {
37070
37078
  clear,
37071
37079
  code
37072
37080
  });
@@ -37094,17 +37102,17 @@ var BaseStore = createStore()(immer2((set2, get) => ({
37094
37102
  error(error) {
37095
37103
  let node;
37096
37104
  if (typeof error === "string") {
37097
- node = /* @__PURE__ */ React16.createElement(Text, {
37105
+ node = /* @__PURE__ */ React17.createElement(Text, {
37098
37106
  color: colors.red
37099
37107
  }, error);
37100
37108
  } else if (error instanceof Error) {
37101
- node = /* @__PURE__ */ React16.createElement(Box_default, {
37109
+ node = /* @__PURE__ */ React17.createElement(Box_default, {
37102
37110
  flexDirection: "column"
37103
- }, /* @__PURE__ */ React16.createElement(Text, {
37111
+ }, /* @__PURE__ */ React17.createElement(Text, {
37104
37112
  color: colors.red
37105
37113
  }, error.stack));
37106
37114
  } else {
37107
- node = /* @__PURE__ */ React16.createElement(Text, {
37115
+ node = /* @__PURE__ */ React17.createElement(Text, {
37108
37116
  color: colors.red
37109
37117
  }, `Unhandled error: ${JSON.stringify(error)}`);
37110
37118
  }
@@ -37188,12 +37196,12 @@ function renderOutputArgs(args) {
37188
37196
  case "boolean":
37189
37197
  case "number":
37190
37198
  case "string":
37191
- output = /* @__PURE__ */ React16.createElement(Text, {
37199
+ output = /* @__PURE__ */ React17.createElement(Text, {
37192
37200
  dimColor: args.debug
37193
37201
  }, String(args.node));
37194
37202
  }
37195
37203
  if (args.debug) {
37196
- return /* @__PURE__ */ React16.createElement(React16.Fragment, null, args.withoutTimestamp ? null : /* @__PURE__ */ React16.createElement(LogTimestamp, null), output);
37204
+ return /* @__PURE__ */ React17.createElement(React17.Fragment, null, args.withoutTimestamp ? null : /* @__PURE__ */ React17.createElement(LogTimestamp, null), output);
37197
37205
  }
37198
37206
  return output;
37199
37207
  }
@@ -37393,19 +37401,6 @@ function is_finite_value(value) {
37393
37401
  return typeof value === "number" && Number.isFinite(value);
37394
37402
  }
37395
37403
 
37396
- // src/core/read_json.ts
37397
- import fs2 from "node:fs/promises";
37398
- async function read_json(path) {
37399
- try {
37400
- const file_buffer = await fs2.readFile(path);
37401
- const json_str = String(file_buffer);
37402
- const json = JSON.parse(json_str);
37403
- return json;
37404
- } catch (error) {
37405
- return null;
37406
- }
37407
- }
37408
-
37409
37404
  // src/core/semver_compare.ts
37410
37405
  function semver_compare(version_a, version_b) {
37411
37406
  const split_a = version_a.split(".").map(Number);
@@ -37427,14 +37422,15 @@ function reducer(state, patch) {
37427
37422
  return { ...state, ...patch };
37428
37423
  }
37429
37424
  function AutoUpdate(props) {
37430
- const props_ref = React17.useRef(props);
37425
+ const props_ref = React18.useRef(props);
37431
37426
  props_ref.current = props;
37432
- const [output, set_output] = React17.useState([]);
37433
- const [state, patch] = React17.useReducer(reducer, {
37427
+ const [output, set_output] = React18.useState([]);
37428
+ const [state, patch] = React18.useReducer(reducer, {
37434
37429
  error: null,
37435
37430
  local_version: null,
37436
37431
  latest_version: null,
37437
- status: "init"
37432
+ status: "init",
37433
+ is_brew_bun_standalone: false
37438
37434
  });
37439
37435
  function handle_output(node) {
37440
37436
  if (typeof props.onOutput === "function") {
@@ -37445,13 +37441,17 @@ function AutoUpdate(props) {
37445
37441
  });
37446
37442
  }
37447
37443
  }
37448
- React17.useEffect(() => {
37444
+ React18.useEffect(() => {
37449
37445
  let status2 = "done";
37450
- let local_version = null;
37451
37446
  let latest_version = null;
37447
+ let is_brew_bun_standalone = false;
37448
+ const local_version = "2.5.2";
37452
37449
  async function auto_update() {
37450
+ if (!local_version) {
37451
+ throw new Error("Auto update requires process.env.CLI_VERSION to be set");
37452
+ }
37453
37453
  if (props_ref.current.verbose) {
37454
- handle_output(/* @__PURE__ */ React17.createElement(Text, {
37454
+ handle_output(/* @__PURE__ */ React18.createElement(Text, {
37455
37455
  key: "init"
37456
37456
  }, "Checking for latest version..."));
37457
37457
  }
@@ -37466,26 +37466,37 @@ function AutoUpdate(props) {
37466
37466
  if (!latest_version) {
37467
37467
  throw new Error("Unable to retrieve latest version from npm");
37468
37468
  }
37469
- const script_path = await fs3.realpath(process.argv[1]);
37470
- const script_dir = path.dirname(script_path);
37471
- const package_json_path = path.join(script_dir, "..", "..", "package.json");
37472
- const package_json = await read_json(package_json_path);
37473
- if (!package_json) {
37474
- throw new Error(`Unable to read package.json [${package_json_path}]`);
37469
+ const binary_path = process.argv[1];
37470
+ if (props_ref.current.verbose) {
37471
+ handle_output(/* @__PURE__ */ React18.createElement(Text, {
37472
+ dimColor: true
37473
+ }, JSON.stringify({ binary_path })));
37474
+ }
37475
+ is_brew_bun_standalone = binary_path.startsWith("/$bunfs");
37476
+ if (props_ref.current.verbose) {
37477
+ if (is_brew_bun_standalone) {
37478
+ handle_output(/* @__PURE__ */ React18.createElement(Text, {
37479
+ dimColor: true
37480
+ }, "brew install detected (compiled bun standalone)"));
37481
+ } else {
37482
+ handle_output(/* @__PURE__ */ React18.createElement(Text, {
37483
+ dimColor: true
37484
+ }, "npm install detected"));
37485
+ }
37475
37486
  }
37476
- local_version = package_json.version;
37477
37487
  if (props_ref.current.verbose) {
37478
- handle_output(/* @__PURE__ */ React17.createElement(FormatText, {
37488
+ handle_output(/* @__PURE__ */ React18.createElement(FormatText, {
37479
37489
  key: "versions",
37480
- wrapper: /* @__PURE__ */ React17.createElement(Text, null),
37490
+ wrapper: /* @__PURE__ */ React18.createElement(Text, null),
37481
37491
  message: "Auto update found latest version {latest_version} and current local version {local_version}",
37482
37492
  values: {
37483
- latest_version: /* @__PURE__ */ React17.createElement(Brackets, null, latest_version),
37484
- local_version: /* @__PURE__ */ React17.createElement(Brackets, null, local_version)
37493
+ latest_version: /* @__PURE__ */ React18.createElement(Brackets, null, latest_version),
37494
+ local_version: /* @__PURE__ */ React18.createElement(Brackets, null, local_version)
37485
37495
  }
37486
37496
  }));
37487
37497
  }
37488
37498
  const semver_result = semver_compare(latest_version, local_version);
37499
+ status2 = "prompt";
37489
37500
  if (semver_result === 0) {
37490
37501
  return;
37491
37502
  }
@@ -37497,12 +37508,12 @@ function AutoUpdate(props) {
37497
37508
  const onError = props_ref.current.onError || (() => {
37498
37509
  });
37499
37510
  auto_update().then(() => {
37500
- patch({ status: status2, local_version, latest_version });
37511
+ patch({ status: status2, local_version, latest_version, is_brew_bun_standalone });
37501
37512
  }).catch((error) => {
37502
- patch({ status: status2, error, local_version, latest_version });
37513
+ patch({ status: status2, error, local_version, latest_version, is_brew_bun_standalone });
37503
37514
  onError(error);
37504
37515
  if (props_ref.current.verbose) {
37505
- handle_output(/* @__PURE__ */ React17.createElement(Text, {
37516
+ handle_output(/* @__PURE__ */ React18.createElement(Text, {
37506
37517
  key: "error",
37507
37518
  color: colors.red
37508
37519
  }, error?.message));
@@ -37515,29 +37526,42 @@ function AutoUpdate(props) {
37515
37526
  switch (state.status) {
37516
37527
  case "init":
37517
37528
  return null;
37518
- case "prompt":
37519
- return /* @__PURE__ */ React17.createElement(YesNoPrompt, {
37520
- message: /* @__PURE__ */ React17.createElement(Text, {
37529
+ case "prompt": {
37530
+ let install_command = "";
37531
+ if (state.is_brew_bun_standalone) {
37532
+ install_command = `npm install -g ${props.name}@latest`;
37533
+ } else {
37534
+ install_command = `HOMEBREW_NO_AUTO_UPDATE=1 brew upgrade magus/git-stack/git-stack`;
37535
+ }
37536
+ return /* @__PURE__ */ React18.createElement(YesNoPrompt, {
37537
+ message: /* @__PURE__ */ React18.createElement(Box_default, {
37538
+ flexDirection: "column"
37539
+ }, /* @__PURE__ */ React18.createElement(Text, {
37521
37540
  color: colors.yellow
37522
- }, "New version available, would you like to update?"),
37541
+ }, "New version available, would you like to update?"), /* @__PURE__ */ React18.createElement(Text, null, " "), /* @__PURE__ */ React18.createElement(Command, null, install_command), /* @__PURE__ */ React18.createElement(Text, null, " "), /* @__PURE__ */ React18.createElement(FormatText, {
37542
+ wrapper: /* @__PURE__ */ React18.createElement(Text, {
37543
+ color: colors.yellow
37544
+ }),
37545
+ message: "Would you like to run the above command to update?"
37546
+ })),
37523
37547
  onYes: async () => {
37524
- handle_output(/* @__PURE__ */ React17.createElement(FormatText, {
37548
+ handle_output(/* @__PURE__ */ React18.createElement(FormatText, {
37525
37549
  key: "install",
37526
- wrapper: /* @__PURE__ */ React17.createElement(Text, null),
37550
+ wrapper: /* @__PURE__ */ React18.createElement(Text, null),
37527
37551
  message: "Installing {name}@{version}...",
37528
37552
  values: {
37529
- name: /* @__PURE__ */ React17.createElement(Text, {
37553
+ name: /* @__PURE__ */ React18.createElement(Text, {
37530
37554
  color: colors.yellow
37531
37555
  }, props.name),
37532
- version: /* @__PURE__ */ React17.createElement(Text, {
37556
+ version: /* @__PURE__ */ React18.createElement(Text, {
37533
37557
  color: colors.blue
37534
37558
  }, state.latest_version)
37535
37559
  }
37536
37560
  }));
37537
37561
  patch({ status: "install" });
37538
- await cli(`npm install -g ${props.name}@latest`);
37562
+ await cli(install_command);
37539
37563
  patch({ status: "exit" });
37540
- handle_output(/* @__PURE__ */ React17.createElement(Text, {
37564
+ handle_output(/* @__PURE__ */ React18.createElement(Text, {
37541
37565
  key: "done"
37542
37566
  }, "Auto update done."));
37543
37567
  },
@@ -37545,6 +37569,7 @@ function AutoUpdate(props) {
37545
37569
  patch({ status: "done" });
37546
37570
  }
37547
37571
  });
37572
+ }
37548
37573
  case "install":
37549
37574
  return null;
37550
37575
  case "exit":
@@ -37553,15 +37578,15 @@ function AutoUpdate(props) {
37553
37578
  return props.children;
37554
37579
  }
37555
37580
  }();
37556
- return /* @__PURE__ */ React17.createElement(React17.Fragment, null, output, status);
37581
+ return /* @__PURE__ */ React18.createElement(React18.Fragment, null, output, status);
37557
37582
  }
37558
37583
 
37559
37584
  // src/app/CherryPickCheck.tsx
37560
37585
  var React20 = __toESM(require_react(), 1);
37561
- import path2 from "node:path";
37586
+ import path from "node:path";
37562
37587
 
37563
37588
  // src/app/Await.tsx
37564
- var React18 = __toESM(require_react(), 1);
37589
+ var React19 = __toESM(require_react(), 1);
37565
37590
 
37566
37591
  // src/core/cache.ts
37567
37592
  function cache3(cacheable) {
@@ -37609,8 +37634,8 @@ function invariant(condition, message) {
37609
37634
 
37610
37635
  // src/app/Await.tsx
37611
37636
  function Await(props) {
37612
- const [display_fallback, set_display_fallback] = React18.useState(false);
37613
- const cacheRef = React18.useRef(null);
37637
+ const [display_fallback, set_display_fallback] = React19.useState(false);
37638
+ const cacheRef = React19.useRef(null);
37614
37639
  if (!cacheRef.current) {
37615
37640
  cacheRef.current = cache3(props.function);
37616
37641
  }
@@ -37620,7 +37645,7 @@ function Await(props) {
37620
37645
  } else {
37621
37646
  delayFallbackMs = 1000;
37622
37647
  }
37623
- React18.useEffect(() => {
37648
+ React19.useEffect(() => {
37624
37649
  const cache4 = cacheRef.current;
37625
37650
  if (!cache4) {
37626
37651
  return;
@@ -37637,13 +37662,13 @@ function Await(props) {
37637
37662
  }, [delayFallbackMs]);
37638
37663
  invariant(cacheRef.current, "cache must exist");
37639
37664
  if ("fallback" in props) {
37640
- return /* @__PURE__ */ React18.createElement(React18.Suspense, {
37665
+ return /* @__PURE__ */ React19.createElement(React19.Suspense, {
37641
37666
  fallback: !display_fallback ? null : props.fallback
37642
- }, /* @__PURE__ */ React18.createElement(ReadCache, {
37667
+ }, /* @__PURE__ */ React19.createElement(ReadCache, {
37643
37668
  cache: cacheRef.current
37644
37669
  }, props.children));
37645
37670
  }
37646
- return /* @__PURE__ */ React18.createElement(ReadCache, {
37671
+ return /* @__PURE__ */ React19.createElement(ReadCache, {
37647
37672
  cache: cacheRef.current
37648
37673
  });
37649
37674
  }
@@ -37652,21 +37677,11 @@ function ReadCache(props) {
37652
37677
  return props.children;
37653
37678
  }
37654
37679
 
37655
- // src/app/Command.tsx
37656
- var React19 = __toESM(require_react(), 1);
37657
- function Command(props) {
37658
- const text_color = colors.orange;
37659
- return /* @__PURE__ */ React19.createElement(Text, {
37660
- bold: true,
37661
- color: text_color
37662
- }, props.children);
37663
- }
37664
-
37665
37680
  // src/core/safe_exists.ts
37666
- import fs4 from "node:fs/promises";
37681
+ import fs2 from "node:fs/promises";
37667
37682
  async function safe_exists(filepath) {
37668
37683
  try {
37669
- await fs4.access(filepath);
37684
+ await fs2.access(filepath);
37670
37685
  return true;
37671
37686
  } catch {
37672
37687
  return false;
@@ -37710,7 +37725,7 @@ function CherryPickCheck(props) {
37710
37725
  const actions2 = Store.getState().actions;
37711
37726
  try {
37712
37727
  const git_dir = (await cli(`git rev-parse --absolute-git-dir`)).stdout;
37713
- const cherry_pick_file = path2.join(git_dir, "CHERRY_PICK_HEAD");
37728
+ const cherry_pick_file = path.join(git_dir, "CHERRY_PICK_HEAD");
37714
37729
  if (await safe_exists(cherry_pick_file)) {
37715
37730
  return patch({ status: "prompt" });
37716
37731
  }
@@ -37730,8 +37745,8 @@ function CherryPickCheck(props) {
37730
37745
 
37731
37746
  // src/app/Debug.tsx
37732
37747
  var React21 = __toESM(require_react(), 1);
37733
- import fs6 from "node:fs/promises";
37734
- import path3 from "node:path";
37748
+ import fs4 from "node:fs/promises";
37749
+ import path2 from "node:path";
37735
37750
 
37736
37751
  // src/core/json.ts
37737
37752
  function serialize(obj) {
@@ -37767,11 +37782,11 @@ function deserialize(obj) {
37767
37782
  }
37768
37783
 
37769
37784
  // src/core/safe_rm.ts
37770
- import fs5 from "node:fs/promises";
37785
+ import fs3 from "node:fs/promises";
37771
37786
  async function safe_rm(filepath) {
37772
37787
  try {
37773
- await fs5.access(filepath);
37774
- await fs5.rm(filepath);
37788
+ await fs3.access(filepath);
37789
+ await fs3.rm(filepath);
37775
37790
  } catch {
37776
37791
  }
37777
37792
  }
@@ -37795,11 +37810,11 @@ function Debug() {
37795
37810
  }
37796
37811
  sync().catch(actions.error);
37797
37812
  async function sync() {
37798
- const output_file = path3.join(state.cwd, "git-stack-state.json");
37813
+ const output_file = path2.join(state.cwd, "git-stack-state.json");
37799
37814
  await safe_rm(output_file);
37800
37815
  const serialized = serialize(state);
37801
37816
  const content = pretty_json(serialized);
37802
- await fs6.writeFile(output_file, content);
37817
+ await fs4.writeFile(output_file, content);
37803
37818
  }
37804
37819
  }, [argv, state]);
37805
37820
  return null;
@@ -37819,15 +37834,15 @@ function Url(props) {
37819
37834
  }
37820
37835
 
37821
37836
  // src/core/is_command_available.ts
37822
- import fs7 from "node:fs";
37823
- import path4 from "node:path";
37837
+ import fs5 from "node:fs";
37838
+ import path3 from "node:path";
37824
37839
  function is_command_available(command) {
37825
37840
  const PATH = process.env["PATH"];
37826
37841
  invariant(PATH, "PATH env must exist");
37827
- const path_list = PATH.split(path4.delimiter);
37842
+ const path_list = PATH.split(path3.delimiter);
37828
37843
  for (const dir of path_list) {
37829
- const full_path = path4.join(dir, command);
37830
- if (fs7.existsSync(full_path)) {
37844
+ const full_path = path3.join(dir, command);
37845
+ if (fs5.existsSync(full_path)) {
37831
37846
  return true;
37832
37847
  }
37833
37848
  }
@@ -37869,7 +37884,13 @@ var RE = {
37869
37884
 
37870
37885
  // src/app/DependencyCheck.tsx
37871
37886
  function DependencyCheck(props) {
37872
- return /* @__PURE__ */ React23.createElement(CheckGit, null, /* @__PURE__ */ React23.createElement(CheckGithubCli, null, /* @__PURE__ */ React23.createElement(CheckGithubCliAuth, null, /* @__PURE__ */ React23.createElement(CheckGitRevise, null, props.children))));
37887
+ return /* @__PURE__ */ React23.createElement(CheckGit, null, /* @__PURE__ */ React23.createElement(CheckGithubCli, {
37888
+ ...props
37889
+ }, /* @__PURE__ */ React23.createElement(CheckGithubCliAuth, {
37890
+ ...props
37891
+ }, /* @__PURE__ */ React23.createElement(CheckGitRevise, {
37892
+ ...props
37893
+ }, props.children))));
37873
37894
  }
37874
37895
  function CheckGit(props) {
37875
37896
  const actions = Store.useActions();
@@ -37890,6 +37911,9 @@ function CheckGit(props) {
37890
37911
  }
37891
37912
  function CheckGithubCli(props) {
37892
37913
  const actions = Store.useActions();
37914
+ if (props.disableGithubCli) {
37915
+ return /* @__PURE__ */ React23.createElement(React23.Fragment, null, props.children);
37916
+ }
37893
37917
  return /* @__PURE__ */ React23.createElement(Await, {
37894
37918
  fallback: /* @__PURE__ */ React23.createElement(Text, {
37895
37919
  color: colors.yellow
@@ -37917,6 +37941,9 @@ function CheckGithubCli(props) {
37917
37941
  }
37918
37942
  function CheckGithubCliAuth(props) {
37919
37943
  const actions = Store.useActions();
37944
+ if (props.disableGithubCliAuth) {
37945
+ return /* @__PURE__ */ React23.createElement(React23.Fragment, null, props.children);
37946
+ }
37920
37947
  return /* @__PURE__ */ React23.createElement(Await, {
37921
37948
  fallback: /* @__PURE__ */ React23.createElement(Text, {
37922
37949
  color: colors.yellow
@@ -37952,6 +37979,9 @@ function CheckGithubCliAuth(props) {
37952
37979
  }
37953
37980
  function CheckGitRevise(props) {
37954
37981
  const actions = Store.useActions();
37982
+ if (props.disableGitRevise) {
37983
+ return /* @__PURE__ */ React23.createElement(React23.Fragment, null, props.children);
37984
+ }
37955
37985
  return /* @__PURE__ */ React23.createElement(Await, {
37956
37986
  fallback: /* @__PURE__ */ React23.createElement(Text, {
37957
37987
  color: colors.yellow
@@ -38031,16 +38061,16 @@ var RE2 = {
38031
38061
  // src/core/github.tsx
38032
38062
  var React24 = __toESM(require_react(), 1);
38033
38063
  import crypto from "node:crypto";
38034
- import fs9 from "node:fs/promises";
38035
- import path6 from "node:path";
38064
+ import fs7 from "node:fs/promises";
38065
+ import path5 from "node:path";
38036
38066
 
38037
38067
  // src/core/get_tmp_dir.ts
38038
- import fs8 from "node:fs/promises";
38068
+ import fs6 from "node:fs/promises";
38039
38069
  import os2 from "node:os";
38040
- import path5 from "node:path";
38070
+ import path4 from "node:path";
38041
38071
  async function get_tmp_dir() {
38042
- const dir = path5.join(os2.tmpdir(), "git-stack-cli");
38043
- await fs8.mkdir(dir, { recursive: true });
38072
+ const dir = path4.join(os2.tmpdir(), "git-stack-cli");
38073
+ await fs6.mkdir(dir, { recursive: true });
38044
38074
  return dir;
38045
38075
  }
38046
38076
 
@@ -38161,43 +38191,17 @@ async function pr_edit(args) {
38161
38191
  await safe_rm(body_file);
38162
38192
  }
38163
38193
  }
38164
- async function pr_draft(args) {
38165
- const mutation_name = args.draft ? "convertPullRequestToDraft" : "markPullRequestReadyForReview";
38166
- let query = `
38167
- mutation($id: ID!) {
38168
- ${mutation_name}(input: { pullRequestId: $id }) {
38169
- pullRequest {
38170
- id
38171
- number
38172
- isDraft
38173
- }
38174
- }
38175
- }
38176
- `;
38177
- query = query.replace(/\n/g, " ");
38178
- query = query.replace(/\s+/g, " ");
38179
- query = query.trim();
38180
- const state = Store.getState();
38181
- const cache_pr = state.pr[args.branch];
38182
- invariant(cache_pr, "cache_pr must exist");
38183
- const command_parts = [`gh api graphql -F id="${cache_pr.id}" -f query='${query}'`];
38184
- const command = command_parts.join(" ");
38185
- const cli_result = await cli(command);
38186
- if (cli_result.code !== 0) {
38187
- handle_error(cli_result.output);
38188
- }
38189
- }
38190
38194
  var JSON_FIELDS = "--json id,number,state,baseRefName,headRefName,commits,title,body,url,isDraft";
38191
38195
  async function gh_json(command) {
38192
38196
  let hash = crypto.createHash("md5").update(command).digest("hex");
38193
38197
  let tmp_filename = safe_filename(`gh_json-${hash}`);
38194
- const tmp_pr_json = path6.join(await get_tmp_dir(), `${tmp_filename}.json`);
38198
+ const tmp_pr_json = path5.join(await get_tmp_dir(), `${tmp_filename}.json`);
38195
38199
  const options = { ignoreExitCode: true };
38196
38200
  const cli_result = await cli(`gh ${command} > ${tmp_pr_json}`, options);
38197
38201
  if (cli_result.code !== 0) {
38198
38202
  return new Error(cli_result.output);
38199
38203
  }
38200
- const json_str = String(await fs9.readFile(tmp_pr_json));
38204
+ const json_str = String(await fs7.readFile(tmp_pr_json));
38201
38205
  try {
38202
38206
  const json = JSON.parse(json_str);
38203
38207
  return json;
@@ -38217,9 +38221,9 @@ async function write_body_file(args) {
38217
38221
  invariant(args.body, "args.body must exist");
38218
38222
  const base = args.base.replace(/^origin\//, "");
38219
38223
  let tmp_filename = safe_filename(`git-stack-body-${base}`);
38220
- const temp_path = path6.join(await get_tmp_dir(), tmp_filename);
38224
+ const temp_path = path5.join(await get_tmp_dir(), tmp_filename);
38221
38225
  await safe_rm(temp_path);
38222
- await fs9.writeFile(temp_path, args.body);
38226
+ await fs7.writeFile(temp_path, args.body);
38223
38227
  return temp_path;
38224
38228
  }
38225
38229
  function safe_filename(value) {
@@ -38379,8 +38383,8 @@ function lines(value) {
38379
38383
  var UNASSIGNED = "unassigned";
38380
38384
 
38381
38385
  // src/core/GitReviseTodo.ts
38382
- import fs10 from "node:fs/promises";
38383
- import path7 from "node:path";
38386
+ import fs8 from "node:fs/promises";
38387
+ import path6 from "node:path";
38384
38388
  function GitReviseTodo(args) {
38385
38389
  const commit_list = [];
38386
38390
  const group_list = args.commit_range.group_list;
@@ -38466,11 +38470,11 @@ echo "------ END ------"
38466
38470
  echo
38467
38471
  `;
38468
38472
  invariant(GIT_SEQUENCE_EDITOR_SCRIPT, "GIT_SEQUENCE_EDITOR_SCRIPT must exist");
38469
- const tmp_git_sequence_editor_path = path7.join(await get_tmp_dir(), "git-sequence-editor.sh");
38470
- await fs10.writeFile(tmp_git_sequence_editor_path, GIT_SEQUENCE_EDITOR_SCRIPT);
38471
- await fs10.chmod(tmp_git_sequence_editor_path, "755");
38472
- const tmp_path_git_revise_todo = path7.join(await get_tmp_dir(), "git-revise-todo.txt");
38473
- await fs10.writeFile(tmp_path_git_revise_todo, GitReviseTodo(args));
38473
+ const tmp_git_sequence_editor_path = path6.join(await get_tmp_dir(), "git-sequence-editor.sh");
38474
+ await fs8.writeFile(tmp_git_sequence_editor_path, GIT_SEQUENCE_EDITOR_SCRIPT);
38475
+ await fs8.chmod(tmp_git_sequence_editor_path, "755");
38476
+ const tmp_path_git_revise_todo = path6.join(await get_tmp_dir(), "git-revise-todo.txt");
38477
+ await fs8.writeFile(tmp_path_git_revise_todo, GitReviseTodo(args));
38474
38478
  const command = [
38475
38479
  `GIT_EDITOR="${tmp_git_sequence_editor_path}"`,
38476
38480
  `GIT_REVISE_TODO="${tmp_path_git_revise_todo}"`,
@@ -38921,7 +38925,7 @@ var React35 = __toESM(require_react(), 1);
38921
38925
 
38922
38926
  // src/commands/Rebase.tsx
38923
38927
  var React34 = __toESM(require_react(), 1);
38924
- import fs11 from "node:fs";
38928
+ import fs9 from "node:fs";
38925
38929
 
38926
38930
  // src/app/Status.tsx
38927
38931
  var React33 = __toESM(require_react(), 1);
@@ -39323,7 +39327,7 @@ Rebase.run = async function run5(props) {
39323
39327
  cli.sync(`git clean -df`, spawn_options);
39324
39328
  cli.sync(`git checkout ${branch_name}`, spawn_options);
39325
39329
  cli.sync(`git branch -D ${temp_branch_name}`, spawn_options);
39326
- if (fs11.existsSync(cwd2)) {
39330
+ if (fs9.existsSync(cwd2)) {
39327
39331
  process.chdir(cwd2);
39328
39332
  }
39329
39333
  cli.sync(`pwd`, spawn_options);
@@ -39353,7 +39357,7 @@ function LocalMergeRebase() {
39353
39357
 
39354
39358
  // src/app/ManualRebase.tsx
39355
39359
  var React36 = __toESM(require_react(), 1);
39356
- import fs12 from "node:fs";
39360
+ import fs10 from "node:fs";
39357
39361
  function ManualRebase() {
39358
39362
  return /* @__PURE__ */ React36.createElement(Await, {
39359
39363
  fallback: /* @__PURE__ */ React36.createElement(Text, {
@@ -39452,7 +39456,7 @@ async function run6() {
39452
39456
  cli.sync(`git clean -df`, spawn_options);
39453
39457
  cli.sync(`git checkout ${branch_name}`, spawn_options);
39454
39458
  cli.sync(`git branch -D ${temp_branch_name}`, spawn_options);
39455
- if (fs12.existsSync(cwd2)) {
39459
+ if (fs10.existsSync(cwd2)) {
39456
39460
  process.chdir(cwd2);
39457
39461
  }
39458
39462
  cli.sync(`pwd`, spawn_options);
@@ -39513,8 +39517,8 @@ function PreLocalMergeRebase() {
39513
39517
 
39514
39518
  // src/app/PreManualRebase.tsx
39515
39519
  var React39 = __toESM(require_react(), 1);
39516
- import fs13 from "node:fs/promises";
39517
- import path8 from "node:path";
39520
+ import fs11 from "node:fs/promises";
39521
+ import path7 from "node:path";
39518
39522
  function PreManualRebase() {
39519
39523
  return /* @__PURE__ */ React39.createElement(Await, {
39520
39524
  fallback: null,
@@ -39536,7 +39540,7 @@ async function run8() {
39536
39540
  for (const key of PR_TEMPLATE_KEY_LIST) {
39537
39541
  const pr_template_fn = PR_TEMPLATE[key];
39538
39542
  if (await safe_exists(pr_template_fn(repo_root))) {
39539
- pr_template_body = await fs13.readFile(pr_template_fn(repo_root), "utf-8");
39543
+ pr_template_body = await fs11.readFile(pr_template_fn(repo_root), "utf-8");
39540
39544
  actions.output(/* @__PURE__ */ React39.createElement(FormatText, {
39541
39545
  wrapper: /* @__PURE__ */ React39.createElement(Text, {
39542
39546
  color: colors.yellow
@@ -39551,7 +39555,7 @@ async function run8() {
39551
39555
  }
39552
39556
  let pr_templates = [];
39553
39557
  if (await safe_exists(PR_TEMPLATE.TemplateDir(repo_root))) {
39554
- pr_templates = await fs13.readdir(PR_TEMPLATE.TemplateDir(repo_root));
39558
+ pr_templates = await fs11.readdir(PR_TEMPLATE.TemplateDir(repo_root));
39555
39559
  }
39556
39560
  actions.set((state2) => {
39557
39561
  state2.pr_template_body = pr_template_body;
@@ -39574,10 +39578,10 @@ async function run8() {
39574
39578
  });
39575
39579
  }
39576
39580
  var PR_TEMPLATE = Object.freeze({
39577
- Github: (root) => path8.join(root, ".github", "pull_request_template.md"),
39578
- Root: (root) => path8.join(root, "pull_request_template.md"),
39579
- Docs: (root) => path8.join(root, "docs", "pull_request_template.md"),
39580
- TemplateDir: (root) => path8.join(root, ".github", "PULL_REQUEST_TEMPLATE")
39581
+ Github: (root) => path7.join(root, ".github", "pull_request_template.md"),
39582
+ Root: (root) => path7.join(root, "pull_request_template.md"),
39583
+ Docs: (root) => path7.join(root, "docs", "pull_request_template.md"),
39584
+ TemplateDir: (root) => path7.join(root, ".github", "PULL_REQUEST_TEMPLATE")
39581
39585
  });
39582
39586
  var PR_TEMPLATE_KEY_LIST = Object.keys(PR_TEMPLATE);
39583
39587
 
@@ -40272,13 +40276,6 @@ async function run9() {
40272
40276
  invariant(sync_github, "sync_github must exist");
40273
40277
  const commit_range = sync_github.commit_range;
40274
40278
  const rebase_group_index = sync_github.rebase_group_index;
40275
- actions.register_abort_handler(async function abort_sync_github() {
40276
- actions.output(/* @__PURE__ */ React44.createElement(Text, {
40277
- color: colors.red
40278
- }, "\uD83D\uDEA8 Abort"));
40279
- handle_exit2();
40280
- return 17;
40281
- });
40282
40279
  let DEFAULT_PR_BODY = "";
40283
40280
  if (state.pr_template_body) {
40284
40281
  DEFAULT_PR_BODY = state.pr_template_body;
@@ -40344,17 +40341,7 @@ async function run9() {
40344
40341
  async function before_push(args) {
40345
40342
  const { group } = args;
40346
40343
  invariant(group.base, "group.base must exist");
40347
- let is_temp_draft = !group.pr?.isDraft;
40348
40344
  if (group.pr) {
40349
- if (!group.pr.isDraft) {
40350
- is_temp_draft = true;
40351
- }
40352
- if (is_temp_draft) {
40353
- await pr_draft({
40354
- branch: group.id,
40355
- draft: true
40356
- });
40357
- }
40358
40345
  await pr_edit({
40359
40346
  branch: group.id,
40360
40347
  base: master_branch
@@ -40375,13 +40362,6 @@ async function run9() {
40375
40362
  selected_url
40376
40363
  })
40377
40364
  });
40378
- let is_temp_draft = !group.pr?.isDraft;
40379
- if (is_temp_draft) {
40380
- await pr_draft({
40381
- branch: group.id,
40382
- draft: false
40383
- });
40384
- }
40385
40365
  } else {
40386
40366
  const pr_url = await pr_create({
40387
40367
  branch: group.id,
@@ -40421,23 +40401,6 @@ async function run9() {
40421
40401
  });
40422
40402
  }
40423
40403
  }
40424
- function handle_exit2() {
40425
- actions.output(/* @__PURE__ */ React44.createElement(Text, {
40426
- color: colors.yellow
40427
- }, "Restoring PR state…"));
40428
- for (const group of push_group_list) {
40429
- let is_temp_draft = !group.pr?.isDraft;
40430
- if (is_temp_draft) {
40431
- pr_draft({
40432
- branch: group.id,
40433
- draft: false
40434
- }).catch(actions.error);
40435
- }
40436
- }
40437
- actions.output(/* @__PURE__ */ React44.createElement(Text, {
40438
- color: colors.yellow
40439
- }, "Restored PR state."));
40440
- }
40441
40404
  }
40442
40405
  var get_group_url = (group) => group.pr?.url || group.id;
40443
40406
 
@@ -40507,7 +40470,7 @@ function Providers(props) {
40507
40470
 
40508
40471
  // src/app/RebaseCheck.tsx
40509
40472
  var React48 = __toESM(require_react(), 1);
40510
- import path9 from "node:path";
40473
+ import path8 from "node:path";
40511
40474
  function reducer5(state, patch) {
40512
40475
  return { ...state, ...patch };
40513
40476
  }
@@ -40545,8 +40508,8 @@ function RebaseCheck(props) {
40545
40508
  try {
40546
40509
  const git_dir = (await cli(`git rev-parse --absolute-git-dir`)).stdout;
40547
40510
  let is_rebase = false;
40548
- is_rebase ||= await safe_exists(path9.join(git_dir, "rebase-apply"));
40549
- is_rebase ||= await safe_exists(path9.join(git_dir, "rebase-merge"));
40511
+ is_rebase ||= await safe_exists(path8.join(git_dir, "rebase-apply"));
40512
+ is_rebase ||= await safe_exists(path8.join(git_dir, "rebase-merge"));
40550
40513
  const status = is_rebase ? "prompt" : "done";
40551
40514
  patch({ status });
40552
40515
  } catch (err) {
@@ -40807,7 +40770,7 @@ function App2() {
40807
40770
  actions.exit(0);
40808
40771
  }
40809
40772
  }
40810
- }, /* @__PURE__ */ React54.createElement(VerboseDebugInfo, null, /* @__PURE__ */ React54.createElement(DependencyCheck, null, /* @__PURE__ */ React54.createElement(RebaseCheck, null, /* @__PURE__ */ React54.createElement(CherryPickCheck, null, /* @__PURE__ */ React54.createElement(MaybeMain, null)))))), /* @__PURE__ */ React54.createElement(HandleCtrlCSigint, null))));
40773
+ }, /* @__PURE__ */ React54.createElement(VerboseDebugInfo, null, /* @__PURE__ */ React54.createElement(RebaseCheck, null, /* @__PURE__ */ React54.createElement(CherryPickCheck, null, /* @__PURE__ */ React54.createElement(MaybeMain, null))))), /* @__PURE__ */ React54.createElement(HandleCtrlCSigint, null))));
40811
40774
  }
40812
40775
  function MaybeMain() {
40813
40776
  const argv = Store.useState((state) => state.argv);
@@ -40817,9 +40780,9 @@ function MaybeMain() {
40817
40780
  } else if (positional_list.has("log")) {
40818
40781
  return /* @__PURE__ */ React54.createElement(Log, null);
40819
40782
  } else if (positional_list.has("rebase")) {
40820
- return /* @__PURE__ */ React54.createElement(GatherMetadata, null, /* @__PURE__ */ React54.createElement(LocalCommitStatus, null, /* @__PURE__ */ React54.createElement(Rebase, null)));
40783
+ return /* @__PURE__ */ React54.createElement(DependencyCheck, null, /* @__PURE__ */ React54.createElement(DirtyCheck, null, /* @__PURE__ */ React54.createElement(GatherMetadata, null, /* @__PURE__ */ React54.createElement(LocalCommitStatus, null, /* @__PURE__ */ React54.createElement(Rebase, null)))));
40821
40784
  }
40822
- return /* @__PURE__ */ React54.createElement(React54.Fragment, null, !argv.verbose ? null : /* @__PURE__ */ React54.createElement(GithubApiError, null), /* @__PURE__ */ React54.createElement(GatherMetadata, null, /* @__PURE__ */ React54.createElement(DirtyCheck, null, /* @__PURE__ */ React54.createElement(LocalCommitStatus, null, /* @__PURE__ */ React54.createElement(DetectInitialPR, null, /* @__PURE__ */ React54.createElement(Main, null))))));
40785
+ return /* @__PURE__ */ React54.createElement(React54.Fragment, null, !argv.verbose ? null : /* @__PURE__ */ React54.createElement(GithubApiError, null), /* @__PURE__ */ React54.createElement(DependencyCheck, null, /* @__PURE__ */ React54.createElement(DirtyCheck, null, /* @__PURE__ */ React54.createElement(GatherMetadata, null, /* @__PURE__ */ React54.createElement(LocalCommitStatus, null, /* @__PURE__ */ React54.createElement(DetectInitialPR, null, /* @__PURE__ */ React54.createElement(Main, null)))))));
40823
40786
  }
40824
40787
 
40825
40788
  // node_modules/.pnpm/yargs@17.7.2/node_modules/yargs/lib/platform-shims/esm.mjs
@@ -42099,9 +42062,9 @@ var parser = new YargsParser({
42099
42062
  format,
42100
42063
  normalize,
42101
42064
  resolve: resolve2,
42102
- require: (path10) => {
42065
+ require: (path9) => {
42103
42066
  if (true) {
42104
- return __require(path10);
42067
+ return __require(path9);
42105
42068
  } else
42106
42069
  ;
42107
42070
  }
@@ -45684,7 +45647,7 @@ var yargs_default = Yargs;
45684
45647
 
45685
45648
  // src/command.ts
45686
45649
  async function command2() {
45687
- return yargs_default(hideBin(process.argv)).scriptName("git stack").usage("Usage: git stack [command] [options]").command("$0", "Sync commit ranges to Github", (yargs) => yargs.options(DefaultOptions)).command("fixup [commit]", "Amend staged changes to a specific commit in history", (yargs) => yargs.positional("commit", FixupOptions.commit)).command("log [args...]", "Print an abbreviated log with numbered commits, useful for git stack fixup", (yargs) => yargs.strict(false)).command("rebase", "Update local branch via rebase with latest changes from origin master branch", (yargs) => yargs).option("verbose", GlobalOptions.verbose).wrap(123).strict().version("2.5.0").showHidden("show-hidden", "Show hidden options via `git stack help --show-hidden`").help("help", "Show usage via `git stack help`").argv;
45650
+ return yargs_default(hideBin(process.argv)).scriptName("git stack").usage("Usage: git stack [command] [options]").command("$0", "Sync commit ranges to Github", (yargs) => yargs.options(DefaultOptions)).command("fixup [commit]", "Amend staged changes to a specific commit in history", (yargs) => yargs.positional("commit", FixupOptions.commit)).command("log [args...]", "Print an abbreviated log with numbered commits, useful for git stack fixup", (yargs) => yargs.strict(false)).command("rebase", "Update local branch via rebase with latest changes from origin master branch", (yargs) => yargs).option("verbose", GlobalOptions.verbose).wrap(123).strict().version("2.5.2").showHidden("show-hidden", "Show hidden options via `git stack help --show-hidden`").help("help", "Show usage via `git stack help`").argv;
45688
45651
  }
45689
45652
  var GlobalOptions = {
45690
45653
  verbose: {
@@ -45811,7 +45774,7 @@ var FixupOptions = {
45811
45774
  process.exit(238);
45812
45775
  });
45813
45776
  const tmp_dir = await get_tmp_dir();
45814
- await fs14.rm(tmp_dir, { recursive: true });
45777
+ await fs12.rm(tmp_dir, { recursive: true });
45815
45778
  const ink = render_default(/* @__PURE__ */ React55.createElement(App2, null), {
45816
45779
  exitOnCtrlC: false
45817
45780
  });
@@ -45824,7 +45787,7 @@ var FixupOptions = {
45824
45787
  const actions = Store.getState().actions;
45825
45788
  actions.debug(pretty_json(argv));
45826
45789
  const PATH = process.env["PATH"];
45827
- const PATH_LIST = pretty_json(PATH.split(path10.delimiter));
45790
+ const PATH_LIST = pretty_json(PATH.split(path9.delimiter));
45828
45791
  actions.debug(`process.env.PATH ${PATH_LIST}`);
45829
45792
  await ink.waitUntilExit();
45830
45793
  } catch (err) {