Files
simplex-chat/apps/simplex-support-bot/build.sh
T
Narasimha-sc a9bd27a92f support-bot: use apiCreateMemberContact and apiSendMemberContactInvitation instead of raw commands
Replace sendChatCmd("/_create member contact ...") and sendChatCmd("/_invite member contact ...")
with the typed API methods added in simplex-chat-nodejs. Update plans and build script accordingly.
2026-04-10 12:10:54 +00:00

32 lines
917 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
REPO_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
echo "Building simplex-support-bot..."
# Build @simplex-chat/types (local dependency)
echo "Building @simplex-chat/types..."
cd "$REPO_ROOT/packages/simplex-chat-client/types/typescript"
npm run build
# Build simplex-chat (local dependency — native addon + TypeScript)
echo "Building simplex-chat..."
cd "$REPO_ROOT/packages/simplex-chat-nodejs"
npm run build
# Install and build the bot
echo "Building simplex-support-bot..."
cd "$SCRIPT_DIR"
npm install
# npm install copies file: dependencies, missing the native addon (build/)
# and some dist files. Replace the copy with a symlink to the local package.
rm -rf node_modules/simplex-chat
ln -s "$REPO_ROOT/packages/simplex-chat-nodejs" node_modules/simplex-chat
npm run build
echo "Build complete. Output in $SCRIPT_DIR/dist/"