@followthecode/cli 1.0.7 → 1.1.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/bin/ftc.js +28 -5
- package/bin/linux-x64/ftc.cli +0 -0
- package/bin/osx-x64/ftc.cli +0 -0
- package/bin/win-x64/ftc.cli.exe +0 -0
- package/package.json +8 -4
- package/bin/publish/appsettings.json +0 -51
- package/bin/publish/ftc.cli.exe +0 -0
package/bin/ftc.js
CHANGED
|
@@ -2,9 +2,30 @@
|
|
|
2
2
|
|
|
3
3
|
const { spawn } = require('child_process');
|
|
4
4
|
const path = require('path');
|
|
5
|
+
const fs = require('fs');
|
|
6
|
+
|
|
7
|
+
// Detecta a plataforma e arquitetura
|
|
8
|
+
const platform = process.platform;
|
|
9
|
+
const arch = process.arch;
|
|
10
|
+
|
|
11
|
+
// Mapeia a plataforma para o diretório correto
|
|
12
|
+
const platformMap = {
|
|
13
|
+
'win32': 'win-x64',
|
|
14
|
+
'darwin': 'osx-x64', // macOS
|
|
15
|
+
'linux': 'linux-x64'
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
// Obtém o diretório da plataforma
|
|
19
|
+
const platformDir = platformMap[platform];
|
|
20
|
+
if (!platformDir) {
|
|
21
|
+
console.error('❌ Plataforma não suportada:', platform);
|
|
22
|
+
console.error('💡 Plataformas suportadas: Windows, macOS, Linux');
|
|
23
|
+
process.exit(1);
|
|
24
|
+
}
|
|
5
25
|
|
|
6
|
-
//
|
|
7
|
-
const
|
|
26
|
+
// Define o nome do executável baseado na plataforma
|
|
27
|
+
const executableName = platform === 'win32' ? 'ftc.cli.exe' : 'ftc.cli';
|
|
28
|
+
const executablePath = path.join(__dirname, platformDir, executableName);
|
|
8
29
|
|
|
9
30
|
// Argumentos passados para o comando
|
|
10
31
|
const args = process.argv.slice(2);
|
|
@@ -38,6 +59,9 @@ if (args.length === 0 || args.includes('--help') || args.includes('-h')) {
|
|
|
38
59
|
--help, -h Mostra esta ajuda
|
|
39
60
|
--version, -v Mostra a versão
|
|
40
61
|
|
|
62
|
+
🌍 PLATAFORMAS SUPORTADAS:
|
|
63
|
+
Windows (x64), macOS (x64), Linux (x64)
|
|
64
|
+
|
|
41
65
|
📚 MAIS INFORMAÇÕES:
|
|
42
66
|
Visite: https://github.com/your-org/follow-the-code
|
|
43
67
|
`);
|
|
@@ -45,10 +69,9 @@ if (args.length === 0 || args.includes('--help') || args.includes('-h')) {
|
|
|
45
69
|
}
|
|
46
70
|
|
|
47
71
|
// Verifica se o executável existe
|
|
48
|
-
const fs = require('fs');
|
|
49
72
|
if (!fs.existsSync(executablePath)) {
|
|
50
|
-
console.error('❌ Erro: Executável .NET não encontrado em:', executablePath);
|
|
51
|
-
console.error('💡 Certifique-se de que o projeto foi compilado
|
|
73
|
+
console.error('❌ Erro: Executável .NET não encontrado para', platform, 'em:', executablePath);
|
|
74
|
+
console.error('💡 Certifique-se de que o projeto foi compilado para todas as plataformas.');
|
|
52
75
|
process.exit(1);
|
|
53
76
|
}
|
|
54
77
|
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@followthecode/cli",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "CLI tool for Git repository analysis and data collection",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -12,7 +12,10 @@
|
|
|
12
12
|
},
|
|
13
13
|
"scripts": {
|
|
14
14
|
"prepublishOnly": "npm run build",
|
|
15
|
-
"build": "
|
|
15
|
+
"build": "npm run build:win && npm run build:mac && npm run build:linux",
|
|
16
|
+
"build:win": "dotnet publish ftc.cli.csproj -c Release -r win-x64 --self-contained true /p:PublishSingleFile=true -o ./bin/win-x64",
|
|
17
|
+
"build:mac": "dotnet publish ftc.cli.csproj -c Release -r osx-x64 --self-contained true /p:PublishSingleFile=true -o ./bin/osx-x64",
|
|
18
|
+
"build:linux": "dotnet publish ftc.cli.csproj -c Release -r linux-x64 --self-contained true /p:PublishSingleFile=true -o ./bin/linux-x64",
|
|
16
19
|
"test": "dotnet test",
|
|
17
20
|
"clean": "dotnet clean",
|
|
18
21
|
"publish:patch": "node scripts/publish.js --patch",
|
|
@@ -54,8 +57,9 @@
|
|
|
54
57
|
],
|
|
55
58
|
"files": [
|
|
56
59
|
"bin/ftc.js",
|
|
57
|
-
"bin/
|
|
58
|
-
"bin/
|
|
60
|
+
"bin/win-x64/ftc.cli.exe",
|
|
61
|
+
"bin/osx-x64/ftc.cli",
|
|
62
|
+
"bin/linux-x64/ftc.cli",
|
|
59
63
|
"README.md",
|
|
60
64
|
"LICENSE"
|
|
61
65
|
],
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"Serilog": {
|
|
3
|
-
"MinimumLevel": {
|
|
4
|
-
"Default": "Information",
|
|
5
|
-
"Override": {
|
|
6
|
-
"Microsoft": "Warning",
|
|
7
|
-
"System": "Warning"
|
|
8
|
-
}
|
|
9
|
-
},
|
|
10
|
-
"Enrich": [
|
|
11
|
-
"FromLogContext",
|
|
12
|
-
"WithThreadId",
|
|
13
|
-
"WithMachineName",
|
|
14
|
-
"WithEnvironmentUserName",
|
|
15
|
-
"WithExceptionDetails",
|
|
16
|
-
"WithOpenTelemetryTraceId",
|
|
17
|
-
"WithOpenTelemetrySpanId"
|
|
18
|
-
],
|
|
19
|
-
"Properties": {
|
|
20
|
-
"ApplicationName": "FTC-CLI"
|
|
21
|
-
},
|
|
22
|
-
"WriteTo": [
|
|
23
|
-
{
|
|
24
|
-
"Name": "Console",
|
|
25
|
-
"Args": {
|
|
26
|
-
"outputTemplate": "[{Timestamp:HH:mm:ss} {Level:u3}] [{ThreadId}] [{TraceId}/{SpanId}] {Message:lj}{NewLine}{Exception}"
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
"Name": "OpenTelemetry",
|
|
31
|
-
"Args": {
|
|
32
|
-
"endpoint": "http://10.0.17.241:4317",
|
|
33
|
-
"protocol": "Grpc",
|
|
34
|
-
"timeout": 1000,
|
|
35
|
-
"batchSizeLimit": 10,
|
|
36
|
-
"period": 1
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
]
|
|
40
|
-
},
|
|
41
|
-
"OpenTelemetry": {
|
|
42
|
-
"ServiceName": "ftc.cli",
|
|
43
|
-
"OtlpEndpoint": "http://10.0.17.241:4317"
|
|
44
|
-
},
|
|
45
|
-
"AWS": {
|
|
46
|
-
"Region": "us-east-1",
|
|
47
|
-
"S3": {
|
|
48
|
-
"BucketName": "ftc-analyzer"
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
}
|
package/bin/publish/ftc.cli.exe
DELETED
|
Binary file
|