4 Commits

10 changed files with 978 additions and 683 deletions

View File

@@ -20,6 +20,12 @@ const NICETYPES = {
move: 'move',
udate: 'update'
}
const NAMECOMPLIANCE = [
p => p.replace(/([a-zA-Z0-9]+)\+([a-zA-Z]+)/g, '$1-$2'),
p => p.replace(/\+/g, "plus"),
p => p.replace(/[^a-zA-Z0-9_\-\.]/g, "-"),
p => p.replace(/[_\-]{2,}/g, "-")
]
class Daemon {
@@ -185,7 +191,7 @@ class Daemon {
// "package" is "reserved"
const reservethis = l.trim().replace(EXTRASPACE, ' ');
if (reservethis.length > 0 && reservethis.indexOf('Package basename') < 0) {
packages.push(reservethis.split(' ', 2)[0]);
packages.push(NAMECOMPLIANCE.reduce((s, fn) => fn(s), reservethis.split(' ', 2)[0]));
}
});
return packages;

View File

@@ -12,8 +12,6 @@ services:
- artix-notifier-web
environment:
COMPONENT: "daemon"
ARTIX_MIRROR: "https://mirrors.qontinuum.space/artixlinux/%s/os/x86_64"
ARCH_MIRROR: "https://mirrors.qontinuum.space/archlinux/%s/os/x86_64"
ARTIX_REPOS: "system-goblins,world-goblins,system-gremlins,world-gremlins,system,world"
ARCH_REPOS: "core-staging,extra-staging,core-testing,extra-testing,core,extra"

View File

@@ -21,6 +21,7 @@ class IRCBot {
}
else {
res.status(500).send('offline');
process.exit(1);
}
});

1616
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
{
"name": "artix-packy-notifier",
"version": "4.0.3",
"version": "4.0.7",
"description": "Determine packages that need attention",
"main": "index.js",
"scripts": {
@@ -23,20 +23,20 @@
},
"homepage": "https://gitlab.com/sanin.dev/artix-packy-notifier#readme",
"dependencies": {
"better-sqlite3": "11.1.2",
"dayjs": "1.11.12",
"better-sqlite3": "11.7.2",
"dayjs": "1.11.13",
"ejs": "3.1.10",
"express": "4.19.2",
"irc-framework": "4.13.1",
"express": "4.21.2",
"irc-framework": "4.14.0",
"json5": "2.2.3",
"node-cron": "3.0.3",
"phin": "3.7.1",
"prom-client": "15.1.3",
"sharp": "0.33.4"
"sharp": "0.33.5"
},
"devDependencies": {
"csso": "5.0.5",
"sass": "1.77.8",
"uglify-js": "3.19.0"
"sass": "1.83.1",
"uglify-js": "3.19.3"
}
}

View File

@@ -164,14 +164,14 @@ table tr td:last-child {
}
}
@media screen and (max-width:790px) {
@media screen and (max-width:910px) {
.container {
width: initial;
margin: .5em .5em;
}
}
@media screen and (max-width:660px) {
@media screen and (max-width:740px) {
header {
nav {
float: initial;

View File

@@ -9,6 +9,6 @@
<meta name="apple-mobile-web-app-title" content="Artix Checkupdates">
<meta name="application-name" content="Artix Checkupdates">
<meta name="theme-color" content="#212121">
<link rel="stylesheet" href="/assets/css/styles.css?v=2">
<link rel="stylesheet" href="/assets/css/styles.css?v=3">
<link rel="shortcut icon" href="/assets/svg/artix_logo.svg">
</head>

View File

@@ -10,6 +10,7 @@
<li><a href="https://forum.artixlinux.org/">Forum</a></li>
<li><a href="https://wiki.artixlinux.org/">Wiki</a></li>
<li><a href="https://gitea.artixlinux.org/explore/repos">Sources</a></li>
<li><a href="https://packages.artixlinux.org/">Packages</a></li>
</ul>
</nav>
</header>

View File

@@ -30,4 +30,5 @@
<% }); %>
</table>
</div>
<%- include("footer", locals) %>
</body>

10
web.js
View File

@@ -10,20 +10,14 @@ const PROJECT_ROOT = __dirname;
const VIEWOPTIONS = {
outputFunctionName: 'echo'
};
const NAMECOMPLIANCE = [
p => p.replace(/([a-zA-Z0-9]+)\+([a-zA-Z]+)/g, '$1-$2'),
p => p.replace(/\+/g, "plus"),
p => p.replace(/[^a-zA-Z0-9_\-\.]/g, "-"),
p => p.replace(/[_\-]{2,}/g, "-")
]
function inliner(file) {
return fs.readFileSync(path.join(PROJECT_ROOT, file));
}
function packageUrl(p) {
let packagename = typeof p === 'string' ? p : p.package;
return `https://gitea.artixlinux.org/packages/${NAMECOMPLIANCE.reduce((s, fn) => fn(s), packagename)}`;
const packagename = typeof p === 'string' ? p : p.package;
return `https://gitea.artixlinux.org/packages/${packagename}`;
}
function prepPackages(arr, action) {