diff --git a/domains/aaraam.json b/domains/aaraam.json new file mode 100644 index 000000000..f75b6b11d --- /dev/null +++ b/domains/aaraam.json @@ -0,0 +1,12 @@ +{ + "description": "This website is a link to my personal developer portfolio.", + "repo": "https://github.com/aaraam/aaraam.github.io", + "owner": { + "username": "aaraam", + "email": "aaraam.goblin@gmail.com" + }, + "record": { + "CNAME": "aaraam.github.io", + "URL": "https://aaraam.is-a.dev" + } +} diff --git a/domains/allsyed.json b/domains/allsyed.json new file mode 100644 index 000000000..f12be2194 --- /dev/null +++ b/domains/allsyed.json @@ -0,0 +1,11 @@ +{ + "description": "Allsyed's personal website", + "repo": "https://github.com/allsyed", + "owner": { + "username": "allsyed", + "email": "allsyed@pm.me" + }, + "record": { + "CNAME": "allsyed.com" + } +} diff --git a/domains/anlshn.json b/domains/anlshn.json new file mode 100644 index 000000000..58b12cac2 --- /dev/null +++ b/domains/anlshn.json @@ -0,0 +1,12 @@ +{ + "description": "Anil's personal developer website", + "repo": "https://github.com/anilsahindev", + "owner": { + "username": "anilsahindev", + "email": "anilsahindev@gmail.com" + }, + "record": { + "CNAME": "anlshn.com", + "URL": "https://anlshn.is-a.dev" + } +} diff --git a/domains/anupam.json b/domains/anupam.json new file mode 100644 index 000000000..20d42352f --- /dev/null +++ b/domains/anupam.json @@ -0,0 +1,12 @@ +{ + "description": "Anupam's portfolio website", + "repo": "https://github.com/anupamroy8/portfolio", + "owner": { + "username": "anupamroy8", + "email": "anupamroy8@gmail.com" + }, + "record": { + "CNAME": "anupamroy8.github.io", + "URL": "https://anupam.is-a.dev" + } +} diff --git a/domains/anwar.json b/domains/anwar.json new file mode 100644 index 000000000..5451e6598 --- /dev/null +++ b/domains/anwar.json @@ -0,0 +1,11 @@ +{ + "description": "Anwar's personal website", + "repo": "https://github.com/getanwar", + "owner": { + "username": "getanwar", + "email": "say@anwar.im" + }, + "record": { + "URL": "https://anwar.im" + } +} diff --git a/domains/art.json b/domains/art.json new file mode 100644 index 000000000..fbfcc4a11 --- /dev/null +++ b/domains/art.json @@ -0,0 +1,11 @@ +{ + "description": "Art's personal developer website", + "repo": "https://github.com/dotiful", + "owner": { + "username": "dotiful", + "email": "dots.util@gmail.com" + }, + "record": { + "CNAME": "dotiful.github.io" + } +} diff --git a/domains/ashleymavericks.json b/domains/ashleymavericks.json new file mode 100644 index 000000000..2aa81aab6 --- /dev/null +++ b/domains/ashleymavericks.json @@ -0,0 +1,11 @@ +{ + "description": "Portfolio Website", + "repo": "https://github.com/ashleymavericks/Portfolio-Site", + "owner": { + "username": "ashlyemavericks", + "email": "singhanurag024@gmail.com" + }, + "record": { + "URL": "https://anuragsingh.dev" + } +} diff --git a/domains/aswin.json b/domains/aswin.json new file mode 100644 index 000000000..9ce17190d --- /dev/null +++ b/domains/aswin.json @@ -0,0 +1,12 @@ +{ + "description": "Aswin's personal portfolio", + "repo": "https://github.com/aswinskumar67/iamaswin.github.io", + "owner": { + "username": "aswinskumar67", + "email": "aswin.skumaro2bme@gmail.com" + }, + "record": { + "CNAME": "aswinskumar67.github.io", + "URL": "https://aswin.is-a.dev" + } +} \ No newline at end of file diff --git a/domains/athira-li.json b/domains/athira-li.json new file mode 100644 index 000000000..62a1ec2c1 --- /dev/null +++ b/domains/athira-li.json @@ -0,0 +1,11 @@ +{ + "description": "Athira's Web-Dev Home", + "repo": "https://github.com/Athira-L-I/Athira-L-I.github.io", + "owner": { + "username": "Athira-L-I", + "email": "athirali4582@gmail.com" + }, + "record": { + "CNAME": "Athira-L-I.github.io" + } +} diff --git a/domains/austin.json b/domains/austin.json new file mode 100644 index 000000000..8b4f10207 --- /dev/null +++ b/domains/austin.json @@ -0,0 +1,13 @@ +{ + "description": "Austin's personal developer website", + "repo": "https://github.com/austindyoung", + "owner": { + "username": "austindyoung", + "email": "austin@doesweb.dev", + "twitter": "" + }, + "record": { + "URL": "austindyoung.github.io" + } + } + diff --git a/domains/blaine.json b/domains/blaine.json new file mode 100644 index 000000000..38f0f6ea4 --- /dev/null +++ b/domains/blaine.json @@ -0,0 +1,13 @@ +{ + "description": "The face of Blaine, on the web", + "repo": "https://github.com/Blakeinstein/Blakeinstein.github.io", + "owner": { + "username": "Blakeinstein", + "email": "rishi1998@gmail.com" + }, + "record": { + "CNAME": "blakeinstein.github.io", + "URL": "https://blaine.is-a.dev" + } + } + diff --git a/domains/cmulay.json b/domains/cmulay.json new file mode 100644 index 000000000..1879a5de4 --- /dev/null +++ b/domains/cmulay.json @@ -0,0 +1,12 @@ +{ + "description": "Chinmay Mulay's Portfolio", + "repo": "https://github.com/cmulay/cmulay.github.io", + "owner": { + "username": "cmulay", + "email": "codewithchin@gmail.com" + }, + "record": { + "CNAME": "cmulay.github.io", + "URL": "https://cmulay.is-a.dev" + } + } \ No newline at end of file diff --git a/domains/daria.json b/domains/daria.json new file mode 100644 index 000000000..83fa7e075 --- /dev/null +++ b/domains/daria.json @@ -0,0 +1,11 @@ +{ + "description": "Daria is a dev", + "repo": "https://github.com/dariatrainor/dariatrainor.github.io", + "owner": { + "username": "dariatrainor", + "email": "dariasu@gmail.com" + }, + "record": { + "CNAME": "dariatrainor.github.io" + } +} diff --git a/domains/dennis.json b/domains/dennis.json new file mode 100644 index 000000000..f87f47642 --- /dev/null +++ b/domains/dennis.json @@ -0,0 +1,12 @@ +{ + "description": "Dennis is a Dev", + "repo": "https://github.com/dvandervlag/dvandervlag.github.io", + "owner": { + "username": "dvandervlag", + "email": "dvandervlag@gmail.com" + }, + "record": { + "CNAME": "dvandervlag.github.io", + "URL": "https://dennis.is-a.dev" + } +} diff --git a/domains/epsooraj.json b/domains/epsooraj.json new file mode 100644 index 000000000..a0b237de3 --- /dev/null +++ b/domains/epsooraj.json @@ -0,0 +1,11 @@ +{ + "description": "Sooraj Ep's website", + "owner": { + "username": "epsooraj", + "email": "epsooraj4@gmail.com" + }, + "record": { + "CNAME": "epsooraj.com", + "URL": "https://epsooraj.is-a.dev" + } +} diff --git a/domains/forsas.json b/domains/forsas.json new file mode 100644 index 000000000..7398d4ec7 --- /dev/null +++ b/domains/forsas.json @@ -0,0 +1,12 @@ +{ + "description": "Forsas website and blog", + "repo": "https://github.com/forsas/forsas.github.io", + "owner": { + "username": "forsas", + "email": "forsaslt@gmail.com" + }, + "record": { + "CNAME": "forsas.github.io", + "URL": "https://forsas.is-a.dev" + } +} diff --git a/domains/frankie.json b/domains/frankie.json new file mode 100644 index 000000000..bbba813a8 --- /dev/null +++ b/domains/frankie.json @@ -0,0 +1,12 @@ +{ + "description": "Now that's a spicy 404 page!", + "repo": "https://github.com/frankie-tech/frankie-tech.github.io", + "owner": { + "username": "frankie-tech", + "email": "", + "twitter":"this_frankie" + }, + "record": { + "CNAME": "frankie-tech.github.io" + } +} diff --git a/domains/god.json b/domains/god.json new file mode 100644 index 000000000..57ab5108b --- /dev/null +++ b/domains/god.json @@ -0,0 +1,12 @@ +{ + "description": "Austin's personal developer website", + "repo": "https://github.com/austindyoung", + "owner": { + "username": "austindyoung", + "email": "austin@doesweb.dev", + "twitter": "" + }, + "record": { + "URL": "https://austindyoung.github.io" + } + } diff --git a/domains/harikrishnan.json b/domains/harikrishnan.json new file mode 100644 index 000000000..85a5d05d6 --- /dev/null +++ b/domains/harikrishnan.json @@ -0,0 +1,11 @@ +{ + "description": "Hari's Portfolio Website", + "owner": { + "username": "Harikrishnan6336", + "email": "harikrishnan6336@gmail.com" + }, + "record": { + "CNAME": "Harikrishnan6336.github.io", + "URL": "https://harikrishnan.is-a.dev" + } +} diff --git a/domains/hemanth.json b/domains/hemanth.json new file mode 100644 index 000000000..9e35a8ef8 --- /dev/null +++ b/domains/hemanth.json @@ -0,0 +1,13 @@ +{ + "description": "Hemanth's developer portfolio", + "repo": "https://github.com/Hemanthwarrier/hemanth.github.io", + "owner": { + "username": "Hemanthwarrier", + "email": "hemanthwarrier@gmail.com" + }, + "record": { + "CNAME": "Hemanthwarrier.github.io", + "URL": "https://hemanth.is-a.dev" + } + } + \ No newline at end of file diff --git a/domains/hisham.json b/domains/hisham.json new file mode 100644 index 000000000..7b3b6561f --- /dev/null +++ b/domains/hisham.json @@ -0,0 +1,11 @@ +{ + "description": "Hisham is a dev", + "repo": "https://github.com/hishamalip/hishamalip.github.io", + "owner": { + "username": "hishamalip", + "email": "hishamalip@gmail.com" + }, + "record": { + "CNAME": "hishamalip.github.io" + } +} diff --git a/domains/homemadestea58.json b/domains/homemadestea58.json new file mode 100644 index 000000000..f645884c3 --- /dev/null +++ b/domains/homemadestea58.json @@ -0,0 +1,11 @@ +{ + "description": "Add some description", + "repo": "https://github.com/Homemadestea58homemadestea58.github.io/", + "owner": { + "username": "Homemadestea58", + "email": "conor.collins+isadev@dbbstu.catholic.edu.au" + }, + "record": { + "CNAME": "homemadestea58.github.io" + } +} diff --git a/domains/jeevan.json b/domains/jeevan.json new file mode 100644 index 000000000..3079ba37e --- /dev/null +++ b/domains/jeevan.json @@ -0,0 +1,12 @@ +{ + "description": "Jeevan's Portfolio", + "repo":"https://github.com/jeevan900929/jeevan900929.github.io", + "owner": { + "username": "jeevan900929", + "email": "jeevan.900929@gmail.com" + }, + "record": { + "CNAME":"jeevan900929.github.io", + "URL": "https://jeevan.is-a.dev" + } +} \ No newline at end of file diff --git a/domains/kirann.json b/domains/kirann.json new file mode 100644 index 000000000..7fd93f279 --- /dev/null +++ b/domains/kirann.json @@ -0,0 +1,11 @@ +{ + "description": "Kiran's personal developer website", + "repo": "https://github.com/sudopower", + "owner": { + "username": "sudopower", + "email": "nkirandroid@gmail.com" + }, + "record": { + "URL": "http://sudopower.com" + } +} diff --git a/domains/ksvkabra.json b/domains/ksvkabra.json new file mode 100644 index 000000000..f45f93bd9 --- /dev/null +++ b/domains/ksvkabra.json @@ -0,0 +1,11 @@ +{ + "description": "Keshav Kabra's website", + "owner": { + "username": "ksvkabra", + "email": "ksvkabra@gmail.com" + }, + "record": { + "CNAME": "ksvkabra.github.io", + "URL": "https://ksvkabra.is-a.dev" + } +} diff --git a/domains/lnfnunes.json b/domains/lnfnunes.json new file mode 100644 index 000000000..063c01ba1 --- /dev/null +++ b/domains/lnfnunes.json @@ -0,0 +1,11 @@ +{ + "description": "Little Big Nunes", + "repo": "https://github.com/lnfnunes", + "owner": { + "username": "lnfnunes", + "email": "dr1design@gmail.com" + }, + "record": { + "URL": "https://lnfnunes.com.br" + } +} diff --git a/domains/lok.json b/domains/lok.json new file mode 100644 index 000000000..750f9104e --- /dev/null +++ b/domains/lok.json @@ -0,0 +1,12 @@ +{ + "description": "Lok's portfolio website", + "repo": "https://github.com/lokgubhaju/lokgubhaju.github.io", + "owner": { + "username": "lokgubhaju", + "email": "lok.gubhaju@gmail.com" + }, + "record": { + "CNAME": "lokgubhaju.github.io", + "URL": "https://lok.is-a.dev" + } +} diff --git a/domains/mk.json b/domains/mk.json new file mode 100644 index 000000000..cc0b5df23 --- /dev/null +++ b/domains/mk.json @@ -0,0 +1,11 @@ +{ + "description": "mklabs' website", + "repo": "https://github.com/mklabs/mklabs.github.com", + "owner": { + "username": "mklabs", + "email": "daniel.mickael@gmail.com" + }, + "record": { + "CNAME": "mklabs.github.io" + } +} diff --git a/domains/muchenski.json b/domains/muchenski.json new file mode 100644 index 000000000..95b5bff19 --- /dev/null +++ b/domains/muchenski.json @@ -0,0 +1,12 @@ +{ + "description": "Muchenski's personal developer website", + "repo": "https://github.com/HenriqueMuchenski/henriquemuchenski.github.io", + "owner": { + "username": "HenriqueMuchenski", + "email": "hjmuchenski@gmail.com" + }, + "record": { + "CNAME": "henriquemuchenski.github.io", + "URL": "https://muchenski.is-a.dev" + } +} diff --git a/domains/muzammil.json b/domains/muzammil.json new file mode 100644 index 000000000..7226d4245 --- /dev/null +++ b/domains/muzammil.json @@ -0,0 +1,11 @@ +{ + "description": "Muzammil's Portfolio Website", + "owner": { + "username": "taqnar", + "email": "muzammilthottathil.official@gmail.com" + }, + "record": { + "CNAME": "taqnar.github.io", + "URL": "https://muzammil.is-a.dev" + } +} diff --git a/domains/mverhees.json b/domains/mverhees.json deleted file mode 100644 index 19b6d3678..000000000 --- a/domains/mverhees.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "description": "Mike's website", - "repo": "https://github.com/MikeVerhees/MikeVerhees.github.io", - "owner": { - "username": "MikeVerhees", - "email": "mikeverhees95@gmail.com" - }, - "record": { - "CNAME": "MikeVerhees.github.io", - "URL": "https://mverhees.is-a.dev" - } -} diff --git a/domains/rapixar.json b/domains/rapixar.json new file mode 100644 index 000000000..d7d949262 --- /dev/null +++ b/domains/rapixar.json @@ -0,0 +1,13 @@ + +{ + "description": "The awesome portfolio site for Chinenye Raphael", + "repo": "https://github.com/rapixar/rapixar.github.io", + "owner": { + "username": "Rapixar", + "email": "cudraphael@gmail.com" + }, + "record": { + "CNAME": "rapixar.github.io", + "URL": "https://rapixar.is-a.dev" + } + } diff --git a/domains/reuben.json b/domains/reuben.json new file mode 100644 index 000000000..936d6c44e --- /dev/null +++ b/domains/reuben.json @@ -0,0 +1,13 @@ + +{ + "description": "Personal Page", + "repo": "https://github.com/reuben-x/reuben-x.github.io", + "owner": { + "username": "reuben-x", + "email": "reubenthomaspeter@gmail.com" + }, + "record": { + "CNAME": "reuben-x.github.io", + "URL": "https://reuben.is-a.dev" + } +} diff --git a/domains/sachin.json b/domains/sachin.json new file mode 100644 index 000000000..032e8bbbf --- /dev/null +++ b/domains/sachin.json @@ -0,0 +1,12 @@ +{ + "description": "Sachin's portfolio", + "repo": "https://github.com/sachin-in1", + "owner": { + "username": "sachin-in1", + "email": "sachin.here01@gmail.com" + }, + "record": { + "CNAME": "sachin-in1.github.io", + "URL": "https://sachin.is-a.dev" + } +} diff --git a/domains/sandeepv.json b/domains/sandeepv.json index be12d1570..80dbd6c77 100644 --- a/domains/sandeepv.json +++ b/domains/sandeepv.json @@ -5,7 +5,7 @@ "email": "sandeepv68@gmail.com" }, "record": { - "CNAME": "sandeepv.in", + "CNAME": "sandeepvattapparambil.github.io", "URL": "https://sandeepv.is-a.dev" } } diff --git a/domains/shambhavi.json b/domains/shambhavi.json new file mode 100644 index 000000000..d55b56f53 --- /dev/null +++ b/domains/shambhavi.json @@ -0,0 +1,11 @@ +{ + "description": "Shambhavi's Web-Dev Home", + "repo": "https://github.com/ShambhaviCodes/ShambhaviCodes.github.io", + "owner": { + "username": "ShambhaviCodes", + "email": "shambhavimishra26@gmail.com" + }, + "record": { + "CNAME": "shambhavicodes.github.io" + } +} diff --git a/domains/sumedhaa.json b/domains/sumedhaa.json new file mode 100644 index 000000000..c05a0796b --- /dev/null +++ b/domains/sumedhaa.json @@ -0,0 +1,12 @@ +{ + "description": "Sumedhaa's Portfolio", + "repo": "https://github.com/misticorion/misticorion.github.io", + "owner": { + "username": "misticorion", + "email": "mistic.orion@gmail.com" + }, + "record": { + "CNAME": "misticorion.github.io", + "URL": "https://sumedhaa.is-a.dev" + } +} diff --git a/domains/thesct22.json b/domains/thesct22.json new file mode 100644 index 000000000..d431e0139 --- /dev/null +++ b/domains/thesct22.json @@ -0,0 +1,12 @@ +{ + "description": "Social media website project", + "repo": "https://github.com/thesct22", + "owner": { + "username": "thesct22", + "email": "sharathct22@gmail.com" + }, + "record": { + "CNAME": "34.67.228.107.xip.io", + "URL": "http://thesct.is-a.dev" + } +} diff --git a/tests/domain-utils.test.js b/tests/domain-utils.test.js index 8dfbbacb8..ad231b281 100644 --- a/tests/domain-utils.test.js +++ b/tests/domain-utils.test.js @@ -31,9 +31,13 @@ describe('validateDomainData', () => { })), { ...defaultDomain, record: { CNAME: 'sd', A: ['121,3213'] } }, { ...defaultDomain, record: { A: ['121', '12'], FOOBAR: ['sd'] } }, + { ...defaultDomain, record: { A: [] } }, + { ...defaultDomain, record: { A: ['11122'], URL: 'foobar' } }, { ...defaultDomain, owner: {}, }, { ...defaultDomain, owner: { username: 'hwelo', }, }, { ...defaultDomain, owner: { email: 'hwelo' }, }, + { ...defaultDomain, record: { CNAME: 'http://foobar.com' } }, + { ...defaultDomain, record: { CNAME: 'https://foobar.com' } }, ]; const validCases = [ diff --git a/utils/domain.js b/utils/domain.js index f7819f02a..452aab658 100644 --- a/utils/domain.js +++ b/utils/domain.js @@ -17,6 +17,7 @@ const getDomains = () => }))); const between = (min, max) => num => num >= min && num <= max; +const testRegex = regex => str => !!(str && str.match(regex)); const validate = pattern => data => R.compose( invalidPairs => invalidPairs.length ? { errors: invalidPairs, valid: false } : { errors: [], valid: true }, @@ -24,9 +25,15 @@ const validate = pattern => data => R.compose( R.toPairs, )(pattern); -const validateNameRecord = type => R.allPass([ +const validateCnameRecord = key => R.allPass([ + R.propSatisfies(R.is(String), key), R.compose(R.equals(1), R.length, R.reject(R.equals('URL')), R.keys), - R.propSatisfies(R.is(String), type), + R.propSatisfies(R.complement(testRegex(/^https?:\/\//ig)), key), +]); + +const validateARecord = key => R.allPass([ + R.compose(R.equals(1), R.length, R.keys), + R.propSatisfies(R.compose(R.gte(R.__, 1), R.length), key), ]); const validateDomainData = validate({ @@ -36,7 +43,7 @@ const validateDomainData = validate({ R.equals('@'), R.allPass([ R.compose(between(2, 100), R.length), - str => str && str.match(/^[a-z0-9\-]+$/ig), + testRegex(/^[a-z0-9\-]+$/g), ]) ]), }, @@ -54,13 +61,13 @@ const validateDomainData = validate({ ]), }, record: { - reason: 'Invalid record', + reason: 'Invalid record. CNAME records have to be a host name and A records has to be a list of ips', fn: R.allPass([ R.is(Object), R.compose(R.isEmpty, R.flip(R.difference)(VALID_RECORD_TYPES), R.keys), R.cond([ - [R.prop('CNAME'), validateNameRecord('CNAME')], - [R.prop('A'), R.propSatisfies(R.is(Array), 'A')], + [R.prop('CNAME'), validateCnameRecord('CNAME')], + [R.prop('A'), validateARecord('A')], [R.prop('URL'), R.propSatisfies(R.is(String), 'URL')], [R.T, R.T], ]),