@tolgee/cli 2.0.2 → 2.0.4
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/pull.js +3 -5
- package/package.json +9 -13
package/dist/commands/pull.js
CHANGED
@@ -14,7 +14,7 @@ async function fetchZipBlob(opts) {
|
|
14
14
|
supportArrays: opts.supportArrays,
|
15
15
|
languages: opts.languages,
|
16
16
|
filterState: opts.states,
|
17
|
-
structureDelimiter: opts.delimiter,
|
17
|
+
structureDelimiter: opts.delimiter ?? '',
|
18
18
|
filterNamespace: opts.namespaces,
|
19
19
|
filterTagIn: opts.tags,
|
20
20
|
filterTagNotIn: opts.excludeTags,
|
@@ -38,14 +38,12 @@ export default (config) => new Command()
|
|
38
38
|
.name('pull')
|
39
39
|
.description('Pulls translations from Tolgee')
|
40
40
|
.addOption(new Option('--path <path>', 'Destination of a folder where translation files will be stored in').default(config.pull?.path))
|
41
|
-
.addOption(new Option('-l, --languages <languages...>', 'List of languages to pull. Leave unspecified to export them all').default(config.pull?.
|
41
|
+
.addOption(new Option('-l, --languages <languages...>', 'List of languages to pull. Leave unspecified to export them all').default(config.pull?.languages))
|
42
42
|
.addOption(new Option('-s, --states <states...>', 'List of translation states to include. Defaults all except untranslated')
|
43
43
|
.choices(['UNTRANSLATED', 'TRANSLATED', 'REVIEWED'])
|
44
44
|
.default(config.pull?.states)
|
45
45
|
.argParser((v, a) => [v.toUpperCase(), ...(a || [])]))
|
46
|
-
.addOption(new Option('-d, --delimiter', 'Structure delimiter to use. By default, Tolgee interprets `.` as a nested structure. You can change the delimiter, or disable structure formatting by not specifying any value to the option')
|
47
|
-
.default(config.pull?.delimiter ?? '.')
|
48
|
-
.argParser((v) => v || ''))
|
46
|
+
.addOption(new Option('-d, --delimiter <delimiter>', 'Structure delimiter to use. By default, Tolgee interprets `.` as a nested structure. You can change the delimiter, or disable structure formatting by not specifying any value to the option').default(config.pull?.delimiter === undefined ? '.' : config.pull.delimiter))
|
49
47
|
.addOption(new Option('-n, --namespaces <namespaces...>', 'List of namespaces to pull. Defaults to all namespaces').default(config.pull?.namespaces))
|
50
48
|
.addOption(new Option('-t, --tags <tags...>', 'List of tags which to include. Keys tagged by at least one of these tags will be included.').default(config.pull?.tags))
|
51
49
|
.addOption(new Option('--exclude-tags <tags...>', 'List of tags which to exclude. Keys tagged by at least one of these tags will be excluded.').default(config.pull?.excludeTags))
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@tolgee/cli",
|
3
|
-
"version": "2.0.
|
3
|
+
"version": "2.0.4",
|
4
4
|
"type": "module",
|
5
5
|
"description": "A tool to interact with the Tolgee Platform through CLI",
|
6
6
|
"repository": {
|
@@ -11,16 +11,15 @@
|
|
11
11
|
"tolgee": "./dist/cli.js"
|
12
12
|
},
|
13
13
|
"scripts": {
|
14
|
-
"build": "rimraf dist dist-types && tsc && node scripts/copyExtractorTypes.mjs",
|
15
|
-
"test": "
|
16
|
-
"test:unit": "
|
17
|
-
"test:e2e": "
|
18
|
-
"test:e2e-run": "cross-env NODE_OPTIONS=\"--experimental-vm-modules\" jest -c jest.e2e.config.ts --runInBand",
|
14
|
+
"build": "rimraf dist dist-types && tsc -p tsconfig.prod.json && node scripts/copyExtractorTypes.mjs",
|
15
|
+
"test": "vitest run",
|
16
|
+
"test:unit": "vitest run -c unit.vitest.config.ts --dir ./src/test/unit",
|
17
|
+
"test:e2e": "vitest run --dir ./src/test/e2e",
|
19
18
|
"test:package": "node scripts/validatePackage.js",
|
20
19
|
"tolgee:start": "node scripts/startDocker.js",
|
21
20
|
"tolgee:stop": "docker stop tolgee_cli_e2e",
|
22
|
-
"lint": "eslint --ext .ts --ext .js --ext .cjs ./src ./
|
23
|
-
"prettier": "prettier --write ./src ./
|
21
|
+
"lint": "eslint --ext .ts --ext .js --ext .cjs ./src ./scripts vitest.config.ts",
|
22
|
+
"prettier": "prettier --write ./src ./scripts vitest.config.ts",
|
24
23
|
"run-dev": "cross-env NODE_OPTIONS=\"--import=./scripts/registerTsNode.js\" node ./src/cli.ts",
|
25
24
|
"schema": "openapi-typescript http://localhost:22222/v3/api-docs/All%20Internal%20-%20for%20Tolgee%20Web%20application --output src/client/internal/schema.generated.ts",
|
26
25
|
"release": "semantic-release",
|
@@ -47,16 +46,13 @@
|
|
47
46
|
"devDependencies": {
|
48
47
|
"@semantic-release/changelog": "^6.0.3",
|
49
48
|
"@semantic-release/git": "^10.0.1",
|
50
|
-
"@types/jest": "^29.5.3",
|
51
49
|
"@types/node": "^20.4.5",
|
52
50
|
"@types/yauzl": "^2.10.0",
|
53
51
|
"@typescript-eslint/eslint-plugin": "^6.2.0",
|
54
52
|
"@typescript-eslint/parser": "^6.2.0",
|
55
53
|
"cross-env": "^7.0.3",
|
56
54
|
"eslint": "^8.45.0",
|
57
|
-
"eslint-plugin-jest": "^27.2.3",
|
58
55
|
"eslint-plugin-prettier": "^5.0.0",
|
59
|
-
"jest": "^29.7.0",
|
60
56
|
"js-yaml": "^4.1.0",
|
61
57
|
"json-schema-to-typescript": "^13.1.2",
|
62
58
|
"openapi-typescript": "^6.7.6",
|
@@ -64,9 +60,9 @@
|
|
64
60
|
"rimraf": "^5.0.1",
|
65
61
|
"semantic-release": "^21.0.7",
|
66
62
|
"tree-cli": "^0.6.7",
|
67
|
-
"ts-jest": "^29.1.3",
|
68
63
|
"ts-node": "^10.9.2",
|
69
|
-
"typescript": "^5.4.5"
|
64
|
+
"typescript": "^5.4.5",
|
65
|
+
"vitest": "^1.6.0"
|
70
66
|
},
|
71
67
|
"engines": {
|
72
68
|
"node": ">= 18"
|