From e0b5388f1462b0cf3f192ea455cfd17881322708 Mon Sep 17 00:00:00 2001 From: RohitKini <57343193+RohitKini@users.noreply.github.com> Date: Wed, 5 Mar 2025 17:14:24 +0530 Subject: [PATCH 1/2] workflow yml test --- .github/workflows/repo-sync.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/repo-sync.yml b/.github/workflows/repo-sync.yml index 7695e9775..8390d55f5 100644 --- a/.github/workflows/repo-sync.yml +++ b/.github/workflows/repo-sync.yml @@ -11,12 +11,12 @@ env: SITECORE_REPO: contentstack-expert-services/migration-tool-sitecore # Change this to your sitecore repo CONTENTFUL_REPO: contentstack-expert-services/migration-tool-contentful # Change this to your contentful repo WORDPRESS_REPO: contentstack-expert-services/migration-tool-wordpress # Change this to your wordpress repo - RSYNC_SITECORE_API_SRC_SERVICES_EXCLUDES: "--exclude 'src/services/contentful/' --exclude 'src/services/contentful.service.ts/' --exclude 'src/services/wordpress.service.ts/'" # Include only sitecore services - RSYNC_CONTENTFUL_API_SRC_SERVICES_EXCLUDES: "--exclude 'src/services/wordpress.service.ts/' --exclude 'src/services/sitecore.service.ts/'" # Include only contentful services - RSYNC_WORDPRESS_API_SRC_SERVICES_EXCLUDES: "--exclude 'src/services/contentful/' --exclude 'src/services/contentful.service.ts/' --exclude 'src/services/sitecore.service.ts/'" # Include only wordpress services - RSYNC_SITECORE_UPLOAD_API_SRC_EXCLUDES: "--exclude 'migration-contentful/' --exclude 'migration-wordpress/' --exclude 'controllers/wordpress/' --exclude 'models/contentful.json' --exclude 'models/wordpress.json' --exclude 'services/contentful' --exclude 'validators/aem' --exclude 'validators/contentful' --exclude 'validators/wordpress'" # Include only sitecore upload-api - RSYNC_CONTENTFUL_UPLOAD_API_SRC_EXCLUDES: "--exclude 'migration-sitecore/' --exclude 'migration-wordpress/' --exclude 'controllers/sitecore/' --exclude 'models/wordpress.json' --exclude 'validators/aem' --exclude 'validators/sitecore' --exclude 'validators/wordpress'" # Include only contentful upload-api - RSYNC_WORDPRESS_UPLOAD_API_SRC_EXCLUDES: "--exclude 'migration-sitecore/' --exclude 'migration-contentful/' --exclude 'controllers/sitecore/' --exclude 'models/contentful.json' --exclude 'validators/aem' --exclude 'validators/sitecore' --exclude 'validators/contentful'" # Include only wordpress upload-api + RSYNC_SITECORE_API_SRC_SERVICES_EXCLUDES: "--exclude 'src/services/contentful/' --exclude 'src/services/contentful.service.ts' --exclude 'src/services/wordpress.service.ts'" # Include only sitecore services + RSYNC_CONTENTFUL_API_SRC_SERVICES_EXCLUDES: "--exclude 'src/services/wordpress.service.ts' --exclude 'src/services/sitecore.service.ts'" # Include only contentful services + RSYNC_WORDPRESS_API_SRC_SERVICES_EXCLUDES: "--exclude 'src/services/contentful/' --exclude 'src/services/contentful.service.ts' --exclude 'src/services/sitecore.service.ts'" # Include only wordpress services + RSYNC_SITECORE_UPLOAD_API_SRC_EXCLUDES: "--exclude 'migration-contentful/' --exclude 'migration-wordpress/' --exclude 'controllers/wordpress/' --exclude 'models/contentful.json' --exclude 'models/wordpress.json' --exclude 'services/contentful/' --exclude 'validators/aem/' --exclude 'validators/contentful/' --exclude 'validators/wordpress/'" # Include only sitecore upload-api + RSYNC_CONTENTFUL_UPLOAD_API_SRC_EXCLUDES: "--exclude 'migration-sitecore/' --exclude 'migration-wordpress/' --exclude 'controllers/sitecore/' --exclude 'models/wordpress.json' --exclude 'validators/aem/' --exclude 'validators/sitecore/' --exclude 'validators/wordpress/'" # Include only contentful upload-api + RSYNC_WORDPRESS_UPLOAD_API_SRC_EXCLUDES: "--exclude 'migration-sitecore/' --exclude 'migration-contentful/' --exclude 'controllers/sitecore/' --exclude 'models/contentful.json' --exclude 'validators/aem/' --exclude 'validators/sitecore/' --exclude 'validators/contentful/'" # Include only wordpress upload-api jobs: sync-on-merge: runs-on: ubuntu-latest From 503f5c0f252e42a5721582973cb1fd3dc598f654 Mon Sep 17 00:00:00 2001 From: RohitKini <57343193+RohitKini@users.noreply.github.com> Date: Wed, 5 Mar 2025 17:17:37 +0530 Subject: [PATCH 2/2] workflow yml test --- api/src/services/contentful.service.ts | 1 + api/src/services/contentful/jsonRTE.ts | 1 + api/src/services/sitecore.service.ts | 1 - api/src/services/wordpress.service.ts | 1 + index.js | 1 - upload-api/migration-contentful/config/index.json | 1 + upload-api/migration-sitecore/constants/index.js | 1 + upload-api/migration-wordpress/config/index.json | 1 + upload-api/src/config/index.ts | 1 + 9 files changed, 7 insertions(+), 2 deletions(-) diff --git a/api/src/services/contentful.service.ts b/api/src/services/contentful.service.ts index 9b57f0063..97c223d37 100644 --- a/api/src/services/contentful.service.ts +++ b/api/src/services/contentful.service.ts @@ -332,6 +332,7 @@ const processField = ( } } + }; diff --git a/api/src/services/contentful/jsonRTE.ts b/api/src/services/contentful/jsonRTE.ts index c1c52bfd4..f4bf92cd2 100755 --- a/api/src/services/contentful/jsonRTE.ts +++ b/api/src/services/contentful/jsonRTE.ts @@ -316,6 +316,7 @@ function parseBlockAsset(obj: any, lang?: LangType, destination_stack_id?: Stack + function parseBlockquote(obj: any): any { const children = obj.content.map((e: any) => parsers.get(e.nodeType)?.(e)).filter(Boolean); return { diff --git a/api/src/services/sitecore.service.ts b/api/src/services/sitecore.service.ts index d37805797..9cb5737b5 100644 --- a/api/src/services/sitecore.service.ts +++ b/api/src/services/sitecore.service.ts @@ -13,7 +13,6 @@ import customLogger from '../utils/custom-logger.utils.js'; const append = "a"; - const baseDirName = MIGRATION_DATA_CONFIG.DATA const { ENTRIES_DIR_NAME, diff --git a/api/src/services/wordpress.service.ts b/api/src/services/wordpress.service.ts index 4fb9d05b0..cd8b4b52f 100644 --- a/api/src/services/wordpress.service.ts +++ b/api/src/services/wordpress.service.ts @@ -17,6 +17,7 @@ const virtualConsole = new jsdom.VirtualConsole(); const __filename = fileURLToPath(import.meta.url); + // Get the current directory const __dirname = path.dirname(__filename); diff --git a/index.js b/index.js index 0188709e4..8993572b9 100644 --- a/index.js +++ b/index.js @@ -34,7 +34,6 @@ const envContents = { }; - // Function to create env files const createEnvFiles = () => { // Loop through each key in the envFilePaths object diff --git a/upload-api/migration-contentful/config/index.json b/upload-api/migration-contentful/config/index.json index 9d1da5482..3583969a2 100644 --- a/upload-api/migration-contentful/config/index.json +++ b/upload-api/migration-contentful/config/index.json @@ -5,5 +5,6 @@ }, "fileName": "en-us.json" + } \ No newline at end of file diff --git a/upload-api/migration-sitecore/constants/index.js b/upload-api/migration-sitecore/constants/index.js index da480f0c6..442b7035f 100644 --- a/upload-api/migration-sitecore/constants/index.js +++ b/upload-api/migration-sitecore/constants/index.js @@ -43,6 +43,7 @@ const MIGRATION_DATA_CONFIG = { EXPORT_INFO_FILE: "export-info.json" } + module.exports = { MIGRATION_DATA_CONFIG diff --git a/upload-api/migration-wordpress/config/index.json b/upload-api/migration-wordpress/config/index.json index 8f0806c34..454ee3a21 100644 --- a/upload-api/migration-wordpress/config/index.json +++ b/upload-api/migration-wordpress/config/index.json @@ -47,6 +47,7 @@ "fileName": "en-us.json", "masterfile": "posts.json" + } } diff --git a/upload-api/src/config/index.ts b/upload-api/src/config/index.ts index ad26b1411..f5659b480 100644 --- a/upload-api/src/config/index.ts +++ b/upload-api/src/config/index.ts @@ -14,6 +14,7 @@ export default { }, + localPath: '/home/gaurishn/Documents/contentstack/sitetitle.xml' //package 45.zip' // localPath: '/Users/umesh.more/Documents/ui-migration/migration-v2-node-server/upload-api/extracted_files/package 45.zip'