Skip to content

Commit 98fc17f

Browse files
authored
Merge pull request #3 from Coderrob/mcp-server-implementation
Mcp server implementation
2 parents 8f94895 + cae4b4d commit 98fc17f

File tree

105 files changed

+12129
-3888
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

105 files changed

+12129
-3888
lines changed

.editorconfig

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,22 @@ end_of_line = lf
44
indent_size = 2
55
indent_style = space
66
insert_final_newline = true
7-
max_line_length = 80
7+
max_line_length = 120
88
trim_trailing_whitespace = true
9+
10+
[*.md]
11+
trim_trailing_whitespace = false
12+
13+
[*.yml]
14+
indent_style = space
15+
indent_size = 2
16+
17+
[*.yaml]
18+
indent_style = space
19+
indent_size = 2
20+
21+
[*.{json,js,ts,tsx,jsx}]
22+
indent_size = 2
23+
24+
[*.prettierrc]
25+
indent_size = 2

.eslintignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
dist
2+
.yarn
3+
node_modules
4+
coverage
5+
__mocks__

.eslintrc.json

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
"env": {
3+
"es2022": true,
4+
"node": true
5+
},
6+
"extends": [
7+
"eslint:recommended",
8+
"plugin:@typescript-eslint/recommended",
9+
"plugin:import/errors",
10+
"plugin:import/warnings",
11+
"plugin:import/typescript",
12+
"prettier"
13+
],
14+
"parser": "@typescript-eslint/parser",
15+
"parserOptions": {
16+
"project": ["./tsconfig.json", "./tsconfig.spec.json"],
17+
"ecmaVersion": "latest",
18+
"sourceType": "module"
19+
},
20+
"plugins": ["@typescript-eslint", "simple-import-sort", "import"],
21+
"settings": {
22+
"import/resolver": {
23+
"typescript": {}
24+
}
25+
},
26+
"rules": {
27+
"@typescript-eslint/no-explicit-any": "error",
28+
"@typescript-eslint/explicit-function-return-type": "error",
29+
"@typescript-eslint/strict-boolean-expressions": "off",
30+
"@typescript-eslint/no-unused-vars": [
31+
"error",
32+
{
33+
"argsIgnorePattern": "^_",
34+
"varsIgnorePattern": "^_"
35+
}
36+
],
37+
"simple-import-sort/imports": "error",
38+
"simple-import-sort/exports": "error",
39+
"import/no-unused-modules": ["error", { "unusedExports": true }],
40+
"no-console": ["error", { "allow": ["warn", "error"] }]
41+
}
42+
}

.github/workflows/ci.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
13+
strategy:
14+
matrix:
15+
node-version: [20.x]
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- name: Use Node.js ${{ matrix.node-version }}
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: ${{ matrix.node-version }}
24+
25+
- name: Enable Corepack
26+
run: corepack enable
27+
28+
- name: Setup Yarn 4
29+
run: corepack prepare yarn@4 --activate
30+
31+
- name: Install dependencies
32+
run: yarn install --frozen-lockfile
33+
34+
- name: Lint
35+
run: yarn lint
36+
37+
- name: Test
38+
run: yarn test
39+
40+
- name: Upload coverage
41+
if: success()
42+
uses: actions/upload-artifact@v4
43+
with:
44+
name: coverage-report
45+
path: coverage

.prettierrc

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
trailingComma: 'es5'
2-
tabWidth: 2
31
semi: true
42
singleQuote: true
3+
tabWidth: 2
4+
trailingComma: 'es5'
5+
6+
overrides:
7+
- files: ['*.yml', '*.yaml']
8+
options:
9+
singleQuote: false

.vscode/extensions.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"recommendations": [
3+
"esbenp.prettier-vscode",
4+
"editorconfig.editorconfig",
5+
"dbaeumer.vscode-eslint",
6+
"DavidAnson.vscode-markdownlint",
7+
"arcanis.vscode-zipfs"
8+
],
9+
"unwantedRecommendations": []
10+
}

.vscode/settings.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"search.exclude": {
3+
"**/.yarn": true,
4+
"**/.pnp.*": true
5+
},
6+
"eslint.nodePath": ".yarn/sdks",
7+
"prettier.prettierPath": ".yarn/sdks/prettier/index.cjs",
8+
"typescript.tsdk": ".yarn/sdks/typescript/lib",
9+
"typescript.enablePromptUseWorkspaceTsdk": true
10+
}

