diff --git a/domains/_dmarc.francodurand.json b/domains/_dmarc.francodurand.json new file mode 100644 index 0000000000..9a924e1e55 --- /dev/null +++ b/domains/_dmarc.francodurand.json @@ -0,0 +1,9 @@ +{ + "owner": { + "username": "FrancoDurand", + "email": "francoduve.25@gmail.com" + }, + "records": { + "TXT": "v=DMARC1; p=none;" + } +} \ No newline at end of file diff --git a/domains/anexlbk.json b/domains/anexlbk.json new file mode 100644 index 0000000000..13ba771241 --- /dev/null +++ b/domains/anexlbk.json @@ -0,0 +1,9 @@ +{ + "owner": { + "username": "anexlbk", + "email": "anaslachmi@gmail.com" + }, + "records": { + "CNAME": "anexlbk.github.io" + } +} diff --git a/domains/ivazuara.json b/domains/ivazuara.json new file mode 100644 index 0000000000..af78f16966 --- /dev/null +++ b/domains/ivazuara.json @@ -0,0 +1,9 @@ +{ + "owner": { + "username": "ivazuara", + "email": "mi.azuara03@gmail.com" + }, + "records": { + "CNAME": "ivazuara.github.io" + } +} diff --git a/domains/leemin.json b/domains/leemin.json new file mode 100644 index 0000000000..9fec8fd477 --- /dev/null +++ b/domains/leemin.json @@ -0,0 +1,9 @@ +{ + "owner": { + "username": "TodTheMatsu", + "email": "gokudollmeanak@gmail.com" + }, + "records": { + "CNAME": "cname.vercel-dns.com" + } +} diff --git a/domains/pranjal.json b/domains/pranjal.json index 621d2e5a5c..389f199515 100644 --- a/domains/pranjal.json +++ b/domains/pranjal.json @@ -1,9 +1,9 @@ { "owner": { "username": "Pranjal-SB", - "email": "psbhatnagar.in@gmal.com" + "email": "psbhatnagar.in@gmail.com" }, "records": { - "CNAME": "pranjal-sb.github.io" + "URL": "https://psbhatnagar.in" } } diff --git a/domains/resend._domainkey.francodurand.json b/domains/resend._domainkey.francodurand.json new file mode 100644 index 0000000000..36b400d7eb --- /dev/null +++ b/domains/resend._domainkey.francodurand.json @@ -0,0 +1,9 @@ +{ + "owner": { + "username": "FrancoDurand", + "email": "francoduve.25@gmail.com" + }, + "records": { + "TXT": "p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDSgdlRfPZ5K5NIbwfKH5HEl+hPhCo6tQ3eAVzBv/E17lVaFuCNb6UElfYwjUngvqT6q+lRsT+apO+0/DFenyagwd1ocHVMZN2gEgVU3pk08Y3o19IYpNg0a2Scjz7VKV9KN1oXMdTH4kNGhtu64o9tBOE5Nech0gY/clNWN5trhwIDAQAB" + } +} \ No newline at end of file diff --git a/domains/sauraxt.json b/domains/sauraxt.json new file mode 100644 index 0000000000..895bb8e982 --- /dev/null +++ b/domains/sauraxt.json @@ -0,0 +1,9 @@ +{ + "owner": { + "username": "saurabhstudent990-a11y", + "email": "saurabhstudent990@gmail.com" + }, + "records": { + "CNAME": "sauraxt.netlify.app" + } +} diff --git a/domains/send.francodurand.json b/domains/send.francodurand.json new file mode 100644 index 0000000000..519f2db01c --- /dev/null +++ b/domains/send.francodurand.json @@ -0,0 +1,10 @@ +{ + "owner": { + "username": "FrancoDurand", + "email": "francoduve.25@gmail.com" + }, + "records": { + "MX": ["feedback-smtp.sa-east-1.amazonses.com"], + "TXT": "v=spf1 include:amazonses.com ~all" + } +} \ No newline at end of file diff --git a/domains/will.json b/domains/will.json new file mode 100644 index 0000000000..340e2bfa92 --- /dev/null +++ b/domains/will.json @@ -0,0 +1,9 @@ +{ + "owner": { + "username": "wdhdev", + "email": "william@is-a.dev" + }, + "records": { + "URL": "https://wharrison.com.au" + } +} diff --git a/util/raw-api.js b/util/raw-api.js index 32a3962e1c..caa6bd21d5 100644 --- a/util/raw-api.js +++ b/util/raw-api.js @@ -3,54 +3,48 @@ const path = require("path"); const directoryPath = path.join(__dirname, "../domains"); const outputDir = path.join(__dirname, "../raw-api"); +const domainsOutputDir = path.join(outputDir, "v2", "domains"); if (!fs.existsSync(outputDir)) { fs.mkdirSync(outputDir, { recursive: true }); } +if (!fs.existsSync(domainsOutputDir)) { + fs.mkdirSync(domainsOutputDir, { recursive: true }); +} const internal = require(path.join(__dirname, "internal.json")); const reserved = require(path.join(__dirname, "reserved.json")); - const v2 = []; +function writeDomainFile(entry) { + fs.writeFileSync( + path.join(domainsOutputDir, `${entry.subdomain}.json`), + JSON.stringify(entry) + ); +} + for (const subdomain of internal) { - const commonData = { + const entry = { domain: `${subdomain}.is-a.dev`, subdomain: subdomain, - owner: { - username: "is-a-dev" - } - }; - - const records = { - CNAME: "internal.is-a.dev" - }; - - v2.push({ - ...commonData, - records: records, + owner: { username: "is-a-dev" }, + records: { CNAME: "internal.is-a.dev" }, internal: true - }); + }; + v2.push(entry); + writeDomainFile(entry); } for (const subdomain of reserved) { - const commonData = { + const entry = { domain: `${subdomain}.is-a.dev`, subdomain: subdomain, - owner: { - username: "is-a-dev" - } - }; - - const records = { - URL: "https://is-a.dev/reserved" - }; - - v2.push({ - ...commonData, - records: records, + owner: { username: "is-a-dev" }, + records: { URL: "https://is-a.dev/reserved" }, reserved: true - }); + }; + v2.push(entry); + writeDomainFile(entry); } fs.readdir(directoryPath, function (err, files) { @@ -67,31 +61,30 @@ fs.readdir(directoryPath, function (err, files) { const item = JSON.parse(data); const name = path.parse(file).name; - item.domain = name + ".is-a.dev"; + item.domain = `${name}.is-a.dev`; item.subdomain = name; - delete item.owner.email; - let itemV2 = { + const itemV2 = { domain: item.domain, subdomain: item.subdomain, owner: item.owner, records: item.records }; - if (item.redirect_config) itemV2.redirect_config = item.redirect_config; - if (item.proxied) itemV2.proxied = item.proxied; v2.push(itemV2); + writeDomainFile(itemV2); processedCount++; if (processedCount === files.length) { v2.sort((a, b) => a.domain.localeCompare(b.subdomain)); - - fs.writeFile("raw-api/v2.json", JSON.stringify(v2), (err) => { - if (err) throw err; - }); + fs.writeFile( + path.join(outputDir, "v2.json"), + JSON.stringify(v2), + (err) => { if (err) throw err; } + ); } }); });