@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/dist/configs/google.config.js +2 -1
- package/dist/configs/google.config.js.map +1 -1
- package/dist/transformers/google.transformer.js +2 -3
- package/dist/transformers/google.transformer.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/configs/google.config.ts +3 -1
- package/src/transformers/google.transformer.ts +3 -3
package/package.json
CHANGED
|
@@ -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.
|
|
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}
|
|
361
|
+
return `${year}-${formattedMonth}`;
|
|
362
362
|
}
|
|
363
363
|
|
|
364
364
|
private isNotEmptyArray(array: any[]): boolean {
|