groundmail-cli 0.45.0 → 0.46.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/dist/cli.js +20 -6
- package/package.json +2 -2
package/dist/cli.js
CHANGED
|
@@ -2090,7 +2090,7 @@ async function runListKeysCommandWithClient(args, env = process.env) {
|
|
|
2090
2090
|
}
|
|
2091
2091
|
|
|
2092
2092
|
// package.json
|
|
2093
|
-
var version = "0.
|
|
2093
|
+
var version = "0.46.0";
|
|
2094
2094
|
|
|
2095
2095
|
// src/help.ts
|
|
2096
2096
|
var USAGE_LINES = [
|
|
@@ -2124,7 +2124,7 @@ var USAGE_LINES = [
|
|
|
2124
2124
|
" groundmail mailboxes create [--local-part signup-bot] [--domain agents.example.com] [--display-name \u2026] [--external-id \u2026] [--tenant <tenant>] [--retention-days 7] [--spam-threshold 5] [--metadata JSON] [--forward-from <mailbox>] [--json] a real address your agent reads and sends from; no --domain: a hosted address, which can only reply; --forward-from: a hosted mailbox this one replaces",
|
|
2125
2125
|
" groundmail mailboxes list [--tenant <tenant>] [--limit 25] [--cursor \u2026] [--json]",
|
|
2126
2126
|
" groundmail mailboxes get <mailbox> [--json]",
|
|
2127
|
-
" groundmail mailboxes update <mailbox> --send-as support@example.com
|
|
2127
|
+
" groundmail mailboxes update <mailbox> [--send-as support@example.com] [--allowed-senders you@example.com,example.com] [--blocked-senders spam.example] none clears one",
|
|
2128
2128
|
" groundmail mailboxes delete <mailbox> --yes the mailbox and all its mail; a hosted address is never given out again",
|
|
2129
2129
|
" groundmail mailboxes forward <mailbox> --to <new mailbox> --yes move a hosted address to a mailbox on your own domain, for 30 days; it can't send meanwhile",
|
|
2130
2130
|
" groundmail mailboxes threads <mailbox> [--label \u2026] [--participant \u2026] [--unread] [--archived] [--since <iso>] [--include-held] [--limit 25] [--cursor \u2026] [--json]",
|
|
@@ -5163,6 +5163,8 @@ async function runTestInboxCommand(subcommand, args, env = process.env) {
|
|
|
5163
5163
|
// src/commands/mailboxes/mailboxes.ts
|
|
5164
5164
|
var VALUE_FLAGS6 = [
|
|
5165
5165
|
"--send-as",
|
|
5166
|
+
"--allowed-senders",
|
|
5167
|
+
"--blocked-senders",
|
|
5166
5168
|
"--api-key",
|
|
5167
5169
|
"--base-url",
|
|
5168
5170
|
"--workspace",
|
|
@@ -5321,6 +5323,10 @@ function createParams(args) {
|
|
|
5321
5323
|
...v["--forward-from"] ? { forward_from: v["--forward-from"] } : {}
|
|
5322
5324
|
};
|
|
5323
5325
|
}
|
|
5326
|
+
function senderList(value) {
|
|
5327
|
+
if (value === void 0) return void 0;
|
|
5328
|
+
return value === "none" ? [] : value.split(/[\s,]+/).filter(Boolean);
|
|
5329
|
+
}
|
|
5324
5330
|
function paging(args) {
|
|
5325
5331
|
const limit = numberFlag(args, "--limit");
|
|
5326
5332
|
if (typeof limit === "object") return limit;
|
|
@@ -5406,10 +5412,18 @@ async function runMailboxesCommand(subcommand, argv, env = process.env) {
|
|
|
5406
5412
|
return { exitCode: 0 };
|
|
5407
5413
|
}
|
|
5408
5414
|
if (subcommand === "update") {
|
|
5409
|
-
const
|
|
5410
|
-
|
|
5411
|
-
const
|
|
5412
|
-
|
|
5415
|
+
const sendAs = args.values["--send-as"];
|
|
5416
|
+
const allowed = senderList(args.values["--allowed-senders"]);
|
|
5417
|
+
const blocked = senderList(args.values["--blocked-senders"]);
|
|
5418
|
+
if (sendAs === void 0 && !allowed && !blocked) {
|
|
5419
|
+
return { exitCode: 1, error: "Nothing to change. Usage: groundmail mailboxes update <mailbox> [--send-as support@example.com] [--allowed-senders you@example.com,example.com] [--blocked-senders spam.example]. Use none to clear one." };
|
|
5420
|
+
}
|
|
5421
|
+
const updated = await client2.mailboxes.update(ref, {
|
|
5422
|
+
...sendAs !== void 0 ? { send_as: sendAs === "none" ? null : sendAs } : {},
|
|
5423
|
+
...allowed ? { allowed_senders: allowed } : {},
|
|
5424
|
+
...blocked ? { blocked_senders: blocked } : {}
|
|
5425
|
+
});
|
|
5426
|
+
print({ mailbox: updated }, () => formatMailbox(updated));
|
|
5413
5427
|
return { exitCode: 0 };
|
|
5414
5428
|
}
|
|
5415
5429
|
if (subcommand === "delete") {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "groundmail-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.46.0",
|
|
4
4
|
"description": "Groundmail CLI — send transactional email from the terminal",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"prepublishOnly": "npm run build"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"groundmail": "0.
|
|
41
|
+
"groundmail": "0.48.0"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"tsup": "^8.5.0",
|