@ouro.bot/cli 0.1.0-alpha.422 → 0.1.0-alpha.425
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 +3 -0
- package/changelog.json +31 -0
- package/dist/heart/daemon/cli-defaults.js +1 -2
- package/dist/heart/daemon/cli-exec.js +510 -88
- package/dist/heart/daemon/cli-help.js +56 -41
- package/dist/heart/daemon/cli-parse.js +82 -77
- package/dist/heart/daemon/up-progress.js +43 -2
- package/dist/mind/prompt.js +2 -2
- package/dist/repertoire/tasks/index.js +12 -4
- package/package.json +1 -1
|
@@ -33,6 +33,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.createTaskModule = createTaskModule;
|
|
36
37
|
exports.getTaskModule = getTaskModule;
|
|
37
38
|
exports.resetTaskModule = resetTaskModule;
|
|
38
39
|
const fs = __importStar(require("fs"));
|
|
@@ -67,8 +68,12 @@ function removeRuntimeFrontmatter(frontmatter) {
|
|
|
67
68
|
return clean;
|
|
68
69
|
}
|
|
69
70
|
class FileTaskModule {
|
|
71
|
+
root;
|
|
72
|
+
constructor(root = (0, scanner_1.getTaskRoot)()) {
|
|
73
|
+
this.root = root;
|
|
74
|
+
}
|
|
70
75
|
scan() {
|
|
71
|
-
return (0, scanner_1.scanTasks)(
|
|
76
|
+
return (0, scanner_1.scanTasks)(this.root);
|
|
72
77
|
}
|
|
73
78
|
getBoard() {
|
|
74
79
|
return (0, board_1.buildTaskBoard)(this.scan());
|
|
@@ -94,7 +99,7 @@ class FileTaskModule {
|
|
|
94
99
|
const collection = (0, transitions_1.canonicalCollectionForTaskType)(type);
|
|
95
100
|
const stem = `${formatStemTimestamp()}-${(0, config_1.slugify)(input.title).slice(0, 64) || "task"}`;
|
|
96
101
|
const filename = `${stem}.md`;
|
|
97
|
-
const root =
|
|
102
|
+
const root = this.root;
|
|
98
103
|
const filePath = path.join(root, collection, filename);
|
|
99
104
|
const today = formatDate();
|
|
100
105
|
const frontmatter = {
|
|
@@ -194,7 +199,7 @@ class FileTaskModule {
|
|
|
194
199
|
return (0, middleware_1.validateSpawn)(task, spawnType);
|
|
195
200
|
}
|
|
196
201
|
fix(options) {
|
|
197
|
-
return (0, fix_1.applyFixes)(options,
|
|
202
|
+
return (0, fix_1.applyFixes)(options, this.root);
|
|
198
203
|
}
|
|
199
204
|
detectStale(thresholdDays) {
|
|
200
205
|
return (0, lifecycle_1.detectStaleTasks)(this.scan(), thresholdDays);
|
|
@@ -216,9 +221,12 @@ class FileTaskModule {
|
|
|
216
221
|
}
|
|
217
222
|
}
|
|
218
223
|
let taskModule = null;
|
|
224
|
+
function createTaskModule(root = (0, scanner_1.getTaskRoot)()) {
|
|
225
|
+
return new FileTaskModule(root);
|
|
226
|
+
}
|
|
219
227
|
function getTaskModule() {
|
|
220
228
|
if (!taskModule) {
|
|
221
|
-
taskModule =
|
|
229
|
+
taskModule = createTaskModule();
|
|
222
230
|
}
|
|
223
231
|
return taskModule;
|
|
224
232
|
}
|