Skip to content

Commit e08c2d2

Browse files
Merge pull request #739 from contentstack/feature/wp-dynamic
Page CT added, reference handling for posts and categories CTs & pare…
2 parents 627ca9a + 9309eec commit e08c2d2

File tree

4 files changed

+558
-90
lines changed

4 files changed

+558
-90
lines changed

.talismanrc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,10 @@ fileignoreconfig:
6666
checksum: bd1465785804b3e3942d79f4424498bec838e5aba431c715eb419f3d39cf8d30
6767

6868

69+
70+
fileignoreconfig:
71+
- filename: api/src/services/migration.service.ts
72+
checksum: abae249cacfab5c67e2d18a645c852649da2339954f26ae0f88c8698bdc016e6
73+
- filename: api/src/services/wordpress.service.ts
74+
checksum: 95e532836194547682e791d0a231fb70e402be99260ac234e808eddb6e80c6af
75+
version: "1.0"

api/src/constants/index.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,11 @@ export const MIGRATION_DATA_CONFIG = {
266266
POSTS_FILE_NAME: "en-us.json",
267267
POSTS_MASTER_FILE: "posts.json",
268268

269+
PAGES_DIR_NAME: "pages",
270+
PAGES_FOLDER_NAME: "en-us",
271+
PAGES_FILE_NAME: "en-us.json",
272+
PAGES_MASTER_FILE: "pages.json",
273+
269274
CHUNKS_DIR_NAME: "chunks",
270275

271276
GLOBAL_FIELDS_DIR_NAME: "global_fields",

api/src/services/migration.service.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,7 @@ const startTestMigration = async (req: Request): Promise<any> => {
363363
await wordpressService?.getAllTags(file_path, packagePath, project?.current_test_stack_id, projectId, contentTypes, project?.mapperKeys, project?.stackDetails?.master_locale, project)
364364
await wordpressService?.getAllCategories(file_path, packagePath, project?.current_test_stack_id, projectId, contentTypes, project?.mapperKeys, project?.stackDetails?.master_locale, project)
365365
await wordpressService?.extractPosts(packagePath, project?.current_test_stack_id, projectId, contentTypes, project?.mapperKeys, project?.stackDetails?.master_locale, project)
366+
await wordpressService?.extractPages(packagePath, project?.current_test_stack_id, projectId, contentTypes, project?.mapperKeys, project?.stackDetails?.master_locale, project)
366367
await wordpressService?.extractGlobalFields(project?.current_test_stack_id, projectId)
367368
await wordpressService?.createVersionFile(project?.current_test_stack_id, projectId);
368369
}
@@ -583,6 +584,7 @@ const startMigration = async (req: Request): Promise<any> => {
583584
await wordpressService?.getAllTags(file_path, packagePath, project?.destination_stack_id, projectId, contentTypes, project?.mapperKeys, project?.stackDetails?.master_locale, project)
584585
await wordpressService?.getAllCategories(file_path, packagePath, project?.destination_stack_id, projectId, contentTypes, project?.mapperKeys, project?.stackDetails?.master_locale, project)
585586
await wordpressService?.extractPosts(packagePath, project?.destination_stack_id, projectId, contentTypes, project?.mapperKeys, project?.stackDetails?.master_locale, project)
587+
await wordpressService?.extractPages(packagePath, project?.destination_stack_id, projectId, contentTypes, project?.mapperKeys, project?.stackDetails?.master_locale, project)
586588
await wordpressService?.extractGlobalFields(project?.destination_stack_id, projectId)
587589
await wordpressService?.createVersionFile(project?.destination_stack_id, projectId);
588590
}

0 commit comments

Comments
 (0)