pulse-framework-cli 0.4.15 → 0.4.16

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.
@@ -88,15 +88,26 @@ function registerCheckpointCommand(program) {
88
88
  process.exit(res.exitCode);
89
89
  }
90
90
  }
91
- // Optional commit (staged only)
91
+ // Optional commit (auto-stage all changes)
92
92
  if (opts.message) {
93
- // eslint-disable-next-line no-console
94
- console.log(`\nCreating commit: ${opts.message}`);
95
- const res = await (0, exec_js_1.exec)("git", ["commit", "-m", opts.message], { cwd: repoRoot });
96
- if (res.exitCode !== 0) {
93
+ // Stage all changes first
94
+ await (0, exec_js_1.exec)("git", ["add", "-A"], { cwd: repoRoot });
95
+ // Check if there's anything to commit
96
+ const statusCheck = await (0, exec_js_1.exec)("git", ["diff", "--cached", "--quiet"], { cwd: repoRoot });
97
+ if (statusCheck.exitCode !== 0) {
98
+ // There are staged changes, commit them
97
99
  // eslint-disable-next-line no-console
98
- console.error(res.stderr || res.stdout);
99
- process.exit(res.exitCode);
100
+ console.log(`\nCreating commit: ${opts.message}`);
101
+ const res = await (0, exec_js_1.exec)("git", ["commit", "-m", opts.message], { cwd: repoRoot });
102
+ if (res.exitCode !== 0) {
103
+ // eslint-disable-next-line no-console
104
+ console.error(res.stderr || res.stdout);
105
+ // Don't exit - still update state
106
+ }
107
+ }
108
+ else {
109
+ // eslint-disable-next-line no-console
110
+ console.log(`\n(No changes to commit)`);
100
111
  }
101
112
  }
102
113
  const state = await (0, artifacts_js_1.loadState)(repoRoot);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pulse-framework-cli",
3
- "version": "0.4.15",
3
+ "version": "0.4.16",
4
4
  "description": "Pulse Framework CLI – Guardrails, checkpoints, and escalation for AI-assisted development.",
5
5
  "author": "Manuel Fuß <kontakt@manuel-fuss.de>",
6
6
  "license": "MIT",
@@ -39,4 +39,3 @@
39
39
  "glob": "^11.0.0"
40
40
  }
41
41
  }
42
-