mcp-server-diff 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/dependabot.yml +21 -0
- package/.github/workflows/ci.yml +51 -0
- package/.github/workflows/publish.yml +36 -0
- package/.github/workflows/release.yml +51 -0
- package/.prettierignore +3 -0
- package/.prettierrc +8 -0
- package/CONTRIBUTING.md +81 -0
- package/LICENSE +21 -0
- package/README.md +526 -0
- package/action.yml +250 -0
- package/dist/__tests__/fixtures/http-server.d.ts +7 -0
- package/dist/__tests__/fixtures/stdio-server.d.ts +7 -0
- package/dist/cli/__tests__/fixtures/http-server.d.ts +7 -0
- package/dist/cli/__tests__/fixtures/stdio-server.d.ts +7 -0
- package/dist/cli/cli.d.ts +7 -0
- package/dist/cli/diff.d.ts +44 -0
- package/dist/cli/git.d.ts +37 -0
- package/dist/cli/index.d.ts +7 -0
- package/dist/cli/index.js +57182 -0
- package/dist/cli/licenses.txt +466 -0
- package/dist/cli/logger.d.ts +46 -0
- package/dist/cli/package.json +3 -0
- package/dist/cli/probe.d.ts +35 -0
- package/dist/cli/reporter.d.ts +20 -0
- package/dist/cli/runner.d.ts +30 -0
- package/dist/cli/types.d.ts +134 -0
- package/dist/cli.d.ts +7 -0
- package/dist/diff.d.ts +44 -0
- package/dist/git.d.ts +37 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +58032 -0
- package/dist/licenses.txt +466 -0
- package/dist/logger.d.ts +46 -0
- package/dist/package.json +3 -0
- package/dist/probe.d.ts +35 -0
- package/dist/reporter.d.ts +20 -0
- package/dist/runner.d.ts +30 -0
- package/dist/types.d.ts +134 -0
- package/eslint.config.mjs +47 -0
- package/jest.config.mjs +26 -0
- package/package.json +64 -0
- package/src/__tests__/fixtures/http-server.ts +103 -0
- package/src/__tests__/fixtures/stdio-server.ts +158 -0
- package/src/__tests__/integration.test.ts +306 -0
- package/src/__tests__/runner.test.ts +430 -0
- package/src/cli.ts +421 -0
- package/src/diff.ts +252 -0
- package/src/git.ts +262 -0
- package/src/index.ts +284 -0
- package/src/logger.ts +93 -0
- package/src/probe.ts +327 -0
- package/src/reporter.ts +214 -0
- package/src/runner.ts +902 -0
- package/src/types.ts +155 -0
- package/tsconfig.json +30 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
updates:
|
|
3
|
+
- package-ecosystem: "github-actions"
|
|
4
|
+
directory: "/"
|
|
5
|
+
schedule:
|
|
6
|
+
interval: "weekly"
|
|
7
|
+
commit-message:
|
|
8
|
+
prefix: "ci"
|
|
9
|
+
labels:
|
|
10
|
+
- "dependencies"
|
|
11
|
+
- "github-actions"
|
|
12
|
+
|
|
13
|
+
- package-ecosystem: "npm"
|
|
14
|
+
directory: "/probe"
|
|
15
|
+
schedule:
|
|
16
|
+
interval: "weekly"
|
|
17
|
+
commit-message:
|
|
18
|
+
prefix: "deps"
|
|
19
|
+
labels:
|
|
20
|
+
- "dependencies"
|
|
21
|
+
- "javascript"
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
permissions:
|
|
10
|
+
contents: read
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
test:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
strategy:
|
|
16
|
+
matrix:
|
|
17
|
+
node-version: [20, 22]
|
|
18
|
+
|
|
19
|
+
steps:
|
|
20
|
+
- name: Checkout
|
|
21
|
+
uses: actions/checkout@v4
|
|
22
|
+
|
|
23
|
+
- name: Setup Node.js ${{ matrix.node-version }}
|
|
24
|
+
uses: actions/setup-node@v6
|
|
25
|
+
with:
|
|
26
|
+
node-version: ${{ matrix.node-version }}
|
|
27
|
+
cache: 'npm'
|
|
28
|
+
|
|
29
|
+
- name: Install dependencies
|
|
30
|
+
run: npm ci
|
|
31
|
+
|
|
32
|
+
- name: Type Check
|
|
33
|
+
run: npm run typecheck
|
|
34
|
+
|
|
35
|
+
- name: Lint
|
|
36
|
+
run: npm run lint
|
|
37
|
+
|
|
38
|
+
- name: Check Formatting
|
|
39
|
+
run: npm run format:check
|
|
40
|
+
|
|
41
|
+
- name: Run Tests
|
|
42
|
+
run: npm test
|
|
43
|
+
|
|
44
|
+
- name: Build
|
|
45
|
+
run: npm run build
|
|
46
|
+
|
|
47
|
+
- name: Verify dist is up to date
|
|
48
|
+
if: matrix.node-version == 20
|
|
49
|
+
run: |
|
|
50
|
+
# Check if dist files are up to date
|
|
51
|
+
git diff --exit-code dist/ || (echo "::error::dist/ is out of date. Run 'npm run build' and commit the changes." && exit 1)
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
name: Publish to npm
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
contents: read
|
|
9
|
+
id-token: write # Required for npm OIDC provenance
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
publish:
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
steps:
|
|
15
|
+
- name: Checkout
|
|
16
|
+
uses: actions/checkout@v4
|
|
17
|
+
|
|
18
|
+
- name: Setup Node.js
|
|
19
|
+
uses: actions/setup-node@v4
|
|
20
|
+
with:
|
|
21
|
+
node-version: '22'
|
|
22
|
+
registry-url: 'https://registry.npmjs.org'
|
|
23
|
+
|
|
24
|
+
- name: Install dependencies
|
|
25
|
+
run: npm ci
|
|
26
|
+
|
|
27
|
+
- name: Run checks
|
|
28
|
+
run: npm run check
|
|
29
|
+
|
|
30
|
+
- name: Build
|
|
31
|
+
run: npm run build
|
|
32
|
+
|
|
33
|
+
# Tokenless publish using npm's OIDC trust
|
|
34
|
+
# Requires package to be linked to this repo on npmjs.com
|
|
35
|
+
- name: Publish to npm with provenance
|
|
36
|
+
run: npm publish --provenance --access public
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
name: Create Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- 'v[0-9]+.[0-9]+.[0-9]+'
|
|
7
|
+
- 'v[0-9]+.[0-9]+.[0-9]+-*'
|
|
8
|
+
|
|
9
|
+
permissions:
|
|
10
|
+
contents: write
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
release:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
steps:
|
|
16
|
+
- name: Checkout
|
|
17
|
+
uses: actions/checkout@v6
|
|
18
|
+
with:
|
|
19
|
+
fetch-depth: 0
|
|
20
|
+
|
|
21
|
+
- name: Generate Release Notes
|
|
22
|
+
id: release_notes
|
|
23
|
+
run: |
|
|
24
|
+
# Get the previous tag
|
|
25
|
+
PREV_TAG=$(git describe --tags --abbrev=0 HEAD^ 2>/dev/null || echo "")
|
|
26
|
+
|
|
27
|
+
if [ -z "$PREV_TAG" ]; then
|
|
28
|
+
echo "notes=Initial release" >> $GITHUB_OUTPUT
|
|
29
|
+
else
|
|
30
|
+
# Generate changelog from commits
|
|
31
|
+
NOTES=$(git log --pretty=format:"- %s" $PREV_TAG..HEAD | head -50)
|
|
32
|
+
echo "notes<<EOF" >> $GITHUB_OUTPUT
|
|
33
|
+
echo "$NOTES" >> $GITHUB_OUTPUT
|
|
34
|
+
echo "EOF" >> $GITHUB_OUTPUT
|
|
35
|
+
fi
|
|
36
|
+
|
|
37
|
+
- name: Create Release
|
|
38
|
+
uses: softprops/action-gh-release@v2
|
|
39
|
+
with:
|
|
40
|
+
name: ${{ github.ref_name }}
|
|
41
|
+
body: |
|
|
42
|
+
## What's Changed
|
|
43
|
+
|
|
44
|
+
${{ steps.release_notes.outputs.notes }}
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
**Full Changelog**: https://github.com/${{ github.repository }}/compare/${{ steps.release_notes.outputs.prev_tag || 'initial' }}...${{ github.ref_name }}
|
|
49
|
+
draft: false
|
|
50
|
+
prerelease: ${{ contains(github.ref_name, '-') }}
|
|
51
|
+
generate_release_notes: true
|
package/.prettierignore
ADDED
package/.prettierrc
ADDED
package/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# Contributing to MCP Server Diff
|
|
2
|
+
|
|
3
|
+
Thank you for your interest in contributing! This document provides guidelines for contributing to MCP Server Diff.
|
|
4
|
+
|
|
5
|
+
## How to Contribute
|
|
6
|
+
|
|
7
|
+
### Reporting Bugs
|
|
8
|
+
|
|
9
|
+
1. Check existing issues to avoid duplicates
|
|
10
|
+
2. Use the bug report template
|
|
11
|
+
3. Include:
|
|
12
|
+
- Steps to reproduce
|
|
13
|
+
- Expected vs actual behavior
|
|
14
|
+
- Environment details (OS, language runtime versions)
|
|
15
|
+
- Workflow configuration
|
|
16
|
+
|
|
17
|
+
### Suggesting Features
|
|
18
|
+
|
|
19
|
+
1. Open a feature request issue
|
|
20
|
+
2. Describe the use case
|
|
21
|
+
3. Explain how it benefits MCP server developers
|
|
22
|
+
|
|
23
|
+
### Pull Requests
|
|
24
|
+
|
|
25
|
+
1. Fork the repository
|
|
26
|
+
2. Create a feature branch from `main`
|
|
27
|
+
3. Make your changes
|
|
28
|
+
4. Test thoroughly
|
|
29
|
+
5. Submit a PR with a clear description
|
|
30
|
+
|
|
31
|
+
## Development Setup
|
|
32
|
+
|
|
33
|
+
### Prerequisites
|
|
34
|
+
|
|
35
|
+
- Node.js 20+
|
|
36
|
+
- npm
|
|
37
|
+
- Git
|
|
38
|
+
|
|
39
|
+
### Building
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
# Install dependencies
|
|
43
|
+
npm ci
|
|
44
|
+
|
|
45
|
+
# Run tests
|
|
46
|
+
npm test
|
|
47
|
+
|
|
48
|
+
# Type check, lint, and format
|
|
49
|
+
npm run check
|
|
50
|
+
|
|
51
|
+
# Build the action
|
|
52
|
+
npm run build
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### Testing Locally
|
|
56
|
+
|
|
57
|
+
To test the action locally, you can run the built action directly:
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
# Build the action
|
|
61
|
+
npm run build
|
|
62
|
+
|
|
63
|
+
# Set environment variables that mimic GitHub Actions inputs
|
|
64
|
+
export INPUT_INSTALL_COMMAND="npm ci"
|
|
65
|
+
export INPUT_BUILD_COMMAND="npm run build"
|
|
66
|
+
export INPUT_START_COMMAND="node dist/stdio.js"
|
|
67
|
+
|
|
68
|
+
# Run the action
|
|
69
|
+
node dist/index.js
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Code Style
|
|
73
|
+
|
|
74
|
+
- TypeScript with strict mode
|
|
75
|
+
- ESLint for linting
|
|
76
|
+
- Prettier for formatting
|
|
77
|
+
- Run `npm run check` before submitting PRs
|
|
78
|
+
|
|
79
|
+
## License
|
|
80
|
+
|
|
81
|
+
By contributing, you agree that your contributions will be licensed under the MIT License.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Sam Morrow
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|