@andrebuzeli/git-mcp 2.47.3 → 3.0.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/README.md +100 -71
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +55 -71
- package/dist/server.js.map +1 -1
- package/dist/tools/git-commits.d.ts +2 -2
- package/dist/tools/git-config.d.ts +2 -2
- package/dist/tools/git-files.d.ts +2 -2
- package/dist/tools/git-issues.d.ts +6 -6
- package/dist/tools/git-packages.d.ts +2 -2
- package/dist/tools/git-projects.d.ts +142 -57
- package/dist/tools/git-projects.d.ts.map +1 -1
- package/dist/tools/git-projects.js +281 -283
- package/dist/tools/git-projects.js.map +1 -1
- package/dist/tools/git-pulls.d.ts +8 -8
- package/dist/tools/git-releases.d.ts +2 -2
- package/dist/tools/git-remote.d.ts +2 -2
- package/dist/tools/git-repositories.d.ts +4 -4
- package/dist/tools/git-sync.d.ts +4 -4
- package/dist/tools/git-tags.d.ts +2 -2
- package/dist/tools/git-undo.d.ts +268 -0
- package/dist/tools/git-undo.d.ts.map +1 -0
- package/dist/tools/git-undo.js +516 -0
- package/dist/tools/git-undo.js.map +1 -0
- package/dist/tools/git-update-project.d.ts +4 -4
- package/dist/tools/git-versioning.d.ts +286 -0
- package/dist/tools/git-versioning.d.ts.map +1 -0
- package/dist/tools/git-versioning.js +483 -0
- package/dist/tools/git-versioning.js.map +1 -0
- package/dist/tools/git-workflow.d.ts +393 -0
- package/dist/tools/git-workflow.d.ts.map +1 -0
- package/dist/tools/git-workflow.js +617 -0
- package/dist/tools/git-workflow.js.map +1 -0
- package/package.json +60 -60
|
@@ -0,0 +1,483 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.gitVersioningTool = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const index_js_1 = require("../providers/index.js");
|
|
6
|
+
const user_detection_js_1 = require("../utils/user-detection.js");
|
|
7
|
+
const git_operations_js_1 = require("../utils/git-operations.js");
|
|
8
|
+
/**
|
|
9
|
+
* Tool: git-versioning
|
|
10
|
+
*
|
|
11
|
+
* FERRAMENTA UNIFICADA PARA VERSIONAMENTO
|
|
12
|
+
* Combina as funcionalidades de:
|
|
13
|
+
* - git-branches (gerenciamento de branches)
|
|
14
|
+
* - git-releases (releases e tags)
|
|
15
|
+
* - git-tags (versionamento)
|
|
16
|
+
*
|
|
17
|
+
* DESIGNED FOR: Programador individual autônomo
|
|
18
|
+
* PHILOSOPHY: Versionamento simplificado e inteligente
|
|
19
|
+
*/
|
|
20
|
+
const GitVersioningInputSchema = zod_1.z.discriminatedUnion('action', [
|
|
21
|
+
// BRANCHES
|
|
22
|
+
zod_1.z.object({
|
|
23
|
+
action: zod_1.z.literal('create-branch'),
|
|
24
|
+
projectPath: zod_1.z.string(),
|
|
25
|
+
name: zod_1.z.string(),
|
|
26
|
+
from: zod_1.z.string().optional().default('main')
|
|
27
|
+
}),
|
|
28
|
+
zod_1.z.object({
|
|
29
|
+
action: zod_1.z.literal('list-branches'),
|
|
30
|
+
projectPath: zod_1.z.string()
|
|
31
|
+
}),
|
|
32
|
+
zod_1.z.object({
|
|
33
|
+
action: zod_1.z.literal('switch-branch'),
|
|
34
|
+
projectPath: zod_1.z.string(),
|
|
35
|
+
name: zod_1.z.string()
|
|
36
|
+
}),
|
|
37
|
+
zod_1.z.object({
|
|
38
|
+
action: zod_1.z.literal('delete-branch'),
|
|
39
|
+
projectPath: zod_1.z.string(),
|
|
40
|
+
name: zod_1.z.string(),
|
|
41
|
+
force: zod_1.z.boolean().optional().default(false)
|
|
42
|
+
}),
|
|
43
|
+
// RELEASES E TAGS
|
|
44
|
+
zod_1.z.object({
|
|
45
|
+
action: zod_1.z.literal('create-release'),
|
|
46
|
+
repo: zod_1.z.string(),
|
|
47
|
+
provider: zod_1.z.enum(['gitea', 'github']),
|
|
48
|
+
tag: zod_1.z.string(),
|
|
49
|
+
name: zod_1.z.string(),
|
|
50
|
+
description: zod_1.z.string().optional(),
|
|
51
|
+
draft: zod_1.z.boolean().optional().default(false)
|
|
52
|
+
}),
|
|
53
|
+
zod_1.z.object({
|
|
54
|
+
action: zod_1.z.literal('list-releases'),
|
|
55
|
+
repo: zod_1.z.string(),
|
|
56
|
+
provider: zod_1.z.enum(['gitea', 'github']),
|
|
57
|
+
limit: zod_1.z.number().optional().default(10)
|
|
58
|
+
}),
|
|
59
|
+
zod_1.z.object({
|
|
60
|
+
action: zod_1.z.literal('create-tag'),
|
|
61
|
+
projectPath: zod_1.z.string(),
|
|
62
|
+
name: zod_1.z.string(),
|
|
63
|
+
message: zod_1.z.string().optional()
|
|
64
|
+
}),
|
|
65
|
+
zod_1.z.object({
|
|
66
|
+
action: zod_1.z.literal('list-tags'),
|
|
67
|
+
projectPath: zod_1.z.string()
|
|
68
|
+
}),
|
|
69
|
+
// VERSIONAMENTO INTELIGENTE
|
|
70
|
+
zod_1.z.object({
|
|
71
|
+
action: zod_1.z.literal('bump-version'),
|
|
72
|
+
projectPath: zod_1.z.string(),
|
|
73
|
+
type: zod_1.z.enum(['patch', 'minor', 'major']).default('patch'),
|
|
74
|
+
createTag: zod_1.z.boolean().optional().default(true),
|
|
75
|
+
createRelease: zod_1.z.boolean().optional().default(false),
|
|
76
|
+
provider: zod_1.z.enum(['gitea', 'github']).optional()
|
|
77
|
+
})
|
|
78
|
+
]);
|
|
79
|
+
const GitVersioningResultSchema = zod_1.z.object({
|
|
80
|
+
success: zod_1.z.boolean(),
|
|
81
|
+
action: zod_1.z.string(),
|
|
82
|
+
message: zod_1.z.string(),
|
|
83
|
+
data: zod_1.z.any().optional(),
|
|
84
|
+
error: zod_1.z.string().optional(),
|
|
85
|
+
recoverable: zod_1.z.boolean().optional(),
|
|
86
|
+
suggestion: zod_1.z.string().optional()
|
|
87
|
+
});
|
|
88
|
+
/**
|
|
89
|
+
* Version Manager - Gerencia versionamento semântico
|
|
90
|
+
*/
|
|
91
|
+
class VersionManager {
|
|
92
|
+
static parseVersion(version) {
|
|
93
|
+
const match = version.match(/^v?(\d+)\.(\d+)\.(\d+)$/);
|
|
94
|
+
if (!match)
|
|
95
|
+
return null;
|
|
96
|
+
return {
|
|
97
|
+
major: parseInt(match[1]),
|
|
98
|
+
minor: parseInt(match[2]),
|
|
99
|
+
patch: parseInt(match[3])
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
static bumpVersion(currentVersion, type) {
|
|
103
|
+
const parsed = this.parseVersion(currentVersion);
|
|
104
|
+
if (!parsed)
|
|
105
|
+
return 'v1.0.0';
|
|
106
|
+
switch (type) {
|
|
107
|
+
case 'major':
|
|
108
|
+
return `v${parsed.major + 1}.0.0`;
|
|
109
|
+
case 'minor':
|
|
110
|
+
return `v${parsed.major}.${parsed.minor + 1}.0`;
|
|
111
|
+
case 'patch':
|
|
112
|
+
return `v${parsed.major}.${parsed.minor}.${parsed.patch + 1}`;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
static async getCurrentVersion(projectPath) {
|
|
116
|
+
const gitOps = new git_operations_js_1.GitOperations(projectPath);
|
|
117
|
+
try {
|
|
118
|
+
// Try to get version from package.json
|
|
119
|
+
const packageRead = await gitOps.readFile('package.json');
|
|
120
|
+
if (packageRead.success) {
|
|
121
|
+
const packageJson = JSON.parse(packageRead.data.content);
|
|
122
|
+
if (packageJson.version) {
|
|
123
|
+
return `v${packageJson.version}`;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
// Try to get latest tag
|
|
127
|
+
const tagResult = await gitOps.tag(undefined, { list: true });
|
|
128
|
+
if (tagResult.success && tagResult.output.trim()) {
|
|
129
|
+
const tags = tagResult.output.trim().split('\n').filter(tag => tag.match(/^v?\d+\.\d+\.\d+$/));
|
|
130
|
+
if (tags.length > 0) {
|
|
131
|
+
return tags[0].startsWith('v') ? tags[0] : `v${tags[0]}`;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
return 'v0.1.0'; // Default starting version
|
|
135
|
+
}
|
|
136
|
+
catch (error) {
|
|
137
|
+
return 'v0.1.0';
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Enhanced Error Handler for Versioning
|
|
143
|
+
*/
|
|
144
|
+
class VersioningErrorHandler {
|
|
145
|
+
static handleError(error, context) {
|
|
146
|
+
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
147
|
+
const errorPatterns = [
|
|
148
|
+
{
|
|
149
|
+
pattern: /branch.*already exists/i,
|
|
150
|
+
suggestion: "Choose a different branch name",
|
|
151
|
+
recoverable: true
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
pattern: /tag.*already exists/i,
|
|
155
|
+
suggestion: "Use a different tag name or bump version",
|
|
156
|
+
recoverable: true
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
pattern: /branch.*not found/i,
|
|
160
|
+
suggestion: "Check branch name or create it first",
|
|
161
|
+
recoverable: true
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
pattern: /cannot delete branch/i,
|
|
165
|
+
suggestion: "Switch to another branch before deleting",
|
|
166
|
+
recoverable: true
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
pattern: /release.*already exists/i,
|
|
170
|
+
suggestion: "Use a different release name",
|
|
171
|
+
recoverable: true
|
|
172
|
+
}
|
|
173
|
+
];
|
|
174
|
+
const matchedPattern = errorPatterns.find(p => p.pattern.test(errorMessage));
|
|
175
|
+
return {
|
|
176
|
+
success: false,
|
|
177
|
+
action: context,
|
|
178
|
+
message: `Error in ${context}: ${errorMessage}`,
|
|
179
|
+
error: errorMessage,
|
|
180
|
+
recoverable: matchedPattern?.recoverable || false,
|
|
181
|
+
suggestion: matchedPattern?.suggestion
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
exports.gitVersioningTool = {
|
|
186
|
+
name: 'git-versioning',
|
|
187
|
+
description: `🏷️ VERSIONAMENTO INTELIGENTE
|
|
188
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
189
|
+
🌿 BRANCHES:
|
|
190
|
+
• create-branch: Criar nova branch
|
|
191
|
+
• list-branches: Listar branches
|
|
192
|
+
• switch-branch: Trocar de branch
|
|
193
|
+
• delete-branch: Remover branch
|
|
194
|
+
|
|
195
|
+
📦 RELEASES & TAGS:
|
|
196
|
+
• create-release: Criar release
|
|
197
|
+
• list-releases: Listar releases
|
|
198
|
+
• create-tag: Criar tag
|
|
199
|
+
• list-tags: Listar tags
|
|
200
|
+
|
|
201
|
+
🚀 VERSIONAMENTO AUTOMÁTICO:
|
|
202
|
+
• bump-version: Bump automático (patch/minor/major)
|
|
203
|
+
|
|
204
|
+
✨ DIFERENCIAIS:
|
|
205
|
+
• Versionamento semântico automático
|
|
206
|
+
• Sugestões inteligentes de nomes
|
|
207
|
+
• Error handling com recovery
|
|
208
|
+
• Integração completa Git + Remote`,
|
|
209
|
+
inputSchema: {
|
|
210
|
+
type: 'object',
|
|
211
|
+
properties: {
|
|
212
|
+
action: {
|
|
213
|
+
type: 'string',
|
|
214
|
+
enum: ['create-branch', 'list-branches', 'switch-branch', 'delete-branch', 'create-release', 'list-releases', 'create-tag', 'list-tags', 'bump-version'],
|
|
215
|
+
description: 'Versioning action to perform'
|
|
216
|
+
},
|
|
217
|
+
projectPath: { type: 'string', description: 'Local project path' },
|
|
218
|
+
repo: { type: 'string', description: 'Repository name' },
|
|
219
|
+
provider: { type: 'string', enum: ['gitea', 'github'], description: 'Git provider' },
|
|
220
|
+
name: { type: 'string', description: 'Branch/tag name' },
|
|
221
|
+
from: { type: 'string', description: 'Source branch', default: 'main' },
|
|
222
|
+
tag: { type: 'string', description: 'Release tag' },
|
|
223
|
+
message: { type: 'string', description: 'Tag/release message' },
|
|
224
|
+
description: { type: 'string', description: 'Release description' },
|
|
225
|
+
type: { type: 'string', enum: ['patch', 'minor', 'major'], description: 'Version bump type', default: 'patch' },
|
|
226
|
+
draft: { type: 'boolean', description: 'Draft release', default: false },
|
|
227
|
+
force: { type: 'boolean', description: 'Force operation', default: false },
|
|
228
|
+
createTag: { type: 'boolean', description: 'Create tag during bump', default: true },
|
|
229
|
+
createRelease: { type: 'boolean', description: 'Create release during bump', default: false },
|
|
230
|
+
limit: { type: 'number', description: 'Result limit', default: 10 }
|
|
231
|
+
},
|
|
232
|
+
required: ['action']
|
|
233
|
+
},
|
|
234
|
+
async handler(input) {
|
|
235
|
+
try {
|
|
236
|
+
const validatedInput = GitVersioningInputSchema.parse(input);
|
|
237
|
+
switch (validatedInput.action) {
|
|
238
|
+
case 'create-branch':
|
|
239
|
+
return await this.handleCreateBranch(validatedInput);
|
|
240
|
+
case 'list-branches':
|
|
241
|
+
return await this.handleListBranches(validatedInput);
|
|
242
|
+
case 'switch-branch':
|
|
243
|
+
return await this.handleSwitchBranch(validatedInput);
|
|
244
|
+
case 'delete-branch':
|
|
245
|
+
return await this.handleDeleteBranch(validatedInput);
|
|
246
|
+
case 'create-release':
|
|
247
|
+
return await this.handleCreateRelease(validatedInput);
|
|
248
|
+
case 'list-releases':
|
|
249
|
+
return await this.handleListReleases(validatedInput);
|
|
250
|
+
case 'create-tag':
|
|
251
|
+
return await this.handleCreateTag(validatedInput);
|
|
252
|
+
case 'list-tags':
|
|
253
|
+
return await this.handleListTags(validatedInput);
|
|
254
|
+
case 'bump-version':
|
|
255
|
+
return await this.handleBumpVersion(validatedInput);
|
|
256
|
+
default:
|
|
257
|
+
throw new Error(`Action '${validatedInput.action}' not supported`);
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
catch (error) {
|
|
261
|
+
return VersioningErrorHandler.handleError(error, `versioning.${input.action}`);
|
|
262
|
+
}
|
|
263
|
+
},
|
|
264
|
+
async handleCreateBranch(params) {
|
|
265
|
+
const { projectPath, name, from } = params;
|
|
266
|
+
const gitOps = new git_operations_js_1.GitOperations(projectPath);
|
|
267
|
+
try {
|
|
268
|
+
const branchResult = await gitOps.createBranch(name, from);
|
|
269
|
+
if (!branchResult.success) {
|
|
270
|
+
throw new Error(`Failed to create branch: ${branchResult.error}`);
|
|
271
|
+
}
|
|
272
|
+
return {
|
|
273
|
+
success: true,
|
|
274
|
+
action: 'create-branch',
|
|
275
|
+
message: 'Branch created successfully',
|
|
276
|
+
data: { name, from }
|
|
277
|
+
};
|
|
278
|
+
}
|
|
279
|
+
catch (error) {
|
|
280
|
+
return VersioningErrorHandler.handleError(error, 'create-branch');
|
|
281
|
+
}
|
|
282
|
+
},
|
|
283
|
+
async handleListBranches(params) {
|
|
284
|
+
const { projectPath } = params;
|
|
285
|
+
const gitOps = new git_operations_js_1.GitOperations(projectPath);
|
|
286
|
+
try {
|
|
287
|
+
const branchesResult = await gitOps.listBranches({ all: true });
|
|
288
|
+
if (!branchesResult.success) {
|
|
289
|
+
throw new Error(`Failed to list branches: ${branchesResult.error}`);
|
|
290
|
+
}
|
|
291
|
+
const branches = branchesResult.output.trim().split('\n').filter(b => b.trim());
|
|
292
|
+
return {
|
|
293
|
+
success: true,
|
|
294
|
+
action: 'list-branches',
|
|
295
|
+
message: `Found ${branches.length} branches`,
|
|
296
|
+
data: { branches, count: branches.length }
|
|
297
|
+
};
|
|
298
|
+
}
|
|
299
|
+
catch (error) {
|
|
300
|
+
return VersioningErrorHandler.handleError(error, 'list-branches');
|
|
301
|
+
}
|
|
302
|
+
},
|
|
303
|
+
async handleSwitchBranch(params) {
|
|
304
|
+
const { projectPath, name } = params;
|
|
305
|
+
const gitOps = new git_operations_js_1.GitOperations(projectPath);
|
|
306
|
+
try {
|
|
307
|
+
const switchResult = await gitOps.checkout(name);
|
|
308
|
+
if (!switchResult.success) {
|
|
309
|
+
throw new Error(`Failed to switch branch: ${switchResult.error}`);
|
|
310
|
+
}
|
|
311
|
+
return {
|
|
312
|
+
success: true,
|
|
313
|
+
action: 'switch-branch',
|
|
314
|
+
message: 'Switched branch successfully',
|
|
315
|
+
data: { branch: name }
|
|
316
|
+
};
|
|
317
|
+
}
|
|
318
|
+
catch (error) {
|
|
319
|
+
return VersioningErrorHandler.handleError(error, 'switch-branch');
|
|
320
|
+
}
|
|
321
|
+
},
|
|
322
|
+
async handleDeleteBranch(params) {
|
|
323
|
+
const { projectPath, name, force } = params;
|
|
324
|
+
const gitOps = new git_operations_js_1.GitOperations(projectPath);
|
|
325
|
+
try {
|
|
326
|
+
const deleteResult = await gitOps.deleteBranch(name, { force });
|
|
327
|
+
if (!deleteResult.success) {
|
|
328
|
+
throw new Error(`Failed to delete branch: ${deleteResult.error}`);
|
|
329
|
+
}
|
|
330
|
+
return {
|
|
331
|
+
success: true,
|
|
332
|
+
action: 'delete-branch',
|
|
333
|
+
message: 'Branch deleted successfully',
|
|
334
|
+
data: { branch: name, force }
|
|
335
|
+
};
|
|
336
|
+
}
|
|
337
|
+
catch (error) {
|
|
338
|
+
return VersioningErrorHandler.handleError(error, 'delete-branch');
|
|
339
|
+
}
|
|
340
|
+
},
|
|
341
|
+
async handleCreateRelease(params) {
|
|
342
|
+
const { repo, provider, tag, name, description, draft } = params;
|
|
343
|
+
try {
|
|
344
|
+
const processedInput = await (0, user_detection_js_1.applyAutoUserDetection)({ provider }, provider);
|
|
345
|
+
const providerInstance = index_js_1.globalProviderFactory.getProvider(provider);
|
|
346
|
+
if (!providerInstance) {
|
|
347
|
+
throw new Error(`Provider ${provider} not configured`);
|
|
348
|
+
}
|
|
349
|
+
const releaseData = {
|
|
350
|
+
tag_name: tag,
|
|
351
|
+
name: name || tag,
|
|
352
|
+
body: description || `Release ${tag}`,
|
|
353
|
+
draft: draft || false,
|
|
354
|
+
prerelease: tag.includes('beta') || tag.includes('alpha')
|
|
355
|
+
};
|
|
356
|
+
const release = await providerInstance.createRelease(processedInput.owner, repo, releaseData);
|
|
357
|
+
return {
|
|
358
|
+
success: true,
|
|
359
|
+
action: 'create-release',
|
|
360
|
+
message: 'Release created successfully',
|
|
361
|
+
data: {
|
|
362
|
+
tag: release.tag_name,
|
|
363
|
+
name: release.name,
|
|
364
|
+
url: release.html_url,
|
|
365
|
+
draft: release.draft
|
|
366
|
+
}
|
|
367
|
+
};
|
|
368
|
+
}
|
|
369
|
+
catch (error) {
|
|
370
|
+
return VersioningErrorHandler.handleError(error, 'create-release');
|
|
371
|
+
}
|
|
372
|
+
},
|
|
373
|
+
async handleListReleases(params) {
|
|
374
|
+
const { repo, provider, limit } = params;
|
|
375
|
+
try {
|
|
376
|
+
const processedInput = await (0, user_detection_js_1.applyAutoUserDetection)({ provider }, provider);
|
|
377
|
+
const providerInstance = index_js_1.globalProviderFactory.getProvider(provider);
|
|
378
|
+
if (!providerInstance) {
|
|
379
|
+
throw new Error(`Provider ${provider} not configured`);
|
|
380
|
+
}
|
|
381
|
+
const releases = await providerInstance.listReleases(processedInput.owner, repo, undefined, limit);
|
|
382
|
+
return {
|
|
383
|
+
success: true,
|
|
384
|
+
action: 'list-releases',
|
|
385
|
+
message: `Found ${releases.length} releases`,
|
|
386
|
+
data: {
|
|
387
|
+
releases: releases.map(r => ({
|
|
388
|
+
tag: r.tag_name,
|
|
389
|
+
name: r.name,
|
|
390
|
+
published: r.published_at,
|
|
391
|
+
url: r.html_url
|
|
392
|
+
})),
|
|
393
|
+
count: releases.length
|
|
394
|
+
}
|
|
395
|
+
};
|
|
396
|
+
}
|
|
397
|
+
catch (error) {
|
|
398
|
+
return VersioningErrorHandler.handleError(error, 'list-releases');
|
|
399
|
+
}
|
|
400
|
+
},
|
|
401
|
+
async handleCreateTag(params) {
|
|
402
|
+
const { projectPath, name, message } = params;
|
|
403
|
+
const gitOps = new git_operations_js_1.GitOperations(projectPath);
|
|
404
|
+
try {
|
|
405
|
+
const tagResult = await gitOps.tag(name, {
|
|
406
|
+
annotate: true,
|
|
407
|
+
message: message || `Tag ${name}`
|
|
408
|
+
});
|
|
409
|
+
if (!tagResult.success) {
|
|
410
|
+
throw new Error(`Failed to create tag: ${tagResult.error}`);
|
|
411
|
+
}
|
|
412
|
+
return {
|
|
413
|
+
success: true,
|
|
414
|
+
action: 'create-tag',
|
|
415
|
+
message: 'Tag created successfully',
|
|
416
|
+
data: { tag: name, message: message || `Tag ${name}` }
|
|
417
|
+
};
|
|
418
|
+
}
|
|
419
|
+
catch (error) {
|
|
420
|
+
return VersioningErrorHandler.handleError(error, 'create-tag');
|
|
421
|
+
}
|
|
422
|
+
},
|
|
423
|
+
async handleListTags(params) {
|
|
424
|
+
const { projectPath } = params;
|
|
425
|
+
const gitOps = new git_operations_js_1.GitOperations(projectPath);
|
|
426
|
+
try {
|
|
427
|
+
const tagsResult = await gitOps.tag(undefined, { list: true });
|
|
428
|
+
if (!tagsResult.success) {
|
|
429
|
+
throw new Error(`Failed to list tags: ${tagsResult.error}`);
|
|
430
|
+
}
|
|
431
|
+
const tags = tagsResult.output.trim().split('\n').filter(t => t.trim());
|
|
432
|
+
return {
|
|
433
|
+
success: true,
|
|
434
|
+
action: 'list-tags',
|
|
435
|
+
message: `Found ${tags.length} tags`,
|
|
436
|
+
data: { tags, count: tags.length }
|
|
437
|
+
};
|
|
438
|
+
}
|
|
439
|
+
catch (error) {
|
|
440
|
+
return VersioningErrorHandler.handleError(error, 'list-tags');
|
|
441
|
+
}
|
|
442
|
+
},
|
|
443
|
+
async handleBumpVersion(params) {
|
|
444
|
+
const { projectPath, type, createTag, createRelease, provider } = params;
|
|
445
|
+
try {
|
|
446
|
+
const currentVersion = await VersionManager.getCurrentVersion(projectPath);
|
|
447
|
+
const newVersion = VersionManager.bumpVersion(currentVersion, type);
|
|
448
|
+
const gitOps = new git_operations_js_1.GitOperations(projectPath);
|
|
449
|
+
// Create tag
|
|
450
|
+
if (createTag) {
|
|
451
|
+
const tagResult = await gitOps.tag(newVersion, {
|
|
452
|
+
annotate: true,
|
|
453
|
+
message: `Release ${newVersion}`
|
|
454
|
+
});
|
|
455
|
+
if (!tagResult.success) {
|
|
456
|
+
throw new Error(`Failed to create tag: ${tagResult.error}`);
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
// Create release if requested and provider configured
|
|
460
|
+
if (createRelease && provider) {
|
|
461
|
+
// This would require getting repo name from git config
|
|
462
|
+
// For now, skip this part in the bump
|
|
463
|
+
console.log('Release creation skipped - repo name needed');
|
|
464
|
+
}
|
|
465
|
+
return {
|
|
466
|
+
success: true,
|
|
467
|
+
action: 'bump-version',
|
|
468
|
+
message: `Version bumped successfully`,
|
|
469
|
+
data: {
|
|
470
|
+
from: currentVersion,
|
|
471
|
+
to: newVersion,
|
|
472
|
+
type,
|
|
473
|
+
tagCreated: createTag,
|
|
474
|
+
releaseCreated: false
|
|
475
|
+
}
|
|
476
|
+
};
|
|
477
|
+
}
|
|
478
|
+
catch (error) {
|
|
479
|
+
return VersioningErrorHandler.handleError(error, 'bump-version');
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
};
|
|
483
|
+
//# sourceMappingURL=git-versioning.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"git-versioning.js","sourceRoot":"","sources":["../../src/tools/git-versioning.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,oDAA6E;AAC7E,kEAAoE;AACpE,kEAA2D;AAE3D;;;;;;;;;;;GAWG;AAEH,MAAM,wBAAwB,GAAG,OAAC,CAAC,kBAAkB,CAAC,QAAQ,EAAE;IAC9D,WAAW;IACX,OAAC,CAAC,MAAM,CAAC;QACP,MAAM,EAAE,OAAC,CAAC,OAAO,CAAC,eAAe,CAAC;QAClC,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE;QACvB,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;QAChB,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC;KAC5C,CAAC;IAEF,OAAC,CAAC,MAAM,CAAC;QACP,MAAM,EAAE,OAAC,CAAC,OAAO,CAAC,eAAe,CAAC;QAClC,WAAW,EAAE,O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