@geekmidas/manifest 10.0.0-alpha.190 → 10.0.0-alpha.192
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/index.cjs +25 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +29 -2
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +29 -2
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +24 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1187,9 +1187,19 @@ function bucketExpiry(manifest, bucketId) {
|
|
|
1187
1187
|
//#region src/email.ts
|
|
1188
1188
|
/** The local part mail is sent from when the construct names none. */
|
|
1189
1189
|
const DEFAULT_SENDER = "noreply";
|
|
1190
|
-
/**
|
|
1190
|
+
/**
|
|
1191
|
+
* The domain `email` sends from, of the stage's `domain`: the domain itself,
|
|
1192
|
+
* or with a `subdomain`, that label in front of it — `mail.shop.example.com`.
|
|
1193
|
+
*/
|
|
1194
|
+
function senderDomain(email, domain) {
|
|
1195
|
+
return email.subdomain ? `${email.subdomain}.${domain}` : domain;
|
|
1196
|
+
}
|
|
1197
|
+
/**
|
|
1198
|
+
* `<local part>@<sending domain>` — `info@shop.example.com`, else
|
|
1199
|
+
* `noreply@…`; `info@mail.shop.example.com` with `subdomain: 'mail'`.
|
|
1200
|
+
*/
|
|
1191
1201
|
function senderAddress(email, domain) {
|
|
1192
|
-
return `${email.from ?? "noreply"}@${domain}`;
|
|
1202
|
+
return `${email.from ?? "noreply"}@${senderDomain(email, domain)}`;
|
|
1193
1203
|
}
|
|
1194
1204
|
//#endregion
|
|
1195
1205
|
//#region src/encryption.ts
|
|
@@ -1420,6 +1430,17 @@ function inboxRecipient(address, inbox, domain) {
|
|
|
1420
1430
|
};
|
|
1421
1431
|
}
|
|
1422
1432
|
/**
|
|
1433
|
+
* The domain `inbox` receives on, of the stage's `domain`: the domain itself,
|
|
1434
|
+
* or with a fixed `subdomain`, that label in front of it — `in.fixwell.example`.
|
|
1435
|
+
*
|
|
1436
|
+
* The one place an inbox's domain is derived. Every target writes it as the
|
|
1437
|
+
* inbox's `<ID>_DOMAIN`, and everything downstream — the receipt rule, the MX
|
|
1438
|
+
* record, the identity, the decoder, `gkm dev`'s receiver — reads that.
|
|
1439
|
+
*/
|
|
1440
|
+
function inboxDomain(inbox, domain) {
|
|
1441
|
+
return inbox.subdomain ? `${inbox.subdomain}.${domain}` : domain;
|
|
1442
|
+
}
|
|
1443
|
+
/**
|
|
1423
1444
|
* The recipients a deployed receipt rule names for `inbox` on `domain`.
|
|
1424
1445
|
*
|
|
1425
1446
|
* Without `subdomains`, each address on the domain: SES matches an address
|
|
@@ -1732,6 +1753,7 @@ exports.hostLabels = hostLabels;
|
|
|
1732
1753
|
exports.imageOriginSources = imageOriginSources;
|
|
1733
1754
|
exports.imageOrigins = imageOrigins;
|
|
1734
1755
|
exports.imageOriginsFor = imageOriginsFor;
|
|
1756
|
+
exports.inboxDomain = inboxDomain;
|
|
1735
1757
|
exports.inboxRecipient = inboxRecipient;
|
|
1736
1758
|
exports.isDerived = isDerived;
|
|
1737
1759
|
exports.isHostedDeclaration = isHostedDeclaration;
|
|
@@ -1755,6 +1777,7 @@ exports.schemeBase = schemeBase;
|
|
|
1755
1777
|
exports.scopedName = scopedName;
|
|
1756
1778
|
exports.seedFolder = seedFolder;
|
|
1757
1779
|
exports.senderAddress = senderAddress;
|
|
1780
|
+
exports.senderDomain = senderDomain;
|
|
1758
1781
|
exports.serviceKey = serviceKey;
|
|
1759
1782
|
exports.trustsOrigin = trustsOrigin;
|
|
1760
1783
|
exports.wildcardDomainOf = wildcardDomainOf;
|