chore: more improvements

This commit is contained in:
DIBSTER committed 2025-04-13 18:54:46 +00:00
1 parent 57042a37f9
commit 462f97c197
29 files changed
+105 -30

No files matched your search

@@ -1,7 +1,7 @@
{
"description": "ZGalera Inc.",
"domain": "is-local.org",
"subdomain": "_gh-ZGalera-o.zgalera",
"subdomain": "_gh-zgalera-o.zgalera",
"owner": {
"repo": "https://github.com/zgalera/zgalera-website",
"email": "81070564+okineadev@users.noreply.github.com"
@@ -2,7 +2,7 @@
"schema": "../schemas/domain.schema.json",
"description": "GitHub Pages Verification",
"domain": "is-cool.dev",
"subdomain": "_github-pages-challenge-ArabianCoconut.arabiancoconut",
"subdomain": "_github-pages-challenge-arabiancoconut.arabiancoconut",
"owner": {
"email": "p11h0ifd@duck.com"
},
@@ -1,6 +1,6 @@
{
"domain": "is-local.org",
"subdomain": "_github-pages-challenge-ArbotixCodez",
"subdomain": "_github-pages-challenge-arbotixcodez",
"owner": {
"email": "jariwalaharshal80@gmail.com"
},
@@ -1,6 +1,6 @@
{
"domain": "is-local.org",
"subdomain": "_github-pages-challenge-AtlasL1.htc",
"subdomain": "_github-pages-challenge-atlasl1.htc",
"owner": {
"repo": "https://github.com/hacktcat/hacktcat.github.io",
"email": "loxingle1@gmail.com"
@@ -1,6 +1,6 @@
{
"domain": "is-local.org",
"subdomain": "_github-pages-challenge-AtlasL1.imag",
"subdomain": "_github-pages-challenge-atlasl1.imag",
"owner": {
"repo": "https://github.com/AtlasL1/IMAG",
"email": "loxingle1@gmail.com"
@@ -1,6 +1,6 @@
{
"domain": "is-not-a.dev",
"subdomain": "_github-pages-challenge-AtlasL1.shrimp",
"subdomain": "_github-pages-challenge-atlasl1.shrimp",
"owner": {
"repo": "https://github.com/AtlasL1/",
"email": "vtlvs.0@gmail.com"
@@ -1,7 +1,7 @@
{
"description": "Github Verification",
"domain": "is-local.org",
"subdomain": "_github-pages-challenge-CrownCoins.crowncoins",
"subdomain": "_github-pages-challenge-crowncoins.crowncoins",
"owner": {
"repo": "https://github.com/CrownCoins/CrownCoins.github.io",
"email": "citizen.caption020@passfwd.com"
@@ -1,7 +1,7 @@
{
"description": "github verification",
"domain": "is-local.org",
"subdomain": "_github-pages-challenge-CsAjayS.vp",
"subdomain": "_github-pages-challenge-csajays.vp",
"owner": {
"repo": "https://github.com/csajays/csajays.github.io",
"email": "ajays.dev.contact@gmail.com"
@@ -1,7 +1,7 @@
{
"description": "github verification",
"domain": "is-cool.dev",
"subdomain": "_github-pages-challenge-Davidaprilio.david",
"subdomain": "_github-pages-challenge-davidaprilio.david",
"owner": {
"repo": "https://github.com/Davidaprilio/davidaprilio.github.io",
"email": "david1.aprilio4@gmail.com"
@@ -1,7 +1,7 @@
{
"description": "github verification",
"domain": "is-cool.dev",
"subdomain": "_github-pages-challenge-Dev-Ajay-sahani.ajay",
"subdomain": "_github-pages-challenge-dev-ajay-sahani.ajay",
"owner": {
"repo": "https://github.com/Dev-Ajay-sahani/Portfolio",
"email": "ajays.dev.contact@gmail.com"
@@ -1,7 +1,7 @@
{
"description": "Verification Upload",
"domain": "is-cool.dev",
"subdomain": "_github-pages-challenge-Dragon-Dima.drago",
"subdomain": "_github-pages-challenge-dragon-dima.drago",
"owner": {
"email": "dima_77659@mail.ru"
},
@@ -1,7 +1,7 @@
{
"description": "Github Verification",
"domain": "is-local.org",
"subdomain": "_github-pages-challenge-getSono.alex-gitarre",
"subdomain": "_github-pages-challenge-getsono.alex-gitarre",
"owner": {
"repo": "https://github.com/getSono/register_2",
"email": "sono@sono.is-a.dev"
@@ -1,7 +1,7 @@
{
"description": "GitHub Verify",
"domain": "is-local.org",
"subdomain": "_github-pages-challenge-Keks-Magazin.keks-magazin",
"subdomain": "_github-pages-challenge-keks-magazin.keks-magazin",
"owner": {
"repo": "https://github.com/getSono/register_2",
"email": "sono@sono.is-a.dev"
@@ -1,7 +1,7 @@
{
"description": "github verification",
"domain": "is-cool.dev",
"subdomain": "_github-pages-challenge-LightHostingFree.lh",
"subdomain": "_github-pages-challenge-lighthostingfree.lh",
"owner": {
"repo": "https://github.com/LightHostingFree/",
"email": "mayankreal657@gmail.com"
@@ -1,7 +1,7 @@
{
"description": "github verification",
"domain": "is-cool.dev",
"subdomain": "_github-pages-challenge-LightHostingFree.lightarea",
"subdomain": "_github-pages-challenge-lighthostingfree.lightarea",
"owner": {
"repo": "https://github.com/LightHostingFree/LightArea",
"email": "mayankreal657@gmail.com"
@@ -1,6 +1,6 @@
{
"domain": "is-a-fullstack.dev",
"subdomain": "_github-pages-challenge-Mani-cwaf.mani",
"subdomain": "_github-pages-challenge-mani-cwaf.mani",
"owner": {
"email": "dhingramsp@gmail.com"
},
@@ -1,6 +1,6 @@
{
"domain": "is-a-fullstack.dev",
"subdomain": "_github-pages-challenge-MukuJhansi.gunman",
"subdomain": "_github-pages-challenge-mukujhansi.gunman",
"owner": {
"email": "mukundagrawal800@gmail.com"
},
@@ -1,6 +1,6 @@
{
"domain": "is-cool.dev",
"subdomain": "_github-pages-challenge-NanduWasTaken.nandu",
"subdomain": "_github-pages-challenge-nanduwastaken.nandu",
"owner": {
"repo": "https://github.com/nanduwastaken/nanduwastaken.github.io",
"email": "nandubussines@gmail.com"
@@ -1,6 +1,6 @@
{
"domain": "is-local.org",
"subdomain": "_github-pages-challenge-OshekharO.alternate",
"subdomain": "_github-pages-challenge-oshekharo.alternate",
"owner": {
"repo": "https://github.com/OshekharO",
"email": "omeepd009@gmail.com"
@@ -1,7 +1,7 @@
{
"description": "oh fuck off",
"domain": "is-local.org",
"subdomain": "_github-pages-challenge-Real-Yash.vamika",
"subdomain": "_github-pages-challenge-real-yash.vamika",
"owner": {
"repo": "https://github.com/Real-Yash/vamika",
"email": "connect@realyash.is-a.dev"
@@ -1,7 +1,7 @@
{
"description": "my github blog page",
"domain": "is-cool.dev",
"subdomain": "_github-pages-challenge-SkyShadowHero.skyshadowhero",
"subdomain": "_github-pages-challenge-skyshadowhero.skyshadowhero",
"owner": {
"email": "a1233456333@163.com"
},
@@ -1,7 +1,7 @@
{
"description": "github verification",
"domain": "is-cool.dev",
"subdomain": "_github-pages-challenge-Soumikcoder.soumik",
"subdomain": "_github-pages-challenge-soumikcoder.soumik",
"owner": {
"repo": "https://github.com/Soumikcoder/Soumikcoder.github.io",
"email": "soumik20020906@gmail.com"
@@ -1,7 +1,7 @@
{
"description": "GitHub Pages Verification",
"domain": "is-cool.dev",
"subdomain": "_github-pages-challenge-TheFlashSpeedster.flash",
"subdomain": "_github-pages-challenge-theflashspeedster.flash",
"owner": {
"email": "atulk5137@gmail.com"
},
@@ -1,7 +1,7 @@
{
"description": "ZGalera Inc.",
"domain": "is-local.org",
"subdomain": "_github-pages-challenge-ZGalera.zgalera",
"subdomain": "_github-pages-challenge-zgalera.zgalera",
"owner": {
"repo": "https://github.com/zgalera/zgalera-website",
"email": "81070564+okineadev@users.noreply.github.com"
+1 -1
View File
@@ -1,7 +1,7 @@
{
"description": "Personal website of Aleksyeus",
"domain": "is-cool.dev",
"subdomain": "Aleksyeus",
"subdomain": "aleksyeus",
"owner": {
"repo": "https://github.com/Aleksyeus/aleksyeus.github.io",
"email": "alexanderkharshiladze15@gmail.com"
+1 -1
View File
@@ -1,7 +1,7 @@
{
"description": "Personal Webpage for myself",
"domain": "is-not-a.dev",
"subdomain": "Ayaz",
"subdomain": "ayaz",
"owner": {
"repo": "https://github.com/Ayazayyub1/Personal-Webpage",
"email": "ayazayyub@yahoo.com"
+1 -1
View File
@@ -1,7 +1,7 @@
{
"description": "Free Share Account Project",
"domain": "is-local.org",
"subdomain": "HyperShare",
"subdomain": "hypershare",
"owner": {
"email": "phat2003qn@gmail.com"
},
+58 -1
View File
@@ -28,5 +28,62 @@ function lowercaseFilenames() {
});
}
// Run the renamer
function lowercaseJSONProperties() {
fs.readdir(domainsDir, (err, files) => {
if (err) {
console.error(`Error reading directory: ${err.message}`);
return;
}
files
.filter(file => file.endsWith('.json'))
.forEach(file => {
const filePath = path.join(domainsDir, file);
fs.readFile(filePath, 'utf8', (err, data) => {
if (err) {
console.error(`Error reading file ${file}: ${err.message}`);
return;
}
try {
const parsed = JSON.parse(data);
let modified = false;
if (typeof parsed.subdomain === 'string') {
const lowerSub = parsed.subdomain.toLowerCase();
if (parsed.subdomain !== lowerSub) {
parsed.subdomain = lowerSub;
modified = true;
}
}
if (typeof parsed.domain === 'string') {
const lowerDom = parsed.domain.toLowerCase();
if (parsed.domain !== lowerDom) {
parsed.domain = lowerDom;
modified = true;
}
}
if (modified) {
const formatted = JSON.stringify(parsed, null, 4);
fs.writeFile(filePath, formatted, 'utf8', err => {
if (err) {
console.error(`Error writing file ${file}: ${err.message}`);
} else {
console.log(`Lowercased subdomain/domain in: ${file}`);
}
});
}
} catch (e) {
console.warn(`❌ Invalid JSON in: ${file}`);
}
});
});
});
}
// Run both
lowercaseFilenames();
lowercaseJSONProperties();
+20 -2
View File
@@ -204,17 +204,35 @@ function askQuestion(query) {
try {
const parsed = JSON.parse(data);
const expectedFileName = `${parsed.subdomain}.${parsed.domain}.json`;
const { subdomain, domain } = parsed;
if (!subdomain || !domain) {
console.warn(`❌ Missing subdomain or domain in: ${file}`);
return;
}
// Check lowercase inside JSON
if (subdomain !== subdomain.toLowerCase()) {
console.warn(`❌ 'subdomain' must be lowercase in: ${file}`);
}
if (domain !== domain.toLowerCase()) {
console.warn(`❌ 'domain' must be lowercase in: ${file}`);
}
// Check that file name matches subdomain.domain.json
const expectedFileName = `${subdomain}.${domain}.json`;
if (file !== expectedFileName) {
console.warn(`❌ Filename mismatch in: ${file}`);
console.warn(` ↪ Expected: ${expectedFileName}`);
}
} catch (e) {
console.log(`❌ Cannot parse JSON in: ${file}`);
console.warn(`❌ Invalid JSON in: ${file}`);
}
});
});
});
}
})();