sncommit 1.0.3 → 1.0.4

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.
Files changed (3) hide show
  1. package/README.md +8 -0
  2. package/dist/index.js +655 -69
  3. package/package.json +2 -2
package/README.md CHANGED
@@ -57,6 +57,12 @@ better-commit
57
57
 
58
58
  # Or stage all files and run (like git commit -am)
59
59
  better-commit -a
60
+
61
+ # Push to remote after committing
62
+ better-commit -p
63
+
64
+ # Stage all files, commit, and push (like git commit -am && git push)
65
+ better-commit -ap
60
66
  ```
61
67
 
62
68
  ### Alias
@@ -66,6 +72,8 @@ You can use the short alias `bc` instead of typing `better-commit`:
66
72
  ```bash
67
73
  bc # Generate commit
68
74
  bc -a # Stage all and commit
75
+ bc -p # Commit and push
76
+ bc -ap # Stage all, commit, and push
69
77
  bc config # Open configuration
70
78
  ```
71
79
 
package/dist/index.js CHANGED
@@ -44010,6 +44010,10 @@ class GitService {
44010
44010
  return false;
44011
44011
  }
44012
44012
  }
44013
+ async push() {
44014
+ await this.git.push();
44015
+ return "Push successful";
44016
+ }
44013
44017
  }
44014
44018
  var init_git = __esm(() => {
44015
44019
  init_esm();
@@ -45764,7 +45768,7 @@ var require_public_api = __commonJS((exports) => {
45764
45768
  exports.parseURL = require_url_state_machine().parseURL;
45765
45769
  });
45766
45770
 
45767
- // node_modules/groq-sdk/node_modules/node-fetch/lib/index.js
45771
+ // node_modules/node-fetch/lib/index.js
45768
45772
  var require_lib2 = __commonJS((exports, module) => {
45769
45773
  Object.defineProperty(exports, "__esModule", { value: true });
45770
45774
  function _interopDefault(ex) {
@@ -46894,7 +46898,7 @@ var require_lib2 = __commonJS((exports, module) => {
46894
46898
  exports.AbortError = AbortError;
46895
46899
  });
46896
46900
 
46897
- // node_modules/formdata-node/node_modules/web-streams-polyfill/dist/ponyfill.mjs
46901
+ // node_modules/web-streams-polyfill/dist/ponyfill.mjs
46898
46902
  function t() {}
46899
46903
  function r(e2) {
46900
46904
  return typeof e2 == "object" && e2 !== null || typeof e2 == "function";
@@ -53200,7 +53204,7 @@ var measureText = (text) => {
53200
53204
  };
53201
53205
  var measure_text_default = measureText;
53202
53206
 
53203
- // node_modules/ansi-styles/index.js
53207
+ // node_modules/wrap-ansi/node_modules/ansi-styles/index.js
53204
53208
  var ANSI_BACKGROUND_OFFSET = 10;
53205
53209
  var wrapAnsi16 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
53206
53210
  var wrapAnsi256 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`;
@@ -53547,6 +53551,183 @@ function isFullwidthCodePoint(codePoint) {
53547
53551
  return codePoint >= 4352 && (codePoint <= 4447 || codePoint === 9001 || codePoint === 9002 || 11904 <= codePoint && codePoint <= 12871 && codePoint !== 12351 || 12880 <= codePoint && codePoint <= 19903 || 19968 <= codePoint && codePoint <= 42182 || 43360 <= codePoint && codePoint <= 43388 || 44032 <= codePoint && codePoint <= 55203 || 63744 <= codePoint && codePoint <= 64255 || 65040 <= codePoint && codePoint <= 65049 || 65072 <= codePoint && codePoint <= 65131 || 65281 <= codePoint && codePoint <= 65376 || 65504 <= codePoint && codePoint <= 65510 || 110592 <= codePoint && codePoint <= 110593 || 127488 <= codePoint && codePoint <= 127569 || 131072 <= codePoint && codePoint <= 262141);
53548
53552
  }
53549
53553
 
