Merge pull request #506 from is-a-good-dev/WilliamDavidHarrison/raw-domain

Create raw.json
This commit is contained in:
Tweak authored and GitHub committed 2023-05-28 21:01:54 -06:00
commit a7fcc5f173
4 files changed
+20 -78

No files matched your search

-32
View File
@@ -1,32 +0,0 @@
name: Raw API
on:
push:
branches: [main]
paths:
- "sub-logs/*"
- ".github/workflows/raw-api.yml"
- "scripts/raw-api.js"
jobs:
update:
name: Update
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: 16
- name: Run Script
run: |
git config --global user.email "will@is-a-good.dev"
git config --global user.name "is-a-good-dev-BOT"
node scripts/raw-api.js
git add utils/raw.json
git commit -m "Update Raw API"
git push
-45
View File
@@ -1,45 +0,0 @@
const fs = require("fs");
const path = require("path");
const directoryPath = path.join(__dirname, "../sub-logs");
let combinedArray = [];
fs.readdir(directoryPath, function (err, files) {
if(err) throw err;
function removeValue(value, index, arr) {
if(value === "reserved") {
arr.splice(index, 1);
return true;
}
return false;
}
files.filter(removeValue);
files.forEach(function (file) {
const filePath = path.join(directoryPath, file);
fs.readFile(filePath, "utf8", (err, data) => {
if(err) throw err;
const dataArray = [JSON.parse(data)];
for(const item of dataArray) {
delete item.owner.email;
item.domain = path.parse(file).name + ".is-a-good.dev";
}
combinedArray = combinedArray.concat(dataArray);
if(combinedArray.length === files.length) {
fs.writeFile("utils/raw.json", JSON.stringify(combinedArray), (err) => {
if(err) throw err;
})
}
})
})
})
+20
View File
@@ -0,0 +1,20 @@
{
"owner": {
"username": "WilliamDavidHarrison",
"email": "william@williamharrison.dev"
},
"target": {
"CNAME": {
"name": "raw",
"value": "wdhdev.github.io"
},
"TXT": {
"name": "_github-pages-challenge-wdhdev.raw",
"value": "ea47b2c6d08c69664990e12035aa60"
}
},
"proxied": false
}
-1
View File
@@ -1 +0,0 @@
[{"repo":"https://github.com/Adriichu/is-a-good-dev","owner":{"username":"Adriichuuu"},"target":{"CNAME":{"name":"aaron","value":"aaron-web.pages.dev"}},"proxied":true,"domain":"aaron.is-a-good.dev"},{"website":"https://opaayush.pages.dev","owner":{"username":"OpAayush"},"target":{"CNAME":{"name":"aayush","value":"opaayush.pages.dev"},"TXT":{"name":"_github-pages-challenge-OpAayush","value":"d9cdcc62ad8d21a614cf615bc2535b"}},"proxied":false,"domain":"aayush.is-a-good.dev"},{"repo":"https://github.com/abardia/abardia.github.io","owner":{"username":"abardia"},"target":{"CNAME":{"name":"abardia","value":"abardia.github.io"}},"proxied":false,"domain":"abardia.is-a-good.dev"},{"owner":{"username":"abderrazak"},"target":{"CNAME":{"name":"abderrazak-bahaj","value":"abderrazak-Baha.github.io"}},"proxied":false,"domain":"abderrazak-bahaj.is-a-good.dev"},{"repo":"https://github.com/abdullahnasir4/register","owner":{"username":"AbdullahNasir"},"target":{"CNAME":{"name":"Abdullah","value":"abdullah.github.io"}},"proxied":false,"domain":"abdullah.is-a-good.dev"},{"owner":{"username":"AceyDoCodes"},"target":{"CNAME":{"name":"acey","value":"cname.vercel-dns.com"}},"proxied":false,"domain":"acey.is-a-good.dev"},{"owner":{"username":"adnansid99"},"target":{"CNAME":{"name":"adnan","value":"adnan.pages.dev"}},"proxied":true,"domain":"adnan.is-a-good.dev"},{"owner":{"username":"ajay-charotariya"},"target":{"CNAME":{"name":"ajay-charotariya","value":"ajay-charotariya.github.io"}},"proxied":false,"domain":"ajay-charotariya.is-a-good.dev"},{"owner":{"username":"ajit-thakor"},"target":{"CNAME":{"name":"ajit-thakor","value":"ajit-thakor.github.io"}},"proxied":false,"domain":"ajit-thakor.is-a-good.dev"},{"owner":{"username":"akta-chavda"},"target":{"CNAME":{"name":"akta-chavda","value":"akta-chavda.github.io"}},"proxied":false,"domain":"akta-chavda.is-a-good.dev"},{"repo":"https://github.com/Alfred-207/portfolio","owner":{"username":"Alfred-207"},"target":{"CNAME":{"name":"Alfred","value":"alfred-207.github.io"}},"proxied":false,"domain":"alfred.is-a-good.dev"},{"repo":"https://github.com/andronasef/andronasef.github.io","owner":{"username":"andronasef"},"target":{"CNAME":{"name":"andronasef","value":"andronasef.github.io"}},"proxied":false,"domain":"andronasef.is-a-good.dev"},{"repo":"https://github.com/aniruddhnishad","owner":{"username":"aniruddhnishad"},"target":{"A":{"name":"aniruddh","value":"23.94.14.190"}},"proxied":false,"domain":"aniruddh.is-a-good.dev"},{"owner":{"username":"ankit-acquaintsoft"},"target":{"CNAME":{"name":"ankit-acquaintsoft","value":"ankit-acquaintsoft-dev.github.io"}},"proxied":false,"domain":"ankit-acquaintsoft.is-a-good.dev"},{"repo":"https://github.com/anondev-sudo/anondev-sudo","owner":{"username":"anondev-sudo"},"target":{"CNAME":{"name":"anon","value":"anondev.up.railway.app"}},"proxied":false,"domain":"anon.is-a-good.dev"},{"owner":{"username":"ansari-saify"},"target":{"CNAME":{"name":"ansari-saify","value":"ansari-saify-dev.github.io"}},"proxied":false,"domain":"ansari-saify.is-a-good.dev"},{"owner":{"username":"anyalol"},"target":{"A":{"name":"anya","value":"87.98.164.155"}},"proxied":false,"domain":"anya.is-a-good.dev"},{"owner":{"username":"ItzArman09"},"target":{"A":{"name":"arman","value":"89.106.200.1"}},"proxied":false,"domain":"arman.is-a-good.dev"},{"repo":"https://github.com/uzukidev/avalynndev","owner":{"username":"avalynndev"},"target":{"CNAME":{"name":"avalynn","value":"cname.vercel-dns.com"},"TXT":{"name":"_vercel","value":"vc-domain-verify=avalynn.is-a-good.dev,3a44282059a77b85f618"}},"proxied":false,"domain":"avalynn.is-a-good.dev"},{"repo":"https://github.com/caverym/website","owner":{"username":"caverym"},"target":{"CNAME":{"name":"avery","value":"caverym.net"}},"proxied":false,"domain":"avery.is-a-good.dev"},{"repo":"https://github.com/avileforsure/avileforsure.github.io","owner":{"username":"AvileForsure"},"target":{"CNAME":{"name":"avileforsure","value":"avileforsure.github.io"}},"proxied":false,"domain":"avileforsure.is-a-good.dev"},{"repo":"https://github.com/zeusgangzz/zeusgangzz.github.io","owner":{"username":"ayah"},"target":{"CNAME":{"name":"ayah","value":"zeusgangzz.github.io"}},"proxied":false,"domain":"ayah.is-a-good.dev"},{"repo":"https://github.com/Badisse/site-perso","owner":{"username":"Badisse"},"target":{"CNAME":{"name":"badisse-bouabdallah","value":"badisse.netlify.app"}},"proxied":false,"domain":"badisse-bouabdallah.is-a-good.dev"},{"owner":{"username":"benthetechguy"},"target":{"CNAME":{"name":"_acme-challenge.ben.is-a-good.dev","value":"9a415aff-3d5e-41ad-93a1-f0e5986e088f.auth.acme-dns.io"}},"proxied":false,"domain":"ben.is-a-good.dev"},{"owner":{"username":"bhavesh-acquaintsoft"},"target":{"CNAME":{"name":"bhavesh-acquaintsoft","value":"bhavesh-acquaintsoft-dev.github.io"}},"proxied":false,"domain":"bhavesh-acquaintsoft.is-a-good.dev"},{"repo":"https://github.com/donottakemyusername/portfolio_website","owner":{"username":"donottakemyusername"},"target":{Line truncated