Skip to content
Merged

Dev #78

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
90b26f5
add lowdb code refactor code
shristi-sinha Apr 10, 2024
bea315b
Content mapper column changes
sayalijoshi27 Apr 12, 2024
70bf30b
bug fix: Update destination stack
shreyasBhoyar Apr 16, 2024
67fdde0
Schema Preview modal done
sayalijoshi27 Apr 16, 2024
859e321
Merge branch 'dev' into feature/code-merge
sayalijoshi27 Apr 16, 2024
88d5b0e
Merge branch 'feature/code-merge' of https://github.com/contentstack/…
sayalijoshi27 Apr 16, 2024
b974099
Schema Preview modal added
sayalijoshi27 Apr 16, 2024
b88f217
Revert "Merge branch 'feature/code-merge' of https://github.com/conte…
sayalijoshi27 Apr 17, 2024
6f5e786
Merge pull request #58 from contentstack/feature/code-merge
shreyasBhoyar Apr 17, 2024
a6f9bee
refactor:fixed token missing error while setting in header
AishDani Apr 17, 2024
a0b916c
refactor:fixed token missing error while setting in header
AishDani Apr 17, 2024
4e1548c
code npmrc removed
umeshmore45 Apr 17, 2024
d612dec
code npmrc removed
umeshmore45 Apr 17, 2024
f18e9bd
Merge pull request #60 from contentstack/feature/re-merge
umeshmore45 Apr 17, 2024
7ac651d
Merge pull request #59 from contentstack/feature/project-dashboard
sayalijoshi27 Apr 17, 2024
59fbefe
Test-migration API
shreyasBhoyar Apr 18, 2024
b928688
Merge pull request #61 from contentstack/feature/test-migration
umeshmore45 Apr 18, 2024
e69f333
Login state update changes
sayalijoshi27 Apr 18, 2024
6fa6eda
feat:added advanced setting modal
AishDani Apr 22, 2024
cb50232
Merge branch 'dev' into feature/project-dashboard
AishDani Apr 22, 2024
c9d4e07
feat:integrated test stack creation api
AishDani Apr 23, 2024
9daea7e
added packaga-lock.json
AishDani Apr 23, 2024
c6ff662
Update packaga-lock.json
AishDani Apr 23, 2024
92f372d
refactor:resolved PR comments
AishDani Apr 23, 2024
094b03d
Merge branch 'feature/project-dashboard' of github.com:contentstack/m…
AishDani Apr 23, 2024
dbeccea
Merge pull request #62 from contentstack/feature/project-dashboard
sayalijoshi27 Apr 23, 2024
a9e02df
removed example.env
umeshmore45 Apr 23, 2024
d175ee8
Merge branch 'dev' of https://github.com/contentstack/migration-v2-no…
sayalijoshi27 Apr 23, 2024
072d805
refactor:added search logic in mapper table
AishDani Apr 23, 2024
623aeeb
Revert "removed example.env"
sayalijoshi27 Apr 23, 2024
355e81d
refactor: Removed unwanted Venus Components
sayalijoshi27 Apr 23, 2024
0193309
refactor: Removed pageHeader component temporarily
sayalijoshi27 Apr 23, 2024
a2623e8
refactor: Resolved login state update
sayalijoshi27 Apr 23, 2024
908adeb
refactor: Card CSS changes done due to venus components version updat…
sayalijoshi27 Apr 23, 2024
a7b1254
Merge pull request #63 from contentstack/feature/project-dashboard
sayalijoshi27 Apr 23, 2024
f3382a9
conflict resolved
sayalijoshi27 Apr 23, 2024
0787e69
Revert "Revert "removed example.env""
sayalijoshi27 Apr 23, 2024
fb09b47
Update Venus Components version
sayalijoshi27 Apr 23, 2024
31b3584
Advance Properties changes
sayalijoshi27 Apr 24, 2024
0b60688
Revert "Update Venus Components version"
sayalijoshi27 Apr 24, 2024
36ad161
Revert "refactor: Removed pageHeader component temporarily"
sayalijoshi27 Apr 24, 2024
ac28664
Merge pull request #64 from contentstack/feature/cmg-78
AishDani Apr 24, 2024
3abdffe
refactor:legacy step and context provider
AishDani Apr 24, 2024
079fc00
refactor:resolved pr comments
AishDani Apr 24, 2024
fc6b8ea
Merge pull request #65 from contentstack/feature/project-dashboard
sayalijoshi27 Apr 24, 2024
40569fd
Added otherCMSType and uid, Removed description validation and CTAs f…
sayalijoshi27 Apr 24, 2024
bc65fdb
Refactor: resolved PR comments
sayalijoshi27 Apr 25, 2024
7d4928d
Refactor: validation added
sayalijoshi27 Apr 25, 2024
4d5c2ce
Merge pull request #66 from contentstack/feature/cmg-78
snehalsankhe Apr 25, 2024
92b7454
remove mongo db connection, models and mongoose from package.json
shristi-sinha Apr 25, 2024
b58bd3e
Merge pull request #67 from contentstack/feature/remove-mongocode
shreyasBhoyar Apr 25, 2024
6aee3da
change cond in update destination stack api
shristi-sinha Apr 25, 2024
d765699
Merge pull request #68 from contentstack/feature/update-destinationst…
shreyasBhoyar Apr 25, 2024
60ff02f
Resolved Legacy CMS height and CTA issue
sayalijoshi27 Apr 25, 2024
59a06e8
Merge pull request #69 from contentstack/feature/cmg-78
AishDani Apr 25, 2024
7bcd123
feat:integrated affix and file format confirmation api
AishDani Apr 25, 2024
d94464f
refactor:resolved runtime error in destination stack step
AishDani Apr 25, 2024
b2434c7
refactor:removed localstorage code
AishDani Apr 25, 2024
771060f
refactor: resolved PR comments
AishDani Apr 26, 2024
289ecfc
Merge pull request #70 from contentstack/feature/project-dashboard
snehalsankhe Apr 26, 2024
e363d08
feat:updated validation code and UI components related to upload
AishDani Apr 26, 2024
bd87308
refactor: PR comments
AishDani Apr 29, 2024
feed9a6
Merge pull request #71 from contentstack/feature/project-dashboard
umeshmore45 Apr 29, 2024
8d08ebe
[CMG-84], [CMG-85]
sayalijoshi27 Apr 30, 2024
39e3da7
Refactor: PR comments resolved
sayalijoshi27 Apr 30, 2024
805b9ce
Revert 'refactor: Removed unwanted Venus Components' This reverts com…
sayalijoshi27 Apr 30, 2024
ad4a3cc
Refactor: PR comments resolved
sayalijoshi27 Apr 30, 2024
55dc08a
Merge pull request #72 from contentstack/feature/cmg-78
snehalsankhe Apr 30, 2024
4aed700
feat:Disable content type from dropdown if it is already mapped in ex…
AishDani Apr 30, 2024
1a59fe7
Merge branch 'dev' of github.com:contentstack/migration-v2-node-serve…
AishDani Apr 30, 2024
adc0fb5
refactor:resolved unwanted Project calls in network tab on landing on…
AishDani May 2, 2024
33a8a22
fix:code formatted by pre-commit hook
AishDani May 2, 2024
24b50e3
change in project status
shristi-sinha May 2, 2024
b49dc34
Merge pull request #73 from contentstack/feature/modify-project-status
shreyasBhoyar May 2, 2024
91ebef7
refactor:added logic for displaying mapped fileds of exsting content …
AishDani May 2, 2024
479f677
refactor:resolved PR comments
AishDani May 2, 2024
004f956
Merge pull request #74 from contentstack/feature/project-dashboard
sayalijoshi27 May 2, 2024
eb45e7c
bugfix: Content type search and fields search issue resolved in Conte…
sayalijoshi27 May 2, 2024
b10db6d
ui fixes and search locale
snehalsankhe May 2, 2024
67e1f22
ui fixes and search locale
snehalsankhe May 2, 2024
f5ef923
resolved conflicts
snehalsankhe May 2, 2024
5b62fbb
Conflict resolved in content mapper
sayalijoshi27 May 2, 2024
2917f7c
Merge pull request #76 from contentstack/cmg-99-locales-search
sayalijoshi27 May 2, 2024
68bad17
Merge pull request #77 from contentstack/feature/cmg-78
snehalsankhe May 2, 2024
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
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -350,4 +350,5 @@ MigrationBackup/
.ionide/

