Compare commits

...

2 commits

Author SHA1 Message Date
07a36f99dd fix crash on git server being unavalible 2024-12-16 10:59:57 +00:00
959320f060 add node as dev depend until µws supports node 23
the arch package for node has been node 23 and µws still does not support it so this is an intirim workaround.
2024-12-16 10:59:34 +00:00
3 changed files with 36 additions and 6 deletions

View file

@ -50,13 +50,17 @@ export default class ApiController extends Controller {
if (Date.now() < cacheExpiry) { if (Date.now() < cacheExpiry) {
this.ok(cachedClient); this.ok(cachedClient);
} else { } else {
const response = await fetch(`http://${Config.githost}/tgpholly/t00-multiuser/raw/branch/master/client/Terminal-00-Multiuser.user.js?${Date.now()}`); fetch(`http://${Config.githost}/tgpholly/t00-multiuser/raw/branch/master/client/Terminal-00-Multiuser.user.js?${Date.now()}`)
.then(async response => {
if (response.status === 200) { if (response.status === 200) {
cachedClient = await response.text(); cachedClient = await response.text();
return this.ok(cachedClient); return this.ok(cachedClient);
} else { } else {
return this.badRequest(); return this.badRequest();
} }
}).catch(() => {
return this.badRequest();
});
} }
} }
} }

View file

@ -26,6 +26,7 @@
"@types/node": "^22.10.2", "@types/node": "^22.10.2",
"@vercel/ncc": "^0.38.3", "@vercel/ncc": "^0.38.3",
"check-outdated": "^2.12.0", "check-outdated": "^2.12.0",
"node": "^22.12.0",
"nodemon": "^3.1.9", "nodemon": "^3.1.9",
"npm-run-all": "^4.1.5", "npm-run-all": "^4.1.5",
"terser": "^5.37.0", "terser": "^5.37.0",
@ -2255,6 +2256,30 @@
"integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==",
"dev": true "dev": true
}, },
"node_modules/node": {
"version": "22.12.0",
"resolved": "https://registry.npmjs.org/node/-/node-22.12.0.tgz",
"integrity": "sha512-Tg4X/MMYSfFNt18iNyqI5TTHvzhqi7A3e11BXRb085L7e5RYfC9PjsJhsvUB7SNwoyI7GCJhfFR73UAzRi6/cg==",
"dev": true,
"hasInstallScript": true,
"license": "ISC",
"dependencies": {
"node-bin-setup": "^1.0.0"
},
"bin": {
"node": "bin/node"
},
"engines": {
"npm": ">=5.0.0"
}
},
"node_modules/node-bin-setup": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/node-bin-setup/-/node-bin-setup-1.1.3.tgz",
"integrity": "sha512-opgw9iSCAzT2+6wJOETCpeRYAQxSopqQ2z+N6BXwIMsQQ7Zj5M8MaafQY8JMlolRR6R1UXg2WmhKp0p9lSOivg==",
"dev": true,
"license": "ISC"
},
"node_modules/nodemon": { "node_modules/nodemon": {
"version": "3.1.9", "version": "3.1.9",
"resolved": "https://registry.npmjs.org/nodemon/-/nodemon-3.1.9.tgz", "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-3.1.9.tgz",

View file

@ -29,6 +29,7 @@
"@types/node": "^22.10.2", "@types/node": "^22.10.2",
"@vercel/ncc": "^0.38.3", "@vercel/ncc": "^0.38.3",
"check-outdated": "^2.12.0", "check-outdated": "^2.12.0",
"node": "^22.12.0",
"nodemon": "^3.1.9", "nodemon": "^3.1.9",
"npm-run-all": "^4.1.5", "npm-run-all": "^4.1.5",
"terser": "^5.37.0", "terser": "^5.37.0",