@tolgee/cli 2.1.2 → 2.1.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.
@@ -128,7 +128,8 @@ export default (config) => new Command()
128
128
  .description('Pushes translations to Tolgee')
129
129
  .addOption(new Option('-f, --force-mode <mode>', 'What should we do with possible conflicts? If unspecified, the user will be prompted interactively, or the command will fail when in non-interactive')
130
130
  .choices(['OVERRIDE', 'KEEP', 'NO_FORCE'])
131
- .argParser((v) => v.toUpperCase()))
131
+ .argParser((v) => v.toUpperCase())
132
+ .default(config.push?.forceMode))
132
133
  .addOption(new Option('--override-key-descriptions', 'Override existing key descriptions from local files (only relevant for some formats).').default(config.push?.overrideKeyDescriptions ?? true))
133
134
  .addOption(new Option('--convert-placeholders-to-icu', 'Convert placeholders in local files to ICU format.').default(config.push?.convertPlaceholdersToIcu ?? true))
134
135
  .addOption(new Option('-l, --languages <languages...>', 'Specifies which languages should be pushed (see push.files in config).').default(config.push?.languages))
@@ -21,8 +21,8 @@ function parseConfig(input, configDir) {
21
21
  }
22
22
  }
23
23
  if (rc.projectId !== undefined) {
24
- const projectId = Number(rc.projectId); // Number("") returns 0
25
- if (!Number.isInteger(projectId) || projectId <= 0) {
24
+ rc.projectId = Number(rc.projectId); // Number("") returns 0
25
+ if (!Number.isInteger(rc.projectId) || rc.projectId <= 0) {
26
26
  throw new Error('Invalid config: projectId should be an integer representing your project Id');
27
27
  }
28
28
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tolgee/cli",
3
- "version": "2.1.2",
3
+ "version": "2.1.4",
4
4
  "type": "module",
5
5
  "description": "A tool to interact with the Tolgee Platform through CLI",
6
6
  "repository": {