Add script for resetting both anon dbs

This commit is contained in:
ShootingStar91
2024-08-28 22:28:52 +03:00
parent f82dae5318
commit 6a8c176c39
2 changed files with 8 additions and 4 deletions
+1 -1
View File
@@ -4,9 +4,9 @@
"description": "", "description": "",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {
"test": "echo \"Tests are ran at root level.\"",
"dev": "npx tsx watch --clear-screen=false src/index.ts", "dev": "npx tsx watch --clear-screen=false src/index.ts",
"build": "tsc", "build": "tsc",
"test": "node --import tsx --test src/api-tests/**.ts",
"start": "node build/index.js", "start": "node build/index.js",
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"prisma": "prisma generate --schema prisma/schema.prisma && prisma generate --schema prisma/schema_log.prisma" "prisma": "prisma generate --schema prisma/schema.prisma && prisma generate --schema prisma/schema_log.prisma"
+7 -3
View File
@@ -12,12 +12,16 @@
"check": "echo \"Running checks for both services...\" && npm run check:frontend && npm run check:backend && echo \"All good! :)\"", "check": "echo \"Running checks for both services...\" && npm run check:frontend && npm run check:backend && echo \"All good! :)\"",
"check:backend": "echo \"Running backend tsc ...\" && cd backend && npx tsc --noEmit && echo \"Running backend eslint ...\"&& npm run lint", "check:backend": "echo \"Running backend tsc ...\" && cd backend && npx tsc --noEmit && echo \"Running backend eslint ...\"&& npm run lint",
"check:frontend": "echo \"Running frontend tsc ...\" && cd frontend && npx tsc --noEmit && echo \"Running frontend eslint ...\" && npm run lint", "check:frontend": "echo \"Running frontend tsc ...\" && cd frontend && npx tsc --noEmit && echo \"Running frontend eslint ...\" && npm run lint",
"test": "cypress run --browser chrome", "test:e2e": "cypress run --browser chrome",
"test:api": "cd backend && npm test",
"cypress": "cypress open", "cypress": "cypress open",
"prisma": "cd backend && npx prisma generate --schema prisma/schema.prisma && npx prisma generate --schema prisma/schema_log.prisma" "prisma": "cd backend && npx prisma generate --schema prisma/schema.prisma && npx prisma generate --schema prisma/schema_log.prisma",
"reset-anon-db": "docker exec -it nowdb-db-anon sh -c \"mariadb --user root -padmin now_test < /docker-entrypoint-initdb.d/sqlfiles/now_anon.sql\" && docker exec -it nowdb-db-anon sh -c \"mariadb --user root -padmin now_log_test < /docker-entrypoint-initdb.d/sqlfiles/now_log_anon.sql\""
}, },
"author": "", "author": "",
"devDependencies": { "devDependencies": {
"cypress": "^13.11.0" "@types/supertest": "^6.0.2",
"cypress": "^13.11.0",
"supertest": "^7.0.0"
} }
} }