@optima-chat/dev-skills 0.7.42 → 0.7.43

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.
@@ -56,7 +56,9 @@ const ENV_CONFIG: Record<Environment, EnvironmentConfig> = {
56
56
  // #201: yzsgo.com 全量迁移 (2026-06-12), 旧 *-cn.optima.chat 路由已下线
57
57
  authUrl: 'https://auth.yzsgo.com',
58
58
  apiUrl: 'https://commerce.yzsgo.com',
59
- clientId: 'commerce-cli-cn-prod',
59
+ // #31: 必须用 cn user-auth 里注册的 public client(开 password grant)。
60
+ // 注意不要换成同名的 confidential client `commerce-cli-cn-prod-*`,那个需要 client_secret,走不通 CLI 的 public ROPC flow。
61
+ clientId: 'dev-skill-cli-cn-pro-acvkmcuq',
60
62
  envName: 'cn-prod'
61
63
  }
62
64
  };
@@ -98,7 +100,8 @@ async function registerMerchant(
98
100
  body: JSON.stringify(payload)
99
101
  });
100
102
 
101
- console.log(`✓ Merchant registered successfully (ID: ${result.user_id})`);
103
+ // #31: cn-prod register 返回体字段名是 `id`,AWS 是 `user_id`,两者兼容
104
+ console.log(`✓ Merchant registered successfully (ID: ${result.user_id ?? (result as any).id})`);
102
105
  return result;
103
106
  } catch (error: any) {
104
107
  if (error.message.includes('409') || error.message.includes('already exists')) {
@@ -60,7 +60,9 @@ const ENV_CONFIG = {
60
60
  // #201: yzsgo.com 全量迁移 (2026-06-12), 旧 *-cn.optima.chat 路由已下线
61
61
  authUrl: 'https://auth.yzsgo.com',
62
62
  apiUrl: 'https://commerce.yzsgo.com',
63
- clientId: 'commerce-cli-cn-prod',
63
+ // #31: 必须用 cn user-auth 里注册的 public client(开 password grant)。
64
+ // 注意不要换成同名的 confidential client `commerce-cli-cn-prod-*`,那个需要 client_secret,走不通 CLI 的 public ROPC flow。
65
+ clientId: 'dev-skill-cli-cn-pro-acvkmcuq',
64
66
  envName: 'cn-prod'
65
67
  }
66
68
  };
@@ -90,7 +92,8 @@ async function registerMerchant(email, password, businessName, config, phone, ad
90
92
  method: 'POST',
91
93
  body: JSON.stringify(payload)
92
94
  });
93
- console.log(`✓ Merchant registered successfully (ID: ${result.user_id})`);
95
+ // #31: cn-prod register 返回体字段名是 `id`,AWS 是 `user_id`,两者兼容
96
+ console.log(`✓ Merchant registered successfully (ID: ${result.user_id ?? result.id})`);
94
97
  return result;
95
98
  }
96
99
  catch (error) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@optima-chat/dev-skills",
3
- "version": "0.7.42",
3
+ "version": "0.7.43",
4
4
  "description": "Claude Code Skills for Optima development team - cross-environment collaboration tools",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -19,8 +19,7 @@
19
19
  "scripts": {
20
20
  "postinstall": "node scripts/install.js",
21
21
  "build": "tsc",
22
- "prepare": "npm run build",
23
- "test": "node --test tests/*.test.js"
22
+ "prepare": "npm run build"
24
23
  },
25
24
  "keywords": [
26
25
  "claude-code",