taskin 2.2.1 → 2.2.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.
Files changed (2) hide show
  1. package/dist/index.js +17 -33
  2. package/package.json +8 -8
package/dist/index.js CHANGED
@@ -8147,9 +8147,7 @@ var FileSystemTaskProvider = class {
8147
8147
  }
8148
8148
  async findTask(taskId) {
8149
8149
  const files = await fs2.readdir(this.tasksDirectory);
8150
- const taskFile = files.find(
8151
- (file) => file.startsWith(`task-${taskId}-`) && file.endsWith(".md")
8152
- );
8150
+ const taskFile = files.find((file) => file.startsWith(`task-${taskId}-`) && file.endsWith(".md"));
8153
8151
  if (!taskFile) {
8154
8152
  return void 0;
8155
8153
  }
@@ -8165,7 +8163,8 @@ var FileSystemTaskProvider = class {
8165
8163
  const escapedName = n.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
8166
8164
  const rx = new RegExp(`^${escapedName}:\\s*(.+)$`, "im");
8167
8165
  const m = content.match(rx);
8168
- if (m) return m[1].trim();
8166
+ if (m)
8167
+ return m[1].trim();
8169
8168
  }
8170
8169
  return null;
8171
8170
  };
@@ -8177,9 +8176,7 @@ var FileSystemTaskProvider = class {
8177
8176
  const assigneeValue = assigneeMatch.trim();
8178
8177
  assignee = this.userRegistry.resolveUser(assigneeValue);
8179
8178
  if (!assignee) {
8180
- console.warn(
8181
- `[FS Provider] User "${assigneeValue}" not found in registry, creating temporary user`
8182
- );
8179
+ console.warn(`[FS Provider] User "${assigneeValue}" not found in registry, creating temporary user`);
8183
8180
  assignee = this.userRegistry.createTemporaryUser(assigneeValue);
8184
8181
  }
8185
8182
  }
@@ -8197,9 +8194,7 @@ var FileSystemTaskProvider = class {
8197
8194
  }
