eprolo-cli 1.0.122 → 1.0.124
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 +13 -13
- package/package.json +1 -1
package/bin/eprolo-cli.js
CHANGED
|
@@ -6,9 +6,9 @@ const os = require("os");
|
|
|
6
6
|
const path = require("path");
|
|
7
7
|
const https = require("https");
|
|
8
8
|
const http = require("http");
|
|
9
|
-
const LOGIN_API = "https://
|
|
10
|
-
const BASE_URL = "https://
|
|
11
|
-
const REFRESH_API = "https://
|
|
9
|
+
const LOGIN_API = "https://openapi.eprolo.com/v1/auth/verifyCode.stm";
|
|
10
|
+
const BASE_URL = "https://openapi.eprolo.com";
|
|
11
|
+
const REFRESH_API = "https://openapi.eprolo.com/v1/auth/refresh-code";
|
|
12
12
|
const CONFIG_DIR = path.join(os.homedir(), ".eprolo-toolkit");
|
|
13
13
|
const CONFIG_FILE = path.join(CONFIG_DIR, "config.json");
|
|
14
14
|
|
|
@@ -403,28 +403,28 @@ async function main() {
|
|
|
403
403
|
return;
|
|
404
404
|
}
|
|
405
405
|
|
|
406
|
-
if (argv[0] === "
|
|
407
|
-
await queryOrders(argv[
|
|
406
|
+
if (argv[0] === "orders") {
|
|
407
|
+
await queryOrders(argv[1]);
|
|
408
408
|
return;
|
|
409
409
|
}
|
|
410
|
-
if (argv[0] === "
|
|
410
|
+
if (argv[0] === "list" ) {
|
|
411
411
|
await queryOrderList();
|
|
412
412
|
return;
|
|
413
413
|
}
|
|
414
|
-
if (argv[0] === "
|
|
415
|
-
await queryProductId(argv[
|
|
414
|
+
if (argv[0] === "product") {
|
|
415
|
+
await queryProductId(argv[1]);
|
|
416
416
|
return;
|
|
417
417
|
}
|
|
418
|
-
if (argv[0] === "
|
|
418
|
+
if (argv[0] === "product-list" ) {
|
|
419
419
|
await queryProductList();
|
|
420
420
|
return;
|
|
421
421
|
}
|
|
422
|
-
if (argv[0] === "
|
|
423
|
-
await insertProduct(argv[
|
|
422
|
+
if (argv[0] === "insert-product" ) {
|
|
423
|
+
await insertProduct(argv[1]);
|
|
424
424
|
return;
|
|
425
425
|
}
|
|
426
|
-
if (argv[0] === "
|
|
427
|
-
await addOrder(argv[
|
|
426
|
+
if (argv[0] === "add-order" ) {
|
|
427
|
+
await addOrder(argv[1]);
|
|
428
428
|
return;
|
|
429
429
|
}
|
|
430
430
|
printHelp();
|
package/package.json
CHANGED