plusui-native 0.2.53 → 0.2.55

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/README.md CHANGED
@@ -117,12 +117,12 @@ npm run build
117
117
  # Run built app
118
118
  npm run start
119
119
 
120
- # Regenerate bindings manually (app-level)
121
- npm run bind
120
+ # Regenerate connection bindings manually (app-level)
121
+ npm run connect
122
122
  ```
123
123
 
124
- Bindgen runs per app project (typically `src/features` -> `src/Bindings_Generated`).
125
- `dev` and all `build` commands auto-refresh bindings first when `src/features` exists.
124
+ Connection generation runs per app project and scans for `connect.emit()` / `connect.on()` usage.
125
+ `dev` and all `build` commands auto-refresh connection bindings first.
126
126
 
127
127
  ## Requirements
128
128
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "plusui-native",
3
- "version": "0.2.53",
3
+ "version": "0.2.55",
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.52",
31
- "plusui-native-bindgen": "^0.1.52"
30
+ "plusui-native-builder": "^0.1.54",
31
+ "plusui-native-connect": "^0.1.54"
32
32
  },
33
33
  "peerDependencies": {
34
- "plusui-native-bindgen": "^0.1.52"
34
+ "plusui-native-connect": "^0.1.54"
35
35
  },
36
36
  "publishConfig": {
37
37
  "access": "public"
package/src/index.js CHANGED
@@ -135,9 +135,9 @@ ${COLORS.bright}Usage:${COLORS.reset}
135
135
  plusui build:frontend Build frontend only
136
136
  plusui build:backend Build C++ backend only
137
137
  plusui build:all Build for all platforms
138
- plusui run Run the built application
139
- plusui clean Clean build artifacts
140
- plusui bind Generate bindings for current app (alias: bindgen)
138
+ plusui run Run the built application
139
+ plusui clean Clean build artifacts
140
+ plusui connect Generate connection bindings for current app (aliases: bind, bindgen)
141
141
  plusui update Update all PlusUI packages to latest versions
142
142
  plusui help Show this help message
143
143
 
@@ -260,7 +260,7 @@ function showVersionInfo() {
260
260
  cliPackageJson.name,
261
261
  'plusui-native-core',
262
262
  'plusui-native-builder',
263
- 'plusui-native-bindgen'
263
+ 'plusui-native-connect'
264
264
  ];
265
265
 
266
266
  logSection('PlusUI Package Versions');
@@ -290,7 +290,7 @@ async function updatePlusUIPackages() {
290
290
  cliPackageJson.name,
291
291
  'plusui-native-core',
292
292
  'plusui-native-builder',
293
- 'plusui-native-bindgen'
293
+ 'plusui-native-connect'
294
294
  ];
295
295
 
296
296
  log('Checking for updates...\n', 'blue');
@@ -449,13 +449,16 @@ function getDevBuildDir() {
449
449
 
450
450
  function resolveBindgenScriptPath() {
451
451
  const candidates = [
452
- resolve(__dirname, '../../plusui-bindgen/src/advanced-bindgen.js'),
453
- resolve(__dirname, '../../plusui-bindgen/src/index.js'),
454
- resolve(__dirname, '../../plusui-native-bindgen/src/advanced-bindgen.js'),
452
+ resolve(__dirname, '../../plusui-connector/src/connect.js'),
453
+ resolve(__dirname, '../../plusui-connector/src/index.js'),
454
+ resolve(__dirname, '../../plusui-native-connect/src/connect.js'),
455
+ resolve(__dirname, '../../plusui-native-connect/src/index.js'),
455
456
  resolve(__dirname, '../../plusui-native-bindgen/src/index.js'),
456
- resolve(__dirname, '../../../plusui-native-bindgen/src/advanced-bindgen.js'),
457
+ resolve(__dirname, '../../../plusui-native-connect/src/connect.js'),
458
+ resolve(__dirname, '../../../plusui-native-connect/src/index.js'),
457
459
  resolve(__dirname, '../../../plusui-native-bindgen/src/index.js'),
458
- resolve(process.cwd(), 'node_modules', 'plusui-native-bindgen', 'src', 'advanced-bindgen.js'),
460
+ resolve(process.cwd(), 'node_modules', 'plusui-native-connect', 'src', 'connect.js'),
461
+ resolve(process.cwd(), 'node_modules', 'plusui-native-connect', 'src', 'index.js'),
459
462
  resolve(process.cwd(), 'node_modules', 'plusui-native-bindgen', 'src', 'index.js'),
460
463
  ];
461
464
 
@@ -1041,24 +1044,24 @@ async function clean() {
1041
1044
  }
1042
1045
 
1043
1046
  // ============================================================
1044
- // BINDGEN FUNCTION
1047
+ // CONNECT GENERATOR FUNCTION
1045
1048
  // ============================================================
1046
1049
 
1047
1050
  async function runBindgen(providedArgs = null, options = {}) {
1048
1051
  ensureProjectRoot('bindgen');
1049
- logSection('Running Binding Generator');
1052
+ logSection('Running Connection Generator');
1050
1053
 
1051
1054
  const { skipIfNoInput = false, source = 'manual' } = options;
1052
1055
 
1053
1056
  const scriptPath = resolveBindgenScriptPath();
1054
1057
 
1055
1058
  if (!scriptPath) {
1056
- error(`Bindgen script not found. Please ensure plusui-native-bindgen is installed.`);
1059
+ error(`Connection generator script not found. Please ensure plusui-native-connect is installed.`);
1057
1060
  }
1058
1061
 
1059
- log(`Using bindgen: ${scriptPath}`, 'dim');
1062
+ log(`Using connect generator: ${scriptPath}`, 'dim');
1060
1063
 
1061
- // plusui bindgen [featuresDir] [outputDir]
1064
+ // plusui connect [projectRoot] [outputDir]
1062
1065
  // Defaults to app-local paths when available.
1063
1066
  const args = providedArgs ?? process.argv.slice(3);
1064
1067
  let bindgenArgs = [...args];
@@ -1095,7 +1098,7 @@ async function runBindgen(providedArgs = null, options = {}) {
1095
1098
  reject(syncErr);
1096
1099
  }
1097
1100
  } else {
1098
- reject(new Error(`Bindgen failed with code ${code}`));
1101
+ reject(new Error(`Connection generator failed with code ${code}`));
1099
1102
  }
1100
1103
  });
1101
1104
  });
@@ -1173,6 +1176,7 @@ async function main() {
1173
1176
  case 'clean':
1174
1177
  await clean();
1175
1178
  break;
1179
+ case 'connect':
1176
1180
  case 'bind':
1177
1181
  case 'bindgen':
1178
1182
  await runBindgen();
@@ -29,26 +29,23 @@ This will:
29
29
 
30
30
  Dev build intermediates are stored in `.plusui/dev/...` so your `build/` folder stays focused on release/platform outputs.
31
31
 
32
- Note: You can still run `npm run bind` manually anytime.
32
+ Note: You can run `npm run connect` manually anytime.
33
33
 
34
- ## Bindings (App-level)
34
+ ## Connection Generation (App-level)
35
35
 
36
- Generate bidirectional bindings for your app:
36
+ Generate project connection bindings from real `connect.emit()`/`connect.on()` usage:
37
37
  ```bash
