From 1fa52df2de67ec5017da6703f5e4a380ca504829 Mon Sep 17 00:00:00 2001 From: Abhishek Kumar Date: Tue, 21 Apr 2026 15:27:16 +0530 Subject: [PATCH] chore: run npm install in ts_validator in start scripts --- scripts/rolling_update.sh | 9 +++++++++ scripts/start_services.sh | 11 ++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/scripts/rolling_update.sh b/scripts/rolling_update.sh index b98bb77..077b371 100755 --- a/scripts/rolling_update.sh +++ b/scripts/rolling_update.sh @@ -201,6 +201,15 @@ if ! alembic -c "$BASE_DIR/api/alembic.ini" upgrade head; then fi log_info "Migrations complete" +TS_VALIDATOR_DIR="$BASE_DIR/api/mcp_server/ts_validator" +if [[ -f "$TS_VALIDATOR_DIR/package.json" ]]; then + log_info "Installing ts_validator npm dependencies" + if ! (cd "$TS_VALIDATOR_DIR" && npm install); then + log_error "npm install for ts_validator failed. Aborting — nothing has been touched." + exit 1 + fi +fi + ############################################################################### ### PHASE 2: START NEW WORKERS ############################################################################### diff --git a/scripts/start_services.sh b/scripts/start_services.sh index f4c1470..2dd9f9f 100755 --- a/scripts/start_services.sh +++ b/scripts/start_services.sh @@ -108,7 +108,16 @@ NGINX_UPSTREAM_TEMPLATE="$BASE_DIR/nginx/dograh_upstream.conf.template" NGINX_UPSTREAM_CONF="/etc/nginx/conf.d/dograh_upstream.conf" ############################################################################### -### 4) Run migrations +### 4) Install ts_validator npm dependencies +############################################################################### + +TS_VALIDATOR_DIR="$BASE_DIR/api/mcp_server/ts_validator" +if [[ -f "$TS_VALIDATOR_DIR/package.json" ]]; then + (cd "$TS_VALIDATOR_DIR" && npm install) +fi + +############################################################################### +### 5) Run migrations ############################################################################### alembic -c "$BASE_DIR/api/alembic.ini" upgrade head