eprolo-cli 1.0.50 → 1.0.52

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
@@ -86,6 +86,7 @@ function postJson(url, body, headers = {}) {
86
86
  // ---------------------------------------------------------------------------
87
87
 
88
88
  async function postJsonWithRetry(url, body, config) {
89
+ let headers = {};
89
90
  if (config.accessToken) headers["accessToken"] = `${config.accessToken}`;
90
91
 
91
92
  let result = await postJson(url, body, headers);
@@ -188,8 +189,8 @@ async function queryOrders() {
188
189
  console.error(JSON.stringify({ success: false, errorMessage: "未授权,请先登录" }));
189
190
  process.exit(1);
190
191
  }
191
-
192
- const data = await postJsonWithRetry(ORDERS_API, {id:'1'}, config);
192
+ const id = process.env.orderId;
193
+ const data = await postJsonWithRetry(ORDERS_API, {id}, config);
193
194
  console.log(JSON.stringify(data, null, 2));
194
195
  process.exit(0);
195
196
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eprolo-cli",
3
- "version": "1.0.50",
3
+ "version": "1.0.52",
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"