@andrebuzeli/git-mcp 3.0.0 → 3.0.1
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/server.d.ts.map +1 -1
- package/dist/server.js +58 -36
- package/dist/server.js.map +1 -1
- package/dist/tools/git-branches.d.ts +125 -359
- package/dist/tools/git-branches.d.ts.map +1 -1
- package/dist/tools/git-branches.js +179 -530
- package/dist/tools/git-branches.js.map +1 -1
- package/dist/tools/git-files.d.ts +246 -406
- package/dist/tools/git-files.d.ts.map +1 -1
- package/dist/tools/git-files.js +556 -499
- package/dist/tools/git-files.js.map +1 -1
- package/dist/tools/git-issues.d.ts +8 -8
- package/dist/tools/git-pulls.d.ts +14 -14
- package/dist/tools/git-releases.d.ts +131 -401
- package/dist/tools/git-releases.d.ts.map +1 -1
- package/dist/tools/git-releases.js +374 -469
- package/dist/tools/git-releases.js.map +1 -1
- package/dist/tools/git-remote.d.ts +2 -2
- package/dist/tools/git-repositories.d.ts +4 -4
- package/dist/tools/git-reset.d.ts +106 -65
- package/dist/tools/git-reset.d.ts.map +1 -1
- package/dist/tools/git-reset.js +265 -149
- package/dist/tools/git-reset.js.map +1 -1
- package/dist/tools/git-stash.d.ts +110 -68
- package/dist/tools/git-stash.d.ts.map +1 -1
- package/dist/tools/git-stash.js +311 -186
- package/dist/tools/git-stash.js.map +1 -1
- package/dist/tools/git-sync.d.ts +145 -76
- package/dist/tools/git-sync.d.ts.map +1 -1
- package/dist/tools/git-sync.js +346 -246
- package/dist/tools/git-sync.js.map +1 -1
- package/dist/tools/git-tags.d.ts +2 -2
- package/dist/tools/git-versioning.d.ts +2 -2
- package/dist/tools/git-workflow.d.ts +36 -73
- package/dist/tools/git-workflow.d.ts.map +1 -1
- package/dist/tools/git-workflow.js +79 -126
- package/dist/tools/git-workflow.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,186 +1,228 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { VcsOperations } from '../providers/index.js';
|
|
3
2
|
/**
|
|
4
|
-
* Tool: files
|
|
3
|
+
* Tool: git-files
|
|
5
4
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
5
|
+
* GERENCIAMENTO DE ARQUIVOS - Expandido com bulk operations
|
|
6
|
+
* Funcionalidades avançadas para manipulação de arquivos
|
|
8
7
|
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* - Leitura e listagem de conteúdo
|
|
12
|
-
* - Atualização de arquivos existentes
|
|
13
|
-
* - Exclusão de arquivos e diretórios
|
|
14
|
-
* - Busca por conteúdo e nome
|
|
15
|
-
* - Controle de versão de arquivos
|
|
16
|
-
*
|
|
17
|
-
* USO:
|
|
18
|
-
* - Para gerenciar arquivos de projeto
|
|
19
|
-
* - Para automatizar criação de arquivos
|
|
20
|
-
* - Para backup e migração de conteúdo
|
|
21
|
-
* - Para sincronização de arquivos
|
|
22
|
-
*
|
|
23
|
-
* RECOMENDAÇÕES:
|
|
24
|
-
* - Use mensagens de commit descritivas
|
|
25
|
-
* - Mantenha estrutura de diretórios organizada
|
|
26
|
-
* - Valide conteúdo antes de enviar
|
|
27
|
-
* - Use branches para mudanças grandes
|
|
28
|
-
*/
|
|
29
|
-
/**
|
|
30
|
-
* Schema de validação para entrada da tool files
|
|
31
|
-
*
|
|
32
|
-
* VALIDAÇÕES:
|
|
33
|
-
* - action: Ação obrigatória (get, create, update, delete, list, search)
|
|
34
|
-
* - Parâmetros específicos por ação
|
|
35
|
-
* - Validação de tipos e formatos
|
|
36
|
-
*
|
|
37
|
-
* RECOMENDAÇÕES:
|
|
38
|
-
* - Sempre valide entrada antes de usar
|
|
39
|
-
* - Use parâmetros opcionais adequadamente
|
|
40
|
-
* - Documente parâmetros obrigatórios
|
|
8
|
+
* DESIGNED FOR: Programador individual autônomo
|
|
9
|
+
* PHILOSOPHY: Operações em lote e manipulação avançada de arquivos
|
|
41
10
|
*/
|
|
42
|
-
declare const
|
|
43
|
-
action: z.
|
|
44
|
-
|
|
45
|
-
|
|
11
|
+
declare const GitFilesInputSchema: z.ZodDiscriminatedUnion<"action", [z.ZodObject<{
|
|
12
|
+
action: z.ZodLiteral<"read">;
|
|
13
|
+
projectPath: z.ZodString;
|
|
14
|
+
filePath: z.ZodString;
|
|
15
|
+
}, "strip", z.ZodTypeAny, {
|
|
16
|
+
action: "read";
|
|
17
|
+
projectPath: string;
|
|
18
|
+
filePath: string;
|
|
19
|
+
}, {
|
|
20
|
+
action: "read";
|
|
21
|
+
projectPath: string;
|
|
22
|
+
filePath: string;
|
|
23
|
+
}>, z.ZodObject<{
|
|
24
|
+
action: z.ZodLiteral<"create">;
|
|
25
|
+
projectPath: z.ZodString;
|
|
26
|
+
filePath: z.ZodString;
|
|
27
|
+
content: z.ZodString;
|
|
28
|
+
}, "strip", z.ZodTypeAny, {
|
|
29
|
+
action: "create";
|
|
30
|
+
projectPath: string;
|
|
31
|
+
filePath: string;
|
|
32
|
+
content: string;
|
|
33
|
+
}, {
|
|
34
|
+
action: "create";
|
|
35
|
+
projectPath: string;
|
|
36
|
+
filePath: string;
|
|
37
|
+
content: string;
|
|
38
|
+
}>, z.ZodObject<{
|
|
39
|
+
action: z.ZodLiteral<"update">;
|
|
40
|
+
projectPath: z.ZodString;
|
|
41
|
+
filePath: z.ZodString;
|
|
42
|
+
content: z.ZodString;
|
|
43
|
+
}, "strip", z.ZodTypeAny, {
|
|
44
|
+
action: "update";
|
|
45
|
+
projectPath: string;
|
|
46
|
+
filePath: string;
|
|
47
|
+
content: string;
|
|
48
|
+
}, {
|
|
49
|
+
action: "update";
|
|
50
|
+
projectPath: string;
|
|
51
|
+
filePath: string;
|
|
52
|
+
content: string;
|
|
53
|
+
}>, z.ZodObject<{
|
|
54
|
+
action: z.ZodLiteral<"delete">;
|
|
46
55
|
projectPath: z.ZodString;
|
|
47
|
-
|
|
48
|
-
content: z.ZodOptional<z.ZodString>;
|
|
49
|
-
message: z.ZodOptional<z.ZodString>;
|
|
50
|
-
branch: z.ZodOptional<z.ZodString>;
|
|
51
|
-
sha: z.ZodOptional<z.ZodString>;
|
|
52
|
-
ref: z.ZodOptional<z.ZodString>;
|
|
53
|
-
query: z.ZodOptional<z.ZodString>;
|
|
54
|
-
page: z.ZodOptional<z.ZodNumber>;
|
|
55
|
-
limit: z.ZodOptional<z.ZodNumber>;
|
|
56
|
+
filePath: z.ZodString;
|
|
56
57
|
}, "strip", z.ZodTypeAny, {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
58
|
+
action: "delete";
|
|
59
|
+
projectPath: string;
|
|
60
|
+
filePath: string;
|
|
61
|
+
}, {
|
|
62
|
+
action: "delete";
|
|
63
|
+
projectPath: string;
|
|
64
|
+
filePath: string;
|
|
65
|
+
}>, z.ZodObject<{
|
|
66
|
+
action: z.ZodLiteral<"list">;
|
|
67
|
+
projectPath: z.ZodString;
|
|
68
|
+
path: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
69
|
+
recursive: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
70
|
+
}, "strip", z.ZodTypeAny, {
|
|
71
|
+
path: string;
|
|
72
|
+
recursive: boolean;
|
|
73
|
+
action: "list";
|
|
74
|
+
projectPath: string;
|
|
75
|
+
}, {
|
|
76
|
+
action: "list";
|
|
60
77
|
projectPath: string;
|
|
61
78
|
path?: string | undefined;
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
79
|
+
recursive?: boolean | undefined;
|
|
80
|
+
}>, z.ZodObject<{
|
|
81
|
+
action: z.ZodLiteral<"create-dir">;
|
|
82
|
+
projectPath: z.ZodString;
|
|
83
|
+
dirPath: z.ZodString;
|
|
84
|
+
}, "strip", z.ZodTypeAny, {
|
|
85
|
+
action: "create-dir";
|
|
86
|
+
projectPath: string;
|
|
87
|
+
dirPath: string;
|
|
88
|
+
}, {
|
|
89
|
+
action: "create-dir";
|
|
90
|
+
projectPath: string;
|
|
91
|
+
dirPath: string;
|
|
92
|
+
}>, z.ZodObject<{
|
|
93
|
+
action: z.ZodLiteral<"bulk-create">;
|
|
94
|
+
projectPath: z.ZodString;
|
|
95
|
+
files: z.ZodArray<z.ZodObject<{
|
|
96
|
+
path: z.ZodString;
|
|
97
|
+
content: z.ZodString;
|
|
98
|
+
}, "strip", z.ZodTypeAny, {
|
|
99
|
+
path: string;
|
|
100
|
+
content: string;
|
|
101
|
+
}, {
|
|
102
|
+
path: string;
|
|
103
|
+
content: string;
|
|
104
|
+
}>, "many">;
|
|
105
|
+
}, "strip", z.ZodTypeAny, {
|
|
106
|
+
action: "bulk-create";
|
|
107
|
+
projectPath: string;
|
|
108
|
+
files: {
|
|
109
|
+
path: string;
|
|
110
|
+
content: string;
|
|
111
|
+
}[];
|
|
112
|
+
}, {
|
|
113
|
+
action: "bulk-create";
|
|
114
|
+
projectPath: string;
|
|
115
|
+
files: {
|
|
116
|
+
path: string;
|
|
117
|
+
content: string;
|
|
118
|
+
}[];
|
|
119
|
+
}>, z.ZodObject<{
|
|
120
|
+
action: z.ZodLiteral<"bulk-delete">;
|
|
121
|
+
projectPath: z.ZodString;
|
|
122
|
+
files: z.ZodArray<z.ZodString, "many">;
|
|
123
|
+
confirm: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
124
|
+
}, "strip", z.ZodTypeAny, {
|
|
125
|
+
action: "bulk-delete";
|
|
126
|
+
projectPath: string;
|
|
127
|
+
files: string[];
|
|
128
|
+
confirm: boolean;
|
|
70
129
|
}, {
|
|
71
|
-
|
|
72
|
-
repo: string;
|
|
73
|
-
action: "delete" | "get" | "search" | "list" | "create" | "update" | "upload-project";
|
|
130
|
+
action: "bulk-delete";
|
|
74
131
|
projectPath: string;
|
|
132
|
+
files: string[];
|
|
133
|
+
confirm?: boolean | undefined;
|
|
134
|
+
}>, z.ZodObject<{
|
|
135
|
+
action: z.ZodLiteral<"bulk-copy">;
|
|
136
|
+
projectPath: z.ZodString;
|
|
137
|
+
files: z.ZodArray<z.ZodObject<{
|
|
138
|
+
from: z.ZodString;
|
|
139
|
+
to: z.ZodString;
|
|
140
|
+
}, "strip", z.ZodTypeAny, {
|
|
141
|
+
from: string;
|
|
142
|
+
to: string;
|
|
143
|
+
}, {
|
|
144
|
+
from: string;
|
|
145
|
+
to: string;
|
|
146
|
+
}>, "many">;
|
|
147
|
+
}, "strip", z.ZodTypeAny, {
|
|
148
|
+
action: "bulk-copy";
|
|
149
|
+
projectPath: string;
|
|
150
|
+
files: {
|
|
151
|
+
from: string;
|
|
152
|
+
to: string;
|
|
153
|
+
}[];
|
|
154
|
+
}, {
|
|
155
|
+
action: "bulk-copy";
|
|
156
|
+
projectPath: string;
|
|
157
|
+
files: {
|
|
158
|
+
from: string;
|
|
159
|
+
to: string;
|
|
160
|
+
}[];
|
|
161
|
+
}>, z.ZodObject<{
|
|
162
|
+
action: z.ZodLiteral<"search">;
|
|
163
|
+
projectPath: z.ZodString;
|
|
164
|
+
query: z.ZodString;
|
|
165
|
+
path: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
166
|
+
caseSensitive: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
167
|
+
}, "strip", z.ZodTypeAny, {
|
|
168
|
+
path: string;
|
|
169
|
+
action: "search";
|
|
170
|
+
projectPath: string;
|
|
171
|
+
query: string;
|
|
172
|
+
caseSensitive: boolean;
|
|
173
|
+
}, {
|
|
174
|
+
action: "search";
|
|
175
|
+
projectPath: string;
|
|
176
|
+
query: string;
|
|
75
177
|
path?: string | undefined;
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
*/
|
|
96
|
-
declare const FilesResultSchema: z.ZodObject<{
|
|
178
|
+
caseSensitive?: boolean | undefined;
|
|
179
|
+
}>, z.ZodObject<{
|
|
180
|
+
action: z.ZodLiteral<"create-template">;
|
|
181
|
+
projectPath: z.ZodString;
|
|
182
|
+
template: z.ZodEnum<["gitignore", "readme", "license", "dockerfile", "package-json"]>;
|
|
183
|
+
name: z.ZodOptional<z.ZodString>;
|
|
184
|
+
}, "strip", z.ZodTypeAny, {
|
|
185
|
+
action: "create-template";
|
|
186
|
+
projectPath: string;
|
|
187
|
+
template: "gitignore" | "readme" | "license" | "dockerfile" | "package-json";
|
|
188
|
+
name?: string | undefined;
|
|
189
|
+
}, {
|
|
190
|
+
action: "create-template";
|
|
191
|
+
projectPath: string;
|
|
192
|
+
template: "gitignore" | "readme" | "license" | "dockerfile" | "package-json";
|
|
193
|
+
name?: string | undefined;
|
|
194
|
+
}>]>;
|
|
195
|
+
export type GitFilesInput = z.infer<typeof GitFilesInputSchema>;
|
|
196
|
+
declare const GitFilesResultSchema: z.ZodObject<{
|
|
97
197
|
success: z.ZodBoolean;
|
|
98
198
|
action: z.ZodString;
|
|
99
199
|
message: z.ZodString;
|
|
100
200
|
data: z.ZodOptional<z.ZodAny>;
|
|
101
201
|
error: z.ZodOptional<z.ZodString>;
|
|
202
|
+
recoverable: z.ZodOptional<z.ZodBoolean>;
|
|
203
|
+
suggestion: z.ZodOptional<z.ZodString>;
|
|
204
|
+
warning: z.ZodOptional<z.ZodString>;
|
|
102
205
|
}, "strip", z.ZodTypeAny, {
|
|
103
206
|
message: string;
|
|
104
207
|
action: string;
|
|
105
208
|
success: boolean;
|
|
106
209
|
error?: string | undefined;
|
|
107
210
|
data?: any;
|
|
211
|
+
recoverable?: boolean | undefined;
|
|
212
|
+
suggestion?: string | undefined;
|
|
213
|
+
warning?: string | undefined;
|
|
108
214
|
}, {
|
|
109
215
|
message: string;
|
|
110
216
|
action: string;
|
|
111
217
|
success: boolean;
|
|
112
218
|
error?: string | undefined;
|
|
113
219
|
data?: any;
|
|
220
|
+
recoverable?: boolean | undefined;
|
|
221
|
+
suggestion?: string | undefined;
|
|
222
|
+
warning?: string | undefined;
|
|
114
223
|
}>;
|
|
115
|
-
export type
|
|
116
|
-
|
|
117
|
-
* Tool: files
|
|
118
|
-
*
|
|
119
|
-
* DESCRIÇÃO:
|
|
120
|
-
* Gerenciamento completo de arquivos e diretórios Gitea com múltiplas ações
|
|
121
|
-
*
|
|
122
|
-
* ACTIONS DISPONÍVEIS:
|
|
123
|
-
*
|
|
124
|
-
* 1. get - Obter conteúdo de arquivo
|
|
125
|
-
* Parâmetros:
|
|
126
|
-
* - owner (obrigatório): Proprietário do repositório
|
|
127
|
-
* - repo (obrigatório): Nome do repositório
|
|
128
|
-
* - path (obrigatório): Caminho do arquivo
|
|
129
|
-
* - ref (opcional): Branch, tag ou commit (padrão: branch padrão)
|
|
130
|
-
*
|
|
131
|
-
* 2. create - Criar novo arquivo
|
|
132
|
-
* Parâmetros:
|
|
133
|
-
* - owner (obrigatório): Proprietário do repositório
|
|
134
|
-
* - repo (obrigatório): Nome do repositório
|
|
135
|
-
* - path (obrigatório): Caminho do arquivo
|
|
136
|
-
* - content (obrigatório): Conteúdo do arquivo
|
|
137
|
-
* - message (obrigatório): Mensagem de commit
|
|
138
|
-
* - branch (opcional): Branch de destino (padrão: branch padrão)
|
|
139
|
-
*
|
|
140
|
-
* 3. update - Atualizar arquivo existente
|
|
141
|
-
* Parâmetros:
|
|
142
|
-
* - owner (obrigatório): Proprietário do repositório
|
|
143
|
-
* - repo (obrigatório): Nome do repositório
|
|
144
|
-
* - path (obrigatório): Caminho do arquivo
|
|
145
|
-
* - content (obrigatório): Novo conteúdo
|
|
146
|
-
* - message (obrigatório): Mensagem de commit
|
|
147
|
-
* - sha (obrigatório): SHA do arquivo atual
|
|
148
|
-
* - branch (opcional): Branch de destino (padrão: branch padrão)
|
|
149
|
-
*
|
|
150
|
-
* 4. delete - Deletar arquivo
|
|
151
|
-
* Parâmetros:
|
|
152
|
-
* - owner (obrigatório): Proprietário do repositório
|
|
153
|
-
* - repo (obrigatório): Nome do repositório
|
|
154
|
-
* - path (obrigatório): Caminho do arquivo
|
|
155
|
-
* - message (obrigatório): Mensagem de commit
|
|
156
|
-
* - sha (obrigatório): SHA do arquivo
|
|
157
|
-
* - branch (opcional): Branch de destino (padrão: branch padrão)
|
|
158
|
-
*
|
|
159
|
-
* 5. list - Listar conteúdo de diretório
|
|
160
|
-
* Parâmetros:
|
|
161
|
-
* - owner (obrigatório): Proprietário do repositório
|
|
162
|
-
* - repo (obrigatório): Nome do repositório
|
|
163
|
-
* - path (opcional): Caminho do diretório (padrão: raiz)
|
|
164
|
-
* - ref (opcional): Branch, tag ou commit (padrão: branch padrão)
|
|
165
|
-
* - page (opcional): Página da listagem (padrão: 1)
|
|
166
|
-
* - limit (opcional): Itens por página (padrão: 30, máximo: 100)
|
|
167
|
-
*
|
|
168
|
-
* 6. search - Buscar arquivos por conteúdo
|
|
169
|
-
* Parâmetros:
|
|
170
|
-
* - owner (obrigatório): Proprietário do repositório
|
|
171
|
-
* - repo (obrigatório): Nome do repositório
|
|
172
|
-
* - query (obrigatório): Termo de busca
|
|
173
|
-
* - ref (opcional): Branch, tag ou commit (padrão: branch padrão)
|
|
174
|
-
*
|
|
175
|
-
* RECOMENDAÇÕES DE USO:
|
|
176
|
-
* - Use mensagens de commit descritivas
|
|
177
|
-
* - Mantenha estrutura de diretórios organizada
|
|
178
|
-
* - Valide conteúdo antes de enviar
|
|
179
|
-
* - Use branches para mudanças grandes
|
|
180
|
-
* - Documente mudanças importantes
|
|
181
|
-
* - Mantenha histórico de commits limpo
|
|
182
|
-
*/
|
|
183
|
-
export declare const filesTool: {
|
|
224
|
+
export type GitFilesResult = z.infer<typeof GitFilesResultSchema>;
|
|
225
|
+
export declare const gitFilesTool: {
|
|
184
226
|
name: string;
|
|
185
227
|
description: string;
|
|
186
228
|
inputSchema: {
|
|
@@ -191,298 +233,96 @@ export declare const filesTool: {
|
|
|
191
233
|
enum: string[];
|
|
192
234
|
description: string;
|
|
193
235
|
};
|
|
194
|
-
|
|
236
|
+
projectPath: {
|
|
195
237
|
type: string;
|
|
196
238
|
description: string;
|
|
197
239
|
};
|
|
198
|
-
|
|
240
|
+
filePath: {
|
|
199
241
|
type: string;
|
|
200
|
-
enum: string[];
|
|
201
242
|
description: string;
|
|
202
243
|
};
|
|
203
|
-
|
|
244
|
+
content: {
|
|
204
245
|
type: string;
|
|
205
246
|
description: string;
|
|
206
247
|
};
|
|
207
|
-
|
|
248
|
+
path: {
|
|
208
249
|
type: string;
|
|
209
250
|
description: string;
|
|
251
|
+
default: string;
|
|
210
252
|
};
|
|
211
|
-
|
|
253
|
+
recursive: {
|
|
212
254
|
type: string;
|
|
213
255
|
description: string;
|
|
256
|
+
default: boolean;
|
|
214
257
|
};
|
|
215
|
-
|
|
258
|
+
dirPath: {
|
|
216
259
|
type: string;
|
|
217
260
|
description: string;
|
|
218
261
|
};
|
|
219
|
-
|
|
262
|
+
files: {
|
|
220
263
|
type: string;
|
|
221
264
|
description: string;
|
|
222
265
|
};
|
|
223
|
-
|
|
266
|
+
confirm: {
|
|
224
267
|
type: string;
|
|
225
268
|
description: string;
|
|
269
|
+
default: boolean;
|
|
226
270
|
};
|
|
227
|
-
|
|
271
|
+
query: {
|
|
228
272
|
type: string;
|
|
229
273
|
description: string;
|
|
230
274
|
};
|
|
231
|
-
|
|
275
|
+
caseSensitive: {
|
|
232
276
|
type: string;
|
|
233
277
|
description: string;
|
|
278
|
+
default: boolean;
|
|
234
279
|
};
|
|
235
|
-
|
|
280
|
+
template: {
|
|
236
281
|
type: string;
|
|
282
|
+
enum: string[];
|
|
237
283
|
description: string;
|
|
238
|
-
minimum: number;
|
|
239
284
|
};
|
|
240
|
-
|
|
285
|
+
name: {
|
|
241
286
|
type: string;
|
|
242
287
|
description: string;
|
|
243
|
-
minimum: number;
|
|
244
|
-
maximum: number;
|
|
245
288
|
};
|
|
246
289
|
};
|
|
247
290
|
required: string[];
|
|
248
291
|
};
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
* - Suporta diferentes referências (branch, tag, commit)
|
|
284
|
-
*
|
|
285
|
-
* PARÂMETROS OBRIGATÓRIOS:
|
|
286
|
-
* - projectPath: Caminho do projeto local (OBRIGATÓRIO para TODAS as operações)
|
|
287
|
-
* - provider: Provedor a usar (gitea ou github)
|
|
288
|
-
* - repo: Nome do repositório
|
|
289
|
-
* - path: Caminho do arquivo
|
|
290
|
-
*
|
|
291
|
-
* PARÂMETROS OPCIONAIS:
|
|
292
|
-
* - ref: Branch, tag ou commit (padrão: branch padrão)
|
|
293
|
-
*
|
|
294
|
-
* VALIDAÇÕES:
|
|
295
|
-
* - Todos os parâmetros obrigatórios
|
|
296
|
-
* - Arquivo deve existir no caminho especificado
|
|
297
|
-
* - Referência deve ser válida
|
|
298
|
-
*
|
|
299
|
-
* RECOMENDAÇÕES:
|
|
300
|
-
* - Use para leitura de arquivos de configuração
|
|
301
|
-
* - Verifique tamanho antes de ler arquivos grandes
|
|
302
|
-
* - Use referências específicas para versões
|
|
303
|
-
* - Trate arquivos binários adequadamente
|
|
304
|
-
*/
|
|
305
|
-
getFile(params: FilesInput, provider: VcsOperations, owner: string): Promise<FilesResult>;
|
|
306
|
-
/**
|
|
307
|
-
* Cria um novo arquivo no repositório
|
|
308
|
-
*
|
|
309
|
-
* FUNCIONALIDADE:
|
|
310
|
-
* - Cria arquivo com conteúdo especificado
|
|
311
|
-
* - Faz commit automático com mensagem
|
|
312
|
-
* - Suporta criação em branches específicas
|
|
313
|
-
*
|
|
314
|
-
* PARÂMETROS OBRIGATÓRIOS:
|
|
315
|
-
* - owner: Proprietário do repositório
|
|
316
|
-
* - repo: Nome do repositório
|
|
317
|
-
* - path: Caminho do arquivo
|
|
318
|
-
* - content: Conteúdo do arquivo
|
|
319
|
-
* - message: Mensagem de commit
|
|
320
|
-
*
|
|
321
|
-
* PARÂMETROS OPCIONAIS:
|
|
322
|
-
* - branch: Branch de destino (padrão: branch padrão)
|
|
323
|
-
*
|
|
324
|
-
* VALIDAÇÕES:
|
|
325
|
-
* - Todos os parâmetros obrigatórios
|
|
326
|
-
* - Caminho deve ser válido
|
|
327
|
-
* - Usuário deve ter permissão de escrita
|
|
328
|
-
*
|
|
329
|
-
* RECOMENDAÇÕES:
|
|
330
|
-
* - Use mensagens de commit descritivas
|
|
331
|
-
* - Valide conteúdo antes de enviar
|
|
332
|
-
* - Use branches para mudanças grandes
|
|
333
|
-
* - Documente propósito do arquivo
|
|
334
|
-
*/
|
|
335
|
-
createFile(params: FilesInput, provider: VcsOperations, owner: string): Promise<FilesResult>;
|
|
336
|
-
/**
|
|
337
|
-
* Atualiza um arquivo existente no repositório
|
|
338
|
-
*
|
|
339
|
-
* FUNCIONALIDADE:
|
|
340
|
-
* - Atualiza conteúdo do arquivo
|
|
341
|
-
* - Faz commit com nova versão
|
|
342
|
-
* - Requer SHA do arquivo atual
|
|
343
|
-
*
|
|
344
|
-
* PARÂMETROS OBRIGATÓRIOS:
|
|
345
|
-
* - owner: Proprietário do repositório
|
|
346
|
-
* - repo: Nome do repositório
|
|
347
|
-
* - path: Caminho do arquivo
|
|
348
|
-
* - content: Novo conteúdo
|
|
349
|
-
* - message: Mensagem de commit
|
|
350
|
-
* - sha: SHA do arquivo atual
|
|
351
|
-
*
|
|
352
|
-
* PARÂMETROS OPCIONAIS:
|
|
353
|
-
* - branch: Branch de destino (padrão: branch padrão)
|
|
354
|
-
*
|
|
355
|
-
* VALIDAÇÕES:
|
|
356
|
-
* - Todos os parâmetros obrigatórios
|
|
357
|
-
* - Arquivo deve existir
|
|
358
|
-
* - SHA deve ser válido
|
|
359
|
-
*
|
|
360
|
-
* RECOMENDAÇÕES:
|
|
361
|
-
* - Sempre obtenha SHA atual antes de atualizar
|
|
362
|
-
* - Use mensagens de commit descritivas
|
|
363
|
-
* - Verifique se arquivo não foi modificado por outro usuário
|
|
364
|
-
* - Teste mudanças antes de commitar
|
|
365
|
-
*/
|
|
366
|
-
updateFile(params: FilesInput, provider: VcsOperations, owner: string): Promise<FilesResult>;
|
|
367
|
-
/**
|
|
368
|
-
* Deleta um arquivo do repositório
|
|
369
|
-
*
|
|
370
|
-
* FUNCIONALIDADE:
|
|
371
|
-
* - Remove arquivo especificado
|
|
372
|
-
* - Faz commit de exclusão
|
|
373
|
-
* - Requer SHA do arquivo
|
|
374
|
-
*
|
|
375
|
-
* PARÂMETROS OBRIGATÓRIOS:
|
|
376
|
-
* - owner: Proprietário do repositório
|
|
377
|
-
* - repo: Nome do repositório
|
|
378
|
-
* - path: Caminho do arquivo
|
|
379
|
-
* - message: Mensagem de commit
|
|
380
|
-
* - sha: SHA do arquivo
|
|
381
|
-
*
|
|
382
|
-
* PARÂMETROS OPCIONAIS:
|
|
383
|
-
* - branch: Branch de destino (padrão: branch padrão)
|
|
384
|
-
*
|
|
385
|
-
* VALIDAÇÕES:
|
|
386
|
-
* - Todos os parâmetros obrigatórios
|
|
387
|
-
* - Arquivo deve existir
|
|
388
|
-
* - SHA deve ser válido
|
|
389
|
-
*
|
|
390
|
-
* RECOMENDAÇÕES:
|
|
391
|
-
* - Confirme exclusão antes de executar
|
|
392
|
-
* - Use mensagens de commit descritivas
|
|
393
|
-
* - Verifique dependências do arquivo
|
|
394
|
-
* - Mantenha backup se necessário
|
|
395
|
-
*/
|
|
396
|
-
deleteFile(params: FilesInput, provider: VcsOperations, owner: string): Promise<FilesResult>;
|
|
397
|
-
/**
|
|
398
|
-
* Lista conteúdo de um diretório
|
|
399
|
-
*
|
|
400
|
-
* FUNCIONALIDADE:
|
|
401
|
-
* - Lista arquivos e subdiretórios
|
|
402
|
-
* - Suporta paginação
|
|
403
|
-
* - Inclui metadados de cada item
|
|
404
|
-
*
|
|
405
|
-
* PARÂMETROS OBRIGATÓRIOS:
|
|
406
|
-
* - owner: Proprietário do repositório
|
|
407
|
-
* - repo: Nome do repositório
|
|
408
|
-
*
|
|
409
|
-
* PARÂMETROS OPCIONAIS:
|
|
410
|
-
* - path: Caminho do diretório (padrão: raiz)
|
|
411
|
-
* - ref: Branch, tag ou commit (padrão: branch padrão)
|
|
412
|
-
* - page: Página da listagem (padrão: 1)
|
|
413
|
-
* - limit: Itens por página (padrão: 30, máximo: 100)
|
|
414
|
-
*
|
|
415
|
-
* VALIDAÇÕES:
|
|
416
|
-
* - e repo obrigatórios
|
|
417
|
-
* - Diretório deve existir
|
|
418
|
-
* - Page deve ser >= 1
|
|
419
|
-
* - Limit deve ser entre 1 e 100
|
|
420
|
-
*
|
|
421
|
-
* RECOMENDAÇÕES:
|
|
422
|
-
* - Use paginação para diretórios grandes
|
|
423
|
-
* - Monitore número total de itens
|
|
424
|
-
* - Use referências específicas para versões
|
|
425
|
-
* - Organize estrutura de diretórios
|
|
426
|
-
*/
|
|
427
|
-
listFiles(params: FilesInput, provider: VcsOperations, owner: string): Promise<FilesResult>;
|
|
428
|
-
/**
|
|
429
|
-
* Busca arquivos por conteúdo
|
|
430
|
-
*
|
|
431
|
-
* FUNCIONALIDADE:
|
|
432
|
-
* - Busca arquivos que contenham texto específico
|
|
433
|
-
* - Suporta diferentes referências
|
|
434
|
-
* - Retorna resultados relevantes
|
|
435
|
-
*
|
|
436
|
-
* PARÂMETROS OBRIGATÓRIOS:
|
|
437
|
-
* - owner: Proprietário do repositório
|
|
438
|
-
* - repo: Nome do repositório
|
|
439
|
-
* - query: Termo de busca
|
|
440
|
-
*
|
|
441
|
-
* PARÂMETROS OPCIONAIS:
|
|
442
|
-
* - ref: Branch, tag ou commit (padrão: branch padrão)
|
|
443
|
-
*
|
|
444
|
-
* VALIDAÇÕES:
|
|
445
|
-
* - Todos os parâmetros obrigatórios
|
|
446
|
-
* - Query deve ter pelo menos 3 caracteres
|
|
447
|
-
* - Repositório deve existir
|
|
448
|
-
*
|
|
449
|
-
* RECOMENDAÇÕES:
|
|
450
|
-
* - Use termos de busca específicos
|
|
451
|
-
* - Combine com filtros de diretório
|
|
452
|
-
* - Use referências para versões específicas
|
|
453
|
-
* - Analise resultados para relevância
|
|
454
|
-
*/
|
|
455
|
-
searchFiles(params: FilesInput, provider: VcsOperations, owner: string): Promise<FilesResult>;
|
|
456
|
-
/**
|
|
457
|
-
* Faz upload de todo o projeto para o repositório
|
|
458
|
-
*
|
|
459
|
-
* FUNCIONALIDADE:
|
|
460
|
-
* - Envia todos os arquivos do projeto local
|
|
461
|
-
* - Ignora diretórios desnecessários (node_modules, .git, dist)
|
|
462
|
-
* - Ignora arquivos temporários e logs
|
|
463
|
-
* - Faz commit com mensagem personalizada
|
|
464
|
-
*
|
|
465
|
-
* PARÂMETROS OBRIGATÓRIOS:
|
|
466
|
-
* - owner: Proprietário do repositório
|
|
467
|
-
* - repo: Nome do repositório
|
|
468
|
-
* - projectPath: Caminho do projeto local
|
|
469
|
-
* - message: Mensagem de commit
|
|
470
|
-
*
|
|
471
|
-
* PARÂMETROS OPCIONAIS:
|
|
472
|
-
* - branch: Branch de destino (padrão: branch padrão)
|
|
473
|
-
*
|
|
474
|
-
* VALIDAÇÕES:
|
|
475
|
-
* - Todos os parâmetros obrigatórios
|
|
476
|
-
* - Projeto deve existir no caminho especificado
|
|
477
|
-
* - Usuário deve ter permissão de escrita
|
|
478
|
-
*
|
|
479
|
-
* RECOMENDAÇÕES:
|
|
480
|
-
* - Use mensagens de commit descritivas
|
|
481
|
-
* - Verifique se o repositório está limpo
|
|
482
|
-
* - Use branches para mudanças grandes
|
|
483
|
-
* - Monitore erros de upload
|
|
484
|
-
*/
|
|
485
|
-
uploadProject(params: FilesInput, provider: VcsOperations, owner: string): Promise<FilesResult>;
|
|
292
|
+
handler(input: GitFilesInput): Promise<GitFilesResult>;
|
|
293
|
+
handleRead(params: GitFilesInput & {
|
|
294
|
+
action: "read";
|
|
295
|
+
}): Promise<GitFilesResult>;
|
|
296
|
+
handleCreate(params: GitFilesInput & {
|
|
297
|
+
action: "create";
|
|
298
|
+
}): Promise<GitFilesResult>;
|
|
299
|
+
handleUpdate(params: GitFilesInput & {
|
|
300
|
+
action: "update";
|
|
301
|
+
}): Promise<GitFilesResult>;
|
|
302
|
+
handleDelete(params: GitFilesInput & {
|
|
303
|
+
action: "delete";
|
|
304
|
+
}): Promise<GitFilesResult>;
|
|
305
|
+
handleList(params: GitFilesInput & {
|
|
306
|
+
action: "list";
|
|
307
|
+
}): Promise<GitFilesResult>;
|
|
308
|
+
handleCreateDir(params: GitFilesInput & {
|
|
309
|
+
action: "create-dir";
|
|
310
|
+
}): Promise<GitFilesResult>;
|
|
311
|
+
handleBulkCreate(params: GitFilesInput & {
|
|
312
|
+
action: "bulk-create";
|
|
313
|
+
}): Promise<GitFilesResult>;
|
|
314
|
+
handleBulkDelete(params: GitFilesInput & {
|
|
315
|
+
action: "bulk-delete";
|
|
316
|
+
}): Promise<GitFilesResult>;
|
|
317
|
+
handleBulkCopy(params: GitFilesInput & {
|
|
318
|
+
action: "bulk-copy";
|
|
319
|
+
}): Promise<GitFilesResult>;
|
|
320
|
+
handleSearch(params: GitFilesInput & {
|
|
321
|
+
action: "search";
|
|
322
|
+
}): Promise<GitFilesResult>;
|
|
323
|
+
handleCreateTemplate(params: GitFilesInput & {
|
|
324
|
+
action: "create-template";
|
|
325
|
+
}): Promise<GitFilesResult>;
|
|
486
326
|
};
|
|
487
327
|
export {};
|
|
488
328
|
//# sourceMappingURL=git-files.d.ts.map
|