@wraps.dev/cli 2.15.0 → 2.15.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
CHANGED
|
@@ -6728,7 +6728,7 @@ var init_cloudflare = __esm({
|
|
|
6728
6728
|
};
|
|
6729
6729
|
}
|
|
6730
6730
|
async createEmailRecords(data) {
|
|
6731
|
-
const { domain, dkimTokens, mailFromDomain, region } = data;
|
|
6731
|
+
const { domain, dkimTokens, mailFromDomain, customTrackingDomain, region } = data;
|
|
6732
6732
|
const errors2 = [];
|
|
6733
6733
|
let recordsCreated = 0;
|
|
6734
6734
|
try {
|
|
@@ -6765,6 +6765,20 @@ var init_cloudflare = __esm({
|
|
|
6765
6765
|
} else {
|
|
6766
6766
|
errors2.push(`Failed to create DMARC record for ${domain}`);
|
|
6767
6767
|
}
|
|
6768
|
+
if (customTrackingDomain) {
|
|
6769
|
+
const trackingSuccess = await this.createRecord(
|
|
6770
|
+
customTrackingDomain,
|
|
6771
|
+
"CNAME",
|
|
6772
|
+
`r.${region}.awstrack.me`
|
|
6773
|
+
);
|
|
6774
|
+
if (trackingSuccess) {
|
|
6775
|
+
recordsCreated++;
|
|
6776
|
+
} else {
|
|
6777
|
+
errors2.push(
|
|
6778
|
+
`Failed to create tracking CNAME for ${customTrackingDomain}`
|
|
6779
|
+
);
|
|
6780
|
+
}
|
|
6781
|
+
}
|
|
6768
6782
|
if (mailFromDomain) {
|
|
6769
6783
|
const mxSuccess = await this.createRecord(
|
|
6770
6784
|
mailFromDomain,
|
|
@@ -7096,7 +7110,7 @@ var init_vercel = __esm({
|
|
|
7096
7110
|
};
|
|
7097
7111
|
}
|
|
7098
7112
|
async createEmailRecords(data) {
|
|
7099
|
-
const { domain, dkimTokens, mailFromDomain, region } = data;
|
|
7113
|
+
const { domain, dkimTokens, mailFromDomain, customTrackingDomain, region } = data;
|
|
7100
7114
|
const errors2 = [];
|
|
7101
7115
|
let recordsCreated = 0;
|
|
7102
7116
|
try {
|
|
@@ -7133,6 +7147,20 @@ var init_vercel = __esm({
|
|
|
7133
7147
|
} else {
|
|
7134
7148
|
errors2.push(`Failed to create DMARC record for ${domain}`);
|
|
7135
7149
|
}
|
|
7150
|
+
if (customTrackingDomain) {
|
|
7151
|
+
const trackingSuccess = await this.createRecord(
|
|
7152
|
+
customTrackingDomain,
|
|
7153
|
+
"CNAME",
|
|
7154
|
+
`r.${region}.awstrack.me`
|
|
7155
|
+
);
|
|
7156
|
+
if (trackingSuccess) {
|
|
7157
|
+
recordsCreated++;
|
|
7158
|
+
} else {
|
|
7159
|
+
errors2.push(
|
|
7160
|
+
`Failed to create tracking CNAME for ${customTrackingDomain}`
|
|
7161
|
+
);
|
|
7162
|
+
}
|
|
7163
|
+
}
|
|
7136
7164
|
if (mailFromDomain) {
|
|
7137
7165
|
const mxSuccess = await this.createRecord(
|
|
7138
7166
|
mailFromDomain,
|
|
@@ -7348,7 +7376,7 @@ import {
|
|
|
7348
7376
|
Route53Client as Route53Client2
|
|
7349
7377
|
} from "@aws-sdk/client-route-53";
|
|
7350
7378
|
function buildEmailDNSRecords(data) {
|
|
7351
|
-
const { domain, dkimTokens, mailFromDomain, region } = data;
|
|
7379
|
+
const { domain, dkimTokens, mailFromDomain, customTrackingDomain, region } = data;
|
|
7352
7380
|
const records = [];
|
|
7353
7381
|
for (const token of dkimTokens) {
|
|
7354
7382
|
records.push({
|
|
@@ -7371,6 +7399,14 @@ function buildEmailDNSRecords(data) {
|
|
|
7371
7399
|
value: `v=DMARC1; p=quarantine; rua=mailto:postmaster@${dmarcRuaDomain}`,
|
|
7372
7400
|
category: "dmarc"
|
|
7373
7401
|
});
|
|
7402
|
+
if (customTrackingDomain) {
|
|
7403
|
+
records.push({
|
|
7404
|
+
name: customTrackingDomain,
|
|
7405
|
+
type: "CNAME",
|
|
7406
|
+
value: `r.${region}.awstrack.me`,
|
|
7407
|
+
category: "tracking"
|
|
7408
|
+
});
|
|
7409
|
+
}
|
|
7374
7410
|
if (mailFromDomain) {
|
|
7375
7411
|
records.push({
|
|
7376
7412
|
name: mailFromDomain,
|
|
@@ -7431,8 +7467,7 @@ async function createDNSRecordsForProvider(credentials, data, selectedCategories
|
|
|
7431
7467
|
data.dkimTokens,
|
|
7432
7468
|
data.region,
|
|
7433
7469
|
categories,
|
|
7434
|
-
|
|
7435
|
-
// customTrackingDomain - not used here
|
|
7470
|
+
data.customTrackingDomain,
|
|
7436
7471
|
data.mailFromDomain
|
|
7437
7472
|
);
|
|
7438
7473
|
let recordsCreated = 0;
|
|
@@ -19804,9 +19839,7 @@ Enable it: ${pc21.cyan("wraps email inbound init")}
|
|
|
19804
19839
|
console.log(pc21.bold(" Inbound Email Configuration"));
|
|
19805
19840
|
console.log();
|
|
19806
19841
|
if (domainList.length === 1) {
|
|
19807
|
-
console.log(
|
|
19808
|
-
` ${pc21.dim("Receiving domain:")} ${pc21.cyan(domainList[0])}`
|
|
19809
|
-
);
|
|
19842
|
+
console.log(` ${pc21.dim("Receiving domain:")} ${pc21.cyan(domainList[0])}`);
|
|
19810
19843
|
} else {
|
|
19811
19844
|
console.log(` ${pc21.dim("Receiving domains:")}`);
|
|
19812
19845
|
for (const d of domainList) {
|
|
@@ -20108,11 +20141,9 @@ async function inboundAdd(options) {
|
|
|
20108
20141
|
const metadata = await loadConnectionMetadata(identity.accountId, region);
|
|
20109
20142
|
if (!metadata?.services?.email?.config?.inbound?.enabled) {
|
|
20110
20143
|
clack20.log.error("Inbound email infrastructure is not deployed.");
|
|
20111
|
-
console.log(
|
|
20112
|
-
`
|
|
20144
|
+
console.log(`
|
|
20113
20145
|
Deploy first: ${pc21.cyan("wraps email inbound init")}
|
|
20114
|
-
`
|
|
20115
|
-
);
|
|
20146
|
+
`);
|
|
20116
20147
|
process.exit(1);
|
|
20117
20148
|
}
|
|
20118
20149
|
const emailConfig = metadata.services.email.config;
|
|
@@ -20279,16 +20310,12 @@ Deploy first: ${pc21.cyan("wraps email inbound init")}
|
|
|
20279
20310
|
`${pc21.bold("Added inbound domain:")} ${pc21.cyan(receivingDomain)}`
|
|
20280
20311
|
);
|
|
20281
20312
|
console.log();
|
|
20282
|
-
if (
|
|
20283
|
-
console.log(
|
|
20284
|
-
` ${pc21.dim("1.")} Add DNS records above to your DNS provider`
|
|
20285
|
-
);
|
|
20286
|
-
console.log(
|
|
20287
|
-
` ${pc21.dim("2.")} Verify: ${pc21.cyan("wraps email inbound verify")}`
|
|
20288
|
-
);
|
|
20313
|
+
if (dnsAutoCreated) {
|
|
20314
|
+
console.log(` Verify: ${pc21.cyan("wraps email inbound verify")}`);
|
|
20289
20315
|
} else {
|
|
20316
|
+
console.log(` ${pc21.dim("1.")} Add DNS records above to your DNS provider`);
|
|
20290
20317
|
console.log(
|
|
20291
|
-
` Verify: ${pc21.cyan("wraps email inbound verify")}`
|
|
20318
|
+
` ${pc21.dim("2.")} Verify: ${pc21.cyan("wraps email inbound verify")}`
|
|
20292
20319
|
);
|
|
20293
20320
|
}
|
|
20294
20321
|
console.log();
|
|
@@ -20306,11 +20333,9 @@ async function inboundRemove(options) {
|
|
|
20306
20333
|
const metadata = await loadConnectionMetadata(identity.accountId, region);
|
|
20307
20334
|
if (!metadata?.services?.email?.config?.inbound?.enabled) {
|
|
20308
20335
|
clack20.log.error("Inbound email infrastructure is not deployed.");
|
|
20309
|
-
console.log(
|
|
20310
|
-
`
|
|
20336
|
+
console.log(`
|
|
20311
20337
|
Deploy first: ${pc21.cyan("wraps email inbound init")}
|
|
20312
|
-
`
|
|
20313
|
-
);
|
|
20338
|
+
`);
|
|
20314
20339
|
process.exit(1);
|
|
20315
20340
|
}
|
|
20316
20341
|
const emailConfig = metadata.services.email.config;
|
|
@@ -20956,6 +20981,7 @@ ${pc24.yellow(pc24.bold("Configuration Warnings:"))}`);
|
|
|
20956
20981
|
domain: outputs.domain,
|
|
20957
20982
|
dkimTokens: outputs.dkimTokens,
|
|
20958
20983
|
mailFromDomain: outputs.mailFromDomain,
|
|
20984
|
+
customTrackingDomain: outputs.customTrackingDomain,
|
|
20959
20985
|
region
|
|
20960
20986
|
},
|
|
20961
20987
|
selectedCategories
|
|
@@ -20988,6 +21014,7 @@ ${pc24.yellow(pc24.bold("Configuration Warnings:"))}`);
|
|
|
20988
21014
|
domain: outputs.domain,
|
|
20989
21015
|
dkimTokens: outputs.dkimTokens,
|
|
20990
21016
|
mailFromDomain: outputs.mailFromDomain,
|
|
21017
|
+
customTrackingDomain: outputs.customTrackingDomain,
|
|
20991
21018
|
region
|
|
20992
21019
|
};
|
|
20993
21020
|
const records = buildEmailDNSRecords2(recordData);
|
|
@@ -24864,6 +24891,7 @@ ${pc30.bold("Cost Impact:")}`);
|
|
|
24864
24891
|
domain: outputs.domain,
|
|
24865
24892
|
dkimTokens: outputs.dkimTokens,
|
|
24866
24893
|
mailFromDomain,
|
|
24894
|
+
customTrackingDomain: outputs.customTrackingDomain,
|
|
24867
24895
|
region
|
|
24868
24896
|
};
|
|
24869
24897
|
try {
|
|
@@ -24914,6 +24942,7 @@ ${pc30.bold("Cost Impact:")}`);
|
|
|
24914
24942
|
domain: outputs.domain,
|
|
24915
24943
|
dkimTokens: outputs.dkimTokens,
|
|
24916
24944
|
mailFromDomain,
|
|
24945
|
+
customTrackingDomain: outputs.customTrackingDomain,
|
|
24917
24946
|
region
|
|
24918
24947
|
};
|
|
24919
24948
|
const dnsRecords = buildEmailDNSRecords(dnsData);
|