Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
95c1394
sca-scan.yml
aravindbuilt Jan 20, 2025
39f66c8
jira.yml
aravindbuilt Jan 20, 2025
47a94a4
sast-scan.yml
aravindbuilt Jan 20, 2025
04d5db7
Updated codeowners
aravindbuilt Jan 20, 2025
9e81663
don't merge
sauravraw Apr 3, 2025
92d4f93
don't merge
sauravraw Apr 3, 2025
0815e4a
don't merge
sauravraw Apr 3, 2025
b0c5e79
resolved cli issue
sauravraw Apr 3, 2025
4795e19
fixed typo issue
sauravraw Apr 3, 2025
4a0510d
fixed typo issue
sauravraw Apr 4, 2025
59448cc
changed the typo mistake
sauravraw Apr 4, 2025
27e1e06
workflow edits
RohitKini Apr 3, 2025
0ccd460
workflow edits
RohitKini Apr 3, 2025
4a2886e
changes for test of workflow
RohitKini Apr 3, 2025
72ae80f
checking workflow for sitecore
RohitKini Apr 3, 2025
3f8c00f
checking workflow for sitecore
RohitKini Apr 3, 2025
2575a74
checking workflow for sitecore
RohitKini Apr 3, 2025
0fed8a6
changes for test
RohitKini Apr 3, 2025
d399989
changes for test 123
RohitKini Apr 3, 2025
6c2e172
cheking workflow
RohitKini Apr 3, 2025
5950213
sca-scan.yml
aravindbuilt Jan 20, 2025
48fc79a
sast-scan.yml
aravindbuilt Jan 20, 2025
acaa527
Updated codeowners
aravindbuilt Jan 20, 2025
a26f27a
WIP: working on sitecore.service.ts
sauravraw Apr 4, 2025
aab5c08
Merge remote-tracking branch 'origin/dev' into feature/cli-optimise
sauravraw Apr 4, 2025
ea3531d
Update api/src/utils/custom-logger.utils.ts
sauravraw Apr 6, 2025
8e6c55c
resolved copilot suggestion
sauravraw Apr 6, 2025
492c76e
resolved copilot suggestion issue
sauravraw Apr 7, 2025
d9f6c4f
Merge branch 'dev' into feature/cli-optimise
sauravraw Apr 7, 2025
822e878
removed cli package setup code from setup.sh file
sauravraw Apr 7, 2025
6e3d5d8
latest dev code
sauravraw Apr 7, 2025
f8c312f
removed the nodemon code
sauravraw Apr 15, 2025
4074906
Merge branch 'dev' of github.com:contentstack/migration-v2-node-serve…
AishDani Apr 16, 2025
2487445
Merge branch 'dev' of github.com:contentstack/migration-v2-node-serve…
AishDani Apr 16, 2025
91b4993
fix:added missing prop
AishDani Apr 16, 2025
23af79d
Merge branch 'feature/cli-optimise' of github.com:contentstack/migrat…
AishDani Apr 16, 2025
bf8f200
fix:added object and array condition for reference in contentful
AishDani Apr 16, 2025
342e897
fix:refactored loading state when stack creation limit reaches for te…
AishDani Apr 16, 2025
970a3ea
fix:added fix of isDeleted title and url
AishDani Apr 16, 2025
a34198a
refactor:logic for showing master_locale in language mapper based on …
AishDani Apr 17, 2025
b8f3925
fix:removed advanced properties icon for title and url for existing case
AishDani Apr 17, 2025
2d79661
fix: resolved PR comments
AishDani Apr 17, 2025
b02be15
fix: added validation
AishDani Apr 17, 2025
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
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,31 @@ const Mapper = ({
useEffect(() => {
setExistingField((prevExisting: ExistingFieldType) => {
const updatedExisting = { ...prevExisting };
const validLabels = cmsLocaleOptions?.map(locale => locale.label) || [];
Object.entries(updatedExisting).forEach(([index, entry]) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const validLabels = cmsLocaleOptions?.map(locale => locale?.label) || [];
Object.entries(updatedExisting)?.forEach(([index, entry]) => {

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

const [labelPart] = entry.label.split('-');
if (!validLabels.includes(labelPart)) {
delete updatedExisting[index];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const [labelPart] = entry?.label?.split('-');
if (!validLabels?.includes(labelPart)) {
delete updatedExisting?.[index];

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

entry?.label?.split('-'); adding validation to this gives error, added validation to other code

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

}
});

setSelectedMappings((prev) => {
const updated = { ...prev };

Object.keys(updated).forEach((key) => {
const [labelPart] = key.split('-');
if (!validLabels.includes(labelPart)) {
delete updated[key];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Object.keys(updated)?.forEach((key) => {
const [labelPart] = key?.split('-');
if (!validLabels?.includes(labelPart)) {
delete updated?.[key];

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

}
});

return updated;
});

cmsLocaleOptions?.forEach((locale: { label: string; value: string }, index: number) => {
if (locale?.value === 'master_locale' && !updatedExisting?.[index]) {
setSelectedMappings((prev) => ({

...prev,
[`${locale?.label}-master_locale`]: ''
}));
Expand Down Expand Up @@ -422,18 +443,28 @@ const LanguageMapper = () => {
value: item
}));
setsourceLocales(sourceLocale);

setoptions(allLocales);
Object?.entries(newMigrationData?.destination_stack?.localeMapping)?.length === 0 &&
const keys = Object.keys(newMigrationData?.destination_stack?.localeMapping || {})?.find( key => key === `${newMigrationData?.destination_stack?.selectedStack?.master_locale}-master_locale`);

(Object?.entries(newMigrationData?.destination_stack?.localeMapping)?.length === 0 || keys !== `${newMigrationData?.destination_stack?.selectedStack?.master_locale}-master_locale` ) &&
newMigrationData?.project_current_step <= 2 &&
setcmsLocaleOptions((prevList: { label: string; value: string }[]) => {
const newLabel = newMigrationData?.destination_stack?.selectedStack?.master_locale;

const isPresent = prevList.some(
(item: { label: string; value: string }) => item?.value === 'master_locale'
const isPresent = prevList.filter(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

prevList?.filter

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

(item: { label: string; value: string }) => (item?.value === 'master_locale')
);

if (!isPresent) {

if(isPresent[0]?.label !== newLabel){
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if(isPresent?.[0]?.label !== newLabel){

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

return [
...prevList.filter(item => item.value !== 'master_locale'),
{
label: newLabel,
value: 'master_locale',
}
];
}
if (isPresent?.length <= 0 ) {
return [
...prevList,
{
Expand Down