groundmail-cli 0.52.1 → 0.53.1

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.
Files changed (2) hide show
  1. package/dist/cli.js +8 -6
  2. package/package.json +2 -2
package/dist/cli.js CHANGED
@@ -2103,7 +2103,7 @@ async function runListKeysCommandWithClient(args, env = process.env) {
2103
2103
  }
2104
2104
 
2105
2105
  // package.json
2106
- var version = "0.52.1";
2106
+ var version = "0.53.1";
2107
2107
 
2108
2108
  // src/help.ts
2109
2109
  var USAGE_LINES = [
@@ -2150,7 +2150,7 @@ var USAGE_LINES = [
2150
2150
  " groundmail mailboxes wait <mailbox> [--from \u2026] [--thread thd_\u2026] [--since <iso>] [--timeout 30] [--json] wait for the next message; prints its code and links (exit 2 on timeout)",
2151
2151
  " groundmail mailboxes send <mailbox> --to a@example.com,b@example.com [--cc \u2026] --subject \u2026 (--text \u2026 | --html \u2026) [--idempotency-key \u2026] [--json] email someone first, from a mailbox on your own domain",
2152
2152
  " groundmail mailboxes reply <mailbox> mbm_\u2026 (--text \u2026 | --html \u2026) [--reply-all] [--idempotency-key \u2026] [--json] reply in the thread",
2153
- ` groundmail emails send [--from you@domain.com | --sender billing] --to user@example.com --subject "Hello" --html "<p>Hi</p>" [--category transactional|product|newsletter] [--unsubscribe] [--tenant <tenant>] [--watch [--timeout 60] [--json]] --sender: a saved sender's handle; no --from or --sender: the sandbox sender (to your account email only)`,
2153
+ ` groundmail emails send [--from you@domain.com | --sender billing] --to user@example.com --subject "Hello" --html "<p>Hi</p>" [--category newsletter] [--unsubscribe] [--tenant <tenant>] [--watch [--timeout 60] [--json]] --sender: a saved sender's handle; no --from or --sender: the sandbox sender (to your account email only). Groundmail decides transactional or product; --category newsletter is for approved accounts`,
2154
2154
  ' groundmail emails send --to you@example.com --subject "Hello" --text "Hi" --watch watch it land: the receiving server, its reply and the time',
2155
2155
  " groundmail emails batch --file ./emails.json [--tenant <tenant>]",
2156
2156
  " groundmail emails list [--limit 25] [--cursor \u2026] [--test | --live] [--tenant <tenant>] [--stream transactional|product|newsletter]",
@@ -2201,9 +2201,9 @@ var USAGE_LINES = [
2201
2201
  " groundmail templates list [--status draft|published]",
2202
2202
  " groundmail templates starters",
2203
2203
  " groundmail templates from-starter password-reset",
2204
- ' groundmail templates create --name Welcome --subject "Hi" --html "<p>Hi</p>" [--category transactional|product] [--unsubscribe-enabled] [--folder Onboarding] [--sender billing]',
2204
+ ' groundmail templates create --name Welcome --subject "Hi" --html "<p>Hi</p>" [--unsubscribe-enabled] [--folder Onboarding] [--sender billing]',
2205
2205
  " groundmail templates get --id tpl_\u2026",
2206
- " groundmail templates update --id tpl_\u2026 [--name \u2026] [--subject \u2026] [--html \u2026] [--text \u2026] [--set-alias \u2026] [--category transactional|product] [--unsubscribe-enabled|--no-unsubscribe-enabled] [--folder \u2026] [--sender billing|none]",
2206
+ " groundmail templates update --id tpl_\u2026 [--name \u2026] [--subject \u2026] [--html \u2026] [--text \u2026] [--set-alias \u2026] [--unsubscribe-enabled|--no-unsubscribe-enabled] [--folder \u2026] [--sender billing|none]",
2207
2207
  " groundmail templates publish --id tpl_\u2026",
2208
2208
  ` groundmail templates push ./emails/welcome.tsx --alias welcome [--subject "Welcome"] [--props '{"name":"Ada"}'] [--publish]`,
2209
2209
  " groundmail templates versions --id tpl_\u2026",
@@ -5116,14 +5116,16 @@ async function runValidateCommand(args, env = process.env) {
5116
5116
  if (!apiKey) {
5117
5117
  return { exitCode: 1, error: "Missing API key. Set GROUNDMAIL_API_KEY, pass --api-key, or run `groundmail login`." };
5118
5118
  }
5119
- const flagValues = new Set([options.apiKey, options.baseUrl].filter(Boolean));
5119
+ const tenant = readFlag19(args, "--tenant");
5120
+ const mailboxCheck = args.includes("--mailbox");
5121
+ const flagValues = new Set([options.apiKey, options.baseUrl, tenant].filter(Boolean));
5120
5122
  const email = readFlag19(args, "--email") || args.find((arg) => arg.includes("@") && !arg.startsWith("-") && !flagValues.has(arg));
5121
5123
  if (!email) {
5122
5124
  return { exitCode: 1, error: "Missing email. Usage: groundmail validate user@example.com" };
5123
5125
  }
5124
5126
  try {
5125
5127
  const client3 = await createSuppressionsClient(apiKey, options.baseUrl);
5126
- const result = await client3.validate(email);
5128
+ const result = mailboxCheck || tenant ? await client3.validate(email, { ...mailboxCheck ? { mailboxCheck: true } : {}, ...tenant ? { tenant } : {} }) : await client3.validate(email);
5127
5129
  console.log(JSON.stringify(result));
5128
5130
  return { exitCode: result.verdict === "invalid" ? 2 : 0 };
5129
5131
  } catch (error) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "groundmail-cli",
3
- "version": "0.52.1",
3
+ "version": "0.53.1",
4
4
  "description": "Groundmail CLI: send email and manage mailboxes 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.55.0"
41
+ "groundmail": "0.57.0"
42
42
  },
43
43
  "devDependencies": {
44
44
  "tsup": "^9.0.0",