invoiceninja-ui
LOW
maintainer lifespirit
0 votes
scanned 2026-11-05 00:08:17.114294
Why flagged
Uploaded within the last 14 days with 2 or fewer community votes — little peer review so far.
Triggered rules
Low
Few votes, recently uploaded
zero_votes_recent
Uploaded within the last 14 days with 2 or fewer community votes — little peer review so far.
PKGBUILD
1
# Maintainer: lifespirit <life@crabs.pro>
2
# React admin frontend for Invoice Ninja (separate from the PHP backend).
3
4
pkgname=invoiceninja-ui
5
# Use YYYY.MM.DD.revision, unlike upstream DD.MM.YYYY.revision, so upgrades
6
# remain monotonic across year boundaries according to pacman vercmp.
7
pkgver=2026.10.06.1
8
pkgrel=1
9
_upstream_tag=06.10.2026.1
10
pkgdesc='React administration frontend for Invoice Ninja'
11
arch=('any')
12
url='https://github.com/invoiceninja/ui'
13
license=('LicenseRef-ELv2')
14
depends=('invoiceninja')
15
makedepends=('unzip' 'python')
16
source=(
17
"$pkgname-$pkgver.zip::https://github.com/invoiceninja/ui/releases/download/${_upstream_tag}/invoiceninja-react.zip"
18
"LICENSE::https://raw.githubusercontent.com/invoiceninja/ui/${_upstream_tag}/LICENSE"
19
)
20
sha256sums=(
21
'60951faee8e103f7e231c4e7796e549f3e47e4f17d7839ab467d2a842d464fcb'
22
'SKIP'
23
)
24
25
prepare() {
26
cd "$srcdir"
27
test -s dist/index.html || { echo 'Missing dist/index.html in upstream UI release' >&2; return 1; }
28
test -d dist/react || { echo 'Missing dist/react assets in upstream UI release' >&2; return 1; }
29
# Fail closed if upstream changes release archive layout or public files.
30
python - "$srcdir/dist" <<'PYTEST'
31
from pathlib import Path
32
import re, sys
33
base = Path(sys.argv[1])
34
allowed = {'index.html', 'favicon.ico', 'manifest.json', 'robots.txt', 'logo180.png'}
35
allowed_dirs = {'react', 'rsms', 'dap-logos', 'docuninja', 'tinymce_6.4.2', 'tinymce_7.9.3', 'gateway-card-images'}
36
for entry in base.iterdir():
37
if entry.name not in allowed | allowed_dirs:
38
raise SystemExit(f'Unexpected top-level UI asset: {entry.name}')
39
html = (base / 'index.html').read_text()
40
for path in re.findall(r'(?:src|href)=["\'](/[^"\']+)["\']', html):
41
if path.startswith('//'):
42
continue
43
path = path.split('?', 1)[0]
44
if not (base / path.lstrip('/')).is_file():
45
raise SystemExit(f'React HTML refers to a missing static asset: {path}')
46
print('UI release layout and HTML assets verified')
47
PYTEST
48
}
49
50
package() {
51
local target="$pkgdir/usr/share/webapps/invoiceninja"
52
install -Dm644 "$srcdir/dist/index.html" \
53
"$target/resources/views/react/index.blade.php"
54
55
# Backend already owns favicon.ico, manifest.json, robots.txt and the
56
# gateway-card-images tree. Do NOT overwrite them from the UI package.
57
local asset
58
for asset in react rsms dap-logos docuninja tinymce_6.4.2 tinymce_7.9.3 logo180.png; do
59
if [[ -e "$srcdir/dist/$asset" ]]; then
60
install -d "$target/public"
61
cp -r -- "$srcdir/dist/$asset" "$target/public/$asset"
62
fi
63
done
64
test -d "$target/public/react" || return 1
65
install -Dm644 "$srcdir/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
66
}
67
Scan history
| Scanned at (UTC) | Severity | Rules |
|---|---|---|
| 2026-11-05 00:08:17 | Low | 1 |