📝 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:
40
Dockerfile
40
Dockerfile
@@ -1,31 +1,45 @@
|
||||
# ─────────────────────────────────────────────────────────────
|
||||
# Claude Code CLI — Development Container
|
||||
# Claude Code CLI — Production Container
|
||||
# ─────────────────────────────────────────────────────────────
|
||||
# This image provides a ready-to-explore environment for the
|
||||
# leaked source. It does NOT produce a runnable build (the
|
||||
# original build tooling was not included in the leak).
|
||||
# Multi-stage build: builds a production bundle, then copies
|
||||
# only the output into a minimal runtime image.
|
||||
#
|
||||
# Usage:
|
||||
# docker build -t claude-code .
|
||||
# docker run --rm -e ANTHROPIC_API_KEY=sk-... claude-code -p "hello"
|
||||
# ─────────────────────────────────────────────────────────────
|
||||
|
||||
FROM oven/bun:1-alpine AS base
|
||||
# Stage 1: Build
|
||||
FROM oven/bun:1-alpine AS builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Install OS-level dependencies used at runtime
|
||||
RUN apk add --no-cache git ripgrep
|
||||
|
||||
# Copy manifests first for layer caching
|
||||
COPY package.json bun.lockb* ./
|
||||
|
||||
# Install npm packages
|
||||
# Install all dependencies (including devDependencies for build)
|
||||
RUN bun install --frozen-lockfile || bun install
|
||||
|
||||
# Copy source
|
||||
COPY . .
|
||||
|
||||
# Typecheck (optional — fails loudly if deps are wrong)
|
||||
# RUN bun run typecheck
|
||||
# Build production bundle
|
||||
RUN bun run build:prod
|
||||
|
||||
# Default: drop into a shell for exploration
|
||||
CMD ["sh"]
|
||||
# Stage 2: Runtime
|
||||
FROM oven/bun:1-alpine
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Install OS-level runtime dependencies
|
||||
RUN apk add --no-cache git ripgrep
|
||||
|
||||
# Copy only the bundled output from the builder
|
||||
COPY --from=builder /app/dist/cli.mjs /app/cli.mjs
|
||||
|
||||
# Make it executable
|
||||
RUN chmod +x /app/cli.mjs
|
||||
|
||||
ENTRYPOINT ["bun", "/app/cli.mjs"]
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user