- Установщик (install.sh): внедрена верификация хешей sha256sums.txt, нормализована очерёдность бутстрапа ucode до языковых проверок. - Сборщик (build.sh): добавлена автоматическая генерация sha256sums.txt для пакетов релиза. - Бэкенд: права на honeypot FIFO ограничены до 0660 в watchdog.uc, исправлена опечатка в SUBNETS_TELEGRAM, удалён helpers.old.uc. - Тесты бэкенда: написаны тесты для core_ip, core_url и config_connections. - Фронтенд: реализовано автопереподключение WebSocket с экспоненциальным бэкоффом, проведена дедупликация виджетов и модальных окон в initController.ts, мигрирован CSS-префикс с fkp_ на tachyon_. - Тесты фронтенда: добавлен initController.test.ts для тестирования загрузки дашборда.
37 lines
1.2 KiB
Bash
37 lines
1.2 KiB
Bash
#!/usr/bin/env bash
|
|
set -eo pipefail
|
|
|
|
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
TACHYON_LIB="$ROOT_DIR/tachyon/files/usr/lib"
|
|
|
|
ucode -L "$TACHYON_LIB" -e '
|
|
let url = require("core.url");
|
|
|
|
function assert(val, msg) {
|
|
if (!val) {
|
|
warn("Assertion failed: " + msg + "\n");
|
|
exit(1);
|
|
}
|
|
}
|
|
|
|
// scheme
|
|
assert(url.scheme("http://example.com") == "http", "scheme of http");
|
|
assert(url.scheme("HTTPS://example.com") == "https", "scheme of HTTPS should be lowercase");
|
|
assert(url.scheme("example.com") == "", "no scheme");
|
|
|
|
// fragment
|
|
assert(url.fragment("http://example.com#test") == "test", "fragment of url");
|
|
assert(url.fragment("http://example.com#test+space") == "test space", "fragment space decoding");
|
|
assert(url.fragment("http://example.com") == "", "no fragment");
|
|
|
|
// strip_fragment
|
|
assert(url.strip_fragment("http://example.com#test") == "http://example.com", "strip fragment");
|
|
assert(url.strip_fragment("http://example.com") == "http://example.com", "strip no fragment");
|
|
|
|
// strip_anchored_scheme
|
|
assert(url.strip_anchored_scheme("http://example.com") == "example.com", "strip anchored http");
|
|
assert(url.strip_anchored_scheme("example.com") == "example.com", "strip no scheme");
|
|
'
|
|
|
|
printf 'core/url checks passed\n'
|