@@ -369,13 +369,46 @@ const startTestMigration = async (req: Request): Promise<any> => {
369369 }
370370 case CMS . CONTENTFUL : {
371371 const cleanLocalPath = file_path ?. replace ?.( / \/ $ / , '' ) ;
372- await contentfulService ?. createLocale ( cleanLocalPath , project ?. current_test_stack_id , projectId , project ) ;
373- await contentfulService ?. createRefrence ( cleanLocalPath , project ?. current_test_stack_id , projectId ) ;
374- await contentfulService ?. createWebhooks ( cleanLocalPath , project ?. current_test_stack_id , projectId ) ;
375- await contentfulService ?. createEnvironment ( cleanLocalPath , project ?. current_test_stack_id , projectId ) ;
376- await contentfulService ?. createAssets ( cleanLocalPath , project ?. current_test_stack_id , projectId , true ) ;
377- await contentfulService ?. createEntry ( cleanLocalPath , project ?. current_test_stack_id , projectId , contentTypes , project ?. mapperKeys , project ?. stackDetails ?. master_locale , project ) ;
378- await contentfulService ?. createVersionFile ( project ?. current_test_stack_id , projectId ) ;
372+ await contentfulService ?. createLocale (
373+ cleanLocalPath ,
374+ project ?. current_test_stack_id ,
375+ projectId ,
376+ project
377+ ) ;
378+ await contentfulService ?. createRefrence (
379+ cleanLocalPath ,
380+ project ?. current_test_stack_id ,
381+ projectId
382+ ) ;
383+ await contentfulService ?. createWebhooks (
384+ cleanLocalPath ,
385+ project ?. current_test_stack_id ,
386+ projectId
387+ ) ;
388+ await contentfulService ?. createEnvironment (
389+ cleanLocalPath ,
390+ project ?. current_test_stack_id ,
391+ projectId
392+ ) ;
393+ await contentfulService ?. createAssets (
394+ cleanLocalPath ,
395+ project ?. current_test_stack_id ,
396+ projectId ,
397+ true
398+ ) ;
399+ await contentfulService ?. createEntry (
400+ cleanLocalPath ,
401+ project ?. current_test_stack_id ,
402+ projectId ,
403+ contentTypes ,
404+ project ?. mapperKeys ,
405+ project ?. stackDetails ?. master_locale ,
406+ project
407+ ) ;
408+ await contentfulService ?. createVersionFile (
409+ project ?. current_test_stack_id ,
410+ projectId
411+ ) ;
379412 break ;
380413 }
381414 default :
@@ -545,13 +578,45 @@ const startMigration = async (req: Request): Promise<any> => {
545578 }
546579 case CMS . CONTENTFUL : {
547580 const cleanLocalPath = file_path ?. replace ?.( / \/ $ / , '' ) ;
548- await contentfulService ?. createLocale ( cleanLocalPath , project ?. destination_stack_id , projectId , project ) ;
549- await contentfulService ?. createRefrence ( cleanLocalPath , project ?. destination_stack_id , projectId ) ;
550- await contentfulService ?. createWebhooks ( cleanLocalPath , project ?. destination_stack_id , projectId ) ;
551- await contentfulService ?. createEnvironment ( cleanLocalPath , project ?. destination_stack_id , projectId ) ;
552- await contentfulService ?. createAssets ( cleanLocalPath , project ?. destination_stack_id , projectId ) ;
553- await contentfulService ?. createEntry ( cleanLocalPath , project ?. destination_stack_id , projectId , contentTypes , project ?. mapperKeys , project ?. stackDetails ?. master_locale , project ) ;
554- await contentfulService ?. createVersionFile ( project ?. destination_stack_id , projectId ) ;
581+ await contentfulService ?. createLocale (
582+ cleanLocalPath ,
583+ project ?. destination_stack_id ,
584+ projectId ,
585+ project
586+ ) ;
587+ await contentfulService ?. createRefrence (
588+ cleanLocalPath ,
589+ project ?. destination_stack_id ,
590+ projectId
591+ ) ;
592+ await contentfulService ?. createWebhooks (
593+ cleanLocalPath ,
594+ project ?. destination_stack_id ,
595+ projectId
596+ ) ;
597+ await contentfulService ?. createEnvironment (
598+ cleanLocalPath ,
599+ project ?. destination_stack_id ,
600+ projectId
601+ ) ;
602+ await contentfulService ?. createAssets (
603+ cleanLocalPath ,
604+ project ?. destination_stack_id ,
605+ projectId
606+ ) ;
607+ await contentfulService ?. createEntry (
608+ cleanLocalPath ,
609+ project ?. destination_stack_id ,
610+ projectId ,
611+ contentTypes ,
612+ project ?. mapperKeys ,
613+ project ?. stackDetails ?. master_locale ,
614+ project
615+ ) ;
616+ await contentfulService ?. createVersionFile (
617+ project ?. destination_stack_id ,
618+ projectId
619+ ) ;
555620 break ;
556621 }
557622 default :
@@ -620,7 +685,6 @@ const getLogs = async (req: Request): Promise<any> => {
620685 * @throws Exception if the project ID is invalid or the when the path to project.json is incorrect
621686 */
622687export const createSourceLocales = async ( req : Request ) => {
623-
624688 const projectId = req ?. params ?. projectId ;
625689 const locales = req ?. body ?. locale ;
626690
0 commit comments