@jvittechs/j 1.0.46 → 1.0.47
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 +13 -6
- 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.47",
|
|
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: {
|
|
@@ -10937,8 +10937,10 @@ async function handleWatch(address, options) {
|
|
|
10937
10937
|
const startTime = Date.now();
|
|
10938
10938
|
if (!options.json) {
|
|
10939
10939
|
console.log(chalk25.bold.cyan(`\u{1F440} Watching inbox: ${address}`));
|
|
10940
|
-
console.log(chalk25.dim(
|
|
10941
|
-
`))
|
|
10940
|
+
console.log(chalk25.dim(
|
|
10941
|
+
` Polling every ${intervalSec}s` + (timeoutSec ? ` \xB7 timeout ${timeoutSec}s` : "") + (options.keep ? " \xB7 keep watching" : " \xB7 stops after first email") + ` \xB7 Ctrl+C to stop
|
|
10942
|
+
`
|
|
10943
|
+
));
|
|
10942
10944
|
}
|
|
10943
10945
|
const init = await api.getInbox(address, 30);
|
|
10944
10946
|
if (init.success && init.data) {
|
|
@@ -10986,6 +10988,10 @@ async function handleWatch(address, options) {
|
|
|
10986
10988
|
}
|
|
10987
10989
|
}
|
|
10988
10990
|
console.log();
|
|
10991
|
+
if (!options.keep) {
|
|
10992
|
+
clearInterval(timer);
|
|
10993
|
+
process.exit(0);
|
|
10994
|
+
}
|
|
10989
10995
|
}
|
|
10990
10996
|
}
|
|
10991
10997
|
};
|
|
@@ -11000,10 +11006,11 @@ async function handleWatch(address, options) {
|
|
|
11000
11006
|
});
|
|
11001
11007
|
}
|
|
11002
11008
|
function createMailWatchCommand() {
|
|
11003
|
-
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: ch\u1EA1y m\xE3i)").option("-j, --json", "Output s\u1EF1 ki\u1EC7n email m\u1EDBi d\u1EA1ng JSON (m\u1ED7i d\xF2ng 1 event)").addHelpText("after", `
|
|
11009
|
+
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: ch\u1EA1y m\xE3i)").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", `
|
|
11004
11010
|
Examples:
|
|
11005
|
-
$ j dev mail watch user@dollicons.com
|
|
11006
|
-
$ j dev mail watch user@dollicons.com -
|
|
11011
|
+
$ j dev mail watch user@dollicons.com # D\u1EEBng khi nh\u1EADn \u0111\u01B0\u1EE3c email \u0111\u1EA7u ti\xEAn
|
|
11012
|
+
$ j dev mail watch user@dollicons.com -k # Ti\u1EBFp t\u1EE5c watch
|
|
11013
|
+
$ j dev mail watch user@dollicons.com -i 30 -k
|
|
11007
11014
|
$ j dev mail watch user@dollicons.com -t 300
|
|
11008
11015
|
$ j dev mail watch user@dollicons.com -j | jq .
|
|
11009
11016
|
`).action(async (address, options) => {
|