2025-06-27 18:14:25 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
# test-npm-package.sh
|
|
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
|
|
echo "🧪 Testing NPM package locally..."
|
|
|
|
|
|
|
|
|
|
# Build the package first
|
|
|
|
|
./build-npm-package.sh
|
|
|
|
|
|
|
|
|
|
cd npx-cli
|
|
|
|
|
|
|
|
|
|
echo "📋 Checking files to be included..."
|
|
|
|
|
npm pack --dry-run
|
|
|
|
|
|
|
|
|
|
echo "📦 Creating package tarball..."
|
|
|
|
|
npm pack
|
|
|
|
|
|
2025-07-04 11:11:45 +02:00
|
|
|
TARBALL=$(pwd)/$(ls vibe-kanban-*.tgz | head -n1)
|
2025-06-27 18:14:25 +01:00
|
|
|
|
|
|
|
|
echo "🧪 Testing main command..."
|
2025-07-04 11:11:45 +02:00
|
|
|
npx -y --package=$TARBALL vibe-kanban &
|
2025-06-27 18:14:25 +01:00
|
|
|
MAIN_PID=$!
|
|
|
|
|
sleep 3
|
|
|
|
|
kill $MAIN_PID 2>/dev/null || true
|
|
|
|
|
wait $MAIN_PID 2>/dev/null || true
|
|
|
|
|
echo "✅ Main app started successfully"
|
|
|
|
|
|
|
|
|
|
echo "🧪 Testing MCP command with complete handshake..."
|
|
|
|
|
|
2025-07-04 11:11:45 +02:00
|
|
|
node ../scripts/mcp_test.js $TARBALL
|
2025-06-27 18:14:25 +01:00
|
|
|
|
|
|
|
|
echo "🧹 Cleaning up..."
|
|
|
|
|
rm "$TARBALL"
|
|
|
|
|
|
|
|
|
|
echo "✅ NPM package test completed successfully!"
|
|
|
|
|
echo ""
|
|
|
|
|
echo "🎉 Your MCP server is working correctly!"
|
|
|
|
|
echo "📋 Next steps:"
|
|
|
|
|
echo " 1. cd npx-cli"
|
|
|
|
|
echo " 2. npm publish"
|
|
|
|
|
echo " 3. Users can then use: npx vibe-kanban --mcp with Claude Desktop"
|