invoiceninja-ui

LOW
maintainer lifespirit 0 votes scanned 2026-11-05 00:08:17.114294
View on AUR
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
4pkgname=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.
7pkgver=2026.10.06.1
8pkgrel=1
9_upstream_tag=06.10.2026.1
10pkgdesc='React administration frontend for Invoice Ninja'
11arch=('any')
12url='https://github.com/invoiceninja/ui'
13license=('LicenseRef-ELv2')
14depends=('invoiceninja')
15makedepends=('unzip' 'python')
16source=(
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)
20sha256sums=(
21 '60951faee8e103f7e231c4e7796e549f3e47e4f17d7839ab467d2a842d464fcb'
22 'SKIP'
23)
24
25prepare() {
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'
31from pathlib import Path
32import re, sys
33base = Path(sys.argv[1])
34allowed = {'index.html', 'favicon.ico', 'manifest.json', 'robots.txt', 'logo180.png'}
35allowed_dirs = {'react', 'rsms', 'dap-logos', 'docuninja', 'tinymce_6.4.2', 'tinymce_7.9.3', 'gateway-card-images'}
36for entry in base.iterdir():
37 if entry.name not in allowed | allowed_dirs:
38 raise SystemExit(f'Unexpected top-level UI asset: {entry.name}')
39html = (base / 'index.html').read_text()
40for 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}')
46print('UI release layout and HTML assets verified')
47PYTEST
48}
49
50package() {
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)SeverityRules
2026-11-05 00:08:17 Low 1

Report a package

Reports go to the AURWatch maintainer (one person) and are read by hand. No login required.

0 / 4000
Your suggestion