- Add RATE_LIMIT_MAX_AUTH_REQUESTS to .env.example for improved rate limiting - Update bun.lock and package.json to include new dependencies: @anthropic-ai/sdk, express-rate-limit, and their type definitions - Modify bunfig.toml for build settings and output configuration - Refactor src/config.ts to incorporate rate limiting settings - Implement security middleware for enhanced request validation and sanitization - Introduce rate limiting middleware for API and authentication endpoints - Add tests for configuration validation and rate limiting functionality
83 lines
1.3 KiB
TOML
83 lines
1.3 KiB
TOML
[test]
|
|
preload = ["./test/setup.ts"]
|
|
coverage = true
|
|
coverageThreshold = {
|
|
statements = 80,
|
|
branches = 70,
|
|
functions = 80,
|
|
lines = 80
|
|
}
|
|
timeout = 10000
|
|
testMatch = ["**/__tests__/**/*.test.ts"]
|
|
testPathIgnorePatterns = ["/node_modules/", "/dist/"]
|
|
collectCoverageFrom = [
|
|
"src/**/*.{ts,tsx}",
|
|
"!src/**/*.d.ts",
|
|
"!src/**/*.test.ts",
|
|
"!src/types/**/*",
|
|
"!src/mocks/**/*"
|
|
]
|
|
|
|
[build]
|
|
target = "bun"
|
|
outdir = "./dist"
|
|
minify = {
|
|
whitespace = true,
|
|
syntax = true,
|
|
identifiers = true,
|
|
module = true
|
|
}
|
|
sourcemap = "external"
|
|
entry = ["./src/index.ts", "./src/stdio-server.ts"]
|
|
splitting = true
|
|
naming = "[name].[hash].[ext]"
|
|
publicPath = "/assets/"
|
|
define = {
|
|
"process.env.NODE_ENV": "process.env.NODE_ENV"
|
|
}
|
|
|
|
[build.javascript]
|
|
platform = "node"
|
|
format = "esm"
|
|
treeshaking = true
|
|
packages = {
|
|
external = ["bun:*"]
|
|
}
|
|
|
|
[build.typescript]
|
|
dts = true
|
|
typecheck = true
|
|
|
|
[install]
|
|
production = false
|
|
frozen = true
|
|
peer = false
|
|
|
|
[install.cache]
|
|
dir = ".bun"
|
|
disable = false
|
|
|
|
[debug]
|
|
port = 9229
|
|
|
|
[env]
|
|
# Environment-specific configurations
|
|
development.LOG_LEVEL = "debug"
|
|
production.LOG_LEVEL = "warn"
|
|
|
|
[hot]
|
|
restart = true
|
|
reload = true
|
|
|
|
[performance]
|
|
gc = true
|
|
optimize = true
|
|
jit = true
|
|
smol = true
|
|
compact = true
|
|
|
|
[test.env]
|
|
NODE_ENV = "test"
|
|
|
|
[watch]
|
|
ignore = ["**/node_modules/**", "**/dist/**", "**/.git/**"] |