eprolo-cli 1.0.40 → 1.0.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.
- package/bin/eprolo-cli.js +2 -2
- package/package.json +1 -1
package/bin/eprolo-cli.js
CHANGED
|
@@ -113,14 +113,14 @@ function postJson(url, body) {
|
|
|
113
113
|
// ---------------------------------------------------------------------------
|
|
114
114
|
|
|
115
115
|
async function login(argv) {
|
|
116
|
-
const userCode = process.env.
|
|
116
|
+
const userCode = process.env.EPROLO_USER_CODE; // env 通道
|
|
117
117
|
if (!userCode) { console.error("缺少用户密文:请在授权弹窗中填写"); process.exit(2); }
|
|
118
118
|
|
|
119
119
|
const defaultShop = readFlag(argv, "--default-shop"); // arg 通道,可能不存在
|
|
120
120
|
|
|
121
121
|
const res = await fetch(LOGIN_API, {
|
|
122
122
|
method: "POST", headers: { "Content-Type": "application/json" },
|
|
123
|
-
body: JSON.stringify({ userCode }),
|
|
123
|
+
body: JSON.stringify({ openApiKey:userCode }),
|
|
124
124
|
});
|
|
125
125
|
// if (!res.ok) { console.error("密文无效或已吊销,请到账号设置页重新复制"); process.exit(1); }
|
|
126
126
|
|
package/package.json
CHANGED