gtx-cli 2.4.2 → 2.4.3

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,14 @@
1
1
  # gtx-cli
2
2
 
3
+ ## 2.4.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [#755](https://github.com/generaltranslation/gt/pull/755) [`20ec920`](https://github.com/generaltranslation/gt/commit/20ec920ecf3fb04e464f281400429c68f3c1a701) Thanks [@fernando-aviles](https://github.com/fernando-aviles)! - Passing project locales as part of translation setup process
8
+
9
+ - Updated dependencies [[`20ec920`](https://github.com/generaltranslation/gt/commit/20ec920ecf3fb04e464f281400429c68f3c1a701)]:
10
+ - generaltranslation@7.7.2
11
+
3
12
  ## 2.4.2
4
13
 
5
14
  ### Patch Changes
@@ -47,18 +47,15 @@ export async function sendFiles(files, options, settings) {
47
47
  modelProvider: settings.modelProvider,
48
48
  });
49
49
  uploadSpinner.stop(chalk.green('Files uploaded successfully'));
50
- // Check if setup is needed
51
- const setupDecision = await Promise.resolve(gt.shouldSetupProject?.())
52
- .then((v) => v)
53
- .catch(() => ({ shouldSetupProject: false }));
54
- const shouldSetupProject = Boolean(setupDecision?.shouldSetupProject);
55
- // Step 2: Setup if needed and poll until complete
56
- if (shouldSetupProject) {
57
- // Calculate timeout once for setup fetching
58
- // Accept number or numeric string, default to 600s
59
- const timeoutVal = options?.timeout !== undefined ? Number(options.timeout) : 600;
60
- const setupTimeoutMs = (Number.isFinite(timeoutVal) ? timeoutVal : 600) * 1000;
61
- const { setupJobId } = await gt.setupProject(upload.uploadedFiles);
50
+ // Calculate timeout once for setup fetching
51
+ // Accept number or numeric string, default to 600s
52
+ const timeoutVal = options?.timeout !== undefined ? Number(options.timeout) : 600;
53
+ const setupTimeoutMs = (Number.isFinite(timeoutVal) ? timeoutVal : 600) * 1000;
54
+ const setupResult = await gt.setupProject(upload.uploadedFiles, {
55
+ locales: settings.locales,
56
+ });
57
+ if (setupResult?.status === 'queued') {
58
+ const { setupJobId } = setupResult;
62
59
  const setupSpinner = createSpinner('dots');
63
60
  currentSpinner = setupSpinner;
64
61
  setupSpinner.start('Setting up project...');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gtx-cli",
3
- "version": "2.4.2",
3
+ "version": "2.4.3",
4
4
  "main": "dist/index.js",
5
5
  "bin": "dist/main.js",
6
6
  "files": [
@@ -92,7 +92,7 @@
92
92
  "unified": "^11.0.5",
93
93
  "unist-util-visit": "^5.0.0",
94
94
  "yaml": "^2.8.0",
95
- "generaltranslation": "7.7.1"
95
+ "generaltranslation": "7.7.2"
96
96
  },
97
97
  "devDependencies": {
98
98
  "@babel/types": "^7.28.4",