uploade-api/node_modules
uploade-api/build
uploade-api/build
package-lock.json
3 changes: 0 additions & 3 deletions .npmrc

This file was deleted.

5 changes: 3 additions & 2 deletions api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
"start": "NODE_ENV=production node dist/server.js",
"dev": "NODE_ENV=production tsx watch ./src/server.ts",
"prettify": "prettier --write .",
"lint:fix": "eslint --fix --ext .ts . --ignore-pattern './node_modules/' --ignore-pattern './dist/'",
"windev": "SET NODE_ENV=production&& tsx watch ./src/server.ts",
"winstart": "SET NODE_ENV=production&& node dist/server.js",
"lint:fix": "eslint --ext .ts --ignore-pattern './node_modules/' --ignore-pattern './dist/'",
"precommit": "npm run prettify && npm run lint:fix"
},
"type": "module",
Expand All @@ -32,7 +34,6 @@
"helmet": "^7.1.0",
"jsonwebtoken": "^9.0.2",
"lowdb": "^7.0.1",
"mongoose": "^8.0.4",
"uuid": "^9.0.1",
"winston": "^3.11.0"
},
Expand Down
6 changes: 6 additions & 0 deletions api/src/config/dev.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,10 @@ export const devConfig = {
EU: "https://stag-eu-api.csnonprod.com/v3",
AZURE_NA: "https://stag-azure-na-api.csnonprod.com/v3",
},
CS_URL: {
NA: "https://app.contentstack.com/#!",
EU: "https://eu-app.contentstack.com/#!",
AZURE_NA: "https://azure-na-app.contentstack.com/#!",
AZURE_EU: "https://azure-eu-app.contentstack.com/#!",
},
};
6 changes: 6 additions & 0 deletions api/src/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ export type ConfigType = {
AZURE_NA: string;
AZURE_EU?: string;
};
CS_URL: {
NA: string;
EU: string;
AZURE_NA: string;
AZURE_EU?: string;
};
};

