trello-cli-unofficial 0.6.10 → 0.7.4
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/README.md +62 -14
- package/bun.lock +5 -0
- package/bunfig.toml +2 -0
- package/dist/main.js +13570 -10419
- package/package.json +20 -2
- package/scripts/check-coverage.js +67 -0
- package/src/application/use-cases/AuthenticateUserUseCase.ts +2 -2
- package/src/application/use-cases/CreateCardUseCase.ts +2 -2
- package/src/application/use-cases/DeleteCardUseCase.ts +1 -1
- package/src/application/use-cases/GetBoardsUseCase.ts +2 -2
- package/src/application/use-cases/GetCardsUseCase.ts +2 -2
- package/src/application/use-cases/GetListsUseCase.ts +2 -2
- package/src/application/use-cases/MoveCardUseCase.ts +2 -2
- package/src/application/use-cases/UpdateCardUseCase.ts +2 -2
- package/src/domain/repositories/ConfigRepository.ts +1 -1
- package/src/domain/repositories/TrelloRepository.ts +7 -1
- package/src/domain/services/AuthenticationService.ts +2 -2
- package/src/i18n/README.md +150 -0
- package/src/i18n/index.ts +61 -0
- package/src/i18n/locales/en.json +129 -0
- package/src/i18n/locales/pt-BR.json +129 -0
- package/src/infrastructure/repositories/FileConfigRepository.ts +4 -6
- package/src/infrastructure/repositories/TrelloApiRepository.ts +3 -3
- package/src/presentation/cli/AuthController.ts +38 -0
- package/src/presentation/cli/BoardController.ts +85 -0
- package/src/presentation/cli/CardController.ts +332 -0
- package/src/presentation/cli/CommandController.ts +113 -10
- package/src/presentation/cli/ConfigController.ts +58 -0
- package/src/presentation/cli/MainMenuController.ts +65 -0
- package/src/presentation/cli/TrelloCliController.ts +35 -390
- package/src/presentation/cli/index.ts +5 -0
- package/.eslintignore +0 -26
package/README.md
CHANGED
|
@@ -20,8 +20,10 @@ An unofficial Trello CLI using Power-Up authentication, built with Bun for maxim
|
|
|
20
20
|
- ✏️ **CRUD Operations**: Create, read, update, and delete cards
|
|
21
21
|
- 📦 **Move Cards**: Between lists in the same board
|
|
22
22
|
- 🛠️ **Traditional CLI**: Also works as a command-line tool
|
|
23
|
+
- 🌍 **Internationalization**: Support for Portuguese (pt-BR) and English (en) with auto-detection
|
|
23
24
|
- 🤖 **Automated CI/CD**: Semantic versioning and NPM publishing on every release
|
|
24
|
-
-
|
|
25
|
+
- � **Quality Gates**: 95% test coverage threshold enforced in CI/CD
|
|
26
|
+
- �🔒 **Secure Publishing**: NPM provenance with GitHub Actions OIDC
|
|
25
27
|
|
|
26
28
|
## 📦 Installation
|
|
27
29
|
|
|
@@ -99,7 +101,40 @@ The token is automatically saved in `~/.trello-cli-unofficial/config.json`:
|
|
|
99
101
|
}
|
|
100
102
|
```
|
|
101
103
|
|
|
102
|
-
##
|
|
104
|
+
## Internationalization (i18n)
|
|
105
|
+
|
|
106
|
+
The CLI automatically detects your system language and displays messages in the appropriate language.
|
|
107
|
+
|
|
108
|
+
### Supported Languages
|
|
109
|
+
|
|
110
|
+
- 🇧🇷 **Portuguese (pt-BR)** - Default for Portuguese-speaking systems
|
|
111
|
+
- 🇺🇸 **English (en)** - Default for other systems
|
|
112
|
+
|
|
113
|
+
### Language Detection
|
|
114
|
+
|
|
115
|
+
The language is automatically detected from your system's `LANG` environment variable:
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
# Force Portuguese
|
|
119
|
+
LANG=pt_BR.UTF-8 tcu
|
|
120
|
+
|
|
121
|
+
# Force English
|
|
122
|
+
LANG=en_US.UTF-8 tcu
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
### Manual Language Switching
|
|
126
|
+
|
|
127
|
+
```typescript
|
|
128
|
+
import { changeLanguage } from "trello-cli-unofficial";
|
|
129
|
+
|
|
130
|
+
// Switch to Portuguese
|
|
131
|
+
changeLanguage("pt-BR");
|
|
132
|
+
|
|
133
|
+
// Switch to English
|
|
134
|
+
changeLanguage("en");
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
## �🎮 Usage
|
|
103
138
|
|
|
104
139
|
### Interactive Mode (Recommended)
|
|
105
140
|
|
|
@@ -164,36 +199,49 @@ tcu
|
|
|
164
199
|
|
|
165
200
|
## 🤖 CI/CD & Automation
|
|
166
201
|
|
|
167
|
-
This project uses automated CI/CD with semantic versioning
|
|
202
|
+
This project uses automated CI/CD with semantic versioning based on **commit messages**:
|
|
168
203
|
|
|
169
204
|
### Version Bumping
|
|
170
205
|
|
|
171
|
-
- `feat:` commits → Minor version bump (0.5.0 → 0.6.0)
|
|
172
|
-
- `fix:` commits → Patch version bump (0.5.0 → 0.5.1)
|
|
173
|
-
- `BREAKING CHANGE:` → Major version bump (0.5.0 → 1.0.0)
|
|
206
|
+
- `feat:` commits → **Minor version bump** (0.5.0 → 0.6.0)
|
|
207
|
+
- `fix:` commits → **Patch version bump** (0.5.0 → 0.5.1)
|
|
208
|
+
- `BREAKING CHANGE:` in commit body → **Major version bump** (0.5.0 → 1.0.0)
|
|
209
|
+
- Other commits (docs, test, chore) → **No release**
|
|
174
210
|
|
|
175
211
|
### Automated Publishing
|
|
176
212
|
|
|
177
213
|
Every push to `main` branch triggers:
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
214
|
+
|
|
215
|
+
1. **CI Pipeline**: Linting, type checking, tests, coverage, and build
|
|
216
|
+
2. **Release Pipeline**: Automatic version bump based on commit message
|
|
217
|
+
3. **NPM Publishing**: Package published with provenance and signed builds
|
|
218
|
+
4. **GitHub Release**: Automatic release notes and changelog
|
|
181
219
|
|
|
182
220
|
### Conventional Commits
|
|
183
221
|
|
|
184
222
|
```bash
|
|
185
|
-
# Feature commit (minor version)
|
|
223
|
+
# Feature commit (minor version bump)
|
|
186
224
|
git commit -m "feat: add new card templates"
|
|
187
225
|
|
|
188
|
-
# Bug fix (patch version)
|
|
226
|
+
# Bug fix (patch version bump)
|
|
189
227
|
git commit -m "fix: handle network timeouts gracefully"
|
|
190
228
|
|
|
191
|
-
# Breaking change (major version)
|
|
192
|
-
git commit -m "feat!: redesign authentication flow
|
|
229
|
+
# Breaking change (major version bump) - Method 1
|
|
230
|
+
git commit -m "feat!: redesign authentication flow"
|
|
231
|
+
|
|
232
|
+
# Breaking change (major version bump) - Method 2
|
|
233
|
+
git commit -m "feat: redesign authentication flow
|
|
193
234
|
|
|
194
|
-
BREAKING CHANGE: token format changed"
|
|
235
|
+
BREAKING CHANGE: token format changed from legacy API to Power-Up"
|
|
236
|
+
|
|
237
|
+
# Non-releasing commits
|
|
238
|
+
git commit -m "docs: update installation guide"
|
|
239
|
+
git commit -m "test: add integration tests"
|
|
240
|
+
git commit -m "chore: update dependencies"
|
|
195
241
|
```
|
|
196
242
|
|
|
243
|
+
**Important:** Version bumps are **automatic** and based on the **commit message when merged to main**, not PR titles or descriptions.
|
|
244
|
+
|
|
197
245
|
## 🛠️ Development
|
|
198
246
|
|
|
199
247
|
### Project Structure
|
package/bun.lock
CHANGED
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
"commander": "^14.0.2",
|
|
10
10
|
"dotenv": "^17.2.3",
|
|
11
11
|
"fs-extra": "^11.3.2",
|
|
12
|
+
"i18next": "^25.6.1",
|
|
12
13
|
"inquirer": "^12.10.0",
|
|
13
14
|
},
|
|
14
15
|
"devDependencies": {
|
|
@@ -35,6 +36,8 @@
|
|
|
35
36
|
|
|
36
37
|
"@babel/parser": ["@babel/parser@7.28.5", "", { "dependencies": { "@babel/types": "^7.28.5" }, "bin": "./bin/babel-parser.js" }, "sha512-KKBU1VGYR7ORr3At5HAtUQ+TV3SzRCXmA/8OdDZiLDBIZxVyzXuztPjfLd3BV1PRAQGCMWWSHYhL0F8d5uHBDQ=="],
|
|
37
38
|
|
|
39
|
+
"@babel/runtime": ["@babel/runtime@7.28.4", "", {}, "sha512-Q/N6JNWvIvPnLDvjlE1OUBLPQHH6l3CltCEsHIujp45zQUSSh8K+gHnaEX45yAT1nyngnINhvWtzN+Nb9D8RAQ=="],
|
|
40
|
+
|
|
38
41
|
"@babel/types": ["@babel/types@7.28.5", "", { "dependencies": { "@babel/helper-string-parser": "^7.27.1", "@babel/helper-validator-identifier": "^7.28.5" } }, "sha512-qQ5m48eI/MFLQ5PxQj4PFaprjyCTLI37ElWMmNs0K8Lk3dVeOdNpB3ks8jc7yM5CDmVC73eMVk/trk3fgmrUpA=="],
|
|
39
42
|
|
|
40
43
|
"@clack/core": ["@clack/core@0.5.0", "", { "dependencies": { "picocolors": "^1.0.0", "sisteransi": "^1.0.5" } }, "sha512-p3y0FIOwaYRUPRcMO7+dlmLh8PSRcrjuTndsiA0WAFbWES0mLZlrjVoBRZ9DzkPFJZG6KGkJmoEAY0ZcVWTkow=="],
|
|
@@ -409,6 +412,8 @@
|
|
|
409
412
|
|
|
410
413
|
"html-entities": ["html-entities@2.6.0", "", {}, "sha512-kig+rMn/QOVRvr7c86gQ8lWXq+Hkv6CbAH1hLu+RG338StTpE8Z0b44SDVaqVu7HGKf27frdmUYEs9hTUX/cLQ=="],
|
|
411
414
|
|
|
415
|
+
"i18next": ["i18next@25.6.1", "", { "dependencies": { "@babel/runtime": "^7.27.6" }, "peerDependencies": { "typescript": "^5" }, "optionalPeers": ["typescript"] }, "sha512-yUWvdXtalZztmKrKw3yz/AvSP3yKyqIkVPx/wyvoYy9lkLmwzItLxp0iHZLG5hfVQ539Jor4XLO+U+NHIXg7pw=="],
|
|
416
|
+
|
|
412
417
|
"iconv-lite": ["iconv-lite@0.7.0", "", { "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" } }, "sha512-cf6L2Ds3h57VVmkZe+Pn+5APsT7FpqJtEhhieDCvrE2MK5Qk9MyffgQyuxQTm6BChfeZNtcOLHp9IcWRVcIcBQ=="],
|
|
413
418
|
|
|
414
419
|
"ignore": ["ignore@5.3.2", "", {}, "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g=="],
|
package/bunfig.toml
ADDED