Merged
Conversation
…ality and consistency. Remove unused interfaces, enhance type definitions, and standardize import statements. Update logging and error handling for better clarity and maintainability across components.
…rror handling in authentication controller and service. Implement fallback responses for failed login and SMS request attempts to improve user experience and stability.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates dependencies and refines the migration flow to be more data-driven (CMS/file-format selection), with additional fixes around SQL-based validations and advanced field settings persistence, plus some backend error-handling/model updates.
Changes:
- Bump
axiosto^1.13.5acrossapi,ui, andupload-api(including migration sub-packages) and update lockfiles accordingly. - Update UI migration steps to derive selected CMS + file format from
legacyCms.json, including SQL handling driven byselectedFileFormat.fileformat_id. - Backend adjustments for auth error responses, project model fields (taxonomies), and content-mapper logging/formatting changes.
Reviewed changes
Copilot reviewed 19 out of 25 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| upload-api/package.json | Bumps axios dependency version. |
| upload-api/package-lock.json | Updates axios resolved version and transitive deps. |
| upload-api/migration-wordpress/package.json | Bumps axios dependency version. |
| upload-api/migration-wordpress/package-lock.json | Adds lockfile with axios 1.13.5 resolution. |
| upload-api/migration-sitecore/package.json | Bumps axios dependency version. |
| upload-api/migration-contentful/package.json | Bumps axios dependency version. |
| upload-api/migration-contentful/package-lock.json | Adds lockfile with axios 1.13.5 resolution. |
| ui/src/pages/Migration/index.tsx | Adjusts CMS + file-format selection precedence (config vs stored), adds fallback format selection. |
| ui/src/components/LegacyCms/index.tsx | Adds fallback to first allowed file format. |
| ui/src/components/LegacyCms/Actions/LoadUploadFile.tsx | Makes SQL/file rendering and validation more data-driven via selectedFileFormat. |
| ui/src/components/LegacyCms/Actions/LoadSelectCms.tsx | Sets selectedFileFormat from selected CMS’s allowed_file_formats. |
| ui/src/components/LegacyCms/Actions/LoadFileFormat.tsx | Simplifies icon selection logic for file format display. |
| ui/src/components/ContentMapper/index.tsx | Adjusts advanced settings merge + introduces debug-related code near save. |
| ui/src/components/AdvancePropertise/index.tsx | Fixes embedObjects payload handling and taxonomy toggle-state syncing. |
| ui/src/components/AdvancePropertise/advanceProperties.interface.ts | Extends updated settings typing (embedObject). |
| ui/src/cmsData/legacyCms.json | Normalizes file format titles (e.g., XML, Folder). |
| ui/package.json | Bumps axios dependency version. |
| ui/package-lock.json | Updates axios resolved version and transitive deps. |
| api/src/services/contentMapper.service.ts | Adds taxonomies persistence, formatting changes, and debug logging. |
| api/src/services/auth.service.ts | Improves fallback error response shaping when upstream response is missing. |
| api/src/models/project-lowdb.ts | Adds taxonomies to Project model and adjusts typing/formatting. |
| api/src/controllers/auth.controller.ts | Wraps auth handlers with try/catch and safer status defaults. |
| api/package.json | Bumps axios dependency version. |
| api/package-lock.json | Updates axios resolved version and transitive deps. |
Files not reviewed (6)
- api/package-lock.json: Language not supported
- ui/package-lock.json: Language not supported
- upload-api/migration-contentful/package-lock.json: Language not supported
- upload-api/migration-sitecore/package-lock.json: Language not supported
- upload-api/migration-wordpress/package-lock.json: Language not supported
- upload-api/package-lock.json: Language not supported
Comments suppressed due to low confidence (1)
ui/src/components/LegacyCms/Actions/LoadUploadFile.tsx:342
- Directory-based uploads (fileformat_id =
directory) will likely be treated as invalid here: whenisSQLis false,extensionis derived fromgetFileExtension(localPath), bututilities/functions.ts#getFileExtensionreturns''for directories (no extension). Consider handlingdirectoryexplicitly (e.g., if selectedFileFormat isdirectory, setextension = 'directory') or updatinggetFileExtensionto detect directories consistently withMigration/index.tsx.
// Derive SQL check from selectedFileFormat (data-driven via legacyCms.json)
const isSQL = newMigrationData?.legacy_cms?.selectedFileFormat?.fileformat_id?.toLowerCase() === 'sql';
let extension = '';
let isFormatValid = false;
if (isSQL) {
// For SQL connections, check if SQL format is allowed for the CMS
extension = 'sql';
const { all_cms = [] } = migrationData?.legacyCMSData || {};
// Fix: Use file_details.cmsType instead of uploadedFile.cmsType
const cmsTypeValue = newMigrationData?.legacy_cms?.uploadedFile?.file_details?.cmsType ||
newMigrationData?.legacy_cms?.uploadedFile?.cmsType || '';
const filteredCmsData = all_cms?.filter((cms: ICMSType) =>
cms?.parent?.toLowerCase() === cmsTypeValue?.toLowerCase()
);
isFormatValid = filteredCmsData[0]?.allowed_file_formats?.some((format: ICardType) => {
return format?.fileformat_id?.toLowerCase() === 'sql';
}) || false;
} else {
// For file uploads, validate file extension
extension = getFileExtension(newMigrationData?.legacy_cms?.uploadedFile?.file_details?.localPath || '');
const { all_cms = [] } = migrationData?.legacyCMSData || {};
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…File component to improve readability and maintainability. Remove unused debug logging, enhance type safety, and standardize file format checks for better consistency across the application.
sayalijoshi27
approved these changes
Feb 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.