@@ -54,16 +54,9 @@ export default class VariantEntries extends VariantAdapter<VariantHttpClient<Imp
5454 } ,
5555 } ;
5656 super ( Object . assign ( omit ( config , [ 'helpers' ] ) , conf ) ) ;
57- this . entriesMapperPath = resolve (
58- sanitizePath ( config . backupDir ) ,
59- 'mapper' ,
60- 'entries' ,
61- ) ;
57+ this . entriesMapperPath = resolve ( sanitizePath ( config . backupDir ) , 'mapper' , 'entries' ) ;
6258 this . personalizeConfig = this . config . modules . personalize ;
63- this . entriesDirPath = resolve (
64- sanitizePath ( config . backupDir ) ,
65- sanitizePath ( config . modules . entries . dirName ) ,
66- ) ;
59+ this . entriesDirPath = resolve ( sanitizePath ( config . backupDir ) , sanitizePath ( config . modules . entries . dirName ) ) ;
6760 this . failedVariantPath = resolve ( sanitizePath ( this . entriesMapperPath ) , 'failed-entry-variants.json' ) ;
6861 this . failedVariantEntries = new Map ( ) ;
6962 }
@@ -169,7 +162,7 @@ export default class VariantEntries extends VariantAdapter<VariantHttpClient<Imp
169162 sanitizePath ( variantEntry . dirName ) ,
170163 sanitizePath ( entry_uid ) ,
171164 ) ;
172- const fs = new FsUtility ( { basePath : variantEntryBasePath } ) ;
165+ const fs = new FsUtility ( { basePath : variantEntryBasePath , createDirIfNotExist : false } ) ;
173166
174167 for ( const _ in fs . indexFileContent ) {
175168 try {
@@ -217,13 +210,21 @@ export default class VariantEntries extends VariantAdapter<VariantHttpClient<Imp
217210
218211 for ( let [ , variantEntry ] of entries ( batch ) ) {
219212 const onSuccess = ( { response, apiData : { entryUid, variantUid } , log } : any ) => {
220- log ( this . config , `Created entry variant: '${ variantUid } ' of entry uid ${ entryUid } ` , 'info' ) ;
213+ log (
214+ this . config ,
215+ `Created entry variant: '${ variantUid } ' of entry uid ${ entryUid } locale '${ locale } '` ,
216+ 'info' ,
217+ ) ;
221218 } ;
222219
223220 const onReject = ( { error, apiData, log } : any ) => {
224221 const { entryUid, variantUid } = apiData ;
225222 this . failedVariantEntries . set ( variantUid , apiData ) ;
226- log ( this . config , `Failed to create entry variant: '${ variantUid } ' of entry uid ${ entryUid } ` , 'error' ) ;
223+ log (
224+ this . config ,
225+ `Failed to create entry variant: '${ variantUid } ' of entry uid ${ entryUid } locale '${ locale } '` ,
226+ 'error' ,
227+ ) ;
227228 log ( this . config , error , 'error' ) ;
228229 } ;
229230 // NOTE Find new variant Id by old Id
@@ -440,10 +441,18 @@ export default class VariantEntries extends VariantAdapter<VariantHttpClient<Imp
440441 }
441442
442443 const onSuccess = ( { response, apiData : { entryUid, variantUid } , log } : any ) => {
443- log ( this . config , `Entry variant: '${ variantUid } ' of entry uid ${ entryUid } published successfully!` , 'info' ) ;
444+ log (
445+ this . config ,
446+ `Entry variant: '${ variantUid } ' of entry '${ entryUid } ' published on locales '${ locales . join ( ',' ) } '` ,
447+ 'info' ,
448+ ) ;
444449 } ;
445450 const onReject = ( { error, apiData : { entryUid, variantUid } , log } : any ) => {
446- log ( this . config , `Failed to publish entry variant: '${ variantUid } ' of entry uid ${ entryUid } ` , 'error' ) ;
451+ log (
452+ this . config ,
453+ `Failed to publish entry variant: '${ variantUid } ' of entry uid ${ entryUid } on locales '${ locales . join ( ',' ) } '` ,
454+ 'error' ,
455+ ) ;
447456 log ( this . config , formatError ( error ) , 'error' ) ;
448457 } ;
449458
0 commit comments