Compare commits
4 Commits
568e9d186e
...
d07f02f4a2
| Author | SHA1 | Date | |
|---|---|---|---|
| d07f02f4a2 | |||
| fb44cf636f | |||
| 768b69ce08 | |||
| 0a63914127 |
@@ -20,6 +20,12 @@ const NICETYPES = {
|
|||||||
move: 'move',
|
move: 'move',
|
||||||
udate: 'update'
|
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 {
|
class Daemon {
|
||||||
|
|
||||||
@@ -185,7 +191,7 @@ class Daemon {
|
|||||||
// "package" is "reserved"
|
// "package" is "reserved"
|
||||||
const reservethis = l.trim().replace(EXTRASPACE, ' ');
|
const reservethis = l.trim().replace(EXTRASPACE, ' ');
|
||||||
if (reservethis.length > 0 && reservethis.indexOf('Package basename') < 0) {
|
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;
|
return packages;
|
||||||
|
|||||||
@@ -12,8 +12,6 @@ services:
|
|||||||
- artix-notifier-web
|
- artix-notifier-web
|
||||||
environment:
|
environment:
|
||||||
COMPONENT: "daemon"
|
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"
|
ARTIX_REPOS: "system-goblins,world-goblins,system-gremlins,world-gremlins,system,world"
|
||||||
ARCH_REPOS: "core-staging,extra-staging,core-testing,extra-testing,core,extra"
|
ARCH_REPOS: "core-staging,extra-staging,core-testing,extra-testing,core,extra"
|
||||||
|
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ class IRCBot {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
res.status(500).send('offline');
|
res.status(500).send('offline');
|
||||||
|
process.exit(1);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
1616
package-lock.json
generated
1616
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
16
package.json
16
package.json
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "artix-packy-notifier",
|
"name": "artix-packy-notifier",
|
||||||
"version": "4.0.3",
|
"version": "4.0.7",
|
||||||
"description": "Determine packages that need attention",
|
"description": "Determine packages that need attention",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
@@ -23,20 +23,20 @@
|
|||||||
},
|
},
|
||||||
"homepage": "https://gitlab.com/sanin.dev/artix-packy-notifier#readme",
|
"homepage": "https://gitlab.com/sanin.dev/artix-packy-notifier#readme",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"better-sqlite3": "11.1.2",
|
"better-sqlite3": "11.7.2",
|
||||||
"dayjs": "1.11.12",
|
"dayjs": "1.11.13",
|
||||||
"ejs": "3.1.10",
|
"ejs": "3.1.10",
|
||||||
"express": "4.19.2",
|
"express": "4.21.2",
|
||||||
"irc-framework": "4.13.1",
|
"irc-framework": "4.14.0",
|
||||||
"json5": "2.2.3",
|
"json5": "2.2.3",
|
||||||
"node-cron": "3.0.3",
|
"node-cron": "3.0.3",
|
||||||
"phin": "3.7.1",
|
"phin": "3.7.1",
|
||||||
"prom-client": "15.1.3",
|
"prom-client": "15.1.3",
|
||||||
"sharp": "0.33.4"
|
"sharp": "0.33.5"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"csso": "5.0.5",
|
"csso": "5.0.5",
|
||||||
"sass": "1.77.8",
|
"sass": "1.83.1",
|
||||||
"uglify-js": "3.19.0"
|
"uglify-js": "3.19.3"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -164,14 +164,14 @@ table tr td:last-child {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media screen and (max-width:790px) {
|
@media screen and (max-width:910px) {
|
||||||
.container {
|
.container {
|
||||||
width: initial;
|
width: initial;
|
||||||
margin: .5em .5em;
|
margin: .5em .5em;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media screen and (max-width:660px) {
|
@media screen and (max-width:740px) {
|
||||||
header {
|
header {
|
||||||
nav {
|
nav {
|
||||||
float: initial;
|
float: initial;
|
||||||
|
|||||||
@@ -9,6 +9,6 @@
|
|||||||
<meta name="apple-mobile-web-app-title" content="Artix Checkupdates">
|
<meta name="apple-mobile-web-app-title" content="Artix Checkupdates">
|
||||||
<meta name="application-name" content="Artix Checkupdates">
|
<meta name="application-name" content="Artix Checkupdates">
|
||||||
<meta name="theme-color" content="#212121">
|
<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">
|
<link rel="shortcut icon" href="/assets/svg/artix_logo.svg">
|
||||||
</head>
|
</head>
|
||||||
@@ -10,6 +10,7 @@
|
|||||||
<li><a href="https://forum.artixlinux.org/">Forum</a></li>
|
<li><a href="https://forum.artixlinux.org/">Forum</a></li>
|
||||||
<li><a href="https://wiki.artixlinux.org/">Wiki</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://gitea.artixlinux.org/explore/repos">Sources</a></li>
|
||||||
|
<li><a href="https://packages.artixlinux.org/">Packages</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
</header>
|
</header>
|
||||||
|
|||||||
@@ -30,4 +30,5 @@
|
|||||||
<% }); %>
|
<% }); %>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
<%- include("footer", locals) %>
|
||||||
</body>
|
</body>
|
||||||
10
web.js
10
web.js
@@ -10,20 +10,14 @@ const PROJECT_ROOT = __dirname;
|
|||||||
const VIEWOPTIONS = {
|
const VIEWOPTIONS = {
|
||||||
outputFunctionName: 'echo'
|
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) {
|
function inliner(file) {
|
||||||
return fs.readFileSync(path.join(PROJECT_ROOT, file));
|
return fs.readFileSync(path.join(PROJECT_ROOT, file));
|
||||||
}
|
}
|
||||||
|
|
||||||
function packageUrl(p) {
|
function packageUrl(p) {
|
||||||
let packagename = typeof p === 'string' ? p : p.package;
|
const packagename = typeof p === 'string' ? p : p.package;
|
||||||
return `https://gitea.artixlinux.org/packages/${NAMECOMPLIANCE.reduce((s, fn) => fn(s), packagename)}`;
|
return `https://gitea.artixlinux.org/packages/${packagename}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
function prepPackages(arr, action) {
|
function prepPackages(arr, action) {
|
||||||
|
|||||||
Reference in New Issue
Block a user