From 46ce0fbec5d345dbaf789704f5c889e29f946517 Mon Sep 17 00:00:00 2001 From: Carlos Santos <4a.santos@gmail.com> Date: Tue, 21 Oct 2025 12:55:23 +0200 Subject: [PATCH] Add REST API docs watcher commands and update nodemon configuration --- meet-ce/backend/nodemon.docs.json | 2 +- meet.sh | 21 +++++++++++++-------- package.json | 1 + 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/meet-ce/backend/nodemon.docs.json b/meet-ce/backend/nodemon.docs.json index 090f793..b07d3a0 100644 --- a/meet-ce/backend/nodemon.docs.json +++ b/meet-ce/backend/nodemon.docs.json @@ -1,5 +1,5 @@ { - "watch": ["openapi/**/*.yaml", "openapi/**/*.yml"], + "watch": ["meet-ce/**/**/openapi/**/*.yaml", "meet-ce/**/**/openapi/**/*.yml"], "ext": "yaml,yml", "ignore": [], "exec": "pnpm --filter @openvidu-meet/backend run doc:api && pnpm --filter @openvidu-meet/backend run doc:internal-api && echo '✅ OpenVidu Meet REST API docs updated successfully!'" diff --git a/meet.sh b/meet.sh index a0a0c3b..8747a14 100755 --- a/meet.sh +++ b/meet.sh @@ -392,6 +392,11 @@ add_ce_commands() { local components_path="$1" local shared_meet_components_path="$2" + # REST API docs watcher + CMD_NAMES+=("rest-api-docs") + CMD_COLORS+=("bgGray") + CMD_COMMANDS+=("pnpm run dev:rest-api-docs") + # Run backend CMD_NAMES+=("backend") CMD_COLORS+=("cyan") @@ -408,6 +413,11 @@ add_pro_commands() { local components_path="$1" local shared_meet_components_path="$2" + # REST API docs watcher + CMD_NAMES+=("rest-api-docs") + CMD_COLORS+=("bgGray") + CMD_COMMANDS+=("pnpm run dev:pro-rest-api-docs") + # Run backend-pro CMD_NAMES+=("backend-pro") CMD_COLORS+=("cyan") @@ -430,14 +440,9 @@ add_pro_commands() { } # Helper: Add REST API docs and browser-sync commands -add_docs_and_browsersync_commands() { +add_browsersync_commands() { local browsersync_path="$1" - # REST API docs watcher - CMD_NAMES+=("rest-api-docs") - CMD_COLORS+=("bgGray") - CMD_COMMANDS+=("pnpm run dev:rest-api-docs") - # Browser-sync for live reload CMD_NAMES+=("browser-sync") CMD_COLORS+=("bgWhite.black") @@ -536,8 +541,8 @@ dev() { add_ce_commands "$components_path" "$shared_meet_components_path" fi - # Add docs and browser-sync commands - add_docs_and_browsersync_commands "$browsersync_path" + # Add browser-sync commands + add_browsersync_commands "$browsersync_path" # Launch all watchers launch_dev_watchers "$edition" "$components_path" diff --git a/package.json b/package.json index 8bb53b4..f310e23 100644 --- a/package.json +++ b/package.json @@ -20,6 +20,7 @@ "dev:testapp": "pnpm --filter testapp run dev", "dev:typings": "pnpm --filter @openvidu-meet/typings run dev", "dev:rest-api-docs": "nodemon --config meet-ce/backend/nodemon.docs.json", + "dev:pro-rest-api-docs": "nodemon --config meet-pro/backend/nodemon.docs.json", "start:testapp": "pnpm --filter testapp run start", "test:integration-backend": "pnpm --filter @openvidu-meet/backend run test:integration", "test:integration-backend-rooms": "pnpm --filter @openvidu-meet/backend run test:integration-rooms",