build: migrate lint formatting tooling
This commit is contained in:
parent
4daadfc08f
commit
efed4d4383
15
.oxfmtrc.json
Normal file
15
.oxfmtrc.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"$schema": "./node_modules/oxfmt/configuration_schema.json",
|
||||
"useTabs": false,
|
||||
"tabWidth": 2,
|
||||
"printWidth": 120,
|
||||
"singleQuote": true,
|
||||
"jsxSingleQuote": false,
|
||||
"quoteProps": "as-needed",
|
||||
"trailingComma": "es5",
|
||||
"semi": true,
|
||||
"arrowParens": "always",
|
||||
"bracketSameLine": false,
|
||||
"bracketSpacing": true,
|
||||
"ignorePatterns": ["dist", "tmp", "node_modules"]
|
||||
}
|
||||
22
.oxlintrc.json
Normal file
22
.oxlintrc.json
Normal file
@ -0,0 +1,22 @@
|
||||
{
|
||||
"$schema": "./node_modules/oxlint/configuration_schema.json",
|
||||
"plugins": ["typescript", "unicorn", "oxc"],
|
||||
"categories": {
|
||||
"correctness": "error",
|
||||
"suspicious": "error",
|
||||
"perf": "error"
|
||||
},
|
||||
"rules": {
|
||||
"no-await-in-loop": "off",
|
||||
"oxc/no-async-endpoint-handlers": "off",
|
||||
"typescript/no-unsafe-type-assertion": "off",
|
||||
"typescript/no-unnecessary-type-assertion": "off",
|
||||
"typescript/no-unnecessary-type-conversion": "off",
|
||||
"typescript/no-unnecessary-type-parameters": "off",
|
||||
"typescript/no-unnecessary-template-expression": "off",
|
||||
"unicorn/prefer-add-event-listener": "off"
|
||||
},
|
||||
"env": {
|
||||
"builtin": true
|
||||
}
|
||||
}
|
||||
75
README.md
75
README.md
@ -1,4 +1,5 @@
|
||||
# MCPorter 🧳 - Call MCPs from TypeScript or as CLI
|
||||
|
||||
<p align="center">
|
||||
<img src="https://raw.githubusercontent.com/steipete/mcporter/main/mcporter.png" alt="MCPorter header banner" width="1100">
|
||||
</p>
|
||||
@ -21,11 +22,12 @@ MCPorter helps you lean into the "code execution" workflows highlighted in Anthr
|
||||
- **Typed tool clients.** `mcporter emit-ts` emits `.d.ts` interfaces or ready-to-run client wrappers so agents/tests can call MCP servers with strong TypeScript types without hand-writing plumbing.
|
||||
- **Friendly composable API.** `createServerProxy()` exposes tools as ergonomic camelCase methods, automatically applies JSON-schema defaults, validates required arguments, and hands back a `CallResult` with `.text()`, `.markdown()`, `.json()`, `.images()`, and `.content()` helpers.
|
||||
- **OAuth and stdio ergonomics.** Built-in OAuth caching, log tailing, and stdio wrappers let you work with HTTP, SSE, and stdio transports from the same interface.
|
||||
- **Ad-hoc connections.** Point the CLI at *any* MCP endpoint (HTTP or stdio) without touching config, then persist it later if you want. Hosted MCPs that expect a browser login (Supabase, Vercel, etc.) are auto-detected—just run `mcporter auth <url>` and the CLI promotes the definition to OAuth on the fly. See [docs/adhoc.md](docs/adhoc.md).
|
||||
- **Ad-hoc connections.** Point the CLI at _any_ MCP endpoint (HTTP or stdio) without touching config, then persist it later if you want. Hosted MCPs that expect a browser login (Supabase, Vercel, etc.) are auto-detected—just run `mcporter auth <url>` and the CLI promotes the definition to OAuth on the fly. See [docs/adhoc.md](docs/adhoc.md).
|
||||
|
||||
## Quick Start
|
||||
|
||||
MCPorter auto-discovers the MCP servers you already configured in Cursor, Claude Code/Desktop, Codex, or local overrides. You can try it immediately with `npx`--no installation required. Need a full command reference (flags, modes, return types)? Check out [docs/cli-reference.md](docs/cli-reference.md).
|
||||
|
||||
### Call syntax options
|
||||
|
||||
```bash
|
||||
@ -39,7 +41,6 @@ npx mcporter call 'linear.create_comment(issueId: "ENG-123", body: "Looks good!"
|
||||
npx mcporter call server.tool -- --raw-value
|
||||
```
|
||||
|
||||
|
||||
### List your MCP servers
|
||||
|
||||
```bash
|
||||
@ -188,7 +189,6 @@ npx mcporter call --stdio "bun run ./local-server.ts" --name local-tools
|
||||
- The daemon only manages named servers that come from your config/imports. Ad-hoc STDIO/HTTP targets invoked via `--stdio …`, `--http-url …`, or inline function-call syntax remain per-process today; persist them into `config/mcporter.json` (or use `--persist`) if you need them to participate in the shared daemon.
|
||||
- Troubleshooting? Run `mcporter daemon start --log` (or `--log-file /tmp/daemon.log`) to tee stdout/stderr into a file, and add `--log-servers chrome-devtools` when you only want call traces for a specific MCP. Per-server configs can also set `"logging": { "daemon": { "enabled": true } }` to force detailed logging for that entry.
|
||||
|
||||
|
||||
## Friendlier Tool Calls
|
||||
|
||||
- **Function-call syntax.** Instead of juggling `--flag value`, you can call tools as `mcporter call 'linear.create_issue(title: "Bug", team: "ENG")'`. The parser supports nested objects/arrays, lets you omit labels when you want to rely on schema order (e.g. `mcporter 'context7.resolve-library-id("react")'`), and surfaces schema validation errors clearly. Deep dive in [docs/call-syntax.md](docs/call-syntax.md).
|
||||
@ -198,7 +198,6 @@ npx mcporter call --stdio "bun run ./local-server.ts" --name local-tools
|
||||
- **Auto-correct.** If you typo a tool name, MCPorter inspects the server’s tool catalog, retries when the edit distance is tiny, and otherwise prints a `Did you mean …?` hint. The heuristic (and how to tune it) is captured in [docs/call-heuristic.md](docs/call-heuristic.md).
|
||||
- **Richer single-server output.** `mcporter list <server>` now prints TypeScript-style signatures, inline comments, return-shape hints, and command examples that mirror the new call syntax. Optional parameters stay hidden by default—add `--all-parameters` or `--schema` whenever you need the full JSON schema.
|
||||
|
||||
|
||||
## Installation
|
||||
|
||||
### Run instantly with `npx`
|
||||
@ -225,12 +224,12 @@ brew install steipete/tap/mcporter
|
||||
## One-shot calls from code
|
||||
|
||||
```ts
|
||||
import { callOnce } from "mcporter";
|
||||
import { callOnce } from 'mcporter';
|
||||
|
||||
const result = await callOnce({
|
||||
server: "firecrawl",
|
||||
toolName: "crawl",
|
||||
args: { url: "https://anthropic.com" },
|
||||
server: 'firecrawl',
|
||||
toolName: 'crawl',
|
||||
args: { url: 'https://anthropic.com' },
|
||||
});
|
||||
|
||||
console.log(result); // raw MCP envelope
|
||||
@ -241,13 +240,13 @@ console.log(result); // raw MCP envelope
|
||||
## Compose Automations with the Runtime
|
||||
|
||||
```ts
|
||||
import { createRuntime } from "mcporter";
|
||||
import { createRuntime } from 'mcporter';
|
||||
|
||||
const runtime = await createRuntime();
|
||||
|
||||
const tools = await runtime.listTools("context7");
|
||||
const result = await runtime.callTool("context7", "resolve-library-id", {
|
||||
args: { libraryName: "react" },
|
||||
const tools = await runtime.listTools('context7');
|
||||
const result = await runtime.callTool('context7', 'resolve-library-id', {
|
||||
args: { libraryName: 'react' },
|
||||
});
|
||||
|
||||
console.log(result); // prints JSON/text automatically because the CLI pretty-prints by default
|
||||
@ -261,18 +260,18 @@ Reach for `createRuntime()` when you need connection pooling, repeated calls, or
|
||||
The runtime API is built for agents and scripts, not just humans at a terminal.
|
||||
|
||||
```ts
|
||||
import { createRuntime, createServerProxy } from "mcporter";
|
||||
import { createRuntime, createServerProxy } from 'mcporter';
|
||||
|
||||
const runtime = await createRuntime();
|
||||
const chrome = createServerProxy(runtime, "chrome-devtools");
|
||||
const linear = createServerProxy(runtime, "linear");
|
||||
const chrome = createServerProxy(runtime, 'chrome-devtools');
|
||||
const linear = createServerProxy(runtime, 'linear');
|
||||
|
||||
const snapshot = await chrome.takeSnapshot();
|
||||
console.log(snapshot.text());
|
||||
|
||||
const docs = await linear.searchDocumentation({
|
||||
query: "automations",
|
||||
page: 0,
|
||||
query: 'automations',
|
||||
page: 0,
|
||||
});
|
||||
console.log(docs.json());
|
||||
```
|
||||
@ -285,7 +284,6 @@ Friendly ergonomics baked into the proxy and result helpers:
|
||||
|
||||
Drop down to `runtime.callTool()` whenever you need explicit control over arguments, metadata, or streaming options.
|
||||
|
||||
|
||||
Call `mcporter list <server>` any time you need the TypeScript-style signature, optional parameter hints, and sample invocations that match the CLI's function-call syntax.
|
||||
|
||||
## Generate a Standalone CLI
|
||||
@ -365,21 +363,21 @@ Run `mcporter config …` via your package manager (pnpm, npm, npx, etc.) when y
|
||||
|
||||
```jsonc
|
||||
{
|
||||
"mcpServers": {
|
||||
"context7": {
|
||||
"description": "Context7 docs MCP",
|
||||
"baseUrl": "https://mcp.context7.com/mcp",
|
||||
"headers": {
|
||||
"Authorization": "$env:CONTEXT7_API_KEY"
|
||||
}
|
||||
},
|
||||
"chrome-devtools": {
|
||||
"command": "npx",
|
||||
"args": ["-y", "chrome-devtools-mcp@latest"],
|
||||
"env": { "npm_config_loglevel": "error" }
|
||||
}
|
||||
},
|
||||
"imports": ["cursor", "claude-code", "claude-desktop", "codex", "windsurf", "opencode", "vscode"]
|
||||
"mcpServers": {
|
||||
"context7": {
|
||||
"description": "Context7 docs MCP",
|
||||
"baseUrl": "https://mcp.context7.com/mcp",
|
||||
"headers": {
|
||||
"Authorization": "$env:CONTEXT7_API_KEY",
|
||||
},
|
||||
},
|
||||
"chrome-devtools": {
|
||||
"command": "npx",
|
||||
"args": ["-y", "chrome-devtools-mcp@latest"],
|
||||
"env": { "npm_config_loglevel": "error" },
|
||||
},
|
||||
},
|
||||
"imports": ["cursor", "claude-code", "claude-desktop", "codex", "windsurf", "opencode", "vscode"],
|
||||
}
|
||||
```
|
||||
|
||||
@ -411,15 +409,16 @@ Set `MCPORTER_CONFIG=~/.mcporter/mcporter.json` in your shell profile when you w
|
||||
|
||||
## Testing and CI
|
||||
|
||||
| Command | Purpose |
|
||||
| --- | --- |
|
||||
| `pnpm check` | Biome formatting plus Oxlint/tsgolint gate. |
|
||||
| `pnpm build` | TypeScript compilation (emits `dist/`). |
|
||||
| `pnpm test` | Vitest unit and integration suites (streamable HTTP fixtures included). |
|
||||
| Command | Purpose |
|
||||
| ------------ | ----------------------------------------------------------------------- |
|
||||
| `pnpm check` | Oxfmt formatting plus Oxlint/tsgolint gate. |
|
||||
| `pnpm build` | TypeScript compilation (emits `dist/`). |
|
||||
| `pnpm test` | Vitest unit and integration suites (streamable HTTP fixtures included). |
|
||||
|
||||
CI runs the same trio via GitHub Actions.
|
||||
|
||||
## Related
|
||||
|
||||
- CodexBar 🟦🟩 Keep Codex token windows visible in your macOS menu bar. <https://codexbar.app>.
|
||||
- Trimmy ✂️ “Paste once, run once.” Flatten multi-line shell snippets so they paste and run. <https://trimmy.app>.
|
||||
- Oracle 🧿 Prompt bundler/CLI for multi-model runs (GPT-5.1, Claude, Gemini). <https://github.com/steipete/oracle>.
|
||||
|
||||
43
biome.json
43
biome.json
@ -1,43 +0,0 @@
|
||||
{
|
||||
"$schema": "https://biomejs.dev/schemas/2.4.5/schema.json",
|
||||
"vcs": {
|
||||
"enabled": true,
|
||||
"clientKind": "git",
|
||||
"useIgnoreFile": true
|
||||
},
|
||||
"javascript": {
|
||||
"formatter": {
|
||||
"quoteStyle": "single",
|
||||
"semicolons": "always",
|
||||
"trailingCommas": "es5"
|
||||
}
|
||||
},
|
||||
"json": {
|
||||
"formatter": {
|
||||
"indentStyle": "space",
|
||||
"indentWidth": 2
|
||||
}
|
||||
},
|
||||
"files": {
|
||||
"ignoreUnknown": false,
|
||||
"maxSize": 1048576,
|
||||
"includes": ["src/**", "tests/**", "docs/**", "scripts/**", "!dist", "!tmp", "!node_modules"]
|
||||
},
|
||||
"formatter": {
|
||||
"enabled": true,
|
||||
"indentStyle": "space",
|
||||
"indentWidth": 2,
|
||||
"lineWidth": 120
|
||||
},
|
||||
"linter": {
|
||||
"enabled": true,
|
||||
"rules": {
|
||||
"recommended": true,
|
||||
"style": {
|
||||
"useConst": "error",
|
||||
"useTemplate": "error",
|
||||
"useBlockStatements": "warn"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -10,11 +10,12 @@ read_when:
|
||||
|
||||
> **Helper script:** You can run `./scripts/release.sh <phase>` (gates | artifacts | publish | smoke | tag | all) to execute the steps below with the runner by default. It stops on first error; rerun the next phase after fixing issues.
|
||||
|
||||
> **No-warning policy:** Every command below must finish without warnings (Biome, Oxlint, tsgo, Vitest, npm pack, etc.). Fix issues before continuing; releases cannot ship with outstanding warnings.
|
||||
> **No-warning policy:** Every command below must finish without warnings (Oxfmt, Oxlint, tsgo, Vitest, npm pack, etc.). Fix issues before continuing; releases cannot ship with outstanding warnings.
|
||||
|
||||
## Definition of “released”
|
||||
|
||||
Shipping a release means **all** of:
|
||||
|
||||
- Tag pushed (`v<version>`).
|
||||
- npm published (`mcporter@<version>` visible via `npm view mcporter version`).
|
||||
- GitHub release published for the tag **with assets + checksums**.
|
||||
@ -28,13 +29,13 @@ Shipping a release means **all** of:
|
||||
6. pnpm build:bun
|
||||
7. tar -C dist-bun -czf dist-bun/mcporter-macos-arm64-v<version>.tar.gz mcporter
|
||||
8. shasum -a 256 dist-bun/mcporter-macos-arm64-v<version>.tar.gz | tee dist-bun/mcporter-macos-arm64-v<version>.tar.gz.sha256
|
||||
9. npm pack --pack-destination /tmp && mv /tmp/mcporter-<version>.tgz . # keep the real tarball
|
||||
9. npm pack --pack-destination /tmp && mv /tmp/mcporter-<version>.tgz . # keep the real tarball
|
||||
10. shasum mcporter-<version>.tgz > mcporter-<version>.tgz.sha1 && shasum -a 256 mcporter-<version>.tgz > mcporter-<version>.tgz.sha256
|
||||
11. Verify git status is clean.
|
||||
11. git commit && git push.
|
||||
12. pnpm publish --tag latest *(the runner already has npm credentials configured, so you can run this directly in the release shell; bump `timeout_ms` if needed because prepublish re-runs check/test/build and can take several minutes.)*
|
||||
13. `npm view mcporter version` (and `npm view mcporter time`) to ensure the registry reflects the new release before proceeding. If the new version isn’t visible yet, wait a minute and retry—npm’s replication can lag briefly.
|
||||
14. Sanity-check the “one weird trick” workflow from a **completely empty** directory (no package.json/node_modules) via:
|
||||
12. git commit && git push.
|
||||
13. pnpm publish --tag latest _(the runner already has npm credentials configured, so you can run this directly in the release shell; bump `timeout_ms` if needed because prepublish re-runs check/test/build and can take several minutes.)_
|
||||
14. `npm view mcporter version` (and `npm view mcporter time`) to ensure the registry reflects the new release before proceeding. If the new version isn’t visible yet, wait a minute and retry—npm’s replication can lag briefly.
|
||||
15. Sanity-check the “one weird trick” workflow from a **completely empty** directory (no package.json/node_modules) via:
|
||||
```bash
|
||||
rm -rf /tmp/mcporter-empty && mkdir -p /tmp/mcporter-empty
|
||||
cd /tmp/mcporter-empty
|
||||
@ -43,9 +44,11 @@ Shipping a release means **all** of:
|
||||
./chrome-devtools-mcp --help | head -n 5
|
||||
```
|
||||
Only continue once the CLI compiles and the help banner prints.
|
||||
15. Draft the GitHub release notes using this template (copy/paste and edit). **Title the release `mcporter v<version>` (project name + version) to keep GitHub’s releases list consistent.**
|
||||
16. Draft the GitHub release notes using this template (copy/paste and edit). **Title the release `mcporter v<version>` (project name + version) to keep GitHub’s releases list consistent.**
|
||||
|
||||
```markdown
|
||||
## Highlights
|
||||
|
||||
- <top feature>
|
||||
- <second feature>
|
||||
- <bugfix or UX callout>
|
||||
@ -53,14 +56,16 @@ Shipping a release means **all** of:
|
||||
SHA256 (mcporter-macos-arm64-v<version>.tar.gz): `<sha from step 8>`
|
||||
SHA256 (mcporter-<version>.tgz): `<sha from npm pack>`
|
||||
```
|
||||
|
||||
Then **create the GitHub release for tag v<version>** and upload all assets:
|
||||
- `mcporter-macos-arm64-v<version>.tar.gz`
|
||||
- `mcporter-macos-arm64-v<version>.tar.gz.sha256` (from step 8; add a `.sha256` file)
|
||||
- `mcporter-<version>.tgz` (from `npm pack`)
|
||||
- `mcporter-<version>.tgz.sha1` and `mcporter-<version>.tgz.sha256`
|
||||
Double-check the uploaded checksums match your local files.
|
||||
16. Tag the release (git tag v<version> && git push --tags).
|
||||
17. Post-tag housekeeping: add a fresh "Unreleased" stub to CHANGELOG.md (set to "- Nothing yet.") and start a new version section for the just-released patch if it isn’t already recorded.
|
||||
Double-check the uploaded checksums match your local files.
|
||||
|
||||
17. Tag the release (git tag v<version> && git push --tags).
|
||||
18. Post-tag housekeeping: add a fresh "Unreleased" stub to CHANGELOG.md (set to "- Nothing yet.") and start a new version section for the just-released patch if it isn’t already recorded.
|
||||
|
||||
After the release is live, always update the Homebrew tap and re-verify both installers. That flow should be:
|
||||
|
||||
@ -84,13 +89,13 @@ After the release is live, always update the Homebrew tap and re-verify both ins
|
||||
```
|
||||
4. Finally, run a fresh `npx mcporter@<version>` smoke test from an empty temp directory (no runner needed) to ensure the package is usable without global installs.
|
||||
|
||||
17. Update `steipete/homebrew-tap` → `Formula/mcporter.rb` with the new version, tarball URL, and SHA256. Refresh the tap README highlights and changelog snippets so Homebrew users see the new version callouts. (That repo doesn’t include `runner`, so use regular git commands there.)
|
||||
18. Commit and push the tap update.
|
||||
19. Verify the Homebrew flow (after GitHub release assets propagate):
|
||||
```bash
|
||||
brew update
|
||||
brew install steipete/tap/mcporter
|
||||
# If you previously installed mcporter via npm (or another tap) and see a link error,
|
||||
# run `brew link --overwrite mcporter` to replace /opt/homebrew/bin/mcporter with the tap binary.
|
||||
mcporter list --help
|
||||
```
|
||||
5. Update `steipete/homebrew-tap` → `Formula/mcporter.rb` with the new version, tarball URL, and SHA256. Refresh the tap README highlights and changelog snippets so Homebrew users see the new version callouts. (That repo doesn’t include `runner`, so use regular git commands there.)
|
||||
6. Commit and push the tap update.
|
||||
7. Verify the Homebrew flow (after GitHub release assets propagate):
|
||||
```bash
|
||||
brew update
|
||||
brew install steipete/tap/mcporter
|
||||
# If you previously installed mcporter via npm (or another tap) and see a link error,
|
||||
# run `brew link --overwrite mcporter` to replace /opt/homebrew/bin/mcporter with the tap binary.
|
||||
mcporter list --help
|
||||
```
|
||||
|
||||
91
package.json
91
package.json
@ -2,12 +2,26 @@
|
||||
"name": "mcporter",
|
||||
"version": "0.8.1",
|
||||
"description": "TypeScript runtime and CLI for connecting to configured Model Context Protocol servers.",
|
||||
"packageManager": "pnpm@10.22.0",
|
||||
"pnpm": {
|
||||
"overrides": {
|
||||
"body-parser": "2.2.1"
|
||||
}
|
||||
"keywords": [
|
||||
"cli",
|
||||
"mcp",
|
||||
"model-context-protocol",
|
||||
"sweetistics"
|
||||
],
|
||||
"license": "MIT",
|
||||
"author": "Sweetistics",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/steipete/mcporter"
|
||||
},
|
||||
"bin": {
|
||||
"mcporter": "dist/cli.js"
|
||||
},
|
||||
"files": [
|
||||
"dist",
|
||||
"README.md",
|
||||
"LICENSE"
|
||||
],
|
||||
"type": "module",
|
||||
"main": "dist/index.js",
|
||||
"module": "dist/index.js",
|
||||
@ -22,23 +36,19 @@
|
||||
"types": "./dist/cli.d.ts"
|
||||
}
|
||||
},
|
||||
"bin": {
|
||||
"mcporter": "dist/cli.js"
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"files": [
|
||||
"dist",
|
||||
"README.md",
|
||||
"LICENSE"
|
||||
],
|
||||
"scripts": {
|
||||
"mcporter": "tsx src/cli.ts",
|
||||
"mcp": "pnpm exec tsx src/cli.ts",
|
||||
"build": "tsc -p tsconfig.build.json",
|
||||
"build:bun": "bun scripts/build-bun.ts",
|
||||
"check": "pnpm lint:biome && pnpm lint:oxlint && pnpm typecheck",
|
||||
"check": "pnpm format:check && pnpm lint:oxlint && pnpm typecheck",
|
||||
"format": "oxfmt .",
|
||||
"format:check": "oxfmt --check .",
|
||||
"lint": "pnpm check",
|
||||
"lint:biome": "biome check",
|
||||
"lint:oxlint": "oxlint --type-aware --tsconfig tsconfig.json --max-warnings=0",
|
||||
"lint:oxlint": "oxlint --type-aware --tsconfig tsconfig.json --report-unused-disable-directives --deny-warnings --max-warnings=0",
|
||||
"typecheck": "tsgo --project tsconfig.json --noEmit",
|
||||
"test": "cross-env MCPORTER_TEST_REPORTER=quiet pnpm test:verbose",
|
||||
"test:quiet": "cross-env MCPORTER_TEST_REPORTER=quiet pnpm test:verbose",
|
||||
@ -54,49 +64,31 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@iarna/toml": "^2.2.5",
|
||||
"@modelcontextprotocol/sdk": "^1.27.1",
|
||||
"@modelcontextprotocol/sdk": "^1.28.0",
|
||||
"acorn": "^8.16.0",
|
||||
"commander": "^14.0.3",
|
||||
"es-toolkit": "^1.45.0",
|
||||
"es-toolkit": "^1.45.1",
|
||||
"jsonc-parser": "^3.3.1",
|
||||
"ora": "^9.3.0",
|
||||
"rolldown": "1.0.0-rc.6",
|
||||
"rolldown": "1.0.0-rc.12",
|
||||
"zod": "^4.3.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@biomejs/biome": "^2.4.5",
|
||||
"@types/estree": "^1.0.8",
|
||||
"@types/express": "^5.0.6",
|
||||
"@types/node": "^25.3.3",
|
||||
"@typescript/native-preview": "7.0.0-dev.20260302.1",
|
||||
"@vitest/coverage-v8": "^4.0.18",
|
||||
"bun-types": "^1.3.10",
|
||||
"@types/node": "^25.5.0",
|
||||
"@typescript/native-preview": "7.0.0-dev.20260328.1",
|
||||
"@vitest/coverage-v8": "^4.1.2",
|
||||
"bun-types": "^1.3.11",
|
||||
"cross-env": "^10.1.0",
|
||||
"express": "^5.2.1",
|
||||
"oxlint": "^1.51.0",
|
||||
"oxlint-tsgolint": "^0.15.0",
|
||||
"oxfmt": "^0.45.0",
|
||||
"oxlint": "^1.60.0",
|
||||
"oxlint-tsgolint": "^0.21.1",
|
||||
"rimraf": "^6.1.3",
|
||||
"tsx": "^4.21.0",
|
||||
"typescript": "^5.9.3",
|
||||
"vitest": "^4.0.18"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=20.11.0"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/steipete/mcporter"
|
||||
},
|
||||
"keywords": [
|
||||
"mcp",
|
||||
"model-context-protocol",
|
||||
"cli",
|
||||
"sweetistics"
|
||||
],
|
||||
"author": "Sweetistics",
|
||||
"license": "MIT",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
"typescript": "^6.0.2",
|
||||
"vitest": "^4.1.2"
|
||||
},
|
||||
"devEngines": {
|
||||
"runtime": [
|
||||
@ -105,5 +97,14 @@
|
||||
"version": ">=20"
|
||||
}
|
||||
]
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=20.11.0"
|
||||
},
|
||||
"packageManager": "pnpm@10.22.0",
|
||||
"pnpm": {
|
||||
"overrides": {
|
||||
"body-parser": "2.2.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
1605
pnpm-lock.yaml
generated
1605
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@ -40,7 +40,7 @@ const WRAPPER_COMMANDS = new Set([
|
||||
type SummaryStyle = 'compact' | 'minimal' | 'verbose';
|
||||
const SUMMARY_STYLE = resolveSummaryStyle(process.env.RUNNER_SUMMARY_STYLE);
|
||||
|
||||
// biome-ignore format: keep each keyword on its own line for grep-friendly diffs.
|
||||
// Keep each keyword on its own line for grep-friendly diffs.
|
||||
const LONG_SCRIPT_KEYWORDS = [
|
||||
'build',
|
||||
'test:all',
|
||||
@ -54,7 +54,7 @@ const EXTENDED_SCRIPT_KEYWORDS = ['lint', 'test', 'playwright', 'check', 'docker
|
||||
const SINGLE_TEST_SCRIPTS = new Set(['test:file']);
|
||||
const SINGLE_TEST_FLAGS = new Set(['--run', '--filter']);
|
||||
const TEST_BINARIES = new Set(['vitest', 'playwright', 'jest']);
|
||||
const LINT_BINARIES = new Set(['eslint', 'biome', 'oxlint', 'knip']);
|
||||
const LINT_BINARIES = new Set(['eslint', 'oxfmt', 'oxlint', 'knip']);
|
||||
|
||||
type RunnerExecutionContext = {
|
||||
commandArgs: string[];
|
||||
@ -568,7 +568,7 @@ async function runCommand(context: RunnerExecutionContext): Promise<void> {
|
||||
|
||||
let killTimer: NodeJS.Timeout | null = null;
|
||||
try {
|
||||
const result = await new Promise<{ exitCode: number; timedOut: boolean }>((resolve, reject) => {
|
||||
const result = await new Promise<{ exitCode: number; timedOut: boolean }>((fulfill, reject) => {
|
||||
let timedOut = false;
|
||||
const timeout = setTimeout(() => {
|
||||
timedOut = true;
|
||||
@ -600,7 +600,7 @@ async function runCommand(context: RunnerExecutionContext): Promise<void> {
|
||||
clearTimeout(killTimer);
|
||||
}
|
||||
removeSignalHandlers();
|
||||
resolve({ exitCode: code ?? exitCodeFromSignal(signal), timedOut });
|
||||
fulfill({ exitCode: code ?? exitCodeFromSignal(signal), timedOut });
|
||||
});
|
||||
});
|
||||
const { exitCode, timedOut } = result;
|
||||
@ -645,14 +645,14 @@ async function runCommandWithoutTimeout(context: RunnerExecutionContext): Promis
|
||||
const removeSignalHandlers = registerSignalForwarding(child);
|
||||
|
||||
try {
|
||||
const exitCode = await new Promise<number>((resolve, reject) => {
|
||||
const exitCode = await new Promise<number>((fulfill, reject) => {
|
||||
child.once('error', (error) => {
|
||||
removeSignalHandlers();
|
||||
reject(error);
|
||||
});
|
||||
child.once('exit', (code, signal) => {
|
||||
removeSignalHandlers();
|
||||
resolve(code ?? exitCodeFromSignal(signal));
|
||||
fulfill(code ?? exitCodeFromSignal(signal));
|
||||
});
|
||||
});
|
||||
const elapsedMs = Date.now() - startTime;
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
{
|
||||
"extends": "./tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"rootDir": "./src",
|
||||
"outDir": "./dist",
|
||||
"declaration": true,
|
||||
"declarationMap": true,
|
||||
|
||||
@ -2,8 +2,8 @@
|
||||
"compilerOptions": {
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "Bundler",
|
||||
"target": "ES2022",
|
||||
"lib": ["ES2022", "DOM"],
|
||||
"target": "ES2023",
|
||||
"lib": ["ES2023", "DOM"],
|
||||
"verbatimModuleSyntax": true,
|
||||
"allowImportingTsExtensions": false,
|
||||
"strict": true,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user