groundmail-cli 0.29.2 → 0.30.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.
- package/dist/cli.js +21 -13
- package/package.json +2 -2
package/dist/cli.js
CHANGED
|
@@ -737,18 +737,25 @@ async function createDomainsClient(apiKey, baseUrl) {
|
|
|
737
737
|
const { Groundmail } = await import("groundmail");
|
|
738
738
|
return new Groundmail(apiKey, baseUrl ? { baseUrl } : void 0);
|
|
739
739
|
}
|
|
740
|
+
function pushRecord(lines, record) {
|
|
741
|
+
lines.push(` ${record.type.padEnd(6)} ${record.host}`);
|
|
742
|
+
if (record.type === "MX" && record.priority != null) {
|
|
743
|
+
lines.push(` priority: ${record.priority}`);
|
|
744
|
+
lines.push(` mail server: ${record.value}`);
|
|
745
|
+
} else {
|
|
746
|
+
lines.push(` ${record.value}`);
|
|
747
|
+
}
|
|
748
|
+
lines.push(` (${record.purpose})`);
|
|
749
|
+
lines.push("");
|
|
750
|
+
}
|
|
740
751
|
function formatDnsRecords(records) {
|
|
752
|
+
const toAdd = records.filter((record) => !record.already_set);
|
|
753
|
+
const alreadySet = records.filter((record) => record.already_set);
|
|
741
754
|
const lines = ["DNS records to add:", ""];
|
|
742
|
-
for (const record of
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
lines.push(` mail server: ${record.value}`);
|
|
747
|
-
} else {
|
|
748
|
-
lines.push(` ${record.value}`);
|
|
749
|
-
}
|
|
750
|
-
lines.push(` (${record.purpose})`);
|
|
751
|
-
lines.push("");
|
|
755
|
+
for (const record of toAdd) pushRecord(lines, record);
|
|
756
|
+
if (alreadySet.length) {
|
|
757
|
+
lines.push("Already set, nothing to change:", "");
|
|
758
|
+
for (const record of alreadySet) pushRecord(lines, record);
|
|
752
759
|
}
|
|
753
760
|
return lines.join("\n").trimEnd();
|
|
754
761
|
}
|
|
@@ -1121,7 +1128,8 @@ async function runListCommand4(args, env = process.env) {
|
|
|
1121
1128
|
await client2.receivedEmails.list({
|
|
1122
1129
|
limit: readFlag11(args, "--limit") ? Number(readFlag11(args, "--limit")) : void 0,
|
|
1123
1130
|
cursor: readFlag11(args, "--cursor"),
|
|
1124
|
-
domain: readFlag11(args, "--domain")
|
|
1131
|
+
domain: readFlag11(args, "--domain"),
|
|
1132
|
+
...readFlag11(args, "--in-reply-to-email") ? { inReplyToEmail: readFlag11(args, "--in-reply-to-email") } : {}
|
|
1125
1133
|
})
|
|
1126
1134
|
)
|
|
1127
1135
|
);
|
|
@@ -1465,7 +1473,7 @@ function trimUrl(value) {
|
|
|
1465
1473
|
}
|
|
1466
1474
|
|
|
1467
1475
|
// package.json
|
|
1468
|
-
var version = "0.
|
|
1476
|
+
var version = "0.30.1";
|
|
1469
1477
|
|
|
1470
1478
|
// src/user-agent.ts
|
|
1471
1479
|
function buildUserAgent(own) {
|
|
@@ -3867,7 +3875,7 @@ var USAGE_LINES = [
|
|
|
3867
3875
|
" groundmail dmarc enable example.com [--apply cloudflare|vercel|godaddy|netlify|digitalocean|dnsimple] report address and the record to publish",
|
|
3868
3876
|
" groundmail dmarc digest example.com --on|--off weekly digest email",
|
|
3869
3877
|
" groundmail dmarc disable example.com",
|
|
3870
|
-
" groundmail received-emails list [--domain inbound.example.com]",
|
|
3878
|
+
" groundmail received-emails list [--domain inbound.example.com] [--in-reply-to-email msg_...]",
|
|
3871
3879
|
" groundmail received-emails get inb_...",
|
|
3872
3880
|
" groundmail test-inbox address [--prefix signup] a fresh address on your team's test domain (mail there is caught, never delivered)",
|
|
3873
3881
|
" groundmail test-inbox wait --to <address> [--timeout 30] [--since <iso>] [--json] wait for an email; prints its code and links (exit 2 on timeout)",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "groundmail-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.30.1",
|
|
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.29.1"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"tsup": "^8.5.0",
|