38
- npm run bind
38
+ npm run connect
39
39
  ```
40
40
 
41
- Default bindgen paths:
41
+ Default connect generator paths:
42
42
  - Input: project root scan (frontend + backend files)
43
43
  - Output: `src/Bindings`
44
44
 
45
45
  Generated structure:
46
- - `src/Bindings/NativeBindings/CPP_IO`
47
- - `src/Bindings/NativeBindings/WEB_IO`
48
- - `src/Bindings/CustomBindings/CPP_IO`
49
- - `src/Bindings/CustomBindings/WEB_IO`
50
- - `include/Bindings/NativeBindings/CPP_IO` (generated `.hpp` headers)
51
- - `include/Bindings/CustomBindings/CPP_IO` (generated `.hpp` headers)
46
+ - `src/Bindings/bindings.gen.ts`
47
+ - `src/Bindings/bindings.gen.hpp`
48
+ - `src/Bindings/connect.manifest.json`
52
49
 
53
50
  Scan extensions:
54
51
  - `WEB_IO`: `.ts`, `.tsx`, `.js`, `.jsx`, `.mts`, `.cts`, `.html`
@@ -60,11 +57,11 @@ Custom binding kinds detected:
60
57
  - `stream`
61
58
  - `event`
62
59
 
63
- `plusui bind` scans your whole project structure and does not require a specific feature folder.
60
+ `plusui connect` scans your project structure and does not require a schema file.
64
61
 
65
62
  You can also pass custom paths:
66
63
  ```bash
