diff --git a/domains/@.json b/domains/@.json index 1a088239e..164375f24 100644 --- a/domains/@.json +++ b/domains/@.json @@ -5,5 +5,7 @@ "username": "phenax", "email": "phenax5@gmail.com" }, - "record": {} -} \ No newline at end of file + "record": { + "URL": "https://www.is-a.dev" + } +} diff --git a/domains/tharindu.json b/domains/tharindu.json index d801c75c4..715d21f7c 100644 --- a/domains/tharindu.json +++ b/domains/tharindu.json @@ -1,11 +1,11 @@ { "description": "Tharindu's personal developer website", - "repo": "https://github.com/tharindusathis/tharindu", + "repo": "https://github.com/tharindusathis/tharindusathis.github.io", "owner": { "username": "tharindusathis", "email": "tharindu.sathis@gmail.com" }, "record": { - "CNAME": "tharindu.vercel.app" + "CNAME": "tharindusathis.github.io" } -} \ No newline at end of file +} diff --git a/domains/willian.json b/domains/willian.json new file mode 100644 index 000000000..a8a177eda --- /dev/null +++ b/domains/willian.json @@ -0,0 +1,12 @@ +{ + "description": "Willian Arsenio's Website", + "repo": "https://github.com/waveiro/waveiro.github.io", + "owner": { + "username": "waveiro", + "email": "", + "twitter": "@waveiro" + }, + "record": { + "CNAME": "waveiro.github.io" + } +} diff --git a/domains/willo.json b/domains/willo.json new file mode 100644 index 000000000..286b03212 --- /dev/null +++ b/domains/willo.json @@ -0,0 +1,12 @@ +{ + "description": "A First Willo`s Website", + "repo": "https://github.com/WilloIzCitron/willoizcitron.github.io", + "owner": { + "username": "WilloIzCitron", + "email": "", + "twitter": "tegasaziz" + }, + "record": { + "CNAME": "willoizcitron.github.io" + } +} diff --git a/domains/yajtpg.json b/domains/yajtpg.json new file mode 100644 index 000000000..026f414ea --- /dev/null +++ b/domains/yajtpg.json @@ -0,0 +1,16 @@ +{ + "description":"YajTPG's website", + "repo":"https://github.com/YajTPG", + "owner":{ + "username":"YajTPG", + "email":"yajtpg@gmail.com" + }, + "record":{ + "A":[ + "85.159.233.158", + "108.59.1.30", + "217.182.183.225", + "185.206.180.169" + ] + } +} diff --git a/utils/domain-service.js b/utils/domain-service.js index 984d274cb..446ca5579 100644 --- a/utils/domain-service.js +++ b/utils/domain-service.js @@ -6,7 +6,7 @@ const { then, log, print, lazyTask, batchLazyTasks } = require('./helpers'); const BATCH_SIZE = 1; const recordToRedirection = ({ name, address }) => ({ - domain: `${name}.${DOMAIN_DOMAIN}`, + domain: name === '@' ? DOMAIN_DOMAIN : `${name}.${DOMAIN_DOMAIN}`, redirect: address, type: 'permanent', redirect_wildcard: 1, @@ -20,7 +20,7 @@ const recordToZone = ({ name, type, address, id }) => ({ ...(type === 'CNAME' ? { cname: address } : {}), }); -const cleanName = name => `${name}`.replace(new RegExp(`\\.${DOMAIN_DOMAIN}\\.?$`), '').toLowerCase(); +const cleanName = name => name === DOMAIN_DOMAIN ? '@' : `${name}`.replace(new RegExp(`\\.${DOMAIN_DOMAIN}\\.?$`), '').toLowerCase(); const zoneToRecord = ({ name, type, cname, address, record, line: id }) => ({ id, @@ -42,7 +42,7 @@ const diffRecords = (oldRecords, newRecords) => { const remove = R.differenceWith(isMatchingRecord, oldRecords, newRecords); const add = R.differenceWith(isMatchingRecord, newRecords, oldRecords) - .filter(r => !['www', '@'].includes(r.name)); + .filter(r => !['www'].includes(r.name)); return { add, remove }; };