8198
8195
  async updateTask(task) {
8199
8196
  const currentContent = await fs2.readFile(task.filePath, "utf-8");
8200
- const hasSectionMetadata = /##\s*(Status|Type|Assignee)/i.test(
8201
- currentContent
8202
- );
8197
+ const hasSectionMetadata = /##\s*(Status|Type|Assignee)/i.test(currentContent);
8203
8198
  if (hasSectionMetadata) {
8204
8199
  const { fixTaskFile: fixTaskFile2 } = await Promise.resolve().then(() => (init_task_validator(), task_validator_exports));
8205
8200
  await fixTaskFile2(task.filePath);
@@ -8207,24 +8202,16 @@ var FileSystemTaskProvider = class {
8207
8202
  const content = await fs2.readFile(task.filePath, "utf-8");
8208
8203
  let updatedContent;
8209
8204
  if (/^Status:\s*.+$/im.test(content)) {
8210
- updatedContent = content.replace(
8211
- /^Status:\s*.+$/im,
8212
- `Status: ${task.status}`
8213
- );
8205
+ updatedContent = content.replace(/^Status:\s*.+$/im, `Status: ${task.status}`);
8214
8206
  } else {
8215
- updatedContent = content.replace(
8216
- /(^#.*\n)/,
8217
- `$1Status: ${task.status}
8218
- `
8219
- );
8207
+ updatedContent = content.replace(/(^#.*\n)/, `$1Status: ${task.status}
8208
+ `);
8220
8209
  }
8221
8210
  await fs2.writeFile(task.filePath, updatedContent, "utf-8");
8222
8211
  }
8223
8212
  async getAllTasks() {
8224
8213
  const files = await fs2.readdir(this.tasksDirectory);
8225
- const taskFiles = files.filter(
8226
- (file) => file.startsWith("task-") && file.endsWith(".md")
8227
- );
8214
+ const taskFiles = files.filter((file) => file.startsWith("task-") && file.endsWith(".md"));
8228
8215
  const tasks = [];
8229
8216
  for (const file of taskFiles) {
8230
8217
  const filePath = path4.join(this.tasksDirectory, file);
@@ -8241,7 +8228,8 @@ var FileSystemTaskProvider = class {
8241
8228
  const escapedName = n.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
8242
8229
  const rx = new RegExp(`^${escapedName}:\\s*(.+)$`, "im");
8243
8230
  const m = content.match(rx);
8244
- if (m) return m[1].trim();
8231
+ if (m)
8232
+ return m[1].trim();
8245
8233
  }
8246
8234
  return null;
8247
8235
  };
@@ -8390,9 +8378,7 @@ var UserRegistry = class {
8390
8378
  console.log(`[UserRegistry] Loaded ${this.users.size} users`);
8391
8379
  } catch (error2) {
8392
8380
  if (error2.code === "ENOENT") {
8393
- console.warn(
8394
- "[UserRegistry] users.json not found, starting with empty registry"
8395
- );
8381
+ console.warn("[UserRegistry] users.json not found, starting with empty registry");
8396
8382
  this.users.clear();
8397
8383
  } else {
8398
8384
  throw error2;
@@ -8411,10 +8397,12 @@ var UserRegistry = class {
8411
8397
  */
8412
8398
  resolveUser(nameOrId) {
8413
8399
  const byId = this.users.get(nameOrId);
8414
- if (byId) return byId;
8400
+ if (byId)
8401
+ return byId;
8415
8402
  const slug = nameOrId.toLowerCase().replace(/\s+/g, "-");
8416
8403
  const bySlug = this.users.get(slug);
8417
- if (bySlug) return bySlug;
8404
+ if (bySlug)
8405
+ return bySlug;
8418
8406
  for (const user of this.users.values()) {
8419
8407
  if (user.name.toLowerCase() === nameOrId.toLowerCase()) {
8420
8408
  return user;
@@ -8454,11 +8442,7 @@ var UserRegistry = class {
8454
8442
  const data = {
8455
8443
  users: Object.fromEntries(this.users.entries())
8456
8444
  };
8457
- await fs3.writeFile(
8458
- this.usersFilePath,
8459
- JSON.stringify(data, null, 2),
8460
- "utf-8"
8461
- );
8445
+ await fs3.writeFile(this.usersFilePath, JSON.stringify(data, null, 2), "utf-8");
8462
8446
  }
8463
8447
  };
8464
8448
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "taskin",
3
- "version": "2.2.1",
3
+ "version": "2.2.2",
4
4
  "description": "Task management system integrated with Git workflows",
5
5
  "motivation": "Provide a CLI tool for task management integrated with Git workflows",
6
6
  "solve": "Simplifies task tracking and management directly from the command line",
@@ -68,10 +68,10 @@
68
68
  "LICENSE"
69
69
  ],
70
70
  "dependencies": {
71
- "@opentask/taskin-git-utils": "^2.0.3",
72
- "@opentask/taskin-task-manager": "^1.0.8",
73
- "@opentask/taskin-task-server-mcp": "^0.1.6",
74
- "@opentask/taskin-task-server-ws": "^0.1.3",
71
+ "@opentask/taskin-git-utils": "^2.1.1",
72
+ "@opentask/taskin-task-manager": "^1.0.9",
73
+ "@opentask/taskin-task-server-mcp": "^0.1.7",
74
+ "@opentask/taskin-task-server-ws": "^0.1.4",
75
75
  "@types/express": "^5.0.5",
76
76
  "@types/inquirer": "^9.0.9",
77
77
  "@types/play-sound": "^1.1.2",
@@ -82,9 +82,9 @@
82
82
  "play-sound": "^1.1.6",
83
83
  "ws": "^8.18.3",
84
84
  "zod": "^3.25.76",
85
- "@opentask/taskin-file-system-provider": "2.2.0",
86
- "@opentask/taskin-utils": "1.1.0",
87
- "@opentask/taskin-types": "1.0.5"
85
+ "@opentask/taskin-file-system-provider": "2.2.1",
86
+ "@opentask/taskin-types": "1.0.6",
87
+ "@opentask/taskin-utils": "1.1.0"
88
88
  },
89
89
  "devDependencies": {
90
90
  "@types/node": "^20.19.24",