Skip to content

Commit 95a8810

Browse files
Merge pull request #742 from contentstack/dev
Dev
2 parents b1f0f2e + 4023f25 commit 95a8810

File tree

17 files changed

+643
-126
lines changed

17 files changed

+643
-126
lines changed

.talismanrc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,3 +70,10 @@ fileignoreconfig:
7070
checksum: bd1465785804b3e3942d79f4424498bec838e5aba431c715eb419f3d39cf8d30
7171

7272

73+
74+
fileignoreconfig:
75+
- filename: api/src/services/migration.service.ts
76+
checksum: abae249cacfab5c67e2d18a645c852649da2339954f26ae0f88c8698bdc016e6
77+
- filename: api/src/services/wordpress.service.ts
78+
checksum: 95e532836194547682e791d0a231fb70e402be99260ac234e808eddb6e80c6af
79+
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)