@walruswebdev/daily-devhabit-cli 1.1.3 → 1.1.5
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 +2 -10
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -65,7 +65,7 @@ program
|
|
|
65
65
|
.alias('l')
|
|
66
66
|
.description('Create a new engineering log entry')
|
|
67
67
|
.action(async () => {
|
|
68
|
-
const token = config.get('auth.token')
|
|
68
|
+
const token = config.get('auth.token')?.trim();
|
|
69
69
|
const lastProject = config.get('lastProject') || ''; // Memory feature
|
|
70
70
|
if (!token) {
|
|
71
71
|
console.log('❌ You are not logged in. Please run: ddh login');
|
|
@@ -128,14 +128,6 @@ program
|
|
|
128
128
|
});
|
|
129
129
|
console.log(`\n✅ Log Saved! (ID: ${response.data.id})`);
|
|
130
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
|
-
}
|
|
139
131
|
}
|
|
140
132
|
catch (error) {
|
|
141
133
|
// OFFLINE FALLBACK
|
|
@@ -191,7 +183,7 @@ program
|
|
|
191
183
|
.description('Download all cloud logs to a timestamped Markdown file')
|
|
192
184
|
.action(async () => {
|
|
193
185
|
// 1. Get Token
|
|
194
|
-
const token = config.get('auth.token')
|
|
186
|
+
const token = config.get('auth.token')?.trim();
|
|
195
187
|
if (!token) {
|
|
196
188
|
console.error('❌ Authentication required. Please run "ddh login" first.');
|
|
197
189
|
return;
|