11 Commits

Author SHA1 Message Date
f767a9483b v4.1.6 2025-11-05 17:54:32 -05:00
b9a95f1c61 bump dependencies 2025-11-05 17:53:37 -05:00
bea25616a0 4.1.5 2025-10-09 23:30:54 -05:00
ace2c3c180 update dependencies 2025-08-18 14:25:38 -05:00
3019f9132f omit dev 2025-06-17 15:51:28 -05:00
a04ffade6f install python 2025-06-17 15:46:54 -05:00
a243892fd4 bump dependencies 2025-06-17 15:38:46 -05:00
1db899b5c8 4.1.2: dependencies 2025-05-04 12:55:07 -05:00
fc71bc08db Merge pull request #2 from CorySanin/dependabot/npm_and_yarn/tar-fs-2.1.2
Bump tar-fs from 2.1.1 to 2.1.2
2025-05-04 12:46:38 -05:00
dependabot[bot]
c560100a8b Bump tar-fs from 2.1.1 to 2.1.2
Bumps [tar-fs](https://github.com/mafintosh/tar-fs) from 2.1.1 to 2.1.2.
- [Commits](https://github.com/mafintosh/tar-fs/compare/v2.1.1...v2.1.2)

---
updated-dependencies:
- dependency-name: tar-fs
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-28 23:57:01 +00:00
3c34a98e67 4.1.1: use build script package 2025-03-18 21:28:13 -05:00
5 changed files with 1288 additions and 1065 deletions

View File

@@ -6,7 +6,7 @@ FROM baseimg AS build-env
WORKDIR /usr/notifier
RUN pacman -Sy --noconfirm nodejs npm typescript
RUN pacman -Sy --noconfirm nodejs npm typescript python
COPY package*.json ./
@@ -16,7 +16,7 @@ COPY . .
RUN tsc && \
npm run-script build && \
npm ci --only=production
npm ci --omit=dev
FROM baseimg AS deploy
@@ -47,6 +47,5 @@ ENV ARTIX_MIRROR="https://mirror.sanin.dev/artix-linux/%s/os/x86_64/"
ENV ARCH_MIRROR="https://mirror.sanin.dev/arch-linux/%s/os/x86_64/"
ENV ARTIX_REPOS="system-goblins,world-goblins,galaxy-goblins,lib32-goblins,system-gremlins,world-gremlins,galaxy-gremlins,lib32-gremlins,system,world,galaxy,lib32"
ENV ARCH_REPOS="core-staging,extra-staging,multilib-staging,core-testing,extra-testing,multilib-testing,core,extra,multilib"
ENV GITEA_TOKEN="CHANGEME"
CMD [ "node", "distribution/index.mjs"]

View File

@@ -39,7 +39,7 @@ node distribution/index.mjs
## Docker Setup
Image : `registry.gitlab.com/sanin.dev/artix-packy-notifier`
Image : `ghcr.io/corysanin/artix-checkupdates-web:latest`
mount a folder to `/usr/notifier/config`.

2298
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,12 +1,12 @@
{
"name": "artix-checkupdates-web",
"version": "4.1.0",
"version": "4.1.6",
"description": "Determine packages that need attention",
"main": "./distribution/index.js",
"type": "module",
"scripts": {
"build": "node --experimental-strip-types build/build.ts",
"watch": "node --experimental-strip-types build/build.ts --watch"
"build": "npx build-shit",
"watch": "npx build-shit --watch"
},
"repository": {
"type": "git",
@@ -30,29 +30,26 @@
},
"homepage": "https://github.com/CorySanin/artix-checkupdates-web#readme",
"dependencies": {
"artix-checkupdates": "1.0.1",
"better-sqlite3": "11.8.1",
"dayjs": "1.11.13",
"artix-checkupdates": "1.1.0",
"better-sqlite3": "12.4.1",
"dayjs": "1.11.19",
"ejs": "3.1.10",
"express": "4.21.2",
"express-useragent": "1.0.15",
"express": "5.1.0",
"express-useragent": "2.0.1",
"irc-framework": "4.14.0",
"json5": "2.2.3",
"ky": "1.7.4",
"node-cron": "3.0.3",
"ky": "1.14.0",
"node-cron": "4.2.1",
"prom-client": "15.1.3",
"sharp": "0.33.5"
"sharp": "0.34.4"
},
"devDependencies": {
"@sindresorhus/tsconfig": "7.0.0",
"@types/better-sqlite3": "^7.6.12",
"@types/express": "^5.0.0",
"@sindresorhus/tsconfig": "8.1.0",
"@types/better-sqlite3": "7.6.13",
"@types/express": "5.0.5",
"@types/express-useragent": "1.0.5",
"@types/node": "22.10.7",
"@types/node-cron": "3.0.11",
"csso": "5.0.5",
"sass": "1.83.1",
"typescript": "5.7.3",
"uglify-js": "3.19.3"
"@types/node": "^24.10.0",
"forking-build-shit":"1.0.5",
"typescript": "5.9.3"
}
}

View File

@@ -2,13 +2,12 @@ import fs from 'fs';
import * as fsp from 'node:fs/promises';
import { DB } from './db.mjs';
import express from 'express';
import exuseragent from 'express-useragent';
import * as useragent from 'express-useragent';
import prom from 'prom-client';
import sharp from 'sharp';
import * as path from 'path';
import type http from "http";
import type { Request, Response } from "express";
import type { Details } from "express-useragent";
import type { Config } from './config.js';
import type { PackageDBEntry } from './db.mjs';
import type { SaveData } from './daemon.mjs';
@@ -132,11 +131,11 @@ class Web {
app.set('view engine', 'ejs');
app.set('view options', VIEWOPTIONS);
app.use(exuseragent.express());
app.use(useragent.express());
function sendError(req: Request, res: Response, status: number, description: string) {
console.log(`${status} (${description}): ${req.url} requested by ${req.ip} "${req.headers['user-agent']}"`);
if ((req.useragent as Details).browser === 'curl') {
if (req.useragent?.browser === 'curl') {
res.send('404: not found\n');
return;
}
@@ -179,7 +178,7 @@ class Web {
app.get('/', async (req, res) => {
let packages = prepPackages(saveData.move, 'Move');
packages = packages.concat(prepPackages(saveData.update, 'Update'));
if ((req.useragent as Details).browser === 'curl') {
if (req.useragent?.browser === 'curl') {
res.send(renderForCurl(packages));
return;
}
@@ -211,7 +210,7 @@ class Web {
let packages = prepPackages(db.getPackagesByMaintainer(maintainer, 'move'), 'Move');
packages = packages.concat(prepPackages(db.getPackagesByMaintainer(maintainer, 'udate'), 'Update'));
if (packagesOwned > 0) {
if ((req.useragent as Details).browser === 'curl') {
if (req.useragent?.browser === 'curl') {
res.send(`${maintainer}'s pending actions\n\n${renderForCurl(packages)}`);
return;
}