67
- plusui bindgen <projectRoot> <outputDir>
64
+ plusui connect <projectRoot> <outputDir>
68
65
  ```
69
66
 
70
67
  ## Assets & Icons
@@ -64,9 +64,9 @@ export class TemplateManager {
64
64
  // Core version follows 0.1.x pattern when CLI is 0.2.x
65
65
  const coreVersionRange = `^${major}.1.0`;
66
66
 
67
- // Builder and bindgen also follow 0.1.x pattern
67
+ // Builder and connect generator also follow 0.1.x pattern
68
68
  const builderVersionRange = `^${major}.1.0`;
69
- const bindgenVersionRange = `^${major}.1.0`;
69
+ const connectVersionRange = `^${major}.1.0`;
70
70
 
71
71
  // 4. Prepare template variables
72
72
  const variables = {
@@ -76,7 +76,7 @@ export class TemplateManager {
76
76
  PLUSUI_CLI_VERSION: cliVersionRange,
77
77
  PLUSUI_CORE_VERSION: coreVersionRange,
78
78
  PLUSUI_BUILDER_VERSION: builderVersionRange,
79
- PLUSUI_BINDGEN_VERSION: bindgenVersionRange
79
+ PLUSUI_CONNECT_VERSION: connectVersionRange
80
80
  };
81
81
 
82
82
  // 5. Copy template files
@@ -7,6 +7,7 @@
7
7
  "dev": "plusui dev",
8
8
  "dev:frontend": "plusui dev:frontend",
9
9
  "dev:backend": "plusui dev:backend",
10
+ "connect": "plusui connect",
10
11
  "bind": "plusui bind",
11
12
  "bindgen": "plusui bindgen",
12
13
  "build": "plusui build",
@@ -22,7 +23,7 @@
22
23
  },
23
24
  "devDependencies": {
24
25
  "plusui-native-builder": "{{PLUSUI_BUILDER_VERSION}}",
25
- "plusui-native-bindgen": "{{PLUSUI_BINDGEN_VERSION}}"
26
+ "plusui-native-connect": "{{PLUSUI_CONNECT_VERSION}}"
26
27
  }
27
28
  }
28
29
 
@@ -7,6 +7,7 @@
7
7
  "dev": "plusui dev",
8
8
  "dev:frontend": "plusui dev:frontend",
9
9
  "dev:backend": "plusui dev:backend",
10
+ "connect": "plusui connect",
10
11
  "bind": "plusui bind",
11
12
  "bindgen": "plusui bindgen",
12
13
  "build": "plusui build",
@@ -22,7 +23,7 @@
22
23
  },
23
24
  "devDependencies": {
24
25
  "plusui-native-builder": "{{PLUSUI_BUILDER_VERSION}}",
25
- "plusui-native-bindgen": "{{PLUSUI_BINDGEN_VERSION}}"
26
+ "plusui-native-connect": "{{PLUSUI_CONNECT_VERSION}}"
26
27
  }
27
28
  }
28
29