From 4e04f769f2c7b7f95bf50a75aa382abdbd9c7cd4 Mon Sep 17 00:00:00 2001 From: William Harrison <87287585+wdhdev@users.noreply.github.com> Date: Fri, 10 Jan 2025 20:43:05 +0800 Subject: [PATCH] feat(ci): subdomains on the root no underscores --- domains/_github-pages-challenge-0v90.json | 9 --------- domains/_github-pages-challenge-abiapp789.json | 9 --------- domains/_github-pages-challenge-akk1to.json | 12 ------------ domains/_github-pages-challenge-akzana.json | 8 -------- .../_github-pages-challenge-fluffythebunny.json | 9 --------- domains/_github-pages-challenge-rouf0x.json | 9 --------- domains/_psl.json | 2 +- tests/domains.test.js | 14 ++++++++++++++ util/excepted-domains.json | 6 ++++++ 9 files changed, 21 insertions(+), 57 deletions(-) delete mode 100644 domains/_github-pages-challenge-0v90.json delete mode 100644 domains/_github-pages-challenge-abiapp789.json delete mode 100644 domains/_github-pages-challenge-akk1to.json delete mode 100644 domains/_github-pages-challenge-akzana.json delete mode 100644 domains/_github-pages-challenge-fluffythebunny.json delete mode 100644 domains/_github-pages-challenge-rouf0x.json create mode 100644 util/excepted-domains.json diff --git a/domains/_github-pages-challenge-0v90.json b/domains/_github-pages-challenge-0v90.json deleted file mode 100644 index ca64ecee6..000000000 --- a/domains/_github-pages-challenge-0v90.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "owner": { - "username": "0v90", - "discord": "651519394673065989" - }, - "record": { - "TXT": "9e58408bb4a7267e5a81669f75cfb3" - } -} diff --git a/domains/_github-pages-challenge-abiapp789.json b/domains/_github-pages-challenge-abiapp789.json deleted file mode 100644 index 5726a4a9a..000000000 --- a/domains/_github-pages-challenge-abiapp789.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "owner": { - "username": "abiapp789", - "email": "abiapp2024@gmail.com" - }, - "record": { - "TXT": "5bcd2d69c4cca15abd91d504a5b72a" - } -} diff --git a/domains/_github-pages-challenge-akk1to.json b/domains/_github-pages-challenge-akk1to.json deleted file mode 100644 index ccde44cd8..000000000 --- a/domains/_github-pages-challenge-akk1to.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "description": "This website is my personal portfollo XD (let it on rq)", - "repo": "https://github.com/akk1to/akk1to.github.io", - "owner": { - "username": "akk1to", - "email": "akk1to.dev@gmail.com", - "discord": "727497287777124414" - }, - "record": { - "TXT": ["b7205350c0f56235a5eebee2fd1993"] - } -} diff --git a/domains/_github-pages-challenge-akzana.json b/domains/_github-pages-challenge-akzana.json deleted file mode 100644 index 899eddad0..000000000 --- a/domains/_github-pages-challenge-akzana.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "owner": { - "username": "akzana" - }, - "record": { - "TXT": ["a9e7df1f4744431d00299a1ca92510"] - } -} diff --git a/domains/_github-pages-challenge-fluffythebunny.json b/domains/_github-pages-challenge-fluffythebunny.json deleted file mode 100644 index 3b3919f04..000000000 --- a/domains/_github-pages-challenge-fluffythebunny.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "owner": { - "username": "Fluffythebunny", - "email": "puglsytt@gmail.com" - }, - "record": { - "TXT": "beb68ebc988463b8b1753c41c14f9e" - } -} diff --git a/domains/_github-pages-challenge-rouf0x.json b/domains/_github-pages-challenge-rouf0x.json deleted file mode 100644 index 16c8283a8..000000000 --- a/domains/_github-pages-challenge-rouf0x.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "owner": { - "username": "Rouf0x", - "email": "Gabrielruf.fr@gmail.com" - }, - "record": { - "TXT": "f01cd0a4cbac68efe6b87568776ad9" - } -} diff --git a/domains/_psl.json b/domains/_psl.json index 80ac8a2f0..9ddffa978 100644 --- a/domains/_psl.json +++ b/domains/_psl.json @@ -4,6 +4,6 @@ "email": "admin@is-a.dev" }, "record": { - "TXT": ["https://github.com/publicsuffix/list/pull/2225"] + "TXT": "https://github.com/publicsuffix/list/pull/2225" } } diff --git a/tests/domains.test.js b/tests/domains.test.js index 4c4dc25d6..f43b05254 100644 --- a/tests/domains.test.js +++ b/tests/domains.test.js @@ -127,3 +127,17 @@ t("Reserved domains file should be valid", (t) => { t.pass(); }); + +const exceptedDomains = require("../util/excepted-domains.json"); + +t("Subdomains on the root should not start with an underscore", (t) => { + for (const file of files) { + const subdomain = file.replace(/\.json$/, ""); + + if (subdomain.split(".").length === 1 && !exceptedDomains.includes(subdomain)) { + t.true(subdomain[0] !== "_", `${file}: Root subdomains should not start with an underscore`); + } + } + + t.pass(); +}) diff --git a/util/excepted-domains.json b/util/excepted-domains.json new file mode 100644 index 000000000..9f7268d2e --- /dev/null +++ b/util/excepted-domains.json @@ -0,0 +1,6 @@ +[ + "_discord", + "_psl", + "_gh-is-a-dev-o", + "_github-pages-challenge-is-a-dev" +]