Compare commits

..

9 Commits

Author SHA1 Message Date
2b3ac2219e Update CI config
All checks were successful
timw4mail/HummingBirdAnimeClient/pipeline/head This commit looks good
2024-11-13 11:13:21 -05:00
bd9cf2fe70 Update CI config
Some checks failed
timw4mail/HummingBirdAnimeClient/pipeline/head There was a failure building this commit
2024-11-13 11:12:30 -05:00
95be3921fc Update CI config
Some checks failed
timw4mail/HummingBirdAnimeClient/pipeline/head There was a failure building this commit
2024-11-13 11:09:49 -05:00
31fd412e6a Update dependencies and graphql schema
Some checks failed
timw4mail/HummingBirdAnimeClient/pipeline/head There was a failure building this commit
2024-11-13 11:02:10 -05:00
ce1c19522f Update composer.json so symfony mbstring polyfill doesn't clash with php extension
Some checks failed
timw4mail/HummingBirdAnimeClient/pipeline/head There was a failure building this commit
2024-09-11 07:28:31 -04:00
cb23807348 Fix other old Kitsu url references
Some checks failed
timw4mail/HummingBirdAnimeClient/pipeline/head There was a failure building this commit
2024-08-13 07:56:20 -04:00
1914911432 Fix Kitsu url
Some checks failed
timw4mail/HummingBirdAnimeClient/pipeline/head There was a failure building this commit
2024-08-11 14:58:49 -04:00
7707660978 Remove polyfill.io script
Some checks failed
timw4mail/HummingBirdAnimeClient/pipeline/head There was a failure building this commit
2024-07-01 09:34:43 -04:00
7afdab80ac Update frontend minification config and dependencies
All checks were successful
timw4mail/HummingBirdAnimeClient/pipeline/head This commit looks good
2024-02-15 15:21:26 -05:00
30 changed files with 5642 additions and 4949 deletions

8
Jenkinsfile vendored
View File

