@jvittechs/j 1.0.22 → 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.22",
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: {
@@ -4257,7 +4257,11 @@ async function runDoctor(options) {
4257
4257
  }
4258
4258
  }
4259
4259
  if (!result.passed && result.suggestion) {
4260
- console.log(chalk9.yellow(` \u{1F4A1} ${result.suggestion}`));
4260
+ const lines = result.suggestion.split("\n");
4261
+ console.log(chalk9.yellow(` \u{1F4A1} ${lines[0]}`));
4262
+ for (const line of lines.slice(1)) {
4263
+ console.log(chalk9.yellow(` ${line}`));
4264
+ }
4261
4265
  }
4262
4266
  console.log();
4263
4267
  }
@@ -4412,7 +4416,12 @@ async function checkIde(cliName) {
4412
4416
  message: passed ? `${fullyConfigured.length} IDE \u0111\u1EA7y \u0111\u1EE7 rules & workflows: ${fullyConfigured.join(", ")}` : "Ch\u01B0a c\xF3 IDE n\xE0o \u0111\u1EA7y \u0111\u1EE7 c\u1EA3 rules v\xE0 workflows",
4413
4417
  details,
4414
4418
  ...!passed && {
4415
- suggestion: `Ch\u1EA1y "${cliName} rules apply" v\xE0 "${cliName} ide sync" \u0111\u1EC3 b\u1ED5 sung.`
4419
+ suggestion: [
4420
+ `C\xF3 nhi\u1EC1u c\xE1ch \u0111\u1EC3 t\u1EA1o rules cho project:`,
4421
+ ` - T\u1EF1 t\xECm tr\xEAn internet ph\xF9 h\u1EE3p v\u1EDBi techstack c\u1EE7a project v\xE0 s\u1EEDa l\u1EA1i.`,
4422
+ ` - T\xECm xem c\xF3 s\u1EB5n rule-preset n\xE0o tr\xEAn jai1 store kh\xF4ng b\u1EB1ng l\u1EC7nh: "${cliName} rules apply".`,
4423
+ ` - Ch\u1EA1y workflow c\u1EE7a jai1 "/generate-rules-preset" \u0111\u1EC3 t\u1EA1o rule-preset cho project, sau \u0111\xF3 \u0111\u1ED3ng b\u1ED9 cho c\xE1c IDE d\xF9ng l\u1EC7nh "${cliName} ide sync".`
4424
+ ].join("\n")
4416
4425
  }
4417
4426
  };
4418
4427
  return [ideCheck, rulesWorkflowsCheck];
@@ -10978,20 +10987,34 @@ import { Command as Command49 } from "commander";
10978
10987
  import chalk22 from "chalk";
10979
10988
  var VALID_STATUSES = ["todo", "in_progress", "done", "cancelled"];
10980
10989
  function createTaskUpdateCommand() {
10981
- 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) => {
10982
- 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)) {
10983
10996
  console.error(chalk22.red(`\u274C Invalid status. Must be: ${VALID_STATUSES.join(", ")}`));
10984
10997
  process.exit(1);
10985
10998
  }
10986
10999
  const service = new TaskService();
10987
11000
  try {
10988
- 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);
10989
11005
  if (options.json) {
10990
11006
  console.log(JSON.stringify(task, null, 2));
10991
11007
  return;
10992
11008
  }
10993
- const icon = STATUS_ICONS[task.status] || "\u{1F4CB}";
10994
- 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(" | ")}`));
10995
11018
  } catch (error) {
10996
11019
  console.error(chalk22.red(`\u274C ${error instanceof Error ? error.message : String(error)}`));
10997
11020
  process.exit(1);
@@ -11288,7 +11311,7 @@ ${chalk28.bold("\u2501\u2501\u2501 ALL COMMANDS \u2501\u2501\u2501")}
11288
11311
  ${chalk28.cyan("jai1 t list")} [-s status] [-P parent] [-j]
11289
11312
  ${chalk28.cyan("jai1 t ready")} [-P parent] [-j]
11290
11313
  ${chalk28.cyan("jai1 t add")} <title> [-p 0-3] [-P parent] [-t tags] [-j]
11291
- ${chalk28.cyan("jai1 t update")} <id> -s <status> [-j]
11314
+ ${chalk28.cyan("jai1 t update")} <id> [-s <status>] [-n <notes>] [-j]
11292
11315
  ${chalk28.cyan("jai1 t show")} <id|parent> [-j]
11293
11316
  ${chalk28.cyan("jai1 t pick")} [-j]
11294
11317
  ${chalk28.cyan("jai1 t done")} <id> [-j]