Skip to content

Commit fbdeb06

Browse files
authored
Merge pull request #249 from ArcBlock/main
feat: support extending McpServer with authorization
2 parents e2ab858 + 9482d93 commit fbdeb06

File tree

10 files changed

+419
-42
lines changed

10 files changed

+419
-42
lines changed

.prettierrc

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"printWidth": 80,
3+
"tabWidth": 2,
4+
"trailingComma": "all",
5+
"jsxBracketSameLine": true,
6+
"semi": true,
7+
"singleQuote": false
8+
}

jest.config.js

+1
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,6 @@ export default {
1212
transformIgnorePatterns: [
1313
"/node_modules/(?!eventsource)/"
1414
],
15+
collectCoverageFrom: ["src/**/*.ts"],
1516
testPathIgnorePatterns: ["/node_modules/", "/dist/"],
1617
};

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
"prepack": "npm run build:esm && npm run build:cjs",
4242
"lint": "eslint src/",
4343
"test": "jest",
44+
"coverage": "jest --coverage",
4445
"start": "npm run server",
4546
"server": "tsx watch --clear-screen=false src/cli.ts server",
4647
"client": "tsx src/cli.ts client"

src/inMemory.ts

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ export class InMemoryTransport implements Transport {
1212
onerror?: (error: Error) => void;
1313
onmessage?: (message: JSONRPCMessage) => void;
1414
sessionId?: string;
15+
user?: unknown;
1516

1617
/**
1718
* Creates a pair of linked in-memory transports that can communicate with each other. One should be passed to a Client and one to a Server.

0 commit comments

Comments
 (0)