.yarn/sdks/eslint/bin/eslint.js

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#!/usr/bin/env node
2+
3+
const { existsSync } = require(`fs`);
4+
const { createRequire, register } = require(`module`);
5+
const { resolve } = require(`path`);
6+
const { pathToFileURL } = require(`url`);
7+
8+
const relPnpApiPath = '../../../../.pnp.cjs';
9+
10+
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
11+
const absUserWrapperPath = resolve(__dirname, `./sdk.user.cjs`);
12+
const absRequire = createRequire(absPnpApiPath);
13+
14+
const absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`);
15+
const isPnpLoaderEnabled = existsSync(absPnpLoaderPath);
16+
17+
if (existsSync(absPnpApiPath)) {
18+
if (!process.versions.pnp) {
19+
// Setup the environment to be able to require eslint/bin/eslint.js
20+
require(absPnpApiPath).setup();
21+
if (isPnpLoaderEnabled && register) {
22+
register(pathToFileURL(absPnpLoaderPath));
23+
}
24+
}
25+
}
26+
27+
const wrapWithUserWrapper = existsSync(absUserWrapperPath)
28+
? (exports) => absRequire(absUserWrapperPath)(exports)
29+
: (exports) => exports;
30+
31+
// Defer to the real eslint/bin/eslint.js your application uses
32+
module.exports = wrapWithUserWrapper(absRequire(`eslint/bin/eslint.js`));

.yarn/sdks/eslint/lib/api.js

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#!/usr/bin/env node
2+
3+
const { existsSync } = require(`fs`);
4+
const { createRequire, register } = require(`module`);
5+
const { resolve } = require(`path`);
6+
const { pathToFileURL } = require(`url`);
7+
8+
const relPnpApiPath = '../../../../.pnp.cjs';
9+
10+
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
11+
const absUserWrapperPath = resolve(__dirname, `./sdk.user.cjs`);
12+
const absRequire = createRequire(absPnpApiPath);
13+
14+
const absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`);
15+
const isPnpLoaderEnabled = existsSync(absPnpLoaderPath);
16+
17+
if (existsSync(absPnpApiPath)) {
18+
if (!process.versions.pnp) {
19+
// Setup the environment to be able to require eslint
20+
require(absPnpApiPath).setup();
21+
if (isPnpLoaderEnabled && register) {
22+
register(pathToFileURL(absPnpLoaderPath));
23+
}
24+
}
25+
}
26+
27+
const wrapWithUserWrapper = existsSync(absUserWrapperPath)
28+
? (exports) => absRequire(absUserWrapperPath)(exports)
29+
: (exports) => exports;
30+
31+
// Defer to the real eslint your application uses
32+
module.exports = wrapWithUserWrapper(absRequire(`eslint`));
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#!/usr/bin/env node
2+
3+
const { existsSync } = require(`fs`);
4+
const { createRequire, register } = require(`module`);
5+
const { resolve } = require(`path`);
6+
const { pathToFileURL } = require(`url`);
7+
8+
const relPnpApiPath = '../../../../.pnp.cjs';
9+
10+
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
11+
const absUserWrapperPath = resolve(__dirname, `./sdk.user.cjs`);
12+
const absRequire = createRequire(absPnpApiPath);
13+
14+
const absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`);
15+
const isPnpLoaderEnabled = existsSync(absPnpLoaderPath);
16+
17+
if (existsSync(absPnpApiPath)) {
18+
if (!process.versions.pnp) {
19+
// Setup the environment to be able to require eslint/use-at-your-own-risk
20+
require(absPnpApiPath).setup();
21+
if (isPnpLoaderEnabled && register) {
22+
register(pathToFileURL(absPnpLoaderPath));
23+
}
24+
}
25+
}
26+
27+
const wrapWithUserWrapper = existsSync(absUserWrapperPath)
28+
? (exports) => absRequire(absUserWrapperPath)(exports)
29+
: (exports) => exports;
30+
31+
// Defer to the real eslint/use-at-your-own-risk your application uses
32+
module.exports = wrapWithUserWrapper(absRequire(`eslint/use-at-your-own-risk`));

0 commit comments

Comments
 (0)