@andrebuzeli/git-mcp 2.47.2 → 2.48.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.
@@ -327,34 +327,34 @@ exports.initializeTool = {
327
327
  // Arquivo já existe, não sobrescrever
328
328
  }
329
329
  catch {
330
- const readmeContent = `# ${params.repo || path.basename(projectPath)}
331
-
332
- ${params.description || 'Projeto inicializado com git-initialize'}
333
-
334
- ## Instalação
335
-
336
- \`\`\`bash
337
- # Instalar dependências
338
- npm install
339
- \`\`\`
340
-
341
- ## Uso
342
-
343
- \`\`\`bash
344
- # Executar projeto
345
- npm start
346
- \`\`\`
347
-
348
- ## Desenvolvimento
349
-
350
- \`\`\`bash
351
- # Modo desenvolvimento
352
- npm run dev
353
- \`\`\`
354
-
355
- ## Licença
356
-
357
- MIT
330
+ const readmeContent = `# ${params.repo || path.basename(projectPath)}
331
+
332
+ ${params.description || 'Projeto inicializado com git-initialize'}
333
+
334
+ ## Instalação
335
+
336
+ \`\`\`bash
337
+ # Instalar dependências
338
+ npm install
339
+ \`\`\`
340
+
341
+ ## Uso
342
+
343
+ \`\`\`bash
344
+ # Executar projeto
345
+ npm start
346
+ \`\`\`
347
+
348
+ ## Desenvolvimento
349
+
350
+ \`\`\`bash
351
+ # Modo desenvolvimento
352
+ npm run dev
353
+ \`\`\`
354
+
355
+ ## Licença
356
+
357
+ MIT
358
358
  `;
359
359
  await fs.writeFile(readmePath, readmeContent, 'utf-8');
360
360
  filesCreated++;
@@ -368,97 +368,97 @@ MIT
368
368
  // Arquivo já existe, não sobrescrever
369
369
  }
