@vibiz/cli 0.3.0 → 0.3.2
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/vibiz.js
CHANGED
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
formatUsd,
|
|
12
12
|
mergeEnvFile,
|
|
13
13
|
oneKeyMessage
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-LKIFLTGP.js";
|
|
15
15
|
|
|
16
16
|
// packages/cli/src/main.ts
|
|
17
17
|
import { spawn } from "node:child_process";
|
|
@@ -362,7 +362,9 @@ var VibizApp = class _VibizApp {
|
|
|
362
362
|
/**
|
|
363
363
|
* Any action, billed to the project: web data (`web.scrape`, `web.search`, `web.crawl`,
|
|
364
364
|
* `web.screenshot`, `web.design`, `ads.library`, `places.search`, `reviews`, `social.profile`,
|
|
365
|
-
* `social.posts`, `ecommerce.product`, `linkedin.company
|
|
365
|
+
* `social.posts`, `ecommerce.product`, `linkedin.company`, and SEO data: `seo.serp`,
|
|
366
|
+
* `seo.keywords`, `seo.keyword_ideas`, `seo.domain`, `seo.backlinks`, `seo.audit`,
|
|
367
|
+
* `seo.ai_mentions`) or `email.send`.
|
|
366
368
|
*/
|
|
367
369
|
actions = {
|
|
368
370
|
run: (name, input) => this.request(`/app/actions/${encodeURIComponent(name)}`, {
|
|
@@ -970,6 +972,84 @@ var ONE_KEY_PATHS = ` Then the app loads the rest at start:
|
|
|
970
972
|
https://app.vibiz.app/v1/app/env?format=shell)" && exec <your server>
|
|
971
973
|
CI / build step npx @vibiz/cli env pull --format dotenv -o .env.production`;
|
|
972
974
|
|
|
975
|
+
// packages/cli/src/dns-records.ts
|
|
976
|
+
var DNS_RECORDS_USAGE = [
|
|
977
|
+
"usage: vibiz domains records <domain> [--json]",
|
|
978
|
+
" vibiz domains records add <domain> <TYPE> <name> <value> [--ttl n] [--priority n]",
|
|
979
|
+
" vibiz domains records remove <domain> <id> [--force]"
|
|
980
|
+
].join("\n");
|
|
981
|
+
var MANAGED_LABEL = {
|
|
982
|
+
hosting: "managed by Vibiz: hosting",
|
|
983
|
+
email: "managed by Vibiz: email",
|
|
984
|
+
default: "managed by Vibiz: DNS default"
|
|
985
|
+
};
|
|
986
|
+
function recordLine(r) {
|
|
987
|
+
const value = r.type === "TXT" ? JSON.stringify(r.value) : r.value;
|
|
988
|
+
return [
|
|
989
|
+
`${r.type.padEnd(6)}${(r.name || "@").padEnd(26)}${value}${r.priority !== null ? ` (priority ${r.priority})` : ""}`,
|
|
990
|
+
r.ttl !== null ? `ttl ${r.ttl}` : null,
|
|
991
|
+
r.managed_by ? MANAGED_LABEL[r.managed_by] : "yours",
|
|
992
|
+
`id ${r.id}`
|
|
993
|
+
].filter(Boolean).join(" \xB7 ");
|
|
994
|
+
}
|
|
995
|
+
var whole = (flag, v, example) => {
|
|
996
|
+
if (v === void 0) return void 0;
|
|
997
|
+
if (!/^\d+$/.test(v.trim())) {
|
|
998
|
+
throw new Error(`--${flag} is a whole number, like --${flag} ${example}. "${v}" is not.`);
|
|
999
|
+
}
|
|
1000
|
+
return Number(v);
|
|
1001
|
+
};
|
|
1002
|
+
async function dnsRecordsCommand(io, vibiz2, flags, args) {
|
|
1003
|
+
const json = (v) => io.log(JSON.stringify(v, null, 2));
|
|
1004
|
+
const records = vibiz2.domains.records;
|
|
1005
|
+
const [first, domain, ...rest] = args;
|
|
1006
|
+
if (first === "add") {
|
|
1007
|
+
const [type, name, value, extra] = rest;
|
|
1008
|
+
if (!domain || !type || name === void 0 || value === void 0 || extra !== void 0) {
|
|
1009
|
+
throw new Error(
|
|
1010
|
+
`${DNS_RECORDS_USAGE}
|
|
1011
|
+
Quote the value, and use @ (or "") as the name for the domain itself: vibiz domains records add example.com TXT @ "v=spf1 -all"`
|
|
1012
|
+
);
|
|
1013
|
+
}
|
|
1014
|
+
const ttl = whole("ttl", flags.ttl, "3600");
|
|
1015
|
+
const priority = whole("priority", flags.priority, "10");
|
|
1016
|
+
const input = {
|
|
1017
|
+
type: type.toUpperCase(),
|
|
1018
|
+
name,
|
|
1019
|
+
value,
|
|
1020
|
+
...ttl !== void 0 ? { ttl } : {},
|
|
1021
|
+
...priority !== void 0 ? { priority } : {}
|
|
1022
|
+
};
|
|
1023
|
+
const out = await records.add(domain, input);
|
|
1024
|
+
if (flags.json) return json(out);
|
|
1025
|
+
io.log(`${out.created ? "Added" : "Already there"}: ${out.fqdn}`);
|
|
1026
|
+
io.log(` ${recordLine(out)}`);
|
|
1027
|
+
io.log(`check: dig +short ${out.type} ${out.fqdn}`);
|
|
1028
|
+
io.log(" New records usually answer within a minute or two.");
|
|
1029
|
+
return;
|
|
1030
|
+
}
|
|
1031
|
+
if (first === "remove" || first === "rm") {
|
|
1032
|
+
const [id, extra] = rest;
|
|
1033
|
+
if (!domain || !id || extra !== void 0) throw new Error(DNS_RECORDS_USAGE);
|
|
1034
|
+
const out = await records.remove(domain, id, { force: !!flags.force });
|
|
1035
|
+
if (flags.json) return json(out);
|
|
1036
|
+
io.log(`Removed ${out.type} ${out.fqdn}: ${out.value}`);
|
|
1037
|
+
return;
|
|
1038
|
+
}
|
|
1039
|
+
if (!first || domain !== void 0 || first.startsWith("-")) throw new Error(DNS_RECORDS_USAGE);
|
|
1040
|
+
const list2 = await records.list(first);
|
|
1041
|
+
if (flags.json) return json(list2);
|
|
1042
|
+
io.log(`${list2.domain}: ${list2.data.length} DNS record${list2.data.length === 1 ? "" : "s"}`);
|
|
1043
|
+
for (const r of list2.data) io.log(` ${recordLine(r)}`);
|
|
1044
|
+
io.log(`Add one: vibiz domains records add ${list2.domain} <TYPE> <name> <value>`);
|
|
1045
|
+
if (list2.data.some((r) => r.managed)) {
|
|
1046
|
+
io.log(
|
|
1047
|
+
"Leave the managed ones: Vibiz keeps them for hosting, email and HTTPS (removing one needs --force)."
|
|
1048
|
+
);
|
|
1049
|
+
}
|
|
1050
|
+
io.log(`In the console: ${list2.console_url}`);
|
|
1051
|
+
}
|
|
1052
|
+
|
|
973
1053
|
// packages/cli/src/email-marketing.ts
|
|
974
1054
|
var EMAIL_MARKETING_SUBCOMMANDS = [
|
|
975
1055
|
"contacts",
|
|
@@ -2803,10 +2883,177 @@ function printOutput(io, action, out) {
|
|
|
2803
2883
|
`);
|
|
2804
2884
|
}
|
|
2805
2885
|
return;
|
|
2886
|
+
case "seo.serp":
|
|
2887
|
+
io.log(
|
|
2888
|
+
`${out.keyword} (${out.location}, ${out.device}${out.total_results ? `, ${num(out.total_results)} results` : ""})
|
|
2889
|
+
`
|
|
2890
|
+
);
|
|
2891
|
+
table2(
|
|
2892
|
+
io,
|
|
2893
|
+
["#", "type", "domain", "title"],
|
|
2894
|
+
(out.results ?? []).map((r) => [r.position, r.type, r.domain ?? "", r.title ?? r.url])
|
|
2895
|
+
);
|
|
2896
|
+
if (out.features?.length) io.log(`
|
|
2897
|
+
on the page: ${out.features.join(", ")}`);
|
|
2898
|
+
return;
|
|
2899
|
+
case "seo.keywords":
|
|
2900
|
+
table2(
|
|
2901
|
+
io,
|
|
2902
|
+
["keyword", "searches/mo", "cpc", "competition"],
|
|
2903
|
+
(out.keywords ?? []).map((k) => [
|
|
2904
|
+
k.keyword,
|
|
2905
|
+
num(k.search_volume),
|
|
2906
|
+
money2(k.cpc_usd),
|
|
2907
|
+
k.competition ?? ""
|
|
2908
|
+
])
|
|
2909
|
+
);
|
|
2910
|
+
return;
|
|
2911
|
+
case "seo.keyword_ideas":
|
|
2912
|
+
table2(
|
|
2913
|
+
io,
|
|
2914
|
+
["keyword", "searches/mo", "cpc", "competition", "difficulty"],
|
|
2915
|
+
(out.ideas ?? []).map((k) => [
|
|
2916
|
+
k.keyword,
|
|
2917
|
+
num(k.search_volume),
|
|
2918
|
+
money2(k.cpc_usd),
|
|
2919
|
+
k.competition ?? "",
|
|
2920
|
+
k.difficulty ?? ""
|
|
2921
|
+
])
|
|
2922
|
+
);
|
|
2923
|
+
if (out.total) io.log(`
|
|
2924
|
+
${num(out.total)} ideas in all`);
|
|
2925
|
+
return;
|
|
2926
|
+
case "seo.domain":
|
|
2927
|
+
io.log(
|
|
2928
|
+
`${out.domain} ${num(out.organic?.keywords)} keywords \xB7 ~${num(out.organic?.traffic_estimate)} visits/mo \xB7 worth ${money2(out.organic?.traffic_value_usd)}/mo in ads
|
|
2929
|
+
`
|
|
2930
|
+
);
|
|
2931
|
+
table2(
|
|
2932
|
+
io,
|
|
2933
|
+
["#", "keyword", "searches/mo", "url"],
|
|
2934
|
+
(out.top_keywords ?? []).map((k) => [
|
|
2935
|
+
k.position ?? "",
|
|
2936
|
+
k.keyword,
|
|
2937
|
+
num(k.search_volume),
|
|
2938
|
+
k.url ?? ""
|
|
2939
|
+
])
|
|
2940
|
+
);
|
|
2941
|
+
io.log("\ncompetitors");
|
|
2942
|
+
table2(
|
|
2943
|
+
io,
|
|
2944
|
+
["domain", "shared keywords", "visits/mo"],
|
|
2945
|
+
(out.competitors ?? []).map((c) => [
|
|
2946
|
+
c.domain,
|
|
2947
|
+
num(c.common_keywords),
|
|
2948
|
+
num(c.traffic_estimate)
|
|
2949
|
+
])
|
|
2950
|
+
);
|
|
2951
|
+
return;
|
|
2952
|
+
case "seo.backlinks": {
|
|
2953
|
+
const s = out.summary ?? {};
|
|
2954
|
+
io.log(
|
|
2955
|
+
`${out.target} ${num(s.backlinks)} backlinks from ${num(s.referring_domains)} domains \xB7 rank ${s.rank ?? "?"} \xB7 ${num(s.broken_backlinks)} broken
|
|
2956
|
+
`
|
|
2957
|
+
);
|
|
2958
|
+
table2(
|
|
2959
|
+
io,
|
|
2960
|
+
["from", "anchor", "follow", "since"],
|
|
2961
|
+
(out.backlinks ?? []).map((b) => [
|
|
2962
|
+
b.from_url,
|
|
2963
|
+
b.anchor ?? "",
|
|
2964
|
+
b.dofollow === false ? "nofollow" : "follow",
|
|
2965
|
+
b.first_seen?.slice(0, 10) ?? ""
|
|
2966
|
+
])
|
|
2967
|
+
);
|
|
2968
|
+
return;
|
|
2969
|
+
}
|
|
2970
|
+
case "seo.audit":
|
|
2971
|
+
io.log(
|
|
2972
|
+
`${out.url} ${out.status_code ?? "?"} score ${out.score ?? "?"} ${out.load_time_ms ?? "?"} ms ${out.word_count ?? "?"} words links ${out.links?.internal ?? "?"} in / ${out.links?.external ?? "?"} out`
|
|
2973
|
+
);
|
|
2974
|
+
io.log(`title ${out.title ?? "(none)"}`);
|
|
2975
|
+
io.log(`description ${out.description ?? "(none)"}`);
|
|
2976
|
+
io.log(`h1 ${out.h1?.length ? out.h1.join(" | ") : "(none)"}
|
|
2977
|
+
`);
|
|
2978
|
+
if (!out.issues?.length) io.log("No issues found.");
|
|
2979
|
+
for (const i of out.issues ?? []) io.log(`${String(i.severity).padEnd(7)} ${i.message}`);
|
|
2980
|
+
return;
|
|
2981
|
+
case "seo.ai_mentions":
|
|
2982
|
+
io.log(
|
|
2983
|
+
`${out.target} ${out.total} mentions (${Object.entries(out.by_platform ?? {}).map(([p, n]) => `${p} ${n}`).join(", ")})
|
|
2984
|
+
`
|
|
2985
|
+
);
|
|
2986
|
+
for (const m of out.mentions ?? []) {
|
|
2987
|
+
io.log(`${m.platform}: ${m.question ?? ""}`);
|
|
2988
|
+
if (m.answer_excerpt) io.log(` ${m.answer_excerpt}`);
|
|
2989
|
+
if (m.url) io.log(` ${m.url}`);
|
|
2990
|
+
io.log("");
|
|
2991
|
+
}
|
|
2992
|
+
return;
|
|
2806
2993
|
default:
|
|
2807
2994
|
io.log(JSON.stringify(out, null, 2));
|
|
2808
2995
|
}
|
|
2809
2996
|
}
|
|
2997
|
+
var num = (v) => typeof v === "number" ? Math.round(v).toLocaleString("en-US") : "\u2013";
|
|
2998
|
+
var money2 = (v) => typeof v === "number" ? `$${v.toFixed(2)}` : "\u2013";
|
|
2999
|
+
function table2(io, head, rows) {
|
|
3000
|
+
if (!rows.length) return io.log("(none)");
|
|
3001
|
+
const cells = [head, ...rows.map((r) => r.map((c) => String(c ?? "")))].map(
|
|
3002
|
+
(r) => r.map((c) => c.length > 60 ? `${c.slice(0, 59)}\u2026` : c)
|
|
3003
|
+
);
|
|
3004
|
+
const widths = head.map((_, i) => Math.max(...cells.map((r) => (r[i] ?? "").length)));
|
|
3005
|
+
for (const r of cells) {
|
|
3006
|
+
io.log(
|
|
3007
|
+
r.map((c, i) => c.padEnd(widths[i] ?? 0)).join(" ").trimEnd()
|
|
3008
|
+
);
|
|
3009
|
+
}
|
|
3010
|
+
}
|
|
3011
|
+
var SEO_USAGE = 'vibiz seo serp "<keyword>" | keywords k1,k2 | ideas "<keyword>" | domain example.com | backlinks example.com | audit <url> | ai example.com [--location "United States"] [--language en] [--limit n] [--project id] [--json]';
|
|
3012
|
+
var SEO_ACTIONS = {
|
|
3013
|
+
serp: "seo.serp",
|
|
3014
|
+
keywords: "seo.keywords",
|
|
3015
|
+
ideas: "seo.keyword_ideas",
|
|
3016
|
+
keyword_ideas: "seo.keyword_ideas",
|
|
3017
|
+
domain: "seo.domain",
|
|
3018
|
+
backlinks: "seo.backlinks",
|
|
3019
|
+
audit: "seo.audit",
|
|
3020
|
+
ai: "seo.ai_mentions",
|
|
3021
|
+
ai_mentions: "seo.ai_mentions"
|
|
3022
|
+
};
|
|
3023
|
+
async function seoCommand(io, args, flags) {
|
|
3024
|
+
const [what = "", ...rest] = args;
|
|
3025
|
+
const target = rest.join(" ").trim();
|
|
3026
|
+
const action = SEO_ACTIONS[what.replace(/-/g, "_")];
|
|
3027
|
+
if (!action || !target) throw usage(SEO_USAGE);
|
|
3028
|
+
const extra = flags.input ? JSON.parse(flags.input) : {};
|
|
3029
|
+
const limit = int(flags.limit, "limit");
|
|
3030
|
+
const depth = int(flags.depth, "depth");
|
|
3031
|
+
const locale = {
|
|
3032
|
+
...flags.location ? { location: flags.location } : {},
|
|
3033
|
+
...flags.language ? { language: flags.language } : {}
|
|
3034
|
+
};
|
|
3035
|
+
const lim = limit ? { limit } : {};
|
|
3036
|
+
const keywords = target.split(/[,\n]/).map((k) => k.trim()).filter(Boolean);
|
|
3037
|
+
const input = {
|
|
3038
|
+
"seo.serp": {
|
|
3039
|
+
keyword: target,
|
|
3040
|
+
...locale,
|
|
3041
|
+
...depth ? { depth } : {},
|
|
3042
|
+
...flags.device ? { device: flags.device } : {}
|
|
3043
|
+
},
|
|
3044
|
+
"seo.keywords": { keywords, ...locale },
|
|
3045
|
+
"seo.keyword_ideas": { keywords, ...locale, ...lim },
|
|
3046
|
+
"seo.domain": { domain: target, ...locale, ...lim },
|
|
3047
|
+
"seo.backlinks": { target, ...lim },
|
|
3048
|
+
"seo.audit": { url: target },
|
|
3049
|
+
"seo.ai_mentions": {
|
|
3050
|
+
target,
|
|
3051
|
+
...lim,
|
|
3052
|
+
...flags.platform ? { platform: flags.platform } : {}
|
|
3053
|
+
}
|
|
3054
|
+
};
|
|
3055
|
+
return runOne(io, await io.client(), action, { ...input[action], ...extra }, flags);
|
|
3056
|
+
}
|
|
2810
3057
|
async function runOne(io, vibiz2, action, input, flags) {
|
|
2811
3058
|
const res = flags.project ? await vibiz2.projects.runAction(flags.project, action, input) : await vibiz2.actions.run(action, input);
|
|
2812
3059
|
if (flags.json) {
|
|
@@ -3015,6 +3262,14 @@ var HELP = `vibiz \u2014 website, database and sign-in for a new business, in on
|
|
|
3015
3262
|
move a bought name to another project (full-access keys)
|
|
3016
3263
|
vibiz domains point <name> <host or IP|none>
|
|
3017
3264
|
a bought name used by an app elsewhere: we point it there
|
|
3265
|
+
vibiz domains records <domain> [--json] a bought domain's DNS records; the ones Vibiz keeps
|
|
3266
|
+
(hosting, email, DNS defaults) are marked managed
|
|
3267
|
+
vibiz domains records add <domain> <TYPE> <name> <value> [--ttl n] [--priority n]
|
|
3268
|
+
add a record (A, AAAA, CNAME, MX, TXT, CAA; name @ for
|
|
3269
|
+
the domain itself), e.g. a TXT another service asks
|
|
3270
|
+
for to verify the domain (full-access keys)
|
|
3271
|
+
vibiz domains records remove <domain> <id> [--force]
|
|
3272
|
+
remove one; a managed one needs --force (full-access keys)
|
|
3018
3273
|
vibiz domains renew <domain> [--years 1] renew now from credits (full-access keys)
|
|
3019
3274
|
vibiz domains auto-renew <domain> on|off renew from credits 30 days before expiry (default on)
|
|
3020
3275
|
vibiz domains transfer-code <domain> the code to move it to another registrar (full-access keys)
|
|
@@ -3170,6 +3425,18 @@ var HELP = `vibiz \u2014 website, database and sign-in for a new business, in on
|
|
|
3170
3425
|
ads on Facebook and Instagram from the Meta Ad Library;
|
|
3171
3426
|
a page URL or page id (or --page "<name>") is one
|
|
3172
3427
|
advertiser's ads; --all includes stopped ads
|
|
3428
|
+
vibiz seo serp "<keyword>" [--location "United States"] [--language en] [--depth 10] [--device mobile]
|
|
3429
|
+
who ranks on Google for a keyword
|
|
3430
|
+
vibiz seo keywords k1,k2,\u2026 monthly searches, CPC and competition (up to 1000)
|
|
3431
|
+
vibiz seo ideas "<keyword>" [--limit 50] related keywords with volume and difficulty
|
|
3432
|
+
vibiz seo domain example.com [--limit 20] a site's search traffic, top keywords, competitors
|
|
3433
|
+
vibiz seo backlinks example.com [--limit 20]
|
|
3434
|
+
who links to a domain or page
|
|
3435
|
+
vibiz seo audit <url> one page's on-page SEO and the issues to fix
|
|
3436
|
+
vibiz seo ai example.com [--platform chatgpt|google]
|
|
3437
|
+
how often ChatGPT and Google AI Overviews mention it.
|
|
3438
|
+
Every seo command: --location, --language, --project,
|
|
3439
|
+
--json
|
|
3173
3440
|
vibiz runs [--action a] [--since 1d] [--project id] [--json] past runs, newest first
|
|
3174
3441
|
vibiz runs <run_id> [--json] one run's input and output again
|
|
3175
3442
|
vibiz actions [--json] every action and its input fields
|
|
@@ -3187,6 +3454,9 @@ var HELP = `vibiz \u2014 website, database and sign-in for a new business, in on
|
|
|
3187
3454
|
social.posts Instagram or TikTok posts for a hashtag
|
|
3188
3455
|
ecommerce.product price, stock, images of a product
|
|
3189
3456
|
linkedin.company a public LinkedIn company page
|
|
3457
|
+
seo.serp, seo.keywords, seo.keyword_ideas,
|
|
3458
|
+
seo.domain, seo.backlinks, seo.audit,
|
|
3459
|
+
seo.ai_mentions SEO data (vibiz seo)
|
|
3190
3460
|
vibiz send --to <addr> --subject <s> --text <body> [--html-file f] [--from info]
|
|
3191
3461
|
send email from this project's address
|
|
3192
3462
|
vibiz email inbox [--view inbox|starred|sent|archive|spam|trash|all] [--q words] [--unread] [--mailbox id]
|
|
@@ -3902,7 +4172,7 @@ var SOCIAL_LABELS = {
|
|
|
3902
4172
|
};
|
|
3903
4173
|
var socialLabel = (platform3) => SOCIAL_LABELS[platform3] ?? platform3;
|
|
3904
4174
|
var cents2 = (n) => `$${(n / 100).toFixed(2)}`;
|
|
3905
|
-
var
|
|
4175
|
+
var money3 = (n, currency = "usd") => {
|
|
3906
4176
|
if (currency === "usd") return cents2(n);
|
|
3907
4177
|
try {
|
|
3908
4178
|
const f = new Intl.NumberFormat("en-US", {
|
|
@@ -4083,25 +4353,25 @@ function printAnalytics(io, r) {
|
|
|
4083
4353
|
io.log(
|
|
4084
4354
|
` ${r.timeseries.map((p) => bars[Math.round(p.visitors / peak * (bars.length - 1))]).join("")}`
|
|
4085
4355
|
);
|
|
4086
|
-
const
|
|
4356
|
+
const table3 = (title, rows) => {
|
|
4087
4357
|
if (!rows.length) return;
|
|
4088
4358
|
io.log(`
|
|
4089
4359
|
${title}`);
|
|
4090
4360
|
for (const [label, n] of rows) io.log(` ${String(n).padStart(6)} ${label}`);
|
|
4091
4361
|
};
|
|
4092
|
-
|
|
4362
|
+
table3(
|
|
4093
4363
|
"top pages (pageviews)",
|
|
4094
4364
|
r.top_pages.map((p) => [p.path, p.pageviews])
|
|
4095
4365
|
);
|
|
4096
|
-
|
|
4366
|
+
table3(
|
|
4097
4367
|
"sources (visitors)",
|
|
4098
4368
|
r.sources.map((s) => [s.source, s.visitors])
|
|
4099
4369
|
);
|
|
4100
|
-
|
|
4370
|
+
table3(
|
|
4101
4371
|
"countries (visitors)",
|
|
4102
4372
|
r.countries.map((c) => [c.country, c.visitors])
|
|
4103
4373
|
);
|
|
4104
|
-
|
|
4374
|
+
table3(
|
|
4105
4375
|
"events",
|
|
4106
4376
|
r.events.map((e) => [e.name, e.count])
|
|
4107
4377
|
);
|
|
@@ -4387,6 +4657,8 @@ async function runCli(argv2, io) {
|
|
|
4387
4657
|
"no-browser": { type: "boolean", default: false },
|
|
4388
4658
|
elsewhere: { type: "boolean", default: false },
|
|
4389
4659
|
"points-to": { type: "string" },
|
|
4660
|
+
ttl: { type: "string" },
|
|
4661
|
+
priority: { type: "string" },
|
|
4390
4662
|
"replace-mx": { type: "boolean", default: false },
|
|
4391
4663
|
say: { type: "string" },
|
|
4392
4664
|
prompt: { type: "string" },
|
|
@@ -4425,6 +4697,10 @@ async function runCli(argv2, io) {
|
|
|
4425
4697
|
tag: { type: "string" },
|
|
4426
4698
|
limit: { type: "string" },
|
|
4427
4699
|
country: { type: "string" },
|
|
4700
|
+
location: { type: "string" },
|
|
4701
|
+
depth: { type: "string" },
|
|
4702
|
+
device: { type: "string" },
|
|
4703
|
+
platform: { type: "string" },
|
|
4428
4704
|
"max-pages": { type: "string" },
|
|
4429
4705
|
action: { type: "string" },
|
|
4430
4706
|
cursor: { type: "string" },
|
|
@@ -4973,7 +5249,7 @@ ${link.url}`);
|
|
|
4973
5249
|
for (const x of p.prices) {
|
|
4974
5250
|
const every = x.interval ? ` / ${x.interval_count && x.interval_count > 1 ? `${x.interval_count} ` : ""}${x.interval}` : "";
|
|
4975
5251
|
io.log(
|
|
4976
|
-
` ${x.id} ${
|
|
5252
|
+
` ${x.id} ${money3(x.unit_amount_cents, x.currency)}${every}${x.lookup_key ? ` ${x.lookup_key}` : ""}${x.active ? "" : " (inactive)"}`
|
|
4977
5253
|
);
|
|
4978
5254
|
}
|
|
4979
5255
|
}
|
|
@@ -5019,7 +5295,7 @@ ${c.url}`));
|
|
|
5019
5295
|
if (!list2.data.length) io.log("No payments yet.");
|
|
5020
5296
|
for (const p of list2.data) {
|
|
5021
5297
|
io.log(
|
|
5022
|
-
`${p.created_at.slice(0, 10)} ${p.id} ${
|
|
5298
|
+
`${p.created_at.slice(0, 10)} ${p.id} ${money3(p.amount_cents, p.currency).padStart(10)} net ${p.account === "own" ? money3(p.net_cents, p.currency) : cents2(p.net_cents)} ${p.status}${p.customer_email ? ` ${p.customer_email}` : ""}`
|
|
5023
5299
|
);
|
|
5024
5300
|
}
|
|
5025
5301
|
});
|
|
@@ -5305,9 +5581,9 @@ ${link.url}`
|
|
|
5305
5581
|
(a) => a.id === input.account_id
|
|
5306
5582
|
);
|
|
5307
5583
|
const currency = google?.details.ad_accounts?.find((a) => a.id === input.ad_account_id)?.currency ?? null;
|
|
5308
|
-
const
|
|
5584
|
+
const money4 = formatMinor(input.daily_budget_cents, currency);
|
|
5309
5585
|
await sure(
|
|
5310
|
-
`This creates the ${input.campaign_type} campaign "${input.name}" (${
|
|
5586
|
+
`This creates the ${input.campaign_type} campaign "${input.name}" (${money4} a day) on the live Google Ads account, ${input.start === "active" ? "ACTIVE: it starts spending" : "paused: nothing is spent until you resume it"}.`
|
|
5311
5587
|
);
|
|
5312
5588
|
ch = await vibiz2.projects.social.createCampaign(id, { ...input, confirm: true }, env);
|
|
5313
5589
|
}
|
|
@@ -5328,9 +5604,9 @@ ${link.url}`
|
|
|
5328
5604
|
if (!list2.data.length)
|
|
5329
5605
|
io.log("No campaigns (connect ads: vibiz social connect meta --ads).");
|
|
5330
5606
|
for (const c of list2.data) {
|
|
5331
|
-
const
|
|
5607
|
+
const money4 = (v) => formatMinor(v, c.currency);
|
|
5332
5608
|
io.log(
|
|
5333
|
-
`${c.id} ${c.status.padEnd(14)} ${
|
|
5609
|
+
`${c.id} ${c.status.padEnd(14)} ${money4(c.daily_budget_cents)}/day spent ${money4(c.spend_cents)} ${c.name}`
|
|
5334
5610
|
);
|
|
5335
5611
|
}
|
|
5336
5612
|
});
|
|
@@ -5587,6 +5863,10 @@ ${link.url}`
|
|
|
5587
5863
|
case "domains": {
|
|
5588
5864
|
const vibiz2 = await io.client();
|
|
5589
5865
|
const [sub, arg, third] = positionals;
|
|
5866
|
+
if (sub === "records") {
|
|
5867
|
+
await dnsRecordsCommand(io, vibiz2, values, positionals.slice(1));
|
|
5868
|
+
return;
|
|
5869
|
+
}
|
|
5590
5870
|
if (sub && BUY_DOMAIN_COMMANDS.has(sub)) {
|
|
5591
5871
|
await buyDomainsCommand(io, vibiz2, values, sub, arg, third);
|
|
5592
5872
|
return;
|
|
@@ -5614,7 +5894,7 @@ ${link.url}`
|
|
|
5614
5894
|
}
|
|
5615
5895
|
if (sub)
|
|
5616
5896
|
throw new Error(
|
|
5617
|
-
"usage: vibiz domains [add | verify | remove | search | buy | owned | use | move | point | renew | auto-renew | transfer-code | owner]"
|
|
5897
|
+
"usage: vibiz domains [add | verify | remove | search | buy | owned | use | move | point | records | renew | auto-renew | transfer-code | owner]"
|
|
5618
5898
|
);
|
|
5619
5899
|
print(await d.list(id));
|
|
5620
5900
|
return;
|
|
@@ -5751,6 +6031,19 @@ ${await oneKeyLines(vibiz2, id)}`);
|
|
|
5751
6031
|
...values.cursor ? { cursor: values.cursor } : {}
|
|
5752
6032
|
});
|
|
5753
6033
|
}
|
|
6034
|
+
// SEO data (docs: actions, seo.*): `vibiz seo <what> …`.
|
|
6035
|
+
case "seo":
|
|
6036
|
+
return seoCommand(io, positionals, {
|
|
6037
|
+
json: values.json,
|
|
6038
|
+
...values.input ? { input: values.input } : {},
|
|
6039
|
+
...values.location ? { location: values.location } : {},
|
|
6040
|
+
...values.language ? { language: values.language } : {},
|
|
6041
|
+
...values.limit ? { limit: values.limit } : {},
|
|
6042
|
+
...values.depth ? { depth: values.depth } : {},
|
|
6043
|
+
...values.device ? { device: values.device } : {},
|
|
6044
|
+
...values.platform ? { platform: values.platform } : {},
|
|
6045
|
+
...values.project ? { project: values.project } : {}
|
|
6046
|
+
});
|
|
5754
6047
|
case "run": {
|
|
5755
6048
|
if (!passthrough.length) {
|
|
5756
6049
|
const action = positionals[0];
|
|
@@ -6384,7 +6677,7 @@ Store the key now: it is not shown again.`
|
|
|
6384
6677
|
return;
|
|
6385
6678
|
}
|
|
6386
6679
|
case "docs": {
|
|
6387
|
-
const { DOC_TOPICS, DOCS } = await import("./src-
|
|
6680
|
+
const { DOC_TOPICS, DOCS } = await import("./src-5T426Q6L.js");
|
|
6388
6681
|
const topic = positionals[0];
|
|
6389
6682
|
if (!topic || !DOC_TOPICS.includes(topic)) {
|
|
6390
6683
|
for (const t of DOC_TOPICS) io.log(` vibiz docs ${t.padEnd(13)} ${DOCS[t].title}`);
|
|
@@ -6409,7 +6702,7 @@ ${DOCS[topic].body}`);
|
|
|
6409
6702
|
if (positionals[0])
|
|
6410
6703
|
throw new Error('usage: vibiz mcp (serve over stdio) | vibiz mcp add --clients "<client>"');
|
|
6411
6704
|
io.local();
|
|
6412
|
-
const { serveStdio } = await import("./src-
|
|
6705
|
+
const { serveStdio } = await import("./src-5T426Q6L.js");
|
|
6413
6706
|
await serveStdio({ version: cliVersion() });
|
|
6414
6707
|
return;
|
|
6415
6708
|
}
|
package/package.json
CHANGED