diff --git a/api/src/services/contentful.service.ts b/api/src/services/contentful.service.ts index c853eb405..8d533e643 100644 --- a/api/src/services/contentful.service.ts +++ b/api/src/services/contentful.service.ts @@ -331,7 +331,6 @@ const processField = ( break; } } - }; // Helper function to clean up brackets in non-numeric lang_value diff --git a/api/src/services/contentful/jsonRTE.ts b/api/src/services/contentful/jsonRTE.ts index 34d054c3c..90d168b9b 100755 --- a/api/src/services/contentful/jsonRTE.ts +++ b/api/src/services/contentful/jsonRTE.ts @@ -314,7 +314,6 @@ 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 6d403a3d6..90be5c598 100644 --- a/api/src/services/sitecore.service.ts +++ b/api/src/services/sitecore.service.ts @@ -9,6 +9,7 @@ import { orgService } from './org.service.js'; import { getLogMessage } from '../utils/index.js'; import customLogger from '../utils/custom-logger.utils.js'; + const append = "a"; const baseDirName = MIGRATION_DATA_CONFIG.DATA diff --git a/api/src/services/wordpress.service.ts b/api/src/services/wordpress.service.ts index 6a659397f..f48641a9a 100644 --- a/api/src/services/wordpress.service.ts +++ b/api/src/services/wordpress.service.ts @@ -10,7 +10,6 @@ import customLogger from "../utils/custom-logger.utils.js"; import { getLogMessage } from "../utils/index.js"; import { Advanced } from "../models/FieldMapper.js"; - const { JSDOM } = jsdom; const virtualConsole = new jsdom.VirtualConsole(); // Get the current file's path diff --git a/index.js b/index.js index 8993572b9..0188709e4 100644 --- a/index.js +++ b/index.js @@ -34,6 +34,7 @@ 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 3c2a1243f..975eb765f 100644 --- a/upload-api/migration-contentful/config/index.json +++ b/upload-api/migration-contentful/config/index.json @@ -4,4 +4,5 @@ "contentful": "contentfulSchema" }, "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 3496c92d6..da480f0c6 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 }; \ No newline at end of file diff --git a/upload-api/migration-wordpress/config/index.json b/upload-api/migration-wordpress/config/index.json index 661544d9f..8f0806c34 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 7c80dc036..1682e698d 100644 --- a/upload-api/src/config/index.ts +++ b/upload-api/src/config/index.ts @@ -13,7 +13,6 @@ export default { buketKey: 'project/package 45.zip' }, - 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' }; diff --git a/upload-api/src/models/contentful.json b/upload-api/src/models/contentful.json index 5ff2ce71d..441a70bac 100644 --- a/upload-api/src/models/contentful.json +++ b/upload-api/src/models/contentful.json @@ -31,4 +31,5 @@ "name": "roles", "required": "false" } + } diff --git a/upload-api/src/models/wordpress.json b/upload-api/src/models/wordpress.json index b0f90bfdc..52e3e0f32 100644 --- a/upload-api/src/models/wordpress.json +++ b/upload-api/src/models/wordpress.json @@ -23,4 +23,5 @@ "name": "wp\\:attachment_url", "required": "false" } + } diff --git a/upload-api/src/services/contentful/index.ts b/upload-api/src/services/contentful/index.ts index 9ca2c6371..cbd5d6c7c 100644 --- a/upload-api/src/services/contentful/index.ts +++ b/upload-api/src/services/contentful/index.ts @@ -7,6 +7,7 @@ import { Config } from '../../models/types'; const { extractContentTypes, createInitialMapper } = require('migration-contentful'); + const createContentfulMapper = async ( projectId: string | string[], app_token: string | string[], diff --git a/upload-api/src/validators/contentful/index.ts b/upload-api/src/validators/contentful/index.ts index 16a7e6818..a07116347 100644 --- a/upload-api/src/validators/contentful/index.ts +++ b/upload-api/src/validators/contentful/index.ts @@ -5,6 +5,7 @@ interface JsonData { [key: string]: any; } + //function to validate json file data function contentfulValidator(data: string): boolean { let jsonData: JsonData; diff --git a/upload-api/src/validators/sitecore/index.ts b/upload-api/src/validators/sitecore/index.ts index 551c50e6f..69ecb2913 100644 --- a/upload-api/src/validators/sitecore/index.ts +++ b/upload-api/src/validators/sitecore/index.ts @@ -9,6 +9,7 @@ interface props { data: items; } + async function sitecoreValidator({ data }: props) { try { let templates: any[] = []; diff --git a/upload-api/src/validators/wordpress/index.ts b/upload-api/src/validators/wordpress/index.ts index 86570598c..2a758e99a 100644 --- a/upload-api/src/validators/wordpress/index.ts +++ b/upload-api/src/validators/wordpress/index.ts @@ -1,6 +1,7 @@ import Config from '../../models/wordpress.json'; import * as Cheerio from 'cheerio'; + //function to validate xml file data function wordpressValidator(data: string): boolean { try { diff --git a/upload-api/tsconfig.json b/upload-api/tsconfig.json index f57491a8e..dbb6d8bba 100644 --- a/upload-api/tsconfig.json +++ b/upload-api/tsconfig.json @@ -44,7 +44,6 @@ // "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */ // "noResolve": true, /* Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project. */ - /* JavaScript Support */ "allowJs": true /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */, // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */