rushangle-cli 0.1.1 → 0.1.2

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": "rushangle-cli",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "SkillHub CLI - 数智凯航技能市场命令行工具",
5
5
  "bin": {
6
6
  "rushangle": "./bin/rushangle.js"
@@ -18,9 +18,7 @@
18
18
  "dependencies": {
19
19
  "commander": "^12.0.0",
20
20
  "chalk": "^4.1.2",
21
- "ora": "^8.0.0",
22
21
  "open": "^10.0.0",
23
- "conf": "^12.0.0",
24
22
  "cli-table3": "^0.6.5"
25
23
  }
26
24
  }
@@ -1,6 +1,5 @@
1
1
  const { Command } = require('commander');
2
2
  const chalk = require('chalk');
3
- const open = require('open');
4
3
  const http = require('http');
5
4
  const auth = require('../auth');
6
5
  const { SITE_URL } = require('../api');
@@ -65,7 +64,12 @@ p{color:#666;margin:4px 0}
65
64
 
66
65
  // Open browser to DingTalk OAuth login with CLI callback params
67
66
  const loginUrl = `${SITE_URL}/api/auth/dingtalk/login?cli=1&cli_port=${CLI_PORT}`;
68
- await open(loginUrl);
67
+ try {
68
+ const open = (await import('open')).default;
69
+ await open(loginUrl);
70
+ } catch {
71
+ // open module unavailable, fall through to manual URL prompt
72
+ }
69
73
  console.log(chalk.gray('请在浏览器中完成钉钉授权...'));
70
74
  console.log(chalk.yellow('等待授权完成... (如浏览器未打开,请手动访问: ' + loginUrl + ')'));
71
75
  });