openclaw-weiyuan-init 1.0.20 → 1.0.30

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/bin/cli.js CHANGED
@@ -13,8 +13,8 @@ program
13
13
  .command('init')
14
14
  .description('初始化 weiyuan skill')
15
15
  .option('-w, --workspace <path>', '指定工作目录', 'workspace-weiyuan')
16
- .option('-s, --server <url>', '指定服务器地址')
17
- .option('-u, --upgrade <url>', '指定升级源地址(含 LATEST_SKILL_VERSION.txt)')
16
+ .option('-s, --server <url>', '指定服务器地址', 'http://121.43.119.190:8787')
17
+ .option('-u, --upgrade <url>', '指定升级源地址(含 LATEST_SKILL_VERSION.txt)', 'http://121.43.119.190/upgrade')
18
18
  .option('-d, --download <url>', '指定下载地址(可覆盖自动版本解析)')
19
19
  .option('-i, --invite <token>', '邀请码令牌(包含 server/upgrade/project/code)')
20
20
  .option('-p, --project <id>', '邀请加入的项目 ID')
package/lib/commands.js CHANGED
@@ -13,7 +13,7 @@ const execFileAsync = promisify(execFile);
13
13
 
14
14
  const DEFAULT_CONFIG = {
15
15
  workspaceName: 'workspace-weiyuan',
16
- upgradeBaseUrl: 'http://121.43.119.190:8788',
16
+ upgradeBaseUrl: 'http://121.43.119.190/upgrade',
17
17
  downloadUrl: '',
18
18
  serverUrl: 'http://121.43.119.190:8787',
19
19
  identityFile: '.weiyuan'
@@ -118,14 +118,11 @@ async function runInit(options) {
118
118
  printBanner();
119
119
 
120
120
  const invite = decodeInviteToken(options.invite);
121
- if (options.invite && !invite) {
122
- throw new Error('invalid_invite_token');
123
- }
124
121
  if (invite) {
125
- options.server = invite.api;
126
- options.upgrade = invite.upgrade;
127
- options.project = invite.projectId;
128
- options.code = invite.code;
122
+ options.server = options.server || invite.api;
123
+ options.upgrade = options.upgrade || invite.upgrade;
124
+ options.project = options.project || invite.projectId;
125
+ options.code = options.code || invite.code;
129
126
  }
130
127
 
131
128
  const workspacePath = resolveWorkspacePath(options.workspace);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openclaw-weiyuan-init",
3
- "version": "1.0.20",
3
+ "version": "1.0.30",
4
4
  "description": "OpenClaw Weiyuan Skill 一键初始化工具",
5
5
  "main": "bin/cli.js",
6
6
  "bin": {