Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade dependencies #37

Merged
merged 11 commits into from
Nov 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# EditorConfig is awesome: http://EditorConfig.org
# top-most EditorConfig file
root = true
# Windows-style newlines
[*]
end_of_line = lf
insert_final_newline = false
charset = utf-8
indent_style = space
indent_size = 2
trim_trailing_whitespace=true
# EditorConfig is awesome: http://EditorConfig.org

# top-most EditorConfig file
root = true

[*]
# Unix-style newlines
end_of_line = lf
insert_final_newline = false
charset = utf-8
indent_style = space
indent_size = 2
trim_trailing_whitespace = true
20 changes: 10 additions & 10 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"semi": true,
"trailingComma": "all",
"singleQuote": true,
"printWidth": 120,
"tabWidth": 2,
"arrowParens": "always",
"endOfLine": "crlf",
"jsxBracketSameLine": true
}
{
"semi": true,
"trailingComma": "all",
"singleQuote": true,
"printWidth": 120,
"tabWidth": 2,
"arrowParens": "always",
"endOfLine": "crlf",
"jsxBracketSameLine": true
}
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:18
FROM node:20

ENV NODE_ENV=production
WORKDIR /srv/app
Expand All @@ -12,7 +12,7 @@ USER node
# Node has the uid 1000
COPY --chown=node:node package.json pnpm-lock.yaml ./

RUN pnpm install --frozen-lockfile
RUN pnpm install --frozen-lockfile --production=false
TeddyRoncin marked this conversation as resolved.
Show resolved Hide resolved

COPY --chown=node:node ./ ./

Expand All @@ -22,4 +22,4 @@ RUN pnpm build
# Prunes devDependencies
RUN pnpm install --production --ignore-scripts --prefer-offline

CMD pnpm start
CMD pnpm start
4 changes: 2 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2022 UNG
Copyright (c) 2019-2023 UNG

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand All @@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
SOFTWARE.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,12 @@ Créer la base de données uabouffe
CREATE DATABASE uabouffe CHARACTER SET utf8;
```
### Installation de l'API et des dépendances

Il faut maintenant clone le repo [UA-bouffe](https://github.com/ungdev/UA-bouffe) (avec les submodules) qui contient un jeu de données à mettre dans la DB.
```
git clone https://github.com/ungdev/UA-bouffe-api
cp .env.example .env
pnpm
pnpm seed
pnpm i
```
## Développement
### Démarrer l'API en développement
Expand Down
24 changes: 12 additions & 12 deletions docs/sequence.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Generated with MermaidJS (https://mermaidjs.github.io/)
sequenceDiagram
participant DB as Database
participant S as Serveur
participant B1 as Borne Bouffe
participant B2 as Borne Préparation
B1->>S: Nouvelle commande (HTTP)
S->>DB: Nouvelle commande
S-->>B1: Commandes en cours (socket)
B1->>B1: Mise à jour Redux
S-->>B2: Commandes en cours (socket)
# Generated with MermaidJS (https://mermaidjs.github.io/)

sequenceDiagram
participant DB as Database
participant S as Serveur
participant B1 as Borne Bouffe
participant B2 as Borne Préparation
B1->>S: Nouvelle commande (HTTP)
S->>DB: Nouvelle commande
S-->>B1: Commandes en cours (socket)
B1->>B1: Mise à jour Redux
S-->>B2: Commandes en cours (socket)
B2->>B2: Mise à jour Redux
2 changes: 1 addition & 1 deletion logs/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
*
*
!.gitignore
68 changes: 33 additions & 35 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,54 +1,52 @@
{
"name": "bouffe-api",
"version": "2.0.0",
"version": "2.1.0",
"main": "index.js",
"license": "MIT",
"dependencies": {
"axios": "^0.23.0",
"body-parser": "^1.19.2",
"axios": "^1.6.2",
"body-parser": "^1.20.2",
"cors": "^2.8.5",
"dotenv": "^10.0.0",
"express": "^4.17.3",
"express-validator": "^6.13.0",
"helmet": "^4.6.0",
"jsonwebtoken": "^8.5.1",
"dotenv": "^16.3.1",
"express": "^4.18.2",
"express-validator": "^7.0.1",
"helmet": "^7.1.0",
"jsonwebtoken": "^9.0.2",
"moment": "^2.29.4",
"morgan": "^1.10.0",
"mysql2": "^2.3.3",
"mysql2": "^3.6.5",
"reflect-metadata": "^0.1.13",
"sequelize": "^6.7.0",
"sequelize-typescript": "^2.1.3",
"socket.io": "^4.3.2",
"uuid": "^8.3.2",
"winston": "^3.3.4"
"sequelize": "^6.35.1",
"sequelize-typescript": "^2.1.6",
"socket.io": "^4.7.2",
"uuid": "^9.0.1",
"winston": "^3.11.0"
},
"devDependencies": {
"@types/bluebird": "^3.5.37",
"@types/body-parser": "^1.19.3",
"@types/cors": "^2.8.12",
"@types/express": "^4.17.14",
"@types/helmet": "^4.0.0",
"@types/jsonwebtoken": "^8.5.9",
"@types/morgan": "^1.9.3",
"@types/node": "^16.11.64",
"@types/socket.io": "^3.0.2",
"@types/validator": "^13.6.6",
"@typescript-eslint/eslint-plugin": "^5.1.0",
"@typescript-eslint/parser": "^5.1.0",
"eslint": "^8.0.1",
"eslint-config-airbnb-base": "^14.2.1",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-import": "^2.25.4",
"eslint-plugin-prettier": "^4.0.0",
"prettier": "^2.4.1",
"ts-node-dev": "^1.1.8",
"typescript": "^4.4.4"
"@types/bluebird": "^3.5.42",
"@types/body-parser": "^1.19.5",
"@types/cors": "^2.8.17",
"@types/express": "^4.17.21",
"@types/jsonwebtoken": "^9.0.5",
"@types/morgan": "^1.9.9",
"@types/node": "^20.10.0",
"@types/validator": "^13.11.7",
"@typescript-eslint/eslint-plugin": "^6.13.1",
"@typescript-eslint/parser": "^6.13.1",
"eslint": "^8.54.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-import": "^2.29.0",
"eslint-plugin-prettier": "^5.0.1",
"prettier": "^3.1.0",
"ts-node-dev": "^2.0.0",
"typescript": "^5.3.2"
},
"scripts": {
"build": "tsc",
"start": "node build/server.js",
"dev": "ts-node-dev --no-notify src/server.ts",
"lint": "eslint src/ --ext .ts",
"lint-fix": "eslint --fix src/ --ext .ts"
"lint:fix": "eslint --fix src/ --ext .ts"
}
}
Loading