langctl 0.2.0 → 0.3.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/CHANGELOG.md +42 -0
- package/README.md +155 -1188
- package/dist/commands/auth.js +85 -19
- package/dist/commands/config.js +36 -26
- package/dist/commands/export.js +11 -122
- package/dist/commands/import.js +32 -143
- package/dist/commands/init.js +61 -72
- package/dist/commands/keys.js +145 -279
- package/dist/commands/org.js +45 -111
- package/dist/commands/projects.js +124 -312
- package/dist/commands/pull.js +80 -130
- package/dist/commands/push.js +125 -0
- package/dist/commands/team.js +68 -257
- package/dist/core/config.js +130 -0
- package/dist/core/errors.js +67 -0
- package/dist/core/files.js +38 -0
- package/dist/core/http.js +121 -0
- package/dist/core/output.js +96 -0
- package/dist/core/project.js +58 -0
- package/dist/core/prompts.js +56 -0
- package/dist/formats/index.js +285 -0
- package/dist/index.js +261 -508
- package/dist/version.js +4 -0
- package/package.json +22 -15
- package/.gitattributes +0 -2
- package/.github/ISSUE_TEMPLATE/bug_report.md +0 -26
- package/.github/ISSUE_TEMPLATE/feature_request.md +0 -19
- package/CONTRIBUTING.md +0 -33
- package/dist/api.d.ts +0 -20
- package/dist/api.js +0 -75
- package/dist/auth.d.ts +0 -38
- package/dist/auth.js +0 -106
- package/dist/commands/auth.d.ts +0 -3
- package/dist/commands/config.d.ts +0 -2
- package/dist/commands/debug.d.ts +0 -3
- package/dist/commands/debug.js +0 -61
- package/dist/commands/export.d.ts +0 -13
- package/dist/commands/import.d.ts +0 -12
- package/dist/commands/init.d.ts +0 -2
- package/dist/commands/keys.d.ts +0 -25
- package/dist/commands/org.d.ts +0 -13
- package/dist/commands/projects.d.ts +0 -33
- package/dist/commands/pull.d.ts +0 -9
- package/dist/commands/team.d.ts +0 -29
- package/dist/config.d.ts +0 -48
- package/dist/config.js +0 -69
- package/dist/exporters/index.d.ts +0 -36
- package/dist/exporters/index.js +0 -214
- package/dist/index.d.ts +0 -3
- package/dist/utils/banner.d.ts +0 -9
- package/dist/utils/banner.js +0 -24
- package/translations/en.json +0 -5
- package/translations/en.xml +0 -9
- package/translations/fr.json +0 -4
- package/translations/fr.xml +0 -7
- package/translations/hi.json +0 -4
- package/translations/hi.xml +0 -7
- package/translations/ios/en.strings +0 -9
- package/translations/ios/fr.strings +0 -6
- package/translations/ios/hi.strings +0 -6
- package/translations/ios/ja.strings +0 -6
- package/translations/ja.json +0 -4
- package/translations/ja.xml +0 -7
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.3.0 — 2026-10-08
|
|
4
|
+
|
|
5
|
+
A rewrite focused on reliability in real projects and CI.
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
- `langctl.json` project config and `langctl init` repo setup — `pull`/`push` need no arguments.
|
|
9
|
+
- `push`: upload translation files (source language by default), with `--dry-run`, `--overwrite`, `--publish`.
|
|
10
|
+
- `pull --check` (exit 7 when committed files are out of date), `--dry-run`, `--require-complete`.
|
|
11
|
+
- `LANGCTL_API_KEY` / `LANGCTL_API_URL` / `LANGCTL_TIMEOUT` / `LANGCTL_CONFIG_DIR`: CI needs no config file.
|
|
12
|
+
- `--json` on every command (errors too), `--quiet`, `--verbose` (HTTP trace), `--yes`, `--timeout`, `--no-color`.
|
|
13
|
+
- `whoami` (org, key source, scopes, latency), `formats`, `keys update`, `keys unpublish`, `publish --all/--module`.
|
|
14
|
+
- `projects stats` shows translation coverage per language.
|
|
15
|
+
- Import/push read every format pull writes (JSON, nested JSON, Android XML, iOS .strings, ARB).
|
|
16
|
+
- Documented exit codes (0–7).
|
|
17
|
+
- Retries with backoff for idempotent requests (network errors, 429, 5xx); clear network/TLS/proxy errors.
|
|
18
|
+
|
|
19
|
+
### Fixed
|
|
20
|
+
- `init` could hang forever after entering the API key.
|
|
21
|
+
- Spinners froze the CLI under emulated terminals (`script`, `docker -t`); spinners are now off in CI/pipes.
|
|
22
|
+
- Exporting all languages to Android/iOS wrote every language to the same file (only the last survived).
|
|
23
|
+
- `-o file` with several languages overwrote the same file for each language.
|
|
24
|
+
- Android: keys with dots produced invalid resource names; apostrophes were escaped as `'` (Android needs `\'`).
|
|
25
|
+
- ARB: keys with dots were invalid message ids; a timestamp made every pull a git diff.
|
|
26
|
+
- Repeated placeholders got different positions (`{{name}} … {{name}}` → `%1$s … %2$s`).
|
|
27
|
+
- Nested JSON silently dropped keys that were both a string and a parent.
|
|
28
|
+
- Unknown language/format, missing keys and empty imports exited 0 — CI passed on failures.
|
|
29
|
+
- Key lookups used a substring search limited to 100 results; `keys publish` silently skipped keys beyond 100.
|
|
30
|
+
- Files over ~1 MB failed to import (uploads are now chunked).
|
|
31
|
+
- The API key was stored world-readable; the config file is now mode 600 and written atomically.
|
|
32
|
+
- The API key had to be passed as an argument (shell history); use `auth --stdin` or the hidden prompt.
|
|
33
|
+
|
|
34
|
+
### Changed
|
|
35
|
+
- Requires Node.js 20+ (the dependencies already did).
|
|
36
|
+
- Dependencies cut from 5 to 2 (`commander`, `chalk`).
|
|
37
|
+
- Default file paths follow platform conventions; see "Upgrading from 0.2" in the README.
|
|
38
|
+
- Destructive commands confirm, and require `--yes` when non-interactive.
|
|
39
|
+
- `keys translate` uses `-t/--text`; `debug` was replaced by `whoami`.
|
|
40
|
+
|
|
41
|
+
## 0.2.0 — 2026-03-03
|
|
42
|
+
- Initial public release.
|