eprolo-cli 1.0.105 → 1.0.106

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
@@ -289,6 +289,7 @@ async function addOrder(arg) {
289
289
  newOrder.note=order.name;
290
290
  newOrder.shipping_country_code=order.currencyCode;
291
291
  newOrder.order_id=getId(order.id);
292
+ newOrder.order_number=order.name;
292
293
  if(order.shippingAddress){
293
294
  newOrder.shipping_name=order.shippingAddress.firstName + ' ' + order.shippingAddress.lastName;
294
295
  newOrder.shipping_phone=order.shippingAddress.phone
@@ -301,13 +302,15 @@ async function addOrder(arg) {
301
302
  newOrder.shipping_city=order.shippingAddress.city;
302
303
  // newOrder.shipping_taxNumber=order.shippingAddress.taxNumber;
303
304
  }
304
- order.lineItems.edges.forEach((edge)=>{
305
+ if(order.lineItems){
306
+ order.lineItems.edges.forEach((edge)=>{
305
307
  orderItemlist.push({
306
308
  variantsid:getId(edge.node.variant.id),
307
309
  quantity:edge.node.quantity,
308
310
  })
309
- })
310
- newOrder.orderItemlist=orderItemlist;
311
+ })
312
+ newOrder.orderItemlist=orderItemlist;
313
+ }
311
314
  console.log("-------222----------",newOrder);
312
315
  const data = await postJsonWithRetry(`http://43.153.35.208:3000/addInfo`, newOrder, config, "POST");
313
316
  console.log(JSON.stringify(data, null, 2));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eprolo-cli",
3
- "version": "1.0.105",
3
+ "version": "1.0.106",
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"