@@ -22,7 +22,7 @@ export const uploadAssetHelper = function (config: ImportConfig, req: any, fsPat
2222 return new Bluebird ( function ( resolve , reject ) {
2323 try {
2424 log . debug ( `Starting asset upload helper for path: ${ fsPath } ` ) ;
25-
25+
2626 managementSDKClient ( config )
2727 . then ( ( APIClient : ContentstackClient ) => {
2828 validate ( req ) ;
@@ -34,13 +34,13 @@ export const uploadAssetHelper = function (config: ImportConfig, req: any, fsPat
3434 }
3535
3636 log . debug ( `Uploading asset (attempt ${ RETRY } /${ MAX_RETRY_LIMIT } ): ${ fsPath } ` ) ;
37-
37+
3838 req . upload = fsPath ;
3939 const stackAPIClient = APIClient . stack ( {
4040 api_key : config . target_stack ,
4141 management_token : config . management_token ,
4242 } ) ;
43-
43+
4444 stackAPIClient
4545 . asset ( )
4646 . create ( req )
@@ -81,9 +81,9 @@ export const lookupAssets = function (
8181 ) {
8282 throw new Error ( 'Invalid inputs for lookupAssets!' ) ;
8383 }
84-
84+
8585 log . debug ( `Starting asset lookup for entry: ${ data . entry ?. uid } , content type: ${ data . content_type ?. uid } ` ) ;
86-
86+
8787 let parent : string [ ] = [ ] ;
8888 let assetUids : string [ ] = [ ] ;
8989 let assetUrls : string [ ] = [ ] ;
@@ -138,7 +138,9 @@ export const lookupAssets = function (
138138 findAssetIdsFromJsonCustomFields ( data . entry , data . content_type . schema ) ;
139139 } else if ( schema [ i ] . data_type === 'json' && schema [ i ] . field_metadata . extension ) {
140140 if ( installedExtensions && installedExtensions [ schema [ i ] . extension_uid ] ) {
141- log . debug ( `Mapping extension UID: ${ schema [ i ] . extension_uid } to ${ installedExtensions [ schema [ i ] . extension_uid ] } ` ) ;
141+ log . debug (
142+ `Mapping extension UID: ${ schema [ i ] . extension_uid } to ${ installedExtensions [ schema [ i ] . extension_uid ] } ` ,
143+ ) ;
142144 schema [ i ] . extension_uid = installedExtensions [ schema [ i ] . extension_uid ] ;
143145 }
144146 }
@@ -267,9 +269,9 @@ export const lookupAssets = function (
267269 updateFileFields ( data . entry , data , null , mappedAssetUids , matchedUids , unmatchedUids , mappedAssetUrls ) ;
268270 assetUids = _ . uniq ( assetUids ) ;
269271 assetUrls = _ . uniq ( assetUrls ) ;
270-
272+
271273 log . debug ( `Found ${ assetUids . length } unique asset UIDs and ${ assetUrls . length } unique asset URLs` ) ;
272-
274+
273275 let entry = JSON . stringify ( data . entry ) ;
274276
275277 assetUrls . forEach ( function ( assetUrl : any ) {
@@ -310,7 +312,7 @@ export const lookupAssets = function (
310312 }
311313
312314 if ( unmatchedUids . length ) {
313- log . warn ( `Found ${ unmatchedUids . length } unmatched asset UIDs` ) ;
315+ log . debug ( `Found ${ unmatchedUids . length } unmatched asset UIDs` ) ;
314316 let unmatchedAssetUids = helper . readFileSync ( path . join ( assetUidMapperPath , 'unmatched-asset-uids.json' ) ) ;
315317 unmatchedAssetUids = unmatchedAssetUids || { } ;
316318 if ( unmatchedAssetUids . hasOwnProperty ( data . content_type . uid ) ) {
@@ -324,7 +326,7 @@ export const lookupAssets = function (
324326 }
325327
326328 if ( unmatchedUrls . length ) {
327- log . warn ( `Found ${ unmatchedUrls . length } unmatched asset URLs` ) ;
329+ log . debug ( `Found ${ unmatchedUrls . length } unmatched asset URLs` ) ;
328330 let unmatchedAssetUrls = helper . readFileSync ( path . join ( assetUidMapperPath , 'unmatched-asset-urls.json' ) ) ;
329331 unmatchedAssetUrls = unmatchedAssetUrls || { } ;
330332 if ( unmatchedAssetUrls . hasOwnProperty ( data . content_type . uid ) ) {
0 commit comments