locize-cli 7.13.0 → 7.13.2

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 CHANGED
@@ -5,6 +5,14 @@ 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
+ ## [7.13.2](https://github.com/locize/locize-cli/compare/v7.13.1...v7.13.2) - 2023-01-24
9
+
10
+ - update dependencies to fix reported vulnerabilities [#81](https://github.com/locize/locize-cli/issues/81)
11
+
12
+ ## [7.13.1](https://github.com/locize/locize-cli/compare/v7.13.0...v7.13.1) - 2022-12-08
13
+
14
+ - optimize migrate command
15
+
8
16
  ## [7.13.0](https://github.com/locize/locize-cli/compare/v7.12.12...v7.13.0) - 2022-12-08
9
17
 
10
18
  - migrate command will use missing route if replace param is false or not passed and will also automaticaly create languages (make sure to use an api key with admin permissions)
package/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2023 locize
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
22
+
package/README.md CHANGED
@@ -86,6 +86,10 @@ or add a format like (json, flat, xliff2, xliff12, xlf2, xlf12, android, yaml, y
86
86
  locize download --project-id my-project-id-93e1-442a-ab35-24331fa294ba --ver latest --language en --namespace namespace1 --path ./backup --format android
87
87
  ```
88
88
 
89
+ ### GitHub Action
90
+
91
+ There's also a [GitHub Action](https://github.com/marketplace/actions/locize-download) that handles the download in your CI/CD workflow.
92
+
89
93
 
90
94
  ## Synchronize locize with your repository (or any other local directory)
91
95
  By using the sync command, you can keep your existing code setup and synchronize the translations with locize.
@@ -223,7 +227,7 @@ locize delete-namespace common --api-key my-api-key-d9de-4f55-9855-a9ef0ed44672
223
227
 
224
228
  ## Migration of existing i18next files
225
229
  We suggest to use the sync command instead of the migrate command.
226
- The migrate command is older and only works with json files.
230
+ The migrate command should be used only once and only works with json files.
227
231
 
228
232
  ### Step 1: Go near to your translation files
229
233
 
package/migrate.js CHANGED
@@ -230,18 +230,29 @@ const migrate = (opt, cb) => {
230
230
  require('os').cpus().length,
231
231
  (l, done) => addLanguage(opt, l, done),
232
232
  (err) => {
233
- upload(opt, nss, (err) => {
234
- if (err) {
235
- if (!cb) {
236
- console.error(colors.red(err.stack));
237
- process.exit(1);
238
- }
239
- if (cb) cb(err);
240
- return;
233
+ if (err) {
234
+ if (!cb) {
235
+ console.error(colors.red(err.stack));
236
+ process.exit(1);
241
237
  }
242
- if (!cb) console.log(colors.green('FINISHED'));
243
- if (cb) cb(null);
244
- });
238
+ if (cb) cb(err);
239
+ return;
240
+ }
241
+ setTimeout(() => {
242
+ // wait a bit to make sure project is up-to-date also in cache
243
+ upload(opt, nss, (err) => {
244
+ if (err) {
245
+ if (!cb) {
246
+ console.error(colors.red(err.stack));
247
+ process.exit(1);
248
+ }
249
+ if (cb) cb(err);
250
+ return;
251
+ }
252
+ if (!cb) console.log(colors.green('FINISHED'));
253
+ if (cb) cb(null);
254
+ });
255
+ }, 5000);
245
256
  }
246
257
  );
247
258
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "locize-cli",
3
- "version": "7.13.0",
3
+ "version": "7.13.2",
4
4
  "description": "locize cli to import locales",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -8,11 +8,11 @@
8
8
  },
9
9
  "dependencies": {
10
10
  "@js.properties/properties": "0.5.4",
11
- "android-string-resource": "2.3.8",
11
+ "android-string-resource": "2.3.9",
12
12
  "async": "3.2.4",
13
13
  "cacheable-lookup": "6.1.0",
14
14
  "colors": "1.4.0",
15
- "commander": "9.4.1",
15
+ "commander": "9.5.0",
16
16
  "csvjson": "5.1.0",
17
17
  "diff": "5.1.0",
18
18
  "flat": "5.0.2",
@@ -23,8 +23,8 @@
23
23
  "js-yaml": "4.1.0",
24
24
  "laravelphp": "2.0.3",
25
25
  "lodash.clonedeep": "4.5.0",
26
- "mkdirp": "1.0.4",
27
- "node-fetch": "2.6.7",
26
+ "mkdirp": "2.1.3",
27
+ "node-fetch": "2.6.8",
28
28
  "resx": "2.0.3",
29
29
  "rimraf": "3.0.2",
30
30
  "strings-file": "0.0.5",
@@ -33,8 +33,8 @@
33
33
  "xlsx": "0.18.5"
34
34
  },
35
35
  "devDependencies": {
36
- "eslint": "8.29.0",
37
- "gh-release": "6.0.4",
36
+ "eslint": "8.32.0",
37
+ "gh-release": "7.0.2",
38
38
  "pkg": "5.8.0"
39
39
  },
40
40
  "scripts": {