trello-cli-unofficial 0.10.0 → 0.10.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/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [0.10.1](https://github.com/JaegerCaiser/trello-cli-unofficial/compare/v0.10.0...v0.10.1) (2025-11-14)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * revert CommandController run() logic to fix Windows compatibility ([d9abffc](https://github.com/JaegerCaiser/trello-cli-unofficial/commit/d9abffc87461d43aa51b3bd9215b9d7a6e6fce4b))
7
+
1
8
  # [0.10.0](https://github.com/JaegerCaiser/trello-cli-unofficial/compare/v0.9.6...v0.10.0) (2025-11-14)
2
9
 
3
10
 
package/dist/main.js CHANGED
@@ -2500,8 +2500,9 @@ var require_en = __commonJS((exports, module) => {
2500
2500
  confirmReset: "Are you sure you want to reset all configuration?",
2501
2501
  configResetted: "✅ Configuration resetted!",
2502
2502
  errors: {
2503
- loadConfig: "Error loading config:",
2504
- saveConfig: "Error saving config:"
2503
+ loadConfig: "Error loading configuration:",
2504
+ saveConfig: "Error saving configuration:",
2505
+ programNotInitialized: "Commander program not initialized"
2505
2506
  },
2506
2507
  selectBoard: "Select a board:",
2507
2508
  selectList: "Select a list:",
@@ -2772,7 +2773,8 @@ var require_pt_BR = __commonJS((exports, module) => {
2772
2773
  configResetted: "✅ Configuração resetada!",
2773
2774
  errors: {
2774
2775
  loadConfig: "Erro ao carregar configuração:",
2775
- saveConfig: "Erro ao salvar configuração:"
2776
+ saveConfig: "Erro ao salvar configuração:",
2777
+ programNotInitialized: "Programa Commander não inicializado"
2776
2778
  },
2777
2779
  selectBoard: "Selecione um board:",
2778
2780
  selectList: "Selecione uma lista:",
@@ -31281,6 +31283,9 @@ class CommandController {
31281
31283
  this.cardController = new CardController(trelloRepository, this.boardController, this.outputFormatter);
31282
31284
  }
31283
31285
  setupCommands() {
31286
+ if (!this.program) {
31287
+ throw new Error(t3("errors.programNotInitialized"));
31288
+ }
31284
31289
  const packageJsonPath = join(process.cwd(), "package.json");
31285
31290
  const packageJson = JSON.parse(readFileSync2(packageJsonPath, "utf-8"));
31286
31291
  const version = packageJson.version;
@@ -31465,11 +31470,12 @@ class CommandController {
31465
31470
  });
31466
31471
  }
31467
31472
  async run() {
31468
- this.program.parse();
31469
- if (!this.program.args.length && !this.program.opts().version) {
31473
+ if (process.argv.length === 2) {
31470
31474
  const configRepository = new FileConfigRepository;
31471
31475
  const cli = new (await Promise.resolve().then(() => (init_TrelloCliController(), exports_TrelloCliController))).TrelloCliController(configRepository, this.outputFormatter);
31472
31476
  await cli.run();
31477
+ } else {
31478
+ this.program.parse();
31473
31479
  }
31474
31480
  }
31475
31481
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "trello-cli-unofficial",
3
3
  "type": "module",
4
- "version": "0.10.0",
4
+ "version": "0.10.1",
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/)",
@@ -38,8 +38,9 @@
38
38
  "confirmReset": "Are you sure you want to reset all configuration?",
39
39
  "configResetted": "✅ Configuration resetted!",
40
40
  "errors": {
41
- "loadConfig": "Error loading config:",
42
- "saveConfig": "Error saving config:"
41
+ "loadConfig": "Error loading configuration:",
42
+ "saveConfig": "Error saving configuration:",
43
+ "programNotInitialized": "Commander program not initialized"
43
44
  },
44
45
  "selectBoard": "Select a board:",
45
46
  "selectList": "Select a list:",
@@ -39,7 +39,8 @@
39
39
  "configResetted": "✅ Configuração resetada!",
40
40
  "errors": {
41
41
  "loadConfig": "Erro ao carregar configuração:",
42
- "saveConfig": "Erro ao salvar configuração:"
42
+ "saveConfig": "Erro ao salvar configuração:",
43
+ "programNotInitialized": "Programa Commander não inicializado"
43
44
  },
44
45
  "selectBoard": "Selecione um board:",
45
46
  "selectList": "Selecione uma lista:",
@@ -50,6 +50,11 @@ export class CommandController {
50
50
  }
51
51
 
52
52
  private setupCommands(): void {
53
+ // Ensure program is initialized
54
+ if (!this.program) {
55
+ throw new Error(t('errors.programNotInitialized'));
56
+ }
57
+
53
58
  // Get version from package.json
54
59
  const packageJsonPath = join(process.cwd(), 'package.json');
55
60
  const packageJson = JSON.parse(readFileSync(packageJsonPath, 'utf-8'));
@@ -426,16 +431,15 @@ export class CommandController {
426
431
  }
427
432
 
428
433
  async run(): Promise<void> {
429
- // Parse arguments first to handle global options like --version
430
- this.program.parse();
431
-
432
434
  // Fallback to interactive mode if no command specified
433
- if (!this.program.args.length && !this.program.opts().version) {
435
+ if (process.argv.length === 2) {
434
436
  const configRepository = new FileConfigRepository();
435
437
  const cli = new (
436
438
  await import('./TrelloCliController')
437
439
  ).TrelloCliController(configRepository, this.outputFormatter);
438
440
  await cli.run();
441
+ } else {
442
+ this.program.parse();
439
443
  }
440
444
  }
441
445
  }