@ -10,10 +10,10 @@ pipeline {
sh 'php composer.phar install --ignore-platform-reqs'
}
}
stage('PHP 8.1') {
stage('PHP 8.2') {
agent {
docker {
image 'php:8.1-cli-alpine'
image 'php:8.2-cli-alpine'
args '-u root --privileged'
}
}
@ -23,10 +23,10 @@ pipeline {
sh 'php ./vendor/bin/phpunit --colors=never'
}
}
stage('PHP 8.2') {
stage('PHP 8.3') {
agent {
docker {
image 'php:8.2-cli-alpine'
image 'php:8.3-cli-alpine'
args '-u root --privileged'
}
}

View File

@ -10,7 +10,6 @@
</div>
</div>
</section>
<script nomodule="nomodule" src="https://polyfill.io/v3/polyfill.min.js?features=es5%2CObject.assign"></script>
<script async="async" defer="defer" src="<?= $_->assetUrl('js/scripts.min.js') ?>"></script>
</body>
</html>

View File

@ -5,7 +5,7 @@ use Aviat\AnimeClient\Kitsu;
<h2 class="toph">
About
<?= $_->h->a(
"https://kitsu.io/users/{$data['slug']}",
"https://kitsu.app/users/{$data['slug']}",
$data['name'], [
'title' => 'View profile on Kitsu'
])

View File

@ -33,7 +33,7 @@
"amphp/http-client": "^v5.0.0",
"aura/html": "^2.5.0",
"aura/router": "^3.3.0",
"aura/session": "^2.1.0",
"aura/session": "^4.0",
"aviat/banker": "^4.1.2",
"aviat/query": "^4.1.0",
"ext-dom": "*",
@ -48,13 +48,14 @@
"monolog/monolog": "^3.0.0",
"php": ">= 8.2.0",
"psr/http-message": "^1.0.1 || ^2.0.0",
"symfony/polyfill-mbstring": "^1.0.0",
"symfony/polyfill-util": "^1.0.0",
"tracy/tracy": "^2.8.0",
"yosymfony/toml": "^1.0.4"
},
"replace": {
"symfony/polyfill-mbstring": "*"
},
"require-dev": {
"phpstan/phpstan": "^1.2.0",
"phpstan/phpstan": "^2.0.1",
"phpunit/phpunit": "^10.0.0",
"roave/security-advisories": "dev-master",
"spatie/phpunit-snapshot-assertions": "^5.0.1"

View File

@ -9,13 +9,13 @@
"watch": "concurrently \"npm:watch:css\" \"npm:watch:js\" --kill-others"
},
"devDependencies": {
"@swc/cli": "^0.1.39",
"@swc/core": "^1.2.54",
"concurrently": "^8.2.0",
"cssnano": "^6.0.1",
"postcss": "^8.2.6",
"postcss-import": "^15.0.0",
"postcss-preset-env": "^8.0.1",
"@swc/cli": "^0.3.9",
"@swc/core": "^1.4.1",
"concurrently": "^8.2.2",
"cssnano": "^6.0.3",
"postcss": "^8.4.35",
"postcss-import": "^16.0.1",
"postcss-preset-env": "^9.3.0",
"watch": "^1.0.2"
}
}

View File

@ -14,11 +14,22 @@ module.exports = config({
syntax: "ecmascript",
jsx: false,
},
target: 'es2016',
target: 'es2018',
loose: false,
// keepClassNames: true,
// preserveAllComments: true,
minify: {
compress: {
unused: true,
},
mangle: true,
format: {
comments: false,
}
}
},
minify: true,
sourceMaps: false,
sourceMaps: true,
isModule: true,
}
});

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
const LightTableSorter=(()=>{let th=null;let cellIndex=null;let order="";const text=row=>row.cells.item(cellIndex).textContent.toLowerCase();const sort=(a,b)=>{let textA=text(a);let textB=text(b);console.log("Comparing "+textA+" and "+textB);if(th.classList.contains("numeric")){let arrayA=textA.replace("episodes: ","").replace("-",0).split("/");let arrayB=textB.replace("episodes: ","").replace("-",0).split("/");if(arrayA.length>1){textA=parseInt(arrayA[0],10)/parseInt(arrayA[1],10);textB=parseInt(arrayB[0],10)/parseInt(arrayB[1],10)}else{textA=parseInt(arrayA[0],10);textB=parseInt(arrayB[0],10)}}else if(parseInt(textA,10)){textA=parseInt(textA,10);textB=parseInt(textB,10)}if(textA>textB)return 1;if(textA<textB)return -1;return 0};const toggle=()=>{const c=order!=="sorting-asc"?"sorting-asc":"sorting-desc";th.className=(th.className.replace(order,"")+" "+c).trim();return order=c};const reset=()=>{th.classList.remove("sorting-asc","sorting-desc");th.classList.add("sorting");return order=""};const onClickEvent=e=>{if(th&&cellIndex!==e.target.cellIndex)reset();th=e.target;if(th.nodeName.toLowerCase()==="th"){cellIndex=th.cellIndex;const tbody=th.offsetParent.getElementsByTagName("tbody")[0];let rows=Array.from(tbody.rows);if(rows){rows.sort(sort);if(order==="sorting-asc")rows.reverse();toggle();tbody.innerHtml="";rows.forEach(row=>{tbody.appendChild(row)})}}};return{init:()=>{let ths=document.getElementsByTagName("th");let results=[];for(let i=0,len=ths.length;i<len;i++){let th=ths[i];th.classList.add("sorting");th.classList.add("testing");results.push(th.onclick=onClickEvent)}return results}}})();LightTableSorter.init();
(()=>{let e=null,t=null,s="",r=e=>e.cells.item(t).textContent.toLowerCase(),n=(t,s)=>{let n=r(t),a=r(s);if(console.log("Comparing "+n+" and "+a),e.classList.contains("numeric")){let e=n.replace("episodes: ","").replace("-",0).split("/"),t=a.replace("episodes: ","").replace("-",0).split("/");e.length>1?(n=parseInt(e[0],10)/parseInt(e[1],10),a=parseInt(t[0],10)/parseInt(t[1],10)):(n=parseInt(e[0],10),a=parseInt(t[0],10))}else parseInt(n,10)&&(n=parseInt(n,10),a=parseInt(a,10));return n>a?1:n<a?-1:0},a=()=>{let t="sorting-asc"!==s?"sorting-asc":"sorting-desc";return e.className=(e.className.replace(s,"")+" "+t).trim(),s=t},l=()=>(e.classList.remove("sorting-asc","sorting-desc"),e.classList.add("sorting"),s=""),i=r=>{if(e&&t!==r.target.cellIndex&&l(),"th"===(e=r.target).nodeName.toLowerCase()){t=e.cellIndex;let r=e.offsetParent.getElementsByTagName("tbody")[0],l=Array.from(r.rows);l&&(l.sort(n),"sorting-asc"===s&&l.reverse(),a(),r.innerHtml="",l.forEach(e=>{r.appendChild(e)}))}};return{init:()=>{let e=document.getElementsByTagName("th"),t=[];for(let s=0,r=e.length;s<r;s++){let r=e[s];r.classList.add("sorting"),r.classList.add("testing"),t.push(r.onclick=i)}return t}}})().init();

