Skip to content

Commit a5fee32

Browse files
author
xuhaihui
committed
fix(im): pin weixin sidecar sdk install
1 parent d4c2157 commit a5fee32

6 files changed

Lines changed: 51 additions & 4 deletions

File tree

scripts/im/package-lock.json

Lines changed: 36 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/im/package.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"name": "cccc-weixin-sidecar",
3+
"private": true,
4+
"type": "module",
5+
"engines": {
6+
"node": ">=22"
7+
},
8+
"dependencies": {
9+
"weixin-agent-sdk": "0.4.0"
10+
}
11+
}

scripts/im/weixin_sidecar.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ async function main() {
114114
});
115115
emit("error", {
116116
message:
117-
"failed to import weixin-agent-sdk; install it first, e.g. npm install weixin-agent-sdk",
117+
"failed to import weixin-agent-sdk; install scripts/im dependencies first, e.g. cd scripts/im && npm install",
118118
});
119119
process.exit(1);
120120
}

web/src/i18n/locales/en/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -569,7 +569,7 @@
569569
"weixinAccountIdHint": "Optional; falls back to the first logged-in account managed by `weixin-agent-sdk`.",
570570
"weixinCommand": "Sidecar command (optional)",
571571
"weixinCommandHint": "Optional; overrides the default `node scripts/im/weixin_sidecar.mjs` launch command.",
572-
"weixinPackageHint": "The host needs Node.js and the `weixin-agent-sdk` npm package. Complete WeChat login before first use.",
572+
"weixinPackageHint": "The host needs Node.js. Run `cd scripts/im && npm install` first so the pinned `weixin-agent-sdk@0.4.0` dependency is installed before the first WeChat login.",
573573
"weixinLoginTitle": "Weixin Login",
574574
"weixinLoginStatus": "Login status",
575575
"weixinCurrentAccount": "Current account",

web/src/i18n/locales/ja/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -569,7 +569,7 @@
569569
"weixinAccountIdHint": "任意です。空欄の場合は `weixin-agent-sdk` が管理する最初のログイン済みアカウントを使います。",
570570
"weixinCommand": "Sidecar コマンド(任意)",
571571
"weixinCommandHint": "任意です。既定の `node scripts/im/weixin_sidecar.mjs` 起動コマンドを上書きします。",
572-
"weixinPackageHint": "ホスト側に Node.js npm パッケージ `weixin-agent-sdk` が必要です。初回利用前に WeChat ログインを済ませてください",
572+
"weixinPackageHint": "ホスト側に Node.js が必要です。初回の WeChat ログイン前に、`scripts/im` で `npm install` を実行して固定済みの `weixin-agent-sdk@0.4.0` 依存関係を導入してください",
573573
"weixinLoginTitle": "Weixin ログイン",
574574
"weixinLoginStatus": "ログイン状態",
575575
"weixinCurrentAccount": "現在のアカウント",

web/src/i18n/locales/zh/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -569,7 +569,7 @@
569569
"weixinAccountIdHint": "可选;为空时使用 `weixin-agent-sdk` 的默认首个已登录账号。",
570570
"weixinCommand": "Sidecar 命令(可选)",
571571
"weixinCommandHint": "可选;覆盖默认的 `node scripts/im/weixin_sidecar.mjs` 启动命令。",
572-
"weixinPackageHint": "宿主机需要 Node.jsnpm `weixin-agent-sdk`。首次使用前先完成微信登录。",
572+
"weixinPackageHint": "宿主机需要 Node.js,并先在 `scripts/im` 下执行 `npm install` 安装已固定的 `weixin-agent-sdk@0.4.0` 依赖。首次使用前先完成微信登录。",
573573
"weixinLoginTitle": "微信登录",
574574
"weixinLoginStatus": "登录状态",
575575
"weixinCurrentAccount": "当前账号",

0 commit comments

Comments
 (0)