@babelize/cli 1.0.13 → 1.1.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/LICENSE +200 -4
- package/README.md +44 -15
- package/dist/commands/check.d.ts +22 -0
- package/dist/commands/check.d.ts.map +1 -0
- package/dist/commands/check.js +134 -0
- package/dist/commands/check.js.map +1 -0
- package/dist/commands/glossary.d.ts.map +1 -1
- package/dist/commands/glossary.js +2 -1
- package/dist/commands/glossary.js.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +52 -52
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/tm.d.ts.map +1 -1
- package/dist/commands/tm.js +29 -11
- package/dist/commands/tm.js.map +1 -1
- package/dist/commands/translate.d.ts +24 -0
- package/dist/commands/translate.d.ts.map +1 -0
- package/dist/commands/translate.js +415 -0
- package/dist/commands/translate.js.map +1 -0
- package/dist/local/formatter.d.ts +27 -0
- package/dist/local/formatter.d.ts.map +1 -0
- package/dist/local/formatter.js +69 -0
- package/dist/local/formatter.js.map +1 -0
- package/dist/local/git.d.ts +16 -0
- package/dist/local/git.d.ts.map +1 -0
- package/dist/local/git.js +52 -0
- package/dist/local/git.js.map +1 -0
- package/dist/local/provider.d.ts +41 -0
- package/dist/local/provider.d.ts.map +1 -0
- package/dist/local/provider.js +87 -0
- package/dist/local/provider.js.map +1 -0
- package/dist/local/translate-core.d.ts +188 -0
- package/dist/local/translate-core.d.ts.map +1 -0
- package/dist/local/translate-core.js +401 -0
- package/dist/local/translate-core.js.map +1 -0
- package/dist/local/workspace-copy.d.ts +75 -0
- package/dist/local/workspace-copy.d.ts.map +1 -0
- package/dist/local/workspace-copy.js +263 -0
- package/dist/local/workspace-copy.js.map +1 -0
- package/dist/program.d.ts.map +1 -1
- package/dist/program.js +6 -0
- package/dist/program.js.map +1 -1
- package/dist/tui/repl.d.ts.map +1 -1
- package/dist/tui/repl.js +2 -0
- package/dist/tui/repl.js.map +1 -1
- package/dist/utils/zip-upload.d.ts +81 -0
- package/dist/utils/zip-upload.d.ts.map +1 -0
- package/dist/utils/zip-upload.js +277 -0
- package/dist/utils/zip-upload.js.map +1 -0
- package/package.json +6 -2
package/LICENSE
CHANGED
|
@@ -1,6 +1,202 @@
|
|
|
1
|
-
Copyright (c) 2026 Babelize
|
|
2
1
|
|
|
3
|
-
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
4
5
|
|
|
5
|
-
|
|
6
|
-
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
package/README.md
CHANGED
|
@@ -8,7 +8,31 @@
|
|
|
8
8
|
npm install -g @babelize/cli
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
## Quick
|
|
11
|
+
## Quick start
|
|
12
|
+
|
|
13
|
+
Translate the repo you're in with your own LLM key (no account needed) or a Babelize API key. Locale files and i18n code are written into your working tree for review with `git diff`:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
export ANTHROPIC_API_KEY=sk-ant-... # or OPENAI_API_KEY, GEMINI_API_KEY, GROQ_API_KEY, OPENROUTER_API_KEY
|
|
17
|
+
npx @babelize/cli translate --to fr,de,ja
|
|
18
|
+
git diff
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Or use Babelize-hosted translation: create an API key at https://app.babelize.co/api-keys (free tier included), then
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
export BABELIZE_API_KEY=bblz_sk_...
|
|
25
|
+
npx @babelize/cli translate --to fr,de,ja
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
- **Frameworks:** React and Next.js (App Router) are supported. Vue and static HTML are in beta.
|
|
29
|
+
- **Key:** the first LLM key found in the order above is used; with none, `BABELIZE_API_KEY` selects Babelize-hosted translation (strings only, never code; billed in AI credits). Pick another with `--provider` (`babelize` for hosted), or a different model with `--model`.
|
|
30
|
+
- **Safety:** it needs a git repo with a clean working tree (`--force` overrides). It works on a temporary copy and touches nothing if the run fails. `--dry-run` prints the diff without writing.
|
|
31
|
+
- **Re-runs:** commit `.babelize/local/babelize-lock.json` and later runs only translate new or changed strings.
|
|
32
|
+
|
|
33
|
+
Full guide: https://docs.babelize.co/cli/translate
|
|
34
|
+
|
|
35
|
+
## Quick Start (platform)
|
|
12
36
|
|
|
13
37
|
```bash
|
|
14
38
|
# Log in to your Babelize account
|
|
@@ -25,6 +49,7 @@ babelize run start
|
|
|
25
49
|
|
|
26
50
|
| Command | Description |
|
|
27
51
|
|---------|-------------|
|
|
52
|
+
| `translate --to <locales>` | Translate this repo locally with your own LLM key or `BABELIZE_API_KEY` (writes to the working tree) |
|
|
28
53
|
| `init` | Initialize a new Babelize project |
|
|
29
54
|
| `auth login` / `signup` / `logout` / `whoami` | Authentication management |
|
|
30
55
|
| `auth reset-password` | Send a password reset email |
|
|
@@ -36,11 +61,11 @@ babelize run start
|
|
|
36
61
|
| `babels` | View translation job history |
|
|
37
62
|
| `pr` | GitHub PR integration |
|
|
38
63
|
| `billing` | Plans, usage, invoices |
|
|
39
|
-
| `subscriptions` | List,
|
|
64
|
+
| `subscriptions` | List, inspect, and set the default subscription |
|
|
40
65
|
| `checkout` | Purchase a plan |
|
|
41
66
|
| `languages` | System and project-level language management, ISO ↔ FLORES-200 code conversion |
|
|
42
67
|
| `members` | Team member management |
|
|
43
|
-
| `tm` | Translation memory (view, add, update, export as TMX, clear) |
|
|
68
|
+
| `tm` | Translation memory (owner-scoped, shared across your projects: view, add, update, export as TMX, clear) |
|
|
44
69
|
| `glossary` | Translation glossary (list, add, update, delete, import, export) |
|
|
45
70
|
| `api-keys byok` | BYOK provider keys (OpenAI, Anthropic, Groq, etc.) |
|
|
46
71
|
| `api-keys babelize` | Babelize API keys (bblz_sk_ prefix for MCP/external access) |
|
|
@@ -70,14 +95,15 @@ The script dynamically reflects all registered commands at generation time.
|
|
|
70
95
|
## Configuration
|
|
71
96
|
|
|
72
97
|
Credentials and preferences are stored at:
|
|
73
|
-
- **macOS:** `~/Library/Preferences/
|
|
74
|
-
- **Linux:** `~/.config/
|
|
75
|
-
- **Windows:** `%APPDATA
|
|
98
|
+
- **macOS:** `~/Library/Preferences/@babelize/cli-nodejs/config.json`
|
|
99
|
+
- **Linux:** `~/.config/@babelize/cli-nodejs/config.json`
|
|
100
|
+
- **Windows:** `%APPDATA%\@babelize\cli-nodejs\Config\config.json`
|
|
76
101
|
|
|
77
|
-
The
|
|
78
|
-
- **
|
|
79
|
-
- **
|
|
80
|
-
- **
|
|
102
|
+
The API URL resolves in this order:
|
|
103
|
+
- **`BABELIZE_API_URL` env var** — always wins (use this for local dev, e.g. `http://localhost:3001/api`)
|
|
104
|
+
- **`--api-url` flag** — per-command override
|
|
105
|
+
- **Stored config** — a saved URL is used unless it points at localhost (stored localhost URLs are deliberately ignored)
|
|
106
|
+
- **Default:** `https://api.babelize.co/api`
|
|
81
107
|
|
|
82
108
|
## Environment Variables
|
|
83
109
|
|
|
@@ -88,6 +114,8 @@ The CLI auto-detects the API URL:
|
|
|
88
114
|
| `BABELIZE_NON_INTERACTIVE` | Force non-interactive mode (`1` or `true`) |
|
|
89
115
|
| `CI` | When set (not `"false"`), the CLI never prompts — missing flags exit with a usage error |
|
|
90
116
|
| `NO_COLOR` | Disable colored output (any non-empty value) |
|
|
117
|
+
| `ANTHROPIC_API_KEY`, `OPENAI_API_KEY`, `GEMINI_API_KEY`, `GROQ_API_KEY`, `OPENROUTER_API_KEY` | Your LLM key for `babelize translate` (first one set wins; `--provider` to choose) |
|
|
118
|
+
| `BABELIZE_API_KEY` | Babelize API key (`bblz_sk_…`) for hosted translation in `babelize translate` when no LLM key is set |
|
|
91
119
|
|
|
92
120
|
## CI / Non-Interactive Mode
|
|
93
121
|
|
|
@@ -112,10 +140,9 @@ See the [CI/CD docs](https://docs.babelize.co/docs/integrations/ci-cd) for a ful
|
|
|
112
140
|
| Code | Meaning | When it happens |
|
|
113
141
|
|------|---------|-----------------|
|
|
114
142
|
| `0` | Success | Command completed |
|
|
115
|
-
| `1` | Internal error | Unexpected failure (
|
|
116
|
-
| `2` | Usage error |
|
|
143
|
+
| `1` | Internal error | Unexpected failure, including command/flag parse errors (`commander` errors are caught and mapped here) |
|
|
144
|
+
| `2` | Usage error | Missing or invalid arguments validated inside a command (incl. non-interactive mode) |
|
|
117
145
|
| `3` | Auth error | Not logged in, session expired, login failed |
|
|
118
|
-
| `4` | Config error | Missing or invalid configuration file |
|
|
119
146
|
| `5` | Network error | Rate limited, DNS failure, timeout |
|
|
120
147
|
| `6` | API error | Server returned 4xx/5xx |
|
|
121
148
|
| `128` | Cancelled | Interactive prompt cancelled (or auto-cancelled in CI) |
|
|
@@ -132,8 +159,10 @@ fi
|
|
|
132
159
|
|
|
133
160
|
## JSON Mode
|
|
134
161
|
|
|
135
|
-
Append `--json` to
|
|
136
|
-
|
|
162
|
+
Append `--json` to a command for machine-readable JSON output. Coverage is per
|
|
163
|
+
subcommand: where a subcommand doesn't implement it, `--json` is ignored and the
|
|
164
|
+
usual human-readable output is printed (e.g. `babelize projects list --json`
|
|
165
|
+
returns JSON, but some `members` and `notifications` subactions do not).
|
|
137
166
|
|
|
138
167
|
## Update Notifications
|
|
139
168
|
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Command } from 'commander';
|
|
2
|
+
import { type ProjectLocaleCheck } from '@babelize/engine';
|
|
3
|
+
/** Exit status when the check found errors (or warnings with --strict). */
|
|
4
|
+
export declare const CHECK_FAILED = 1;
|
|
5
|
+
export interface CheckTotals {
|
|
6
|
+
errors: number;
|
|
7
|
+
warnings: number;
|
|
8
|
+
infos: number;
|
|
9
|
+
/** Locale files that could not be read or parsed (counted as errors). */
|
|
10
|
+
fileErrors: number;
|
|
11
|
+
/** Configured or previously translated locales with no file (counted as errors). */
|
|
12
|
+
missingLocales: number;
|
|
13
|
+
}
|
|
14
|
+
export declare function checkTotals(check: ProjectLocaleCheck): CheckTotals;
|
|
15
|
+
/** Whether the check fails CI: errors always, warnings only with `strict`. */
|
|
16
|
+
export declare function checkFailed(totals: CheckTotals, strict: boolean): boolean;
|
|
17
|
+
export declare function renderCheck(check: ProjectLocaleCheck, opts: {
|
|
18
|
+
strict: boolean;
|
|
19
|
+
verbose: boolean;
|
|
20
|
+
}): string;
|
|
21
|
+
export declare function registerCheckCommand(program: Command): void;
|
|
22
|
+
//# sourceMappingURL=check.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"check.d.ts","sourceRoot":"","sources":["../../src/commands/check.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGpC,OAAO,EAKL,KAAK,kBAAkB,EACxB,MAAM,kBAAkB,CAAC;AAc1B,2EAA2E;AAC3E,eAAO,MAAM,YAAY,IAAI,CAAC;AAK9B,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,yEAAyE;IACzE,UAAU,EAAE,MAAM,CAAC;IACnB,oFAAoF;IACpF,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,kBAAkB,GAAG,WAAW,CAalE;AAED,8EAA8E;AAC9E,wBAAgB,WAAW,CAAC,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,OAAO,GAAG,OAAO,CAEzE;AAID,wBAAgB,WAAW,CAAC,KAAK,EAAE,kBAAkB,EAAE,IAAI,EAAE;IAAE,MAAM,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,GAAG,MAAM,CA+C1G;AAQD,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CA0D3D"}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { stat } from 'node:fs/promises';
|
|
2
|
+
import * as path from 'node:path';
|
|
3
|
+
import { checkProjectLocales, localeIssueFile, parseLocales, } from '@babelize/engine';
|
|
4
|
+
import { isJsonMode, printJson } from '../formatters.js';
|
|
5
|
+
import { globalOptions } from '../global-options.js';
|
|
6
|
+
import { ExitCode } from '../exit-codes.js';
|
|
7
|
+
import { renderSimpleHelp } from '../tui/help.js';
|
|
8
|
+
import { brand, muted, success, warning, error as errorColor, sym } from '../tui/theme.js';
|
|
9
|
+
/** Exit status when the check found errors (or warnings with --strict). */
|
|
10
|
+
export const CHECK_FAILED = 1;
|
|
11
|
+
/** How many issues to list before summarising (all with --verbose). */
|
|
12
|
+
const ISSUE_PREVIEW = 20;
|
|
13
|
+
export function checkTotals(check) {
|
|
14
|
+
const totals = { errors: 0, warnings: 0, infos: 0, fileErrors: 0, missingLocales: 0 };
|
|
15
|
+
for (const set of check.sets) {
|
|
16
|
+
totals.fileErrors += set.fileErrors.length;
|
|
17
|
+
totals.missingLocales += set.missingLocales.length;
|
|
18
|
+
for (const l of set.locales) {
|
|
19
|
+
totals.errors += l.errors;
|
|
20
|
+
totals.warnings += l.warnings;
|
|
21
|
+
totals.infos += l.issues.filter((i) => i.severity === 'info').length;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
totals.errors += totals.fileErrors + totals.missingLocales;
|
|
25
|
+
return totals;
|
|
26
|
+
}
|
|
27
|
+
/** Whether the check fails CI: errors always, warnings only with `strict`. */
|
|
28
|
+
export function checkFailed(totals, strict) {
|
|
29
|
+
return totals.errors > 0 || (strict && totals.warnings > 0);
|
|
30
|
+
}
|
|
31
|
+
const RANK = { error: 0, warning: 1, info: 2 };
|
|
32
|
+
export function renderCheck(check, opts) {
|
|
33
|
+
const out = [''];
|
|
34
|
+
const totals = checkTotals(check);
|
|
35
|
+
for (const set of check.sets) {
|
|
36
|
+
out.push(` ${brand(set.dir)} ${muted(`(source ${set.sourceLocale}, ${set.sourceKeys} keys)`)}`);
|
|
37
|
+
for (const l of set.locales) {
|
|
38
|
+
const mark = l.errors > 0 ? errorColor(sym.cross) : l.warnings > 0 ? warning(sym.warn) : success(sym.check);
|
|
39
|
+
const counts = [l.errors ? `${l.errors} error${l.errors === 1 ? '' : 's'}` : '', l.warnings ? `${l.warnings} warning${l.warnings === 1 ? '' : 's'}` : '']
|
|
40
|
+
.filter(Boolean)
|
|
41
|
+
.join(', ');
|
|
42
|
+
out.push(` ${mark} ${l.locale.padEnd(8)} ${l.translated}/${l.total} translated${counts ? ` ${muted(`· ${counts}`)}` : ''}`);
|
|
43
|
+
}
|
|
44
|
+
for (const l of set.missingLocales)
|
|
45
|
+
out.push(` ${errorColor(sym.cross)} ${l.padEnd(8)} no locale file ${muted(`(${set.dir}/${l}.json; the app falls back to ${set.sourceLocale})`)}`);
|
|
46
|
+
for (const f of set.fileErrors)
|
|
47
|
+
out.push(` ${errorColor(sym.cross)} ${f.file}: ${f.message}`);
|
|
48
|
+
}
|
|
49
|
+
if (check.skippedSets.length) {
|
|
50
|
+
out.push(muted(` Skipped (no ${check.sourceLocale} file): ${check.skippedSets.map((s) => s.dir).join(', ')}`));
|
|
51
|
+
}
|
|
52
|
+
const issues = check.sets
|
|
53
|
+
.flatMap((set) => set.locales.flatMap((l) => l.issues.map((i) => ({ ...i, file: localeIssueFile(set, i) }))))
|
|
54
|
+
.filter((i) => i.severity !== 'info' || opts.verbose)
|
|
55
|
+
.sort((a, b) => RANK[a.severity] - RANK[b.severity]);
|
|
56
|
+
if (issues.length) {
|
|
57
|
+
out.push('');
|
|
58
|
+
const shown = opts.verbose ? issues : issues.slice(0, ISSUE_PREVIEW);
|
|
59
|
+
for (const i of shown) {
|
|
60
|
+
const tag = i.severity === 'error' ? errorColor('error ') : i.severity === 'warning' ? warning('warning') : muted('info ');
|
|
61
|
+
out.push(` ${tag} ${i.file} ${brand(i.key)} ${muted(`[${i.code}]`)}`);
|
|
62
|
+
out.push(` ${i.message}`);
|
|
63
|
+
}
|
|
64
|
+
if (shown.length < issues.length)
|
|
65
|
+
out.push(muted(` … ${issues.length - shown.length} more (use --verbose or --json)`));
|
|
66
|
+
}
|
|
67
|
+
out.push('');
|
|
68
|
+
const failed = checkFailed(totals, opts.strict);
|
|
69
|
+
const summary = `${totals.errors} error${totals.errors === 1 ? '' : 's'}, ${totals.warnings} warning${totals.warnings === 1 ? '' : 's'}`;
|
|
70
|
+
if (!failed) {
|
|
71
|
+
out.push(` ${success(sym.check)} ${summary}${totals.warnings && !opts.strict ? muted(' (warnings do not fail the check; use --strict)') : ''}`);
|
|
72
|
+
}
|
|
73
|
+
else {
|
|
74
|
+
out.push(` ${errorColor(sym.cross)} ${summary}${totals.errors === 0 ? ' (--strict)' : ''}`);
|
|
75
|
+
out.push(muted(' Missing keys and failed strings: run `babelize translate` again. Placeholder/ICU/plural errors: fix the entry in the locale file, or delete it and re-translate.'));
|
|
76
|
+
}
|
|
77
|
+
out.push('');
|
|
78
|
+
return out.join('\n');
|
|
79
|
+
}
|
|
80
|
+
function fail(json, code, message, exitCode) {
|
|
81
|
+
if (json)
|
|
82
|
+
printJson({ ok: false, error: { code, message } });
|
|
83
|
+
else
|
|
84
|
+
console.error(`\n ${errorColor(sym.cross)} ${message}\n`);
|
|
85
|
+
process.exit(exitCode);
|
|
86
|
+
}
|
|
87
|
+
export function registerCheckCommand(program) {
|
|
88
|
+
const cmd = program
|
|
89
|
+
.command('check [path]')
|
|
90
|
+
.description('QA the locale files against the source locale (no network); exits 1 on errors — for CI')
|
|
91
|
+
.option('-f, --from <locale>', 'Source locale (default: .babelize/config.json, then en)')
|
|
92
|
+
.option('-l, --locales <locales>', 'Only these target locales, comma-separated')
|
|
93
|
+
.option('--strict', 'Fail on warnings too')
|
|
94
|
+
.option('--json', 'Output the full check as JSON');
|
|
95
|
+
cmd.action(async (dir, opts) => {
|
|
96
|
+
const json = isJsonMode() || opts.json === true;
|
|
97
|
+
const projectDir = path.resolve(dir ?? '.');
|
|
98
|
+
const st = await stat(projectDir).catch(() => null);
|
|
99
|
+
if (!st?.isDirectory())
|
|
100
|
+
fail(json, 'usage', `Not a directory: ${dir ?? '.'}`, ExitCode.USAGE);
|
|
101
|
+
let check;
|
|
102
|
+
try {
|
|
103
|
+
const from = opts.from?.trim() || undefined;
|
|
104
|
+
const locales = opts.locales ? parseLocales(opts.locales, from ?? '') : undefined;
|
|
105
|
+
check = await checkProjectLocales(projectDir, { sourceLocale: from, locales });
|
|
106
|
+
}
|
|
107
|
+
catch (err) {
|
|
108
|
+
fail(json, 'internal', `Check failed: ${err.message}`, ExitCode.INTERNAL);
|
|
109
|
+
}
|
|
110
|
+
if (check.sets.length === 0) {
|
|
111
|
+
fail(json, 'no_locale_files', check.skippedSets.length
|
|
112
|
+
? `Found locale files in ${check.skippedSets.map((s) => s.dir).join(', ')} but no ${check.sourceLocale} source file. Pass --from with the source locale.`
|
|
113
|
+
: 'No locale files found (looked for locales/, messages/, lang/, i18n/, translations/ folders with <locale>.json). Run `babelize translate` first.', ExitCode.CONFIG);
|
|
114
|
+
}
|
|
115
|
+
const strict = opts.strict === true;
|
|
116
|
+
const totals = checkTotals(check);
|
|
117
|
+
const failed = checkFailed(totals, strict);
|
|
118
|
+
if (json) {
|
|
119
|
+
printJson({ ok: !failed, strict, ...totals, ...check });
|
|
120
|
+
}
|
|
121
|
+
else {
|
|
122
|
+
console.log(renderCheck(check, { strict, verbose: globalOptions.verbose === true }));
|
|
123
|
+
}
|
|
124
|
+
if (failed)
|
|
125
|
+
process.exit(CHECK_FAILED);
|
|
126
|
+
});
|
|
127
|
+
cmd.helpInformation = () => renderSimpleHelp('check [path]', 'QA the locale files in a project against the source locale: missing keys, empty or untranslated values, lost placeholders and tags, broken ICU messages and plural forms, glossary violations. Read-only, no network, no account. Exits 1 when there are errors (or warnings with --strict), so it can gate CI.', [
|
|
128
|
+
{ name: '-f, --from <locale>', desc: 'Source locale (default: .babelize/config.json, then en)' },
|
|
129
|
+
{ name: '-l, --locales <list>', desc: 'Only these target locales, comma-separated' },
|
|
130
|
+
{ name: '--strict', desc: 'Fail on warnings too' },
|
|
131
|
+
{ name: '--json', desc: 'Output the full check as JSON' },
|
|
132
|
+
]);
|
|
133
|
+
}
|
|
134
|
+
//# sourceMappingURL=check.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"check.js","sourceRoot":"","sources":["../../src/commands/check.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EACL,mBAAmB,EACnB,eAAe,EACf,YAAY,GAGb,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,IAAI,UAAU,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AAS3F,2EAA2E;AAC3E,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,CAAC;AAE9B,uEAAuE;AACvE,MAAM,aAAa,GAAG,EAAE,CAAC;AAYzB,MAAM,UAAU,WAAW,CAAC,KAAyB;IACnD,MAAM,MAAM,GAAgB,EAAE,MAAM,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,cAAc,EAAE,CAAC,EAAE,CAAC;IACnG,KAAK,MAAM,GAAG,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC;QAC7B,MAAM,CAAC,UAAU,IAA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EAAE,UAAU,EAAE,IAAI,EAAE,sBAAsB,EAAE;QAClD,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,+BAA+B,EAAE;KAC1D,CACF,CAAC;AACN,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"glossary.d.ts","sourceRoot":"","sources":["../../src/commands/glossary.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAUpC,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"glossary.d.ts","sourceRoot":"","sources":["../../src/commands/glossary.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAUpC,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAqJ/D"}
|
|
@@ -25,7 +25,8 @@ export function registerGlossaryCommands(program) {
|
|
|
25
25
|
params.search = opts.search;
|
|
26
26
|
const res = await client.get(`/projects/${projectId}/glossary`, { params });
|
|
27
27
|
s.stop();
|
|
28
|
-
|
|
28
|
+
// Check for an array first: `.entries` on an array is Array.prototype.entries.
|
|
29
|
+
const items = Array.isArray(res.data) ? res.data : (res.data?.entries ?? res.data?.data ?? []);
|
|
29
30
|
if (isJsonMode()) {
|
|
30
31
|
printJson(items);
|
|
31
32
|
return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"glossary.js","sourceRoot":"","sources":["../../src/commands/glossary.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,EAAE,KAAK,EAA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":"init.d.ts","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAyBpC,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO,QAgPnD"}
|