@damper/cli 0.6.2 → 0.6.3

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/index.js CHANGED
@@ -5,7 +5,7 @@ import { statusCommand } from './commands/status.js';
5
5
  import { cleanupCommand } from './commands/cleanup.js';
6
6
  import { setupCommand } from './commands/setup.js';
7
7
  import { releaseCommand } from './commands/release.js';
8
- const VERSION = '0.6.2';
8
+ const VERSION = '0.6.3';
9
9
  function showHelp() {
10
10
  console.log(`
11
11
  ${pc.bold('@damper/cli')} - Agent orchestration for Damper tasks
@@ -178,9 +178,21 @@ export async function postTaskFlow(options) {
178
178
  hasUnpushedCommits = unpushed.trim().length > 0;
179
179
  }
180
180
  catch {
181
- // No upstream branch - assume all commits are unpushed
182
- const { stdout: commits } = await execa('git', ['log', 'main..HEAD', '--oneline'], { cwd, stdio: 'pipe' });
183
- hasUnpushedCommits = commits.trim().length > 0;
181
+ // No upstream branch - check against main/origin
182
+ try {
183
+ const { stdout: commits } = await execa('git', ['log', 'origin/main..HEAD', '--oneline'], { cwd, stdio: 'pipe' });
184
+ hasUnpushedCommits = commits.trim().length > 0;
185
+ }
186
+ catch {
187
+ try {
188
+ const { stdout: commits } = await execa('git', ['log', 'main..HEAD', '--oneline'], { cwd, stdio: 'pipe' });
189
+ hasUnpushedCommits = commits.trim().length > 0;
190
+ }
191
+ catch {
192
+ // Can't determine - assume there are commits if branch differs from main
193
+ hasUnpushedCommits = currentBranch !== 'main' && currentBranch !== '';
194
+ }
195
+ }
184
196
  }
185
197
  }
186
198
  catch {
@@ -202,13 +214,13 @@ export async function postTaskFlow(options) {
202
214
  }
203
215
  console.log();
204
216
  // Offer actions based on state
205
- if (hasUncommittedChanges) {
206
- console.log(pc.dim('You have uncommitted changes. Commit them before pushing.\n'));
207
- }
208
- if (hasUnpushedCommits && !hasUncommittedChanges) {
209
- const { select } = await import('@inquirer/prompts');
217
+ const hasChanges = hasUnpushedCommits || hasUncommittedChanges;
218
+ if (hasChanges) {
219
+ if (hasUncommittedChanges) {
220
+ console.log(pc.yellow('⚠ There are uncommitted changes. You may want to commit them first.\n'));
221
+ }
210
222
  const mergeAction = await select({
211
- message: 'How do you want to merge your changes?',
223
+ message: 'How do you want to handle your changes?',
212
224
  choices: [
213
225
  { name: 'Create a pull request', value: 'pr' },
214
226
  { name: 'Merge directly to main', value: 'merge' },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@damper/cli",
3
- "version": "0.6.2",
3
+ "version": "0.6.3",
4
4
  "description": "CLI tool for orchestrating Damper task workflows with Claude Code",
5
5
  "author": "Damper <hello@usedamper.com>",
6
6
  "repository": {