@@ -225,34 +225,27 @@ const startTestMigration = async (req: Request): Promise<any> => {
225225 case CMS . SITECORE_V9 :
226226 case CMS . SITECORE_V10 : {
227227 if ( packagePath ) {
228- const contentTypes = await fieldAttacher ( { orgId, projectId, destinationStackId : project ?. current_test_stack_id } ) ;
229-
230- await siteCoreService ?. createEntry ( { packagePath, contentTypes, destinationStackId : project ?. current_test_stack_id , projectId } ) ;
228+ await siteCoreService ?. createEntry ( { packagePath, contentTypes, destinationStackId : project ?. current_test_stack_id , projectId, keyMapper : project ?. mapperKeys } ) ;
231229 await siteCoreService ?. createLocale ( req , project ?. current_test_stack_id , projectId ) ;
232230 await siteCoreService ?. createVersionFile ( project ?. current_test_stack_id ) ;
233231 }
234232 break ;
235233 }
236234 case CMS . WORDPRESS : {
237235 if ( packagePath ) {
238- await wordpressService ?. getAllAssets ( affix , packagePath , project ?. current_test_stack_id , projectId )
239- await wordpressService ?. createAssetFolderFile ( affix , project ?. current_test_stack_id , projectId )
240- await wordpressService ?. getAllreference ( affix , packagePath , project ?. current_test_stack_id , projectId )
241- await wordpressService ?. extractChunks ( affix , packagePath , project ?. current_test_stack_id , projectId )
242- await wordpressService ?. getAllAuthors ( affix , packagePath , project ?. current_test_stack_id , projectId )
243- await wordpressService ?. extractContentTypes ( projectId , project ?. current_test_stack_id )
244- await wordpressService ?. getAllTerms ( affix , packagePath , project ?. current_test_stack_id , projectId )
245- await wordpressService ?. getAllTags ( affix , packagePath , project ?. current_test_stack_id , projectId )
246- await wordpressService ?. getAllCategories ( affix , packagePath , project ?. current_test_stack_id , projectId )
247- await wordpressService ?. extractPosts ( packagePath , project ?. current_test_stack_id , projectId )
236+ await wordpressService ?. getAllAssets ( file_path , packagePath , project ?. current_test_stack_id , projectId )
237+ await wordpressService ?. createAssetFolderFile ( file_path , project ?. current_test_stack_id , projectId )
238+ await wordpressService ?. getAllreference ( file_path , packagePath , project ?. current_test_stack_id , projectId )
239+ await wordpressService ?. extractChunks ( file_path , packagePath , project ?. current_test_stack_id , projectId )
240+ await wordpressService ?. getAllAuthors ( file_path , packagePath , project ?. current_test_stack_id , projectId , contentTypes , project ?. mapperKeys )
241+ // await wordpressService?.extractContentTypes(projectId, project?.current_test_stack_id, contentTypes )
242+ await wordpressService ?. getAllTerms ( file_path , packagePath , project ?. current_test_stack_id , projectId , contentTypes , project ?. mapperKeys )
243+ await wordpressService ?. getAllTags ( file_path , packagePath , project ?. current_test_stack_id , projectId , contentTypes , project ?. mapperKeys )
244+ await wordpressService ?. getAllCategories ( file_path , packagePath , project ?. current_test_stack_id , projectId , contentTypes , project ?. mapperKeys )
245+ await wordpressService ?. extractPosts ( packagePath , project ?. current_test_stack_id , projectId , contentTypes , project ?. mapperKeys )
248246 await wordpressService ?. extractGlobalFields ( project ?. current_test_stack_id , projectId )
249247 await wordpressService ?. createVersionFile ( project ?. current_test_stack_id , projectId ) ;
250248 }
251- if ( packagePath ) {
252- await siteCoreService ?. createEntry ( { packagePath, contentTypes, master_locale : project ?. stackDetails ?. master_locale , destinationStackId : project ?. current_test_stack_id , projectId, keyMapper : project ?. mapperKeys } ) ;
253- await siteCoreService ?. createLocale ( req , project ?. current_test_stack_id , projectId ) ;
254- await siteCoreService ?. createVersionFile ( project ?. current_test_stack_id ) ;
255- }
256249 break ;
257250 }
258251 case CMS . CONTENTFUL : {
@@ -319,12 +312,12 @@ const startMigration = async (req: Request): Promise<any> => {
319312 await wordpressService ?. createAssetFolderFile ( file_path , project ?. destination_stack_id , projectId )
320313 await wordpressService ?. getAllreference ( file_path , packagePath , project ?. destination_stack_id , projectId )
321314 await wordpressService ?. extractChunks ( file_path , packagePath , project ?. destination_stack_id , projectId )
322- await wordpressService ?. getAllAuthors ( file_path , packagePath , project ?. destination_stack_id , projectId )
323- await wordpressService ?. extractContentTypes ( projectId , project ?. destination_stack_id )
324- await wordpressService ?. getAllTerms ( file_path , packagePath , project ?. destination_stack_id , projectId )
325- await wordpressService ?. getAllTags ( file_path , packagePath , project ?. destination_stack_id , projectId )
326- await wordpressService ?. getAllCategories ( file_path , packagePath , project ?. destination_stack_id , projectId )
327- await wordpressService ?. extractPosts ( packagePath , project ?. destination_stack_id , projectId )
315+ await wordpressService ?. getAllAuthors ( file_path , packagePath , project ?. destination_stack_id , projectId , contentTypes , project ?. mapperKeys )
316+ // await wordpressService?.extractContentTypes(projectId, project?.destination_stack_id)
317+ await wordpressService ?. getAllTerms ( file_path , packagePath , project ?. destination_stack_id , projectId , contentTypes , project ?. mapperKeys )
318+ await wordpressService ?. getAllTags ( file_path , packagePath , project ?. destination_stack_id , projectId , contentTypes , project ?. mapperKeys )
319+ await wordpressService ?. getAllCategories ( file_path , packagePath , project ?. destination_stack_id , projectId , contentTypes , project ?. mapperKeys )
320+ await wordpressService ?. extractPosts ( packagePath , project ?. destination_stack_id , projectId , contentTypes , project ?. mapperKeys )
328321 await wordpressService ?. extractGlobalFields ( project ?. destination_stack_id , projectId )
329322 await wordpressService ?. createVersionFile ( project ?. destination_stack_id , projectId ) ;
330323
0 commit comments