Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
38ab27e
feat: Enhance WordPress migration functionality by adding new content…
AishDani Jan 12, 2026
d649043
feat: changed uid of each field to nested level of uid for UI showcas…
AishDani Jan 14, 2026
269aadd
feat: refined category extraction logic
AishDani Jan 14, 2026
49a16db
feat: add term extraction functionality
AishDani Jan 15, 2026
9693b55
feat: implement term and category extraction enhancements in WordPres…
AishDani Jan 20, 2026
5e157f8
Text overflow issue resolved
sayalijoshi27 Jan 21, 2026
7bb90fc
Merge branch 'dev' of https://github.com/contentstack/migration-v2 in…
sayalijoshi27 Jan 21, 2026
f7b330c
line clamp set to 1
sayalijoshi27 Jan 21, 2026
52c4865
build script change to migration-wordpress
sayalijoshi27 Jan 21, 2026
964b5e0
Merge branch 'dev' of https://github.com/contentstack/migration-v2 in…
AishDani Jan 22, 2026
f9834e3
Merge branch 'feature/wordpress' of https://github.com/contentstack/m…
AishDani Jan 22, 2026
b7f2707
Merge branch 'dev' of https://github.com/contentstack/migration-v2 in…
AishDani Feb 6, 2026
9dff435
refactor:Refactor taxonomy handling in extractItems and extractTaxono…
AishDani Feb 9, 2026
81ae9e1
refactor: Remove taxonomy handling from convertToSchemaFormate for cl…
AishDani Feb 9, 2026
5940632
chore: Update WordPress dependencies to latest versions for improved …
AishDani Feb 9, 2026
b1c106a
refactor: Improve array handling and code consistency in WordPress se…
AishDani Feb 9, 2026
985bdf5
chore: Update dependencies across multiple packages, including cheeri…
AishDani Feb 9, 2026
ce1e78a
chore: Update dependencies in package-lock.json files across multiple…
AishDani Feb 9, 2026
4553ca4
chore: Update @contentstack/cli and related dependencies in package-l…
AishDani Feb 9, 2026
d0dd4fc
refactor: removed unused variables
AishDani Feb 10, 2026
5b581c1
conflict resolved
sayalijoshi27 Feb 10, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10,035 changes: 7,686 additions & 2,349 deletions api/package-lock.json

Large diffs are not rendered by default.

