plusui-native 0.2.55 → 0.2.56

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.55",
3
+ "version": "0.2.56",
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.54",
31
- "plusui-native-connect": "^0.1.54"
30
+ "plusui-native-builder": "^0.1.55",
31
+ "plusui-native-connect": "^0.1.55"
32
32
  },
33
33
  "peerDependencies": {
34
- "plusui-native-connect": "^0.1.54"
34
+ "plusui-native-connect": "^0.1.55"
35
35
  },
36
36
  "publishConfig": {
37
37
  "access": "public"
package/src/index.js CHANGED
@@ -301,12 +301,30 @@ async function updatePlusUIPackages() {
301
301
  if (isInProject) {
302
302
  let updatedCount = 0;
303
303
  let upToDateCount = 0;
304
+ let installedCount = 0;
304
305
 
305
306
  for (const pkg of packages) {
306
307
  const currentVersion = getInstalledPackageVersion(pkg);
307
308
 
308
309
  if (!currentVersion) {
309
- log(`${COLORS.dim}${pkg}: not installed${COLORS.reset}`);
310
+ const latestVersion = getLatestPackageVersion(pkg);
311
+
312
+ if (!latestVersion) {
313
+ log(`${COLORS.yellow}${pkg}: not installed (couldn't resolve latest version)${COLORS.reset}`);
314
+ continue;
315
+ }
316
+
317
+ try {
318
+ log(`${COLORS.blue}${pkg}: not installed → ${latestVersion}${COLORS.reset}`);
319
+ execSync(`npm install ${pkg}@${latestVersion}`, {
320
+ stdio: ['ignore', 'ignore', 'pipe'],
321
+ encoding: 'utf8'
322
+ });
323
+ log(`${COLORS.green}✓ ${pkg} installed${COLORS.reset}`);
324
+ installedCount++;
325
+ } catch (e) {
326
+ log(`${COLORS.red}✗ ${pkg} install failed${COLORS.reset}`);
327
+ }
310
328
  continue;
311
329
  }
312
330
 
@@ -344,6 +362,9 @@ async function updatePlusUIPackages() {
344
362
  if (updatedCount > 0) {
345
363
  log(`Updated ${updatedCount} package${updatedCount !== 1 ? 's' : ''}`, 'green');
346
364
  }
365
+ if (installedCount > 0) {
366
+ log(`Installed ${installedCount} missing package${installedCount !== 1 ? 's' : ''}`, 'green');
367
+ }
347
368
  if (upToDateCount > 0) {
348
369
  log(`${upToDateCount} package${upToDateCount !== 1 ? 's' : ''} already up to date`, 'dim');
349
370
  }
@@ -449,8 +470,8 @@ function getDevBuildDir() {
449
470
 
450
471
  function resolveBindgenScriptPath() {
451
472
  const candidates = [
452
- resolve(__dirname, '../../plusui-connector/src/connect.js'),
453
- resolve(__dirname, '../../plusui-connector/src/index.js'),
473
+ resolve(__dirname, '../../plusui-connect/src/connect.js'),
474
+ resolve(__dirname, '../../plusui-connect/src/index.js'),
454
475
  resolve(__dirname, '../../plusui-native-connect/src/connect.js'),
455
476
  resolve(__dirname, '../../plusui-native-connect/src/index.js'),
456
477
  resolve(__dirname, '../../plusui-native-bindgen/src/index.js'),
@@ -27,7 +27,7 @@ set(PLUSUI_CORE_DIR "")
27
27
 
28
28
  # Location 1: Project-local Core directory
29
29
  set(PLUSUI_CORE_LOCAL "${CMAKE_SOURCE_DIR}/Core")
30
- if(EXISTS "${PLUSUI_CORE_LOCAL}/CMakeLists.txt")
30
+ if(NOT PLUSUI_FOUND AND EXISTS "${PLUSUI_CORE_LOCAL}/CMakeLists.txt")
31
31
  message(STATUS "Found PlusUI Core at: ${PLUSUI_CORE_LOCAL}")
32
32
  add_subdirectory("${PLUSUI_CORE_LOCAL}" "${CMAKE_BINARY_DIR}/plusui-core")
33
33
  set(PLUSUI_FOUND TRUE)
@@ -36,7 +36,7 @@ endif()
36
36
 
37
37
  # Location 2: Local development (sibling to project inside PlusUI repo)
38
38
  set(PLUSUI_CORE_DEV "${CMAKE_SOURCE_DIR}/../Core")
39
- if(EXISTS "${PLUSUI_CORE_DEV}/CMakeLists.txt")
39
+ if(NOT PLUSUI_FOUND AND EXISTS "${PLUSUI_CORE_DEV}/CMakeLists.txt")
40
40
  message(STATUS "Found PlusUI Core at: ${PLUSUI_CORE_DEV}")
41
41
  add_subdirectory("${PLUSUI_CORE_DEV}" "${CMAKE_BINARY_DIR}/plusui-core")
42
42
  set(PLUSUI_FOUND TRUE)
@@ -27,7 +27,7 @@ set(PLUSUI_CORE_DIR "")
27
27
 
28
28
  # Location 1: Project-local Core directory
29
29
  set(PLUSUI_CORE_LOCAL "${CMAKE_SOURCE_DIR}/Core")
30
- if(EXISTS "${PLUSUI_CORE_LOCAL}/CMakeLists.txt")
30
+ if(NOT PLUSUI_FOUND AND EXISTS "${PLUSUI_CORE_LOCAL}/CMakeLists.txt")
31
31
  message(STATUS "Found PlusUI Core at: ${PLUSUI_CORE_LOCAL}")
32
32
  add_subdirectory("${PLUSUI_CORE_LOCAL}" "${CMAKE_BINARY_DIR}/plusui-core")
33
33
  set(PLUSUI_FOUND TRUE)
@@ -36,7 +36,7 @@ endif()
36
36
 
37
37
  # Location 2: Local development (sibling to project inside PlusUI repo)
38
38
  set(PLUSUI_CORE_DEV "${CMAKE_SOURCE_DIR}/../Core")
39
- if(EXISTS "${PLUSUI_CORE_DEV}/CMakeLists.txt")
39
+ if(NOT PLUSUI_FOUND AND EXISTS "${PLUSUI_CORE_DEV}/CMakeLists.txt")
40
40
  message(STATUS "Found PlusUI Core at: ${PLUSUI_CORE_DEV}")
41
41
  add_subdirectory("${PLUSUI_CORE_DEV}" "${CMAKE_BINARY_DIR}/plusui-core")
42
42
  set(PLUSUI_FOUND TRUE)