locize-cli 10.4.0 → 11.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/CHANGELOG.md +9 -0
- package/README.md +6 -0
- package/add.js +1 -8
- package/bin/locize +272 -125
- package/convertToDesiredFormat.js +7 -23
- package/convertToFlatFormat.js +19 -43
- package/copyVersion.js +1 -1
- package/createBranch.js +1 -1
- package/deleteBranch.js +2 -2
- package/deleteNamespace.js +1 -1
- package/download.js +4 -4
- package/get.js +1 -2
- package/getBranches.js +1 -1
- package/getJob.js +1 -1
- package/getProjectStats.js +1 -1
- package/getRemoteLanguages.js +1 -1
- package/getRemoteNamespace.js +2 -2
- package/mergeBranch.js +2 -2
- package/migrate.js +3 -4
- package/missing.js +1 -1
- package/package.json +4 -4
- package/publishVersion.js +1 -1
- package/removeVersion.js +1 -1
- package/sync.js +9 -9
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,15 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
Project versioning adheres to [Semantic Versioning](http://semver.org/).
|
|
6
6
|
Change log format is based on [Keep a Changelog](http://keepachangelog.com/).
|
|
7
7
|
|
|
8
|
+
## [11.1.0](https://github.com/locize/locize-cli/compare/v11.1.0...v11.0.0) - 2025-12-11
|
|
9
|
+
|
|
10
|
+
- replace internal csv library to address security advisory #110
|
|
11
|
+
|
|
12
|
+
## [11.0.0](https://github.com/locize/locize-cli/compare/v10.4.0...v11.0.0) - 2025-12-10
|
|
13
|
+
|
|
14
|
+
- log/error is shown if cdnType is not defined, because of changing default to 'standard' instead of 'pro'
|
|
15
|
+
- internals: use apiEndpoint instead of addPath, getPath, etc...
|
|
16
|
+
|
|
8
17
|
## [10.4.0](https://github.com/locize/locize-cli/compare/v10.3.2...v10.4.0) - 2025-12-09
|
|
9
18
|
|
|
10
19
|
- introducing --cdn-type option
|
package/README.md
CHANGED
|
@@ -99,6 +99,8 @@ or
|
|
|
99
99
|
|
|
100
100
|
```sh
|
|
101
101
|
locize download
|
|
102
|
+
locize download --cdn-type standard
|
|
103
|
+
locize download --cdn-type pro
|
|
102
104
|
```
|
|
103
105
|
|
|
104
106
|
or add a format like (json, nested, flat, xliff2, xliff12, xlf2, xlf12, android, yaml, yaml-rails, yaml-rails-ns, yaml-nested, yml, yml-rails, yml-nested, csv, xlsx, po, strings, resx, fluent, tmx, laravel, properties, xcstrings)
|
|
@@ -152,6 +154,8 @@ Add your api-key and your project-id and let's go...
|
|
|
152
154
|
|
|
153
155
|
```sh
|
|
154
156
|
locize sync --api-key my-api-key-d9de-4f55-9855-a9ef0ed44672 --project-id my-project-id-93e1-442a-ab35-24331fa294ba
|
|
157
|
+
locize sync --cdn-type standard --api-key my-api-key-d9de-4f55-9855-a9ef0ed44672 --project-id my-project-id-93e1-442a-ab35-24331fa294ba
|
|
158
|
+
locize sync --cdn-type pro --api-key my-api-key-d9de-4f55-9855-a9ef0ed44672 --project-id my-project-id-93e1-442a-ab35-24331fa294ba
|
|
155
159
|
```
|
|
156
160
|
|
|
157
161
|
or add a format like (json, nested, flat, xliff2, xliff12, xlf2, xlf12, android, yaml, yaml-rails, yaml-rails-ns, yaml-nested, yml, yml-rails, yml-nested, csv, xlsx, po, strings, resx, fluent, tmx, laravel, properties, xcstrings)
|
|
@@ -216,6 +220,8 @@ Add your api-key and your project-id and let's go...
|
|
|
216
220
|
|
|
217
221
|
```sh
|
|
218
222
|
locize save-missing --api-key my-api-key-d9de-4f55-9855-a9ef0ed44672 --project-id my-project-id-93e1-442a-ab35-24331fa294ba
|
|
223
|
+
locize save-missing --cdn-type standard --api-key my-api-key-d9de-4f55-9855-a9ef0ed44672 --project-id my-project-id-93e1-442a-ab35-24331fa294ba
|
|
224
|
+
locize save-missing --cdn-type pro --api-key my-api-key-d9de-4f55-9855-a9ef0ed44672 --project-id my-project-id-93e1-442a-ab35-24331fa294ba
|
|
219
225
|
```
|
|
220
226
|
|
|
221
227
|
or add a format like (json, nested, flat, xliff2, xliff12, xlf2, xlf12, android, yaml, yaml-rails, yaml-rails-ns, yaml-nested, yml, yml-rails, yml-nested, csv, xlsx, po, strings, resx, fluent, tmx, laravel, properties, xcstrings)
|
package/add.js
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
const colors = require('colors')
|
|
2
2
|
const flatten = require('flat')
|
|
3
|
-
const { URL } = require('url')
|
|
4
3
|
const async = require('async')
|
|
5
4
|
const getRemoteLanguages = require('./getRemoteLanguages')
|
|
6
5
|
const request = require('./request')
|
|
7
6
|
|
|
8
7
|
const _add = (opt, cb) => {
|
|
9
|
-
|
|
10
|
-
const url = opt.addPath
|
|
8
|
+
const url = `${opt.apiEndpoint}/update/{{projectId}}/{{version}}/{{lng}}/{{ns}}`
|
|
11
9
|
.replace('{{projectId}}', opt.projectId)
|
|
12
10
|
.replace('{{ver}}', opt.version)
|
|
13
11
|
.replace('{{version}}', opt.version)
|
|
@@ -76,11 +74,6 @@ const _add = (opt, cb) => {
|
|
|
76
74
|
const add = (opt, cb) => {
|
|
77
75
|
if (opt.language) return _add(opt, cb)
|
|
78
76
|
|
|
79
|
-
if (!opt.apiPath) {
|
|
80
|
-
const parsed = new URL(opt.addPath)
|
|
81
|
-
opt.apiPath = parsed.protocol + '//' + parsed.host
|
|
82
|
-
}
|
|
83
|
-
|
|
84
77
|
getRemoteLanguages(opt, (err, lngs) => {
|
|
85
78
|
if (err) {
|
|
86
79
|
if (!cb) { console.error(colors.red(err.message)); process.exit(1) }
|