export const config: ConfigType = {
Expand Down
6 changes: 6 additions & 0 deletions api/src/config/prod.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,10 @@ export const prodConfig = {
AZURE_NA: "https://azure-na-api.contentstack.com/v3",
AZURE_EU: "https://azure-eu-api.contentstack.com/v3",
},
CS_URL: {
NA: "https://app.contentstack.com/#!",
EU: "https://eu-app.contentstack.com/#!",
AZURE_NA: "https://azure-na-app.contentstack.com/#!",
AZURE_EU: "https://azure-eu-app.contentstack.com/#!",
},
};
15 changes: 13 additions & 2 deletions api/src/constants/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,8 @@ export const STEPPER_STEPS = {
LEGACY_CMS: 1,
DESTINATION_STACK: 2,
CONTENT_MAPPING: 3,
MIGRATION: 4,
TESTING: 4,
MIGRATION: 5,
};
export const PREDEFINED_STATUS = [
"Draft",
Expand All @@ -120,4 +121,14 @@ export const PREDEFINED_STATUS = [
"Failed",
"Success",
];
export const PREDEFINED_STEPS = [1, 2, 3, 4];
export const PREDEFINED_STEPS = [1, 2, 3, 4, 5];

export const NEW_PROJECT_STATUS = {
0: 0, //DRAFT
1: 1, //READY_TO_TEST
2: 2, //TESTING_IN_PROGRESS
3: 3, //READY_FOR_MIGRATION
4: 4, //MIGRATION_IN_PROGRESS
5: 5, //MIGRATION_SUCCESSFUL
6: 6 //MIGRATION_TERMINATED
};
17 changes: 17 additions & 0 deletions api/src/controllers/migration.controller.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { Request, Response } from "express";
import { migrationService } from "../services/migration.service.js";

const createTestStack = async (req: Request, res: Response): Promise<void> => {
const resp = await migrationService.createTestStack(req);
res.status(200).json(resp);
};

const deleteTestStack = async (req: Request, res: Response): Promise<void> => {
const resp = await migrationService.deleteTestStack(req);
res.status(200).json(resp);
};

export const migrationController = {
createTestStack,
deleteTestStack,
};
15 changes: 2 additions & 13 deletions api/src/database.ts
Original file line number Diff line number Diff line change
@@ -1,27 +1,16 @@
// database.ts
import mongoose from "mongoose";
import { config } from "./config/index.js";
import logger from "./utils/logger.js";
import ProjectModel from "./models/project.js";
import ContentTypesMapperModel from "./models/contentTypesMapper.js";
import fs from "fs";

const connectToDatabase = async () => {
try {
await mongoose.connect(config.MONGODB_URI, {
...(config.APP_ENV === "production" ? { autoIndex: false } : {}),
});

//check if the database folder exists
if (!fs.existsSync("./database")) {
fs.mkdirSync("./database");
}
logger.info("successfully connecting to Low DB");

// Create the collection's if it doesn't exist
await ProjectModel.init();
await ContentTypesMapperModel.init();
} catch (error) {
logger.error("Error while connecting to MongoDB:", error);
logger.error("Error while connecting to Low DB:", error);
process.exit(1);
}
};
Expand Down
28 changes: 0 additions & 28 deletions api/src/models/contentTypesMapper.ts

This file was deleted.

4 changes: 3 additions & 1 deletion api/src/models/project-lowdb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,11 @@ interface Project {
former_owner_ids: [];
name: string;
description: string;
status: string;
status: number;
current_step: number;
destination_stack_id: string;
test_stacks: [];
current_test_stack_id: string;
legacy_cms: LegacyCMS;
content_mapper: [];
execution_log: [ExecutionLog];
Expand Down
101 changes: 0 additions & 101 deletions api/src/models/project.ts

This file was deleted.

16 changes: 16 additions & 0 deletions api/src/routes/migration.routes.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import express from "express";

import { asyncRouter } from "../utils/async-router.utils.js";
import { migrationController } from "../controllers/migration.controller.js";

const router = express.Router({ mergeParams: true });
// Create a new project route
router.post(
"/test-stack/:orgId/:projectId",
asyncRouter(migrationController.createTestStack)
);
router.post(
"/test-stack/:projectId",
asyncRouter(migrationController.deleteTestStack)
);
export default router;
2 changes: 2 additions & 0 deletions api/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import { requestHeadersMiddleware } from "./middlewares/req-headers.middleware.j
import { unmatchedRoutesMiddleware } from "./middlewares/unmatched-routes.middleware.js";
import logger from "./utils/logger.js";
import contentMapperRoutes from "./routes/contentMapper.routes.js";
import migrationRoutes from "./routes/migration.routes.js";

try {
const app = express();
Expand All @@ -36,6 +37,7 @@ try {
app.use("/v2/org/:orgId", authenticateUser, orgRoutes);
app.use("/v2/org/:orgId/project", authenticateUser, projectRoutes);
app.use("/v2/mapper", authenticateUser, contentMapperRoutes);
app.use("/v2/migration", authenticateUser, migrationRoutes);

//For unmatched route patterns
app.use(unmatchedRoutesMiddleware);
Expand Down
Loading