plusui-native 0.2.54 → 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
|
|
120
|
+
# Regenerate connection bindings manually (app-level)
|
|
121
|
+
npm run connect
|
|
122
122
|
```
|
|
123
123
|
|
|
124
|
-
|
|
125
|
-
`dev` and all `build` commands auto-refresh bindings first
|
|
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.
|
|
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.
|
|
31
|
-
"plusui-native-
|
|
30
|
+
"plusui-native-builder": "^0.1.54",
|
|
31
|
+
"plusui-native-connect": "^0.1.54"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
|
-
"plusui-native-
|
|
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
|
-
|
|
139
|
-
|
|
140
|
-
|
|
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-
|
|
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-
|
|
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-
|
|
453
|
-
resolve(__dirname, '../../plusui-
|
|
454
|
-
resolve(__dirname, '../../plusui-native-
|
|
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-
|
|
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-
|
|
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
|
-
//
|
|
1047
|
+
// CONNECT GENERATOR FUNCTION
|
|
1045
1048
|
// ============================================================
|
|
1046
1049
|
|
|
1047
1050
|
async function runBindgen(providedArgs = null, options = {}) {
|
|
1048
1051
|
ensureProjectRoot('bindgen');
|
|
1049
|
-
logSection('Running
|
|
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(`
|
|
1059
|
+
error(`Connection generator script not found. Please ensure plusui-native-connect is installed.`);
|
|
1057
1060
|
}
|
|
1058
1061
|
|
|
1059
|
-
log(`Using
|
|
1062
|
+
log(`Using connect generator: ${scriptPath}`, 'dim');
|
|
1060
1063
|
|
|
1061
|
-
// plusui
|
|
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(`
|
|
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
|
|
32
|
+
Note: You can run `npm run connect` manually anytime.
|
|
33
33
|
|
|
34
|
-
##
|
|
34
|
+
## Connection Generation (App-level)
|
|
35
35
|
|
|
36
|
-
Generate
|
|
36
|
+
Generate project connection bindings from real `connect.emit()`/`connect.on()` usage:
|
|
37
37
|
```bash
|
|
38
|
-
npm run
|
|
38
|
+
npm run connect
|
|
39
39
|
```
|
|
40
40
|
|
|
41
|
-
Default
|
|
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/
|
|
47
|
-
- `src/Bindings/
|
|
48
|
-
- `src/Bindings/
|
|
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
|
|
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
|
|
64
|
+
plusui connect <projectRoot> <outputDir>
|
|
68
65
|
```
|
|
69
66
|
|
|
70
67
|
## Assets & Icons
|
package/templates/manager.js
CHANGED
|
@@ -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
|
|
67
|
+
// Builder and connect generator also follow 0.1.x pattern
|
|
68
68
|
const builderVersionRange = `^${major}.1.0`;
|
|
69
|
-
const
|
|
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
|
-
|
|
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-
|
|
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-
|
|
26
|
+
"plusui-native-connect": "{{PLUSUI_CONNECT_VERSION}}"
|
|
26
27
|
}
|
|
27
28
|
}
|
|
28
29
|
|