brainfile 0.21.1 → 0.21.2
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.
|
@@ -5622,7 +5622,7 @@ var require_frontmatter = __commonJS({
|
|
|
5622
5622
|
}
|
|
5623
5623
|
let endIndex = -1;
|
|
5624
5624
|
for (let i = 1; i < lines.length; i++) {
|
|
5625
|
-
if (lines[i].
|
|
5625
|
+
if (lines[i].trimEnd() === "---") {
|
|
5626
5626
|
endIndex = i;
|
|
5627
5627
|
break;
|
|
5628
5628
|
}
|
|
@@ -8577,6 +8577,7 @@ var require_workspace = __commonJS({
|
|
|
8577
8577
|
exports.getLogFilePath = getLogFilePath2;
|
|
8578
8578
|
exports.findV2Task = findV2Task2;
|
|
8579
8579
|
exports.extractDescription = extractDescription2;
|
|
8580
|
+
exports.replaceDescription = replaceDescription;
|
|
8580
8581
|
exports.extractLog = extractLog2;
|
|
8581
8582
|
exports.composeBody = composeBody2;
|
|
8582
8583
|
exports.readV2BoardConfig = readV2BoardConfig2;
|
|
@@ -8646,10 +8647,27 @@ var require_workspace = __commonJS({
|
|
|
8646
8647
|
}
|
|
8647
8648
|
return null;
|
|
8648
8649
|
}
|
|
8650
|
+
var DESCRIPTION_SECTION = /## Description\n([\s\S]*?)(?=\n## (?:Log|Child Tasks)[ \t]*(?:\n|$)|\n*$)/;
|
|
8649
8651
|
function extractDescription2(body) {
|
|
8650
|
-
const match = body.match(
|
|
8652
|
+
const match = body.match(DESCRIPTION_SECTION);
|
|
8651
8653
|
return match ? match[1].trim() || void 0 : void 0;
|
|
8652
8654
|
}
|
|
8655
|
+
function replaceDescription(body, description) {
|
|
8656
|
+
const match = DESCRIPTION_SECTION.exec(body);
|
|
8657
|
+
if (!match)
|
|
8658
|
+
return null;
|
|
8659
|
+
const before = body.slice(0, match.index);
|
|
8660
|
+
const rest = body.slice(match.index + match[0].length).replace(/^\n+/, "");
|
|
8661
|
+
const text = description?.trim();
|
|
8662
|
+
if (!text)
|
|
8663
|
+
return `${before}${rest}`;
|
|
8664
|
+
return rest ? `${before}## Description
|
|
8665
|
+
${text}
|
|
8666
|
+
|
|
8667
|
+
${rest}` : `${before}## Description
|
|
8668
|
+
${text}
|
|
8669
|
+
`;
|
|
8670
|
+
}
|
|
8653
8671
|
function extractLog2(body) {
|
|
8654
8672
|
const match = body.match(/## Log\n([\s\S]*?)(?=\n## |\n*$)/);
|
|
8655
8673
|
return match ? match[1].trim() || void 0 : void 0;
|
|
@@ -9471,6 +9489,7 @@ var require_taskOperations = __commonJS({
|
|
|
9471
9489
|
exports.getEffectiveState = getEffectiveState;
|
|
9472
9490
|
var fs11 = __importStar(__require("fs"));
|
|
9473
9491
|
var path11 = __importStar(__require("path"));
|
|
9492
|
+
var workspace_1 = require_workspace();
|
|
9474
9493
|
var boardValidation_1 = require_boardValidation();
|
|
9475
9494
|
var contractSpec_1 = require_contractSpec();
|
|
9476
9495
|
var idGen_1 = require_idGen();
|
|
@@ -9772,7 +9791,14 @@ ${section}
|
|
|
9772
9791
|
task[key] = value;
|
|
9773
9792
|
}
|
|
9774
9793
|
};
|
|
9775
|
-
|
|
9794
|
+
let body = doc.body;
|
|
9795
|
+
const inBody = patch.description === void 0 ? null : (0, workspace_1.replaceDescription)(body, patch.description);
|
|
9796
|
+
if (inBody !== null) {
|
|
9797
|
+
body = inBody;
|
|
9798
|
+
delete task.description;
|
|
9799
|
+
} else {
|
|
9800
|
+
applyField("description", patch.description);
|
|
9801
|
+
}
|
|
9776
9802
|
applyField("priority", patch.priority);
|
|
9777
9803
|
applyField("tags", patch.tags);
|
|
9778
9804
|
applyField("assignee", patch.assignee);
|
|
@@ -9782,7 +9808,7 @@ ${section}
|
|
|
9782
9808
|
applyField("status", patch.status);
|
|
9783
9809
|
task.updatedAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
9784
9810
|
try {
|
|
9785
|
-
(0, taskFile_1.writeTaskFile)(taskPath, task,
|
|
9811
|
+
(0, taskFile_1.writeTaskFile)(taskPath, task, body);
|
|
9786
9812
|
return { success: true, task, filePath: taskPath };
|
|
9787
9813
|
} catch (err) {
|
|
9788
9814
|
return { success: false, error: `Failed to write task file: ${err}` };
|
|
@@ -10677,7 +10703,7 @@ var require_dist = __commonJS({
|
|
|
10677
10703
|
exports.patchTasks = exports.moveTasks = exports.setAllSubtasksCompleted = exports.setSubtasksCompleted = exports.updateSubtask = exports.deleteSubtask = exports.addSubtask = exports.patchTask = exports.restoreTask = exports.archiveTask = exports.updateStatsConfig = exports.updateBoardTitle = exports.toggleSubtask = exports.deleteTask = exports.updateTask = exports.addTask = exports.moveTask = exports.getAllTemplateIds = exports.getTemplateById = exports.processTemplate = exports.generateSubtaskId = exports.generateTaskId = exports.BUILT_IN_TEMPLATES = exports.hashBoardContent = exports.hashBoard = exports.diffBoards = exports.BrainfileLinter = exports.BrainfileValidator = exports.serializeFrontmatter = exports.parseFrontmatter = exports.BrainfileSerializer = exports.loadSchemaHints = exports.parseSchemaHints = exports.inferRenderer = exports.inferType = exports.BrainfileParser = exports.buildContract = exports.parseDeliverableSpec = exports.normalizeToArray = exports.ALLOWED_DELIVERABLE_TYPES = exports.removeTaskContractConstraint = exports.addTaskContractConstraint = exports.removeTaskContractValidationCommand = exports.addTaskContractValidationCommand = exports.removeTaskContractDeliverable = exports.addTaskContractDeliverable = exports.patchTaskContract = exports.setTaskContractStatus = exports.clearTaskContract = exports.setTaskContract = void 0;
|
|
10678
10704
|
exports.BRAINFILE_BASENAME = exports.DOT_BRAINFILE_DIRNAME = exports.atomicWriteFileSync = exports.ensureDotBrainfileGitignore = exports.ensureDotBrainfileDir = exports.getDotBrainfileGitignorePath = exports.getBrainfileStatePath = exports.getBrainfileStateDir = exports.resolveBrainfilePath = exports.findBrainfile = exports.EXCLUDE_DIRS = exports.BRAINFILE_GLOBS = exports.BRAINFILE_PATTERNS = exports.extractBrainfileSuffix = exports.isBrainfileName = exports.watchBrainfiles = exports.findNearestBrainfile = exports.findPrimaryBrainfile = exports.discover = exports.getParentTaskId = exports.isValidSubtaskId = exports.isValidTaskId = exports.generateNextSubtaskId = exports.generateSubtaskIdFromIndex = exports.generateNextTaskId = exports.getMaxTaskIdNumber = exports.extractTaskIdNumber = exports.getOverdueTasks = exports.getIncompleteSubtasksSummary = exports.getTasksWithIncompleteSubtasks = exports.isCompletionColumn = exports.findCompletionColumn = exports.columnExists = exports.getTotalTaskCount = exports.getColumnTaskCount = exports.searchTasks = exports.getTasksByAssignee = exports.getTasksByPriority = exports.getTasksByTag = exports.getAllTasks = exports.taskIdExists = exports.findTaskById = exports.findColumnByName = exports.findColumnById = exports.validateColumn = exports.validateType = exports.isTypeCompletable = exports.getBoardTypes = exports.archiveTasks = exports.deleteTasks = void 0;
|
|
10679
10705
|
exports.activateTaskContract = exports.attachTaskContract = exports.failTaskContract = exports.completeTaskContract = exports.deliverTaskContract = exports.pickupTaskContract = exports.updateSubtasksInFile = exports.toggleSubtasksInFile = exports.deleteSubtasksFromFile = exports.addSubtasksToFile = exports.searchLogs = exports.searchTaskFiles = exports.findTask = exports.listTasks = exports.appendLog = exports.deleteTaskFile = exports.completeTaskFile = exports.patchTaskFile = exports.moveTaskFileToColumn = exports.moveTaskFile = exports.addTaskFile = exports.generateNextFileTaskId = exports.DEFAULT_CONTRACT_COLUMN_MAP = exports.taskFileName = exports.readTasksDir = exports.writeTaskFile = exports.readTaskFile = exports.serializeTaskContent = exports.parseTaskContent = exports.writeBoardConfig = exports.readBoardConfig = exports.serializeBoardConfig = exports.parseBoardConfig = exports.formatTaskForLinear = exports.formatTaskForGitHub = exports.BRIEF_STATE_VERSION = exports.sanitizeAgentFilename = exports.getBriefStatePath = exports.getBriefStateDir = exports.writeBriefState = exports.readBriefState = exports.relativeTime = exports.parseNotes = exports.parseNoteLine = exports.isEmptyBrief = exports.buildBrief = exports.DOT_BRAINFILE_STATE_IGNORE_ENTRY = exports.DOT_BRAINFILE_STATE_DIRNAME = exports.DOT_BRAINFILE_GITIGNORE_BASENAME = exports.BRAINFILE_STATE_BASENAME = void 0;
|
|
10680
|
-
exports.Brainfile = exports.buildBoardFromV2 = exports.readV2BoardConfig = exports.composeBody = exports.extractLog = exports.extractDescription = exports.findV2Task = exports.getLogFilePath = exports.getTaskFilePath = exports.ensureV2Dirs = exports.isV2 = exports.getV2Dirs = exports.topologicalSort = exports.DependencyCycleError = exports.MissingDependencyError = exports.ledgerRecordToCompletedRef = exports.taskToCompletedRef = exports.isLedgerContractStatus = exports.normalizePathValue = exports.getTaskContext = exports.getFileHistory = exports.queryLedger = exports.readLedger = exports.appendLedgerRecord = exports.buildLedgerRecord = exports.searchTasksRanked = exports.scoreTaskDocument = exports.taskMatchesFilters = exports.parseSearchQuery = exports.getEffectiveState = exports.activateTaskContractsByParent = void 0;
|
|
10706
|
+
exports.Brainfile = exports.buildBoardFromV2 = exports.readV2BoardConfig = exports.composeBody = exports.extractLog = exports.replaceDescription = exports.extractDescription = exports.findV2Task = exports.getLogFilePath = exports.getTaskFilePath = exports.ensureV2Dirs = exports.isV2 = exports.getV2Dirs = exports.topologicalSort = exports.DependencyCycleError = exports.MissingDependencyError = exports.ledgerRecordToCompletedRef = exports.taskToCompletedRef = exports.isLedgerContractStatus = exports.normalizePathValue = exports.getTaskContext = exports.getFileHistory = exports.queryLedger = exports.readLedger = exports.appendLedgerRecord = exports.buildLedgerRecord = exports.searchTasksRanked = exports.scoreTaskDocument = exports.taskMatchesFilters = exports.parseSearchQuery = exports.getEffectiveState = exports.activateTaskContractsByParent = void 0;
|
|
10681
10707
|
__exportStar(require_types2(), exports);
|
|
10682
10708
|
__exportStar(require_contract(), exports);
|
|
10683
10709
|
var contract_1 = require_contract2();
|
|
@@ -11236,6 +11262,9 @@ var require_dist = __commonJS({
|
|
|
11236
11262
|
Object.defineProperty(exports, "extractDescription", { enumerable: true, get: function() {
|
|
11237
11263
|
return workspace_1.extractDescription;
|
|
11238
11264
|
} });
|
|
11265
|
+
Object.defineProperty(exports, "replaceDescription", { enumerable: true, get: function() {
|
|
11266
|
+
return workspace_1.replaceDescription;
|
|
11267
|
+
} });
|
|
11239
11268
|
Object.defineProperty(exports, "extractLog", { enumerable: true, get: function() {
|
|
11240
11269
|
return workspace_1.extractLog;
|
|
11241
11270
|
} });
|
package/dist/cli.mjs
CHANGED
|
@@ -91,7 +91,7 @@ import {
|
|
|
91
91
|
validationError,
|
|
92
92
|
validationError2,
|
|
93
93
|
workspaceRootFromBrainfilePath
|
|
94
|
-
} from "./chunk-
|
|
94
|
+
} from "./chunk-7KU2R7QC.mjs";
|
|
95
95
|
import {
|
|
96
96
|
__commonJS,
|
|
97
97
|
__export,
|
|
@@ -3530,7 +3530,7 @@ var require_package = __commonJS({
|
|
|
3530
3530
|
"package.json"(exports, module) {
|
|
3531
3531
|
module.exports = {
|
|
3532
3532
|
name: "brainfile",
|
|
3533
|
-
version: "0.21.
|
|
3533
|
+
version: "0.21.2",
|
|
3534
3534
|
description: "Command-line interface for Brainfile task management",
|
|
3535
3535
|
main: "dist/index.js",
|
|
3536
3536
|
types: "dist/index.d.ts",
|
|
@@ -3567,7 +3567,7 @@ var require_package = __commonJS({
|
|
|
3567
3567
|
access: "public"
|
|
3568
3568
|
},
|
|
3569
3569
|
dependencies: {
|
|
3570
|
-
"@brainfile/core": "^0.21.
|
|
3570
|
+
"@brainfile/core": "^0.21.2",
|
|
3571
3571
|
chalk: "^4.1.2",
|
|
3572
3572
|
chokidar: "^4.0.3",
|
|
3573
3573
|
commander: "^14.0.3",
|
|
@@ -41890,7 +41890,7 @@ function typesAddCommand(options, logger = defaultLogger) {
|
|
|
41890
41890
|
|
|
41891
41891
|
// src/cli.ts
|
|
41892
41892
|
async function runTui(options) {
|
|
41893
|
-
const { tuiCommand } = await import("./tui-
|
|
41893
|
+
const { tuiCommand } = await import("./tui-3Z7ZJV7M.mjs");
|
|
41894
41894
|
return tuiCommand(options);
|
|
41895
41895
|
}
|
|
41896
41896
|
var packageJson = JSON.parse(
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "brainfile",
|
|
3
|
-
"version": "0.21.
|
|
3
|
+
"version": "0.21.2",
|
|
4
4
|
"description": "Command-line interface for Brainfile task management",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"access": "public"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@brainfile/core": "^0.21.
|
|
40
|
+
"@brainfile/core": "^0.21.2",
|
|
41
41
|
"chalk": "^4.1.2",
|
|
42
42
|
"chokidar": "^4.0.3",
|
|
43
43
|
"commander": "^14.0.3",
|