i18ntk 1.6.3 → 1.7.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/README.md CHANGED
@@ -2,8 +2,8 @@
2
2
 
3
3
  ![i18ntk Logo](docs/screenshots/i18ntk-logo-public.PNG)
4
4
 
5
- **Version:** 1.6.3
6
- **Last Updated:** 2025-08-09
5
+ **Version:** 1.7.0
6
+ **Last Updated:** 2025-08-10
7
7
  **GitHub Repository:** [vladnoskv/i18ntk](https://github.com/vladnoskv/i18ntk)
8
8
 
9
9
  [![npm](https://img.shields.io/npm/dt/i18ntk.svg)](https://www.npmjs.com/package/i18ntk) [![npm version](https://badge.fury.io/js/i18ntk.svg)](https://badge.fury.io/js/i18ntk) [![Node.js Version](https://img.shields.io/badge/node-%3E%3D16.0.0-brightgreen.svg)](https://nodejs.org/) [![Downloads](https://img.shields.io/npm/dm/i18ntk.svg)](https://www.npmjs.com/package/i18ntk) [![GitHub stars](https://img.shields.io/github/stars/vladnoskv/i18ntk?style=social)](https://github.com/vladnoskv/i18ntk)
@@ -14,7 +14,7 @@
14
14
 
15
15
  > **Zero dependencies** | **Works with any framework** | **Enterprise-grade security**
16
16
 
17
- > **v1.6.0** - **Ultra-extreme performance improvements to the i18ntk toolkit with 97% speed improvement** ⚡ Under 30ms for 200k keys (vs 1.2 seconds), up to 86% package size reduction, zero runtime dependencies.
17
+ > **v1.7.0** 97% speed improvement (**15.38ms** for 200k keys), new watch helper, and a lite English-only UI locale framework; up to 86% package size reduction, zero runtime dependencies, enhanced security with PIN protection, and comprehensive edge case handling.
18
18
 
19
19
  ## 🚀 Quick Start
20
20
 
@@ -23,11 +23,11 @@
23
23
  npm i i18ntk
24
24
 
25
25
  # Interactive setup
26
- npx i18ntk init
26
+ npx i18ntk
27
27
 
28
28
  # Basic commands
29
29
  i18ntk analyze --source ./src
30
- i18ntk complete --config=extreme
30
+ i18ntk complete --source ./src
31
31
  i18ntk validate --source ./locales
32
32
  ```
33
33
 
@@ -35,18 +35,25 @@ i18ntk validate --source ./locales
35
35
 
36
36
  | Mode | Time (200k keys) | Memory | Package Size |
37
37
  |------|------------------|--------|--------------|
38
+ | **Ultra-Extreme** | **15.38ms** | 1.62MB | 115KB-830KB |
38
39
  | **Extreme** | **38.90ms** | 0.61MB | 115KB-830KB |
39
40
  | Ultra | 336.8ms | 0.64MB | Configurable |
40
41
  | Optimized | 847.9ms | 0.45MB | Full package |
41
42
 
42
43
  ## 🎯 Key Features
43
44
 
44
- - **Ultra Performance**: 97% speed improvement with extreme optimization
45
+ - **Ultra-Extreme Performance**: 97% speed improvement - **15.38ms** for 200k keys
46
+ - **Enhanced Security**: Advanced PIN protection with exponential backoff & AES-256 encryption
47
+ - **Edge Case Handling**: Robust handling of corrupt files, encoding issues, and network failures
45
48
  - **Smart Sizing**: Interactive locale optimizer (up to 86% size reduction)
46
- - **Enterprise Security**: Admin PIN protection & comprehensive validation
49
+ - **Enterprise Backup**: Automated encrypted backups with cloud integration
47
50
  - **Zero Dependencies**: Lightweight, production-ready
48
- - **7 Languages**: English, Spanish, French, German, Japanese, Russian, Chinese
49
- - **Framework Support**: Auto-detects React i18next, Vue i18n, Angular, Next i18next, Nuxt i18n, Svelte i18n
51
+ - **Watch Helper**: Optional `--watch` mode keeps translations synced in real time
52
+ - **Lite Package Framework**: Build an English-only UI locale bundle for minimal footprint
53
+ - **8 Languages**: English, Spanish, French, German, Japanese, Russian, Chinese, and more
54
+ - **Framework Support**: Auto-detects React i18next, Vue i18n, Angular, Next i18next, Nuxt i18next, Svelte i18n
55
+ - **Memory Optimization**: 67% memory reduction with streaming processing
56
+ - **Scalability**: Linear scaling up to 5M keys with ultra-extreme settings
50
57
 
51
58
  ### 📸 Screenshots
52
59
 
@@ -68,10 +75,12 @@ i18ntk validate --source ./locales
68
75
  |---------|---------|---------|
69
76
  | `init` | Setup project | `i18ntk init --interactive` |
70
77
  | `analyze` | Find missing translations | `i18ntk analyze --source ./src` |
71
- | `complete` | Generate translations | `i18ntk complete --config=extreme` |
78
+ | `complete` | Generate translations | `i18ntk complete --config=ultra-extreme` |
72
79
  | `validate` | Check translation quality | `i18ntk validate --strict` |
73
80
  | `sync` | Sync across languages | `i18ntk sync --languages en,es,fr` |
74
81
  | `usage` | Analyze usage patterns | `i18ntk usage --format=json` |
82
+ | `doctor` | Diagnose configuration issues | `i18ntk doctor` |
83
+ | `sizing` | Optimize package size | `i18ntk sizing --interactive` |
75
84
 
76
85
  ## 🔧 Configuration
77
86
 
@@ -79,19 +88,45 @@ Configuration is managed through the `settings/i18ntk-config.json` file:
79
88
 
80
89
  ```json
81
90
  {
82
- "version": "1.6.3",
91
+ "version": "1.7.0",
83
92
  "sourceDir": "./locales",
84
93
  "outputDir": "./i18ntk-reports",
85
94
  "defaultLanguage": "en",
86
- "supportedLanguages": ["en", "es", "fr", "de"],
95
+ "supportedLanguages": ["en", "es", "fr", "de", "ja", "ru", "zh"],
87
96
  "performance": {
88
- "mode": "extreme",
89
- "batchSize": 1000,
90
- "concurrency": 16
97
+ "mode": "ultra-extreme",
98
+ "batchSize": 2000,
99
+ "concurrency": 32,
100
+ "memoryLimit": "256MB",
101
+ "streaming": true,
102
+ "compression": "brotli"
103
+ },
104
+ "security": {
105
+ "adminPinEnabled": true,
106
+ "sessionTimeout": 30,
107
+ "maxFailedAttempts": 3
108
+ },
109
+ "backup": {
110
+ "enabled": true,
111
+ "retentionDays": 30,
112
+ "maxBackups": 100
91
113
  }
92
114
  }
93
115
  ```
94
116
 
117
+ ### Environment Variables
118
+
119
+ You can override common path settings with environment variables:
120
+
121
+ | Variable | Overrides | Description |
122
+ |----------|-----------|-------------|
123
+ | `I18NTK_PROJECT_ROOT` | `projectRoot` | Base project directory |
124
+ | `I18NTK_SOURCE_DIR` | `sourceDir` | Location of source translation files |
125
+ | `I18NTK_I18N_DIR` | `i18nDir` | Working i18n directory |
126
+ | `I18NTK_OUTPUT_DIR` | `outputDir` | Output directory for generated reports |
127
+
128
+ These values are merged into the loaded configuration at runtime.
129
+
95
130
  ## 🌍 Language Optimization
96
131
 
97
132
  ```bash
@@ -130,13 +165,20 @@ import { createI18n } from 'vue-i18n';
130
165
  const i18n = createI18n({ locale: 'en', messages: translations });
131
166
  ```
132
167
 
133
-
134
168
  ## 🔒 Security Features
135
169
 
136
- - **Admin PIN Protection**: File role-based access control
137
- - **Input Sanitization**: Path traversal prevention
138
- - **File Validation**: Safe file operations
139
- - **Session Management**: Automatic timeout & cleanup
170
+ - **Admin PIN Protection**: AES-256-GCM encryption with 30-min sessions
171
+ - **Advanced Input Sanitization**: Comprehensive path traversal prevention
172
+ - **Zero-Trust Architecture**: All inputs validated and sanitized
173
+ - **Session Management**: Automatic timeout & cleanup with exponential backoff
174
+ - **File Validation**: Safe file operations with permission checks
175
+ - **Edge Case Security**: Robust handling of security edge cases
176
+ - **Encrypted Backups**: AES-256 encrypted backup storage
177
+
178
+ ### 🎯 **NEW INTERACTIVE LOCALE OPTIMIZER** - up to 86% Package Size Reduction
179
+ - **Package Size**: 830.4KB → 115.3KB (86% reduction for English only)
180
+ - **Smart Management**: Interactive selection with automatic backups
181
+ - **Zero Breaking Changes**: Safe restoration from backups
140
182
 
141
183
  ## 📋 Project Structure
142
184
 
@@ -157,7 +199,8 @@ your-project/
157
199
 
158
200
  - **Locale files are backed up automatically** before optimization
159
201
  - **Use interactive optimizer** for safe locale management
160
- - **Zero breaking changes** from v1.5.x to v1.6.3
202
+ - **Zero breaking changes** from v1.6.x to v1.7.0
203
+ - **All versions prior to 1.7.0 are deprecated**
161
204
  - **All improvements applied automatically** on update
162
205
 
163
206
  ## 📞 Support
@@ -175,7 +218,7 @@ your-project/
175
218
 
176
219
  ### Upgrading from Deprecated Versions
177
220
 
178
- #### From any version < 1.6.3 (DEPRECATED - use latest version)
221
+ #### From any version < 1.7.0 (DEPRECATED - use latest version)
179
222
  1. **Backup your current configuration**:
180
223
  ```bash
181
224
  cp -r ./.i18ntk ./.i18ntk-backup-$(date +%Y%m%d)
@@ -183,7 +226,13 @@ your-project/
183
226
 
184
227
  2. **Install the latest version**:
185
228
  ```bash
186
- npm install i18ntk@1.6.3
229
+ npm install i18ntk@1.7.0
230
+ ```
231
+
232
+ 3. **Verify installation**:
233
+ ```bash
234
+ i18ntk --version
235
+ i18ntk doctor
187
236
  ```
188
237
 
189
238
  3. **Run configuration migration**: