openxiangda 1.0.93 → 1.0.94
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/lib/cli.js +82 -0
- package/package.json +2 -1
package/lib/cli.js
CHANGED
|
@@ -237,6 +237,10 @@ async function update(args) {
|
|
|
237
237
|
const requestedSubcommand = args[0] && !args[0].startsWith('--') ? args[0] : 'check';
|
|
238
238
|
const parsedArgs = requestedSubcommand === args[0] ? args.slice(1) : args;
|
|
239
239
|
const { flags } = parseArgs(parsedArgs);
|
|
240
|
+
if (wantsSubcommandHelp(requestedSubcommand, flags)) {
|
|
241
|
+
print('用法: openxiangda update check|install [--json] [--registry https://registry.npmjs.org] [--no-skills]');
|
|
242
|
+
return;
|
|
243
|
+
}
|
|
240
244
|
const registry = normalizeNpmRegistry(flags.registry || OFFICIAL_NPM_REGISTRY);
|
|
241
245
|
|
|
242
246
|
if (requestedSubcommand === 'check') {
|
|
@@ -457,6 +461,10 @@ async function design(args) {
|
|
|
457
461
|
|
|
458
462
|
async function doctor(args) {
|
|
459
463
|
const { flags } = parseArgs(args);
|
|
464
|
+
if (flags.help || flags.h) {
|
|
465
|
+
print('用法: openxiangda doctor [--profile name] [--app-type APP_XXX] [--agent codex] [--json]');
|
|
466
|
+
return;
|
|
467
|
+
}
|
|
460
468
|
const config = loadConfig();
|
|
461
469
|
const profileName = flags.profile || config.currentProfile;
|
|
462
470
|
const result = {
|
|
@@ -577,6 +585,10 @@ function printDoctorReport(result) {
|
|
|
577
585
|
async function platform(args) {
|
|
578
586
|
const [subcommand, ...rest] = args;
|
|
579
587
|
const { flags, positional } = parseArgs(rest);
|
|
588
|
+
if (wantsSubcommandHelp(subcommand, flags)) {
|
|
589
|
+
print('用法: openxiangda platform add|list|use|remove');
|
|
590
|
+
return;
|
|
591
|
+
}
|
|
580
592
|
const config = loadConfig();
|
|
581
593
|
|
|
582
594
|
if (subcommand === 'add') {
|
|
@@ -652,6 +664,16 @@ async function platform(args) {
|
|
|
652
664
|
|
|
653
665
|
async function login(args) {
|
|
654
666
|
const { flags, positional } = parseArgs(args);
|
|
667
|
+
if (
|
|
668
|
+
flags.help ||
|
|
669
|
+
flags.h ||
|
|
670
|
+
positional[0] === 'help' ||
|
|
671
|
+
positional[0] === '--help' ||
|
|
672
|
+
positional[0] === '-h'
|
|
673
|
+
) {
|
|
674
|
+
print('用法: openxiangda login <platform-url> [--profile name] [--no-open] [--json]');
|
|
675
|
+
return;
|
|
676
|
+
}
|
|
655
677
|
const config = loadConfig();
|
|
656
678
|
const rawUrl = positional[0];
|
|
657
679
|
const profileName = flags.profile || config.currentProfile || 'default';
|
|
@@ -765,6 +787,10 @@ function normalizePlatformSessionUrl(value, baseUrl) {
|
|
|
765
787
|
async function auth(args) {
|
|
766
788
|
const [subcommand, ...rest] = args;
|
|
767
789
|
const { flags } = parseArgs(rest);
|
|
790
|
+
if (wantsSubcommandHelp(subcommand, flags)) {
|
|
791
|
+
print('用法: openxiangda auth status|refresh|logout [--profile name] [--json]');
|
|
792
|
+
return;
|
|
793
|
+
}
|
|
768
794
|
|
|
769
795
|
if (subcommand === 'status') {
|
|
770
796
|
const config = loadConfig();
|
|
@@ -819,6 +845,10 @@ async function auth(args) {
|
|
|
819
845
|
|
|
820
846
|
async function env(args) {
|
|
821
847
|
const { flags } = parseArgs(args);
|
|
848
|
+
if (flags.help || flags.h) {
|
|
849
|
+
print('用法: openxiangda env [--profile name] [--json]');
|
|
850
|
+
return;
|
|
851
|
+
}
|
|
822
852
|
const config = loadConfig();
|
|
823
853
|
const globalEnv = loadGlobalEnv();
|
|
824
854
|
const profileName = flags.profile || config.currentProfile;
|
|
@@ -856,6 +886,12 @@ async function env(args) {
|
|
|
856
886
|
async function feedback(args) {
|
|
857
887
|
const [subcommand, ...rest] = args;
|
|
858
888
|
const { flags, positional } = parseArgs(rest);
|
|
889
|
+
if (wantsSubcommandHelp(subcommand, flags)) {
|
|
890
|
+
print(
|
|
891
|
+
'用法: openxiangda feedback preview|submit --summary <text> [--type bug] [--severity medium] [--profile name] [--yes] [--json]'
|
|
892
|
+
);
|
|
893
|
+
return;
|
|
894
|
+
}
|
|
859
895
|
|
|
860
896
|
if (subcommand !== 'preview' && subcommand !== 'submit') {
|
|
861
897
|
fail(
|
|
@@ -1279,6 +1315,10 @@ function summarizeOssEnv(globalEnv) {
|
|
|
1279
1315
|
async function workspace(args) {
|
|
1280
1316
|
const [subcommand, ...rest] = args;
|
|
1281
1317
|
const { flags, positional } = parseArgs(rest);
|
|
1318
|
+
if (wantsSubcommandHelp(subcommand, flags)) {
|
|
1319
|
+
print('用法: openxiangda workspace init|bind|publish [--changed [--since ref]|--form code|--page code|--only list] [--dry-run] [--force] [--resources|--skip-resources]');
|
|
1320
|
+
return;
|
|
1321
|
+
}
|
|
1282
1322
|
const config = loadConfig();
|
|
1283
1323
|
|
|
1284
1324
|
if (subcommand === 'init') {
|
|
@@ -1411,6 +1451,10 @@ async function workspace(args) {
|
|
|
1411
1451
|
async function app(args) {
|
|
1412
1452
|
const [subcommand, ...rest] = args;
|
|
1413
1453
|
const { flags, positional } = parseArgs(rest);
|
|
1454
|
+
if (wantsSubcommandHelp(subcommand, flags)) {
|
|
1455
|
+
print('用法: openxiangda app list|create|snapshot [--profile name] [--json]');
|
|
1456
|
+
return;
|
|
1457
|
+
}
|
|
1414
1458
|
const config = loadConfig();
|
|
1415
1459
|
const profileName = flags.profile || config.currentProfile;
|
|
1416
1460
|
|
|
@@ -1481,6 +1525,10 @@ function extractCreatedAppType(data) {
|
|
|
1481
1525
|
async function form(args) {
|
|
1482
1526
|
const [subcommand, ...rest] = args;
|
|
1483
1527
|
const { flags, positional } = parseArgs(rest);
|
|
1528
|
+
if (wantsSubcommandHelp(subcommand, flags)) {
|
|
1529
|
+
print('用法: openxiangda form list|create|bind|pull|publish [--profile name] [--json]');
|
|
1530
|
+
return;
|
|
1531
|
+
}
|
|
1484
1532
|
const config = loadConfig();
|
|
1485
1533
|
const profileName = flags.profile || config.currentProfile;
|
|
1486
1534
|
|
|
@@ -1589,6 +1637,10 @@ async function form(args) {
|
|
|
1589
1637
|
async function page(args) {
|
|
1590
1638
|
const [subcommand, ...rest] = args;
|
|
1591
1639
|
const { flags, positional } = parseArgs(rest);
|
|
1640
|
+
if (wantsSubcommandHelp(subcommand, flags)) {
|
|
1641
|
+
print('用法: openxiangda page list|publish|bind|releases|activate [--profile name] [--json]');
|
|
1642
|
+
return;
|
|
1643
|
+
}
|
|
1592
1644
|
const config = loadConfig();
|
|
1593
1645
|
const profileName = flags.profile || config.currentProfile;
|
|
1594
1646
|
|
|
@@ -1709,6 +1761,10 @@ async function page(args) {
|
|
|
1709
1761
|
async function menu(args) {
|
|
1710
1762
|
const [subcommand, ...rest] = args;
|
|
1711
1763
|
const { flags, positional } = parseArgs(rest);
|
|
1764
|
+
if (wantsSubcommandHelp(subcommand, flags)) {
|
|
1765
|
+
print('用法: openxiangda menu list|create|update|sort|bind|delete [--profile name] [--json]');
|
|
1766
|
+
return;
|
|
1767
|
+
}
|
|
1712
1768
|
const config = loadConfig();
|
|
1713
1769
|
const profileName = flags.profile || config.currentProfile;
|
|
1714
1770
|
|
|
@@ -2794,6 +2850,12 @@ async function notification(args) {
|
|
|
2794
2850
|
async function permission(args) {
|
|
2795
2851
|
const [subcommand, ...rest] = args;
|
|
2796
2852
|
const { flags, positional } = parseArgs(rest);
|
|
2853
|
+
if (wantsSubcommandHelp(subcommand, flags)) {
|
|
2854
|
+
print(
|
|
2855
|
+
'用法: openxiangda permission role-list|role-create|role-update|role-delete|role-bind|role-users|role-add-users|page-group-list|page-group-create|page-group-update|page-group-delete|page-group-bind|form-group-list|form-group-create|form-group-update|form-group-delete|form-group-bind|form-summary|menu-permissions|audit'
|
|
2856
|
+
);
|
|
2857
|
+
return;
|
|
2858
|
+
}
|
|
2797
2859
|
const config = loadConfig();
|
|
2798
2860
|
const profileName = flags.profile || config.currentProfile;
|
|
2799
2861
|
|
|
@@ -3246,6 +3308,12 @@ async function permission(args) {
|
|
|
3246
3308
|
async function settings(args) {
|
|
3247
3309
|
const [subcommand, ...rest] = args;
|
|
3248
3310
|
const { flags, positional } = parseArgs(rest);
|
|
3311
|
+
if (wantsSubcommandHelp(subcommand, flags)) {
|
|
3312
|
+
print(
|
|
3313
|
+
'用法: openxiangda settings get|save|indexes|indexes-save|data-management|data-management-save|public-access|public-access-save|public-access-delete'
|
|
3314
|
+
);
|
|
3315
|
+
return;
|
|
3316
|
+
}
|
|
3249
3317
|
const config = loadConfig();
|
|
3250
3318
|
const profileName = flags.profile || config.currentProfile;
|
|
3251
3319
|
|
|
@@ -3841,6 +3909,16 @@ function formatBytes(value) {
|
|
|
3841
3909
|
async function inspect(args) {
|
|
3842
3910
|
const [subcommand, ...rest] = args;
|
|
3843
3911
|
const { flags, positional } = parseArgs(rest);
|
|
3912
|
+
if (
|
|
3913
|
+
subcommand === 'help' ||
|
|
3914
|
+
subcommand === '--help' ||
|
|
3915
|
+
subcommand === '-h' ||
|
|
3916
|
+
flags.help ||
|
|
3917
|
+
flags.h
|
|
3918
|
+
) {
|
|
3919
|
+
print('用法: openxiangda inspect app|form|workflow|automation|permissions [--profile name] [--json]');
|
|
3920
|
+
return;
|
|
3921
|
+
}
|
|
3844
3922
|
const config = loadConfig();
|
|
3845
3923
|
const profileName = flags.profile || config.currentProfile;
|
|
3846
3924
|
|
|
@@ -3980,6 +4058,10 @@ function printWorkspaceInitReport(result) {
|
|
|
3980
4058
|
async function skill(args) {
|
|
3981
4059
|
const [subcommand, ...rest] = args;
|
|
3982
4060
|
const { flags, positional } = parseArgs(rest);
|
|
4061
|
+
if (wantsSubcommandHelp(subcommand, flags)) {
|
|
4062
|
+
print('用法: openxiangda skill install|status [--agent codex|claude|qoder|dual] [--dest <skills-dir>] [--force] [--dry-run] [--json]\n openxiangda skill bootstrap [<dir>] [--force] [--dry-run] [--json]');
|
|
4063
|
+
return;
|
|
4064
|
+
}
|
|
3983
4065
|
const options = {
|
|
3984
4066
|
agent: flags.agent || 'codex',
|
|
3985
4067
|
dest: flags.dest,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "openxiangda",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.94",
|
|
4
4
|
"description": "OpenXiangda CLI, workspace build tools, runtime SDK, and form components.",
|
|
5
5
|
"private": false,
|
|
6
6
|
"bin": {
|
|
@@ -67,6 +67,7 @@
|
|
|
67
67
|
"test:resource-plan": "node scripts/resource-plan-smoke.mjs",
|
|
68
68
|
"test:design-gates": "node scripts/design-gates-smoke.mjs",
|
|
69
69
|
"test:resource-cli": "node scripts/resource-cli-smoke.mjs",
|
|
70
|
+
"test:help-no-side-effects": "node scripts/help-no-side-effects-smoke.mjs",
|
|
70
71
|
"test:app-function-fallback": "node scripts/app-function-source-fallback-smoke.mjs",
|
|
71
72
|
"test:runtime-deploy": "node scripts/runtime-deploy-smoke.mjs",
|
|
72
73
|
"test:skill-install": "bash scripts/skill-install-smoke.sh",
|