11 changes: 8 additions & 3 deletions api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"http": "^0.0.1-security",
"js-yaml": "^4.1.1",
"jsdom": "^24.1.0",
"jsonpath": "^1.2.0",
"jsonpath": "^1.2.1",
"jsonwebtoken": "^9.0.3",
"lowdb": "^7.0.1",
"mkdirp": "^3.0.1",
Expand All @@ -56,7 +56,9 @@
"shelljs": "^0.9.0",
"socket.io": "^4.7.5",
"uuid": "^9.0.1",
"winston": "^3.11.0"
"winston": "^3.11.0",
"cheerio": "^1.2.0",
"@wordpress/block-library": "^9.30.0"
},
"devDependencies": {
"@types/cors": "^2.8.17",
Expand All @@ -79,7 +81,10 @@
"lodash": "^4.17.21",
"prettier": "^2.4.1",
"tsx": "^4.7.1",
"typescript": "^5.4.3"
"typescript": "^5.4.3",
"@types/wordpress__block-library": "^2.6.3",
"@types/wordpress__block-serialization-spec-parser": "^3.1.3",
"@types/wordpress__blocks": "^12.5.18"
},
"keywords": []
}
6 changes: 3 additions & 3 deletions api/src/constants/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -258,9 +258,9 @@ export const MIGRATION_DATA_CONFIG = {
ENTRIES_DIR_NAME: 'entries',
ENTRIES_MASTER_FILE: 'index.json',

AUTHORS_DIR_NAME: 'authors',
AUTHORS_FILE_NAME: 'en-us.json',
AUTHORS_MASTER_FILE: 'authors.json',
AUTHORS_DIR_NAME: "author",
AUTHORS_FILE_NAME: "en-us.json",
AUTHORS_MASTER_FILE: "authors.json",

CATEGORIES_DIR_NAME: 'categories',
CATEGORIES_FILE_NAME: 'en-us.json',
Expand Down
211 changes: 19 additions & 192 deletions api/src/services/migration.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -442,14 +442,14 @@ const startTestMigration = async (req: Request): Promise<any> => {
await extensionService?.createExtension({
destinationStackId: project?.current_test_stack_id,
});
await taxonomyService?.createTaxonomy({
orgId,
projectId,
stackId: project?.destination_stack_id,
current_test_stack_id: project?.current_test_stack_id,
region,
userId: user_id,
});
// await taxonomyService?.createTaxonomy({
// orgId,
// projectId,
// stackId: project?.destination_stack_id,
// current_test_stack_id: project?.current_test_stack_id,
// region,
// userId: user_id,
// });
await globalFieldServie?.createGlobalField({
region,
user_id,
Expand Down Expand Up @@ -488,102 +488,11 @@ const startTestMigration = async (req: Request): Promise<any> => {
}
case CMS.WORDPRESS: {
if (packagePath) {
await wordpressService?.createLocale(
req,
project?.current_test_stack_id,
projectId,
project
);
await wordpressService?.getAllAssets(
file_path,
packagePath,
project?.current_test_stack_id,
projectId
);
await wordpressService?.createAssetFolderFile(
file_path,
project?.current_test_stack_id,
projectId
);
await wordpressService?.getAllreference(
file_path,
packagePath,
project?.current_test_stack_id,
projectId
);
await wordpressService?.extractChunks(
file_path,
packagePath,
project?.current_test_stack_id,
projectId
);
await wordpressService?.getAllAuthors(
file_path,
packagePath,
project?.current_test_stack_id,
projectId,
contentTypes,
project?.mapperKeys,
project?.stackDetails?.master_locale,
project
);
//await wordpressService?.extractContentTypes(projectId, project?.current_test_stack_id, contentTypes)
await wordpressService?.getAllTerms(
file_path,
packagePath,
project?.current_test_stack_id,
projectId,
contentTypes,
project?.mapperKeys,
project?.stackDetails?.master_locale,
project
);
await wordpressService?.getAllTags(
file_path,
packagePath,
project?.current_test_stack_id,
projectId,
contentTypes,
project?.mapperKeys,
project?.stackDetails?.master_locale,
project
);
await wordpressService?.getAllCategories(
file_path,
packagePath,
project?.current_test_stack_id,
projectId,
contentTypes,
project?.mapperKeys,
project?.stackDetails?.master_locale,
project
);
await wordpressService?.extractPosts(
packagePath,
project?.current_test_stack_id,
projectId,
contentTypes,
project?.mapperKeys,
project?.stackDetails?.master_locale,
project
);
await wordpressService?.extractPages(
packagePath,
project?.current_test_stack_id,
projectId,
contentTypes,
project?.mapperKeys,
project?.stackDetails?.master_locale,
project
);
await wordpressService?.extractGlobalFields(
project?.current_test_stack_id,
projectId
);
await wordpressService?.createVersionFile(
project?.current_test_stack_id,
projectId
);
await wordpressService?.getAllAssets(file_path, packagePath, project?.current_test_stack_id, projectId);
await wordpressService?.createTaxonomy(file_path, packagePath, project?.current_test_stack_id, projectId, contentTypes, project?.mapperKeys, project?.stackDetails?.master_locale, project);
await wordpressService?.createEntry(file_path, packagePath, project?.current_test_stack_id, projectId, contentTypes, project?.mapperKeys, project?.stackDetails?.master_locale, project);
// await wordpressService?.createLocale(req, project?.current_test_stack_id, projectId, project);
await wordpressService?.createVersionFile(project?.current_test_stack_id, projectId);
}
break;
}
Expand Down Expand Up @@ -978,86 +887,10 @@ const startMigration = async (req: Request): Promise<any> => {
project?.destination_stack_id,
projectId
);
await wordpressService?.createAssetFolderFile(
file_path,
project?.destination_stack_id,
projectId
);
await wordpressService?.getAllreference(
file_path,
packagePath,
project?.destination_stack_id,
projectId
);
await wordpressService?.extractChunks(
file_path,
packagePath,
project?.destination_stack_id,
projectId
);
await wordpressService?.getAllAuthors(
file_path,
packagePath,
project?.destination_stack_id,
projectId,
contentTypes,
project?.mapperKeys,
project?.stackDetails?.master_locale,
project
);
await wordpressService?.createTaxonomy(file_path, packagePath, project?.destination_stack_id, projectId, contentTypes, project?.mapperKeys, project?.stackDetails?.master_locale, project);
await wordpressService?.createEntry(file_path, packagePath, project?.destination_stack_id, projectId, contentTypes, project?.mapperKeys, project?.stackDetails?.master_locale, project);

//await wordpressService?.extractContentTypes(projectId, project?.destination_stack_id)
await wordpressService?.getAllTerms(
file_path,
packagePath,
project?.destination_stack_id,
projectId,
contentTypes,
project?.mapperKeys,
project?.stackDetails?.master_locale,
project
);
await wordpressService?.getAllTags(
file_path,
packagePath,
project?.destination_stack_id,
projectId,
contentTypes,
project?.mapperKeys,
project?.stackDetails?.master_locale,
project
);
await wordpressService?.getAllCategories(
file_path,
packagePath,
project?.destination_stack_id,
projectId,
contentTypes,
project?.mapperKeys,
project?.stackDetails?.master_locale,
project
);
await wordpressService?.extractPosts(
packagePath,
project?.destination_stack_id,
projectId,
contentTypes,
project?.mapperKeys,
project?.stackDetails?.master_locale,
project
);
await wordpressService?.extractPages(
packagePath,
project?.destination_stack_id,
projectId,
contentTypes,
project?.mapperKeys,
project?.stackDetails?.master_locale,
project
);
await wordpressService?.extractGlobalFields(
project?.destination_stack_id,
projectId
);
await wordpressService?.createVersionFile(
project?.destination_stack_id,
projectId
Expand Down Expand Up @@ -1488,16 +1321,10 @@ const transformAndFlattenData = (
}
};
const getLogs = async (req: Request): Promise<any> => {
const projectId = req?.params?.projectId
? path?.basename(req.params.projectId)
: '';
const stackId = req?.params?.stackId
? path?.basename(req.params.stackId)
: '';
const projectId = req?.params?.projectId ? path?.basename(req.params.projectId): '';
const stackId = req?.params?.stackId ? path?.basename(req.params.stackId) : '';
const limit = req?.params?.limit ? parseInt(req.params.limit) : 10;
const startIndex = req?.params?.startIndex
? parseInt(req.params.startIndex)
: 0;
const startIndex = req?.params?.startIndex ? parseInt(req.params.startIndex) : 0;
const stopIndex = startIndex + limit;
const searchText = req?.params?.searchText ?? null;
const filter = req?.params?.filter ?? 'all';
Expand Down
Loading