u2a 3.5.4 → 3.5.5
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/package.json +1 -1
- package/src/utils/upgradeLA.js +3 -3
package/package.json
CHANGED
package/src/utils/upgradeLA.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//seems still a bit
|
|
1
|
+
//seems still a bit unstable, thats why this feature is disabled by default
|
|
2
2
|
//enable with 'u2a configure autoupgrade enable'
|
|
3
3
|
|
|
4
4
|
|
|
@@ -34,10 +34,10 @@ function extractDimensionsFromMainJs(mainJsPath) {
|
|
|
34
34
|
|
|
35
35
|
const mainJsContent = fs.readFileSync(mainJsPath, 'utf8');
|
|
36
36
|
|
|
37
|
-
const widthMatch = mainJsContent.match(/
|
|
37
|
+
const widthMatch = mainJsContent.match(/const\s+WINDOW_WIDTH\s*=\s*(\d+)/);
|
|
38
38
|
const width = widthMatch ? parseInt(widthMatch[1], 10) : 1200;
|
|
39
39
|
|
|
40
|
-
const heightMatch = mainJsContent.match(/
|
|
40
|
+
const heightMatch = mainJsContent.match(/const\s+WINDOW_HEIGHT\s*=\s*(\d+)/);
|
|
41
41
|
const height = heightMatch ? parseInt(heightMatch[1], 10) : 800;
|
|
42
42
|
|
|
43
43
|
logger.debug(`Extracted dimensions from main.js: ${width}x${height}`);
|