@bytebrand/export-cars 1.21.51 → 1.21.53

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bytebrand/export-cars",
3
- "version": "1.21.51",
3
+ "version": "1.21.53",
4
4
  "description": "",
5
5
  "author": "bytebrand",
6
6
  "license": "UNLICENSED",
@@ -6,7 +6,9 @@ export class GoogleConfig extends Config {
6
6
  constructor(params: Params) {
7
7
  super(params);
8
8
  this.pathesConfig.localConvertedDirectory = `resources/${ExportType.GOOGLE}-export`;
9
- this.imageType = ImageType.default;
9
+ this.imageType = ImageType.marketing;
10
+ this.marketingImageConfigId = this.environmentConfig[params.environment].criteoMarketingImagesConfigId;
11
+
10
12
  this.outputFiles = [
11
13
  `${this.pathesConfig.localConvertedDirectory}/api_export_cars_${ExportType.GOOGLE}.${FileType.XML}`,
12
14
  ];
@@ -38,6 +38,8 @@ export class GoogleTransformer {
38
38
  false,
39
39
  );
40
40
 
41
+ console.log(car._id, transformedImages);
42
+
41
43
  return {
42
44
  google_product_category: '916',
43
45
  vehicle_fulfillment: {
@@ -351,14 +353,12 @@ export class GoogleTransformer {
351
353
  }
352
354
 
353
355
  const date = new Date(timestamp * 1000);
354
- const day = date.getUTCDate();
355
356
  const month = date.getUTCMonth() + 1;
356
357
  const year = date.getUTCFullYear();
357
358
 
358
- const formattedDay = day < 10 ? `0${day}` : day;
359
359
  const formattedMonth = month < 10 ? `0${month}` : month;
360
360
 
361
- return `${year}-${formattedMonth}-${formattedDay}`;
361
+ return `${year}-${formattedMonth}`;
362
362
  }
363
363
 
364
364
  private isNotEmptyArray(array: any[]): boolean {