@intl-party/cli 1.0.2 → 1.1.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.
Files changed (5) hide show
  1. package/LICENSE +2 -2
  2. package/README.md +23 -41
  3. package/dist/cli.js +1267 -163
  4. package/dist/index.js +909 -46
  5. package/package.json +12 -4
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2024 IntlParty Team
3
+ Copyright (c) 2025-2026 IntlParty Team
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
@@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
18
  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
19
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
20
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
21
+ SOFTWARE.
package/README.md CHANGED
@@ -32,21 +32,16 @@ npm install --save-dev @intl-party/cli
32
32
  ### Initialize Configuration
33
33
 
34
34
  ```bash
35
- intl-party init
35
+ intl-party nextjs --init
36
36
  ```
37
37
 
38
- This creates an `intl-party.config.js` file:
38
+ This creates an `intl-party.config.ts` file:
39
39
 
40
- ```javascript
41
- module.exports = {
40
+ ```typescript
41
+ export default {
42
42
  locales: ["en", "es", "fr"],
43
43
  defaultLocale: "en",
44
- namespaces: ["common", "navigation"],
45
- translationsDir: "./messages",
46
- sourceDir: "./src",
47
- patterns: {
48
- extract: ["**/*.{ts,tsx,js,jsx}", "!**/*.test.*", "!**/node_modules/**"],
49
- },
44
+ messages: "./messages",
50
45
  };
51
46
  ```
52
47
 
@@ -62,32 +57,23 @@ This scans your source files for translation keys like:
62
57
 
63
58
  - `t('welcome')`
64
59
  - `useTranslations('common')('title')`
65
- - `<Trans i18nKey="description" />`
60
+ - `i18nKey="description"`
66
61
 
67
62
  ### Validate Translations
68
63
 
69
64
  Check for issues in your translations:
70
65
 
71
66
  ```bash
72
- intl-party validate
67
+ intl-party check
73
68
  ```
74
69
 
75
70
  Reports:
76
71
 
77
72
  - Missing translations in different locales
78
73
  - Unused translation keys
79
- - Inconsistent interpolation variables
80
- - Invalid pluralization forms
81
-
82
- ### Generate Translation Files
83
-
84
- Create missing translation files:
74
+ - Format errors in translations
85
75
 
86
- ```bash
87
- intl-party generate
88
- ```
89
-
90
- ### Sync Translations
76
+ ### Synchronize Translations
91
77
 
92
78
  Sync keys across all locales:
93
79
 
@@ -132,34 +118,30 @@ Example output:
132
118
  📝 Created: extracted-keys.json
133
119
  ```
134
120
 
135
- ### `intl-party validate`
121
+ ### `intl-party check`
136
122
 
137
- Validate existing translations.
123
+ Check for issues in translations and configuration.
138
124
 
139
125
  ```bash
140
- intl-party validate [options]
126
+ intl-party check [options]
141
127
 
142
128
  Options:
143
- --config <path> Configuration file path
144
- --locale <code> Validate specific locale only
145
- --strict Fail on warnings
146
- --format <type> Output format: text, json, junit (default: text)
129
+ --missing Check for missing translations
130
+ --unused Check for unused translation keys
131
+ --duplicates Check for duplicate keys
132
+ --format-errors Check for format errors in translations
133
+ --fix Automatically fix issues where possible
147
134
  ```
148
135
 
149
- Example output:
136
+ ### `intl-party check-config`
150
137
 
151
- ```
152
- 🔍 Validating translations...
153
-
154
- ❌ Missing translations (es):
155
- - common.welcome
156
- - navigation.home
138
+ Validate your IntlParty configuration.
157
139
 
158
- ⚠️ Unused translations (en):
159
- - common.oldKey
140
+ ```bash
141
+ intl-party check-config [options]
160
142
 
161
- ✅ All interpolation variables match
162
- 📊 Coverage: en (100%), es (87%), fr (92%)
143
+ Options:
144
+ -c, --config <path> Path to config file
163
145
  ```
164
146
 
165
147
  ### `intl-party generate`