chore: tighten yonexus v1 validation flow
This commit is contained in:
@@ -15,11 +15,17 @@ run_step() {
|
||||
ensure_node_modules() {
|
||||
local dir="$1"
|
||||
|
||||
if [[ ! -d "$ROOT_DIR/$dir/node_modules" ]]; then
|
||||
echo "Missing dependencies in $dir (node_modules not found)."
|
||||
echo "Run: (cd '$ROOT_DIR/$dir' && npm install)"
|
||||
return 1
|
||||
if [[ -d "$ROOT_DIR/$dir/node_modules" ]]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
local install_cmd="npm install"
|
||||
if [[ -f "$ROOT_DIR/$dir/package-lock.json" ]]; then
|
||||
install_cmd="npm ci"
|
||||
fi
|
||||
|
||||
echo "Dependencies missing in $dir (node_modules not found). Bootstrapping with: ${install_cmd}"
|
||||
run_step "${dir}: ${install_cmd}" bash -lc "cd '$ROOT_DIR/$dir' && ${install_cmd}"
|
||||
}
|
||||
|
||||
run_npm_script() {
|
||||
@@ -30,6 +36,7 @@ run_npm_script() {
|
||||
run_step "${dir}: npm run ${script}" bash -lc "cd '$ROOT_DIR/$dir' && npm run ${script}"
|
||||
}
|
||||
|
||||
run_npm_script "Yonexus.Protocol" check
|
||||
run_npm_script "Yonexus.Protocol" test
|
||||
run_npm_script "Yonexus.Server" check
|
||||
run_npm_script "Yonexus.Server" test
|
||||
|
||||
Reference in New Issue
Block a user