eprolo-cli 1.0.104 → 1.0.105
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 +5 -3
- package/package.json +1 -1
package/bin/eprolo-cli.js
CHANGED
|
@@ -283,6 +283,7 @@ async function insertProduct(arg) {
|
|
|
283
283
|
async function addOrder(arg) {
|
|
284
284
|
const config = readConfig();
|
|
285
285
|
const order = JSON.parse(arg);
|
|
286
|
+
console.log("-----------------",order);
|
|
286
287
|
const newOrder={};
|
|
287
288
|
const orderItemlist=[];
|
|
288
289
|
newOrder.note=order.name;
|
|
@@ -302,11 +303,12 @@ async function addOrder(arg) {
|
|
|
302
303
|
}
|
|
303
304
|
order.lineItems.edges.forEach((edge)=>{
|
|
304
305
|
orderItemlist.push({
|
|
305
|
-
variantsid:getId(edge.variant.id),
|
|
306
|
-
quantity:edge.quantity,
|
|
306
|
+
variantsid:getId(edge.node.variant.id),
|
|
307
|
+
quantity:edge.node.quantity,
|
|
307
308
|
})
|
|
308
309
|
})
|
|
309
310
|
newOrder.orderItemlist=orderItemlist;
|
|
311
|
+
console.log("-------222----------",newOrder);
|
|
310
312
|
const data = await postJsonWithRetry(`http://43.153.35.208:3000/addInfo`, newOrder, config, "POST");
|
|
311
313
|
console.log(JSON.stringify(data, null, 2));
|
|
312
314
|
process.exit(0);
|
|
@@ -354,7 +356,7 @@ Credential file (~/.eprolo-toolkit/config.json):
|
|
|
354
356
|
|
|
355
357
|
async function main() {
|
|
356
358
|
const argv = process.argv.slice(2);
|
|
357
|
-
|
|
359
|
+
console.log("-----------------",argv);
|
|
358
360
|
if (argv[0] === "auth" && argv[1] === "login") {
|
|
359
361
|
await login(argv.slice(2));
|
|
360
362
|
return;
|
package/package.json
CHANGED