Skip to content

Commit

Permalink
Merge pull request #439 from PROCEED-Labs/ms2/node-db-helper
Browse files Browse the repository at this point in the history
Convert db-helper shell script to node
  • Loading branch information
anishsapkota authored Jan 9, 2025
2 parents d418434 + fd37bad commit 37522df
Show file tree
Hide file tree
Showing 7 changed files with 524 additions and 292 deletions.
3 changes: 3 additions & 0 deletions jsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
"jsdoc"
],
"compilerOptions": {
// For "execa" import in db-helper.mts
"target": "es2017",
"module": "NodeNext",
"baseUrl": "./src", // this must be specified if "paths" is specified.
"paths": {
// defined aliases in webpack for import
Expand Down
11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@
},
"scripts": {
"dev": "ts-node src/engine/native/node/index.ts --trace-warnings",
"dev-ms-db": "cd src/management-system-v2 && docker compose -f docker-compose-dev.yml up -d && ./db-helper.sh --init",
"dev-ms-db-create": "cd src/management-system-v2 && ./db-helper.sh --new",
"dev-ms-db": "cd src/management-system-v2 && docker compose -f docker-compose-dev.yml up -d && tsx scripts/db-helper.mts --init",
"dev-ms-db-create": "cd src/management-system-v2 && tsx scripts/db-helper.mts --new",
"dev-ms-db-deploy": "cd src/management-system-v2 && yarn prisma migrate deploy",
"dev-ms-db-migrate": "cd src/management-system-v2 && yarn prisma migrate dev",
"dev-ms-db-use": "cd src/management-system-v2 && ./db-helper.sh --use",
"dev-ms-db-delete": "cd src/management-system-v2 && ./db-helper.sh --delete",
"dev-ms-db-use": "cd src/management-system-v2 && tsx scripts/db-helper.mts --use",
"dev-ms-db-delete": "cd src/management-system-v2 && tsx scripts/db-helper.mts --delete",
"dev-ms": "cd src/management-system-v2 && yarn dev",
"dev-ms-old": "cd src/management-system && yarn web:dev",
"dev-ms-old-iam": "cd src/management-system && yarn web:dev-iam",
Expand Down Expand Up @@ -117,7 +117,8 @@
"webpack": "^4.35.3",
"webpack-cli": "^3.3.0",
"webpack-dev-server": "^3.2.1",
"node-loader": "^1.0.3"
"node-loader": "^1.0.3",
"tsx": "4.19.2"
},
"dependencies": {
"react-resizable": "^3.0.5"
Expand Down
269 changes: 0 additions & 269 deletions src/management-system-v2/db-helper.sh

This file was deleted.

2 changes: 1 addition & 1 deletion src/management-system-v2/docker-compose-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ services:
POSTGRES_USER: proceed
POSTGRES_PASSWORD: proceed
ports:
- '5432:5432'
- '5433:5432'
volumes:
- postgres_data:/var/lib/postgresql/data

Expand Down
3 changes: 2 additions & 1 deletion src/management-system-v2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@
"sass": "1.75.0",
"ts-node": "10.9.2",
"typescript": "5.4.5",
"@types/react-resizable": "^3.0.7"
"@types/react-resizable": "^3.0.7",
"execa": "9.5.2"
}
}
Loading

0 comments on commit 37522df

Please sign in to comment.