@walruswebdev/daily-devhabit-cli 1.1.1 → 1.1.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.
Files changed (2) hide show
  1. package/dist/index.js +20 -1
  2. package/package.json +3 -2
package/dist/index.js CHANGED
@@ -66,15 +66,24 @@ program
66
66
  .description('Create a new engineering log entry')
67
67
  .action(async () => {
68
68
  const token = config.get('auth.token') || process.env.DEV_CLI_TOKEN;
69
+ const lastProject = config.get('lastProject') || ''; // Memory feature
69
70
  if (!token) {
70
71
  console.log('❌ You are not logged in. Please run: ddh login');
71
72
  }
72
73
  const answers = await inquirer_1.default.prompt([
74
+ {
75
+ type: 'input',
76
+ name: 'project',
77
+ message: 'Project Name:',
78
+ default: lastProject, // Saves you typing if working on the same project
79
+ validate: (input) => input ? true : 'Project name is required for analysis.'
80
+ },
73
81
  {
74
82
  type: 'list',
75
83
  name: 'scope',
76
84
  message: 'What is the scope of this work?',
77
- choices: ['api', 'cli', 'database', 'docker', 'auth', 'refactor', 'docs', 'feature']
85
+ // Expanded list to reduce "choice compromise"
86
+ choices: ['prototype', 'boilerplate', 'feature', 'refactor', 'integration', 'database', 'docker', 'environment', 'auth', 'ui/ux', 'docs']
78
87
  },
79
88
  {
80
89
  type: 'input',
@@ -104,6 +113,8 @@ program
104
113
  message: 'Tags (comma separated):'
105
114
  }
106
115
  ]);
116
+ // Save project for next time to reduce friction
117
+ config.set('lastProject', answers.project);
107
118
  const payload = {
108
119
  ...answers,
109
120
  tags: answers.tags ? answers.tags.split(',').map((t) => t.trim()) : [],
@@ -117,6 +128,14 @@ program
117
128
  });
118
129
  console.log(`\n✅ Log Saved! (ID: ${response.data.id})`);
119
130
  console.log(` Stored in: Cloud Database`);
131
+ // 🚀 NEW: Trigger Local Webhook for Instant Notion Sync
132
+ try {
133
+ await axios_1.default.post('http://localhost:3333/webhook/sync', {}, { timeout: 2000 });
134
+ console.log('✨ Notion tables synced via local bridge.');
135
+ }
136
+ catch (e) {
137
+ // Quietly fail if bridge isn't running
138
+ }
120
139
  }
121
140
  catch (error) {
122
141
  // OFFLINE FALLBACK
package/package.json CHANGED
@@ -1,13 +1,14 @@
1
1
  {
2
2
  "name": "@walruswebdev/daily-devhabit-cli",
3
- "version": "1.1.1",
3
+ "version": "1.1.3",
4
4
  "description": "Package for Daily Dev Habit CLI Tool",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
7
7
  "ddh": "bin/ddh.js"
8
8
  },
9
9
  "scripts": {
10
- "build": "tsc"
10
+ "build": "tsc",
11
+ "release": "npm version patch && npm publish --access public"
11
12
  },
12
13
  "files": [
13
14
  "dist",