@jvittechs/j 1.0.53 → 1.0.54
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 +26 -29
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -149,7 +149,7 @@ import { basename as basename5 } from "path";
|
|
|
149
149
|
// package.json
|
|
150
150
|
var package_default = {
|
|
151
151
|
name: "@jvittechs/j",
|
|
152
|
-
version: "1.0.
|
|
152
|
+
version: "1.0.54",
|
|
153
153
|
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.",
|
|
154
154
|
type: "module",
|
|
155
155
|
bin: {
|
|
@@ -10972,7 +10972,12 @@ async function handleWatch(address, options) {
|
|
|
10972
10972
|
process.exit(1);
|
|
10973
10973
|
}
|
|
10974
10974
|
const intervalSec = Math.max(5, parseInt(options.interval, 10) || 15);
|
|
10975
|
-
const
|
|
10975
|
+
const DEFAULT_TIMEOUT = 300;
|
|
10976
|
+
const MAX_TIMEOUT = 1800;
|
|
10977
|
+
const timeoutSec = Math.min(
|
|
10978
|
+
options.timeout ? parseInt(options.timeout, 10) || DEFAULT_TIMEOUT : DEFAULT_TIMEOUT,
|
|
10979
|
+
MAX_TIMEOUT
|
|
10980
|
+
);
|
|
10976
10981
|
const api = new TempMailApiService(config);
|
|
10977
10982
|
const seenIds = /* @__PURE__ */ new Set();
|
|
10978
10983
|
let pollCount = 0;
|
|
@@ -10980,7 +10985,7 @@ async function handleWatch(address, options) {
|
|
|
10980
10985
|
if (!options.json) {
|
|
10981
10986
|
console.log(chalk25.bold.cyan(`\u{1F440} Watching inbox: ${address}`));
|
|
10982
10987
|
console.log(chalk25.dim(
|
|
10983
|
-
` Polling every ${intervalSec}s
|
|
10988
|
+
` Polling every ${intervalSec}s \xB7 timeout ${timeoutSec}s` + (options.keep ? " \xB7 keep watching" : " \xB7 stops after first email") + ` \xB7 Ctrl+C to stop
|
|
10984
10989
|
`
|
|
10985
10990
|
));
|
|
10986
10991
|
}
|
|
@@ -11048,12 +11053,12 @@ async function handleWatch(address, options) {
|
|
|
11048
11053
|
});
|
|
11049
11054
|
}
|
|
11050
11055
|
function createMailWatchCommand() {
|
|
11051
|
-
return new Command52("watch").description("L\u1EAFng nghe email m\u1EDBi (polling)").argument("<address>", "\u0110\u1ECBa ch\u1EC9 email c\u1EA7n theo d\xF5i").option("-i, --interval <seconds>", "Kho\u1EA3ng th\u1EDDi gian poll (gi\xE2y, m\u1EB7c \u0111\u1ECBnh: 15)", "15").option("-t, --timeout <seconds>", "D\u1EEBng sau N gi\xE2y (m\u1EB7c \u0111\u1ECBnh:
|
|
11056
|
+
return new Command52("watch").description("L\u1EAFng nghe email m\u1EDBi (polling)").argument("<address>", "\u0110\u1ECBa ch\u1EC9 email c\u1EA7n theo d\xF5i").option("-i, --interval <seconds>", "Kho\u1EA3ng th\u1EDDi gian poll (gi\xE2y, m\u1EB7c \u0111\u1ECBnh: 15)", "15").option("-t, --timeout <seconds>", "D\u1EEBng sau N gi\xE2y (m\u1EB7c \u0111\u1ECBnh: 300s / 5 ph\xFAt, t\u1ED1i \u0111a: 1800s / 30 ph\xFAt)").option("-k, --keep", "Ti\u1EBFp t\u1EE5c watch sau khi nh\u1EADn \u0111\u01B0\u1EE3c email (m\u1EB7c \u0111\u1ECBnh: d\u1EEBng sau email \u0111\u1EA7u ti\xEAn)").option("-j, --json", "Output s\u1EF1 ki\u1EC7n email m\u1EDBi d\u1EA1ng JSON (m\u1ED7i d\xF2ng 1 event)").addHelpText("after", `
|
|
11052
11057
|
Examples:
|
|
11053
|
-
$ j dev mail watch user@dollicons.com # D\u1EEBng khi nh\u1EADn \u0111\u01B0\u1EE3c email \u0111\u1EA7u ti\xEAn
|
|
11058
|
+
$ j dev mail watch user@dollicons.com # D\u1EEBng khi nh\u1EADn \u0111\u01B0\u1EE3c email \u0111\u1EA7u ti\xEAn (timeout 5 ph\xFAt)
|
|
11054
11059
|
$ j dev mail watch user@dollicons.com -k # Ti\u1EBFp t\u1EE5c watch
|
|
11055
11060
|
$ j dev mail watch user@dollicons.com -i 30 -k
|
|
11056
|
-
$ j dev mail watch user@dollicons.com -t
|
|
11061
|
+
$ j dev mail watch user@dollicons.com -t 600 # Timeout 10 ph\xFAt (t\u1ED1i \u0111a 30 ph\xFAt)
|
|
11057
11062
|
$ j dev mail watch user@dollicons.com -j | jq .
|
|
11058
11063
|
`).action(async (address, options) => {
|
|
11059
11064
|
await handleWatch(address, options);
|
|
@@ -14129,7 +14134,6 @@ import chalk53 from "chalk";
|
|
|
14129
14134
|
// src/commands/skills/find.ts
|
|
14130
14135
|
import { Command as Command83 } from "commander";
|
|
14131
14136
|
import chalk48 from "chalk";
|
|
14132
|
-
import Table8 from "cli-table3";
|
|
14133
14137
|
|
|
14134
14138
|
// src/services/skills.service.ts
|
|
14135
14139
|
import { promises as fs27 } from "fs";
|
|
@@ -14438,28 +14442,21 @@ function createSkillsFindCommand() {
|
|
|
14438
14442
|
if (results.length === 0) {
|
|
14439
14443
|
console.log(chalk48.yellow("Kh\xF4ng t\xECm th\u1EA5y skills n\xE0o tr\xEAn server."));
|
|
14440
14444
|
} else {
|
|
14441
|
-
|
|
14442
|
-
|
|
14443
|
-
chalk48.cyan("T\xEAn"),
|
|
14444
|
-
chalk48.cyan("M\xF4 t\u1EA3"),
|
|
14445
|
-
chalk48.cyan("Version"),
|
|
14446
|
-
chalk48.cyan("Downloads")
|
|
14447
|
-
],
|
|
14448
|
-
style: { head: [], border: ["gray"] },
|
|
14449
|
-
colWidths: [25, 40, 10, 12]
|
|
14450
|
-
});
|
|
14445
|
+
console.log(chalk48.bold(`\u{1F4E6} Jai1 Server (${results.length} k\u1EBFt qu\u1EA3)
|
|
14446
|
+
`));
|
|
14451
14447
|
for (const skill of results) {
|
|
14452
14448
|
const name = skill.filepath.replace("skills/", "");
|
|
14453
|
-
|
|
14454
|
-
|
|
14455
|
-
|
|
14456
|
-
|
|
14457
|
-
|
|
14458
|
-
|
|
14449
|
+
const version = skill.version ? chalk48.green(`v${skill.version}`) : chalk48.dim("-");
|
|
14450
|
+
const downloads = chalk48.dim(`${skill.downloads || 0} downloads`);
|
|
14451
|
+
const desc = skill.description || "";
|
|
14452
|
+
const maxDesc = 120;
|
|
14453
|
+
const truncatedDesc = desc.length > maxDesc ? desc.slice(0, maxDesc) + "\u2026" : desc;
|
|
14454
|
+
console.log(` ${chalk48.bold.white(name)} ${version} \xB7 ${downloads}`);
|
|
14455
|
+
if (truncatedDesc) {
|
|
14456
|
+
console.log(` ${chalk48.dim(truncatedDesc)}`);
|
|
14457
|
+
}
|
|
14458
|
+
console.log();
|
|
14459
14459
|
}
|
|
14460
|
-
console.log(chalk48.bold(`\u{1F4E6} Jai1 Server (${results.length} k\u1EBFt qu\u1EA3)`));
|
|
14461
|
-
console.log(table.toString());
|
|
14462
|
-
console.log();
|
|
14463
14460
|
}
|
|
14464
14461
|
}
|
|
14465
14462
|
if (searchNpm) {
|
|
@@ -14567,7 +14564,7 @@ function createSkillsAddCommand() {
|
|
|
14567
14564
|
// src/commands/skills/list.ts
|
|
14568
14565
|
import { Command as Command85 } from "commander";
|
|
14569
14566
|
import chalk50 from "chalk";
|
|
14570
|
-
import
|
|
14567
|
+
import Table8 from "cli-table3";
|
|
14571
14568
|
function createSkillsListCommand() {
|
|
14572
14569
|
return new Command85("list").description("List installed skills or available skills on server").option("--available", "List all skills available on Jai1 server").option("-s, --search <term>", "Search skills by name or description").action(async (options) => {
|
|
14573
14570
|
const skillsService = new SkillsService();
|
|
@@ -14584,7 +14581,7 @@ function createSkillsListCommand() {
|
|
|
14584
14581
|
console.log(chalk50.yellow("Kh\xF4ng t\xECm th\u1EA5y skills n\xE0o."));
|
|
14585
14582
|
return;
|
|
14586
14583
|
}
|
|
14587
|
-
const table = new
|
|
14584
|
+
const table = new Table8({
|
|
14588
14585
|
head: [
|
|
14589
14586
|
chalk50.cyan("T\xEAn"),
|
|
14590
14587
|
chalk50.cyan("M\xF4 t\u1EA3"),
|
|
@@ -14619,7 +14616,7 @@ function createSkillsListCommand() {
|
|
|
14619
14616
|
}
|
|
14620
14617
|
console.log(chalk50.bold.cyan("\u{1F6E0} Skills \u0111\xE3 c\xE0i \u0111\u1EB7t"));
|
|
14621
14618
|
console.log();
|
|
14622
|
-
const table = new
|
|
14619
|
+
const table = new Table8({
|
|
14623
14620
|
head: [
|
|
14624
14621
|
chalk50.cyan("T\xEAn"),
|
|
14625
14622
|
chalk50.cyan("M\xF4 t\u1EA3"),
|