eprolo-cli 1.0.52 → 1.0.54

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 CHANGED
@@ -183,14 +183,17 @@ function authLogout() {
183
183
  // orders query — 查询订单(带 401 自动刷新)
184
184
  // ---------------------------------------------------------------------------
185
185
 
186
- async function queryOrders() {
186
+ async function queryOrders(orderId) {
187
187
  const config = readConfig();
188
188
  if (!config.accessToken) {
189
189
  console.error(JSON.stringify({ success: false, errorMessage: "未授权,请先登录" }));
190
190
  process.exit(1);
191
191
  }
192
- const id = process.env.orderId;
193
- const data = await postJsonWithRetry(ORDERS_API, {id}, config);
192
+ if (!orderId) {
193
+ console.error(JSON.stringify({ success: false, errorMessage: "缺少订单 ID" }));
194
+ process.exit(1);
195
+ }
196
+ const data = await postJsonWithRetry(ORDERS_API, {id:orderId}, config);
194
197
  console.log(JSON.stringify(data, null, 2));
195
198
  process.exit(0);
196
199
  }
@@ -254,7 +257,7 @@ async function main() {
254
257
  }
255
258
 
256
259
  if (argv[0] === "orders") {
257
- await queryOrders();
260
+ await queryOrders(argv[1]);
258
261
  return;
259
262
  }
260
263
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eprolo-cli",
3
- "version": "1.0.52",
3
+ "version": "1.0.54",
4
4
  "description": "CLI for Dianxiaobao ICBU AI publishing, authorization profile management, task submission, and task status checks.",
5
5
  "bin": {
6
6
  "eprolo": "bin/eprolo-cli.js"