gtx-cli 2.4.7 → 2.4.9

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
@@ -1,5 +1,18 @@
1
1
  # gtx-cli
2
2
 
3
+ ## 2.4.9
4
+
5
+ ### Patch Changes
6
+
7
+ - [#774](https://github.com/generaltranslation/gt/pull/774) [`87dab40`](https://github.com/generaltranslation/gt/commit/87dab40efc9469d6ba3b3dc143d7d7a27422f7b0) Thanks [@fernando-aviles](https://github.com/fernando-aviles)! - Hiding saving local translations behind the --save-local flag
8
+
9
+ ## 2.4.8
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies [[`7434c15`](https://github.com/generaltranslation/gt/commit/7434c1503c2a62bdb90d4058f903a56331276365)]:
14
+ - generaltranslation@7.8.0
15
+
3
16
  ## 2.4.7
4
17
 
5
18
  ### Patch Changes
@@ -86,18 +86,20 @@ export async function sendFiles(files, options, settings) {
86
86
  setupSpinner.stop(chalk.yellow(`Setup ${setupFailedMessage ? 'failed' : 'timed out'} — proceeding without setup${setupFailedMessage ? ` (${setupFailedMessage})` : ''}`));
87
87
  }
88
88
  }
89
- // Step 3: Prior to enqueue, detect and submit user edit diffs (minimal UX)
90
- const prepSpinner = createSpinner('dots');
91
- currentSpinner = prepSpinner;
92
- prepSpinner.start('Updating translations...');
93
- try {
94
- await collectAndSendUserEditDiffs(upload.uploadedFiles, settings);
95
- }
96
- catch {
97
- // Non-fatal; keep going to enqueue
98
- }
99
- finally {
100
- prepSpinner.stop('Updated translations');
89
+ // Step 3 (optional): Prior to enqueue, detect and submit user edit diffs
90
+ if (options?.saveLocal) {
91
+ const prepSpinner = createSpinner('dots');
92
+ currentSpinner = prepSpinner;
93
+ prepSpinner.start('Updating translations...');
94
+ try {
95
+ await collectAndSendUserEditDiffs(upload.uploadedFiles, settings);
96
+ }
97
+ catch {
98
+ // Non-fatal; keep going to enqueue
99
+ }
100
+ finally {
101
+ prepSpinner.stop('Updated translations');
102
+ }
101
103
  }
102
104
  // Step 4: Enqueue translations by reference
103
105
  const enqueueSpinner = createSpinner('dots');
package/dist/cli/flags.js CHANGED
@@ -20,6 +20,7 @@ export function attachTranslateFlags(command) {
20
20
  }
21
21
  return parsedValue;
22
22
  }, DEFAULT_TIMEOUT)
23
+ .option('--save-local', 'Detect and save local edits before enqueuing translations', false)
23
24
  .option('--publish', 'Publish translations to the CDN', false)
24
25
  .option('--experimental-localize-static-urls', 'Triggering this will run a script after the cli tool that localizes all urls in content files. Currently only supported for md and mdx files.', false)
25
26
  .option('--experimental-hide-default-locale', 'When localizing static locales, hide the default locale from the path', false)
@@ -39,6 +39,7 @@ export type TranslateFlags = {
39
39
  src?: string[];
40
40
  timeout: number;
41
41
  dryRun: boolean;
42
+ saveLocal?: boolean;
42
43
  stageTranslations?: boolean;
43
44
  publish?: boolean;
44
45
  force?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gtx-cli",
3
- "version": "2.4.7",
3
+ "version": "2.4.9",
4
4
  "main": "dist/index.js",
5
5
  "bin": "dist/main.js",
6
6
  "files": [
@@ -93,7 +93,7 @@
93
93
  "unified": "^11.0.5",
94
94
  "unist-util-visit": "^5.0.0",
95
95
  "yaml": "^2.8.0",
96
- "generaltranslation": "7.7.3"
96
+ "generaltranslation": "7.8.0"
97
97
  },
98
98
  "devDependencies": {
99
99
  "@babel/types": "^7.28.4",