View File

@ -1 +1 @@
{"version":3,"sources":["/var/www/htdocs/github.timshomepage.net/animeclient/frontEndSrc/js/base/sort-tables.js"],"sourcesContent":["const LightTableSorter = (() => {\n\tlet th = null;\n\tlet cellIndex = null;\n\tlet order = '';\n\tconst text = (row) => row.cells.item(cellIndex).textContent.toLowerCase();\n\tconst sort = (a, b) => {\n\t\tlet textA = text(a);\n\t\tlet textB = text(b);\n\t\tconsole.log(\"Comparing \" + textA + \" and \" + textB)\n\n\t\tif(th.classList.contains(\"numeric\")){\n\t\t\tlet arrayA = textA.replace('episodes: ','').replace('-',0).split(\"/\");\n\t\t\tlet arrayB = textB.replace('episodes: ','').replace('-',0).split(\"/\");\n\t\t\tif(arrayA.length > 1) {\n\t\t\t\ttextA = parseInt(arrayA[0],10) / parseInt(arrayA[1],10);\n\t\t\t\ttextB = parseInt(arrayB[0],10) / parseInt(arrayB[1],10);\n\t\t\t}\n\t\t\telse{\n\t\t\t\ttextA = parseInt(arrayA[0],10);\n\t\t\t\ttextB = parseInt(arrayB[0],10);\n\t\t\t}\n\t\t}\n\t\telse if (parseInt(textA, 10)) {\n\t\t\ttextA = parseInt(textA, 10);\n\t\t\ttextB = parseInt(textB, 10);\n\t\t}\n\t\tif (textA > textB) {\n\t\t\treturn 1;\n\t\t}\n\t\tif (textA < textB) {\n\t\t\treturn -1;\n\t\t}\n\t\treturn 0;\n\t};\n\tconst toggle = () => {\n\t\tconst c = order !== 'sorting-asc' ? 'sorting-asc' : 'sorting-desc';\n\t\tth.className = (th.className.replace(order, '') + ' ' + c).trim();\n\t\treturn order = c;\n\t};\n\tconst reset = () => {\n\t\tth.classList.remove('sorting-asc', 'sorting-desc');\n\t\tth.classList.add('sorting');\n\t\treturn order = '';\n\t};\n\tconst onClickEvent = (e) => {\n\t\tif (th && (cellIndex !== e.target.cellIndex)) {\n\t\t\treset();\n\t\t}\n\t\tth = e.target;\n\t\tif (th.nodeName.toLowerCase() === 'th') {\n\t\t\tcellIndex = th.cellIndex;\n\t\t\tconst tbody = th.offsetParent.getElementsByTagName('tbody')[0];\n\t\t\tlet rows = Array.from(tbody.rows);\n\t\t\tif (rows) {\n\t\t\t\trows.sort(sort);\n\t\t\t\tif (order === 'sorting-asc') {\n\t\t\t\t\trows.reverse();\n\t\t\t\t}\n\t\t\t\ttoggle();\n\t\t\t\ttbody.innerHtml = '';\n\n\t\t\t\trows.forEach(row => {\n\t\t\t\t\ttbody.appendChild(row);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t};\n\treturn {\n\t\tinit: () => {\n\t\t\tlet ths = document.getElementsByTagName('th');\n\t\t\tlet results = [];\n\t\t\tfor (let i = 0, len = ths.length; i < len; i++) {\n\t\t\t\tlet th = ths[i];\n\t\t\t\tth.classList.add('sorting');\n\t\t\t\tth.classList.add('testing');\n\t\t\t\tresults.push(th.onclick = onClickEvent);\n\t\t\t}\n\t\t\treturn results;\n\t\t}\n\t};\n})();\n\nLightTableSorter.init();"],"names":[],"mappings":"AAAA,MAAM,iBAAmB,AAAC,CAAA,KACzB,IAAI,GAAK,KACT,IAAI,UAAY,KAChB,IAAI,MAAQ,GACZ,MAAM,KAAO,AAAC,KAAQ,IAAI,KAAK,CAAC,IAAI,CAAC,WAAW,WAAW,CAAC,WAAW,GACvE,MAAM,KAAO,CAAC,EAAG,KAChB,IAAI,MAAQ,KAAK,GACjB,IAAI,MAAQ,KAAK,GACjB,QAAQ,GAAG,CAAC,aAAe,MAAQ,QAAU,OAE7C,GAAG,GAAG,SAAS,CAAC,QAAQ,CAAC,WAAW,CACnC,IAAI,OAAS,MAAM,OAAO,CAAC,cAAc,IAAI,OAAO,CAAC,IAAI,GAAG,KAAK,CAAC,KAClE,IAAI,OAAS,MAAM,OAAO,CAAC,cAAc,IAAI,OAAO,CAAC,IAAI,GAAG,KAAK,CAAC,KAClE,GAAG,OAAO,MAAM,CAAG,EAAG,CACrB,MAAQ,SAAS,MAAM,CAAC,EAAE,CAAC,IAAM,SAAS,MAAM,CAAC,EAAE,CAAC,IACpD,MAAQ,SAAS,MAAM,CAAC,EAAE,CAAC,IAAM,SAAS,MAAM,CAAC,EAAE,CAAC,GACrD,KACI,CACH,MAAQ,SAAS,MAAM,CAAC,EAAE,CAAC,IAC3B,MAAQ,SAAS,MAAM,CAAC,EAAE,CAAC,GAC5B,CACD,MACK,GAAI,SAAS,MAAO,IAAK,CAC7B,MAAQ,SAAS,MAAO,IACxB,MAAQ,SAAS,MAAO,GACzB,CACA,GAAI,MAAQ,MACX,OAAO,EAER,GAAI,MAAQ,MACX,OAAO,GAER,OAAO,CACR,EACA,MAAM,OAAS,KACd,MAAM,EAAI,QAAU,cAAgB,cAAgB,cACpD,CAAA,GAAG,SAAS,CAAG,AAAC,CAAA,GAAG,SAAS,CAAC,OAAO,CAAC,MAAO,IAAM,IAAM,CAAA,EAAG,IAAI,GAC/D,OAAO,MAAQ,CAChB,EACA,MAAM,MAAQ,KACb,GAAG,SAAS,CAAC,MAAM,CAAC,cAAe,gBACnC,GAAG,SAAS,CAAC,GAAG,CAAC,WACjB,OAAO,MAAQ,EAChB,EACA,MAAM,aAAe,AAAC,IACrB,GAAI,IAAO,YAAc,EAAE,MAAM,CAAC,SAAS,CAC1C,QAED,GAAK,EAAE,MAAM,CACb,GAAI,GAAG,QAAQ,CAAC,WAAW,KAAO,KAAM,CACvC,UAAY,GAAG,SAAS,CACxB,MAAM,MAAQ,GAAG,YAAY,CAAC,oBAAoB,CAAC,QAAQ,CAAC,EAAE,CAC9D,IAAI,KAAO,MAAM,IAAI,CAAC,MAAM,IAAI,EAChC,GAAI,KAAM,CACT,KAAK,IAAI,CAAC,MACV,GAAI,QAAU,cACb,KAAK,OAAO,GAEb,QACA,CAAA,MAAM,SAAS,CAAG,GAElB,KAAK,OAAO,CAAC,MACZ,MAAM,WAAW,CAAC,IACnB,EACD,CACD,CACD,EACA,MAAO,CACN,KAAM,KACL,IAAI,IAAM,SAAS,oBAAoB,CAAC,MACxC,IAAI,QAAU,EAAE,CAChB,IAAK,IAAI,EAAI,EAAG,IAAM,IAAI,MAAM,CAAE,EAAI,IAAK,IAAK,CAC/C,IAAI,GAAK,GAAG,CAAC,EAAE,CACf,GAAG,SAAS,CAAC,GAAG,CAAC,WACjB,GAAG,SAAS,CAAC,GAAG,CAAC,WACjB,QAAQ,IAAI,CAAC,GAAG,OAAO,CAAG,aAC3B,CACA,OAAO,OACR,CACD,CACD,CAAA,IAEA,iBAAiB,IAAI"}
{"version":3,"sources":["/var/www/htdocs/github.timshomepage.net/animeclient/frontEndSrc/js/base/sort-tables.js"],"sourcesContent":["const LightTableSorter = (() => {\n\tlet th = null;\n\tlet cellIndex = null;\n\tlet order = '';\n\tconst text = (row) => row.cells.item(cellIndex).textContent.toLowerCase();\n\tconst sort = (a, b) => {\n\t\tlet textA = text(a);\n\t\tlet textB = text(b);\n\t\tconsole.log(\"Comparing \" + textA + \" and \" + textB)\n\n\t\tif(th.classList.contains(\"numeric\")){\n\t\t\tlet arrayA = textA.replace('episodes: ','').replace('-',0).split(\"/\");\n\t\t\tlet arrayB = textB.replace('episodes: ','').replace('-',0).split(\"/\");\n\t\t\tif(arrayA.length > 1) {\n\t\t\t\ttextA = parseInt(arrayA[0],10) / parseInt(arrayA[1],10);\n\t\t\t\ttextB = parseInt(arrayB[0],10) / parseInt(arrayB[1],10);\n\t\t\t}\n\t\t\telse{\n\t\t\t\ttextA = parseInt(arrayA[0],10);\n\t\t\t\ttextB = parseInt(arrayB[0],10);\n\t\t\t}\n\t\t}\n\t\telse if (parseInt(textA, 10)) {\n\t\t\ttextA = parseInt(textA, 10);\n\t\t\ttextB = parseInt(textB, 10);\n\t\t}\n\t\tif (textA > textB) {\n\t\t\treturn 1;\n\t\t}\n\t\tif (textA < textB) {\n\t\t\treturn -1;\n\t\t}\n\t\treturn 0;\n\t};\n\tconst toggle = () => {\n\t\tconst c = order !== 'sorting-asc' ? 'sorting-asc' : 'sorting-desc';\n\t\tth.className = (th.className.replace(order, '') + ' ' + c).trim();\n\t\treturn order = c;\n\t};\n\tconst reset = () => {\n\t\tth.classList.remove('sorting-asc', 'sorting-desc');\n\t\tth.classList.add('sorting');\n\t\treturn order = '';\n\t};\n\tconst onClickEvent = (e) => {\n\t\tif (th && (cellIndex !== e.target.cellIndex)) {\n\t\t\treset();\n\t\t}\n\t\tth = e.target;\n\t\tif (th.nodeName.toLowerCase() === 'th') {\n\t\t\tcellIndex = th.cellIndex;\n\t\t\tconst tbody = th.offsetParent.getElementsByTagName('tbody')[0];\n\t\t\tlet rows = Array.from(tbody.rows);\n\t\t\tif (rows) {\n\t\t\t\trows.sort(sort);\n\t\t\t\tif (order === 'sorting-asc') {\n\t\t\t\t\trows.reverse();\n\t\t\t\t}\n\t\t\t\ttoggle();\n\t\t\t\ttbody.innerHtml = '';\n\n\t\t\t\trows.forEach(row => {\n\t\t\t\t\ttbody.appendChild(row);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t};\n\treturn {\n\t\tinit: () => {\n\t\t\tlet ths = document.getElementsByTagName('th');\n\t\t\tlet results = [];\n\t\t\tfor (let i = 0, len = ths.length; i < len; i++) {\n\t\t\t\tlet th = ths[i];\n\t\t\t\tth.classList.add('sorting');\n\t\t\t\tth.classList.add('testing');\n\t\t\t\tresults.push(th.onclick = onClickEvent);\n\t\t\t}\n\t\t\treturn results;\n\t\t}\n\t};\n})();\n\nLightTableSorter.init();"],"names":[],"mappings":"AAAyB,CAAC,KACzB,IAAI,EAAK,KACL,EAAY,KACZ,EAAQ,GACN,EAAO,AAAC,GAAQ,EAAI,KAAK,CAAC,IAAI,CAAC,GAAW,WAAW,CAAC,WAAW,GACjE,EAAO,CAAC,EAAG,KAChB,IAAI,EAAQ,EAAK,GACb,EAAQ,EAAK,GAGjB,GAFA,QAAQ,GAAG,CAAC,aAAe,EAAQ,QAAU,GAE1C,EAAG,SAAS,CAAC,QAAQ,CAAC,WAAW,CACnC,IAAI,EAAS,EAAM,OAAO,CAAC,cAAc,IAAI,OAAO,CAAC,IAAI,GAAG,KAAK,CAAC,KAC9D,EAAS,EAAM,OAAO,CAAC,cAAc,IAAI,OAAO,CAAC,IAAI,GAAG,KAAK,CAAC,IAC/D,CAAA,EAAO,MAAM,CAAG,GAClB,EAAQ,SAAS,CAAM,CAAC,EAAE,CAAC,IAAM,SAAS,CAAM,CAAC,EAAE,CAAC,IACpD,EAAQ,SAAS,CAAM,CAAC,EAAE,CAAC,IAAM,SAAS,CAAM,CAAC,EAAE,CAAC,MAGpD,EAAQ,SAAS,CAAM,CAAC,EAAE,CAAC,IAC3B,EAAQ,SAAS,CAAM,CAAC,EAAE,CAAC,IAE7B,MACS,SAAS,EAAO,MACxB,EAAQ,SAAS,EAAO,IACxB,EAAQ,SAAS,EAAO,YAEzB,AAAI,EAAQ,EACJ,EAEJ,EAAQ,EACJ,GAED,CACR,EACM,EAAS,KACd,IAAM,EAAI,AAAU,gBAAV,EAA0B,cAAgB,eAEpD,OADA,EAAG,SAAS,CAAG,CAAC,EAAG,SAAS,CAAC,OAAO,CAAC,EAAO,IAAM,IAAM,CAAC,EAAE,IAAI,GACxD,EAAQ,CAChB,EACM,EAAQ,KACb,EAAG,SAAS,CAAC,MAAM,CAAC,cAAe,gBACnC,EAAG,SAAS,CAAC,GAAG,CAAC,WACV,EAAQ,IAEV,EAAe,AAAC,IAKrB,GAJI,GAAO,IAAc,EAAE,MAAM,CAAC,SAAS,EAC1C,IAGG,AAA8B,OAA9B,AADJ,CAAA,EAAK,EAAE,MAAM,AAAD,EACL,QAAQ,CAAC,WAAW,GAAa,CACvC,EAAY,EAAG,SAAS,CACxB,IAAM,EAAQ,EAAG,YAAY,CAAC,oBAAoB,CAAC,QAAQ,CAAC,EAAE,CAC1D,EAAO,MAAM,IAAI,CAAC,EAAM,IAAI,EAC5B,IACH,EAAK,IAAI,CAAC,GACI,gBAAV,GACH,EAAK,OAAO,GAEb,IACA,EAAM,SAAS,CAAG,GAElB,EAAK,OAAO,CAAC,IACZ,EAAM,WAAW,CAAC,EACnB,GAEF,CACD,EACA,MAAO,CACN,KAAM,KACL,IAAI,EAAM,SAAS,oBAAoB,CAAC,MACpC,EAAU,EAAE,CAChB,IAAK,IAAI,EAAI,EAAG,EAAM,EAAI,MAAM,CAAE,EAAI,EAAK,IAAK,CAC/C,IAAI,EAAK,CAAG,CAAC,EAAE,CACf,EAAG,SAAS,CAAC,GAAG,CAAC,WACjB,EAAG,SAAS,CAAC,GAAG,CAAC,WACjB,EAAQ,IAAI,CAAC,EAAG,OAAO,CAAG,EAC3B,CACA,OAAO,CACR,CACD,CACD,CAAC,IAEgB,IAAI"}

