Files
dwroller/package.json
Alex d84ca39e61 refactor: Migrate database from SQLite to MariaDB
Database Migration:
- Add MariaDB connection configuration and initialization (mariadb.js)
- Create MariaDB schema update script (mariadb-schema-update.sql)
- Add migration scripts for SQLite to MariaDB transition:
  * migrate-sqlite-to-mariadb.js: Main migration script
  * migrate-inventory-to-gear.js: Inventory schema migration
- Remove SQLite-specific implementation files and databases

Route Updates:
- Update all route handlers to use MariaDB instead of SQLite
- Migrate routes: playerRoutes, sessionRoutes, shopRoutes, bestiaryRoutes, rulesRoutes, rulesStagingRoutes, weaponsRoutes
- Remove SQLite-specific route files (playerRoutes-sqlite.js, sessionRoutes-sqlite.js)
- Update server.js to initialize MariaDB and register new weapon routes

Backend Scripts:
- Remove old SQLite migration scripts (migrate-to-sqlite.js, server-sqlite.js)
- Delete obsolete database utility scripts from backup-scripts/

Frontend Updates:
- Update logger utility for improved error handling and debugging
- Enhance PlayerManagement component with better state management
- Improve RequisitionShop component for MariaDB integration
- Update DeathwatchRoller with performance improvements
- Add login test suite (login.test.js)
- Add XP progression utility (xpProgression.js)
- Update dependencies in package.json and package-lock.json

This migration improves:
- Database scalability and performance
- Transaction support for complex operations
- Better data integrity and ACID compliance
- Simplified deployment and backup procedures
2025-12-11 19:20:44 +01:00

84 lines
2.9 KiB
JSON
Executable File

{
"name": "deathwatch-roller",
"version": "0.1.0",
"private": true,
"proxy": "http://localhost:5000",
"dependencies": {
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^13.5.0",
"bcrypt": "^5.1.0",
"cors": "^2.8.5",
"express": "^5.1.0",
"http-proxy-middleware": "^3.0.5",
"mysql2": "^3.14.4",
"pdf-parse": "^1.1.1",
"pdfjs-dist": "^3.9.179",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"web-vitals": "^2.1.4"
},
"scripts": {
"start": "react-scripts start",
"start:with-tests": "npm test && react-scripts start",
"dev": "react-scripts start",
"build": "npm run test:unit && react-scripts build",
"build:with-integration": "npm run test:unit && npm run test:integration && react-scripts build && npm run pm2:start",
"build:fast": "react-scripts build && npm run pm2:reload",
"test-build-test": "npm run test:unit && npm run test:integration && npm run build && npm run test:unit",
"test": "jest --runInBand --passWithNoTests",
"test:unit": "jest --runInBand --passWithNoTests",
"test:integration": "npm run pm2:start && sleep 2 && jest --config jest.integration.config.js --runInBand --passWithNoTests && npm run pm2:stop",
"deploy:build": "npm run build && npm run pm2:start && npm run pm2:reload",
"eject": "react-scripts eject",
"serve": "npm test && serve -s build",
"extract:armoury": "node scripts/extract-armoury.js \"$PWD/Deathwatch-Core-Rulebook.pdf\" public/deathwatch-armoury.json",
"server": "npm test && cd database && node server.js",
"server:notest": "cd database && node server.js",
"db:sqlite": "cd database && ./switch-db.sh sqlite",
"pm2:start": "cd database && pm2 start pm2.config.js --env production --update-env",
"pm2:stop": "pm2 stop deathwatch-server || true",
"pm2:reload": "cd database && pm2 reload pm2.config.js --env production --update-env",
"sanitize:openai": "node scripts/sanitize-rules-openai.js",
"prestart": "",
"preserver": ""
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest",
"prettier"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {
"@pmmmwh/react-refresh-webpack-plugin": "^0.6.1",
"autoprefixer": "^10.4.14",
"axios": "^1.11.0",
"babel-loader": "^10.0.0",
"canvas": "^2.11.2",
"cheerio": "^1.1.2",
"eslint-config-prettier": "^10.1.8",
"html-webpack-plugin": "^5.6.4",
"node-fetch": "^2.7.0",
"pm2": "^5.2.0",
"postcss": "^8.4.23",
"prettier-eslint": "^16.4.2",
"react-scripts": "^5.0.1",
"tailwindcss": "^3.3.2",
"tesseract.js": "^4.1.1",
"webpack-dev-server": "^5.2.2"
}
}