@social-mail/social-mail-web-server 1.5.0 → 1.5.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@social-mail/social-mail-web-server",
3
- "version": "1.5.0",
3
+ "version": "1.5.1",
4
4
  "description": "## Phase 1",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -28,7 +28,8 @@ export const globalEnv = {
28
28
  dns: {
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
- letsEncryptPrefix: process.env.SOCIAL_MAIL_DNS_LE_PREFIX
31
+ letsEncryptPrefix: process.env.SOCIAL_MAIL_DNS_LE_PREFIX,
32
+ ns: (process.env.SOCIAL_MAIL_DNS_NS || "ns1,ns2").split(/\,\;/).map((x) => x.trim()).filter((x) => x),
32
33
  },
33
34
  altHosts: (process.env.SOCIAL_MAIL_ALT_HOSTS || "").split(","),
34
35
  wildcardDomain: process.env.SOCIAL_MAIL_WILDCARD_DOMAIN,
@@ -81,6 +81,20 @@ export default class SyncDnsZoneRecordsWorkflow extends Workflow {
81
81
  readonly: true,
82
82
  });
83
83
 
84
+ for (const ns of globalEnv.dns.ns) {
85
+ await db.hostedZoneRecords.statements.insert({
86
+ zoneID,
87
+ dateCreated,
88
+ dateUpdated,
89
+ ttl,
90
+ name: "@",
91
+ type: "NS",
92
+ value: ns,
93
+ fqdn: domain,
94
+ readonly: true,
95
+ });
96
+ }
97
+
84
98
 
85
99
  await db.hostedZoneRecords.statements.insert({
86
100
  zoneID,