dirban 0.1.6 → 0.1.7

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 CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  > **Zero-database, folder-based Kanban board for builders, knowledge workers, and AI agents.**
4
4
 
5
- [![CI](https://github.com/SYip/dirban/actions/workflows/publish.yml/badge.svg)](https://github.com/SYip/dirban/actions)
5
+ [![CI](https://github.com/SYip/dirban/actions/workflows/ci.yml/badge.svg)](https://github.com/SYip/dirban/actions/workflows/ci.yml)
6
6
  [![npm version](https://img.shields.io/npm/v/dirban.svg?color=cb3837)](https://www.npmjs.com/package/dirban)
7
7
  [![Visual Studio Marketplace](https://img.shields.io/visual-studio-marketplace/v/syip.dirban-vscode?color=blue&label=VS%20Code)](https://marketplace.visualstudio.com/items?itemName=syip.dirban-vscode)
8
8
  [![Open VSX](https://img.shields.io/open-vsx/v/syip/dirban-vscode?color=purple&label=Open%20VSX)](https://open-vsx.org/extension/syip/dirban-vscode)
package/dist/dirban.js CHANGED
@@ -7198,7 +7198,7 @@ import * as process8 from "process";
7198
7198
  // package.json
7199
7199
  var package_default = {
7200
7200
  name: "dirban",
7201
- version: "0.1.6",
7201
+ version: "0.1.7",
7202
7202
  description: "Zero-Database, Agent-Native Kanban Engine & TUI Backed by the File System and Google Open Knowledge Format (OKF)",
7203
7203
  type: "module",
7204
7204
  main: "./dist/dirban.js",
@@ -8423,12 +8423,15 @@ var parseTaskDocument = (rawContent, filename) => {
8423
8423
 
8424
8424
  // src/vcs/git/commit.ts
8425
8425
  import { spawnSync } from "node:child_process";
8426
- var commitSingleGitFile = (context, filePath, message, cwd = process.cwd()) => {
8426
+ var commitSingleGitFile = (context, filePaths, message, cwd = process.cwd()) => {
8427
8427
  if (!context.isAvailable || context.repoRoot == null) {
8428
8428
  return $ok(undefined);
8429
8429
  }
8430
+ if (filePaths.length === 0) {
8431
+ return $ok(undefined);
8432
+ }
8430
8433
  try {
8431
- const addRes = spawnSync("git", ["add", filePath], {
8434
+ const addRes = spawnSync("git", ["add", "--", ...filePaths], {
8432
8435
  cwd,
8433
8436
  encoding: "utf-8",
8434
8437
  stdio: ["pipe", "pipe", "pipe"]
@@ -8436,10 +8439,10 @@ var commitSingleGitFile = (context, filePath, message, cwd = process.cwd()) => {
8436
8439
  if (addRes.status !== 0) {
8437
8440
  return $err({
8438
8441
  kind: "COMMAND_ERROR",
8439
- message: `Failed to stage file '${filePath}': ${addRes.stderr.trim()}`
8442
+ message: `Failed to stage file(s) '${filePaths.join(", ")}': ${addRes.stderr.trim()}`
8440
8443
  });
8441
8444
  }
8442
- const commitRes = spawnSync("git", ["commit", "-m", message, "--", filePath], {
8445
+ const commitRes = spawnSync("git", ["commit", "-m", message, "--", ...filePaths], {
8443
8446
  cwd,
8444
8447
  encoding: "utf-8",
8445
8448
  stdio: ["pipe", "pipe", "pipe"]
@@ -8447,7 +8450,7 @@ var commitSingleGitFile = (context, filePath, message, cwd = process.cwd()) => {
8447
8450
  if (commitRes.status !== 0) {
8448
8451
  return $err({
8449
8452
  kind: "COMMAND_ERROR",
8450
- message: `Failed to commit file '${filePath}': ${commitRes.stderr.trim()}`
8453
+ message: `Failed to commit file(s) '${filePaths.join(", ")}': ${commitRes.stderr.trim()}`
8451
8454
  });
8452
8455
  }
8453
8456
  return $ok(undefined);
@@ -8770,10 +8773,10 @@ class GitVcsProvider {
8770
8773
  const ctx = this.getContext(cwd);
8771
8774
  return checkGitWorkingTreeClean(ctx, options);
8772
8775
  }
8773
- commitFile(filePath, message, cwd) {
8776
+ commitFile(filePaths, message, cwd) {
8774
8777
  const workingDir = cwd ?? process.cwd();
8775
8778
  const ctx = this.getContext(workingDir);
8776
- return commitSingleGitFile(ctx, filePath, message, workingDir);
8779
+ return commitSingleGitFile(ctx, filePaths, message, workingDir);
8777
8780
  }
8778
8781
  autoMergeAndCleanup(options) {
8779
8782
  const cwd = options.cwd ?? process.cwd();
@@ -8902,7 +8905,7 @@ class NoopVcsProvider {
8902
8905
  checkWorkingTreeClean(_options) {
8903
8906
  return $ok(undefined);
8904
8907
  }
8905
- commitFile(_filePath, _message, _cwd) {
8908
+ commitFile(_filePaths, _message, _cwd) {
8906
8909
  return $ok(undefined);
8907
8910
  }
8908
8911
  autoMergeAndCleanup(_options) {
@@ -10935,7 +10938,8 @@ var syncBlockedTaskToRoot = (taskFile, rootOldPath, repoRoot, tasksDir, taskFile
10935
10938
  fs10.unlinkSync(rootOldPath);
10936
10939
  }
10937
10940
  const commitMsg = `chore(task): block ${effectiveId} (${blockers.join(", ")})`;
10938
- vcs.commitFile(rootTarget, commitMsg, repoRoot);
10941
+ const filesToCommit = rootOldPath !== rootTarget ? [rootOldPath, rootTarget] : [rootTarget];
10942
+ vcs.commitFile(filesToCommit, commitMsg, repoRoot);
10939
10943
  } catch {}
10940
10944
  };
10941
10945
  var blockTask = (board, taskIdOrPath, reasons, options) => {
@@ -11217,7 +11221,8 @@ var resumeTask = (board, config, taskId, options) => {
11217
11221
  if (!isVcsOperationSkipped(vcsCtx, strategy.name, options?.noGit)) {
11218
11222
  const taskTitle = task.document.frontmatter.title ?? effectiveId;
11219
11223
  const commitMsg = `chore(task): resume ${effectiveId} ${taskTitle}`.trim();
11220
- vcs.commitFile(targetFilePath, commitMsg, cwd);
11224
+ const filesToCommit = task.filePath !== targetFilePath ? [task.filePath, targetFilePath] : [targetFilePath];
11225
+ vcs.commitFile(filesToCommit, commitMsg, cwd);
11221
11226
  }
11222
11227
  return $ok({
11223
11228
  task: updatedTask,
@@ -11284,13 +11289,14 @@ var resumeCommand = {
11284
11289
  var import_picocolors10 = __toESM(require_picocolors2(), 1);
11285
11290
 
11286
11291
  // src/tasks/lifecycle/start.ts
11287
- var commitStartMoveToTarget = (vcs, vcsCtx, filePath, displayId, title, cwd, strategyName, noGit) => {
11292
+ var commitStartMoveToTarget = (vcs, vcsCtx, oldFilePath, newFilePath, displayId, title, cwd, strategyName, noGit) => {
11288
11293
  if (isVcsOperationSkipped(vcsCtx, strategyName, noGit)) {
11289
11294
  return $ok(undefined);
11290
11295
  }
11291
11296
  const taskTitle = title ?? displayId;
11292
11297
  const commitMsg = `chore(task): start ${displayId} ${taskTitle}`.trim();
11293
- const commitRes = vcs.commitFile(filePath, commitMsg, cwd);
11298
+ const filesToCommit = oldFilePath !== newFilePath ? [oldFilePath, newFilePath] : [newFilePath];
11299
+ const commitRes = vcs.commitFile(filesToCommit, commitMsg, cwd);
11294
11300
  if (commitRes.isErr()) {
11295
11301
  return $err({
11296
11302
  kind: "GIT_CONFLICT",
@@ -11364,7 +11370,7 @@ var startTask = (board, config, taskId, options) => {
11364
11370
  }
11365
11371
  updatedTask = moveResult.value;
11366
11372
  }
11367
- const commitRes = commitStartMoveToTarget(vcs, vcsCtx, updatedTask.filePath, displayId, task.document.frontmatter.title ?? task.document.id, cwd, strategy.name, options?.noGit);
11373
+ const commitRes = commitStartMoveToTarget(vcs, vcsCtx, task.filePath, updatedTask.filePath, displayId, task.document.frontmatter.title ?? task.document.id, cwd, strategy.name, options?.noGit);
11368
11374
  if (commitRes.isErr()) {
11369
11375
  return $err(commitRes.error);
11370
11376
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dirban",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "description": "Zero-Database, Agent-Native Kanban Engine & TUI Backed by the File System and Google Open Knowledge Format (OKF)",
5
5
  "type": "module",
6
6
  "main": "./dist/dirban.js",