@cccarv82/freya 1.0.28 → 1.0.29
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/cli/web.js +12 -6
- package/package.json +1 -1
package/cli/web.js
CHANGED
|
@@ -1000,8 +1000,8 @@ async function cmdWeb({ port, dir, open, dev }) {
|
|
|
1000
1000
|
const schema = {
|
|
1001
1001
|
actions: [
|
|
1002
1002
|
{ type: 'append_daily_log', text: '<string>' },
|
|
1003
|
-
{ type: 'create_task', description: '<string>', priority: 'HIGH|MEDIUM|LOW', category: 'DO_NOW|SCHEDULE|DELEGATE|IGNORE' },
|
|
1004
|
-
{ type: 'create_blocker', title: '<string>', severity: 'CRITICAL|HIGH|MEDIUM|LOW', notes: '<string>' },
|
|
1003
|
+
{ type: 'create_task', description: '<string>', priority: 'HIGH|MEDIUM|LOW', category: 'DO_NOW|SCHEDULE|DELEGATE|IGNORE', projectSlug: '<string optional>' },
|
|
1004
|
+
{ type: 'create_blocker', title: '<string>', severity: 'CRITICAL|HIGH|MEDIUM|LOW', notes: '<string>', projectSlug: '<string optional>' },
|
|
1005
1005
|
{ type: 'suggest_report', name: 'daily|status|sm-weekly|blockers' },
|
|
1006
1006
|
{ type: 'oracle_query', query: '<string>' }
|
|
1007
1007
|
]
|
|
@@ -1082,7 +1082,8 @@ async function cmdWeb({ port, dir, open, dev }) {
|
|
|
1082
1082
|
const priorityRaw = String(a.priority || '').trim().toLowerCase();
|
|
1083
1083
|
const priority = (priorityRaw === 'high' || priorityRaw === 'medium' || priorityRaw === 'low') ? priorityRaw : undefined;
|
|
1084
1084
|
if (!description) { preview.errors.push('Task missing description'); continue; }
|
|
1085
|
-
|
|
1085
|
+
const projectSlug = String(a.projectSlug || '').trim();
|
|
1086
|
+
preview.tasks.push({ description, category: validTaskCats.has(category) ? category : 'DO_NOW', priority, projectSlug: projectSlug || undefined });
|
|
1086
1087
|
continue;
|
|
1087
1088
|
}
|
|
1088
1089
|
|
|
@@ -1098,7 +1099,8 @@ async function cmdWeb({ port, dir, open, dev }) {
|
|
|
1098
1099
|
else severity = 'MEDIUM';
|
|
1099
1100
|
}
|
|
1100
1101
|
if (!title) { preview.errors.push('Blocker missing title'); continue; }
|
|
1101
|
-
|
|
1102
|
+
const projectSlug = String(a.projectSlug || '').trim();
|
|
1103
|
+
preview.blockers.push({ title, notes, severity, projectSlug: projectSlug || undefined });
|
|
1102
1104
|
continue;
|
|
1103
1105
|
}
|
|
1104
1106
|
|
|
@@ -1254,7 +1256,8 @@ async function cmdWeb({ port, dir, open, dev }) {
|
|
|
1254
1256
|
if (applyMode !== 'all' && applyMode !== 'tasks') continue;
|
|
1255
1257
|
const description = normalizeWhitespace(a.description);
|
|
1256
1258
|
if (!description) continue;
|
|
1257
|
-
const
|
|
1259
|
+
const projectSlug = String(a.projectSlug || '').trim();
|
|
1260
|
+
const key = sha1(normalizeTextForKey((projectSlug ? projectSlug + ' ' : '') + description));
|
|
1258
1261
|
if (existingTaskKeys24h.has(key)) { applied.tasksSkipped++; continue; }
|
|
1259
1262
|
const category = validTaskCats.has(String(a.category || '').trim()) ? String(a.category).trim() : 'DO_NOW';
|
|
1260
1263
|
const priority = normPriority(a.priority);
|
|
@@ -1265,6 +1268,7 @@ async function cmdWeb({ port, dir, open, dev }) {
|
|
|
1265
1268
|
status: 'PENDING',
|
|
1266
1269
|
createdAt: now,
|
|
1267
1270
|
};
|
|
1271
|
+
if (projectSlug) task.projectSlug = projectSlug;
|
|
1268
1272
|
if (priority) task.priority = priority;
|
|
1269
1273
|
taskLog.tasks.push(task);
|
|
1270
1274
|
applied.tasks++;
|
|
@@ -1274,7 +1278,8 @@ async function cmdWeb({ port, dir, open, dev }) {
|
|
|
1274
1278
|
if (type === 'create_blocker') {
|
|
1275
1279
|
if (applyMode !== 'all' && applyMode !== 'blockers') continue;
|
|
1276
1280
|
const title = normalizeWhitespace(a.title);
|
|
1277
|
-
const
|
|
1281
|
+
const projectSlug = String(a.projectSlug || '').trim();
|
|
1282
|
+
const key = sha1(normalizeTextForKey((projectSlug ? projectSlug + ' ' : '') + title));
|
|
1278
1283
|
if (existingBlockerKeys24h.has(key)) { applied.blockersSkipped++; continue; }
|
|
1279
1284
|
const notes = normalizeWhitespace(a.notes);
|
|
1280
1285
|
if (!title) continue;
|
|
@@ -1287,6 +1292,7 @@ async function cmdWeb({ port, dir, open, dev }) {
|
|
|
1287
1292
|
status: 'OPEN',
|
|
1288
1293
|
severity,
|
|
1289
1294
|
};
|
|
1295
|
+
if (projectSlug) blocker.projectSlug = projectSlug;
|
|
1290
1296
|
blockerLog.blockers.push(blocker);
|
|
1291
1297
|
applied.blockers++;
|
|
1292
1298
|
continue;
|