locize-cli 8.4.0 → 8.5.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 +4 -0
- package/bin/locize +5 -1
- package/package.json +2 -2
- package/publishVersion.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,10 @@ 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
|
+
## [8.5.0](https://github.com/locize/locize-cli/compare/v8.4.0...v8.5.0) - 2025-02-18
|
|
9
|
+
|
|
10
|
+
- feat: add --tenants option for publish version command [102](https://github.com/locize/locize-cli/issues/102)
|
|
11
|
+
|
|
8
12
|
## [8.4.0](https://github.com/locize/locize-cli/compare/v8.3.1...v8.4.0) - 2024-12-23
|
|
9
13
|
|
|
10
14
|
- feat: add --auto-translate option for sync command [101](https://github.com/locize/locize-cli/pull/101)
|
package/bin/locize
CHANGED
|
@@ -599,6 +599,7 @@ program
|
|
|
599
599
|
.option('-k, --api-key <apiKey>', 'The api-key that should be used')
|
|
600
600
|
.option('-v, --ver <version>', 'The version to be used to publish (default: latest)')
|
|
601
601
|
.option('-i, --project-id <projectId>', 'The project-id that should be used')
|
|
602
|
+
.option('-t, --tenants <true|false>', 'Publish also tenants (if using multi-tenant setup) (default: false)', 'false')
|
|
602
603
|
.option('-C, --config-path <configPath>', `Specify the path to the optional locize config file (default: ${configInWorkingDirectory} or ${configInHome})`)
|
|
603
604
|
.action((options) => {
|
|
604
605
|
try {
|
|
@@ -623,11 +624,14 @@ program
|
|
|
623
624
|
|
|
624
625
|
const getPath = options.getPath || config.getPath || getPathUrl;
|
|
625
626
|
|
|
627
|
+
const tenants = options.tenants === 'true';
|
|
628
|
+
|
|
626
629
|
publishVersion({
|
|
627
630
|
apiKey: apiKey,
|
|
628
631
|
projectId: projectId,
|
|
629
632
|
apiPath: url.parse(getPath).protocol + '//' + url.parse(getPath).host,
|
|
630
|
-
version: version
|
|
633
|
+
version: version,
|
|
634
|
+
tenants: tenants
|
|
631
635
|
});
|
|
632
636
|
})
|
|
633
637
|
.on('--help', () => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "locize-cli",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.5.0",
|
|
4
4
|
"description": "locize cli to import locales",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"scripts": {
|
|
42
42
|
"lint": "eslint .",
|
|
43
43
|
"test": "npm run lint",
|
|
44
|
-
"pkg": "mkdir -p ./bins && pkg ./bin/locize --out-path ./bins --targets
|
|
44
|
+
"pkg": "mkdir -p ./bins && pkg ./bin/locize --out-path ./bins --targets node22-linux-x64,node22-macos-x64,node22-win-x64,node22-alpine-x64",
|
|
45
45
|
"release": "gh-release --assets ./bins/locize-linux,./bins/locize-macos,./bins/locize-win.exe,./bins/locize-alpine",
|
|
46
46
|
"version": "npm run pkg",
|
|
47
47
|
"postversion": "git push && npm run release"
|
package/publishVersion.js
CHANGED
|
@@ -3,7 +3,7 @@ const request = require('./request');
|
|
|
3
3
|
const getJob = require('./getJob');
|
|
4
4
|
|
|
5
5
|
const publishVersion = (opt, cb) => {
|
|
6
|
-
request(opt.apiPath + '/publish/' + opt.projectId + '/' + opt.version, {
|
|
6
|
+
request(opt.apiPath + '/publish/' + opt.projectId + '/' + opt.version + (opt.tenants ? '?tenants=true' : ''), {
|
|
7
7
|
method: 'post',
|
|
8
8
|
headers: {
|
|
9
9
|
'Authorization': opt.apiKey
|