View File

@ -105,7 +105,7 @@ final class Model
public function createListItem(array $data, string $type = 'anime'): ?Request
{
$mediaId = $this->getMediaId($data, $type);
if ($mediaId === NULL || $mediaId === "undefined")
if (empty($mediaId))
{
return NULL;
}

File diff suppressed because it is too large Load Diff

View File

@ -113,7 +113,7 @@ final class AnimeTransformer extends AbstractTransformer
if ((is_countable($base['mappings']['nodes']) ? count($base['mappings']['nodes']) : 0) > 0)
{
$links = Kitsu::mappingsToUrls($base['mappings']['nodes'], "https://kitsu.io/anime/{$base['slug']}");
$links = Kitsu::mappingsToUrls($base['mappings']['nodes'], "https://kitsu.app/anime/{$base['slug']}");
}
return AnimePage::from([
@ -138,7 +138,7 @@ final class AnimeTransformer extends AbstractTransformer
'titles_more' => $titles_more,
'total_length' => $base['totalLength'],
'trailer_id' => $base['youtubeTrailerVideoId'],
'url' => "https://kitsu.io/anime/{$base['slug']}",
'url' => "https://kitsu.app/anime/{$base['slug']}",
]);
}
}

View File

@ -182,7 +182,7 @@ final class LibraryEntryTransformer extends AbstractTransformer
'title' => $title,
'titles' => $titles,
'type' => (string) StringType::from($manga['subtype'])->upperCaseFirst(),
'url' => 'https://kitsu.io/manga/' . $manga['slug'],
'url' => 'https://kitsu.app/manga/' . $manga['slug'],
]),
'reading_status' => strtolower($item['status']),
'notes' => $item['notes'],

