langctl 0.1.2 → 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.
Files changed (63) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/LICENSE +1 -1
  3. package/README.md +159 -1151
  4. package/dist/commands/auth.js +82 -24
  5. package/dist/commands/config.js +36 -25
  6. package/dist/commands/export.js +11 -112
  7. package/dist/commands/import.js +32 -164
  8. package/dist/commands/init.js +59 -80
  9. package/dist/commands/keys.js +145 -381
  10. package/dist/commands/org.js +45 -140
  11. package/dist/commands/projects.js +125 -390
  12. package/dist/commands/pull.js +78 -183
  13. package/dist/commands/push.js +125 -0
  14. package/dist/commands/team.js +68 -272
  15. package/dist/core/config.js +130 -0
  16. package/dist/core/errors.js +67 -0
  17. package/dist/core/files.js +38 -0
  18. package/dist/core/http.js +121 -0
  19. package/dist/core/output.js +96 -0
  20. package/dist/core/project.js +58 -0
  21. package/dist/core/prompts.js +56 -0
  22. package/dist/formats/index.js +285 -0
  23. package/dist/index.js +261 -508
  24. package/dist/version.js +4 -0
  25. package/package.json +22 -16
  26. package/.gitattributes +0 -2
  27. package/NEXT_PHASE.md +0 -618
  28. package/WORKING_INSTRUCTIONS.md +0 -1389
  29. package/dist/auth.d.ts +0 -37
  30. package/dist/auth.js +0 -112
  31. package/dist/commands/auth.d.ts +0 -3
  32. package/dist/commands/config.d.ts +0 -2
  33. package/dist/commands/debug.d.ts +0 -3
  34. package/dist/commands/debug.js +0 -57
  35. package/dist/commands/export.d.ts +0 -14
  36. package/dist/commands/import.d.ts +0 -11
  37. package/dist/commands/init.d.ts +0 -2
  38. package/dist/commands/keys.d.ts +0 -25
  39. package/dist/commands/org.d.ts +0 -13
  40. package/dist/commands/projects.d.ts +0 -30
  41. package/dist/commands/pull.d.ts +0 -9
  42. package/dist/commands/team.d.ts +0 -29
  43. package/dist/config.d.ts +0 -47
  44. package/dist/config.js +0 -69
  45. package/dist/exporters/index.d.ts +0 -36
  46. package/dist/exporters/index.js +0 -214
  47. package/dist/index.d.ts +0 -3
  48. package/dist/supabase.d.ts +0 -14
  49. package/dist/supabase.js +0 -30
  50. package/dist/utils/banner.d.ts +0 -9
  51. package/dist/utils/banner.js +0 -24
  52. package/translations/en.json +0 -5
  53. package/translations/en.xml +0 -9
  54. package/translations/fr.json +0 -4
  55. package/translations/fr.xml +0 -7
  56. package/translations/hi.json +0 -4
  57. package/translations/hi.xml +0 -7
  58. package/translations/ios/en.strings +0 -9
  59. package/translations/ios/fr.strings +0 -6
  60. package/translations/ios/hi.strings +0 -6
  61. package/translations/ios/ja.strings +0 -6
  62. package/translations/ja.json +0 -4
  63. 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.
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2025 Langctl
3
+ Copyright (c) 2026 Litcode Private Limited
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal