hermes-git 0.2.0 → 0.2.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.
Files changed (2) hide show
  1. package/dist/index.js +45 -5
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -22843,7 +22843,17 @@ function startCommand(program2) {
22843
22843
  }
22844
22844
  if (plan.commands && Array.isArray(plan.commands)) {
22845
22845
  for (const command of plan.commands) {
22846
- const cmdString = typeof command === "string" ? command : String(command);
22846
+ let cmdString;
22847
+ if (typeof command === "string") {
22848
+ cmdString = command;
22849
+ } else if (typeof command === "object" && command.command) {
22850
+ cmdString = command.command;
22851
+ } else if (typeof command === "object" && command.cmd) {
22852
+ cmdString = command.cmd;
22853
+ } else {
22854
+ console.warn("⚠️ Skipping invalid command:", command);
22855
+ continue;
22856
+ }
22847
22857
  displayStep(cmdString);
22848
22858
  await executeGitCommand(cmdString);
22849
22859
  gitCommandsRun++;
@@ -22894,7 +22904,17 @@ function wipCommand(program2) {
22894
22904
  }
22895
22905
  if (plan.commands && Array.isArray(plan.commands)) {
22896
22906
  for (const command of plan.commands) {
22897
- const cmdString = typeof command === "string" ? command : String(command);
22907
+ let cmdString;
22908
+ if (typeof command === "string") {
22909
+ cmdString = command;
22910
+ } else if (typeof command === "object" && command.command) {
22911
+ cmdString = command.command;
22912
+ } else if (typeof command === "object" && command.cmd) {
22913
+ cmdString = command.cmd;
22914
+ } else {
22915
+ console.warn("⚠️ Skipping invalid command:", command);
22916
+ continue;
22917
+ }
22898
22918
  displayStep(cmdString);
22899
22919
  await executeGitCommand(cmdString);
22900
22920
  }
@@ -22940,7 +22960,17 @@ function syncCommand(program2) {
22940
22960
  }
22941
22961
  if (plan.commands && Array.isArray(plan.commands)) {
22942
22962
  for (const command of plan.commands) {
22943
- const cmdString = typeof command === "string" ? command : String(command);
22963
+ let cmdString;
22964
+ if (typeof command === "string") {
22965
+ cmdString = command;
22966
+ } else if (typeof command === "object" && command.command) {
22967
+ cmdString = command.command;
22968
+ } else if (typeof command === "object" && command.cmd) {
22969
+ cmdString = command.cmd;
22970
+ } else {
22971
+ console.warn("⚠️ Skipping invalid command:", command);
22972
+ continue;
22973
+ }
22944
22974
  displayStep(cmdString);
22945
22975
  await executeGitCommand(cmdString);
22946
22976
  }
@@ -25327,7 +25357,17 @@ function worktreeCommand(program2) {
25327
25357
  }
25328
25358
  if (plan.commands && Array.isArray(plan.commands)) {
25329
25359
  for (const command of plan.commands) {
25330
- const cmdString = typeof command === "string" ? command : String(command);
25360
+ let cmdString;
25361
+ if (typeof command === "string") {
25362
+ cmdString = command;
25363
+ } else if (typeof command === "object" && command.command) {
25364
+ cmdString = command.command;
25365
+ } else if (typeof command === "object" && command.cmd) {
25366
+ cmdString = command.cmd;
25367
+ } else {
25368
+ console.warn("⚠️ Skipping invalid command:", command);
25369
+ continue;
25370
+ }
25331
25371
  displayStep(cmdString);
25332
25372
  await executeGitCommand(cmdString);
25333
25373
  }
@@ -25695,7 +25735,7 @@ Project-specific:`);
25695
25735
 
25696
25736
  // src/index.ts
25697
25737
  var program2 = new Command;
25698
- program2.name("hermes").description("\uD83E\uDEBD Intent-driven Git, guided by AI").version("0.2.0");
25738
+ program2.name("hermes").description("\uD83E\uDEBD Intent-driven Git, guided by AI").version("0.2.2");
25699
25739
  initCommand(program2);
25700
25740
  planCommand(program2);
25701
25741
  startCommand(program2);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hermes-git",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "description": "Intent-driven Git, guided by AI. Turn natural language into safe, explainable Git operations.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",