diff --git a/.github/workflows/dependabot-review.yml b/.github/workflows/dependabot-review.yml index 49a46c0..8d95cf4 100644 --- a/.github/workflows/dependabot-review.yml +++ b/.github/workflows/dependabot-review.yml @@ -54,7 +54,7 @@ jobs: Verify the package can start without runtime errors: ``` - cd mcp-server && timeout 10 node build/index.js --help || true + cd mcp-server && timeout 10 node dist/index.mjs --help || true ``` If a `--help` flag is not available, start the process and kill it after a few seconds to confirm it boots. diff --git a/CONTRIBUTE.md b/CONTRIBUTE.md index 6d7696e..1c86b07 100644 --- a/CONTRIBUTE.md +++ b/CONTRIBUTE.md @@ -45,7 +45,7 @@ You should see: `Currents MCP Server running on stdio`. To test with a local MCP client (e.g., Cursor or Claude Desktop), point the client to your built server: - Command: `node` -- Args: `./mcp-server/build/index.js` +- Args: `./mcp-server/dist/index.mjs` - Env: set `CURRENTS_API_KEY` to a valid key Example snippet for a client config: @@ -55,7 +55,7 @@ Example snippet for a client config: "mcpServers": { "currents": { "command": "node", - "args": ["./mcp-server/build/index.js"], + "args": ["./mcp-server/dist/index.mjs"], "env": { "CURRENTS_API_KEY": "your-api-key" } diff --git a/Dockerfile b/Dockerfile index e0fbac2..8b2a169 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,7 @@ # syntax=docker/dockerfile:1 # Build stage -FROM node:20-alpine AS build +FROM node:24-alpine AS build WORKDIR /app # Install dependencies @@ -10,8 +10,8 @@ COPY mcp-server/package.json mcp-server/package-lock.json ./ RUN npm ci --production=false # Copy source code -COPY mcp-server/tsconfig.json mcp-server/tsconfig.cjs.json ./ -COPY mcp-server/scripts ./scripts +COPY mcp-server/tsconfig.json mcp-server/tsdown.config.ts ./ +COPY mcp-server/assets ./assets COPY mcp-server/src ./src # Build the project @@ -22,10 +22,12 @@ FROM node:20-alpine AS runtime WORKDIR /app # Copy build artifacts and dependencies -COPY --from=build /app/build ./build +COPY --from=build /app/dist ./dist +COPY --from=build /app/assets ./assets +COPY --from=build /app/package.json ./package.json COPY --from=build /app/node_modules ./node_modules # Default API URL environment variable ENV CURRENTS_API_URL=https://api.currents.dev -ENTRYPOINT ["node", "build/index.js"] +ENTRYPOINT ["node", "dist/index.mjs"] diff --git a/mcp-server/.gitignore b/mcp-server/.gitignore index 8c09060..2ec6443 100644 --- a/mcp-server/.gitignore +++ b/mcp-server/.gitignore @@ -1,5 +1,5 @@ # Build output -build/ +dist/ # README is copied from root during publish README.md diff --git a/mcp-server/assets/logo.png b/mcp-server/assets/logo.png new file mode 100644 index 0000000..bca6ca9 Binary files /dev/null and b/mcp-server/assets/logo.png differ diff --git a/mcp-server/package-lock.json b/mcp-server/package-lock.json index e818405..f29d9ba 100644 --- a/mcp-server/package-lock.json +++ b/mcp-server/package-lock.json @@ -16,13 +16,13 @@ "zod": "^4.3.5" }, "bin": { - "mcp": "build/index.js" + "mcp": "dist/index.mjs" }, "devDependencies": { "@release-it/conventional-changelog": "^11.0.0", "@types/node": "^20.19.0", "release-it": "^20.0.1", - "rimraf": "^6.0.1", + "tsdown": "^0.21.0", "typescript": "^5.9.3", "vitest": "^4.0.18" }, @@ -30,6 +30,74 @@ "node": ">=20" } }, + "node_modules/@babel/generator": { + "version": "8.0.0-rc.3", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-8.0.0-rc.3.tgz", + "integrity": "sha512-em37/13/nR320G4jab/nIIHZgc2Wz2y/D39lxnTyxB4/D/omPQncl/lSdlnJY1OhQcRGugTSIF2l/69o31C9dA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^8.0.0-rc.3", + "@babel/types": "^8.0.0-rc.3", + "@jridgewell/gen-mapping": "^0.3.12", + "@jridgewell/trace-mapping": "^0.3.28", + "@types/jsesc": "^2.5.0", + "jsesc": "^3.0.2" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@babel/helper-string-parser": { + "version": "8.0.0-rc.5", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-8.0.0-rc.5.tgz", + "integrity": "sha512-sN7R8rBvDurfaziNfDEIjIntlazmlkCDGO4SNl2RJ3wRCn+QxspLV7hzYAE8WWVd2joVuT8sUxeePdLp2idI1A==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^22.18.0 || >=24.11.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "8.0.0-rc.3", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-8.0.0-rc.3.tgz", + "integrity": "sha512-8AWCJ2VJJyDFlGBep5GpaaQ9AAaE/FjAcrqI7jyssYhtL7WGV0DOKpJsQqM037xDbpRLHXsY8TwU7zDma7coOw==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@babel/parser": { + "version": "8.0.0-rc.3", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-8.0.0-rc.3.tgz", + "integrity": "sha512-B20dvP3MfNc/XS5KKCHy/oyWl5IA6Cn9YjXRdDlCjNmUFrjvLXMNUfQq/QUy9fnG2gYkKKcrto2YaF9B32ToOQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^8.0.0-rc.3" + }, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@babel/types": { + "version": "8.0.0-rc.3", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-8.0.0-rc.3.tgz", + "integrity": "sha512-mOm5ZrYmphGfqVWoH5YYMTITb3cDXsFgmvFlvkvWDMsR9X8RFnt7a0Wb6yNIdoFsiMO9WjYLq+U/FMtqIYAF8Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-string-parser": "^8.0.0-rc.3", + "@babel/helper-validator-identifier": "^8.0.0-rc.3" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, "node_modules/@conventional-changelog/git-client": { "version": "2.7.0", "resolved": "https://registry.npmjs.org/@conventional-changelog/git-client/-/git-client-2.7.0.tgz", @@ -57,6 +125,40 @@ } } }, + "node_modules/@emnapi/core": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.10.0.tgz", + "integrity": "sha512-yq6OkJ4p82CAfPl0u9mQebQHKPJkY7WrIuk205cTYnYe+k2Z8YBh11FrbRG/H6ihirqcacOgl2BIO8oyMQLeXw==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@emnapi/wasi-threads": "1.2.1", + "tslib": "^2.4.0" + } + }, + "node_modules/@emnapi/runtime": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.10.0.tgz", + "integrity": "sha512-ewvYlk86xUoGI0zQRNq/mC+16R1QeDlKQy21Ki3oSYXNgLb45GV1P6A0M+/s6nyCuNDqe5VpaY84BzXGwVbwFA==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/@emnapi/wasi-threads": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.2.1.tgz", + "integrity": "sha512-uTII7OYF+/Mes/MrcIOYp5yOtSMLBWSIoLPpcgwipoiKbli6k322tcoFsxoIIxPDqW01SQGAgko4EzZi2BNv2w==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, "node_modules/@esbuild/aix-ppc64": { "version": "0.27.2", "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.27.2.tgz", @@ -855,6 +957,27 @@ } } }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.13", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz", + "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, "node_modules/@jridgewell/sourcemap-codec": { "version": "1.5.5", "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", @@ -862,6 +985,17 @@ "dev": true, "license": "MIT" }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.31", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz", + "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, "node_modules/@modelcontextprotocol/sdk": { "version": "1.28.0", "resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-1.28.0.tgz", @@ -902,6 +1036,25 @@ } } }, + "node_modules/@napi-rs/wasm-runtime": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-1.1.4.tgz", + "integrity": "sha512-3NQNNgA1YSlJb/kMH1ildASP9HW7/7kYnRI2szWJaofaS1hWmbGI4H+d3+22aGzXXN9IJ+n+GiFVcGipJP18ow==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@tybys/wasm-util": "^0.10.1" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/Brooooooklyn" + }, + "peerDependencies": { + "@emnapi/core": "^1.7.1", + "@emnapi/runtime": "^1.7.1" + } + }, "node_modules/@octokit/auth-token": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-6.0.0.tgz", @@ -1068,6 +1221,16 @@ "@octokit/openapi-types": "^27.0.0" } }, + "node_modules/@oxc-project/types": { + "version": "0.127.0", + "resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.127.0.tgz", + "integrity": "sha512-aIYXQBo4lCbO4z0R3FHeucQHpF46l2LbMdxRvqvuRuW2OxdnSkcng5B8+K12spgLDj93rtN3+J2Vac/TIO+ciQ==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/Boshen" + } + }, "node_modules/@phun-ky/typeof": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/@phun-ky/typeof/-/typeof-2.0.3.tgz", @@ -1082,6 +1245,19 @@ "url": "https://github.com/phun-ky/typeof?sponsor=1" } }, + "node_modules/@quansync/fs": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@quansync/fs/-/fs-1.0.0.tgz", + "integrity": "sha512-4TJ3DFtlf1L5LDMaM6CanJ/0lckGNtJcMjQ1NAV6zDmA0tEHKZtxNKin8EgPaVX1YzljbxckyT2tJrpQKAtngQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "quansync": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sxzz" + } + }, "node_modules/@release-it/conventional-changelog": { "version": "11.0.0", "resolved": "https://registry.npmjs.org/@release-it/conventional-changelog/-/conventional-changelog-11.0.0.tgz", @@ -1117,6 +1293,288 @@ "node": ">=10" } }, + "node_modules/@rolldown/binding-android-arm64": { + "version": "1.0.0-rc.17", + "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm64/-/binding-android-arm64-1.0.0-rc.17.tgz", + "integrity": "sha512-s70pVGhw4zqGeFnXWvAzJDlvxhlRollagdCCKRgOsgUOH3N1l0LIxf83AtGzmb5SiVM4Hjl5HyarMRfdfj3DaQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-darwin-arm64": { + "version": "1.0.0-rc.17", + "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-arm64/-/binding-darwin-arm64-1.0.0-rc.17.tgz", + "integrity": "sha512-4ksWc9n0mhlZpZ9PMZgTGjeOPRu8MB1Z3Tz0Mo02eWfWCHMW1zN82Qz/pL/rC+yQa+8ZnutMF0JjJe7PjwasYw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-darwin-x64": { + "version": "1.0.0-rc.17", + "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-x64/-/binding-darwin-x64-1.0.0-rc.17.tgz", + "integrity": "sha512-SUSDOI6WwUVNcWxd02QEBjLdY1VPHvlEkw6T/8nYG322iYWCTxRb1vzk4E+mWWYehTp7ERibq54LSJGjmouOsw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-freebsd-x64": { + "version": "1.0.0-rc.17", + "resolved": "https://registry.npmjs.org/@rolldown/binding-freebsd-x64/-/binding-freebsd-x64-1.0.0-rc.17.tgz", + "integrity": "sha512-hwnz3nw9dbJ05EDO/PvcjaaewqqDy7Y1rn1UO81l8iIK1GjenME75dl16ajbvSSMfv66WXSRCYKIqfgq2KCfxw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-arm-gnueabihf": { + "version": "1.0.0-rc.17", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.0.0-rc.17.tgz", + "integrity": "sha512-IS+W7epTcwANmFSQFrS1SivEXHtl1JtuQA9wlxrZTcNi6mx+FDOYrakGevvvTwgj2JvWiK8B29/qD9BELZPyXQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-arm64-gnu": { + "version": "1.0.0-rc.17", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.0.0-rc.17.tgz", + "integrity": "sha512-e6usGaHKW5BMNZOymS1UcEYGowQMWcgZ71Z17Sl/h2+ZziNJ1a9n3Zvcz6LdRyIW5572wBCTH/Z+bKuZouGk9Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-arm64-musl": { + "version": "1.0.0-rc.17", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.0.0-rc.17.tgz", + "integrity": "sha512-b/CgbwAJpmrRLp02RPfhbudf5tZnN9nsPWK82znefso832etkem8H7FSZwxrOI9djcdTP7U6YfNhbRnh7djErg==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-ppc64-gnu": { + "version": "1.0.0-rc.17", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.0.0-rc.17.tgz", + "integrity": "sha512-4EII1iNGRUN5WwGbF/kOh/EIkoDN9HsupgLQoXfY+D1oyJm7/F4t5PYU5n8SWZgG0FEwakyM8pGgwcBYruGTlA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-s390x-gnu": { + "version": "1.0.0-rc.17", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.0.0-rc.17.tgz", + "integrity": "sha512-AH8oq3XqQo4IibpVXvPeLDI5pzkpYn0WiZAfT05kFzoJ6tQNzwRdDYQ45M8I/gslbodRZwW8uxLhbSBbkv96rA==", + "cpu": [ + "s390x" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-x64-gnu": { + "version": "1.0.0-rc.17", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.0.0-rc.17.tgz", + "integrity": "sha512-cLnjV3xfo7KslbU41Z7z8BH/E1y5mzUYzAqih1d1MDaIGZRCMqTijqLv76/P7fyHuvUcfGsIpqCdddbxLLK9rA==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-x64-musl": { + "version": "1.0.0-rc.17", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.0.0-rc.17.tgz", + "integrity": "sha512-0phclDw1spsL7dUB37sIARuis2tAgomCJXAHZlpt8PXZ4Ba0dRP1e+66lsRqrfhISeN9bEGNjQs+T/Fbd7oYGw==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-openharmony-arm64": { + "version": "1.0.0-rc.17", + "resolved": "https://registry.npmjs.org/@rolldown/binding-openharmony-arm64/-/binding-openharmony-arm64-1.0.0-rc.17.tgz", + "integrity": "sha512-0ag/hEgXOwgw4t8QyQvUCxvEg+V0KBcA6YuOx9g0r02MprutRF5dyljgm3EmR02O292UX7UeS6HzWHAl6KgyhA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-wasm32-wasi": { + "version": "1.0.0-rc.17", + "resolved": "https://registry.npmjs.org/@rolldown/binding-wasm32-wasi/-/binding-wasm32-wasi-1.0.0-rc.17.tgz", + "integrity": "sha512-LEXei6vo0E5wTGwpkJ4KoT3OZJRnglwldt5ziLzOlc6qqb55z4tWNq2A+PFqCJuvWWdP53CVhG1Z9NtToDPJrA==", + "cpu": [ + "wasm32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@emnapi/core": "1.10.0", + "@emnapi/runtime": "1.10.0", + "@napi-rs/wasm-runtime": "^1.1.4" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-win32-arm64-msvc": { + "version": "1.0.0-rc.17", + "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.0.0-rc.17.tgz", + "integrity": "sha512-gUmyzBl3SPMa6hrqFUth9sVfcLBlYsbMzBx5PlexMroZStgzGqlZ26pYG89rBb45Mnia+oil6YAIFeEWGWhoZA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-win32-x64-msvc": { + "version": "1.0.0-rc.17", + "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.0.0-rc.17.tgz", + "integrity": "sha512-3hkiolcUAvPB9FLb3UZdfjVVNWherN1f/skkGWJP/fgSQhYUZpSIRr0/I8ZK9TkF3F7kxvJAk0+IcKvPHk9qQg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/pluginutils": { + "version": "1.0.0-rc.17", + "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.0-rc.17.tgz", + "integrity": "sha512-n8iosDOt6Ig1UhJ2AYqoIhHWh/isz0xpicHTzpKBeotdVsTEcxsSA/i3EVM7gQAj0rU27OLAxCjzlj15IWY7bg==", + "dev": true, + "license": "MIT" + }, "node_modules/@rollup/rollup-android-arm-eabi": { "version": "4.59.0", "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.59.0.tgz", @@ -1527,6 +1985,17 @@ "dev": true, "license": "MIT" }, + "node_modules/@tybys/wasm-util": { + "version": "0.10.2", + "resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.10.2.tgz", + "integrity": "sha512-RoBvJ2X0wuKlWFIjrwffGw1IqZHKQqzIchKaadZZfnNpsAYp2mM0h36JtPCjNDAHGgYez/15uMBpfGwchhiMgg==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, "node_modules/@types/chai": { "version": "5.2.3", "resolved": "https://registry.npmjs.org/@types/chai/-/chai-5.2.3.tgz", @@ -1552,6 +2021,13 @@ "dev": true, "license": "MIT" }, + "node_modules/@types/jsesc": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@types/jsesc/-/jsesc-2.5.1.tgz", + "integrity": "sha512-9VN+6yxLOPLOav+7PwjZbxiID2bVaeq0ED4qSQmdQTdjnXJSaCVKTR58t15oqH1H5t8Ng2ZX1SabJVoN9Q34bw==", + "dev": true, + "license": "MIT" + }, "node_modules/@types/node": { "version": "20.19.37", "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.37.tgz", @@ -1756,6 +2232,16 @@ "url": "https://github.com/chalk/ansi-regex?sponsor=1" } }, + "node_modules/ansis": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansis/-/ansis-4.3.0.tgz", + "integrity": "sha512-44mvgtPvohuU/70DdY5Oz2AIrLJ9k6/5x4KmoSvPwO+5Moijo0+N9D0fKbbYZQWP1hNm5CpOf+E01jhxG/r8xg==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=14" + } + }, "node_modules/array-ify": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/array-ify/-/array-ify-1.0.0.tgz", @@ -1773,6 +2259,24 @@ "node": ">=12" } }, + "node_modules/ast-kit": { + "version": "3.0.0-beta.1", + "resolved": "https://registry.npmjs.org/ast-kit/-/ast-kit-3.0.0-beta.1.tgz", + "integrity": "sha512-trmleAnZ2PxN/loHWVhhx1qeOHSRXq4TDsBBxq3GqeJitfk3+jTQ+v/C1km/KYq9M7wKqCewMh+/NAvVH7m+bw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^8.0.0-beta.4", + "estree-walker": "^3.0.3", + "pathe": "^2.0.3" + }, + "engines": { + "node": ">=20.19.0" + }, + "funding": { + "url": "https://github.com/sponsors/sxzz" + } + }, "node_modules/ast-types": { "version": "0.13.4", "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.13.4.tgz", @@ -1803,16 +2307,6 @@ "node": ">=8.0.0" } }, - "node_modules/balanced-match": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", - "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", - "dev": true, - "license": "MIT", - "engines": { - "node": "18 || 20 || >=22" - } - }, "node_modules/basic-ftp": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/basic-ftp/-/basic-ftp-5.3.1.tgz", @@ -1830,6 +2324,16 @@ "dev": true, "license": "Apache-2.0" }, + "node_modules/birpc": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/birpc/-/birpc-4.0.0.tgz", + "integrity": "sha512-LShSxJP0KTmd101b6DRyGBj57LZxSDYWKitQNW/mi8GRMvZb078Uf9+pveax1DrVL89vm7mWe+TovdI/UDOuPw==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, "node_modules/body-parser": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-2.2.2.tgz", @@ -1854,19 +2358,6 @@ "url": "https://opencollective.com/express" } }, - "node_modules/brace-expansion": { - "version": "5.0.6", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.6.tgz", - "integrity": "sha512-kLpxurY4Z4r9sgMsyG0Z9uzsBlgiU/EFKhj/h91/8yHu0edo7XuixOIH3VcJ8kkxs6/jPzoI6U9Vj3WqbMQ94g==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^4.0.2" - }, - "engines": { - "node": "18 || 20 || >=22" - } - }, "node_modules/buffer-from": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", @@ -1928,6 +2419,16 @@ } } }, + "node_modules/cac": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/cac/-/cac-7.0.0.tgz", + "integrity": "sha512-tixWYgm5ZoOD+3g6UTea91eow5z6AAHaho3g0V9CNSNb45gM8SmflpAc+GRd1InC4AqN/07Unrgp56Y94N9hJQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=20.19.0" + } + }, "node_modules/call-bind-apply-helpers": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", @@ -2462,6 +2963,27 @@ "url": "https://dotenvx.com" } }, + "node_modules/dts-resolver": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/dts-resolver/-/dts-resolver-2.1.3.tgz", + "integrity": "sha512-bihc7jPC90VrosXNzK0LTE2cuLP6jr0Ro8jk+kMugHReJVLIpHz/xadeq3MhuwyO4TD4OA3L1Q8pBBFRc08Tsw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=20.19.0" + }, + "funding": { + "url": "https://github.com/sponsors/sxzz" + }, + "peerDependencies": { + "oxc-resolver": ">=11.0.0" + }, + "peerDependenciesMeta": { + "oxc-resolver": { + "optional": true + } + } + }, "node_modules/dunder-proto": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", @@ -2482,6 +3004,16 @@ "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", "license": "MIT" }, + "node_modules/empathic": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/empathic/-/empathic-2.0.1.tgz", + "integrity": "sha512-YGRs8knHhKHVShLkFET/rWAU8kmHbOV5LwN938RHI0pljAJ1Gf6SzXsSmRaEzcXTtOOmVqJ5+WtQPL5uigY50Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14" + } + }, "node_modules/encodeurl": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz", @@ -2986,6 +3518,19 @@ "node": ">= 0.4" } }, + "node_modules/get-tsconfig": { + "version": "4.14.0", + "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.14.0.tgz", + "integrity": "sha512-yTb+8DXzDREzgvYmh6s9vHsSVCHeC0G3PI5bEXNBHtmshPnO+S5O7qgLEOn0I5QvMy6kpZN8K1NKGyilLb93wA==", + "dev": true, + "license": "MIT", + "dependencies": { + "resolve-pkg-maps": "^1.0.0" + }, + "funding": { + "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" + } + }, "node_modules/get-uri": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/get-uri/-/get-uri-7.0.0.tgz", @@ -3040,24 +3585,6 @@ "git-up": "^8.1.0" } }, - "node_modules/glob": { - "version": "13.0.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-13.0.0.tgz", - "integrity": "sha512-tvZgpqk6fz4BaNZ66ZsRaZnbHvP/jG3uKJvAZOwEVUL4RTA5nJeeLYfyN9/VA8NX/V3IBG+hkeuGpKjvELkVhA==", - "dev": true, - "license": "BlueOak-1.0.0", - "dependencies": { - "minimatch": "^10.1.1", - "minipass": "^7.1.2", - "path-scurry": "^2.0.0" - }, - "engines": { - "node": "20 || >=22" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/gopd": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", @@ -3130,6 +3657,13 @@ "node": ">=16.9.0" } }, + "node_modules/hookable": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/hookable/-/hookable-6.1.1.tgz", + "integrity": "sha512-U9LYDy1CwhMCnprUfeAZWZGByVbhd54hwepegYTK7Pi5NvqEj63ifz5z+xukznehT7i6NIZRu89Ay1AZmRsLEQ==", + "dev": true, + "license": "MIT" + }, "node_modules/hosted-git-info": { "version": "8.1.0", "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-8.1.0.tgz", @@ -3214,6 +3748,19 @@ "url": "https://opencollective.com/express" } }, + "node_modules/import-without-cache": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/import-without-cache/-/import-without-cache-0.3.3.tgz", + "integrity": "sha512-bDxwDdF04gm550DfZHgffvlX+9kUlcz32UD0AeBTmVPFiWkrexF2XVmiuFFbDhiFuP8fQkrkvI2KdSNPYWAXkQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=20.19.0" + }, + "funding": { + "url": "https://github.com/sponsors/sxzz" + } + }, "node_modules/inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", @@ -3401,6 +3948,19 @@ "node": ">=10" } }, + "node_modules/jsesc": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", + "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==", + "dev": true, + "license": "MIT", + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/json-schema-traverse": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", @@ -3580,22 +4140,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/minimatch": { - "version": "10.2.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.4.tgz", - "integrity": "sha512-oRjTw/97aTBN0RHbYCdtF1MQfvusSIBQM0IZEgzl6426+8jSC0nF1a/GmnVLpfB9yyr6g6FTqWqiZVbxrtaCIg==", - "dev": true, - "license": "BlueOak-1.0.0", - "dependencies": { - "brace-expansion": "^5.0.2" - }, - "engines": { - "node": "18 || 20 || >=22" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/minimist": { "version": "1.2.8", "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", @@ -3604,16 +4148,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/minipass": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", - "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=16 || 14 >=14.17" - } - }, "node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", @@ -3928,13 +4462,6 @@ "quickjs-wasi": "^0.0.1" } }, - "node_modules/package-json-from-dist": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", - "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", - "dev": true, - "license": "BlueOak-1.0.0" - }, "node_modules/parse-path": { "version": "7.1.0", "resolved": "https://registry.npmjs.org/parse-path/-/parse-path-7.1.0.tgz", @@ -3976,33 +4503,6 @@ "node": ">=8" } }, - "node_modules/path-scurry": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.1.tgz", - "integrity": "sha512-oWyT4gICAu+kaA7QWk/jvCHWarMKNs6pXOGWKDTr7cw4IGcUbW+PeTfbaQiLGheFRpjo6O9J0PmyMfQPjH71oA==", - "dev": true, - "license": "BlueOak-1.0.0", - "dependencies": { - "lru-cache": "^11.0.0", - "minipass": "^7.1.2" - }, - "engines": { - "node": "20 || >=22" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/path-scurry/node_modules/lru-cache": { - "version": "11.2.5", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.5.tgz", - "integrity": "sha512-vFrFJkWtJvJnD5hg+hJvVE8Lh/TcMzKnTgCWmtBipwI5yLX/iX+5UB2tfuyODF5E7k9xEzMdYgGqaSb1c0c5Yw==", - "dev": true, - "license": "BlueOak-1.0.0", - "engines": { - "node": "20 || >=22" - } - }, "node_modules/path-to-regexp": { "version": "8.4.0", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-8.4.0.tgz", @@ -4264,6 +4764,23 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/quansync": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/quansync/-/quansync-1.0.0.tgz", + "integrity": "sha512-5xZacEEufv3HSTPQuchrvV6soaiACMFnq1H8wkVioctoH3TRha9Sz66lOxRwPK/qZj7HPiSveih9yAyh98gvqA==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/antfu" + }, + { + "type": "individual", + "url": "https://github.com/sponsors/sxzz" + } + ], + "license": "MIT" + }, "node_modules/quick-format-unescaped": { "version": "4.0.4", "resolved": "https://registry.npmjs.org/quick-format-unescaped/-/quick-format-unescaped-4.0.4.tgz", @@ -4405,6 +4922,16 @@ "node": ">=0.10.0" } }, + "node_modules/resolve-pkg-maps": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", + "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" + } + }, "node_modules/restore-cursor": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-5.1.0.tgz", @@ -4431,24 +4958,84 @@ "node": ">= 4" } }, - "node_modules/rimraf": { - "version": "6.1.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-6.1.2.tgz", - "integrity": "sha512-cFCkPslJv7BAXJsYlK1dZsbP8/ZNLkCAQ0bi1hf5EKX2QHegmDFEFA6QhuYJlk7UDdc+02JjO80YSOrWPpw06g==", + "node_modules/rolldown": { + "version": "1.0.0-rc.17", + "resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.0.0-rc.17.tgz", + "integrity": "sha512-ZrT53oAKrtA4+YtBWPQbtPOxIbVDbxT0orcYERKd63VJTF13zPcgXTvD4843L8pcsI7M6MErt8QtON6lrB9tyA==", "dev": true, - "license": "BlueOak-1.0.0", + "license": "MIT", "dependencies": { - "glob": "^13.0.0", - "package-json-from-dist": "^1.0.1" + "@oxc-project/types": "=0.127.0", + "@rolldown/pluginutils": "1.0.0-rc.17" }, "bin": { - "rimraf": "dist/esm/bin.mjs" + "rolldown": "bin/cli.mjs" }, "engines": { - "node": "20 || >=22" + "node": "^20.19.0 || >=22.12.0" + }, + "optionalDependencies": { + "@rolldown/binding-android-arm64": "1.0.0-rc.17", + "@rolldown/binding-darwin-arm64": "1.0.0-rc.17", + "@rolldown/binding-darwin-x64": "1.0.0-rc.17", + "@rolldown/binding-freebsd-x64": "1.0.0-rc.17", + "@rolldown/binding-linux-arm-gnueabihf": "1.0.0-rc.17", + "@rolldown/binding-linux-arm64-gnu": "1.0.0-rc.17", + "@rolldown/binding-linux-arm64-musl": "1.0.0-rc.17", + "@rolldown/binding-linux-ppc64-gnu": "1.0.0-rc.17", + "@rolldown/binding-linux-s390x-gnu": "1.0.0-rc.17", + "@rolldown/binding-linux-x64-gnu": "1.0.0-rc.17", + "@rolldown/binding-linux-x64-musl": "1.0.0-rc.17", + "@rolldown/binding-openharmony-arm64": "1.0.0-rc.17", + "@rolldown/binding-wasm32-wasi": "1.0.0-rc.17", + "@rolldown/binding-win32-arm64-msvc": "1.0.0-rc.17", + "@rolldown/binding-win32-x64-msvc": "1.0.0-rc.17" + } + }, + "node_modules/rolldown-plugin-dts": { + "version": "0.23.2", + "resolved": "https://registry.npmjs.org/rolldown-plugin-dts/-/rolldown-plugin-dts-0.23.2.tgz", + "integrity": "sha512-PbSqLawLgZBGcOGT3yqWBGn4cX+wh2nt5FuBGdcMHyOhoukmjbhYAl8NT9sE4U38Cm9tqLOIQeOrvzeayM0DLQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/generator": "8.0.0-rc.3", + "@babel/helper-validator-identifier": "8.0.0-rc.3", + "@babel/parser": "8.0.0-rc.3", + "@babel/types": "8.0.0-rc.3", + "ast-kit": "^3.0.0-beta.1", + "birpc": "^4.0.0", + "dts-resolver": "^2.1.3", + "get-tsconfig": "^4.13.7", + "obug": "^2.1.1", + "picomatch": "^4.0.4" + }, + "engines": { + "node": ">=20.19.0" }, "funding": { - "url": "https://github.com/sponsors/isaacs" + "url": "https://github.com/sponsors/sxzz" + }, + "peerDependencies": { + "@ts-macro/tsc": "^0.3.6", + "@typescript/native-preview": ">=7.0.0-dev.20260325.1", + "rolldown": "^1.0.0-rc.12", + "typescript": "^5.0.0 || ^6.0.0", + "vue-tsc": "~3.2.0" + }, + "peerDependenciesMeta": { + "@ts-macro/tsc": { + "optional": true + }, + "@typescript/native-preview": { + "optional": true + }, + "typescript": { + "optional": true + }, + "vue-tsc": { + "optional": true + } } }, "node_modules/rollup": { @@ -4961,9 +5548,9 @@ "license": "MIT" }, "node_modules/tinyexec": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-1.0.2.tgz", - "integrity": "sha512-W/KYk+NFhkmsYpuHq5JykngiOCnxeVL8v8dFnqxSD8qEEdRfXk1SDM6JzNqcERbcGYj9tMrDQBYV9cjgnunFIg==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-1.1.2.tgz", + "integrity": "sha512-dAqSqE/RabpBKI8+h26GfLq6Vb3JVXs30XYQjdMjaj/c2tS8IYYMbIzP599KtRj7c57/wYApb3QjgRgXmrCukA==", "dev": true, "license": "MIT", "engines": { @@ -5006,6 +5593,99 @@ "node": ">=0.6" } }, + "node_modules/tree-kill": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", + "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==", + "dev": true, + "license": "MIT", + "bin": { + "tree-kill": "cli.js" + } + }, + "node_modules/tsdown": { + "version": "0.21.10", + "resolved": "https://registry.npmjs.org/tsdown/-/tsdown-0.21.10.tgz", + "integrity": "sha512-3wk73yBhZe/wX7REqSdivNQ84TDs1mJ+IlnzrrEREP70xlJ/AEIzqaI04l/TzMKVIdkTdC3CPaADn2Lk/0SkdA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansis": "^4.2.0", + "cac": "^7.0.0", + "defu": "^6.1.7", + "empathic": "^2.0.0", + "hookable": "^6.1.1", + "import-without-cache": "^0.3.3", + "obug": "^2.1.1", + "picomatch": "^4.0.4", + "rolldown": "1.0.0-rc.17", + "rolldown-plugin-dts": "^0.23.2", + "semver": "^7.7.4", + "tinyexec": "^1.1.1", + "tinyglobby": "^0.2.16", + "tree-kill": "^1.2.2", + "unconfig-core": "^7.5.0", + "unrun": "^0.2.37" + }, + "bin": { + "tsdown": "dist/run.mjs" + }, + "engines": { + "node": ">=20.19.0" + }, + "funding": { + "url": "https://github.com/sponsors/sxzz" + }, + "peerDependencies": { + "@arethetypeswrong/core": "^0.18.1", + "@tsdown/css": "0.21.10", + "@tsdown/exe": "0.21.10", + "@vitejs/devtools": "*", + "publint": "^0.3.0", + "typescript": "^5.0.0 || ^6.0.0", + "unplugin-unused": "^0.5.0" + }, + "peerDependenciesMeta": { + "@arethetypeswrong/core": { + "optional": true + }, + "@tsdown/css": { + "optional": true + }, + "@tsdown/exe": { + "optional": true + }, + "@vitejs/devtools": { + "optional": true + }, + "publint": { + "optional": true + }, + "typescript": { + "optional": true + }, + "unplugin-unused": { + "optional": true + } + } + }, + "node_modules/tsdown/node_modules/tinyglobby": { + "version": "0.2.16", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.16.tgz", + "integrity": "sha512-pn99VhoACYR8nFHhxqix+uvsbXineAasWm5ojXoN8xEwK5Kd3/TrhNn1wByuD52UxWRLy8pu+kRMniEi6Eq9Zg==", + "dev": true, + "license": "MIT", + "dependencies": { + "fdir": "^6.5.0", + "picomatch": "^4.0.4" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" + } + }, "node_modules/tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -5062,6 +5742,20 @@ "node": ">=0.8.0" } }, + "node_modules/unconfig-core": { + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/unconfig-core/-/unconfig-core-7.5.0.tgz", + "integrity": "sha512-Su3FauozOGP44ZmKdHy2oE6LPjk51M/TRRjHv2HNCWiDvfvCoxC2lno6jevMA91MYAdCdwP05QnWdWpSbncX/w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@quansync/fs": "^1.0.0", + "quansync": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, "node_modules/undici": { "version": "7.24.5", "resolved": "https://registry.npmjs.org/undici/-/undici-7.24.5.tgz", @@ -5094,6 +5788,33 @@ "node": ">= 0.8" } }, + "node_modules/unrun": { + "version": "0.2.39", + "resolved": "https://registry.npmjs.org/unrun/-/unrun-0.2.39.tgz", + "integrity": "sha512-h9FxYVpztY/wwq+bauLOh6Y3CWu2IVeRLq5lxzneBiIU9Tn86OGp9xiQrGhnYspAmg5dzdY0Cc8+Y70kuTARCg==", + "dev": true, + "license": "MIT", + "dependencies": { + "rolldown": "1.0.0-rc.17" + }, + "bin": { + "unrun": "dist/cli.mjs" + }, + "engines": { + "node": ">=20.19.0" + }, + "funding": { + "url": "https://github.com/sponsors/Gugustinette" + }, + "peerDependencies": { + "synckit": "^0.11.11" + }, + "peerDependenciesMeta": { + "synckit": { + "optional": true + } + } + }, "node_modules/url-join": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/url-join/-/url-join-5.0.0.tgz", diff --git a/mcp-server/package.json b/mcp-server/package.json index 41f78e8..1df9003 100644 --- a/mcp-server/package.json +++ b/mcp-server/package.json @@ -2,7 +2,8 @@ "name": "@currents/mcp", "type": "module", "files": [ - "build", + "dist", + "assets", "README.md" ], "keywords": [ @@ -12,25 +13,25 @@ "dashboard", "reporting" ], - "bin": "./build/index.js", + "bin": "./dist/index.mjs", "version": "2.3.0", "description": "Currents MCP server", - "main": "./build/cjs/api.js", - "module": "./build/api.js", - "types": "./build/api.d.ts", + "main": "./dist/api.cjs", + "module": "./dist/api.mjs", + "types": "./dist/api.d.ts", "exports": { ".": { - "types": "./build/api.d.ts", - "import": "./build/api.js", - "require": "./build/cjs/api.js" + "types": "./dist/api.d.ts", + "import": "./dist/api.mjs", + "require": "./dist/api.cjs" } }, "scripts": { - "build": "tsc && tsc -p tsconfig.cjs.json && node ./scripts/write-cjs-package-json.mjs && chmod 755 build/index.js", + "build": "tsdown && chmod 755 dist/index.mjs", "publish:mcp": "npm run publish:npm", - "publish:npm": "npm run rm && npm run build && ./publish.cjs", - "start": "node build/index.js", - "rm": "rimraf dist", + "publish:npm": "npm run rm && npm run build && ./publish.cjs", + "start": "node dist/index.mjs", + "rm": "rm -rf dist", "prepare": "git config core.hooksPath mcp-server/scripts/hooks", "sync-readme": "node scripts/sync-readme-tools.mjs", "test": "vitest", @@ -61,7 +62,7 @@ "@release-it/conventional-changelog": "^11.0.0", "@types/node": "^20.19.0", "release-it": "^20.0.1", - "rimraf": "^6.0.1", + "tsdown": "^0.21.0", "typescript": "^5.9.3", "vitest": "^4.0.18" } diff --git a/mcp-server/scripts/sync-readme-tools.mjs b/mcp-server/scripts/sync-readme-tools.mjs index 8a5ed52..eedcd73 100644 --- a/mcp-server/scripts/sync-readme-tools.mjs +++ b/mcp-server/scripts/sync-readme-tools.mjs @@ -25,7 +25,7 @@ const origResolve = await (async () => { // then patch globalThis so the built server.js picks it up. // Dynamically import the built server module after shimming the dep. - // The built output lives at build/server.js and uses: + // The built output lives at dist/ and uses: // import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js" // import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js" // diff --git a/mcp-server/scripts/write-cjs-package-json.mjs b/mcp-server/scripts/write-cjs-package-json.mjs deleted file mode 100644 index 84d17aa..0000000 --- a/mcp-server/scripts/write-cjs-package-json.mjs +++ /dev/null @@ -1,8 +0,0 @@ -import { mkdirSync, writeFileSync } from "node:fs"; -import { join, dirname } from "node:path"; -import { fileURLToPath } from "node:url"; - -const root = join(dirname(fileURLToPath(import.meta.url)), ".."); -const cjsDir = join(root, "build", "cjs"); -mkdirSync(cjsDir, { recursive: true }); -writeFileSync(join(cjsDir, "package.json"), `${JSON.stringify({ type: "commonjs" })}\n`); diff --git a/mcp-server/src/cli-bin.integration.test.ts b/mcp-server/src/cli-bin.integration.test.ts index a2953cd..e9e214e 100644 --- a/mcp-server/src/cli-bin.integration.test.ts +++ b/mcp-server/src/cli-bin.integration.test.ts @@ -4,7 +4,7 @@ * `package-published-esm.integration.test.ts` for `import "@currents/mcp"`). * - * 1. Prerequisite: `build/index.js` exists (`npm run test:run` runs `build` + * 1. Prerequisite: `dist/index.mjs` exists (`npm run test:run` runs `build` * first). If missing, the suite is skipped so `vitest` without a prior * build does not fail noisily. * 2. `packTarball`: `npm pack` from the package root → one `.tgz` under a @@ -20,7 +20,7 @@ import { fileURLToPath } from "node:url"; import { describe, expect, it } from "vitest"; const root = fileURLToPath(new URL("..", import.meta.url)); -const buildIndex = path.join(root, "build", "index.js"); +const buildIndex = path.join(root, "dist", "index.mjs"); function packTarball(packDest: string): string { // Respect `files` and standard pack rules; do not mutate package.json (unlike release `publish.cjs`). @@ -74,7 +74,7 @@ describe.skipIf(!existsSync(buildIndex))( * - `npm init -y` and `npm install ` in a fresh temp project. npm links * `node_modules/.bin/mcp` (or `mcp.cmd` on Windows) to the packed CLI. * - Assert the shim exists. This catches broken `bin`, wrong `files` (missing - * `build/index.js`), or install layout issues without spawning the server. + * `dist/index.mjs`), or install layout issues without spawning the server. * */ it("exposes mcp bin after npm install from tarball", () => { const packDir = mkdtempSync(path.join(tmpdir(), "mcp-pack-")); diff --git a/mcp-server/src/package-environments.integration.test.ts b/mcp-server/src/package-environments.integration.test.ts index a088fba..0124cd4 100644 --- a/mcp-server/src/package-environments.integration.test.ts +++ b/mcp-server/src/package-environments.integration.test.ts @@ -3,17 +3,15 @@ * real Node child process (not Vitest’s module graph). * * Flow (each `it`): - * 1. `npm run test:run` has already run `build`, so `build/` and `build/cjs/` - * exist under the package root (`mcp-server/`). + * 1. `npm run test:run` has already run `build`, so `dist/` exists under the + * package root (`mcp-server/`). * 2. Spawn `process.execPath` (Node) with a small script under * `test/fixtures/*.mjs` or `*.cjs`. * 3. Set `cwd` to that package root so paths and semantics match “consumer runs * next to a checked-out / linked package,” not the Vitest test file’s dir. * 4. The fixture imports the **built** API: - * - ESM: relative file URL to `build/api.js` (Node ESM resolution, `.js` - * extension required). - * - CJS: `require("../../build/cjs/api.js")` with `build/cjs/package.json` - * `type: commonjs` so nested `.js` files load as CommonJS. + * - ESM: relative import to `dist/api.mjs`. + * - CJS: `require("../../dist/api.cjs")`. * - CJS + dynamic `import()`: CommonJS script `import()`s the ESM build; * exercises interop from a `.cjs` entry. * 5. Each script prints a single token to stdout; the parent asserts it to @@ -40,7 +38,7 @@ describe("package consumers (Node ESM, CJS require, CJS dynamic import)", () => expect(out.trim()).toBe("esm-ok"); }); - it("loads programmatic API from CJS require (build/cjs)", () => { + it("loads programmatic API from CJS require (dist/api.cjs)", () => { const out = execFileSync( process.execPath, [path.join(root, "test", "fixtures", "consumer-cjs.cjs")], diff --git a/mcp-server/src/package-published-esm.integration.test.ts b/mcp-server/src/package-published-esm.integration.test.ts index 28e2db8..d2dcf2f 100644 --- a/mcp-server/src/package-published-esm.integration.test.ts +++ b/mcp-server/src/package-published-esm.integration.test.ts @@ -4,16 +4,16 @@ * tarball (same shape users get from the registry). * * Why a separate file from `package-environments.integration.test.ts`: - * workspace tests import `build/*.js` via relative paths; they never ask Node + * workspace tests import `dist/*` via relative paths; they never ask Node * to apply `"exports"` for the scoped name. This suite closes that gap. * * Flow (`it`): - * 1. Prerequisite: `build/index.js` exists (`test:run` runs `build` first). + * 1. Prerequisite: `dist/index.mjs` exists (`test:run` runs `build` first). * If missing, the suite is skipped (same gate as CLI pack tests). * 2. `packTarball`: run `npm pack` with `cwd` = package root. npm creates a * `.tgz` containing exactly what publishing would ship (`package.json` - * `files`, plus auto-included `package.json`). That includes `build/` and - * the `exports` map pointing `"import"` → `./build/api.js`. + * `files`, plus auto-included `package.json`). That includes `dist/` and + * the `exports` map pointing `"import"` → `./dist/api.mjs`. * 3. Create two temp dirs: one receives the `.tgz`, one is a minimal consumer * project (`npm init -y`, then `npm install `). npm unpacks into * `/node_modules/@currents/mcp`. @@ -25,7 +25,7 @@ * 5. Run `node run-published-esm.mjs` with `cwd = installDir`. Node loads the * ESM entry via the `"import"` condition and must find `startMcpServer`. * 6. Assert stdout `published-esm-ok`. Failures here typically mean broken - * `exports`, missing files from the packed `build/`, or a bad dual-package + * `exports`, missing files from the packed `dist/`, or a bad dual-package * layout. * */ import { execFileSync } from "node:child_process"; @@ -36,7 +36,7 @@ import { fileURLToPath } from "node:url"; import { describe, expect, it } from "vitest"; const root = fileURLToPath(new URL("..", import.meta.url)); -const buildIndex = path.join(root, "build", "index.js"); +const buildIndex = path.join(root, "dist", "index.mjs"); /** Run `npm pack` from the package root and return the path to the single `.tgz` in `packDest`. */ function packTarball(packDest: string): string { diff --git a/mcp-server/src/server.ts b/mcp-server/src/server.ts index 4993205..1a68292 100644 --- a/mcp-server/src/server.ts +++ b/mcp-server/src/server.ts @@ -6,28 +6,28 @@ import { } from "./lib/env.js"; import { logger } from "./lib/logger.js"; // Actions tools -import { listActionsTool } from "./tools/actions/list-actions.js"; import { createActionTool } from "./tools/actions/create-action.js"; -import { getActionTool } from "./tools/actions/get-action.js"; -import { updateActionTool } from "./tools/actions/update-action.js"; import { deleteActionTool } from "./tools/actions/delete-action.js"; -import { enableActionTool } from "./tools/actions/enable-action.js"; import { disableActionTool } from "./tools/actions/disable-action.js"; -import { listAffectedTestsTool } from "./tools/actions/list-affected-tests.js"; -import { getAffectedTestExecutionsTool } from "./tools/actions/get-affected-test-executions.js"; +import { enableActionTool } from "./tools/actions/enable-action.js"; +import { getActionTool } from "./tools/actions/get-action.js"; import { getAffectedTestExecutionsByActionTool } from "./tools/actions/get-affected-test-executions-by-action.js"; +import { getAffectedTestExecutionsTool } from "./tools/actions/get-affected-test-executions.js"; +import { listActionsTool } from "./tools/actions/list-actions.js"; +import { listAffectedTestsTool } from "./tools/actions/list-affected-tests.js"; +import { updateActionTool } from "./tools/actions/update-action.js"; // Projects tools -import { getProjectsTool } from "./tools/projects/get-projects.js"; -import { getProjectTool } from "./tools/projects/get-project.js"; import { getProjectInsightsTool } from "./tools/projects/get-project-insights.js"; +import { getProjectTool } from "./tools/projects/get-project.js"; +import { getProjectsTool } from "./tools/projects/get-projects.js"; // Runs tools -import { getRunsTool } from "./tools/runs/get-runs.js"; -import { getRunDetailsTool } from "./tools/runs/get-run.js"; -import { findRunTool } from "./tools/runs/find-run.js"; +import { cancelRunByGithubCITool } from "./tools/runs/cancel-run-github-ci.js"; import { cancelRunTool } from "./tools/runs/cancel-run.js"; -import { resetRunTool } from "./tools/runs/reset-run.js"; import { deleteRunTool } from "./tools/runs/delete-run.js"; -import { cancelRunByGithubCITool } from "./tools/runs/cancel-run-github-ci.js"; +import { findRunTool } from "./tools/runs/find-run.js"; +import { getRunDetailsTool } from "./tools/runs/get-run.js"; +import { getRunsTool } from "./tools/runs/get-runs.js"; +import { resetRunTool } from "./tools/runs/reset-run.js"; // Specs tools import { getSpecFilesPerformanceTool } from "./tools/specs/get-spec-files-performance.js"; import { getSpecInstancesTool } from "./tools/specs/get-spec-instances.js"; @@ -38,15 +38,28 @@ import { getTestSignatureTool } from "./tools/tests/get-tests-signature.js"; // Errors tools import { getErrorsExplorerTool } from "./tools/errors/get-errors-explorer.js"; // Webhooks tools -import { listWebhooksTool } from "./tools/webhooks/list-webhooks.js"; import { createWebhookTool } from "./tools/webhooks/create-webhook.js"; +import { deleteWebhookTool } from "./tools/webhooks/delete-webhook.js"; import { getWebhookTool } from "./tools/webhooks/get-webhook.js"; +import { listWebhooksTool } from "./tools/webhooks/list-webhooks.js"; import { updateWebhookTool } from "./tools/webhooks/update-webhook.js"; -import { deleteWebhookTool } from "./tools/webhooks/delete-webhook.js"; + +declare const __LOGO_BASE64__: string; +declare const __VERSION__: string; + +const logoBase64 = __LOGO_BASE64__; +const version = __VERSION__; const server = new McpServer({ name: "currents", - version: "1.0.0", + version, + icons: [ + { + src: `data:image/png;base64,${logoBase64}`, + mimeType: "image/png", + sizes: ["256x256", "128x128", "64x64", "32x32", "16x16"], + }, + ], }); // Actions API tools @@ -57,7 +70,7 @@ server.registerTool( "List all actions for a project with optional filtering. Actions are rules that automatically modify test behavior (skip, quarantine, tag). Supports filtering by status (active/disabled/archived/expired) and search by name. Requires a projectId.", inputSchema: listActionsTool.schema, }, - listActionsTool.handler + listActionsTool.handler, ); server.registerTool( @@ -67,7 +80,7 @@ server.registerTool( "Create a new action for a project. Actions define rules that automatically skip, quarantine, or tag tests based on conditions like test title, file path, git branch, etc. Requires projectId, name, action array, and matcher object.", inputSchema: createActionTool.schema, }, - createActionTool.handler + createActionTool.handler, ); server.registerTool( @@ -77,7 +90,7 @@ server.registerTool( "Get a single action by ID. The actionId is globally unique, so projectId is not required. Returns full action details including matcher conditions and current status.", inputSchema: getActionTool.schema, }, - getActionTool.handler + getActionTool.handler, ); server.registerTool( @@ -87,7 +100,7 @@ server.registerTool( "Update an existing action. The actionId is globally unique. You can update name, description, action array, matcher, or expiration date. All fields are optional.", inputSchema: updateActionTool.schema, }, - updateActionTool.handler + updateActionTool.handler, ); server.registerTool( @@ -97,7 +110,7 @@ server.registerTool( "Delete (archive) an action. This is a soft delete - the action will be marked as archived but not permanently removed. The actionId is globally unique.", inputSchema: deleteActionTool.schema, }, - deleteActionTool.handler + deleteActionTool.handler, ); server.registerTool( @@ -107,7 +120,7 @@ server.registerTool( "Enable a disabled action. Changes the action status from disabled to active, making it apply to matching tests again. The actionId is globally unique.", inputSchema: enableActionTool.schema, }, - enableActionTool.handler + enableActionTool.handler, ); server.registerTool( @@ -117,7 +130,7 @@ server.registerTool( "Disable an active action. Changes the action status to disabled, temporarily preventing it from applying to tests. The actionId is globally unique.", inputSchema: disableActionTool.schema, }, - disableActionTool.handler + disableActionTool.handler, ); server.registerTool( @@ -127,7 +140,7 @@ server.registerTool( "List tests affected by actions (quarantine, skip, tag) for a project within a date range. Returns aggregated data grouped by test signature. Supports filtering by action types, action ID, status, and search. Requires projectId, date_start, and date_end. Preview endpoint: fields and path may change.", inputSchema: listAffectedTestsTool.schema, }, - listAffectedTestsTool.handler + listAffectedTestsTool.handler, ); server.registerTool( @@ -137,7 +150,7 @@ server.registerTool( "Get execution details for a specific affected test (by signature) within a date range. Returns individual test execution records with action info. Uses cursor-based pagination. Requires projectId, signature, date_start, and date_end.", inputSchema: getAffectedTestExecutionsTool.schema, }, - getAffectedTestExecutionsTool.handler + getAffectedTestExecutionsTool.handler, ); server.registerTool( @@ -147,7 +160,7 @@ server.registerTool( "List test executions where a specific action/rule was applied, within a date range. Uses cursor-based pagination. Requires actionId, date_start, and date_end.", inputSchema: getAffectedTestExecutionsByActionTool.schema, }, - getAffectedTestExecutionsByActionTool.handler + getAffectedTestExecutionsByActionTool.handler, ); // Projects API tools @@ -158,7 +171,7 @@ server.registerTool( "Retrieves projects available in the Currents platform. Supports cursor-based pagination with limit, starting_after, ending_before parameters, or set fetchAll=true for automatic pagination. This is a prerequisite for using any other tools that require project-specific information.", inputSchema: getProjectsTool.schema, }, - getProjectsTool.handler + getProjectsTool.handler, ); server.registerTool( @@ -168,7 +181,7 @@ server.registerTool( "Get a single project by ID. Returns project details including name, creation date, failFast setting, inactivity timeout, and default branch name.", inputSchema: getProjectTool.schema, }, - getProjectTool.handler + getProjectTool.handler, ); server.registerTool( @@ -178,7 +191,7 @@ server.registerTool( "Get aggregated run and test metrics for a project within a date range. Returns overall metrics and timeline data with configurable resolution (1h/1d/1w). Supports filtering by tags, branches, groups, and authors. Requires projectId, date_start, and date_end.", inputSchema: getProjectInsightsTool.schema, }, - getProjectInsightsTool.handler + getProjectInsightsTool.handler, ); // Runs API tools @@ -189,7 +202,7 @@ server.registerTool( "Retrieves a list of runs for a specific project with optional filtering. Supports filtering by branch, tags (with AND/OR operators), status (PASSED/FAILED/RUNNING/FAILING), completion state, date range, commit author, and search by ciBuildId or commit message. Requires a projectId. If the projectId is not known, first call 'currents-get-projects' and ask the user to select the project.", inputSchema: getRunsTool.schema, }, - getRunsTool.handler + getRunsTool.handler, ); server.registerTool( @@ -199,7 +212,7 @@ server.registerTool( "Retrieves details of a specific test run. Requires a user-provided runId.", inputSchema: getRunDetailsTool.schema, }, - getRunDetailsTool.handler + getRunDetailsTool.handler, ); server.registerTool( @@ -209,7 +222,7 @@ server.registerTool( "Find a run by query parameters. Returns the most recent completed run matching the criteria. Can search by ciBuildId (exact match) or by branch/tags. Supports pwLastRun flag for Playwright last run info. Requires projectId.", inputSchema: findRunTool.schema, }, - findRunTool.handler + findRunTool.handler, ); server.registerTool( @@ -219,7 +232,7 @@ server.registerTool( "Cancel a run in progress. This will stop the run and mark it as cancelled. Requires runId.", inputSchema: cancelRunTool.schema, }, - cancelRunTool.handler + cancelRunTool.handler, ); server.registerTool( @@ -229,7 +242,7 @@ server.registerTool( "Reset failed spec files in a run to allow re-execution. Requires runId and machineId array (1-63 machine IDs). Optionally supports batched orchestration.", inputSchema: resetRunTool.schema, }, - resetRunTool.handler + resetRunTool.handler, ); server.registerTool( @@ -239,7 +252,7 @@ server.registerTool( "Delete a run and all associated data. This is a permanent deletion. Requires runId.", inputSchema: deleteRunTool.schema, }, - deleteRunTool.handler + deleteRunTool.handler, ); server.registerTool( @@ -249,7 +262,7 @@ server.registerTool( "Cancel a run by GitHub Actions workflow run ID and attempt number. Optionally scope by projectId or ciBuildId. Requires githubRunId and githubRunAttempt.", inputSchema: cancelRunByGithubCITool.schema, }, - cancelRunByGithubCITool.handler + cancelRunByGithubCITool.handler, ); // Specs API tools @@ -260,7 +273,7 @@ server.registerTool( "Retrieves debugging data from a specific execution of a test spec file by instanceId.", inputSchema: getSpecInstancesTool.schema, }, - getSpecInstancesTool.handler + getSpecInstancesTool.handler, ); server.registerTool( @@ -270,7 +283,7 @@ server.registerTool( "Retrieves spec files performance metrics for a specific project within a date range. Supports ordering by avgDuration, failedExecutions, failureRate, flakeRate, flakyExecutions, fullyReported, overallExecutions, suiteSize, timeoutExecutions, or timeoutRate. Supports filtering by tags, branches, groups, and authors. Requires a projectId. If the projectId is not known, first call 'currents-get-projects' and ask the user to select the project.", inputSchema: getSpecFilesPerformanceTool.schema, }, - getSpecFilesPerformanceTool.handler + getSpecFilesPerformanceTool.handler, ); // Tests API tools @@ -281,7 +294,7 @@ server.registerTool( "Retrieves aggregated test metrics for a specific project within a date range. Supports ordering by failures, passes, flakiness, duration, executions, title, and various delta metrics. Supports filtering by spec name, test title, tags, branches, groups, authors, minimum executions, test state, and annotations. Requires a projectId. If the projectId is not known, first call 'currents-get-projects' and ask the user to select the project.", inputSchema: getTestsPerformanceTool.schema, }, - getTestsPerformanceTool.handler + getTestsPerformanceTool.handler, ); server.registerTool( @@ -291,7 +304,7 @@ server.registerTool( "Generates a unique test signature based on project, spec file path, and test title. The test title can be a string or array of strings (for nested describe blocks). Requires a projectId. If the projectId is not known, first call 'currents-get-projects' and ask the user to select the project.", inputSchema: getTestSignatureTool.schema, }, - getTestSignatureTool.handler + getTestSignatureTool.handler, ); server.registerTool( @@ -301,7 +314,7 @@ server.registerTool( "Retrieves historical test execution results for a specific test signature. Supports filtering by date range, branch, tags, git author, test status (passed/failed/pending/skipped), run group, flaky status, and annotations. Requires the test signature. If the signature is not known, first call 'currents-get-tests-signatures'.", inputSchema: getTestResultsTool.schema, }, - getTestResultsTool.handler + getTestResultsTool.handler, ); // Errors API tools @@ -312,7 +325,7 @@ server.registerTool( "Get aggregated error metrics for a project within a date range. Supports filtering by error_target, error_message, error_category, error_action, tags, branches, authors, and groups. Supports grouping by target, action, category, or message. Returns error counts, affected tests and branches, with timeline data. Requires projectId, date_start, and date_end.", inputSchema: getErrorsExplorerTool.schema, }, - getErrorsExplorerTool.handler + getErrorsExplorerTool.handler, ); // Webhooks API tools @@ -323,7 +336,7 @@ server.registerTool( "List all webhooks for a project. Webhooks allow you to receive HTTP POST notifications when certain events occur in your test runs: RUN_FINISH (run completed), RUN_START (run started), RUN_TIMEOUT (run timed out), RUN_CANCELED (run was cancelled). Requires a projectId.", inputSchema: listWebhooksTool.schema, }, - listWebhooksTool.handler + listWebhooksTool.handler, ); server.registerTool( @@ -333,7 +346,7 @@ server.registerTool( "Create a new webhook for a project. Specify the URL to receive POST notifications, optional custom headers (as JSON string), events to trigger on (RUN_FINISH, RUN_START, RUN_TIMEOUT, RUN_CANCELED), and an optional label. Requires projectId and url.", inputSchema: createWebhookTool.schema, }, - createWebhookTool.handler + createWebhookTool.handler, ); server.registerTool( @@ -343,7 +356,7 @@ server.registerTool( "Get a single webhook by ID. The hookId is a UUID. Returns full webhook details including url, headers, events, label, and timestamps.", inputSchema: getWebhookTool.schema, }, - getWebhookTool.handler + getWebhookTool.handler, ); server.registerTool( @@ -353,7 +366,7 @@ server.registerTool( "Update an existing webhook. You can update the url, headers (as JSON string), hookEvents array, or label. All fields are optional. The hookId is a UUID.", inputSchema: updateWebhookTool.schema, }, - updateWebhookTool.handler + updateWebhookTool.handler, ); server.registerTool( @@ -363,7 +376,7 @@ server.registerTool( "Delete a webhook. This permanently removes the webhook. The hookId is a UUID.", inputSchema: deleteWebhookTool.schema, }, - deleteWebhookTool.handler + deleteWebhookTool.handler, ); /** Starts the MCP server over stdio (used by the CLI and programmatic embedders). */ diff --git a/mcp-server/test/fixtures/consumer-cjs-dynamic-import.cjs b/mcp-server/test/fixtures/consumer-cjs-dynamic-import.cjs index 1452820..2b203ac 100644 --- a/mcp-server/test/fixtures/consumer-cjs-dynamic-import.cjs +++ b/mcp-server/test/fixtures/consumer-cjs-dynamic-import.cjs @@ -1,6 +1,6 @@ const assert = require("node:assert"); -import("../../build/api.js") +import("../../dist/api.mjs") .then(({ startMcpServer }) => { assert.strictEqual(typeof startMcpServer, "function"); console.log("cjs-dynamic-import-ok"); diff --git a/mcp-server/test/fixtures/consumer-cjs.cjs b/mcp-server/test/fixtures/consumer-cjs.cjs index cb48245..dc90270 100644 --- a/mcp-server/test/fixtures/consumer-cjs.cjs +++ b/mcp-server/test/fixtures/consumer-cjs.cjs @@ -1,5 +1,5 @@ const assert = require("node:assert"); -const { startMcpServer } = require("../../build/cjs/api.js"); +const { startMcpServer } = require("../../dist/api.cjs"); assert.strictEqual(typeof startMcpServer, "function"); console.log("cjs-require-ok"); diff --git a/mcp-server/test/fixtures/consumer-esm.mjs b/mcp-server/test/fixtures/consumer-esm.mjs index 732cc94..52c90ae 100644 --- a/mcp-server/test/fixtures/consumer-esm.mjs +++ b/mcp-server/test/fixtures/consumer-esm.mjs @@ -1,5 +1,5 @@ import assert from "node:assert"; -import { startMcpServer } from "../../build/api.js"; +import { startMcpServer } from "../../dist/api.mjs"; assert.strictEqual(typeof startMcpServer, "function"); console.log("esm-ok"); diff --git a/mcp-server/tsconfig.cjs.json b/mcp-server/tsconfig.cjs.json deleted file mode 100644 index 5b87ad0..0000000 --- a/mcp-server/tsconfig.cjs.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - /* TS5110: CommonJS + Node16/NodeNext resolution is invalid; this build targets Node 20+ runtime only. */ - "module": "CommonJS", - "moduleResolution": "Node10", - "outDir": "./build/cjs", - "declaration": false, - "declarationMap": false - }, - "include": ["src/**/*.ts"], - "exclude": [ - "node_modules", - "**/*.test.ts", - "**/*.spec.ts", - "src/index.ts" - ] -} diff --git a/mcp-server/tsdown.config.ts b/mcp-server/tsdown.config.ts new file mode 100644 index 0000000..bb225a5 --- /dev/null +++ b/mcp-server/tsdown.config.ts @@ -0,0 +1,22 @@ +import { readFileSync } from "node:fs"; +import { defineConfig } from "tsdown"; + +const logoBase64 = readFileSync("./assets/logo.png").toString("base64"); +const { version } = JSON.parse(readFileSync("./package.json", "utf-8")); + +export default defineConfig({ + entry: { + index: "./src/index.ts", + api: "./src/api.ts", + }, + format: ["esm", "cjs"], + dts: true, + clean: true, + define: { + __LOGO_BASE64__: JSON.stringify(logoBase64), + __VERSION__: JSON.stringify(version), + }, + deps: { + neverBundle: [/^@modelcontextprotocol/, /^pino/, /^commander/, /^zod/], + }, +}); diff --git a/mcp-server/vitest.config.ts b/mcp-server/vitest.config.ts index f16c400..c8b6b2b 100644 --- a/mcp-server/vitest.config.ts +++ b/mcp-server/vitest.config.ts @@ -1,17 +1,24 @@ +import { readFileSync } from "node:fs"; import { defineConfig } from "vitest/config"; +const logoBase64 = readFileSync("./assets/logo.png").toString("base64"); +const { version } = JSON.parse(readFileSync("./package.json", "utf-8")); + export default defineConfig({ + define: { + __LOGO_BASE64__: JSON.stringify(logoBase64), + __VERSION__: JSON.stringify(version), + }, test: { globals: true, environment: "node", include: ["src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}"], - exclude: ["node_modules", "build", "dist"], + exclude: ["node_modules", "dist"], coverage: { provider: "v8", reporter: ["text", "json", "html"], exclude: [ "node_modules/", - "build/", "dist/", "**/*.d.ts", "**/*.config.*",