View File

@ -94,7 +94,7 @@ final class MangaListTransformer extends AbstractTransformer
'title' => $title,
'titles' => $titles,
'type' => (string) StringType::from($manga['subtype'])->toLowerCase()->upperCaseFirst(),
'url' => 'https://kitsu.io/manga/' . $manga['slug'],
'url' => 'https://kitsu.app/manga/' . $manga['slug'],
]),
'reading_status' => strtolower($item['status']),
'notes' => $item['notes'],

View File

@ -114,7 +114,7 @@ final class MangaTransformer extends AbstractTransformer
if ((is_countable($base['mappings']['nodes']) ? count($base['mappings']['nodes']) : 0) > 0)
{
$links = Kitsu::mappingsToUrls($base['mappings']['nodes'], "https://kitsu.io/manga/{$base['slug']}");
$links = Kitsu::mappingsToUrls($base['mappings']['nodes'], "https://kitsu.app/manga/{$base['slug']}");
}
$data = [
@ -134,7 +134,7 @@ final class MangaTransformer extends AbstractTransformer
'title' => $title,
'titles' => $titles,
'titles_more' => $titles_more,
'url' => "https://kitsu.io/manga/{$base['slug']}",
'url' => "https://kitsu.app/manga/{$base['slug']}",
];
return MangaPage::from($data);

