📝 feat: update TypeScript configuration and add API support
- Changed root directory in tsconfig.json to include all source files. - Updated server.json to include npm package configuration for claude-code-explorer-mcp. - Enhanced x402 command to support non-interactive mode. - Refactored x402 command call function to simplify argument handling. - Introduced .mcp.json for MCP server configuration. - Added bunfig.toml for Bun development mode configuration. - Created bridge.md documentation for IDE integration and architecture overview. - Added .npmignore to exclude unnecessary files from npm package. - Implemented build-bundle script for production and development builds. - Developed bun-plugin-shims for Bun preload plugin. - Created ci-build.sh for CI/CD build pipeline. - Added dev.ts for development launcher using Bun's TS runtime. - Implemented package-npm.ts to generate a publishable npm package. - Created test-auth.ts to verify API key configuration. - Developed test-mcp.ts for MCP client/server roundtrip testing. - Implemented test-services.ts to ensure all services initialize correctly. - Added stub.ts for bridge functionality when BRIDGE_MODE is disabled.
This commit is contained in:
49
scripts/ci-build.sh
Normal file
49
scripts/ci-build.sh
Normal file
@@ -0,0 +1,49 @@
|
||||
#!/bin/bash
|
||||
# ─────────────────────────────────────────────────────────────
|
||||
# ci-build.sh — CI/CD build pipeline
|
||||
# ─────────────────────────────────────────────────────────────
|
||||
# Runs the full build pipeline: install, typecheck, lint, build,
|
||||
# and verify the output. Intended for CI environments.
|
||||
#
|
||||
# Usage:
|
||||
# ./scripts/ci-build.sh
|
||||
# ─────────────────────────────────────────────────────────────
|
||||
set -euo pipefail
|
||||
|
||||
echo "=== Installing dependencies ==="
|
||||
bun install
|
||||
|
||||
echo "=== Type checking ==="
|
||||
bun run typecheck
|
||||
|
||||
echo "=== Linting ==="
|
||||
bun run lint
|
||||
|
||||
echo "=== Building production bundle ==="
|
||||
bun run build:prod
|
||||
|
||||
echo "=== Verifying build output ==="
|
||||
|
||||
# Check that the bundle was produced
|
||||
if [ ! -f dist/cli.mjs ]; then
|
||||
echo "ERROR: dist/cli.mjs not found"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Print bundle size
|
||||
SIZE=$(ls -lh dist/cli.mjs | awk '{print $5}')
|
||||
echo " Bundle size: $SIZE"
|
||||
|
||||
# Verify the bundle runs with Node.js
|
||||
if command -v node &>/dev/null; then
|
||||
VERSION=$(node dist/cli.mjs --version 2>&1 || true)
|
||||
echo " node dist/cli.mjs --version → $VERSION"
|
||||
fi
|
||||
|
||||
# Verify the bundle runs with Bun
|
||||
if command -v bun &>/dev/null; then
|
||||
VERSION=$(bun dist/cli.mjs --version 2>&1 || true)
|
||||
echo " bun dist/cli.mjs --version → $VERSION"
|
||||
fi
|
||||
|
||||
echo "=== Done ==="
|
||||
Reference in New Issue
Block a user