@jvittechs/j 1.0.23 → 1.0.24

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/dist/cli.js CHANGED
@@ -169,7 +169,7 @@ import { basename as basename4 } from "path";
169
169
  // package.json
170
170
  var package_default = {
171
171
  name: "@jvittechs/j",
172
- version: "1.0.23",
172
+ version: "1.0.24",
173
173
  description: "A unified CLI tool for JV-IT TECHS developers to manage Jai1 Framework. Supports both `j` and `jai1` commands. Please contact TeamAI for usage instructions.",
174
174
  type: "module",
175
175
  bin: {
@@ -10987,20 +10987,34 @@ import { Command as Command49 } from "commander";
10987
10987
  import chalk22 from "chalk";
10988
10988
  var VALID_STATUSES = ["todo", "in_progress", "done", "cancelled"];
10989
10989
  function createTaskUpdateCommand() {
10990
- return new Command49("update").description("Update task status").argument("<id>", "Task ID (e.g. T-001)").requiredOption("-s, --status <status>", "New status: todo, in_progress, done, cancelled").option("-j, --json", "Output JSON").action(async (id, options) => {
10991
- if (!VALID_STATUSES.includes(options.status)) {
10990
+ return new Command49("update").description("Update task status and/or notes").argument("<id>", "Task ID (e.g. T-001)").option("-s, --status <status>", "New status: todo, in_progress, done, cancelled").option("-n, --notes <notes>", 'Task notes (e.g. "files: a.ts, b.ts")').option("-j, --json", "Output JSON").action(async (id, options) => {
10991
+ if (!options.status && !options.notes) {
10992
+ console.error(chalk22.red("\u274C At least one of --status or --notes is required"));
10993
+ process.exit(1);
10994
+ }
10995
+ if (options.status && !VALID_STATUSES.includes(options.status)) {
10992
10996
  console.error(chalk22.red(`\u274C Invalid status. Must be: ${VALID_STATUSES.join(", ")}`));
10993
10997
  process.exit(1);
10994
10998
  }
10995
10999
  const service = new TaskService();
10996
11000
  try {
10997
- const task = await service.update(id, { status: options.status });
11001
+ const changes = {};
11002
+ if (options.status) changes.status = options.status;
11003
+ if (options.notes) changes.notes = options.notes;
11004
+ const task = await service.update(id, changes);
10998
11005
  if (options.json) {
10999
11006
  console.log(JSON.stringify(task, null, 2));
11000
11007
  return;
11001
11008
  }
11002
- const icon = STATUS_ICONS[task.status] || "\u{1F4CB}";
11003
- console.log(chalk22.green(`\u2705 ${task.id} \u2192 ${icon} ${task.status}`));
11009
+ const parts = [];
11010
+ if (options.status) {
11011
+ const icon = STATUS_ICONS[task.status] || "\u{1F4CB}";
11012
+ parts.push(`${icon} ${task.status}`);
11013
+ }
11014
+ if (options.notes) {
11015
+ parts.push(`\u{1F4DD} notes updated`);
11016
+ }
11017
+ console.log(chalk22.green(`\u2705 ${task.id} \u2192 ${parts.join(" | ")}`));
11004
11018
  } catch (error) {
11005
11019
  console.error(chalk22.red(`\u274C ${error instanceof Error ? error.message : String(error)}`));
11006
11020
  process.exit(1);
@@ -11297,7 +11311,7 @@ ${chalk28.bold("\u2501\u2501\u2501 ALL COMMANDS \u2501\u2501\u2501")}
11297
11311
  ${chalk28.cyan("jai1 t list")} [-s status] [-P parent] [-j]
11298
11312
  ${chalk28.cyan("jai1 t ready")} [-P parent] [-j]
11299
11313
  ${chalk28.cyan("jai1 t add")} <title> [-p 0-3] [-P parent] [-t tags] [-j]
11300
- ${chalk28.cyan("jai1 t update")} <id> -s <status> [-j]
11314
+ ${chalk28.cyan("jai1 t update")} <id> [-s <status>] [-n <notes>] [-j]
11301
11315
  ${chalk28.cyan("jai1 t show")} <id|parent> [-j]
11302
11316
  ${chalk28.cyan("jai1 t pick")} [-j]
11303
11317
  ${chalk28.cyan("jai1 t done")} <id> [-j]