fix(installer): use core.common in runtime healthcheck and fix CLI guard in ucode modules
This commit is contained in:
@@ -64,4 +64,7 @@ grep -Fq "export const FAKEIP_CHECK_DOMAIN = 'fakeip.podkop.fyi';" "$FRONTEND_CO
|
||||
grep -Fq "export const IP_CHECK_DOMAIN = 'ip.podkop.fyi';" "$FRONTEND_CONSTANTS" ||
|
||||
fail "LuCI diagnostics must use the deployed public IP endpoint"
|
||||
|
||||
ucode -L "$TACHYON_LIB" -e 'let c = require("core.constants"); exit(c.TACHYON_CONFIG_NAME == "tachyon" ? 0 : 1);' || \
|
||||
fail "requiring core.constants from inline eval failed"
|
||||
|
||||
printf 'constants ownership checks passed\n'
|
||||
|
||||
@@ -69,6 +69,7 @@ if grep -qi 'jsdelivr' "$INSTALLER"; then
|
||||
fi
|
||||
|
||||
grep -Fq '/usr/bin/tachyon component_action sing_box "$_action"' "$INSTALLER" || fail "sing-box must be delegated to component_action"
|
||||
grep -Fq 'require("core.common")' "$INSTALLER" || fail "runtime healthcheck must require core.common"
|
||||
|
||||
export TACHYON_INSTALLER_TEST=1
|
||||
# shellcheck source=/dev/null
|
||||
|
||||
Reference in New Issue
Block a user