Merge branch 'main' into main

This commit is contained in:
DIBSTER authored and GitHub committed 2025-04-13 20:41:36 -04:00
commit b19cae55f8
3 files changed
+41 -1

No files matched your search

+1 -1
View File
@@ -13,7 +13,7 @@ on:
workflow_dispatch:
concurrency:
group: ${{ github.ref }}-validation
group: pr-${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs:
+16
View File
@@ -0,0 +1,16 @@
{
"description": "gateway for site",
"domain": "localplayer.dev",
"subdomain": "lovely",
"owner": {
"repo": "https://github.com/Gj4meZ/rsr",
"email": "chilliatogj4mez@gmail.com"
},
"record": {
"A": ["87.106.232.208"]
},
"proxied": true
}
+24
View File
@@ -80,6 +80,30 @@ t("All files should have the required fields", (t) => {
});
});
t("All filenames, subdomains, and domains must be lowercase", (t) => {
const files = fs.readdirSync(domainsPath).filter(file => {
const filePath = path.join(domainsPath, file);
return file.endsWith(".json") && fs.lstatSync(filePath).isFile();
});
files.forEach(file => {
const filePath = path.join(domainsPath, file);
const data = fs.readJsonSync(filePath);
// Check filename is lowercase
t.is(file, file.toLowerCase(), `${file}: Filename must be lowercase`);
const { subdomain, domain } = data;
// Check JSON values are lowercase
t.truthy(subdomain, `${file}: Missing subdomain field`);
t.truthy(domain, `${file}: Missing domain field`);
t.is(subdomain, subdomain.toLowerCase(), `${file}: Subdomain must be lowercase`);
t.is(domain, domain.toLowerCase(), `${file}: Domain must be lowercase`);
});
});
t("All files should have valid optional owner fields", (t) => {
const files = fs.readdirSync(domainsPath).filter(file => {
const filePath = path.join(domainsPath, file);