@geekmidas/manifest 10.0.0-alpha.191 → 10.0.0-alpha.193
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 +13 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +15 -2
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +15 -2
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +13 -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
|
|
@@ -1767,6 +1777,7 @@ exports.schemeBase = schemeBase;
|
|
|
1767
1777
|
exports.scopedName = scopedName;
|
|
1768
1778
|
exports.seedFolder = seedFolder;
|
|
1769
1779
|
exports.senderAddress = senderAddress;
|
|
1780
|
+
exports.senderDomain = senderDomain;
|
|
1770
1781
|
exports.serviceKey = serviceKey;
|
|
1771
1782
|
exports.trustsOrigin = trustsOrigin;
|
|
1772
1783
|
exports.wildcardDomainOf = wildcardDomainOf;
|