370
370
  catch {
371
- const gitignoreContent = `# Dependencies
372
- node_modules/
373
- npm-debug.log*
374
- yarn-debug.log*
375
- yarn-error.log*
376
-
377
- # Production builds
378
- dist/
379
- build/
380
- .next/
381
- out/
382
-
383
- # Environment variables
384
- .env
385
- .env.local
386
- .env.development.local
387
- .env.test.local
388
- .env.production.local
389
-
390
- # IDE
391
- .vscode/
392
- .idea/
393
- *.swp
394
- *.swo
395
-
396
- # OS
397
- .DS_Store
398
- Thumbs.db
399
-
400
- # Logs
401
- logs/
402
- *.log
403
-
404
- # Runtime data
405
- pids/
406
- *.pid
407
- *.seed
408
- *.pid.lock
409
-
410
- # Coverage directory used by tools like istanbul
411
- coverage/
412
-
413
- # Temporary folders
414
- tmp/
415
- temp/
416
-
417
- # Optional npm cache directory
418
- .npm
419
-
420
- # Optional eslint cache
421
- .eslintcache
422
-
423
- # Microbundle cache
424
- .rpt2_cache/
425
- .rts2_cache_cjs/
426
- .rts2_cache_es/
427
- .rts2_cache_umd/
428
-
429
- # Optional REPL history
430
- .node_repl_history
431
-
432
- # Output of 'npm pack'
433
- *.tgz
434
-
435
- # Yarn Integrity file
436
- .yarn-integrity
437
-
438
- # parcel-bundler cache (https://parceljs.org/)
439
- .cache
440
- .parcel-cache
441
-
442
- # next.js build output
443
- .next
444
-
445
- # nuxt.js build output
446
- .nuxt
447
-
448
- # vuepress build output
449
- .vuepress/dist
450
-
451
- # Serverless directories
452
- .serverless
453
-
454
- # FuseBox cache
455
- .fusebox/
456
-
457
- # DynamoDB Local files
458
- .dynamodb/
459
-
460
- # TernJS port file
461
- .tern-port
371
+ const gitignoreContent = `# Dependencies
372
+ node_modules/
373
+ npm-debug.log*
374
+ yarn-debug.log*
375
+ yarn-error.log*
376
+
377
+ # Production builds
378
+ dist/
379
+ build/
380
+ .next/
381
+ out/
382
+
383
+ # Environment variables
384
+ .env
385
+ .env.local
386
+ .env.development.local
387
+ .env.test.local
388
+ .env.production.local
389
+
390
+ # IDE
391
+ .vscode/
392
+ .idea/
393
+ *.swp
394
+ *.swo
395
+
396
+ # OS
397
+ .DS_Store
398
+ Thumbs.db
399
+
400
+ # Logs
401
+ logs/
402
+ *.log
403
+
404
+ # Runtime data
405
+ pids/
406
+ *.pid
407
+ *.seed
408
+ *.pid.lock
409
+
410
+ # Coverage directory used by tools like istanbul
411
+ coverage/
412
+
413
+ # Temporary folders
414
+ tmp/
415
+ temp/
416
+
417
+ # Optional npm cache directory
418
+ .npm
419
+
420
+ # Optional eslint cache
421
+ .eslintcache
422
+
423
+ # Microbundle cache
424
+ .rpt2_cache/
425
+ .rts2_cache_cjs/
426
+ .rts2_cache_es/
427
+ .rts2_cache_umd/
428
+
429
+ # Optional REPL history
430
+ .node_repl_history
431
+
432
+ # Output of 'npm pack'
433
+ *.tgz
434
+
435
+ # Yarn Integrity file
436
+ .yarn-integrity
437
+
438
+ # parcel-bundler cache (https://parceljs.org/)
439
+ .cache
440
+ .parcel-cache
441
+
442
+ # next.js build output
443
+ .next
444
+
445
+ # nuxt.js build output
446
+ .nuxt
447
+
448
+ # vuepress build output
449
+ .vuepress/dist
450
+
451
+ # Serverless directories
452
+ .serverless
453
+
454
+ # FuseBox cache
455
+ .fusebox/
456
+
457
+ # DynamoDB Local files
458
+ .dynamodb/
459
+
460
+ # TernJS port file
461
+ .tern-port
462
462
  `;
463
463
  await fs.writeFile(gitignorePath, gitignoreContent, 'utf-8');
464
464
  filesCreated++;
@@ -0,0 +1,327 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Tool: git-publish
4
+ *
5
+ * DESCRIÇÃO:
6
+ * Publicação automática de projetos em múltiplas plataformas para programadores individuais autônomos
7
+ *
8
+ * FUNCIONALIDADES:
9
+ * - Publicação automática em NPM, GitHub, Docker Registry
10
+ * - Versionamento semântico inteligente
11
+ * - Geração automática de changelog
12
+ * - Upload de assets e artefatos
13
+ * - Notificações de release
14
+ * - Multi-plataforma em paralelo
15
+ *
16
+ * USO:
17
+ * - Para publicação profissional de projetos
18
+ * - Automação de releases
19
+ * - Distribuição em múltiplas plataformas
20
+ * - Versionamento automático
21
+ *
22
+ * OTIMIZADO PARA AI AGENTS:
23
+ * - Interface simples e intuitiva
24
+ * - Auto-detecção de contexto
25
+ * - Validação automática
26
+ * - Error handling robusto
27
+ */
28
+ declare const GitPublishInputSchema: z.ZodDiscriminatedUnion<"action", [z.ZodObject<{
29
+ action: z.ZodLiteral<"auto-release">;
30
+ repo: z.ZodString;
31
+ provider: z.ZodEnum<["gitea", "github"]>;
32
+ projectPath: z.ZodString;
33
+ platforms: z.ZodArray<z.ZodEnum<["npm", "github", "docker", "pypi"]>, "many">;
34
+ autoVersion: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
35
+ createChangelog: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
36
+ draft: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
37
+ prerelease: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
38
+ notify: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
39
+ assets: z.ZodOptional<z.ZodArray<z.ZodObject<{
40
+ path: z.ZodString;
41
+ label: z.ZodOptional<z.ZodString>;
42
+ }, "strip", z.ZodTypeAny, {
43
+ path: string;
44
+ label?: string | undefined;
45
+ }, {
46
+ path: string;
47
+ label?: string | undefined;
48
+ }>, "many">>;
49
+ }, "strip", z.ZodTypeAny, {
50
+ provider: "gitea" | "github";
51
+ draft: boolean;
52
+ prerelease: boolean;
53
+ repo: string;
54
+ action: "auto-release";
55
+ projectPath: string;
56
+ platforms: ("github" | "npm" | "docker" | "pypi")[];
57
+ autoVersion: boolean;
58
+ createChangelog: boolean;
59
+ notify: boolean;
60
+ assets?: {
61
+ path: string;
62
+ label?: string | undefined;
63
+ }[] | undefined;
64
+ }, {
65
+ provider: "gitea" | "github";
66
+ repo: string;
67
+ action: "auto-release";
68
+ projectPath: string;
69
+ platforms: ("github" | "npm" | "docker" | "pypi")[];
70
+ draft?: boolean | undefined;
71
+ prerelease?: boolean | undefined;
72
+ assets?: {
73
+ path: string;
74
+ label?: string | undefined;
75
+ }[] | undefined;
76
+ autoVersion?: boolean | undefined;
77
+ createChangelog?: boolean | undefined;
78
+ notify?: boolean | undefined;
79
+ }>, z.ZodObject<{
80
+ action: z.ZodLiteral<"prepare-release">;
81
+ repo: z.ZodString;
82
+ provider: z.ZodEnum<["gitea", "github"]>;
83
+ projectPath: z.ZodString;
84
+ version: z.ZodOptional<z.ZodString>;
85
+ autoVersion: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
86
+ updateDocs: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
87
+ runTests: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
88
+ createBranch: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
89
+ }, "strip", z.ZodTypeAny, {
90
+ provider: "gitea" | "github";
91
+ repo: string;
92
+ action: "prepare-release";
93
+ projectPath: string;
94
+ autoVersion: boolean;
95
+ updateDocs: boolean;
96
+ runTests: boolean;
97
+ createBranch: boolean;
98
+ version?: string | undefined;
99
+ }, {
100
+ provider: "gitea" | "github";
101
+ repo: string;
102
+ action: "prepare-release";
103
+ projectPath: string;
104
+ version?: string | undefined;
105
+ autoVersion?: boolean | undefined;
106
+ updateDocs?: boolean | undefined;
107
+ runTests?: boolean | undefined;
108
+ createBranch?: boolean | undefined;
109
+ }>, z.ZodObject<{
110
+ action: z.ZodLiteral<"create-package">;
111
+ repo: z.ZodString;
112
+ provider: z.ZodEnum<["gitea", "github"]>;
113
+ projectPath: z.ZodString;
114
+ packageType: z.ZodEnum<["npm", "docker", "pypi"]>;
115
+ version: z.ZodOptional<z.ZodString>;
116
+ buildScript: z.ZodOptional<z.ZodString>;
117
+ }, "strip", z.ZodTypeAny, {
118
+ provider: "gitea" | "github";
119
+ repo: string;
120
+ action: "create-package";
121
+ projectPath: string;
122
+ packageType: "npm" | "docker" | "pypi";
123
+ version?: string | undefined;
124
+ buildScript?: string | undefined;
125
+ }, {
126
+ provider: "gitea" | "github";
127
+ repo: string;
128
+ action: "create-package";
129
+ projectPath: string;
130
+ packageType: "npm" | "docker" | "pypi";
131
+ version?: string | undefined;
132
+ buildScript?: string | undefined;
133
+ }>, z.ZodObject<{
134
+ action: z.ZodLiteral<"publish-multi">;
135
+ repo: z.ZodString;
136
+ provider: z.ZodEnum<["gitea", "github"]>;
137
+ projectPath: z.ZodString;
138
+ platforms: z.ZodArray<z.ZodEnum<["npm", "github", "docker", "pypi"]>, "many">;
139
+ version: z.ZodOptional<z.ZodString>;
140
+ parallel: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
141
+ }, "strip", z.ZodTypeAny, {
142
+ provider: "gitea" | "github";
143
+ repo: string;
144
+ action: "publish-multi";
145
+ projectPath: string;
146
+ platforms: ("github" | "npm" | "docker" | "pypi")[];
147
+ parallel: boolean;
148
+ version?: string | undefined;
149
+ }, {
150
+ provider: "gitea" | "github";
151
+ repo: string;
152
+ action: "publish-multi";
153
+ projectPath: string;
154
+ platforms: ("github" | "npm" | "docker" | "pypi")[];
155
+ version?: string | undefined;
156
+ parallel?: boolean | undefined;
157
+ }>]>;
158
+ export type GitPublishInput = z.infer<typeof GitPublishInputSchema>;
159
+ declare const GitPublishResultSchema: z.ZodObject<{
160
+ success: z.ZodBoolean;
161
+ action: z.ZodString;
162
+ message: z.ZodString;
163
+ data: z.ZodOptional<z.ZodAny>;
164
+ error: z.ZodOptional<z.ZodString>;
165
+ }, "strip", z.ZodTypeAny, {
166
+ message: string;
167
+ action: string;
168
+ success: boolean;
169
+ error?: string | undefined;
170
+ data?: any;
171
+ }, {
172
+ message: string;
173
+ action: string;
174
+ success: boolean;
175
+ error?: string | undefined;
176
+ data?: any;
177
+ }>;
178
+ export type GitPublishResult = z.infer<typeof GitPublishResultSchema>;
179
+ export declare const gitPublishTool: {
180
+ name: string;
181
+ description: string;
182
+ inputSchema: {
183
+ type: string;
184
+ properties: {
185
+ action: {
186
+ type: string;
187
+ enum: string[];
188
+ description: string;
189
+ };
190
+ repo: {
191
+ type: string;
192
+ description: string;
193
+ };
194
+ provider: {
195
+ type: string;
196
+ enum: string[];
197
+ description: string;
198
+ };
199
+ projectPath: {
200
+ type: string;
201
+ description: string;
202
+ };
203
+ platforms: {
204
+ type: string;
205
+ items: {
206
+ type: string;
207
+ enum: string[];
208
+ };
209
+ description: string;
210
+ };
211
+ autoVersion: {
212
+ type: string;
213
+ description: string;
214
+ default: boolean;
215
+ };
216
+ createChangelog: {
217
+ type: string;
218
+ description: string;
219
+ default: boolean;
220
+ };
221
+ draft: {
222
+ type: string;
223
+ description: string;
224
+ default: boolean;
225
+ };
226
+ prerelease: {
227
+ type: string;
228
+ description: string;
229
+ default: boolean;
230
+ };
231
+ notify: {
232
+ type: string;
233
+ description: string;
234
+ default: boolean;
235
+ };
236
+ version: {
237
+ type: string;
238
+ description: string;
239
+ };
240
+ updateDocs: {
241
+ type: string;
242
+ description: string;
243
+ default: boolean;
244
+ };
245
+ runTests: {
246
+ type: string;
247
+ description: string;
248
+ default: boolean;
249
+ };
250
+ createBranch: {
251
+ type: string;
252
+ description: string;
253
+ default: boolean;
254
+ };
255
+ packageType: {
256
+ type: string;
257
+ enum: string[];
258
+ description: string;
259
+ };
260
+ buildScript: {
261
+ type: string;
262
+ description: string;
263
+ };
264
+ parallel: {
265
+ type: string;
266
+ description: string;
267
+ default: boolean;
268
+ };
269
+ assets: {
270
+ type: string;
271
+ items: {
272
+ type: string;
273
+ properties: {
274
+ path: {
275
+ type: string;
276
+ };
277
+ label: {
278
+ type: string;
279
+ };
280
+ };
281
+ };
282
+ description: string;
283
+ };
284
+ };
285
+ required: string[];
286
+ };
287
+ handler(input: GitPublishInput): Promise<GitPublishResult>;
288
+ handleAutoRelease(params: GitPublishInput & {
289
+ action: "auto-release";
290
+ }): Promise<GitPublishResult>;
291
+ handlePrepareRelease(params: GitPublishInput & {
292
+ action: "prepare-release";
293
+ }): Promise<GitPublishResult>;
294
+ handleCreatePackage(params: GitPublishInput & {
295
+ action: "create-package";
296
+ }): Promise<GitPublishResult>;
297
+ handlePublishMulti(params: GitPublishInput & {
298
+ action: "publish-multi";
299
+ }): Promise<GitPublishResult>;
300
+ publishToPlatform(platform: string, repo: string, provider: string, projectPath: string, version?: string): Promise<GitPublishResult>;
301
+ publishNPM(repo: string, projectPath: string, version?: string): Promise<GitPublishResult>;
302
+ publishGitHub(repo: string, provider: string, projectPath: string, version?: string, draft?: boolean, prerelease?: boolean): Promise<GitPublishResult>;
303
+ publishDocker(repo: string, projectPath: string, version?: string): Promise<GitPublishResult>;
304
+ generateNextVersion(projectPath: string): Promise<string>;
305
+ generateChangelog(projectPath: string, version: string): Promise<string>;
306
+ runTests(projectPath: string): Promise<{
307
+ success: boolean;
308
+ error?: string;
309
+ }>;
310
+ createReleaseBranch(projectPath: string, version: string): Promise<{
311
+ branch: string;
312
+ success: boolean;
313
+ }>;
314
+ updateDocumentation(projectPath: string, version: string): Promise<{
315
+ success: boolean;
316
+ error?: string;
317
+ }>;
318
+ createNPM(repo: string, projectPath: string, version?: string, buildScript?: string): Promise<GitPublishResult>;
319
+ createDocker(repo: string, projectPath: string, version?: string): Promise<GitPublishResult>;
320
+ createPyPI(repo: string, projectPath: string, version?: string, buildScript?: string): Promise<GitPublishResult>;
321
+ runBuildScript(projectPath: string, script: string): Promise<{
322
+ success: boolean;
323
+ error?: string;
324
+ }>;
325
+ };
326
+ export {};
327
+ //# sourceMappingURL=git-publish.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"git-publish.d.ts","sourceRoot":"","sources":["../../src/tools/git-publish.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,QAAA,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAqDzB,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE,QAAA,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;EAM1B,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,C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