View File

@ -2,7 +2,7 @@ schema: schema.graphql
extensions:
endpoints:
Kitsu:
url: https://kitsu.io/api/graphql
url: https://kitsu.app/api/graphql
headers:
user-agent: JS GraphQL
introspect: true

File diff suppressed because it is too large Load Diff

View File

@ -227,9 +227,9 @@ class Controller
protected function renderFullPage(HtmlView $view, string $template, array $data): HtmlView
{
$csp = [
"default-src 'self' media.kitsu.io kitsu-production-media.s3.us-west-002.backblazeb2.com",
"default-src 'self' media.kitsu.app kitsu-production-media.s3.us-west-002.backblazeb2.com",
"object-src 'none'",
"child-src 'self' *.youtube.com polyfill.io",
"child-src 'self' *.youtube.com",
];
$data = array_merge($this->baseData ?? [], $data);

View File

@ -40,7 +40,7 @@ final class Images extends BaseController
{
$currentUrl = (string) $this->request->getUri();
$kitsuUrl = 'https://media.kitsu.io/';
$kitsuUrl = 'https://media.kitsu.app/';
$fileName = str_replace('-original', '', $file);
[$id, $ext] = explode('.', basename($fileName));

View File

@ -23,14 +23,14 @@ use const PHP_URL_HOST;
*/
final class Kitsu
{
public const AUTH_URL = 'https://kitsu.io/api/oauth/token';
public const AUTH_URL = 'https://kitsu.app/api/oauth/token';
public const AUTH_USER_ID_KEY = 'kitsu-auth-userid';
public const AUTH_TOKEN_CACHE_KEY = 'kitsu-auth-token';
public const AUTH_TOKEN_EXP_CACHE_KEY = 'kitsu-auth-token-expires';
public const AUTH_TOKEN_REFRESH_CACHE_KEY = 'kitsu-auth-token-refresh';
public const ANIME_HISTORY_LIST_CACHE_KEY = 'kitsu-anime-history-list';
public const MANGA_HISTORY_LIST_CACHE_KEY = 'kitsu-manga-history-list';
public const GRAPHQL_ENDPOINT = 'https://kitsu.io/api/graphql';
public const GRAPHQL_ENDPOINT = 'https://kitsu.app/api/graphql';
/**
* Determine whether an anime is airing, finished airing, or has not yet aired

View File

View File

@ -4,7 +4,7 @@
mal_id: '28091'
chapters: { read: 94, total: '-' }
volumes: { read: '-', total: '-' }
manga: { empty: false, genres: { }, id: '21733', image: 'https://media.kitsu.io/manga/poster_images/21733/small.jpg', slug: tonari-no-seki-kun, title: 'Tonari no Seki-kun', titles: ['My Neighbour Seki', となりの関くん], type: Manga, url: 'https://kitsu.io/manga/tonari-no-seki-kun' }
manga: { empty: false, genres: { }, id: '21733', image: 'https://media.kitsu.io/manga/poster_images/21733/small.jpg', slug: tonari-no-seki-kun, title: 'Tonari no Seki-kun', titles: ['My Neighbour Seki', となりの関くん], type: Manga, url: 'https://kitsu.app/manga/tonari-no-seki-kun' }
reading_status: current
notes: ''
rereading: false
@ -16,7 +16,7 @@
mal_id: '60815'
chapters: { read: 87, total: '-' }
volumes: { read: '-', total: '-' }
manga: { empty: false, genres: { }, id: '25491', image: 'https://media.kitsu.io/manga/poster_images/25491/small.jpg', slug: joshikausei, title: Joshikausei, titles: [女子かう生], type: Manga, url: 'https://kitsu.io/manga/joshikausei' }
manga: { empty: false, genres: { }, id: '25491', image: 'https://media.kitsu.io/manga/poster_images/25491/small.jpg', slug: joshikausei, title: Joshikausei, titles: [女子かう生], type: Manga, url: 'https://kitsu.app/manga/joshikausei' }
reading_status: current
notes: 'Wordless, and it works.'
rereading: false

View File

@ -11,7 +11,7 @@ genres:
- 'Slice of Life'
links:
Anilist: 'https://anilist.co/anime/56769/'
Kitsu: 'https://kitsu.io/manga/bokura-wa-minna-kawaisou'
Kitsu: 'https://kitsu.app/manga/bokura-wa-minna-kawaisou'
MyAnimeList: 'https://myanimelist.net/manga/26769'
id: '20286'
manga_type: MANGA
@ -26,5 +26,5 @@ titles:
titles_more:
- 'The Kawai Complex Guide to Manors and Hostel'
- 僕らはみんな河合荘
url: 'https://kitsu.io/manga/bokura-wa-minna-kawaisou'
url: 'https://kitsu.app/manga/bokura-wa-minna-kawaisou'
volume_count: 10

View File

@ -1,7 +1,7 @@
empty: false
about: 'Web Developer, Anime Fan, Reader of VNs, and web comics.'
avatar: 'https://media.kitsu.io/users/avatars/2644/original.gif'
birthday: 'March 09, 1990 (33 years)'
birthday: 'March 09, 1990 (34 years)'
joinDate: ''
gender: male
favorites:

View File

@ -1,6 +1,6 @@
{
"require": {
"friendsofphp/php-cs-fixer": "^3.6",
"rector/rector": "^0.16.0"
"friendsofphp/php-cs-fixer": "^3.52.1",
"rector/rector": "^1.0.3"
}
}