@vatio-ai/cli 0.123.0 → 0.124.0
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/lib/commands/channels.mjs +2 -0
- package/lib/suggest.mjs +9 -1
- package/lib/support.mjs +1 -0
- package/package.json +1 -1
|
@@ -66,6 +66,8 @@ export async function whatsapp(config, args = []) {
|
|
|
66
66
|
return fail(AGENT_NUMBERS_REMOVED);
|
|
67
67
|
case "mine":
|
|
68
68
|
return fail(MINE_REMOVED);
|
|
69
|
+
case "test-phones":
|
|
70
|
+
return fail("`vatio whatsapp test-phones` is `vatio whatsapp phones` now.");
|
|
69
71
|
default:
|
|
70
72
|
return fail(WHATSAPP_USAGE);
|
|
71
73
|
}
|
package/lib/suggest.mjs
CHANGED
|
@@ -104,7 +104,15 @@ const RENAMED = {
|
|
|
104
104
|
// `tokens create` made publishable keys; `keys create` names the kind.
|
|
105
105
|
tokens: (rest) => (rest[0] === "create" && !["publishable", "secret"].includes(rest[1])
|
|
106
106
|
? ["keys", "create", "publishable", ...rest.slice(1)]
|
|
107
|
-
: ["keys", ...rest])
|
|
107
|
+
: ["keys", ...rest]),
|
|
108
|
+
flags: (rest) => {
|
|
109
|
+
if (rest[0] === "add") return ["test", ...rest];
|
|
110
|
+
if (["rm", "remove", "delete"].includes(rest[0])) return ["test", "rm", ...rest.slice(1)];
|
|
111
|
+
return ["test", "list", ...rest];
|
|
112
|
+
},
|
|
113
|
+
eval: (rest) => ["test", "--wait", ...rest],
|
|
114
|
+
templates: (rest) => ["whatsapp", "templates", ...rest],
|
|
115
|
+
messages: (rest) => ["whatsapp", "failed", ...(rest[0] === "failed" ? rest.slice(1) : rest)]
|
|
108
116
|
};
|
|
109
117
|
|
|
110
118
|
// Exported so scripts/check-docs.mjs can check every command named above is
|
package/lib/support.mjs
CHANGED
|
@@ -27,6 +27,7 @@ export function takeEnv(args, { fallback = null } = {}) {
|
|
|
27
27
|
|
|
28
28
|
for (let i = 0; i < args.length; i += 1) {
|
|
29
29
|
const arg = args[i];
|
|
30
|
+
if (/^--as(?:=|$)/.test(arg)) fail("`--as` is `--env` now: --env preview or --env live.");
|
|
30
31
|
const match = /^--(env)(?:=(.*))?$/.exec(arg);
|
|
31
32
|
if (!match) {
|
|
32
33
|
rest.push(arg);
|