@andrebuzeli/git-mcp 6.2.2 → 6.2.3
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/dist/tools/gitUpload.js +17 -0
- package/package.json +1 -1
package/dist/tools/gitUpload.js
CHANGED
|
@@ -77,6 +77,23 @@ class GitUploadTool {
|
|
|
77
77
|
}
|
|
78
78
|
};
|
|
79
79
|
try {
|
|
80
|
+
// 0. Verificar se é um repositório Git, se não for, inicializar
|
|
81
|
+
try {
|
|
82
|
+
await git.status();
|
|
83
|
+
}
|
|
84
|
+
catch (err) {
|
|
85
|
+
if (err.message.includes('not a git repository')) {
|
|
86
|
+
results.traceability.uploadSteps.push({
|
|
87
|
+
step: 0,
|
|
88
|
+
action: 'init_git_repository',
|
|
89
|
+
timestamp: new Date().toISOString(),
|
|
90
|
+
});
|
|
91
|
+
await git.init();
|
|
92
|
+
}
|
|
93
|
+
else {
|
|
94
|
+
throw err;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
80
97
|
// 1. Verificar status local
|
|
81
98
|
results.traceability.uploadSteps.push({
|
|
82
99
|
step: 1,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@andrebuzeli/git-mcp",
|
|
3
|
-
"version": "6.2.
|
|
3
|
+
"version": "6.2.3",
|
|
4
4
|
"description": "Professional MCP server for Git operations - STDIO UNIVERSAL: works in ANY IDE (Cursor, VSCode, Claude Desktop). Fully autonomous with intelligent error handling. Auto-detects branches, owner, repo. User-friendly error messages. Dual-provider execution (GitHub + Gitea)",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|