trello-cli-unofficial 0.9.1 → 0.9.3
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/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
## [0.9.3](https://github.com/JaegerCaiser/trello-cli-unofficial/compare/v0.9.2...v0.9.3) (2025-11-14)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* make check-dependencies script Windows-compatible ([358fb98](https://github.com/JaegerCaiser/trello-cli-unofficial/commit/358fb9816045aef97631a257ab7a8d1dcfa4aea8))
|
|
7
|
+
|
|
8
|
+
## [0.9.2](https://github.com/JaegerCaiser/trello-cli-unofficial/compare/v0.9.1...v0.9.2) (2025-11-14)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* add automatic Bun dependency check during installation ([362f68b](https://github.com/JaegerCaiser/trello-cli-unofficial/commit/362f68bb26d330617da2bd7194e7ed0ee273d312))
|
|
14
|
+
* add eslint --fix to lint-staged ([17c0d98](https://github.com/JaegerCaiser/trello-cli-unofficial/commit/17c0d9856d044b7a83606951e0a5a995f2b6b619))
|
|
15
|
+
* add NPM_TOKEN to semantic-release workflow ([9c93a67](https://github.com/JaegerCaiser/trello-cli-unofficial/commit/9c93a678a0c46ea8a6697e05b3b38d38e756e140))
|
|
16
|
+
|
|
1
17
|
# Changelog
|
|
2
18
|
|
|
3
19
|
All notable changes to this project will be documented in this file.
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "trello-cli-unofficial",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.9.
|
|
4
|
+
"version": "0.9.3",
|
|
5
5
|
"private": false,
|
|
6
6
|
"description": "Unofficial Trello CLI using Power-Up authentication, built with Bun for maximum performance",
|
|
7
7
|
"author": "Matheus Caiser <matheus.kaiser@gmail.com> (https://www.mrdeveloper.com.br/)",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"version:minor": "bun version minor && git push --follow-tags",
|
|
71
71
|
"version:major": "bun version major && git push --follow-tags",
|
|
72
72
|
"prepublishOnly": "bun run validate && bun run build",
|
|
73
|
-
"postinstall": "
|
|
73
|
+
"postinstall": "node scripts/check-dependencies.js"
|
|
74
74
|
},
|
|
75
75
|
"peerDependencies": {
|
|
76
76
|
"typescript": "^5"
|
|
@@ -104,6 +104,7 @@
|
|
|
104
104
|
},
|
|
105
105
|
"lint-staged": {
|
|
106
106
|
"*.{js,ts,tsx}": [
|
|
107
|
+
"eslint --fix",
|
|
107
108
|
"eslint --max-warnings 0"
|
|
108
109
|
],
|
|
109
110
|
"*.json": [
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/* eslint-disable node/prefer-global/process */
|
|
4
|
+
/* eslint-disable unused-imports/no-unused-vars */
|
|
5
|
+
|
|
6
|
+
import { execSync } from 'node:child_process';
|
|
7
|
+
import os from 'node:os';
|
|
8
|
+
|
|
9
|
+
// Detect language from environment
|
|
10
|
+
function detectLanguage() {
|
|
11
|
+
const langVars = ['LANG', 'LANGUAGE', 'LC_ALL', 'LC_MESSAGES'];
|
|
12
|
+
for (const varName of langVars) {
|
|
13
|
+
const value = process.env[varName];
|
|
14
|
+
if (value && value.toLowerCase().includes('pt')) {
|
|
15
|
+
return 'pt';
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
return 'en';
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const lang = detectLanguage();
|
|
22
|
+
|
|
23
|
+
// Messages in both languages
|
|
24
|
+
const messages = {
|
|
25
|
+
pt: {
|
|
26
|
+
checking: '🔍 Verificando dependências do Trello CLI Unofficial...',
|
|
27
|
+
bunFound: '✅ Bun encontrado:',
|
|
28
|
+
bunNotFound: '❌ Bun NÃO encontrado!',
|
|
29
|
+
bunRequired: '📦 O Trello CLI Unofficial requer Bun para funcionar corretamente.',
|
|
30
|
+
bunBenefit: ' Bun oferece performance 10-50x superior ao Node.js para este projeto.',
|
|
31
|
+
installPrompt: '🔧 Deseja instalar o Bun agora? (Y/n): ',
|
|
32
|
+
installing: '🚀 Instalando Bun...',
|
|
33
|
+
installSuccess: '✅ Bun instalado com sucesso!',
|
|
34
|
+
version: ' Versão:',
|
|
35
|
+
installFailed: '❌ Falha ao instalar Bun. Verifique sua conexão e tente novamente.',
|
|
36
|
+
cancelled: '❌ Instalação cancelada.',
|
|
37
|
+
manualInstall: '💡 Para instalar manualmente:',
|
|
38
|
+
manualCommand: os.platform() === 'win32'
|
|
39
|
+
? ' powershell -c "irm bun.sh/install.ps1 | iex"'
|
|
40
|
+
: ' curl -fsSL https://bun.sh/install | bash',
|
|
41
|
+
retry: '🔄 Depois execute: npm install -g trello-cli-unofficial',
|
|
42
|
+
success: '🎉 Todas as dependências verificadas com sucesso!',
|
|
43
|
+
},
|
|
44
|
+
en: {
|
|
45
|
+
checking: '🔍 Checking Trello CLI Unofficial dependencies...',
|
|
46
|
+
bunFound: '✅ Bun found:',
|
|
47
|
+
bunNotFound: '❌ Bun NOT found!',
|
|
48
|
+
bunRequired: '📦 Trello CLI Unofficial requires Bun to work correctly.',
|
|
49
|
+
bunBenefit: ' Bun offers 10-50x better performance than Node.js for this project.',
|
|
50
|
+
installPrompt: '🔧 Do you want to install Bun now? (Y/n): ',
|
|
51
|
+
installing: '🚀 Installing Bun...',
|
|
52
|
+
installSuccess: '✅ Bun installed successfully!',
|
|
53
|
+
version: ' Version:',
|
|
54
|
+
installFailed: '❌ Failed to install Bun. Check your connection and try again.',
|
|
55
|
+
cancelled: '❌ Installation cancelled.',
|
|
56
|
+
manualInstall: '💡 To install manually:',
|
|
57
|
+
manualCommand: os.platform() === 'win32'
|
|
58
|
+
? ' powershell -c "irm bun.sh/install.ps1 | iex"'
|
|
59
|
+
: ' curl -fsSL https://bun.sh/install | bash',
|
|
60
|
+
retry: '🔄 Then run: npm install -g trello-cli-unofficial',
|
|
61
|
+
success: '🎉 All dependencies checked successfully!',
|
|
62
|
+
},
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
const msg = messages[lang];
|
|
66
|
+
|
|
67
|
+
console.log(msg.checking);
|
|
68
|
+
console.log('');
|
|
69
|
+
|
|
70
|
+
// Check if Bun is installed
|
|
71
|
+
function isBunInstalled() {
|
|
72
|
+
try {
|
|
73
|
+
const result = execSync('bun --version', { stdio: 'pipe' });
|
|
74
|
+
return result.toString().trim();
|
|
75
|
+
}
|
|
76
|
+
catch (error) {
|
|
77
|
+
return false;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
const bunVersion = isBunInstalled();
|
|
82
|
+
|
|
83
|
+
if (bunVersion) {
|
|
84
|
+
console.log(`${msg.bunFound} ${bunVersion}`);
|
|
85
|
+
}
|
|
86
|
+
else {
|
|
87
|
+
console.log(msg.bunNotFound);
|
|
88
|
+
console.log('');
|
|
89
|
+
console.log(msg.bunRequired);
|
|
90
|
+
console.log(msg.bunBenefit);
|
|
91
|
+
console.log('');
|
|
92
|
+
|
|
93
|
+
// Check if we're in an interactive environment
|
|
94
|
+
const isInteractive = process.stdout.isTTY && process.stdin.isTTY;
|
|
95
|
+
const isCI = process.env.CI || process.env.CONTINUOUS_INTEGRATION;
|
|
96
|
+
|
|
97
|
+
if (!isInteractive || isCI) {
|
|
98
|
+
console.log(msg.nonInteractiveInstall);
|
|
99
|
+
console.log(msg.installing);
|
|
100
|
+
|
|
101
|
+
try {
|
|
102
|
+
// Auto-install Bun in non-interactive environments
|
|
103
|
+
const platform = os.platform();
|
|
104
|
+
let installCommand;
|
|
105
|
+
|
|
106
|
+
if (platform === 'win32') {
|
|
107
|
+
// Windows - use PowerShell (non-interactive)
|
|
108
|
+
installCommand = 'powershell -Command "try { irm bun.sh/install.ps1 | iex } catch { Write-Host \'Failed to install Bun. Please install manually from https://bun.sh\' }"';
|
|
109
|
+
}
|
|
110
|
+
else {
|
|
111
|
+
// Unix-like systems (non-interactive)
|
|
112
|
+
installCommand = 'curl -fsSL https://bun.sh/install | bash || echo "Failed to install Bun. Please install manually from https://bun.sh"';
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
console.log(`Running: ${installCommand}`);
|
|
116
|
+
execSync(installCommand, { stdio: 'inherit', timeout: 30000 });
|
|
117
|
+
console.log(msg.installSuccess);
|
|
118
|
+
|
|
119
|
+
// Check if installation was successful
|
|
120
|
+
const newBunVersion = isBunInstalled();
|
|
121
|
+
if (newBunVersion) {
|
|
122
|
+
console.log(`${msg.version} ${newBunVersion}`);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
console.log('');
|
|
126
|
+
console.log(msg.success);
|
|
127
|
+
process.exit(0);
|
|
128
|
+
}
|
|
129
|
+
catch (error) {
|
|
130
|
+
console.log(msg.installFailed);
|
|
131
|
+
console.log('Please install Bun manually from https://bun.sh');
|
|
132
|
+
process.exit(1);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
// Interactive mode - ask user
|
|
137
|
+
console.log(msg.installPrompt);
|
|
138
|
+
|
|
139
|
+
// Use readline for cross-platform input
|
|
140
|
+
const readline = require('node:readline');
|
|
141
|
+
const rl = readline.createInterface({
|
|
142
|
+
input: process.stdin,
|
|
143
|
+
output: process.stdout,
|
|
144
|
+
});
|
|
145
|
+
|
|
146
|
+
rl.question('', (answer) => {
|
|
147
|
+
rl.close();
|
|
148
|
+
|
|
149
|
+
const normalizedAnswer = answer.toString().toLowerCase().trim();
|
|
150
|
+
|
|
151
|
+
if (normalizedAnswer === 'y' || normalizedAnswer === 'yes' || normalizedAnswer === '') {
|
|
152
|
+
console.log(msg.installing);
|
|
153
|
+
|
|
154
|
+
try {
|
|
155
|
+
// Install Bun based on platform
|
|
156
|
+
const platform = os.platform();
|
|
157
|
+
let installCommand;
|
|
158
|
+
|
|
159
|
+
if (platform === 'win32') {
|
|
160
|
+
// Windows - use PowerShell
|
|
161
|
+
installCommand = 'powershell -c "irm bun.sh/install.ps1 | iex"';
|
|
162
|
+
}
|
|
163
|
+
else {
|
|
164
|
+
// Unix-like systems
|
|
165
|
+
installCommand = 'curl -fsSL https://bun.sh/install | bash';
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
execSync(installCommand, { stdio: 'inherit' });
|
|
169
|
+
|
|
170
|
+
// Check if installation was successful
|
|
171
|
+
const newBunVersion = isBunInstalled();
|
|
172
|
+
if (newBunVersion) {
|
|
173
|
+
console.log(msg.installSuccess);
|
|
174
|
+
console.log(`${msg.version} ${newBunVersion}`);
|
|
175
|
+
}
|
|
176
|
+
else {
|
|
177
|
+
console.log(msg.installFailed);
|
|
178
|
+
process.exit(1);
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
catch (error) {
|
|
182
|
+
console.log(msg.installFailed);
|
|
183
|
+
process.exit(1);
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
else {
|
|
187
|
+
console.log(msg.cancelled);
|
|
188
|
+
console.log('');
|
|
189
|
+
console.log(msg.manualInstall);
|
|
190
|
+
console.log(msg.manualCommand);
|
|
191
|
+
console.log('');
|
|
192
|
+
console.log(msg.retry);
|
|
193
|
+
process.exit(1);
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
console.log('');
|
|
197
|
+
console.log(msg.success);
|
|
198
|
+
});
|
|
199
|
+
}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
set -e
|
|
3
|
+
|
|
4
|
+
# Detect language from environment or system locale
|
|
5
|
+
detect_language() {
|
|
6
|
+
# Check for explicit LANG env var
|
|
7
|
+
if [[ "${LANG:-}" == *"pt"* ]] || [[ "${LANGUAGE:-}" == *"pt"* ]]; then
|
|
8
|
+
echo "pt"
|
|
9
|
+
elif [[ "${LC_ALL:-}" == *"pt"* ]] || [[ "${LC_MESSAGES:-}" == *"pt"* ]]; then
|
|
10
|
+
echo "pt"
|
|
11
|
+
else
|
|
12
|
+
echo "en"
|
|
13
|
+
fi
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
LANG=$(detect_language)
|
|
17
|
+
|
|
18
|
+
# Messages in both languages
|
|
19
|
+
if [[ "$LANG" == "pt" ]]; then
|
|
20
|
+
MSG_CHECKING="🔍 Verificando dependências do Trello CLI Unofficial..."
|
|
21
|
+
MSG_BUN_FOUND="✅ Bun encontrado:"
|
|
22
|
+
MSG_BUN_NOT_FOUND="❌ Bun NÃO encontrado!"
|
|
23
|
+
MSG_BUN_REQUIRED="📦 O Trello CLI Unofficial requer Bun para funcionar corretamente."
|
|
24
|
+
MSG_BUN_BENEFIT=" Bun oferece performance 10-50x superior ao Node.js para este projeto."
|
|
25
|
+
MSG_INSTALL_PROMPT="🔧 Deseja instalar o Bun agora? (Y/n): "
|
|
26
|
+
MSG_INSTALLING="🚀 Instalando Bun..."
|
|
27
|
+
MSG_INSTALL_SUCCESS="✅ Bun instalado com sucesso!"
|
|
28
|
+
MSG_VERSION=" Versão:"
|
|
29
|
+
MSG_INSTALL_FAILED="❌ Falha ao instalar Bun. Verifique sua conexão e tente novamente."
|
|
30
|
+
MSG_CANCELLED="❌ Instalação cancelada."
|
|
31
|
+
MSG_MANUAL_INSTALL="💡 Para instalar manualmente:"
|
|
32
|
+
MSG_MANUAL_COMMAND=" curl -fsSL https://bun.sh/install | bash"
|
|
33
|
+
MSG_RETRY="🔄 Depois execute: npm install -g trello-cli-unofficial"
|
|
34
|
+
MSG_SUCCESS="🎉 Todas as dependências verificadas com sucesso!"
|
|
35
|
+
else
|
|
36
|
+
MSG_CHECKING="🔍 Checking Trello CLI Unofficial dependencies..."
|
|
37
|
+
MSG_BUN_FOUND="✅ Bun found:"
|
|
38
|
+
MSG_BUN_NOT_FOUND="❌ Bun NOT found!"
|
|
39
|
+
MSG_BUN_REQUIRED="📦 Trello CLI Unofficial requires Bun to work correctly."
|
|
40
|
+
MSG_BUN_BENEFIT=" Bun offers 10-50x better performance than Node.js for this project."
|
|
41
|
+
MSG_INSTALL_PROMPT="🔧 Do you want to install Bun now? (Y/n): "
|
|
42
|
+
MSG_INSTALLING="🚀 Installing Bun..."
|
|
43
|
+
MSG_INSTALL_SUCCESS="✅ Bun installed successfully!"
|
|
44
|
+
MSG_VERSION=" Version:"
|
|
45
|
+
MSG_INSTALL_FAILED="❌ Failed to install Bun. Check your connection and try again."
|
|
46
|
+
MSG_CANCELLED="❌ Installation cancelled."
|
|
47
|
+
MSG_MANUAL_INSTALL="💡 To install manually:"
|
|
48
|
+
MSG_MANUAL_COMMAND=" curl -fsSL https://bun.sh/install | bash"
|
|
49
|
+
MSG_RETRY="🔄 Then run: npm install -g trello-cli-unofficial"
|
|
50
|
+
MSG_SUCCESS="🎉 All dependencies checked successfully!"
|
|
51
|
+
fi
|
|
52
|
+
|
|
53
|
+
echo "$MSG_CHECKING"
|
|
54
|
+
echo ""
|
|
55
|
+
|
|
56
|
+
# Check if Bun is installed
|
|
57
|
+
if command -v bun &> /dev/null; then
|
|
58
|
+
echo "$MSG_BUN_FOUND $(bun --version)"
|
|
59
|
+
else
|
|
60
|
+
echo "$MSG_BUN_NOT_FOUND"
|
|
61
|
+
echo ""
|
|
62
|
+
echo "$MSG_BUN_REQUIRED"
|
|
63
|
+
echo "$MSG_BUN_BENEFIT"
|
|
64
|
+
echo ""
|
|
65
|
+
|
|
66
|
+
# Read user input with timeout and default
|
|
67
|
+
read -p "$MSG_INSTALL_PROMPT" -n 1 -r -t 30 REPLY || REPLY="y"
|
|
68
|
+
echo ""
|
|
69
|
+
|
|
70
|
+
if [[ $REPLY =~ ^[Yy]$ ]] || [[ -z $REPLY ]]; then
|
|
71
|
+
echo "$MSG_INSTALLING"
|
|
72
|
+
if curl -fsSL https://bun.sh/install | bash; then
|
|
73
|
+
# Add Bun to PATH for current session
|
|
74
|
+
export PATH="$HOME/.bun/bin:$PATH"
|
|
75
|
+
|
|
76
|
+
if command -v bun &> /dev/null; then
|
|
77
|
+
echo "$MSG_INSTALL_SUCCESS"
|
|
78
|
+
echo "$MSG_VERSION $(bun --version)"
|
|
79
|
+
else
|
|
80
|
+
echo "$MSG_INSTALL_FAILED"
|
|
81
|
+
exit 1
|
|
82
|
+
fi
|
|
83
|
+
else
|
|
84
|
+
echo "$MSG_INSTALL_FAILED"
|
|
85
|
+
exit 1
|
|
86
|
+
fi
|
|
87
|
+
else
|
|
88
|
+
echo "$MSG_CANCELLED"
|
|
89
|
+
echo ""
|
|
90
|
+
echo "$MSG_MANUAL_INSTALL"
|
|
91
|
+
echo "$MSG_MANUAL_COMMAND"
|
|
92
|
+
echo ""
|
|
93
|
+
echo "$MSG_RETRY"
|
|
94
|
+
exit 1
|
|
95
|
+
fi
|
|
96
|
+
fi
|
|
97
|
+
|
|
98
|
+
echo ""
|
|
99
|
+
echo "$MSG_SUCCESS"
|