mirror of
https://github.com/CaramelFur/Picsur.git
synced 2025-10-26 06:56:06 +01:00
update and migrate, add prettier
This commit is contained in:
3
.prettierignore
Normal file
3
.prettierignore
Normal file
@@ -0,0 +1,3 @@
|
||||
node_modules
|
||||
dist
|
||||
.angular
|
||||
5
.prettierrc.yaml
Normal file
5
.prettierrc.yaml
Normal file
@@ -0,0 +1,5 @@
|
||||
arrowParens: always
|
||||
endOfLine: lf
|
||||
singleQuote: true
|
||||
tabWidth: 2
|
||||
trailingComma: all
|
||||
5
.vscode/settings.json
vendored
Normal file
5
.vscode/settings.json
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"vsicons.presets.angular": true,
|
||||
"skipRefreshExplorerOnWindowFocus": true,
|
||||
"angular.log": "verbose"
|
||||
}
|
||||
53
.vscode/tasks.json
vendored
Normal file
53
.vscode/tasks.json
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
{
|
||||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
{
|
||||
"label": "Start full",
|
||||
"dependsOn": [
|
||||
"Start backend",
|
||||
"Start frontend",
|
||||
"Start postgres",
|
||||
"Start shared"
|
||||
],
|
||||
"dependsOrder": "parallel",
|
||||
"isBackground": true,
|
||||
"group": "build"
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"label": "Start shared",
|
||||
"command": "yarn start",
|
||||
"options": {
|
||||
"cwd": "${cwd}/shared"
|
||||
},
|
||||
"group": "build"
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"label": "Start backend",
|
||||
"command": "yarn start:dev",
|
||||
"options": {
|
||||
"cwd": "${cwd}/backend"
|
||||
},
|
||||
"group": "build"
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"label": "Start frontend",
|
||||
"command": "yarn watch",
|
||||
"options": {
|
||||
"cwd": "${cwd}/frontend"
|
||||
},
|
||||
"group": "build"
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"label": "Start postgres",
|
||||
"command": "podman-compose -f ./dev.docker-compose.yml stop; podman-compose -f ./dev.docker-compose.yml up",
|
||||
"options": {
|
||||
"cwd": "${cwd}/support"
|
||||
},
|
||||
"group": "build"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -21,25 +21,25 @@
|
||||
"purge": "rm -rf dist && rm -rf node_modules"
|
||||
},
|
||||
"dependencies": {
|
||||
"@fastify/helmet": "^8.0.0",
|
||||
"@fastify/helmet": "^8.1.0",
|
||||
"@fastify/multipart": "^6.0.0",
|
||||
"@fastify/static": "^5.0.0",
|
||||
"@nestjs/common": "^8.4.4",
|
||||
"@nestjs/config": "^2.0.0",
|
||||
"@nestjs/core": "^8.4.4",
|
||||
"@nestjs/jwt": "^8.0.0",
|
||||
"@fastify/static": "^5.0.2",
|
||||
"@nestjs/common": "^8.4.6",
|
||||
"@nestjs/config": "^2.1.0",
|
||||
"@nestjs/core": "^8.4.6",
|
||||
"@nestjs/jwt": "^8.0.1",
|
||||
"@nestjs/passport": "^8.2.1",
|
||||
"@nestjs/platform-fastify": "^8.4.4",
|
||||
"@nestjs/platform-fastify": "^8.4.6",
|
||||
"@nestjs/serve-static": "^2.2.2",
|
||||
"@nestjs/typeorm": "^8.0.3",
|
||||
"@nestjs/typeorm": "^8.1.2",
|
||||
"bcrypt": "^5.0.1",
|
||||
"bmp-img": "^1.1.0",
|
||||
"cors": "^2.8.5",
|
||||
"fastify-static": "^4.7.0",
|
||||
"file-type": "^17.1.1",
|
||||
"file-type": "^17.1.2",
|
||||
"ms": "^2.1.3",
|
||||
"p-timeout": "^5.0.2",
|
||||
"passport": "^0.5.2",
|
||||
"p-timeout": "^5.1.0",
|
||||
"passport": "^0.6.0",
|
||||
"passport-jwt": "^4.0.0",
|
||||
"passport-local": "^1.0.0",
|
||||
"passport-strategy": "^1.0.0",
|
||||
@@ -50,35 +50,35 @@
|
||||
"reflect-metadata": "^0.1.13",
|
||||
"rimraf": "^3.0.2",
|
||||
"rxjs": "^7.5.5",
|
||||
"sharp": "^0.30.4",
|
||||
"sharp": "^0.30.6",
|
||||
"typeorm": "0.3.6",
|
||||
"zod": "^3.14.4"
|
||||
"zod": "^3.17.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@nestjs/cli": "^8.2.5",
|
||||
"@nestjs/schematics": "^8.0.10",
|
||||
"@nestjs/testing": "^8.4.4",
|
||||
"@nestjs/cli": "^8.2.6",
|
||||
"@nestjs/schematics": "^8.0.11",
|
||||
"@nestjs/testing": "^8.4.6",
|
||||
"@types/bcrypt": "^5.0.0",
|
||||
"@types/cors": "^2.8.12",
|
||||
"@types/ms": "^0.7.31",
|
||||
"@types/multer": "^1.4.7",
|
||||
"@types/node": "^17.0.30",
|
||||
"@types/node": "^17.0.40",
|
||||
"@types/passport-jwt": "^3.0.6",
|
||||
"@types/passport-local": "^1.0.34",
|
||||
"@types/passport-strategy": "^0.2.35",
|
||||
"@types/sharp": "^0.30.2",
|
||||
"@types/supertest": "^2.0.12",
|
||||
"@typescript-eslint/eslint-plugin": "^5.21.0",
|
||||
"@typescript-eslint/parser": "^5.21.0",
|
||||
"eslint": "^8.14.0",
|
||||
"@typescript-eslint/eslint-plugin": "^5.27.0",
|
||||
"@typescript-eslint/parser": "^5.27.0",
|
||||
"eslint": "^8.17.0",
|
||||
"eslint-config-prettier": "^8.5.0",
|
||||
"eslint-plugin-prettier": "^4.0.0",
|
||||
"prettier": "^2.6.2",
|
||||
"source-map-support": "^0.5.21",
|
||||
"ts-loader": "^9.3.0",
|
||||
"ts-node": "^10.7.0",
|
||||
"tsconfig-paths": "^3.14.1",
|
||||
"typescript": "4.6.4",
|
||||
"webpack": "^5.72.0"
|
||||
"ts-node": "^10.8.1",
|
||||
"tsconfig-paths": "^4.0.0",
|
||||
"typescript": "4.7.3",
|
||||
"webpack": "^5.73.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { ERole } from 'picsur-shared/dist/entities/role.entity';
|
||||
import { Column, Entity, Index, PrimaryGeneratedColumn } from 'typeorm';
|
||||
import { Permissions } from '../constants/permissions.const';
|
||||
import type { Permissions } from '../constants/permissions.const';
|
||||
|
||||
@Entity()
|
||||
export class ERoleBackend implements ERole {
|
||||
|
||||
@@ -4,7 +4,7 @@ import { Permission } from 'picsur-shared/dist/dto/permissions.dto';
|
||||
import { RequiredPermissions } from '../../../decorators/permissions.decorator';
|
||||
import { ReqUserID } from '../../../decorators/request-user.decorator';
|
||||
import { Returns } from '../../../decorators/returns.decorator';
|
||||
import AuthFasityRequest from '../../../models/interfaces/authrequest.dto';
|
||||
import type AuthFasityRequest from '../../../models/interfaces/authrequest.dto';
|
||||
|
||||
@Controller('api/experiment')
|
||||
@RequiredPermissions(Permission.Settings)
|
||||
|
||||
@@ -13,7 +13,7 @@ import {
|
||||
UserRegisterRequest,
|
||||
UserRegisterResponse
|
||||
} from 'picsur-shared/dist/dto/api/user.dto';
|
||||
import { EUser } from 'picsur-shared/dist/entities/user.entity';
|
||||
import type { EUser } from 'picsur-shared/dist/entities/user.entity';
|
||||
import { HasFailed } from 'picsur-shared/dist/types';
|
||||
import { UsersService } from '../../../collections/user-db/user-db.service';
|
||||
import {
|
||||
|
||||
@@ -4,10 +4,11 @@ import {
|
||||
Head,
|
||||
InternalServerErrorException,
|
||||
Logger,
|
||||
NotFoundException, Query,
|
||||
NotFoundException,
|
||||
Query,
|
||||
Res
|
||||
} from '@nestjs/common';
|
||||
import { FastifyReply } from 'fastify';
|
||||
import type { FastifyReply } from 'fastify';
|
||||
import {
|
||||
ImageMetaResponse,
|
||||
ImageRequestParams
|
||||
@@ -19,7 +20,7 @@ import { ImageIdParam } from '../../decorators/image-id/image-id.decorator';
|
||||
import { RequiredPermissions } from '../../decorators/permissions.decorator';
|
||||
import { Returns } from '../../decorators/returns.decorator';
|
||||
import { ImageManagerService } from '../../managers/image/image.service';
|
||||
import { ImageFullId } from '../../models/constants/image-full-id.const';
|
||||
import type { ImageFullId } from '../../models/constants/image-full-id.const';
|
||||
import { Permission } from '../../models/constants/permissions.const';
|
||||
import { EUserBackend2EUser } from '../../models/transformers/user.transformer';
|
||||
|
||||
|
||||
@@ -14,21 +14,21 @@
|
||||
"purge": "rm -rf dist && rm -rf node_modules && rm -rf .angular"
|
||||
},
|
||||
"dependencies": {
|
||||
"@angular/animations": "^14.0.0-next.15",
|
||||
"@angular/cdk": "^14.0.0-next.12",
|
||||
"@angular/common": "^14.0.0-next.15",
|
||||
"@angular/compiler": "^14.0.0-next.15",
|
||||
"@angular/core": "^14.0.0-next.15",
|
||||
"@angular/forms": "^14.0.0-next.15",
|
||||
"@angular/material": "^14.0.0-next.12",
|
||||
"@angular/platform-browser": "^14.0.0-next.15",
|
||||
"@angular/platform-browser-dynamic": "^14.0.0-next.15",
|
||||
"@angular/router": "^14.0.0-next.15",
|
||||
"@angular/animations": "^14.0.0",
|
||||
"@angular/cdk": "^14.0.0",
|
||||
"@angular/common": "^14.0.0",
|
||||
"@angular/compiler": "^14.0.0",
|
||||
"@angular/core": "^14.0.0",
|
||||
"@angular/forms": "^14.0.0",
|
||||
"@angular/material": "^14.0.0",
|
||||
"@angular/platform-browser": "^14.0.0",
|
||||
"@angular/platform-browser-dynamic": "^14.0.0",
|
||||
"@angular/router": "^14.0.0",
|
||||
"@ng-web-apis/common": "^2.0.0",
|
||||
"@ng-web-apis/resize-observer": "^1.0.3",
|
||||
"@ngui/common": "^1.0.0",
|
||||
"bootstrap": "^5.1.3",
|
||||
"fuse.js": "^6.5.3",
|
||||
"fuse.js": "^6.6.2",
|
||||
"jwt-decode": "^3.1.2",
|
||||
"moment": "^2.29.3",
|
||||
"ngx-auto-unsubscribe-decorator": "^1.1.0",
|
||||
@@ -38,19 +38,19 @@
|
||||
"reflect-metadata": "^0.1.13",
|
||||
"rxjs": "~7.5.5",
|
||||
"tslib": "^2.4.0",
|
||||
"zod": "^3.14.4",
|
||||
"zod": "^3.17.3",
|
||||
"zone.js": "~0.11.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular-devkit/build-angular": "14.0.0-next.12",
|
||||
"@angular/cli": "^14.0.0-next.12",
|
||||
"@angular/compiler-cli": "^14.0.0-next.15",
|
||||
"@angular-devkit/build-angular": "14.0.0",
|
||||
"@angular/cli": "^14.0.0",
|
||||
"@angular/compiler-cli": "^14.0.0",
|
||||
"@fontsource/material-icons": "^4.5.4",
|
||||
"@fontsource/material-icons-outlined": "^4.5.4",
|
||||
"@fontsource/roboto": "^4.5.5",
|
||||
"@types/node": "^17.0.30",
|
||||
"@fontsource/roboto": "^4.5.7",
|
||||
"@types/node": "^17.0.40",
|
||||
"@types/resize-observer-browser": "^0.1.7",
|
||||
"@types/validator": "^13.7.2",
|
||||
"typescript": "4.6.4"
|
||||
"typescript": "4.7.3"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,11 +15,15 @@
|
||||
"purge-all": "./support/purge-all.sh"
|
||||
},
|
||||
"resolutions": {
|
||||
"minimist": "npm:minimist-lite",
|
||||
"fastify-static": "npm:@fastify/static"
|
||||
"fastify-static": "npm:@fastify/static",
|
||||
"minimist": "npm:minimist-lite"
|
||||
},
|
||||
"dependencies": {
|
||||
"fastify-static": "npm:@fastify/static",
|
||||
"minimist": "npm:minimist-lite"
|
||||
},
|
||||
"devDependencies": {
|
||||
"prettier": "^2.6.2",
|
||||
"prettier-plugin-sh": "^0.11.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,78 +0,0 @@
|
||||
{
|
||||
"folders": [
|
||||
{
|
||||
"name": "shared",
|
||||
"path": "shared"
|
||||
},
|
||||
{
|
||||
"name": "backend",
|
||||
"path": "backend"
|
||||
},
|
||||
{
|
||||
"name": "frontend",
|
||||
"path": "frontend"
|
||||
},
|
||||
{
|
||||
"name": "support",
|
||||
"path": "support"
|
||||
}
|
||||
],
|
||||
"tasks": {
|
||||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
{
|
||||
"label": "Start full",
|
||||
"dependsOn": [
|
||||
"Start backend",
|
||||
"Start frontend",
|
||||
"Start postgres",
|
||||
"Start shared"
|
||||
],
|
||||
"dependsOrder": "parallel",
|
||||
"isBackground": true,
|
||||
"group": "build"
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"label": "Start shared",
|
||||
"command": "yarn start",
|
||||
"options": {
|
||||
"cwd": "${workspaceFolder:shared}"
|
||||
},
|
||||
"group": "build"
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"label": "Start backend",
|
||||
"command": "yarn start:dev",
|
||||
"options": {
|
||||
"cwd": "${workspaceFolder:backend}"
|
||||
},
|
||||
"group": "build"
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"label": "Start frontend",
|
||||
"command": "yarn watch",
|
||||
"options": {
|
||||
"cwd": "${workspaceFolder:frontend}"
|
||||
},
|
||||
"group": "build"
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"label": "Start postgres",
|
||||
"command": "podman-compose -f ./dev.docker-compose.yml stop; podman-compose -f ./dev.docker-compose.yml up",
|
||||
"options": {
|
||||
"cwd": "${workspaceFolder:support}"
|
||||
},
|
||||
"group": "build"
|
||||
}
|
||||
]
|
||||
},
|
||||
"settings": {
|
||||
"vsicons.presets.angular": true,
|
||||
"skipRefreshExplorerOnWindowFocus": true,
|
||||
"angular.log": "verbose"
|
||||
}
|
||||
}
|
||||
@@ -10,11 +10,11 @@
|
||||
"main": "./dist/index.js",
|
||||
"dependencies": {
|
||||
"tsc-watch": "^5.0.3",
|
||||
"zod": "^3.14.4"
|
||||
"zod": "^3.17.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^17.0.30",
|
||||
"typescript": "4.6.4"
|
||||
"@types/node": "^17.0.40",
|
||||
"typescript": "4.7.3"
|
||||
},
|
||||
"scripts": {
|
||||
"clean": "rm -rf ./dist",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM node:16-alpine
|
||||
FROM ghcr.io/rubikscraft/node-docker:1.0.0
|
||||
|
||||
# Sorry for the humongous docker container this generates
|
||||
# Maybe I'll trim it down some day
|
||||
|
||||
Reference in New Issue
Block a user