@basementuniverse/kanbn 1.0.0 → 1.1.0
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/README.md +2 -0
- package/docs/commands/gantt.txt +3 -7
- package/docs/commands/history.txt +29 -0
- package/docs/task-structure.md +8 -4
- package/example/.kanbn/index.md +13 -10
- package/example/.kanbn/tasks/build-invoice-download-endpoint.md +3 -1
- package/example/.kanbn/tasks/create-self-serve-cancellation-flow.md +1 -1
- package/example/.kanbn/tasks/optimize-dashboard-first-load.md +1 -1
- package/example/.kanbn/tasks/prototype-report-export-scheduler.md +1 -1
- package/package.json +1 -1
- package/routes/add.json +2 -0
- package/routes/edit.json +2 -0
- package/routes/find.json +2 -0
- package/routes/history.json +27 -0
- package/routes/sort.json +2 -0
- package/skills/kanbn-plan/SKILL.md +211 -0
- package/skills/kanbn-plan/references/index-structure.md +89 -0
- package/skills/kanbn-plan/references/planning-rules.md +58 -0
- package/skills/kanbn-plan/references/task-structure.md +143 -0
- package/skills/kanbn-plan/scripts/check-dependency-cycles.mjs +273 -0
- package/skills/kanbn-plan/scripts/validate-kanbn.mjs +135 -0
- package/skills/kanbn-replan/SKILL.md +121 -0
- package/src/controller/add.js +49 -17
- package/src/controller/edit.js +91 -24
- package/src/controller/find.js +20 -3
- package/src/controller/gantt.js +2 -3
- package/src/controller/history.js +105 -0
- package/src/controller/sort.js +11 -3
- package/src/main.js +176 -14
- package/src/parse-task.js +20 -6
package/src/parse-task.js
CHANGED
|
@@ -65,7 +65,13 @@ function validateMetadataFromMarkdown(metadata) {
|
|
|
65
65
|
{ type: 'date'}
|
|
66
66
|
]
|
|
67
67
|
},
|
|
68
|
-
'
|
|
68
|
+
'plannedStart': {
|
|
69
|
+
oneOf: [
|
|
70
|
+
{ type: 'string' },
|
|
71
|
+
{ type: 'date'}
|
|
72
|
+
]
|
|
73
|
+
},
|
|
74
|
+
'plannedFinish': {
|
|
69
75
|
oneOf: [
|
|
70
76
|
{ type: 'string' },
|
|
71
77
|
{ type: 'date'}
|
|
@@ -98,7 +104,8 @@ function validateMetadataFromJSON(metadata) {
|
|
|
98
104
|
'started': { type: 'date'},
|
|
99
105
|
'completed': { type: 'date'},
|
|
100
106
|
'due': { type: 'date'},
|
|
101
|
-
'
|
|
107
|
+
'plannedStart': { type: 'date'},
|
|
108
|
+
'plannedFinish': { type: 'date'},
|
|
102
109
|
'progress': { type: 'number' },
|
|
103
110
|
'tags': {
|
|
104
111
|
type: 'array',
|
|
@@ -373,12 +380,19 @@ module.exports = {
|
|
|
373
380
|
}
|
|
374
381
|
metadata.due = dateValue;
|
|
375
382
|
}
|
|
376
|
-
if ('
|
|
377
|
-
const dateValue = chrono.parseDate(metadata.
|
|
383
|
+
if ('plannedStart' in metadata && !(metadata.plannedStart instanceof Date)) {
|
|
384
|
+
const dateValue = chrono.parseDate(metadata.plannedStart);
|
|
385
|
+
if (dateValue === null) {
|
|
386
|
+
throw new Error('unable to parse plannedStart date');
|
|
387
|
+
}
|
|
388
|
+
metadata.plannedStart = dateValue;
|
|
389
|
+
}
|
|
390
|
+
if ('plannedFinish' in metadata && !(metadata.plannedFinish instanceof Date)) {
|
|
391
|
+
const dateValue = chrono.parseDate(metadata.plannedFinish);
|
|
378
392
|
if (dateValue === null) {
|
|
379
|
-
throw new Error('unable to parse
|
|
393
|
+
throw new Error('unable to parse plannedFinish date');
|
|
380
394
|
}
|
|
381
|
-
metadata.
|
|
395
|
+
metadata.plannedFinish = dateValue;
|
|
382
396
|
}
|
|
383
397
|
|
|
384
398
|
// Check progress value
|