@followthecode/cli 1.2.37 → 1.2.38
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/appsettings.json +3 -3
- package/bin/linux-x64/appsettings.json +3 -3
- package/bin/linux-x64/ftc.cli +0 -0
- package/bin/osx-x64/appsettings.json +3 -3
- package/bin/osx-x64/ftc.cli +0 -0
- package/bin/win-x64/appsettings.json +3 -3
- package/bin/win-x64/ftc.cli.exe +0 -0
- package/package.json +1 -1
- package/TESTING_INSTALLATION.md +0 -344
package/appsettings.json
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"Serilog": {
|
|
3
3
|
"Using": [
|
|
4
|
-
"Serilog.Sinks.Console"
|
|
5
|
-
"Serilog.Sinks.OpenTelemetry"
|
|
4
|
+
"Serilog.Sinks.Console"
|
|
6
5
|
],
|
|
7
6
|
"MinimumLevel": {
|
|
8
7
|
"Default": "Information",
|
|
@@ -18,7 +17,8 @@
|
|
|
18
17
|
"WithEnvironmentUserName",
|
|
19
18
|
"WithExceptionDetails",
|
|
20
19
|
"WithOpenTelemetryTraceId",
|
|
21
|
-
"WithOpenTelemetrySpanId"
|
|
20
|
+
"WithOpenTelemetrySpanId",
|
|
21
|
+
"WithOpenTelemetryServiceName"
|
|
22
22
|
],
|
|
23
23
|
"Properties": {
|
|
24
24
|
"ApplicationName": "FTC-CLI"
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"Serilog": {
|
|
3
3
|
"Using": [
|
|
4
|
-
"Serilog.Sinks.Console"
|
|
5
|
-
"Serilog.Sinks.OpenTelemetry"
|
|
4
|
+
"Serilog.Sinks.Console"
|
|
6
5
|
],
|
|
7
6
|
"MinimumLevel": {
|
|
8
7
|
"Default": "Information",
|
|
@@ -18,7 +17,8 @@
|
|
|
18
17
|
"WithEnvironmentUserName",
|
|
19
18
|
"WithExceptionDetails",
|
|
20
19
|
"WithOpenTelemetryTraceId",
|
|
21
|
-
"WithOpenTelemetrySpanId"
|
|
20
|
+
"WithOpenTelemetrySpanId",
|
|
21
|
+
"WithOpenTelemetryServiceName"
|
|
22
22
|
],
|
|
23
23
|
"Properties": {
|
|
24
24
|
"ApplicationName": "FTC-CLI"
|
package/bin/linux-x64/ftc.cli
CHANGED
|
Binary file
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"Serilog": {
|
|
3
3
|
"Using": [
|
|
4
|
-
"Serilog.Sinks.Console"
|
|
5
|
-
"Serilog.Sinks.OpenTelemetry"
|
|
4
|
+
"Serilog.Sinks.Console"
|
|
6
5
|
],
|
|
7
6
|
"MinimumLevel": {
|
|
8
7
|
"Default": "Information",
|
|
@@ -18,7 +17,8 @@
|
|
|
18
17
|
"WithEnvironmentUserName",
|
|
19
18
|
"WithExceptionDetails",
|
|
20
19
|
"WithOpenTelemetryTraceId",
|
|
21
|
-
"WithOpenTelemetrySpanId"
|
|
20
|
+
"WithOpenTelemetrySpanId",
|
|
21
|
+
"WithOpenTelemetryServiceName"
|
|
22
22
|
],
|
|
23
23
|
"Properties": {
|
|
24
24
|
"ApplicationName": "FTC-CLI"
|
package/bin/osx-x64/ftc.cli
CHANGED
|
Binary file
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"Serilog": {
|
|
3
3
|
"Using": [
|
|
4
|
-
"Serilog.Sinks.Console"
|
|
5
|
-
"Serilog.Sinks.OpenTelemetry"
|
|
4
|
+
"Serilog.Sinks.Console"
|
|
6
5
|
],
|
|
7
6
|
"MinimumLevel": {
|
|
8
7
|
"Default": "Information",
|
|
@@ -18,7 +17,8 @@
|
|
|
18
17
|
"WithEnvironmentUserName",
|
|
19
18
|
"WithExceptionDetails",
|
|
20
19
|
"WithOpenTelemetryTraceId",
|
|
21
|
-
"WithOpenTelemetrySpanId"
|
|
20
|
+
"WithOpenTelemetrySpanId",
|
|
21
|
+
"WithOpenTelemetryServiceName"
|
|
22
22
|
],
|
|
23
23
|
"Properties": {
|
|
24
24
|
"ApplicationName": "FTC-CLI"
|
package/bin/win-x64/ftc.cli.exe
CHANGED
|
Binary file
|
package/package.json
CHANGED
package/TESTING_INSTALLATION.md
DELETED
|
@@ -1,344 +0,0 @@
|
|
|
1
|
-
# 🧪 Guia de Teste de Instalação - FTC CLI
|
|
2
|
-
|
|
3
|
-
Este guia explica como testar a instalação do FTC CLI antes de publicar uma nova versão.
|
|
4
|
-
|
|
5
|
-
## 🎯 Objetivo
|
|
6
|
-
|
|
7
|
-
Garantir que o CLI funcione corretamente em diferentes ambientes antes da publicação, evitando problemas para os usuários.
|
|
8
|
-
|
|
9
|
-
## 📋 Pré-requisitos
|
|
10
|
-
|
|
11
|
-
Antes de executar os testes, certifique-se de ter instalado:
|
|
12
|
-
|
|
13
|
-
- **Node.js** (versão 14 ou superior)
|
|
14
|
-
- **npm** (versão 6 ou superior)
|
|
15
|
-
- **.NET 8 SDK**
|
|
16
|
-
- **Docker** (opcional, para testes Docker)
|
|
17
|
-
- **Git** (para clonar repositórios de teste)
|
|
18
|
-
|
|
19
|
-
## 🚀 Testes Automatizados
|
|
20
|
-
|
|
21
|
-
### Windows (PowerShell)
|
|
22
|
-
|
|
23
|
-
```powershell
|
|
24
|
-
# Teste básico
|
|
25
|
-
npm run test-installation
|
|
26
|
-
|
|
27
|
-
# Teste com limpeza prévia
|
|
28
|
-
npm run test-installation:clean
|
|
29
|
-
|
|
30
|
-
# Teste com output detalhado
|
|
31
|
-
npm run test-installation:verbose
|
|
32
|
-
|
|
33
|
-
# Teste pulando build (útil para testes rápidos)
|
|
34
|
-
npm run test-installation:skip-build
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
### Linux/macOS (Bash)
|
|
38
|
-
|
|
39
|
-
```bash
|
|
40
|
-
# Teste básico
|
|
41
|
-
npm run test:install:linux
|
|
42
|
-
|
|
43
|
-
# Teste WSL
|
|
44
|
-
npm run test:install:wsl
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
### Execução Direta dos Scripts
|
|
48
|
-
|
|
49
|
-
#### Windows
|
|
50
|
-
```powershell
|
|
51
|
-
# Executar diretamente
|
|
52
|
-
.\scripts\test-installation.ps1
|
|
53
|
-
|
|
54
|
-
# Com parâmetros
|
|
55
|
-
.\scripts\test-installation.ps1 -Clean -Verbose
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
#### Linux/macOS
|
|
59
|
-
```bash
|
|
60
|
-
# Tornar executável (se necessário)
|
|
61
|
-
chmod +x scripts/test-installation.sh
|
|
62
|
-
|
|
63
|
-
# Executar diretamente
|
|
64
|
-
./scripts/test-installation.sh
|
|
65
|
-
|
|
66
|
-
# Com parâmetros
|
|
67
|
-
./scripts/test-installation.sh --clean
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
## 🧪 O que os Testes Verificam
|
|
71
|
-
|
|
72
|
-
### 1. **Pré-requisitos**
|
|
73
|
-
- ✅ Node.js instalado e funcionando
|
|
74
|
-
- ✅ npm instalado e funcionando
|
|
75
|
-
- ✅ .NET SDK instalado e funcionando
|
|
76
|
-
|
|
77
|
-
### 2. **Build do Projeto**
|
|
78
|
-
- ✅ Compilação em modo Release
|
|
79
|
-
- ✅ Publicação para diferentes plataformas
|
|
80
|
-
- ✅ Geração de binários executáveis
|
|
81
|
-
|
|
82
|
-
### 3. **Package NPM**
|
|
83
|
-
- ✅ package.json válido
|
|
84
|
-
- ✅ Dependências instaladas
|
|
85
|
-
- ✅ Scripts npm funcionando
|
|
86
|
-
- ✅ Build para Windows/Linux/macOS
|
|
87
|
-
|
|
88
|
-
### 4. **Instalação Local**
|
|
89
|
-
- ✅ Binários criados corretamente
|
|
90
|
-
- ✅ Wrapper Node.js funcionando
|
|
91
|
-
- ✅ Executável .NET funcionando
|
|
92
|
-
- ✅ Arquivos de configuração presentes
|
|
93
|
-
|
|
94
|
-
### 5. **Instalação Global Simulada**
|
|
95
|
-
- ✅ Instalação em diretório temporário
|
|
96
|
-
- ✅ Binários instalados corretamente
|
|
97
|
-
- ✅ CLI executável globalmente
|
|
98
|
-
- ✅ Permissões configuradas
|
|
99
|
-
|
|
100
|
-
### 6. **Docker**
|
|
101
|
-
- ✅ Build da imagem Docker
|
|
102
|
-
- ✅ Execução do container
|
|
103
|
-
- ✅ CLI funcionando no Docker
|
|
104
|
-
- ✅ Limpeza da imagem de teste
|
|
105
|
-
|
|
106
|
-
### 7. **Funcionalidades Básicas**
|
|
107
|
-
- ✅ Comando de ajuda funcionando
|
|
108
|
-
- ✅ Análise de repositório (se disponível)
|
|
109
|
-
- ✅ Tratamento de erros
|
|
110
|
-
|
|
111
|
-
## 📊 Interpretando os Resultados
|
|
112
|
-
|
|
113
|
-
### ✅ Todos os Testes Passaram
|
|
114
|
-
```
|
|
115
|
-
🎉 Todos os testes passaram! CLI está pronto para publicação.
|
|
116
|
-
💡 Próximos passos:
|
|
117
|
-
1. npm version patch|minor|major
|
|
118
|
-
2. npm publish
|
|
119
|
-
3. git push --tags
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
### ❌ Alguns Testes Falharam
|
|
123
|
-
```
|
|
124
|
-
❌ Alguns testes falharam. Corrija os problemas antes de publicar.
|
|
125
|
-
💡 Verifique os logs acima para identificar os problemas.
|
|
126
|
-
```
|
|
127
|
-
|
|
128
|
-
## 🔧 Solução de Problemas Comuns
|
|
129
|
-
|
|
130
|
-
### Build Falhou
|
|
131
|
-
```bash
|
|
132
|
-
# Verificar versão do .NET
|
|
133
|
-
dotnet --version
|
|
134
|
-
|
|
135
|
-
# Limpar cache
|
|
136
|
-
dotnet clean
|
|
137
|
-
dotnet restore
|
|
138
|
-
|
|
139
|
-
# Tentar build novamente
|
|
140
|
-
dotnet build --configuration Release
|
|
141
|
-
```
|
|
142
|
-
|
|
143
|
-
### NPM Scripts Falharam
|
|
144
|
-
```bash
|
|
145
|
-
# Limpar node_modules
|
|
146
|
-
rm -rf node_modules package-lock.json
|
|
147
|
-
|
|
148
|
-
# Reinstalar dependências
|
|
149
|
-
npm install
|
|
150
|
-
|
|
151
|
-
# Verificar scripts
|
|
152
|
-
npm run build:win
|
|
153
|
-
```
|
|
154
|
-
|
|
155
|
-
### Docker Falhou
|
|
156
|
-
```bash
|
|
157
|
-
# Verificar se Docker está rodando
|
|
158
|
-
docker --version
|
|
159
|
-
docker ps
|
|
160
|
-
|
|
161
|
-
# Limpar imagens antigas
|
|
162
|
-
docker system prune -f
|
|
163
|
-
|
|
164
|
-
# Tentar build novamente
|
|
165
|
-
docker build -t ftc:test .
|
|
166
|
-
```
|
|
167
|
-
|
|
168
|
-
### Permissões no Linux/macOS
|
|
169
|
-
```bash
|
|
170
|
-
# Definir permissões manualmente
|
|
171
|
-
chmod +x bin/ftc
|
|
172
|
-
chmod +x bin/linux-x64/ftc.cli
|
|
173
|
-
|
|
174
|
-
# Verificar permissões
|
|
175
|
-
ls -la bin/
|
|
176
|
-
```
|
|
177
|
-
|
|
178
|
-
## 🧪 Testes Manuais Adicionais
|
|
179
|
-
|
|
180
|
-
### 1. **Teste com Repositório Real**
|
|
181
|
-
|
|
182
|
-
Crie um repositório de teste:
|
|
183
|
-
|
|
184
|
-
```bash
|
|
185
|
-
# Criar repositório de teste
|
|
186
|
-
mkdir test-repo
|
|
187
|
-
cd test-repo
|
|
188
|
-
git init
|
|
189
|
-
echo "# Test Repository" > README.md
|
|
190
|
-
git add README.md
|
|
191
|
-
git commit -m "Initial commit"
|
|
192
|
-
cd ..
|
|
193
|
-
```
|
|
194
|
-
|
|
195
|
-
Execute o CLI:
|
|
196
|
-
|
|
197
|
-
```bash
|
|
198
|
-
# Testar análise
|
|
199
|
-
bin/ftc collect code ./test-repo --json
|
|
200
|
-
|
|
201
|
-
# Testar com filtros
|
|
202
|
-
bin/ftc collect code ./test-repo --startDate 2024-01-01 --json
|
|
203
|
-
|
|
204
|
-
# Testar exportação
|
|
205
|
-
bin/ftc collect code ./test-repo --csv --export local:./resultado.csv
|
|
206
|
-
```
|
|
207
|
-
|
|
208
|
-
### 2. **Teste com Repositório Remoto**
|
|
209
|
-
|
|
210
|
-
```bash
|
|
211
|
-
# Testar com GitHub
|
|
212
|
-
bin/ftc collect code https://github.com/microsoft/vscode.git --json
|
|
213
|
-
|
|
214
|
-
# Testar com filtros
|
|
215
|
-
bin/ftc collect code https://github.com/microsoft/vscode.git --startDate 2024-01-01 --endDate 2024-12-31 --json
|
|
216
|
-
```
|
|
217
|
-
|
|
218
|
-
### 3. **Teste de Instalação Global Real**
|
|
219
|
-
|
|
220
|
-
```bash
|
|
221
|
-
# Instalar globalmente (em ambiente de teste)
|
|
222
|
-
npm install -g .
|
|
223
|
-
|
|
224
|
-
# Verificar instalação
|
|
225
|
-
ftc --version
|
|
226
|
-
ftc --help
|
|
227
|
-
|
|
228
|
-
# Testar funcionalidade
|
|
229
|
-
ftc collect code ./test-repo --json
|
|
230
|
-
|
|
231
|
-
# Desinstalar
|
|
232
|
-
npm uninstall -g @followthecode/cli
|
|
233
|
-
```
|
|
234
|
-
|
|
235
|
-
### 4. **Teste de Docker Real**
|
|
236
|
-
|
|
237
|
-
```bash
|
|
238
|
-
# Build da imagem
|
|
239
|
-
docker build -t ftc:latest .
|
|
240
|
-
|
|
241
|
-
# Testar com repositório local
|
|
242
|
-
docker run --rm -v "$PWD:/repo" ftc:latest collect code "/repo/test-repo" --json
|
|
243
|
-
|
|
244
|
-
# Testar com repositório remoto
|
|
245
|
-
docker run --rm ftc:latest collect code "https://github.com/microsoft/vscode.git" --json
|
|
246
|
-
```
|
|
247
|
-
|
|
248
|
-
## 🔄 Workflow de Teste Completo
|
|
249
|
-
|
|
250
|
-
### 1. **Preparação**
|
|
251
|
-
```bash
|
|
252
|
-
# Limpar builds anteriores
|
|
253
|
-
npm run clean
|
|
254
|
-
rm -rf bin/ node_modules/
|
|
255
|
-
|
|
256
|
-
# Instalar dependências
|
|
257
|
-
npm install
|
|
258
|
-
```
|
|
259
|
-
|
|
260
|
-
### 2. **Testes Automatizados**
|
|
261
|
-
```bash
|
|
262
|
-
# Windows
|
|
263
|
-
npm run test-installation:clean
|
|
264
|
-
|
|
265
|
-
# Linux/macOS
|
|
266
|
-
npm run test-installation:linux:clean
|
|
267
|
-
```
|
|
268
|
-
|
|
269
|
-
### 3. **Testes Manuais**
|
|
270
|
-
```bash
|
|
271
|
-
# Criar repositório de teste
|
|
272
|
-
mkdir test-repo && cd test-repo
|
|
273
|
-
git init && echo "# Test" > README.md
|
|
274
|
-
git add . && git commit -m "Initial"
|
|
275
|
-
cd ..
|
|
276
|
-
|
|
277
|
-
# Testar funcionalidades
|
|
278
|
-
bin/ftc collect code ./test-repo --json
|
|
279
|
-
bin/ftc collect code ./test-repo --csv
|
|
280
|
-
bin/ftc collect code https://github.com/microsoft/vscode.git --json
|
|
281
|
-
```
|
|
282
|
-
|
|
283
|
-
### 4. **Teste de Instalação Global**
|
|
284
|
-
```bash
|
|
285
|
-
# Instalar globalmente
|
|
286
|
-
npm install -g .
|
|
287
|
-
|
|
288
|
-
# Testar
|
|
289
|
-
ftc --version
|
|
290
|
-
ftc collect code ./test-repo --json
|
|
291
|
-
|
|
292
|
-
# Desinstalar
|
|
293
|
-
npm uninstall -g @followthecode/cli
|
|
294
|
-
```
|
|
295
|
-
|
|
296
|
-
### 5. **Teste Docker**
|
|
297
|
-
```bash
|
|
298
|
-
# Build e teste
|
|
299
|
-
docker build -t ftc:test .
|
|
300
|
-
docker run --rm ftc:test --help
|
|
301
|
-
docker run --rm -v "$PWD:/repo" ftc:test collect code "/repo/test-repo" --json
|
|
302
|
-
docker rmi ftc:test
|
|
303
|
-
```
|
|
304
|
-
|
|
305
|
-
## 📝 Checklist de Publicação
|
|
306
|
-
|
|
307
|
-
Antes de publicar, confirme que:
|
|
308
|
-
|
|
309
|
-
- [ ] Todos os testes automatizados passaram
|
|
310
|
-
- [ ] Testes manuais com repositório real funcionaram
|
|
311
|
-
- [ ] Instalação global funciona corretamente
|
|
312
|
-
- [ ] Docker build e execução funcionam
|
|
313
|
-
- [ ] Versão no package.json foi atualizada
|
|
314
|
-
- [ ] Changelog foi atualizado
|
|
315
|
-
- [ ] Documentação está atualizada
|
|
316
|
-
- [ ] Commits foram feitos e tags criadas
|
|
317
|
-
|
|
318
|
-
## 🚨 Problemas Conhecidos
|
|
319
|
-
|
|
320
|
-
### Windows
|
|
321
|
-
- **Problema**: Scripts PowerShell podem ser bloqueados
|
|
322
|
-
- **Solução**: Executar `Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser`
|
|
323
|
-
|
|
324
|
-
### Linux/macOS
|
|
325
|
-
- **Problema**: Permissões de execução não definidas
|
|
326
|
-
- **Solução**: Executar `chmod +x scripts/test-installation.sh`
|
|
327
|
-
|
|
328
|
-
### Docker
|
|
329
|
-
- **Problema**: Imagens antigas podem causar conflitos
|
|
330
|
-
- **Solução**: Executar `docker system prune -f` antes dos testes
|
|
331
|
-
|
|
332
|
-
## 📞 Suporte
|
|
333
|
-
|
|
334
|
-
Se encontrar problemas durante os testes:
|
|
335
|
-
|
|
336
|
-
1. **Verificar logs** detalhados com `-Verbose`
|
|
337
|
-
2. **Executar testes individuais** para isolar problemas
|
|
338
|
-
3. **Verificar pré-requisitos** e versões
|
|
339
|
-
4. **Consultar troubleshooting** em `TROUBLESHOOTING_INSTALL.md`
|
|
340
|
-
5. **Reportar issues** com logs completos
|
|
341
|
-
|
|
342
|
-
---
|
|
343
|
-
|
|
344
|
-
**💡 Dica**: Execute os testes em um ambiente limpo (máquina virtual ou container) para simular a experiência real do usuário.
|