@tolgee/cli 2.2.0 → 2.3.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.
- package/dist/commands/push.js +1 -1
- package/dist/extractor/runner.js +2 -2
- package/dist/utils/mapExportFormat.js +10 -0
- package/package.json +2 -2
- package/schema.json +5 -0
package/dist/commands/push.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
import { extname, join } from 'path';
|
2
2
|
import { readdir, readFile, stat } from 'fs/promises';
|
3
3
|
import { Command, Option } from 'commander';
|
4
|
-
import glob from '
|
4
|
+
import { glob } from 'glob';
|
5
5
|
import { loading, success, error, warn, exitWithError, } from '../utils/logger.js';
|
6
6
|
import { askString } from '../utils/ask.js';
|
7
7
|
import { mapImportFormat } from '../utils/mapImportFormat.js';
|
package/dist/extractor/runner.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import glob from '
|
1
|
+
import { glob } from 'glob';
|
2
2
|
import { extname } from 'path';
|
3
3
|
import { callWorker } from './worker.js';
|
4
4
|
import { exitWithError } from '../utils/logger.js';
|
@@ -54,7 +54,7 @@ export async function extractKeysOfFiles(opts) {
|
|
54
54
|
if (!opts.patterns?.length) {
|
55
55
|
exitWithError("Missing '--patterns' or 'config.patterns' option");
|
56
56
|
}
|
57
|
-
const files = await glob(opts.patterns, {
|
57
|
+
const files = await glob(opts.patterns, { nodir: true });
|
58
58
|
if (files.length === 0) {
|
59
59
|
exitWithError('No files were matched for extraction');
|
60
60
|
}
|
@@ -21,6 +21,8 @@ export const mapExportFormat = (format) => {
|
|
21
21
|
return { format: 'JSON', messageFormat: 'PHP_SPRINTF' };
|
22
22
|
case 'JSON_RUBY':
|
23
23
|
return { format: 'JSON', messageFormat: 'RUBY_SPRINTF' };
|
24
|
+
case 'JSON_I18NEXT':
|
25
|
+
return { format: 'JSON_I18NEXT', messageFormat: 'I18NEXT' };
|
24
26
|
case 'JSON_TOLGEE':
|
25
27
|
return { format: 'JSON_TOLGEE', messageFormat: 'ICU' };
|
26
28
|
case 'PO_C':
|
@@ -56,6 +58,14 @@ export const mapExportFormat = (format) => {
|
|
56
58
|
return { format: 'YAML', messageFormat: 'PHP_SPRINTF' };
|
57
59
|
case 'YAML_RUBY':
|
58
60
|
return { format: 'YAML_RUBY', messageFormat: 'RUBY_SPRINTF' };
|
61
|
+
case 'CSV_ICU':
|
62
|
+
return { format: 'CSV', messageFormat: 'ICU' };
|
63
|
+
case 'CSV_JAVA':
|
64
|
+
return { format: 'CSV', messageFormat: 'JAVA_STRING_FORMAT' };
|
65
|
+
case 'CSV_PHP':
|
66
|
+
return { format: 'CSV', messageFormat: 'PHP_SPRINTF' };
|
67
|
+
case 'CSV_RUBY':
|
68
|
+
return { format: 'CSV', messageFormat: 'RUBY_SPRINTF' };
|
59
69
|
case undefined:
|
60
70
|
return { format: 'JSON_TOLGEE', messageFormat: 'ICU' };
|
61
71
|
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@tolgee/cli",
|
3
|
-
"version": "2.
|
3
|
+
"version": "2.3.1",
|
4
4
|
"type": "module",
|
5
5
|
"description": "A tool to interact with the Tolgee Platform through CLI",
|
6
6
|
"repository": {
|
@@ -34,7 +34,7 @@
|
|
34
34
|
"base32-decode": "^1.0.0",
|
35
35
|
"commander": "^12.1.0",
|
36
36
|
"cosmiconfig": "^9.0.0",
|
37
|
-
"
|
37
|
+
"glob": "^11.0.0",
|
38
38
|
"json5": "^2.2.3",
|
39
39
|
"jsonschema": "^1.4.1",
|
40
40
|
"openapi-fetch": "^0.10.6",
|
package/schema.json
CHANGED
@@ -158,6 +158,7 @@
|
|
158
158
|
"enum": [
|
159
159
|
"JSON_TOLGEE",
|
160
160
|
"JSON_ICU",
|
161
|
+
"JSON_I18NEXT",
|
161
162
|
"JSON_JAVA",
|
162
163
|
"JSON_PHP",
|
163
164
|
"JSON_RUBY",
|
@@ -173,6 +174,10 @@
|
|
173
174
|
"PROPERTIES_JAVA",
|
174
175
|
"ANDROID_XML",
|
175
176
|
"FLUTTER_ARB",
|
177
|
+
"CSV_ICU",
|
178
|
+
"CSV_JAVA",
|
179
|
+
"CSV_PHP",
|
180
|
+
"CSV_RUBY",
|
176
181
|
"YAML_RUBY",
|
177
182
|
"YAML_JAVA",
|
178
183
|
"YAML_ICU",
|