eprolo-cli 1.0.39 → 1.0.42
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,7 +113,7 @@ 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 通道,可能不存在
|
|
@@ -122,7 +122,7 @@ async function login(argv) {
|
|
|
122
122
|
method: "POST", headers: { "Content-Type": "application/json" },
|
|
123
123
|
body: JSON.stringify({ userCode }),
|
|
124
124
|
});
|
|
125
|
-
if (!res.ok) { console.error("密文无效或已吊销,请到账号设置页重新复制"); process.exit(1); }
|
|
125
|
+
// if (!res.ok) { console.error("密文无效或已吊销,请到账号设置页重新复制"); process.exit(1); }
|
|
126
126
|
|
|
127
127
|
const { account, accessToken,accountId,shopId } = await res.json();
|
|
128
128
|
writeConfig({ account, accessToken, defaultShop,accountId,shopId }); // → D3
|
package/package.json
CHANGED