@vint.tri/report_gen_mcp 1.7.4 → 1.7.6
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/.vscode/settings.json +3 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/publish.sh +79 -3
package/dist/index.js
CHANGED
|
@@ -103,7 +103,7 @@ if (process.argv.length === 2) {
|
|
|
103
103
|
// No command specified, run in stdio mode using MCP SDK
|
|
104
104
|
const mcpServer = new McpServer({
|
|
105
105
|
name: "report_gen_mcp",
|
|
106
|
-
version: "1.7.
|
|
106
|
+
version: "1.7.6"
|
|
107
107
|
}, {
|
|
108
108
|
// Disable health check to prevent automatic calls
|
|
109
109
|
capabilities: {
|
package/package.json
CHANGED
package/publish.sh
CHANGED
|
@@ -3,10 +3,86 @@
|
|
|
3
3
|
# Exit immediately if a command exits with a non-zero status.
|
|
4
4
|
set -e
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
# --- Configuration ---
|
|
7
|
+
# Default version bump type
|
|
8
|
+
DEFAULT_BUMP="patch"
|
|
9
|
+
|
|
10
|
+
# --- Functions ---
|
|
11
|
+
|
|
12
|
+
# Function to display usage
|
|
13
|
+
usage() {
|
|
14
|
+
echo "Usage: $0 [patch|minor|major]"
|
|
15
|
+
echo " patch: Increments the patch version (e.g., 1.0.0 -> 1.0.1)"
|
|
16
|
+
echo " minor: Increments the minor version (e.g., 1.0.0 -> 1.1.0)"
|
|
17
|
+
echo " major: Increments the major version (e.g., 1.0.0 -> 2.0.0)"
|
|
18
|
+
exit 1
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
# Determine version bump type
|
|
22
|
+
BUMP_TYPE=${1:-$DEFAULT_BUMP}
|
|
23
|
+
|
|
24
|
+
if [[ "$BUMP_TYPE" != "patch" && "$BUMP_TYPE" != "minor" && "$BUMP_TYPE" != "major" ]]; then
|
|
25
|
+
echo "Invalid version bump type: $BUMP_TYPE"
|
|
26
|
+
usage
|
|
27
|
+
fi
|
|
28
|
+
|
|
29
|
+
echo "--- Starting Publication Process ---"
|
|
30
|
+
|
|
31
|
+
# 1. Ensure Git working directory is clean
|
|
32
|
+
echo "1. Checking Git status..."
|
|
33
|
+
if ! git diff-index --quiet HEAD --; then
|
|
34
|
+
echo "Error: Git working directory is not clean. Please commit or stash your changes before publishing."
|
|
35
|
+
exit 1
|
|
36
|
+
fi
|
|
37
|
+
echo " Git working directory is clean."
|
|
38
|
+
|
|
39
|
+
# 2. Get current version from package.json
|
|
40
|
+
CURRENT_VERSION=$(node -p "require('./package.json').version")
|
|
41
|
+
echo "2. Current project version: $CURRENT_VERSION"
|
|
42
|
+
|
|
43
|
+
# 3. Bump version using npm version (this also creates a git commit and tag)
|
|
44
|
+
echo "3. Bumping version to $BUMP_TYPE..."
|
|
45
|
+
npm version "$BUMP_TYPE" --no-git-tag-version # Use --no-git-tag-version to manually control tagging later
|
|
46
|
+
NEW_VERSION=$(node -p "require('./package.json').version")
|
|
47
|
+
echo " New version in package.json: $NEW_VERSION"
|
|
48
|
+
|
|
49
|
+
# 4. Update version in src/index.ts
|
|
50
|
+
echo "4. Updating version in src/index.ts..."
|
|
51
|
+
node -e "
|
|
52
|
+
const fs = require('fs');
|
|
53
|
+
const path = require('path');
|
|
54
|
+
const indexPath = path.resolve('./src/index.ts');
|
|
55
|
+
let indexContent = fs.readFileSync(indexPath, 'utf8');
|
|
56
|
+
indexContent = indexContent.replace(/version: \"[0-9]+\\.[0-9]+\\.[0-9]+\"/, 'version: \"$NEW_VERSION\"');
|
|
57
|
+
fs.writeFileSync(indexPath, indexContent);
|
|
58
|
+
"
|
|
59
|
+
echo " Version updated in src/index.ts."
|
|
60
|
+
|
|
61
|
+
# 5. Build the project
|
|
62
|
+
echo "5. Building the project..."
|
|
7
63
|
npm run build
|
|
64
|
+
echo " Project built successfully."
|
|
8
65
|
|
|
9
|
-
|
|
66
|
+
# 6. Create Git commit for version bump and build
|
|
67
|
+
echo "6. Creating Git commit for version bump and build..."
|
|
68
|
+
git add package.json src/index.ts dist/
|
|
69
|
+
git commit -m "Release v$NEW_VERSION"
|
|
70
|
+
echo " Git commit created."
|
|
71
|
+
|
|
72
|
+
# 7. Create Git tag
|
|
73
|
+
echo "7. Creating Git tag v$NEW_VERSION..."
|
|
74
|
+
git tag "v$NEW_VERSION"
|
|
75
|
+
echo " Git tag created."
|
|
76
|
+
|
|
77
|
+
# 8. Publish the package to npm
|
|
78
|
+
echo "8. Publishing the package to npm..."
|
|
10
79
|
npm publish --access public
|
|
80
|
+
echo " Package published to npm."
|
|
81
|
+
|
|
82
|
+
# 9. Push changes and tags to remote
|
|
83
|
+
echo "9. Pushing changes and tags to remote Git repository..."
|
|
84
|
+
git push origin main # Assuming 'main' is your primary branch
|
|
85
|
+
git push origin "v$NEW_VERSION"
|
|
86
|
+
echo " Changes and tags pushed to remote."
|
|
11
87
|
|
|
12
|
-
echo "Publication
|
|
88
|
+
echo "--- Publication Process Complete (Version $NEW_VERSION) ---"
|