eprolo-cli 1.0.115 → 1.0.116

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
@@ -47,8 +47,8 @@ function readFlag(argv, flag) {
47
47
  function postJson(url, body, headers = {}, method = "POST") {
48
48
  const config = readConfig();
49
49
  let signValue = {}
50
- if (config.timestamp) {
51
- signValue.timestamp = config.timestamp;
50
+ signValue.timestamp = `${Date.now()}`;
51
+ if (config.sign) {
52
52
  signValue.sign = config.accessToken;
53
53
  }
54
54
  if (method == "GET") {
@@ -102,7 +102,6 @@ function postJson(url, body, headers = {}, method = "POST") {
102
102
  async function postJsonWithRetry(url, body, config, method = "POST") {
103
103
  let headers = {};
104
104
  if (config.apiKey) headers["apiKey"] = `${config.apiKey}`;
105
- headers["timestamp"] = `${Date.now()}`;
106
105
  let result = await postJson(url, body, headers, method);
107
106
  if (result.data.code == '-1') {
108
107
  // 刷新 token
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eprolo-cli",
3
- "version": "1.0.115",
3
+ "version": "1.0.116",
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"