@@ -11,6 +11,7 @@ import { HTTP_TEXTS, HTTP_CODES, LOCALE_MAPPER, STEPPER_STEPS } from "../constan
1111import { BadRequestError , ExceptionFunction } from "../utils/custom-errors.utils.js" ;
1212import { fieldAttacher } from "../utils/field-attacher.utils.js" ;
1313import { siteCoreService } from "./sitecore.service.js" ;
14+ import { wordpressService } from "./wordpress.service.js" ;
1415import { testFolderCreator } from "../utils/test-folder-creator.utils.js" ;
1516import { utilsCli } from './runCli.service.js' ;
1617import customLogger from "../utils/custom-logger.utils.js" ;
@@ -217,10 +218,22 @@ const startTestMigration = async (req: Request): Promise<any> => {
217218 const message = getLogMessage ( 'startTestMigration' , 'Starting Test Migration...' , { } ) ;
218219 await customLogger ( projectId , project ?. current_test_stack_id , 'info' , message ) ;
219220 await setLogFilePath ( loggerPath ) ;
220- const contentTypes = await fieldAttacher ( { orgId, projectId, destinationStackId : project ?. current_test_stack_id } ) ;
221- await siteCoreService ?. createEntry ( { packagePath, contentTypes, destinationStackId : project ?. current_test_stack_id , projectId } ) ;
222- await siteCoreService ?. createLocale ( req , project ?. current_test_stack_id , projectId ) ;
223- await siteCoreService ?. createVersionFile ( project ?. current_test_stack_id ) ;
221+ // const contentTypes = await fieldAttacher({ orgId, projectId, destinationStackId: project?.current_test_stack_id });
222+ // await siteCoreService?.createEntry({ packagePath, contentTypes, destinationStackId: project?.current_test_stack_id, projectId });
223+ // await siteCoreService?.createLocale(req, project?.current_test_stack_id, projectId);
224+ // await siteCoreService?.createVersionFile(project?.current_test_stack_id);
225+ let affix = "ogip"
226+ await wordpressService ?. getAllAssets ( affix )
227+ await wordpressService ?. createAssetFolderFile ( affix )
228+ await wordpressService ?. getAllreference ( affix )
229+ await wordpressService ?. extractChunks ( affix )
230+ await wordpressService ?. getAllAuthors ( affix )
231+ await wordpressService ?. extractContentTypes ( affix )
232+ await wordpressService ?. getAllTerms ( affix )
233+ await wordpressService ?. getAllTags ( affix )
234+ await wordpressService ?. getAllCategories ( affix )
235+ await wordpressService ?. extractPosts ( affix )
236+ await wordpressService ?. extractGlobalFields ( )
224237 await testFolderCreator ?.( { destinationStackId : project ?. current_test_stack_id } ) ;
225238 await utilsCli ?. runCli ( region , user_id , project ?. current_test_stack_id , projectId , true , loggerPath ) ;
226239 }
@@ -251,10 +264,22 @@ const startMigration = async (req: Request): Promise<any> => {
251264 const message = getLogMessage ( 'startTestMigration' , 'Starting Migration...' , { } ) ;
252265 await customLogger ( projectId , project ?. destination_stack_id , 'info' , message ) ;
253266 await setLogFilePath ( loggerPath ) ;
254- const contentTypes = await fieldAttacher ( { orgId, projectId, destinationStackId : project ?. destination_stack_id } ) ;
255- await siteCoreService ?. createEntry ( { packagePath, contentTypes, destinationStackId : project ?. destination_stack_id , projectId } ) ;
256- await siteCoreService ?. createLocale ( req , project ?. destination_stack_id , projectId ) ;
257- await siteCoreService ?. createVersionFile ( project ?. destination_stack_id ) ;
267+ // const contentTypes = await fieldAttacher({ orgId, projectId, destinationStackId: project?.destination_stack_id });
268+ // await siteCoreService?.createEntry({ packagePath, contentTypes, destinationStackId: project?.destination_stack_id, projectId });
269+ // await siteCoreService?.createLocale(req, project?.destination_stack_id, projectId);
270+ // await siteCoreService?.createVersionFile(project?.destination_stack_id);
271+ let affix = "ogip"
272+ await wordpressService ?. getAllAssets ( affix )
273+ await wordpressService ?. createAssetFolderFile ( affix )
274+ await wordpressService ?. getAllreference ( affix )
275+ await wordpressService ?. extractChunks ( affix )
276+ await wordpressService ?. getAllAuthors ( affix )
277+ await wordpressService ?. extractContentTypes ( affix )
278+ await wordpressService ?. getAllTerms ( affix )
279+ await wordpressService ?. getAllTags ( affix )
280+ await wordpressService ?. getAllCategories ( affix )
281+ await wordpressService ?. extractPosts ( affix )
282+ await wordpressService ?. extractGlobalFields ( )
258283 await utilsCli ?. runCli ( region , user_id , project ?. destination_stack_id , projectId , false , loggerPath ) ;
259284 }
260285}
0 commit comments