gtx-cli 1.1.13 → 1.1.14
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/dist/cli/react.js +1 -1
- package/dist/main.js +1 -0
- package/dist/react/jsx/utils/parseJsx.js +12 -2
- package/package.json +4 -4
package/dist/cli/react.js
CHANGED
|
@@ -316,7 +316,7 @@ class ReactCLI extends base_1.BaseCLI {
|
|
|
316
316
|
}
|
|
317
317
|
else if (frameworkType === 'other') {
|
|
318
318
|
console.log(chalk_1.default.red(`\nSorry, at the moment we currently do not support other React frameworks.
|
|
319
|
-
Please let us know what you would like to see supported at https://github.com/
|
|
319
|
+
Please let us know what you would like to see supported at https://github.com/generaltranslation/gt/issues`));
|
|
320
320
|
process.exit(0);
|
|
321
321
|
}
|
|
322
322
|
const selectedFramework = frameworkType === 'next' ? 'next-pages' : 'next-app';
|
package/dist/main.js
CHANGED
|
@@ -8,4 +8,5 @@ const index_1 = __importDefault(require("./index"));
|
|
|
8
8
|
const dotenv_1 = __importDefault(require("dotenv"));
|
|
9
9
|
dotenv_1.default.config({ path: '.env' });
|
|
10
10
|
dotenv_1.default.config({ path: '.env.local', override: true });
|
|
11
|
+
dotenv_1.default.config({ path: '.env.production', override: true });
|
|
11
12
|
(0, index_1.default)();
|
|
@@ -207,9 +207,19 @@ function parseJSXElement(importAliases, node, updates, errors, file) {
|
|
|
207
207
|
if (!staticAnalysis.isStatic) {
|
|
208
208
|
errors.push((0, warnings_1.warnVariableProp)(file, attrName, code));
|
|
209
209
|
}
|
|
210
|
+
// Use the static value if available
|
|
211
|
+
if (staticAnalysis.isStatic && staticAnalysis.value !== undefined) {
|
|
212
|
+
componentObj.props[attrName] = staticAnalysis.value;
|
|
213
|
+
}
|
|
214
|
+
else {
|
|
215
|
+
// Only store the code if we couldn't extract a static value
|
|
216
|
+
componentObj.props[attrName] = code;
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
else {
|
|
220
|
+
// For other attributes that aren't id or context
|
|
221
|
+
componentObj.props[attrName] = code;
|
|
210
222
|
}
|
|
211
|
-
// Store the value (for all props)
|
|
212
|
-
componentObj.props[attrName] = code;
|
|
213
223
|
}
|
|
214
224
|
}
|
|
215
225
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gtx-cli",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.14",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"bin": "dist/main.js",
|
|
6
6
|
"scripts": {
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
},
|
|
26
26
|
"repository": {
|
|
27
27
|
"type": "git",
|
|
28
|
-
"url": "git+https://github.com/
|
|
28
|
+
"url": "git+https://github.com/generaltranslation/gt.git"
|
|
29
29
|
},
|
|
30
30
|
"keywords": [
|
|
31
31
|
"i18n",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"author": "",
|
|
39
39
|
"license": "FSL-1.1-ALv2",
|
|
40
40
|
"bugs": {
|
|
41
|
-
"url": "https://github.com/
|
|
41
|
+
"url": "https://github.com/generaltranslation/gt/issues"
|
|
42
42
|
},
|
|
43
43
|
"homepage": "https://generaltranslation.com/",
|
|
44
44
|
"description": "CLI tool for AI-powered i18n",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"esbuild": "^0.23.1",
|
|
55
55
|
"fast-glob": "^3.3.3",
|
|
56
56
|
"form-data": "^4.0.2",
|
|
57
|
-
"generaltranslation": "^6.2.
|
|
57
|
+
"generaltranslation": "^6.2.3",
|
|
58
58
|
"ora": "^8.2.0"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|