trello-cli-unofficial 0.9.2 → 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,10 @@
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
+
1
8
  ## [0.9.2](https://github.com/JaegerCaiser/trello-cli-unofficial/compare/v0.9.1...v0.9.2) (2025-11-14)
2
9
 
3
10
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "trello-cli-unofficial",
3
3
  "type": "module",
4
- "version": "0.9.2",
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/)",
@@ -90,20 +90,65 @@ else {
90
90
  console.log(msg.bunBenefit);
91
91
  console.log('');
92
92
 
93
- // Read user input
94
- process.stdout.write(msg.installPrompt);
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);
95
138
 
96
- process.stdin.setRawMode(true);
97
- process.stdin.resume();
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
+ });
98
145
 
99
- process.stdin.once('data', (key) => {
100
- process.stdin.setRawMode(false);
101
- process.stdin.pause();
146
+ rl.question('', (answer) => {
147
+ rl.close();
102
148
 
103
- const answer = key.toString().toLowerCase();
104
- console.log(''); // New line after input
149
+ const normalizedAnswer = answer.toString().toLowerCase().trim();
105
150
 
106
- if (answer === 'y' || answer === '\r' || answer === '\n') {
151
+ if (normalizedAnswer === 'y' || normalizedAnswer === 'yes' || normalizedAnswer === '') {
107
152
  console.log(msg.installing);
108
153
 
109
154
  try {
@@ -147,8 +192,8 @@ else {
147
192
  console.log(msg.retry);
148
193
  process.exit(1);
149
194
  }
195
+
196
+ console.log('');
197
+ console.log(msg.success);
150
198
  });
151
199
  }
152
-
153
- console.log('');
154
- console.log(msg.success);