Merge pull request 'version-update' (#86) from version-update into develop
Reviewed-on: #86
This commit is contained in:
commit
fdf67d4763
5 changed files with 1564 additions and 1722 deletions
|
@ -1,4 +1,4 @@
|
|||
FROM node:18-alpine AS build
|
||||
FROM node:22-alpine AS build
|
||||
|
||||
RUN apk add --no-cache \
|
||||
chromium \
|
||||
|
@ -20,7 +20,7 @@ COPY . /app
|
|||
|
||||
RUN npm run build
|
||||
|
||||
FROM node:18-alpine AS prod
|
||||
FROM node:22-alpine AS prod
|
||||
|
||||
RUN apk add --no-cache \
|
||||
chromium \
|
||||
|
|
3247
package-lock.json
generated
3247
package-lock.json
generated
File diff suppressed because it is too large
Load diff
21
package.json
21
package.json
|
@ -26,7 +26,7 @@
|
|||
"dependencies": {
|
||||
"cors": "^2.8.5",
|
||||
"dotenv": "^16.4.5",
|
||||
"express": "^5.0.0-beta.3",
|
||||
"express": "^5.1.0",
|
||||
"express-rate-limit": "^7.5.0",
|
||||
"express-validator": "^7.2.1",
|
||||
"handlebars": "^4.7.8",
|
||||
|
@ -41,10 +41,10 @@
|
|||
"multer": "^1.4.5-lts.1",
|
||||
"mysql": "^2.18.1",
|
||||
"node-schedule": "^2.1.1",
|
||||
"nodemailer": "^6.9.14",
|
||||
"nodemailer": "^6.10.1",
|
||||
"pdf-lib": "^1.17.1",
|
||||
"pg": "^8.13.1",
|
||||
"puppeteer": "^23.11.1",
|
||||
"puppeteer": "^24.6.1",
|
||||
"qrcode": "^1.5.4",
|
||||
"reflect-metadata": "^0.2.2",
|
||||
"rss-parser": "^3.13.0",
|
||||
|
@ -52,25 +52,26 @@
|
|||
"speakeasy": "^2.0.0",
|
||||
"sqlite3": "^5.1.7",
|
||||
"typeorm": "^0.3.20",
|
||||
"uuid": "^10.0.0"
|
||||
"uuid": "^11.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/cors": "^2.8.14",
|
||||
"@types/express": "^4.17.17",
|
||||
"@types/express": "^5.0.1",
|
||||
"@types/ip": "^1.1.3",
|
||||
"@types/jsonwebtoken": "^9.0.6",
|
||||
"@types/lodash.uniqby": "^4.7.9",
|
||||
"@types/morgan": "^1.9.9",
|
||||
"@types/ms": "^0.7.34",
|
||||
"@types/ms": "^2.1.0",
|
||||
"@types/multer": "^1.4.12",
|
||||
"@types/mysql": "^2.15.21",
|
||||
"@types/node": "^16.18.41",
|
||||
"@types/node": "^22.14.1",
|
||||
"@types/node-schedule": "^2.1.6",
|
||||
"@types/nodemailer": "^6.4.14",
|
||||
"@types/pg": "~8.11.12",
|
||||
"@types/qrcode": "~1.5.5",
|
||||
"@types/speakeasy": "^2.0.10",
|
||||
"@types/uuid": "^9.0.2",
|
||||
"ts-node": "10.7.0",
|
||||
"typescript": "^4.5.2"
|
||||
"@types/uuid": "^10.0.0",
|
||||
"ts-node": "10.9.2",
|
||||
"typescript": "^5.8.3"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,9 +12,9 @@ export const DB_PASSWORD = process.env.DB_PASSWORD ?? "";
|
|||
export const SERVER_PORT = Number(process.env.SERVER_PORT ?? 5000);
|
||||
|
||||
export const JWT_SECRET = process.env.JWT_SECRET ?? "my_jwt_secret_string_ilughfnadiuhgq§$IUZGFVRweiouarbt1oub3h5q4a";
|
||||
export const JWT_EXPIRATION = process.env.JWT_EXPIRATION ?? "15m";
|
||||
export const REFRESH_EXPIRATION = process.env.REFRESH_EXPIRATION ?? "1d";
|
||||
export const PWA_REFRESH_EXPIRATION = process.env.PWA_REFRESH_EXPIRATION ?? "5d";
|
||||
export const JWT_EXPIRATION = (process.env.JWT_EXPIRATION ?? "15m") as ms.StringValue;
|
||||
export const REFRESH_EXPIRATION = (process.env.REFRESH_EXPIRATION ?? "1d") as ms.StringValue;
|
||||
export const PWA_REFRESH_EXPIRATION = (process.env.PWA_REFRESH_EXPIRATION ?? "5d") as ms.StringValue;
|
||||
|
||||
export const MAIL_USERNAME = process.env.MAIL_USERNAME ?? "";
|
||||
export const MAIL_PASSWORD = process.env.MAIL_PASSWORD ?? "";
|
||||
|
@ -30,10 +30,10 @@ export const BACKUP_COPIES = Number(process.env.BACKUP_COPIES ?? "7");
|
|||
export const BACKUP_AUTO_RESTORE = process.env.BACKUP_AUTO_RESTORE ?? "true";
|
||||
|
||||
export const USE_SECURITY_STRICT_LIMIT = process.env.USE_SECURITY_STRICT_LIMIT ?? "true";
|
||||
export const SECURITY_STRICT_LIMIT_WINDOW = process.env.SECURITY_STRICT_LIMIT_WINDOW ?? "15m";
|
||||
export const SECURITY_STRICT_LIMIT_WINDOW = (process.env.SECURITY_STRICT_LIMIT_WINDOW ?? "15m") as ms.StringValue;
|
||||
export const SECURITY_STRICT_LIMIT_REQUEST_COUNT = Number(process.env.SECURITY_STRICT_LIMIT_REQUEST_COUNT ?? "15");
|
||||
export const USE_SECURITY_LIMIT = process.env.USE_SECURITY_LIMIT ?? "true";
|
||||
export const SECURITY_LIMIT_WINDOW = process.env.SECURITY_LIMIT_WINDOW ?? "1m";
|
||||
export const SECURITY_LIMIT_WINDOW = (process.env.SECURITY_LIMIT_WINDOW ?? "1m") as ms.StringValue;
|
||||
export const SECURITY_LIMIT_REQUEST_COUNT = Number(process.env.SECURITY_LIMIT_REQUEST_COUNT ?? "500");
|
||||
|
||||
export const TRUST_PROXY = ((): Array<string> | string | boolean | number | null => {
|
||||
|
@ -104,7 +104,7 @@ export function configCheck() {
|
|||
}
|
||||
}
|
||||
|
||||
function checkMS(input: string, origin: string) {
|
||||
function checkMS(input: ms.StringValue, origin: string) {
|
||||
try {
|
||||
const result = ms(input);
|
||||
if (result === undefined) {
|
||||
|
|
|
@ -68,7 +68,7 @@ export default (app: Express) => {
|
|||
}
|
||||
app.set("query parser", "extended");
|
||||
app.use(cors());
|
||||
app.options("*", cors());
|
||||
app.options("*splat", cors());
|
||||
app.use(helmet());
|
||||
app.use(morgan("short"));
|
||||
app.use(express.json());
|
||||
|
|
Loading…
Add table
Reference in a new issue