V0.4.1 dependency upgrade
This commit is contained in:
parent
0dd0c44113
commit
e6b70d0b1c
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "picsur-backend",
|
||||
"version": "0.4.0",
|
||||
"version": "0.4.1",
|
||||
"description": "Backend for Picsur",
|
||||
"license": "GPL-3.0",
|
||||
"repository": "https://github.com/rubikscraft/Picsur",
|
||||
|
@ -22,18 +22,18 @@
|
|||
"purge": "rm -rf dist && rm -rf node_modules"
|
||||
},
|
||||
"dependencies": {
|
||||
"@fastify/helmet": "^10.0.0",
|
||||
"@fastify/multipart": "^7.1.2",
|
||||
"@fastify/helmet": "^10.0.1",
|
||||
"@fastify/multipart": "^7.2.0",
|
||||
"@fastify/static": "^6.5.0",
|
||||
"@nestjs/common": "^9.0.11",
|
||||
"@nestjs/common": "^9.1.4",
|
||||
"@nestjs/config": "^2.2.0",
|
||||
"@nestjs/core": "^9.0.11",
|
||||
"@nestjs/core": "^9.1.4",
|
||||
"@nestjs/jwt": "^9.0.0",
|
||||
"@nestjs/passport": "^9.0.0",
|
||||
"@nestjs/platform-fastify": "^9.0.11",
|
||||
"@nestjs/platform-fastify": "^9.1.4",
|
||||
"@nestjs/serve-static": "^3.0.0",
|
||||
"@nestjs/typeorm": "^9.0.1",
|
||||
"bcrypt": "^5.0.1",
|
||||
"bcrypt": "^5.1.0",
|
||||
"bmp-img": "^1.2.1",
|
||||
"cors": "^2.8.5",
|
||||
"file-type": "^18.0.0",
|
||||
|
@ -47,40 +47,40 @@
|
|||
"pg": "^8.8.0",
|
||||
"picsur-shared": "*",
|
||||
"posix.js": "^0.1.1",
|
||||
"qoi-img": "^1.2.1",
|
||||
"qoi-img": "^2.1.0",
|
||||
"reflect-metadata": "^0.1.13",
|
||||
"rimraf": "^3.0.2",
|
||||
"rxjs": "^7.5.6",
|
||||
"sharp": "^0.31.0",
|
||||
"rxjs": "^7.5.7",
|
||||
"sharp": "^0.31.1",
|
||||
"stream-parser": "^0.3.1",
|
||||
"thunks": "^4.9.6",
|
||||
"typeorm": "0.3.9",
|
||||
"zod": "^3.19.0"
|
||||
"typeorm": "0.3.10",
|
||||
"zod": "^3.19.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@nestjs/cli": "^9.1.2",
|
||||
"@nestjs/cli": "^9.1.4",
|
||||
"@nestjs/schematics": "^9.0.3",
|
||||
"@nestjs/testing": "^9.0.11",
|
||||
"@nestjs/testing": "^9.1.4",
|
||||
"@types/bcrypt": "^5.0.0",
|
||||
"@types/cors": "^2.8.12",
|
||||
"@types/ms": "^0.7.31",
|
||||
"@types/multer": "^1.4.7",
|
||||
"@types/node": "^18.7.16",
|
||||
"@types/passport-jwt": "^3.0.6",
|
||||
"@types/node": "^18.8.4",
|
||||
"@types/passport-jwt": "^3.0.7",
|
||||
"@types/passport-local": "^1.0.34",
|
||||
"@types/passport-strategy": "^0.2.35",
|
||||
"@types/sharp": "^0.30.5",
|
||||
"@types/sharp": "^0.31.0",
|
||||
"@types/supertest": "^2.0.12",
|
||||
"@typescript-eslint/eslint-plugin": "^5.36.2",
|
||||
"@typescript-eslint/parser": "^5.36.2",
|
||||
"eslint": "^8.23.0",
|
||||
"@typescript-eslint/eslint-plugin": "^5.40.0",
|
||||
"@typescript-eslint/parser": "^5.40.0",
|
||||
"eslint": "^8.25.0",
|
||||
"eslint-config-prettier": "^8.5.0",
|
||||
"eslint-plugin-prettier": "^4.2.1",
|
||||
"prettier": "^2.7.1",
|
||||
"source-map-support": "^0.5.21",
|
||||
"ts-loader": "^9.3.1",
|
||||
"ts-loader": "^9.4.1",
|
||||
"ts-node": "^10.9.1",
|
||||
"tsconfig-paths": "^4.1.0",
|
||||
"typescript": "4.8.3"
|
||||
"typescript": "4.8.4"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -39,11 +39,12 @@ export class MultiPartPipe implements PipeTransform {
|
|||
// Fetch all fields from the request
|
||||
let fields: MultipartFields | null = null;
|
||||
try {
|
||||
fields = (
|
||||
await req.file({
|
||||
limits: this.multipartConfigService.getLimits(),
|
||||
})
|
||||
).fields;
|
||||
fields =
|
||||
(
|
||||
await req.file({
|
||||
limits: this.multipartConfigService.getLimits(),
|
||||
})
|
||||
)?.fields ?? null;
|
||||
} catch (e) {
|
||||
this.logger.warn(e);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { Multipart } from '@fastify/multipart';
|
||||
import { Multipart, MultipartFields, MultipartFile } from '@fastify/multipart';
|
||||
import { Injectable, Logger, PipeTransform, Scope } from '@nestjs/common';
|
||||
import { FastifyRequest } from 'fastify';
|
||||
import { Fail, FT } from 'picsur-shared/dist/types';
|
||||
|
@ -30,13 +30,13 @@ export class PostFilePipe implements PipeTransform {
|
|||
) as any;
|
||||
|
||||
// Remove non-file fields
|
||||
const files = allFields.filter((entry) => entry.file !== undefined);
|
||||
const files: MultipartFile[] = allFields.filter((entry) => (entry as any).file !== undefined) as MultipartFile[];
|
||||
|
||||
if (files.length !== 1) throw Fail(FT.UsrValidation, 'Invalid file');
|
||||
|
||||
// Return a buffer of the file
|
||||
try {
|
||||
return await files[0].toBuffer();
|
||||
return await files[0]?.toBuffer();
|
||||
} catch (e) {
|
||||
this.logger.warn(e);
|
||||
throw Fail(FT.Internal, 'Invalid file');
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "picsur-frontend",
|
||||
"version": "0.4.0",
|
||||
"version": "0.4.1",
|
||||
"description": "Frontend for Picsur",
|
||||
"license": "GPL-3.0",
|
||||
"repository": "https://github.com/rubikscraft/Picsur",
|
||||
|
@ -15,29 +15,29 @@
|
|||
},
|
||||
"devDependencies": {
|
||||
"@angular-builders/custom-webpack": "^14.0.1",
|
||||
"@angular-devkit/build-angular": "14.2.2",
|
||||
"@angular/animations": "^14.2.1",
|
||||
"@angular/cdk": "^14.2.1",
|
||||
"@angular/cli": "^14.2.2",
|
||||
"@angular/common": "^14.2.1",
|
||||
"@angular/compiler": "^14.2.1",
|
||||
"@angular/compiler-cli": "^14.2.1",
|
||||
"@angular/core": "^14.2.1",
|
||||
"@angular/forms": "^14.2.1",
|
||||
"@angular/material": "^14.2.1",
|
||||
"@angular/platform-browser": "^14.2.1",
|
||||
"@angular/platform-browser-dynamic": "^14.2.1",
|
||||
"@angular/router": "^14.2.1",
|
||||
"@angular-devkit/build-angular": "14.2.5",
|
||||
"@angular/animations": "^14.2.5",
|
||||
"@angular/cdk": "^14.2.4",
|
||||
"@angular/cli": "^14.2.5",
|
||||
"@angular/common": "^14.2.5",
|
||||
"@angular/compiler": "^14.2.5",
|
||||
"@angular/compiler-cli": "^14.2.5",
|
||||
"@angular/core": "^14.2.5",
|
||||
"@angular/forms": "^14.2.5",
|
||||
"@angular/material": "^14.2.4",
|
||||
"@angular/platform-browser": "^14.2.5",
|
||||
"@angular/platform-browser-dynamic": "^14.2.5",
|
||||
"@angular/router": "^14.2.5",
|
||||
"@fontsource/material-icons": "^4.5.4",
|
||||
"@fontsource/material-icons-outlined": "^4.5.4",
|
||||
"@fontsource/roboto": "^4.5.8",
|
||||
"@ng-web-apis/common": "^2.0.1",
|
||||
"@ng-web-apis/resize-observer": "^2.0.0",
|
||||
"@ngui/common": "^1.0.0",
|
||||
"@types/node": "^18.7.16",
|
||||
"@types/node": "^18.8.4",
|
||||
"@types/resize-observer-browser": "^0.1.7",
|
||||
"@types/validator": "^13.7.6",
|
||||
"bootstrap": "^5.2.1",
|
||||
"@types/validator": "^13.7.7",
|
||||
"bootstrap": "^5.2.2",
|
||||
"fuse.js": "^6.6.2",
|
||||
"jwt-decode": "^3.1.2",
|
||||
"moment": "^2.29.4",
|
||||
|
@ -47,10 +47,10 @@
|
|||
"ngx-moment": "^6.0.2",
|
||||
"picsur-shared": "*",
|
||||
"reflect-metadata": "^0.1.13",
|
||||
"rxjs": "~7.5.6",
|
||||
"rxjs": "~7.5.7",
|
||||
"tslib": "^2.4.0",
|
||||
"typescript": "4.8.3",
|
||||
"zod": "^3.19.0",
|
||||
"typescript": "4.8.4",
|
||||
"zod": "^3.19.1",
|
||||
"zone.js": "~0.11.8"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"private": true,
|
||||
"version": "0.4.0",
|
||||
"version": "0.4.1",
|
||||
"workspaces": [
|
||||
"shared",
|
||||
"backend",
|
||||
|
@ -18,7 +18,7 @@
|
|||
"format": "prettier --write ."
|
||||
},
|
||||
"resolutions": {
|
||||
"fastify": ">=4.5.2",
|
||||
"fastify": ">=4.8.1",
|
||||
"terser": ">=5.14.2",
|
||||
"typeorm": ">=0.3.9",
|
||||
"typescript": "4.7.4",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "picsur-shared",
|
||||
"version": "0.4.0",
|
||||
"version": "0.4.1",
|
||||
"description": "Shared libraries for Picsur",
|
||||
"license": "GPL-3.0",
|
||||
"repository": "https://github.com/rubikscraft/Picsur",
|
||||
|
@ -8,12 +8,12 @@
|
|||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
"dependencies": {
|
||||
"zod": "^3.19.0"
|
||||
"zod": "^3.19.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^18.7.16",
|
||||
"@types/node": "^18.8.4",
|
||||
"tsc-watch": "^5.0.3",
|
||||
"typescript": "4.8.3"
|
||||
"typescript": "4.8.4"
|
||||
},
|
||||
"scripts": {
|
||||
"clean": "rm -rf ./dist",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# This dockerfile only builds the javascript part of the project, so tsc and angular compilation
|
||||
|
||||
FROM node:18.8 AS BUILDER_STAGE1
|
||||
FROM node:latest AS BUILDER_STAGE1
|
||||
|
||||
SHELL ["/bin/bash", "-c"]
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
# Always fetch amd64 image
|
||||
FROM ghcr.io/rubikscraft/picsur-alpha-stage1:latest AS BUILDER_STAGE1
|
||||
|
||||
FROM node:18.8-alpine AS BUILDER_STAGE2
|
||||
FROM node:alpine AS BUILDER_STAGE2
|
||||
|
||||
RUN apk add python3 build-base
|
||||
|
||||
|
@ -12,7 +12,7 @@ COPY --from=BUILDER_STAGE1 /picsur ./
|
|||
|
||||
RUN yarn workspaces focus -A --production
|
||||
|
||||
FROM node:18.8-alpine
|
||||
FROM node:alpine
|
||||
|
||||
ENV PICSUR_PRODUCTION=true
|
||||
|
||||
|
|
Loading…
Reference in a new issue