@@ -219,13 +219,14 @@ const startTestMigration = async (req: Request): Promise<any> => {
219219 const message = getLogMessage ( 'startTestMigration' , 'Starting Test Migration...' , { } ) ;
220220 await customLogger ( projectId , project ?. current_test_stack_id , 'info' , message ) ;
221221 await setLogFilePath ( loggerPath ) ;
222- const contentTypes = await fieldAttacher ( { orgId, projectId, destinationStackId : project ?. current_test_stack_id } ) ;
223222
224223 switch ( cms ) {
225224 case CMS . SITECORE_V8 :
226225 case CMS . SITECORE_V9 :
227226 case CMS . SITECORE_V10 : {
228227 if ( packagePath ) {
228+ const contentTypes = await fieldAttacher ( { orgId, projectId, destinationStackId : project ?. current_test_stack_id } ) ;
229+
229230 await siteCoreService ?. createEntry ( { packagePath, contentTypes, destinationStackId : project ?. current_test_stack_id , projectId } ) ;
230231 await siteCoreService ?. createLocale ( req , project ?. current_test_stack_id , projectId ) ;
231232 await siteCoreService ?. createVersionFile ( project ?. current_test_stack_id ) ;
@@ -239,20 +240,21 @@ const startTestMigration = async (req: Request): Promise<any> => {
239240 await wordpressService ?. getAllreference ( affix , packagePath , project ?. current_test_stack_id , projectId )
240241 await wordpressService ?. extractChunks ( affix , packagePath , project ?. current_test_stack_id , projectId )
241242 await wordpressService ?. getAllAuthors ( affix , packagePath , project ?. current_test_stack_id , projectId )
242- // await wordpressService?.extractContentTypes(affix , project?.current_test_stack_id)
243+ await wordpressService ?. extractContentTypes ( projectId , project ?. current_test_stack_id )
243244 await wordpressService ?. getAllTerms ( affix , packagePath , project ?. current_test_stack_id , projectId )
244245 await wordpressService ?. getAllTags ( affix , packagePath , project ?. current_test_stack_id , projectId )
245246 await wordpressService ?. getAllCategories ( affix , packagePath , project ?. current_test_stack_id , projectId )
246- await wordpressService ?. extractPosts ( affix , packagePath , project ?. current_test_stack_id , projectId )
247+ await wordpressService ?. extractPosts ( packagePath , project ?. current_test_stack_id , projectId )
247248 await wordpressService ?. extractGlobalFields ( project ?. current_test_stack_id , projectId )
249+ await wordpressService ?. createVersionFile ( project ?. current_test_stack_id , projectId ) ;
248250 }
249251 break ;
250252 }
251253 default :
252254 break ;
253255 }
254- // await testFolderCreator?.({ destinationStackId: project?.current_test_stack_id });
255- await utilsCli ?. runCli ( region , user_id , project ?. current_test_stack_id , projectId , true , loggerPath ) ;
256+ await testFolderCreator ?.( { destinationStackId : project ?. current_test_stack_id } ) ;
257+ await utilsCli ?. runCli ( region , user_id , project ?. current_test_stack_id , projectId , true , loggerPath ) ;
256258 }
257259}
258260
@@ -297,17 +299,20 @@ const startMigration = async (req: Request): Promise<any> => {
297299 }
298300 case CMS . WORDPRESS : {
299301 if ( packagePath ) {
300- await wordpressService ?. getAllAssets ( affix , packagePath , project ?. current_test_stack_id , projectId )
301- await wordpressService ?. createAssetFolderFile ( affix , project ?. current_test_stack_id , projectId )
302- await wordpressService ?. getAllreference ( affix , packagePath , project ?. current_test_stack_id , projectId )
303- await wordpressService ?. extractChunks ( affix , packagePath , project ?. current_test_stack_id , projectId )
304- await wordpressService ?. getAllAuthors ( affix , packagePath , project ?. current_test_stack_id , projectId )
305- // await wordpressService?.extractContentTypes(affix, project?.current_test_stack_id)
306- await wordpressService ?. getAllTerms ( affix , packagePath , project ?. current_test_stack_id , projectId )
307- await wordpressService ?. getAllTags ( affix , packagePath , project ?. current_test_stack_id , projectId )
308- await wordpressService ?. getAllCategories ( affix , packagePath , project ?. current_test_stack_id , projectId )
309- await wordpressService ?. extractPosts ( affix , packagePath , project ?. current_test_stack_id , projectId )
310- await wordpressService ?. extractGlobalFields ( project ?. current_test_stack_id , projectId )
302+ await wordpressService ?. getAllAssets ( affix , packagePath , project ?. destination_stack_id , projectId )
303+ await wordpressService ?. createAssetFolderFile ( affix , project ?. destination_stack_id , projectId )
304+ await wordpressService ?. getAllreference ( affix , packagePath , project ?. destination_stack_id , projectId )
305+ await wordpressService ?. extractChunks ( affix , packagePath , project ?. destination_stack_id , projectId )
306+ await wordpressService ?. getAllAuthors ( affix , packagePath , project ?. destination_stack_id , projectId )
307+ await wordpressService ?. extractContentTypes ( projectId , project ?. destination_stack_id )
308+ await wordpressService ?. getAllTerms ( affix , packagePath , project ?. destination_stack_id , projectId )
309+ await wordpressService ?. getAllTags ( affix , packagePath , project ?. destination_stack_id , projectId )
310+ await wordpressService ?. getAllCategories ( affix , packagePath , project ?. destination_stack_id , projectId )
311+ await wordpressService ?. extractPosts ( packagePath , project ?. destination_stack_id , projectId )
312+ await wordpressService ?. extractGlobalFields ( project ?. destination_stack_id , projectId )
313+ await wordpressService ?. createVersionFile ( project ?. destination_stack_id , projectId ) ;
314+
315+
311316 }
312317 break ;
313318 }
0 commit comments