plusui-native 0.2.50 → 0.2.53

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "plusui-native",
3
- "version": "0.2.50",
3
+ "version": "0.2.53",
4
4
  "description": "PlusUI CLI - Build C++ desktop apps modern UI ",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -27,11 +27,11 @@
27
27
  "semver": "^7.6.0",
28
28
  "which": "^4.0.0",
29
29
  "execa": "^8.0.1",
30
- "plusui-native-builder": "^0.1.49",
31
- "plusui-native-bindgen": "^0.1.49"
30
+ "plusui-native-builder": "^0.1.52",
31
+ "plusui-native-bindgen": "^0.1.52"
32
32
  },
33
33
  "peerDependencies": {
34
- "plusui-native-bindgen": "^0.1.49"
34
+ "plusui-native-bindgen": "^0.1.52"
35
35
  },
36
36
  "publishConfig": {
37
37
  "access": "public"
@@ -46,7 +46,6 @@ export class EnvironmentDoctor {
46
46
  nodejs,
47
47
  cmake,
48
48
  compiler,
49
- compiler,
50
49
  just,
51
50
  webview2,
52
51
  hasIssues: false
@@ -57,7 +56,6 @@ export class EnvironmentDoctor {
57
56
  !nodejs.found || !nodejs.valid ||
58
57
  !cmake.found || !cmake.valid ||
59
58
  !compiler.found || !compiler.valid ||
60
- !compiler.found || !compiler.valid ||
61
59
  !just.found || !just.valid ||
62
60
  !webview2.found;
63
61
 
@@ -95,7 +93,10 @@ export class EnvironmentDoctor {
95
93
  fixes.push(this.fixTool('webview2', 'WebView2 Runtime'));
96
94
  }
97
95
 
98
- const fixResults = await Promise.all(fixes);
96
+ const fixResults = [];
97
+ for (const fix of fixes) {
98
+ fixResults.push(await fix);
99
+ }
99
100
 
100
101
  // Print results
101
102
  console.log(chalk.bold('\nInstallation Results\n'));
@@ -35,29 +35,34 @@ const INSTALL_COMMANDS = {
35
35
  apt: {
36
36
  cmake: 'sudo apt install -y cmake',
37
37
  buildtools: 'sudo apt install -y build-essential',
38
- nodejs: 'sudo apt install -y nodejs npm'
38
+ nodejs: 'sudo apt install -y nodejs npm',
39
+ just: 'sudo apt install -y just'
39
40
  },
40
41
  dnf: {
41
42
  cmake: 'sudo dnf install -y cmake',
42
43
  buildtools: 'sudo dnf groupinstall -y "Development Tools"',
43
- nodejs: 'sudo dnf install -y nodejs'
44
+ nodejs: 'sudo dnf install -y nodejs',
45
+ just: 'sudo dnf install -y just'
44
46
  },
45
47
  pacman: {
46
48
  cmake: 'sudo pacman -S --noconfirm cmake',
47
49
  buildtools: 'sudo pacman -S --noconfirm base-devel',
48
- nodejs: 'sudo pacman -S --noconfirm nodejs npm'
50
+ nodejs: 'sudo pacman -S --noconfirm nodejs npm',
51
+ just: 'sudo pacman -S --noconfirm just'
49
52
  },
50
53
  zypper: {
51
54
  cmake: 'sudo zypper install -y cmake',
52
55
  buildtools: 'sudo zypper install -y -t pattern devel_basis',
53
- nodejs: 'sudo zypper install -y nodejs npm'
56
+ nodejs: 'sudo zypper install -y nodejs npm',
57
+ just: 'sudo zypper install -y just'
54
58
  }
55
59
  };
56
60
 
57
61
  const TOOL_NAMES = {
58
62
  cmake: 'CMake',
59
63
  buildtools: 'Build Tools (gcc/g++)',
60
- nodejs: 'Node.js'
64
+ nodejs: 'Node.js',
65
+ just: 'Just Command Runner'
61
66
  };
62
67
 
63
68
  export async function installTool(toolName) {
@@ -29,6 +29,11 @@ const INSTALL_COMMANDS = {
29
29
  manual: 'https://nodejs.org/',
30
30
  name: 'Node.js'
31
31
  },
32
+ just: {
33
+ command: 'brew install just',
34
+ manual: 'https://github.com/casey/just/releases',
35
+ name: 'Just Command Runner'
36
+ },
32
37
  xcode: {
33
38
  command: 'xcode-select --install',
34
39
  manual: 'https://developer.apple.com/xcode/',
@@ -1,11 +1,11 @@
1
1
  import { execSync } from 'child_process';
2
2
 
3
- async function tryCommand(command) {
3
+ async function tryCommand(command, timeout = 30000) {
4
4
  try {
5
5
  const output = execSync(command, {
6
6
  stdio: ['pipe', 'pipe', 'pipe'],
7
7
  encoding: 'utf8',
8
- timeout: 30000
8
+ timeout
9
9
  }).trim();
10
10
  return { success: true, output };
11
11
  } catch (error) {
@@ -20,21 +20,36 @@ async function checkWinget() {
20
20
 
21
21
  const INSTALL_COMMANDS = {
22
22
  cmake: {
23
- command: 'winget install -e --id Kitware.CMake',
23
+ command: 'winget install -e --id Kitware.CMake --scope user --accept-package-agreements --accept-source-agreements --disable-interactivity',
24
24
  manual: 'https://cmake.org/download/',
25
- name: 'CMake'
25
+ name: 'CMake',
26
+ timeout: 300000
26
27
  },
27
28
  nodejs: {
28
- command: 'winget install -e --id OpenJS.NodeJS',
29
+ command: 'winget install -e --id OpenJS.NodeJS --scope user --accept-package-agreements --accept-source-agreements --disable-interactivity',
29
30
  manual: 'https://nodejs.org/',
30
- name: 'Node.js'
31
+ name: 'Node.js',
32
+ timeout: 300000
33
+ },
34
+ just: {
35
+ command: 'winget install -e --id Casey.Just --scope user --accept-package-agreements --accept-source-agreements --disable-interactivity',
36
+ manual: 'https://github.com/casey/just/releases',
37
+ name: 'Just Command Runner',
38
+ timeout: 300000
39
+ },
40
+ webview2: {
41
+ command: 'winget install -e --id Microsoft.EdgeWebView2Runtime --scope user --accept-package-agreements --accept-source-agreements --disable-interactivity',
42
+ manual: 'https://developer.microsoft.com/en-us/microsoft-edge/webview2/#download-section',
43
+ name: 'WebView2 Runtime',
44
+ timeout: 300000
31
45
  },
32
46
  visualstudio: {
33
- command: null, // Too complex for auto-install
47
+ command: 'winget install -e --id Microsoft.VisualStudio.2022.BuildTools --accept-package-agreements --accept-source-agreements --disable-interactivity --override "--wait --quiet --norestart --add Microsoft.VisualStudio.Workload.VCTools --add Microsoft.VisualStudio.Component.VC.CMake.Project --add Microsoft.VisualStudio.Component.Windows11SDK.22621"',
34
48
  manual: 'https://visualstudio.microsoft.com/downloads/',
35
49
  name: 'Visual Studio 2022',
50
+ timeout: 3600000,
36
51
  instructions: [
37
- '1. Download Visual Studio 2022 Community (free)',
52
+ '1. Download Visual Studio 2022 Build Tools or Community (free)',
38
53
  '2. Run the installer',
39
54
  '3. Select "Desktop development with C++" workload',
40
55
  '4. Ensure these components are included:',
@@ -68,21 +83,9 @@ export async function installTool(toolName) {
68
83
  };
69
84
  }
70
85
 
71
- // If no auto-install command, provide manual instructions
72
- if (!tool.command) {
73
- return {
74
- success: false,
75
- autoInstallAvailable: false,
76
- manual: tool.manual,
77
- instructions: tool.instructions,
78
- message: `${tool.name} requires manual installation`,
79
- downloadUrl: tool.manual
80
- };
81
- }
82
-
83
86
  // Attempt auto-installation
84
87
  console.log(`Installing ${tool.name} via winget...`);
85
- const result = await tryCommand(tool.command);
88
+ const result = await tryCommand(tool.command, tool.timeout || 300000);
86
89
 
87
90
  if (result.success) {
88
91
  return {