From 64c055007d4155bb03743206501da05d764142d6 Mon Sep 17 00:00:00 2001 From: William Harrison <87287585+wdhdev@users.noreply.github.com> Date: Thu, 17 Apr 2025 10:38:02 +0800 Subject: [PATCH] `excepted.json` -> `excluded.json` --- tests/json.test.js | 4 ++-- util/{excepted.json => excluded.json} | 0 2 files changed, 2 insertions(+), 2 deletions(-) rename util/{excepted.json => excluded.json} (100%) diff --git a/tests/json.test.js b/tests/json.test.js index 4da5b896f..123902a73 100644 --- a/tests/json.test.js +++ b/tests/json.test.js @@ -30,7 +30,7 @@ const optionalRedirectConfigFields = { const emailRegex = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/; const hostnameRegex = /^(?=.{1,253}$)(?:(?:[_a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)\.)+[a-zA-Z]{2,63}$/; -const exceptedDomains = require("../util/excepted.json"); +const excludedDomains = require("../util/excluded.json"); const reservedDomains = require("../util/reserved.json"); const domainsPath = path.resolve("domains"); const files = fs.readdirSync(domainsPath); @@ -113,7 +113,7 @@ async function validateFileName(t, file) { const rootSubdomain = subdomain.split(".").pop(); - if (!exceptedDomains.includes(rootSubdomain)) { + if (!excludedDomains.includes(rootSubdomain)) { t.false(rootSubdomain.startsWith("_"), `${file}: Root subdomains should not start with an underscore`); } } diff --git a/util/excepted.json b/util/excluded.json similarity index 100% rename from util/excepted.json rename to util/excluded.json