From 8aeb7e8096317a2af966373285799471562e59ce Mon Sep 17 00:00:00 2001 From: anupamroy8 Date: Fri, 9 Oct 2020 18:37:50 +0530 Subject: [PATCH 01/32] anupam.json added to domains folder --- domains/anupam.json | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 domains/anupam.json diff --git a/domains/anupam.json b/domains/anupam.json new file mode 100644 index 000000000..1f98eaa8c --- /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/portfolio/", + "URL": "https://anupam.is-a.dev" + } +} From 8baf34fdfde7e3167d36b3b27589c01b40655a2e Mon Sep 17 00:00:00 2001 From: Anurag Singh Date: Fri, 9 Oct 2020 23:28:40 +0530 Subject: [PATCH 02/32] Create ashleymavericks.json --- domains/ashleymavericks.json | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 domains/ashleymavericks.json 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" + } +} From cb4698e400ae068917c7ce5ce2ee465da50fba18 Mon Sep 17 00:00:00 2001 From: Anwar Hussain Date: Sun, 11 Oct 2020 15:59:27 +0300 Subject: [PATCH 03/32] Create anwar.json --- domains/anwar.json | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 domains/anwar.json 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" + } +} From ae8987b4b90af9723e4d165afaff90379ff71c5f Mon Sep 17 00:00:00 2001 From: aswinskumar67 Date: Sun, 11 Oct 2020 22:09:56 +0530 Subject: [PATCH 04/32] Aswin's dev Porfoilio , aswin.json --- domains/aswin.json | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 domains/aswin.json 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 From 80bb86761fa5cc5e4fc2e950a9c44d0c5a3cdd2a Mon Sep 17 00:00:00 2001 From: Muchenski <46984788+HenriqueMuchenski@users.noreply.github.com> Date: Sun, 11 Oct 2020 13:58:49 -0300 Subject: [PATCH 05/32] Create muchenski.json --- domains/muchenski.json | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 domains/muchenski.json 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" + } +} From b609aa95951b3d1e01991e95e93c73a2c88b6151 Mon Sep 17 00:00:00 2001 From: Aaraamasree Sreekumar <54882705+aaraam@users.noreply.github.com> Date: Sun, 11 Oct 2020 22:31:57 +0530 Subject: [PATCH 06/32] Create aaraam.json --- domains/aaraam.json | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 domains/aaraam.json 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" + } +} From ff7e029237e657ce4849f5658131d1323e20ca4c Mon Sep 17 00:00:00 2001 From: hemanth Date: Sun, 11 Oct 2020 22:33:35 +0530 Subject: [PATCH 07/32] Added hemanth.json --- domains/hemanth.json | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 domains/hemanth.json 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 From 5b38e7d902b5a76d8f4d31cbd4172c19d828dbc4 Mon Sep 17 00:00:00 2001 From: Sumedhaa Date: Sun, 11 Oct 2020 23:01:42 +0530 Subject: [PATCH 08/32] Create sumedhaa.json --- domains/sumedhaa.json | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 domains/sumedhaa.json 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" + } +} From 7549a3e2f877995534cdc2a47d8686dfbb2d6cbd Mon Sep 17 00:00:00 2001 From: Lok Gubhaju Date: Sun, 11 Oct 2020 23:50:24 +0200 Subject: [PATCH 09/32] Create lok.json --- domains/lok.json | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 domains/lok.json 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" + } +} From 25155ec52789943134006a3350096e40cf5271d6 Mon Sep 17 00:00:00 2001 From: Mickael Daniel Date: Sun, 11 Oct 2020 23:56:29 +0200 Subject: [PATCH 10/32] Create mk.json --- domains/mk.json | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 domains/mk.json 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" + } +} From b4b504b386398eb94f38e46955e50f06971c80dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?ANIL=20=C5=9EAH=C4=B0N?= Date: Mon, 12 Oct 2020 12:57:04 +0300 Subject: [PATCH 11/32] Create anil.json --- domains/anlshn.json | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 domains/anlshn.json diff --git a/domains/anlshn.json b/domains/anlshn.json new file mode 100644 index 000000000..de011c57c --- /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://anil.is-a.dev" + } +} \ No newline at end of file From 38b5b5c16bee13703622425c9fe228e68e251c62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?ANIL=20=C5=9EAH=C4=B0N?= Date: Mon, 12 Oct 2020 12:57:54 +0300 Subject: [PATCH 12/32] Create anil.json --- domains/anlshn.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/domains/anlshn.json b/domains/anlshn.json index de011c57c..59668eb06 100644 --- a/domains/anlshn.json +++ b/domains/anlshn.json @@ -9,4 +9,4 @@ "CNAME": "anlshn.com", "URL": "https://anil.is-a.dev" } -} \ No newline at end of file +} From 5be92b3d1e9d5fdb476d9cccb50ab82b8579050c Mon Sep 17 00:00:00 2001 From: Daria Trainor Date: Mon, 12 Oct 2020 22:48:36 +1100 Subject: [PATCH 13/32] Create daria.json (#1) --- domains/daria.json | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 domains/daria.json 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" + } +} From a25e825ac08251a48414989c08f4dce78550a4d8 Mon Sep 17 00:00:00 2001 From: "frankie.tech" <26461046+frankie-tech@users.noreply.github.com> Date: Mon, 12 Oct 2020 09:06:20 -0400 Subject: [PATCH 14/32] Create frankie.json --- domains/frankie.json | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 domains/frankie.json diff --git a/domains/frankie.json b/domains/frankie.json new file mode 100644 index 000000000..146dfc7a4 --- /dev/null +++ b/domains/frankie.json @@ -0,0 +1,11 @@ +{ + "description": "Now that's a spicy 404 page!", + "repo": "https://github.com/github-username/", + "owner": { + "username": "github-username", + "email": "any@email" + }, + "record": { + "CNAME": "github-username.github.io" + } +} From 9672380bcd2b985e36ca9a14d511e5dd5f31cc7d Mon Sep 17 00:00:00 2001 From: "frankie.tech" <26461046+frankie-tech@users.noreply.github.com> Date: Mon, 12 Oct 2020 09:16:15 -0400 Subject: [PATCH 15/32] Update frankie.json --- domains/frankie.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/domains/frankie.json b/domains/frankie.json index 146dfc7a4..446b7420b 100644 --- a/domains/frankie.json +++ b/domains/frankie.json @@ -1,11 +1,11 @@ { "description": "Now that's a spicy 404 page!", - "repo": "https://github.com/github-username/", + "repo": "https://github.com/frankie-tech/frankie-tech.github.io", "owner": { - "username": "github-username", - "email": "any@email" + "username": "frankie-tech", + "email": "26461046+frankie-tech@users.noreply.github.com" }, "record": { - "CNAME": "github-username.github.io" + "CNAME": "frankie-tech.github.io" } } From 20b0f19e85aa7afa7695e57269e981cdf6d6d67e Mon Sep 17 00:00:00 2001 From: Sharath Cherian Thomas Date: Mon, 12 Oct 2020 18:59:12 +0530 Subject: [PATCH 16/32] Create thesct22.json --- domains/thesct22.json | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 domains/thesct22.json diff --git a/domains/thesct22.json b/domains/thesct22.json new file mode 100644 index 000000000..b4eb81fde --- /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://sharath.is-a.dev" + } +} From 4693099df8758d10b5ff7cc166038eacb0e55692 Mon Sep 17 00:00:00 2001 From: Shambhavi Mishra <42893001+ShambhaviCodes@users.noreply.github.com> Date: Mon, 12 Oct 2020 20:20:44 +0530 Subject: [PATCH 17/32] Create shambhavi.json --- domains/shambhavi.json | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 domains/shambhavi.json 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" + } +} From c2d55c1115b976f458c31f6c59ab0a8b5d129743 Mon Sep 17 00:00:00 2001 From: Kiran Nambiar <14028003+sudopower@users.noreply.github.com> Date: Mon, 12 Oct 2020 20:28:44 +0530 Subject: [PATCH 18/32] Create kirann.json --- domains/kirann.json | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 domains/kirann.json 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" + } +} From 2c8dc0656b90fa880cb7c3ff1920279d7d22dfa3 Mon Sep 17 00:00:00 2001 From: allsyed Date: Mon, 12 Oct 2020 16:50:20 +0000 Subject: [PATCH 19/32] Create allsyed.json --- domains/allsyed.json | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 domains/allsyed.json diff --git a/domains/allsyed.json b/domains/allsyed.json new file mode 100644 index 000000000..e6d1c9981 --- /dev/null +++ b/domains/allsyed.json @@ -0,0 +1,12 @@ +{ + "description": "Allsyed's personal website", + "repo": "https://github.com/allsyed", + "owner": { + "username": "allsyed", + "email": "allsyed@pm.me" + }, + "record": { + "CNAME": "allsyed.com", + "URL": "https://allsyed.is-a.dev" + } +} From a9399f24f3a946ff3d72678d642b29a32e54cc95 Mon Sep 17 00:00:00 2001 From: Forsas <53380023+forsas@users.noreply.github.com> Date: Mon, 12 Oct 2020 22:08:38 +0300 Subject: [PATCH 20/32] Add forsas --- domains/forsas.json | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 domains/forsas.json 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" + } +} From 52970ca78dc49f160de6f8f6e667b8b2fdc6dda4 Mon Sep 17 00:00:00 2001 From: Leandro Nunes Date: Mon, 12 Oct 2020 16:30:55 -0300 Subject: [PATCH 21/32] Add lnfnunes domain --- domains/lnfnunes.json | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 domains/lnfnunes.json 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" + } +} From b60836b9f581863a0376e452b02ec40da37bcc5c Mon Sep 17 00:00:00 2001 From: dotiful Date: Tue, 13 Oct 2020 03:01:37 +0300 Subject: [PATCH 22/32] Create art.json --- domains/art.json | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 domains/art.json diff --git a/domains/art.json b/domains/art.json new file mode 100644 index 000000000..101fcb894 --- /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" + } +} From a08e0676cd97c1b29589583a63895a77045e3cf6 Mon Sep 17 00:00:00 2001 From: Dots Util Date: Tue, 13 Oct 2020 03:07:55 +0300 Subject: [PATCH 23/32] Update art.json fix typo --- domains/art.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/domains/art.json b/domains/art.json index 101fcb894..fbfcc4a11 100644 --- a/domains/art.json +++ b/domains/art.json @@ -3,7 +3,7 @@ "repo": "https://github.com/dotiful", "owner": { "username": "dotiful", - "email": "dots.util@gmail.com", + "email": "dots.util@gmail.com" }, "record": { "CNAME": "dotiful.github.io" From 5dcb7cfcfce84232bcb425b74e862144b17612d2 Mon Sep 17 00:00:00 2001 From: Sharath Cherian Thomas Date: Tue, 13 Oct 2020 08:41:59 +0530 Subject: [PATCH 24/32] Update thesct22.json --- domains/thesct22.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/domains/thesct22.json b/domains/thesct22.json index b4eb81fde..d431e0139 100644 --- a/domains/thesct22.json +++ b/domains/thesct22.json @@ -7,6 +7,6 @@ }, "record": { "CNAME": "34.67.228.107.xip.io", - "URL": "http://sharath.is-a.dev" + "URL": "http://thesct.is-a.dev" } } From b1d58a631e49f0fdc0e5039c3464859cb725e910 Mon Sep 17 00:00:00 2001 From: reuben-x <44024454+reuben-x@users.noreply.github.com> Date: Tue, 13 Oct 2020 09:49:19 +0530 Subject: [PATCH 25/32] Create reuben.json --- domains/reuben.json | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 domains/reuben.json 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" + } +} From 1d4d877f2e2633a9691f4d99b471cea1b86f923e Mon Sep 17 00:00:00 2001 From: Athira L I Date: Tue, 13 Oct 2020 12:59:59 +0530 Subject: [PATCH 26/32] Create athira-li.json --- domains/athira-li.json | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 domains/athira-li.json 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" + } +} From 408b542ae741faacfe35bfec27a309d8327c0dec Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Wed, 14 Oct 2020 18:38:17 +0530 Subject: [PATCH 27/32] Adds cname record validation --- tests/domain-utils.test.js | 2 ++ utils/domain.js | 12 +++++++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/tests/domain-utils.test.js b/tests/domain-utils.test.js index 8dfbbacb8..d3a1357f0 100644 --- a/tests/domain-utils.test.js +++ b/tests/domain-utils.test.js @@ -34,6 +34,8 @@ describe('validateDomainData', () => { { ...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..e56c59fab 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,10 @@ const validate = pattern => data => R.compose( R.toPairs, )(pattern); -const validateNameRecord = type => R.allPass([ - R.compose(R.equals(1), R.length, R.reject(R.equals('URL')), R.keys), +const validateCnameRecord = type => R.allPass([ R.propSatisfies(R.is(String), type), + R.compose(R.equals(1), R.length, R.reject(R.equals('URL')), R.keys), + R.propSatisfies(R.complement(testRegex(/^https?:\/\//ig)), type), ]); const validateDomainData = validate({ @@ -36,7 +38,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,12 +56,12 @@ 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('CNAME'), validateCnameRecord('CNAME')], [R.prop('A'), R.propSatisfies(R.is(Array), 'A')], [R.prop('URL'), R.propSatisfies(R.is(String), 'URL')], [R.T, R.T], From c242535a511231ea954c07a9d9a201ba6f518b8c Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Wed, 14 Oct 2020 18:43:27 +0530 Subject: [PATCH 28/32] improves a record validation --- tests/domain-utils.test.js | 2 ++ utils/domain.js | 13 +++++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/tests/domain-utils.test.js b/tests/domain-utils.test.js index d3a1357f0..ad231b281 100644 --- a/tests/domain-utils.test.js +++ b/tests/domain-utils.test.js @@ -31,6 +31,8 @@ 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' }, }, diff --git a/utils/domain.js b/utils/domain.js index e56c59fab..452aab658 100644 --- a/utils/domain.js +++ b/utils/domain.js @@ -25,10 +25,15 @@ const validate = pattern => data => R.compose( R.toPairs, )(pattern); -const validateCnameRecord = type => R.allPass([ - R.propSatisfies(R.is(String), type), +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.complement(testRegex(/^https?:\/\//ig)), 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({ @@ -62,7 +67,7 @@ const validateDomainData = validate({ R.compose(R.isEmpty, R.flip(R.difference)(VALID_RECORD_TYPES), R.keys), R.cond([ [R.prop('CNAME'), validateCnameRecord('CNAME')], - [R.prop('A'), R.propSatisfies(R.is(Array), 'A')], + [R.prop('A'), validateARecord('A')], [R.prop('URL'), R.propSatisfies(R.is(String), 'URL')], [R.T, R.T], ]), From 382bd3a05fd772bcbb3fecf489411e8a85cc08b5 Mon Sep 17 00:00:00 2001 From: Anupam Roy Date: Wed, 14 Oct 2020 21:12:23 +0530 Subject: [PATCH 29/32] Update domains/anupam.json Co-authored-by: Akshay Nair --- domains/anupam.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/domains/anupam.json b/domains/anupam.json index 1f98eaa8c..20d42352f 100644 --- a/domains/anupam.json +++ b/domains/anupam.json @@ -6,7 +6,7 @@ "email": "anupamroy8@gmail.com" }, "record": { - "CNAME": "anupamroy8.github.io/portfolio/", + "CNAME": "anupamroy8.github.io", "URL": "https://anupam.is-a.dev" } } From d8c7b454a5a1f1d45664d69ce2248f36a725c550 Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Thu, 15 Oct 2020 00:23:52 +0530 Subject: [PATCH 30/32] Update domains/anlshn.json --- domains/anlshn.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/domains/anlshn.json b/domains/anlshn.json index 59668eb06..58b12cac2 100644 --- a/domains/anlshn.json +++ b/domains/anlshn.json @@ -7,6 +7,6 @@ }, "record": { "CNAME": "anlshn.com", - "URL": "https://anil.is-a.dev" + "URL": "https://anlshn.is-a.dev" } } From 0c2dfae128c9033c592e90a1de467019b3b22e0a Mon Sep 17 00:00:00 2001 From: "frankie.tech" <26461046+frankie-tech@users.noreply.github.com> Date: Wed, 14 Oct 2020 14:59:12 -0400 Subject: [PATCH 31/32] Removes email, adds twitter handle --- domains/frankie.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/domains/frankie.json b/domains/frankie.json index 446b7420b..bbba813a8 100644 --- a/domains/frankie.json +++ b/domains/frankie.json @@ -3,7 +3,8 @@ "repo": "https://github.com/frankie-tech/frankie-tech.github.io", "owner": { "username": "frankie-tech", - "email": "26461046+frankie-tech@users.noreply.github.com" + "email": "", + "twitter":"this_frankie" }, "record": { "CNAME": "frankie-tech.github.io" From 775dc7c1fa3599de6d02840461846332ab576a36 Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Thu, 15 Oct 2020 00:31:11 +0530 Subject: [PATCH 32/32] Update domains/allsyed.json --- domains/allsyed.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/domains/allsyed.json b/domains/allsyed.json index e6d1c9981..f12be2194 100644 --- a/domains/allsyed.json +++ b/domains/allsyed.json @@ -6,7 +6,6 @@ "email": "allsyed@pm.me" }, "record": { - "CNAME": "allsyed.com", - "URL": "https://allsyed.is-a.dev" + "CNAME": "allsyed.com" } }