53554
+ // node_modules/cli-truncate/node_modules/ansi-styles/index.js
53555
+ var ANSI_BACKGROUND_OFFSET2 = 10;
53556
+ var wrapAnsi162 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
53557
+ var wrapAnsi2562 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`;
53558
+ var wrapAnsi16m2 = (offset = 0) => (red, green, blue) => `\x1B[${38 + offset};2;${red};${green};${blue}m`;
53559
+ var styles2 = {
53560
+ modifier: {
53561
+ reset: [0, 0],
53562
+ bold: [1, 22],
53563
+ dim: [2, 22],
53564
+ italic: [3, 23],
53565
+ underline: [4, 24],
53566
+ overline: [53, 55],
53567
+ inverse: [7, 27],
53568
+ hidden: [8, 28],
53569
+ strikethrough: [9, 29]
53570
+ },
53571
+ color: {
53572
+ black: [30, 39],
53573
+ red: [31, 39],
53574
+ green: [32, 39],
53575
+ yellow: [33, 39],
53576
+ blue: [34, 39],
53577
+ magenta: [35, 39],
53578
+ cyan: [36, 39],
53579
+ white: [37, 39],
53580
+ blackBright: [90, 39],
53581
+ gray: [90, 39],
53582
+ grey: [90, 39],
53583
+ redBright: [91, 39],
53584
+ greenBright: [92, 39],
53585
+ yellowBright: [93, 39],
53586
+ blueBright: [94, 39],
53587
+ magentaBright: [95, 39],
53588
+ cyanBright: [96, 39],
53589
+ whiteBright: [97, 39]
53590
+ },
53591
+ bgColor: {
53592
+ bgBlack: [40, 49],
53593
+ bgRed: [41, 49],
53594
+ bgGreen: [42, 49],
53595
+ bgYellow: [43, 49],
53596
+ bgBlue: [44, 49],
53597
+ bgMagenta: [45, 49],
53598
+ bgCyan: [46, 49],
53599
+ bgWhite: [47, 49],
53600
+ bgBlackBright: [100, 49],
53601
+ bgGray: [100, 49],
53602
+ bgGrey: [100, 49],
53603
+ bgRedBright: [101, 49],
53604
+ bgGreenBright: [102, 49],
53605
+ bgYellowBright: [103, 49],
53606
+ bgBlueBright: [104, 49],
53607
+ bgMagentaBright: [105, 49],
53608
+ bgCyanBright: [106, 49],
53609
+ bgWhiteBright: [107, 49]
53610
+ }
53611
+ };
53612
+ var modifierNames2 = Object.keys(styles2.modifier);
53613
+ var foregroundColorNames2 = Object.keys(styles2.color);
53614
+ var backgroundColorNames2 = Object.keys(styles2.bgColor);
53615
+ var colorNames2 = [...foregroundColorNames2, ...backgroundColorNames2];
53616
+ function assembleStyles2() {
53617
+ const codes = new Map;
53618
+ for (const [groupName, group] of Object.entries(styles2)) {
53619
+ for (const [styleName, style] of Object.entries(group)) {
53620
+ styles2[styleName] = {
53621
+ open: `\x1B[${style[0]}m`,
53622
+ close: `\x1B[${style[1]}m`
53623
+ };
53624
+ group[styleName] = styles2[styleName];
53625
+ codes.set(style[0], style[1]);
53626
+ }
53627
+ Object.defineProperty(styles2, groupName, {
53628
+ value: group,
53629
+ enumerable: false
53630
+ });
53631
+ }
53632
+ Object.defineProperty(styles2, "codes", {
53633
+ value: codes,
53634
+ enumerable: false
53635
+ });
53636
+ styles2.color.close = "\x1B[39m";
53637
+ styles2.bgColor.close = "\x1B[49m";
53638
+ styles2.color.ansi = wrapAnsi162();
53639
+ styles2.color.ansi256 = wrapAnsi2562();
53640
+ styles2.color.ansi16m = wrapAnsi16m2();
53641
+ styles2.bgColor.ansi = wrapAnsi162(ANSI_BACKGROUND_OFFSET2);
53642
+ styles2.bgColor.ansi256 = wrapAnsi2562(ANSI_BACKGROUND_OFFSET2);
53643
+ styles2.bgColor.ansi16m = wrapAnsi16m2(ANSI_BACKGROUND_OFFSET2);
53644
+ Object.defineProperties(styles2, {
53645
+ rgbToAnsi256: {
53646
+ value(red, green, blue) {
53647
+ if (red === green && green === blue) {
53648
+ if (red < 8) {
53649
+ return 16;
53650
+ }
53651
+ if (red > 248) {
53652
+ return 231;
53653
+ }
53654
+ return Math.round((red - 8) / 247 * 24) + 232;
53655
+ }
53656
+ return 16 + 36 * Math.round(red / 255 * 5) + 6 * Math.round(green / 255 * 5) + Math.round(blue / 255 * 5);
53657
+ },
53658
+ enumerable: false
53659
+ },
53660
+ hexToRgb: {
53661
+ value(hex) {
53662
+ const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16));
53663
+ if (!matches) {
53664
+ return [0, 0, 0];
53665
+ }
53666
+ let [colorString] = matches;
53667
+ if (colorString.length === 3) {
53668
+ colorString = [...colorString].map((character) => character + character).join("");
53669
+ }
53670
+ const integer = Number.parseInt(colorString, 16);
53671
+ return [
53672
+ integer >> 16 & 255,
53673
+ integer >> 8 & 255,
53674
+ integer & 255
53675
+ ];
53676
+ },
53677
+ enumerable: false
53678
+ },
53679
+ hexToAnsi256: {
53680
+ value: (hex) => styles2.rgbToAnsi256(...styles2.hexToRgb(hex)),
53681
+ enumerable: false
53682
+ },
53683
+ ansi256ToAnsi: {
53684
+ value(code) {
53685
+ if (code < 8) {
53686
+ return 30 + code;
53687
+ }
53688
+ if (code < 16) {
53689
+ return 90 + (code - 8);
53690
+ }
53691
+ let red;
53692
+ let green;
53693
+ let blue;
53694
+ if (code >= 232) {
53695
+ red = ((code - 232) * 10 + 8) / 255;
53696
+ green = red;
53697
+ blue = red;
53698
+ } else {
53699
+ code -= 16;
53700
+ const remainder = code % 36;
53701
+ red = Math.floor(code / 36) / 5;
53702
+ green = Math.floor(remainder / 6) / 5;
53703
+ blue = remainder % 6 / 5;
53704
+ }
53705
+ const value = Math.max(red, green, blue) * 2;
53706
+ if (value === 0) {
53707
+ return 30;
53708
+ }
53709
+ let result = 30 + (Math.round(blue) << 2 | Math.round(green) << 1 | Math.round(red));
53710
+ if (value === 2) {
53711
+ result += 60;
53712
+ }
53713
+ return result;
53714
+ },
53715
+ enumerable: false
53716
+ },
53717
+ rgbToAnsi: {
53718
+ value: (red, green, blue) => styles2.ansi256ToAnsi(styles2.rgbToAnsi256(red, green, blue)),
53719
+ enumerable: false
53720
+ },
53721
+ hexToAnsi: {
53722
+ value: (hex) => styles2.ansi256ToAnsi(styles2.hexToAnsi256(hex)),
53723
+ enumerable: false
53724
+ }
53725
+ });
53726
+ return styles2;
53727
+ }
53728
+ var ansiStyles2 = assembleStyles2();
53729
+ var ansi_styles_default2 = ansiStyles2;
53730
+
53550
53731
  // node_modules/cli-truncate/node_modules/slice-ansi/index.js
53551
53732
  var astralRegex = /^[\uD800-\uDBFF][\uDC00-\uDFFF]$/;
53552
53733
  var ESCAPES2 = [
@@ -53562,7 +53743,7 @@ var checkAnsi = (ansiCodes, isEscapes, endAnsiCode) => {
53562
53743
  if (ansiCode.includes(";")) {
53563
53744
  ansiCode = ansiCode.split(";")[0][0] + "0";
53564
53745
  }
53565
- const item = ansi_styles_default.codes.get(Number.parseInt(ansiCode, 10));
53746
+ const item = ansi_styles_default2.codes.get(Number.parseInt(ansiCode, 10));
53566
53747
  if (item) {
53567
53748
  const indexEscape = ansiCodes.indexOf(item.toString());
53568
53749
  if (indexEscape === -1) {
@@ -53580,7 +53761,7 @@ var checkAnsi = (ansiCodes, isEscapes, endAnsiCode) => {
53580
53761
  if (isEscapes) {
53581
53762
  output = output.filter((element, index) => output.indexOf(element) === index);
53582
53763
  if (endAnsiCode !== undefined) {
53583
- const fistEscapeCode = wrapAnsi2(ansi_styles_default.codes.get(Number.parseInt(endAnsiCode, 10)));
53764
+ const fistEscapeCode = wrapAnsi2(ansi_styles_default2.codes.get(Number.parseInt(endAnsiCode, 10)));
53584
53765
  output = output.reduce((current, next) => next === fistEscapeCode ? [next, ...current] : [...current, next], []);
53585
53766
  }
53586
53767
  }
@@ -54076,7 +54257,7 @@ var applyGapStyles = (node, style) => {
54076
54257
  node.setGap(src_default.GUTTER_ROW, style.rowGap ?? 0);
54077
54258
  }
54078
54259
  };
54079
- var styles2 = (node, style = {}) => {
54260
+ var styles3 = (node, style = {}) => {
54080
54261
  applyPositionStyles(node, style);
54081
54262
  applyMarginStyles(node, style);
54082
54263
  applyPaddingStyles(node, style);
@@ -54086,7 +54267,7 @@ var styles2 = (node, style = {}) => {
54086
54267
  applyBorderStyles(node, style);
54087
54268
  applyGapStyles(node, style);
54088
54269
  };
54089
- var styles_default = styles2;
54270
+ var styles_default = styles3;
54090
54271
 
54091
54272
  // node_modules/ink/build/reconciler.js
54092
54273
  if (process3.env["DEV"] === "true") {
@@ -54325,11 +54506,11 @@ var get_max_width_default = getMaxWidth;
54325
54506
  var import_cli_boxes = __toESM(require_cli_boxes(), 1);
54326
54507
 
54327
54508
  // node_modules/ink/node_modules/chalk/source/vendor/ansi-styles/index.js
54328
- var ANSI_BACKGROUND_OFFSET2 = 10;
54329
- var wrapAnsi162 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
54330
- var wrapAnsi2562 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`;
54331
- var wrapAnsi16m2 = (offset = 0) => (red, green, blue) => `\x1B[${38 + offset};2;${red};${green};${blue}m`;
54332
- var styles3 = {
54509
+ var ANSI_BACKGROUND_OFFSET3 = 10;
54510
+ var wrapAnsi163 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
54511
+ var wrapAnsi2563 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`;
54512
+ var wrapAnsi16m3 = (offset = 0) => (red, green, blue) => `\x1B[${38 + offset};2;${red};${green};${blue}m`;
54513
+ var styles4 = {
54333
54514
  modifier: {
54334
54515
  reset: [0, 0],
54335
54516
  bold: [1, 22],
@@ -54382,39 +54563,39 @@ var styles3 = {
54382
54563
  bgWhiteBright: [107, 49]
54383
54564
  }
54384
54565
  };
54385
- var modifierNames2 = Object.keys(styles3.modifier);
54386
- var foregroundColorNames2 = Object.keys(styles3.color);
54387
- var backgroundColorNames2 = Object.keys(styles3.bgColor);
54388
- var colorNames2 = [...foregroundColorNames2, ...backgroundColorNames2];
54389
- function assembleStyles2() {
54566
+ var modifierNames3 = Object.keys(styles4.modifier);
54567
+ var foregroundColorNames3 = Object.keys(styles4.color);
54568
+ var backgroundColorNames3 = Object.keys(styles4.bgColor);
54569
+ var colorNames3 = [...foregroundColorNames3, ...backgroundColorNames3];
54570
+ function assembleStyles3() {
54390
54571
  const codes = new Map;
54391
- for (const [groupName, group] of Object.entries(styles3)) {
54572
+ for (const [groupName, group] of Object.entries(styles4)) {
54392
54573
  for (const [styleName, style] of Object.entries(group)) {
54393
- styles3[styleName] = {
54574
+ styles4[styleName] = {
54394
54575
  open: `\x1B[${style[0]}m`,
54395
54576
  close: `\x1B[${style[1]}m`
54396
54577
  };
54397
- group[styleName] = styles3[styleName];
54578
+ group[styleName] = styles4[styleName];
54398
54579
  codes.set(style[0], style[1]);
54399
54580
  }
54400
- Object.defineProperty(styles3, groupName, {
54581
+ Object.defineProperty(styles4, groupName, {
54401
54582
  value: group,
54402
54583
  enumerable: false
54403
54584
  });
54404
54585
  }
54405
- Object.defineProperty(styles3, "codes", {
54586
+ Object.defineProperty(styles4, "codes", {
54406
54587
  value: codes,
54407
54588
  enumerable: false
54408
54589
  });
54409
- styles3.color.close = "\x1B[39m";
54410
- styles3.bgColor.close = "\x1B[49m";
54411
- styles3.color.ansi = wrapAnsi162();
54412
- styles3.color.ansi256 = wrapAnsi2562();
54413
- styles3.color.ansi16m = wrapAnsi16m2();
54414
- styles3.bgColor.ansi = wrapAnsi162(ANSI_BACKGROUND_OFFSET2);
54415
- styles3.bgColor.ansi256 = wrapAnsi2562(ANSI_BACKGROUND_OFFSET2);
54416
- styles3.bgColor.ansi16m = wrapAnsi16m2(ANSI_BACKGROUND_OFFSET2);
54417
- Object.defineProperties(styles3, {
54590
+ styles4.color.close = "\x1B[39m";
54591
+ styles4.bgColor.close = "\x1B[49m";
54592
+ styles4.color.ansi = wrapAnsi163();
54593
+ styles4.color.ansi256 = wrapAnsi2563();
54594
+ styles4.color.ansi16m = wrapAnsi16m3();
54595
+ styles4.bgColor.ansi = wrapAnsi163(ANSI_BACKGROUND_OFFSET3);
54596
+ styles4.bgColor.ansi256 = wrapAnsi2563(ANSI_BACKGROUND_OFFSET3);
54597
+ styles4.bgColor.ansi16m = wrapAnsi16m3(ANSI_BACKGROUND_OFFSET3);
54598
+ Object.defineProperties(styles4, {
54418
54599
  rgbToAnsi256: {
54419
54600
  value(red, green, blue) {
54420
54601
  if (red === green && green === blue) {
@@ -54450,7 +54631,7 @@ function assembleStyles2() {
54450
54631
  enumerable: false
54451
54632
  },
54452
54633
  hexToAnsi256: {
54453
- value: (hex) => styles3.rgbToAnsi256(...styles3.hexToRgb(hex)),
54634
+ value: (hex) => styles4.rgbToAnsi256(...styles4.hexToRgb(hex)),
54454
54635
  enumerable: false
54455
54636
  },
54456
54637
  ansi256ToAnsi: {
@@ -54488,18 +54669,18 @@ function assembleStyles2() {
54488
54669
  enumerable: false
54489
54670
  },
54490
54671
  rgbToAnsi: {
54491
- value: (red, green, blue) => styles3.ansi256ToAnsi(styles3.rgbToAnsi256(red, green, blue)),
54672
+ value: (red, green, blue) => styles4.ansi256ToAnsi(styles4.rgbToAnsi256(red, green, blue)),
54492
54673
  enumerable: false
54493
54674
  },
54494
54675
  hexToAnsi: {
54495
- value: (hex) => styles3.ansi256ToAnsi(styles3.hexToAnsi256(hex)),
54676
+ value: (hex) => styles4.ansi256ToAnsi(styles4.hexToAnsi256(hex)),
54496
54677
  enumerable: false
54497
54678
  }
54498
54679
  });
54499
- return styles3;
54680
+ return styles4;
54500
54681
  }
54501
- var ansiStyles2 = assembleStyles2();
54502
- var ansi_styles_default2 = ansiStyles2;
54682
+ var ansiStyles3 = assembleStyles3();
54683
+ var ansi_styles_default3 = ansiStyles3;
54503
54684
 
54504
54685
  // node_modules/ink/node_modules/chalk/source/vendor/supports-color/index.js
54505
54686
  import process4 from "node:process";
@@ -54677,7 +54858,7 @@ var levelMapping = [
54677
54858
  "ansi256",
54678
54859
  "ansi16m"
54679
54860
  ];
54680
- var styles4 = Object.create(null);
54861
+ var styles5 = Object.create(null);
54681
54862
  var applyOptions = (object, options = {}) => {
54682
54863
  if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) {
54683
54864
  throw new Error("The `level` option should be an integer from 0 to 3");
@@ -54695,8 +54876,8 @@ function createChalk(options) {
54695
54876
  return chalkFactory(options);
54696
54877
  }
54697
54878
  Object.setPrototypeOf(createChalk.prototype, Function.prototype);
54698
- for (const [styleName, style] of Object.entries(ansi_styles_default2)) {
54699
- styles4[styleName] = {
54879
+ for (const [styleName, style] of Object.entries(ansi_styles_default3)) {
54880
+ styles5[styleName] = {
54700
54881
  get() {
54701
54882
  const builder = createBuilder(this, createStyler(style.open, style.close, this[STYLER]), this[IS_EMPTY]);
54702
54883
  Object.defineProperty(this, styleName, { value: builder });
@@ -54704,7 +54885,7 @@ for (const [styleName, style] of Object.entries(ansi_styles_default2)) {
54704
54885
  }
54705
54886
  };
54706
54887
  }
54707
- styles4.visible = {
54888
+ styles5.visible = {
54708
54889
  get() {
54709
54890
  const builder = createBuilder(this, this[STYLER], true);
54710
54891
  Object.defineProperty(this, "visible", { value: builder });
@@ -54714,42 +54895,42 @@ styles4.visible = {
54714
54895
  var getModelAnsi = (model, level, type, ...arguments_) => {
54715
54896
  if (model === "rgb") {
54716
54897
  if (level === "ansi16m") {
54717
- return ansi_styles_default2[type].ansi16m(...arguments_);
54898
+ return ansi_styles_default3[type].ansi16m(...arguments_);
54718
54899
  }
54719
54900
  if (level === "ansi256") {
54720
- return ansi_styles_default2[type].ansi256(ansi_styles_default2.rgbToAnsi256(...arguments_));
54901
+ return ansi_styles_default3[type].ansi256(ansi_styles_default3.rgbToAnsi256(...arguments_));
54721
54902
  }
54722
- return ansi_styles_default2[type].ansi(ansi_styles_default2.rgbToAnsi(...arguments_));
54903
+ return ansi_styles_default3[type].ansi(ansi_styles_default3.rgbToAnsi(...arguments_));
54723
54904
  }
54724
54905
  if (model === "hex") {
54725
- return getModelAnsi("rgb", level, type, ...ansi_styles_default2.hexToRgb(...arguments_));
54906
+ return getModelAnsi("rgb", level, type, ...ansi_styles_default3.hexToRgb(...arguments_));
54726
54907
  }
54727
- return ansi_styles_default2[type][model](...arguments_);
54908
+ return ansi_styles_default3[type][model](...arguments_);
54728
54909
  };
54729
54910
  var usedModels = ["rgb", "hex", "ansi256"];
54730
54911
  for (const model of usedModels) {
54731
- styles4[model] = {
54912
+ styles5[model] = {
54732
54913
  get() {
54733
54914
  const { level } = this;
54734
54915
  return function(...arguments_) {
54735
- const styler = createStyler(getModelAnsi(model, levelMapping[level], "color", ...arguments_), ansi_styles_default2.color.close, this[STYLER]);
54916
+ const styler = createStyler(getModelAnsi(model, levelMapping[level], "color", ...arguments_), ansi_styles_default3.color.close, this[STYLER]);
54736
54917
  return createBuilder(this, styler, this[IS_EMPTY]);
54737
54918
  };
54738
54919
  }
54739
54920
  };
54740
54921
  const bgModel = "bg" + model[0].toUpperCase() + model.slice(1);
54741
- styles4[bgModel] = {
54922
+ styles5[bgModel] = {
54742
54923
  get() {
54743
54924
  const { level } = this;
54744
54925
  return function(...arguments_) {
54745
- const styler = createStyler(getModelAnsi(model, levelMapping[level], "bgColor", ...arguments_), ansi_styles_default2.bgColor.close, this[STYLER]);
54926
+ const styler = createStyler(getModelAnsi(model, levelMapping[level], "bgColor", ...arguments_), ansi_styles_default3.bgColor.close, this[STYLER]);
54746
54927
  return createBuilder(this, styler, this[IS_EMPTY]);
54747
54928
  };
54748
54929
  }
54749
54930
  };
54750
54931
  }
54751
54932
  var proto = Object.defineProperties(() => {}, {
54752
- ...styles4,
54933
+ ...styles5,
54753
54934
  level: {
54754
54935
  enumerable: true,
54755
54936
  get() {
@@ -54808,7 +54989,7 @@ var applyStyle = (self2, string) => {
54808
54989
  }
54809
54990
  return openAll + string + closeAll;
54810
54991
  };
54811
- Object.defineProperties(createChalk.prototype, styles4);
54992
+ Object.defineProperties(createChalk.prototype, styles5);
54812
54993
  var chalk = createChalk();
54813
54994
  var chalkStderr = createChalk({ level: stderrColor ? stderrColor.level : 0 });
54814
54995
  var source_default = chalk;
@@ -54990,6 +55171,183 @@ var renderNodeToOutput = (node, output, options) => {
54990
55171
  };
54991
55172
  var render_node_to_output_default = renderNodeToOutput;
54992
55173
 
55174
+ // node_modules/slice-ansi/node_modules/ansi-styles/index.js
55175
+ var ANSI_BACKGROUND_OFFSET4 = 10;
55176
+ var wrapAnsi164 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
55177
+ var wrapAnsi2564 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`;
55178
+ var wrapAnsi16m4 = (offset = 0) => (red, green, blue) => `\x1B[${38 + offset};2;${red};${green};${blue}m`;
55179
+ var styles6 = {
55180
+ modifier: {
55181
+ reset: [0, 0],
55182
+ bold: [1, 22],
55183
+ dim: [2, 22],
55184
+ italic: [3, 23],
55185
+ underline: [4, 24],
55186
+ overline: [53, 55],
55187
+ inverse: [7, 27],
55188
+ hidden: [8, 28],
55189
+ strikethrough: [9, 29]
55190
+ },
55191
+ color: {
55192
+ black: [30, 39],
55193
+ red: [31, 39],
55194
+ green: [32, 39],
55195
+ yellow: [33, 39],
55196
+ blue: [34, 39],
55197
+ magenta: [35, 39],
55198
+ cyan: [36, 39],
55199
+ white: [37, 39],
55200
+ blackBright: [90, 39],
55201
+ gray: [90, 39],
55202
+ grey: [90, 39],
55203
+ redBright: [91, 39],
55204
+ greenBright: [92, 39],
55205
+ yellowBright: [93, 39],
55206
+ blueBright: [94, 39],
55207
+ magentaBright: [95, 39],
55208
+ cyanBright: [96, 39],
55209
+ whiteBright: [97, 39]
55210
+ },
55211
+ bgColor: {
55212
+ bgBlack: [40, 49],
55213
+ bgRed: [41, 49],
55214
+ bgGreen: [42, 49],
55215
+ bgYellow: [43, 49],
55216
+ bgBlue: [44, 49],
55217
+ bgMagenta: [45, 49],
55218
+ bgCyan: [46, 49],
55219
+ bgWhite: [47, 49],
55220
+ bgBlackBright: [100, 49],
55221
+ bgGray: [100, 49],
55222
+ bgGrey: [100, 49],
55223
+ bgRedBright: [101, 49],
55224
+ bgGreenBright: [102, 49],
55225
+ bgYellowBright: [103, 49],
55226
+ bgBlueBright: [104, 49],
55227
+ bgMagentaBright: [105, 49],
55228
+ bgCyanBright: [106, 49],
55229
+ bgWhiteBright: [107, 49]
55230
+ }
55231
+ };
55232
+ var modifierNames4 = Object.keys(styles6.modifier);
55233
+ var foregroundColorNames4 = Object.keys(styles6.color);
55234
+ var backgroundColorNames4 = Object.keys(styles6.bgColor);
55235
+ var colorNames4 = [...foregroundColorNames4, ...backgroundColorNames4];
55236
+ function assembleStyles4() {
55237
+ const codes = new Map;
55238
+ for (const [groupName, group] of Object.entries(styles6)) {
55239
+ for (const [styleName, style] of Object.entries(group)) {
55240
+ styles6[styleName] = {
55241
+ open: `\x1B[${style[0]}m`,
55242
+ close: `\x1B[${style[1]}m`
55243
+ };
55244
+ group[styleName] = styles6[styleName];
55245
+ codes.set(style[0], style[1]);
55246
+ }
55247
+ Object.defineProperty(styles6, groupName, {
55248
+ value: group,
55249
+ enumerable: false
55250
+ });
55251
+ }
55252
+ Object.defineProperty(styles6, "codes", {
55253
+ value: codes,
55254
+ enumerable: false
55255
+ });
55256
+ styles6.color.close = "\x1B[39m";
55257
+ styles6.bgColor.close = "\x1B[49m";
55258
+ styles6.color.ansi = wrapAnsi164();
55259
+ styles6.color.ansi256 = wrapAnsi2564();
55260
+ styles6.color.ansi16m = wrapAnsi16m4();
55261
+ styles6.bgColor.ansi = wrapAnsi164(ANSI_BACKGROUND_OFFSET4);
55262
+ styles6.bgColor.ansi256 = wrapAnsi2564(ANSI_BACKGROUND_OFFSET4);
55263
+ styles6.bgColor.ansi16m = wrapAnsi16m4(ANSI_BACKGROUND_OFFSET4);
55264
+ Object.defineProperties(styles6, {
55265
+ rgbToAnsi256: {
55266
+ value(red, green, blue) {
55267
+ if (red === green && green === blue) {
55268
+ if (red < 8) {
55269
+ return 16;
55270
+ }
55271
+ if (red > 248) {
55272
+ return 231;
55273
+ }
55274
+ return Math.round((red - 8) / 247 * 24) + 232;
55275
+ }
55276
+ return 16 + 36 * Math.round(red / 255 * 5) + 6 * Math.round(green / 255 * 5) + Math.round(blue / 255 * 5);
55277
+ },
55278
+ enumerable: false
55279
+ },
55280
+ hexToRgb: {
55281
+ value(hex) {
55282
+ const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16));
55283
+ if (!matches) {
55284
+ return [0, 0, 0];
55285
+ }
55286
+ let [colorString] = matches;
55287
+ if (colorString.length === 3) {
55288
+ colorString = [...colorString].map((character) => character + character).join("");
55289
+ }
55290
+ const integer = Number.parseInt(colorString, 16);
55291
+ return [
55292
+ integer >> 16 & 255,
55293
+ integer >> 8 & 255,
55294
+ integer & 255
55295
+ ];
55296
+ },
55297
+ enumerable: false
55298
+ },
55299
+ hexToAnsi256: {
55300
+ value: (hex) => styles6.rgbToAnsi256(...styles6.hexToRgb(hex)),
55301
+ enumerable: false
55302
+ },
55303
+ ansi256ToAnsi: {
55304
+ value(code) {
55305
+ if (code < 8) {
55306
+ return 30 + code;
55307
+ }
55308
+ if (code < 16) {
55309
+ return 90 + (code - 8);
55310
+ }
55311
+ let red;
55312
+ let green;
55313
+ let blue;
55314
+ if (code >= 232) {
55315
+ red = ((code - 232) * 10 + 8) / 255;
55316
+ green = red;
55317
+ blue = red;
55318
+ } else {
55319
+ code -= 16;
55320
+ const remainder = code % 36;
55321
+ red = Math.floor(code / 36) / 5;
55322
+ green = Math.floor(remainder / 6) / 5;
55323
+ blue = remainder % 6 / 5;
55324
+ }
55325
+ const value = Math.max(red, green, blue) * 2;
55326
+ if (value === 0) {
55327
+ return 30;
55328
+ }
55329
+ let result = 30 + (Math.round(blue) << 2 | Math.round(green) << 1 | Math.round(red));
55330
+ if (value === 2) {
55331
+ result += 60;
55332
+ }
55333
+ return result;
55334
+ },
55335
+ enumerable: false
55336
+ },
55337
+ rgbToAnsi: {
55338
+ value: (red, green, blue) => styles6.ansi256ToAnsi(styles6.rgbToAnsi256(red, green, blue)),
55339
+ enumerable: false
55340
+ },
55341
+ hexToAnsi: {
55342
+ value: (hex) => styles6.ansi256ToAnsi(styles6.hexToAnsi256(hex)),
55343
+ enumerable: false
55344
+ }
55345
+ });
55346
+ return styles6;
55347
+ }
55348
+ var ansiStyles4 = assembleStyles4();
55349
+ var ansi_styles_default4 = ansiStyles4;
55350
+
54993
55351
  // node_modules/slice-ansi/node_modules/is-fullwidth-code-point/index.js
54994
55352
  function isFullwidthCodePoint2(codePoint) {
54995
55353
  if (!Number.isInteger(codePoint)) {
@@ -55005,9 +55363,9 @@ var CODE_POINT_9 = "9".codePointAt(0);
55005
55363
  var MAX_ANSI_SEQUENCE_LENGTH = 19;
55006
55364
  var endCodesSet = new Set;
55007
55365
  var endCodesMap = new Map;
55008
- for (const [start, end] of ansi_styles_default.codes) {
55009
- endCodesSet.add(ansi_styles_default.color.ansi(end));
55010
- endCodesMap.set(ansi_styles_default.color.ansi(start), ansi_styles_default.color.ansi(end));
55366
+ for (const [start, end] of ansi_styles_default4.codes) {
55367
+ endCodesSet.add(ansi_styles_default4.color.ansi(end));
55368
+ endCodesMap.set(ansi_styles_default4.color.ansi(start), ansi_styles_default4.color.ansi(end));
55011
55369
  }
55012
55370
  function getEndCode(code) {
55013
55371
  if (endCodesSet.has(code)) {
@@ -55020,11 +55378,11 @@ function getEndCode(code) {
55020
55378
  if (code.includes(";")) {
55021
55379
  code = code[0] + "0";
55022
55380
  }
55023
- const returnValue = ansi_styles_default.codes.get(Number.parseInt(code, 10));
55381
+ const returnValue = ansi_styles_default4.codes.get(Number.parseInt(code, 10));
55024
55382
  if (returnValue) {
55025
- return ansi_styles_default.color.ansi(returnValue);
55383
+ return ansi_styles_default4.color.ansi(returnValue);
55026
55384
  }
55027
- return ansi_styles_default.reset.open;
55385
+ return ansi_styles_default4.reset.open;
55028
55386
  }
55029
55387
  function findNumberIndex(string) {
55030
55388
  for (let index = 0;index < string.length; index++) {
@@ -55082,7 +55440,7 @@ function tokenize(string, endCharacter = Number.POSITIVE_INFINITY) {
55082
55440
  function reduceAnsiCodes(codes) {
55083
55441
  let returnValue = [];
55084
55442
  for (const code of codes) {
55085
- if (code.code === ansi_styles_default.reset.open) {
55443
+ if (code.code === ansi_styles_default4.reset.open) {
55086
55444
  returnValue = [];
55087
55445
  } else if (endCodesSet.has(code.code)) {
55088
55446
  returnValue = returnValue.filter((returnValueCode) => returnValueCode.endCode !== code.code);
@@ -55129,13 +55487,190 @@ function sliceAnsi2(string, start, end) {
55129
55487
  return returnValue;
55130
55488
  }
55131
55489
 
55490
+ // node_modules/@alcalzone/ansi-tokenize/node_modules/ansi-styles/index.js
55491
+ var ANSI_BACKGROUND_OFFSET5 = 10;
55492
+ var wrapAnsi165 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
55493
+ var wrapAnsi2565 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`;
55494
+ var wrapAnsi16m5 = (offset = 0) => (red, green, blue) => `\x1B[${38 + offset};2;${red};${green};${blue}m`;
55495
+ var styles7 = {
55496
+ modifier: {
55497
+ reset: [0, 0],
55498
+ bold: [1, 22],
55499
+ dim: [2, 22],
55500
+ italic: [3, 23],
55501
+ underline: [4, 24],
55502
+ overline: [53, 55],
55503
+ inverse: [7, 27],
55504
+ hidden: [8, 28],
55505
+ strikethrough: [9, 29]
55506
+ },
55507
+ color: {
55508
+ black: [30, 39],
55509
+ red: [31, 39],
55510
+ green: [32, 39],
55511
+ yellow: [33, 39],
55512
+ blue: [34, 39],
55513
+ magenta: [35, 39],
55514
+ cyan: [36, 39],
55515
+ white: [37, 39],
55516
+ blackBright: [90, 39],
55517
+ gray: [90, 39],
55518
+ grey: [90, 39],
55519
+ redBright: [91, 39],
55520
+ greenBright: [92, 39],
55521
+ yellowBright: [93, 39],
55522
+ blueBright: [94, 39],
55523
+ magentaBright: [95, 39],
55524
+ cyanBright: [96, 39],
55525
+ whiteBright: [97, 39]
55526
+ },
55527
+ bgColor: {
55528
+ bgBlack: [40, 49],
55529
+ bgRed: [41, 49],
55530
+ bgGreen: [42, 49],
55531
+ bgYellow: [43, 49],
55532
+ bgBlue: [44, 49],
55533
+ bgMagenta: [45, 49],
55534
+ bgCyan: [46, 49],
55535
+ bgWhite: [47, 49],
55536
+ bgBlackBright: [100, 49],
55537
+ bgGray: [100, 49],
55538
+ bgGrey: [100, 49],
55539
+ bgRedBright: [101, 49],
55540
+ bgGreenBright: [102, 49],
55541
+ bgYellowBright: [103, 49],
55542
+ bgBlueBright: [104, 49],
55543
+ bgMagentaBright: [105, 49],
55544
+ bgCyanBright: [106, 49],
55545
+ bgWhiteBright: [107, 49]
55546
+ }
55547
+ };
55548
+ var modifierNames5 = Object.keys(styles7.modifier);
55549
+ var foregroundColorNames5 = Object.keys(styles7.color);
55550
+ var backgroundColorNames5 = Object.keys(styles7.bgColor);
55551
+ var colorNames5 = [...foregroundColorNames5, ...backgroundColorNames5];
55552
+ function assembleStyles5() {
55553
+ const codes = new Map;
55554
+ for (const [groupName, group] of Object.entries(styles7)) {
55555
+ for (const [styleName, style] of Object.entries(group)) {
55556
+ styles7[styleName] = {
55557
+ open: `\x1B[${style[0]}m`,
55558
+ close: `\x1B[${style[1]}m`
55559
+ };
55560
+ group[styleName] = styles7[styleName];
55561
+ codes.set(style[0], style[1]);
55562
+ }
55563
+ Object.defineProperty(styles7, groupName, {
55564
+ value: group,
55565
+ enumerable: false
55566
+ });
55567
+ }
55568
+ Object.defineProperty(styles7, "codes", {
55569
+ value: codes,
55570
+ enumerable: false
55571
+ });
55572
+ styles7.color.close = "\x1B[39m";
55573
+ styles7.bgColor.close = "\x1B[49m";
55574
+ styles7.color.ansi = wrapAnsi165();
55575
+ styles7.color.ansi256 = wrapAnsi2565();
55576
+ styles7.color.ansi16m = wrapAnsi16m5();
55577
+ styles7.bgColor.ansi = wrapAnsi165(ANSI_BACKGROUND_OFFSET5);
55578
+ styles7.bgColor.ansi256 = wrapAnsi2565(ANSI_BACKGROUND_OFFSET5);
55579
+ styles7.bgColor.ansi16m = wrapAnsi16m5(ANSI_BACKGROUND_OFFSET5);
55580
+ Object.defineProperties(styles7, {
55581
+ rgbToAnsi256: {
55582
+ value(red, green, blue) {
55583
+ if (red === green && green === blue) {
55584
+ if (red < 8) {
55585
+ return 16;
55586
+ }
55587
+ if (red > 248) {
55588
+ return 231;
55589
+ }
55590
+ return Math.round((red - 8) / 247 * 24) + 232;
55591
+ }
55592
+ return 16 + 36 * Math.round(red / 255 * 5) + 6 * Math.round(green / 255 * 5) + Math.round(blue / 255 * 5);
55593
+ },
55594
+ enumerable: false
55595
+ },
55596
+ hexToRgb: {
55597
+ value(hex) {
55598
+ const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16));
55599
+ if (!matches) {
55600
+ return [0, 0, 0];
55601
+ }
55602
+ let [colorString] = matches;
55603
+ if (colorString.length === 3) {
55604
+ colorString = [...colorString].map((character) => character + character).join("");
55605
+ }
55606
+ const integer = Number.parseInt(colorString, 16);
55607
+ return [
55608
+ integer >> 16 & 255,
55609
+ integer >> 8 & 255,
55610
+ integer & 255
55611
+ ];
55612
+ },
55613
+ enumerable: false
55614
+ },
55615
+ hexToAnsi256: {
55616
+ value: (hex) => styles7.rgbToAnsi256(...styles7.hexToRgb(hex)),
55617
+ enumerable: false
55618
+ },
55619
+ ansi256ToAnsi: {
55620
+ value(code) {
55621
+ if (code < 8) {
55622
+ return 30 + code;
55623
+ }
55624
+ if (code < 16) {
55625
+ return 90 + (code - 8);
55626
+ }
55627
+ let red;
55628
+ let green;
55629
+ let blue;
55630
+ if (code >= 232) {
55631
+ red = ((code - 232) * 10 + 8) / 255;
55632
+ green = red;
55633
+ blue = red;
55634
+ } else {
55635
+ code -= 16;
55636
+ const remainder = code % 36;
55637
+ red = Math.floor(code / 36) / 5;
55638
+ green = Math.floor(remainder / 6) / 5;
55639
+ blue = remainder % 6 / 5;
55640
+ }
55641
+ const value = Math.max(red, green, blue) * 2;
55642
+ if (value === 0) {
55643
+ return 30;
55644
+ }
55645
+ let result = 30 + (Math.round(blue) << 2 | Math.round(green) << 1 | Math.round(red));
55646
+ if (value === 2) {
55647
+ result += 60;
55648
+ }
55649
+ return result;
55650
+ },
55651
+ enumerable: false
55652
+ },
55653
+ rgbToAnsi: {
55654
+ value: (red, green, blue) => styles7.ansi256ToAnsi(styles7.rgbToAnsi256(red, green, blue)),
55655
+ enumerable: false
55656
+ },
55657
+ hexToAnsi: {
55658
+ value: (hex) => styles7.ansi256ToAnsi(styles7.hexToAnsi256(hex)),
55659
+ enumerable: false
55660
+ }
55661
+ });
55662
+ return styles7;
55663
+ }
55664
+ var ansiStyles5 = assembleStyles5();
55665
+ var ansi_styles_default5 = ansiStyles5;
55666
+
55132
55667
  // node_modules/@alcalzone/ansi-tokenize/build/ansiCodes.js
55133
55668
  var ESCAPES4 = new Set([27, 155]);
55134
55669
  var endCodesSet2 = new Set;
55135
55670
  var endCodesMap2 = new Map;
55136
- for (const [start, end] of ansi_styles_default.codes) {
55137
- endCodesSet2.add(ansi_styles_default.color.ansi(end));
55138
- endCodesMap2.set(ansi_styles_default.color.ansi(start), ansi_styles_default.color.ansi(end));
55671
+ for (const [start, end] of ansi_styles_default5.codes) {
55672
+ endCodesSet2.add(ansi_styles_default5.color.ansi(end));
55673
+ endCodesMap2.set(ansi_styles_default5.color.ansi(start), ansi_styles_default5.color.ansi(end));
55139
55674
  }
55140
55675
  var linkStartCodePrefix = "\x1B]8;;";
55141
55676
  var linkStartCodePrefixCharCodes = linkStartCodePrefix.split("").map((char) => char.charCodeAt(0));
@@ -55153,11 +55688,11 @@ function getEndCode2(code) {
55153
55688
  if (code.includes(";")) {
55154
55689
  code = code[0] + "0";
55155
55690
  }
55156
- const ret = ansi_styles_default.codes.get(parseInt(code, 10));
55691
+ const ret = ansi_styles_default5.codes.get(parseInt(code, 10));
55157
55692
  if (ret) {
55158
- return ansi_styles_default.color.ansi(ret);
55693
+ return ansi_styles_default5.color.ansi(ret);
55159
55694
  } else {
55160
- return ansi_styles_default.reset.open;
55695
+ return ansi_styles_default5.reset.open;
55161
55696
  }
55162
55697
  }
55163
55698
  function ansiCodesToString(codes) {
@@ -55170,7 +55705,7 @@ function reduceAnsiCodes2(codes) {
55170
55705
  function reduceAnsiCodesIncremental(codes, newCodes) {
55171
55706
  let ret = [...codes];
55172
55707
  for (const code of newCodes) {
55173
- if (code.code === ansi_styles_default.reset.open) {
55708
+ if (code.code === ansi_styles_default5.reset.open) {
55174
55709
  ret = [];
55175
55710
  } else if (endCodesSet2.has(code.code)) {
55176
55711
  ret = ret.filter((retCode) => retCode.endCode !== code.code);
@@ -58932,6 +59467,7 @@ var CustomInputPrompt = ({
58932
59467
  var jsx_dev_runtime4 = __toESM(require_jsx_dev_runtime(), 1);
58933
59468
  var BetterCommitApp = ({
58934
59469
  addAll: _addAll = false,
59470
+ pushAfterCommit = false,
58935
59471
  onExit
58936
59472
  }) => {
58937
59473
  const { exit } = use_app_default();
@@ -58945,17 +59481,26 @@ var BetterCommitApp = ({
58945
59481
  });
58946
59482
  const [isUsingFallback, setIsUsingFallback] = import_react24.useState(false);
58947
59483
  const [successMessage, setSuccessMessage] = import_react24.useState(undefined);
59484
+ const [isPushing, setIsPushing] = import_react24.useState(false);
59485
+ const [pushLogs, setPushLogs] = import_react24.useState([]);
58948
59486
  const [customInput, setCustomInput] = import_react24.useState("");
58949
59487
  const [isCustomInputMode, setIsCustomInputMode] = import_react24.useState(false);
58950
59488
  import_react24.useEffect(() => {
58951
- if (successMessage) {
59489
+ if (successMessage && !isPushing && (!pushAfterCommit || pushLogs.length > 0)) {
58952
59490
  write("\x1B[2J\x1B[0f");
58953
59491
  const timer = setTimeout(() => {
58954
59492
  exit();
58955
59493
  }, 1500);
58956
59494
  return () => clearTimeout(timer);
58957
59495
  }
58958
- }, [successMessage, exit, write]);
59496
+ }, [
59497
+ successMessage,
59498
+ isPushing,
59499
+ pushAfterCommit,
59500
+ pushLogs.length,
59501
+ exit,
59502
+ write
59503
+ ]);
58959
59504
  import_react24.useEffect(() => {
58960
59505
  if (state.error) {
58961
59506
  exit();
@@ -59033,6 +59578,21 @@ var BetterCommitApp = ({
59033
59578
  try {
59034
59579
  await gitService.commit(selectedSuggestion.message);
59035
59580
  setSuccessMessage(selectedSuggestion.message);
59581
+ if (pushAfterCommit) {
59582
+ setIsPushing(true);
59583
+ setPushLogs(["Pushing to remote..."]);
59584
+ try {
59585
+ await gitService.push();
59586
+ setPushLogs((prev) => [...prev, "Push successful!"]);
59587
+ } catch (error) {
59588
+ setPushLogs((prev) => [
59589
+ ...prev,
59590
+ `Failed to push: ${error instanceof Error ? error.message : String(error)}`
59591
+ ]);
59592
+ } finally {
59593
+ setIsPushing(false);
59594
+ }
59595
+ }
59036
59596
  } catch (error) {
59037
59597
  setState((prev) => ({
59038
59598
  ...prev,
@@ -59128,7 +59688,31 @@ var BetterCommitApp = ({
59128
59688
  color: "#10b981",
59129
59689
  children: "Changes have been committed successfully!"
59130
59690
  }, undefined, false, undefined, this)
59131
- }, undefined, false, undefined, this)
59691
+ }, undefined, false, undefined, this),
59692
+ pushAfterCommit && pushLogs.length > 0 && /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Box_default, {
59693
+ flexDirection: "column",
59694
+ marginTop: 1,
59695
+ borderTop: true,
59696
+ borderStyle: "single",
59697
+ borderColor: "#374151",
59698
+ paddingTop: 1,
59699
+ children: [
59700
+ /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Box_default, {
59701
+ marginBottom: 1,
59702
+ children: /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Text, {
59703
+ color: "#60a5fa",
59704
+ bold: true,
59705
+ children: isPushing ? "Pushing..." : "Push Logs:"
59706
+ }, undefined, false, undefined, this)
59707
+ }, undefined, false, undefined, this),
59708
+ pushLogs.map((log, index) => /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Box_default, {
59709
+ children: /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Text, {
59710
+ color: log.includes("failed") || log.includes("Failed") ? "#ef4444" : "#9ca3af",
59711
+ children: log
59712
+ }, undefined, false, undefined, this)
59713
+ }, index, false, undefined, this))
59714
+ ]
59715
+ }, undefined, true, undefined, this)
59132
59716
  ]
59133
59717
  }, undefined, true, undefined, this)
59134
59718
  }, undefined, false, undefined, this);
@@ -59701,6 +60285,7 @@ var handleRawModeError = (error, fallbackMessage) => {
59701
60285
  var program2 = new Command;
59702
60286
  program2.name("better-commit").description("AI-powered git commit message generator with beautiful TUI").version("1.0.0");
59703
60287
  program2.option("-a, --all", "stage all files before committing");
60288
+ program2.option("-p, --push", "push to remote after committing");
59704
60289
  program2.command("config").description("Configure better-commit settings").action(async () => {
59705
60290
  if (!process.stdin.isTTY) {
59706
60291
  console.log("Configuration interface not supported in this terminal.");
@@ -59773,6 +60358,7 @@ program2.action(async () => {
59773
60358
  let exitMessage = "";
59774
60359
  const { waitUntilExit } = render_default(/* @__PURE__ */ jsx_dev_runtime7.jsxDEV(App2, {
59775
60360
  addAll: options.all || false,
60361
+ pushAfterCommit: options.push || false,
59776
60362
  onExit: (message) => {
59777
60363
  if (message)
59778
60364
  exitMessage = message;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sncommit",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "AI-powered git commit message generator with beautiful TUI",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -19,7 +19,7 @@
19
19
  "type-check": "tsc --noEmit",
20
20
  "format": "prettier --write .",
21
21
  "format:check": "prettier --check .",
22
- "prepublishOnly": "bun run build"
22
+ "prepublishOnly": "bun run format && bun run lint && bun run type-check && bun run build"
23
23
  },
24
24
  "keywords": [
25
25
  "git",