eprolo-cli 1.0.51 → 1.0.53
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 +6 -2
- package/package.json +1 -1
package/bin/eprolo-cli.js
CHANGED
|
@@ -189,8 +189,12 @@ async function queryOrders() {
|
|
|
189
189
|
console.error(JSON.stringify({ success: false, errorMessage: "未授权,请先登录" }));
|
|
190
190
|
process.exit(1);
|
|
191
191
|
}
|
|
192
|
-
|
|
193
|
-
|
|
192
|
+
const orderId = readFlag(argv, "--order-id");
|
|
193
|
+
if (!orderId) {
|
|
194
|
+
console.error(JSON.stringify({ success: false, errorMessage: "缺少订单 ID" }));
|
|
195
|
+
process.exit(1);
|
|
196
|
+
}
|
|
197
|
+
const data = await postJsonWithRetry(ORDERS_API, {id:orderId}, config);
|
|
194
198
|
console.log(JSON.stringify(data, null, 2));
|
|
195
199
|
process.exit(0);
|
|
196
200
|
}
|
package/package.json
CHANGED