@social-mail/social-mail-web-server 1.5.2 → 1.5.4
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/common/globalEnv.js +1 -1
- package/dist/common/globalEnv.js.map +1 -1
- package/dist/server/model/events/HostedZoneEvents.d.ts +1 -0
- package/dist/server/model/events/HostedZoneEvents.d.ts.map +1 -1
- package/dist/server/model/events/HostedZoneEvents.js +11 -0
- package/dist/server/model/events/HostedZoneEvents.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/common/globalEnv.ts +1 -1
- package/src/server/model/events/HostedZoneEvents.ts +14 -0
package/package.json
CHANGED
package/src/common/globalEnv.ts
CHANGED
|
@@ -29,7 +29,7 @@ export const globalEnv = {
|
|
|
29
29
|
enabled: /^(true|yes)$/i.test(process.env.SOCIAL_MAIL_DNS_ENABLED),
|
|
30
30
|
soa: (process.env.SOCIAL_MAIL_DNS_SOA || "admin.socialmail.in somewhere.com").split(/[\s\,\;]/g).map((txt: string) => txt.endsWith(".") ? txt : txt + "."),
|
|
31
31
|
letsEncryptPrefix: process.env.SOCIAL_MAIL_DNS_LE_PREFIX,
|
|
32
|
-
ns: (process.env.SOCIAL_MAIL_DNS_NS || "ns1,ns2").split(
|
|
32
|
+
ns: (process.env.SOCIAL_MAIL_DNS_NS || "ns1,ns2").split(/[\s\,\;]/g).map((x) => x.trim()).filter((x) => x),
|
|
33
33
|
},
|
|
34
34
|
altHosts: (process.env.SOCIAL_MAIL_ALT_HOSTS || "").split(","),
|
|
35
35
|
wildcardDomain: process.env.SOCIAL_MAIL_WILDCARD_DOMAIN,
|
|
@@ -44,6 +44,20 @@ export default class HostedZoneEvents extends AuthenticatedEvents<HostedZone> {
|
|
|
44
44
|
await SyncDnsZoneRecordsWorkflow.enqueue(wc, entity.zoneID);
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
+
async afterUpdate(entity: HostedZone, entry: ChangeEntry<HostedZone>) {
|
|
48
|
+
|
|
49
|
+
if (entity.dnsHosted) {
|
|
50
|
+
const db = ServiceProvider.resolve(this, SocialMailContext);
|
|
51
|
+
await db.hostedZoneRecords.where(entity, (p) => (x) => x.zoneID === p.zoneID)
|
|
52
|
+
.update(void 0, (p) => (x) => ({
|
|
53
|
+
hosted: true
|
|
54
|
+
}));
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
const wc = ServiceProvider.resolve(this, WorkflowContext);
|
|
58
|
+
await SyncDnsZoneRecordsWorkflow.enqueue(wc, entity.zoneID);
|
|
59
|
+
}
|
|
60
|
+
|
|
47
61
|
}
|
|
48
62
|
|
|
49
63
|
export class HostedZoneRecordEvents extends AuthenticatedEvents<HostedZoneRecord> {
|