Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
442312b
feat: add picture upload and asso edition route
AlbanSdl Oct 16, 2025
90af05e
feat(asso): add media connection for asso descriptions
AlbanSdl Oct 16, 2025
296bc9b
tests: add tests for new routes
AlbanSdl Oct 16, 2025
e0bf8d7
fix(media): add cache control on media and fix tests after rebase
AlbanSdl Oct 17, 2025
3943919
fix(media): remove application header requirement for getting public …
AlbanSdl Oct 17, 2025
c0f6af8
fix(asso): remove lexical requirement for descriptionShort
AlbanSdl Oct 19, 2025
9d539bf
feat: add lexical rendering in api
AlbanSdl Oct 22, 2025
30bc308
fix: tests
AlbanSdl Oct 22, 2025
cf52052
fix(lexical): tables are now rendered in html exports
AlbanSdl Oct 22, 2025
f68658d
fix: remove trailing spaces, fix list style
AlbanSdl Oct 22, 2025
9f63b29
fix: handle checklists and table header alignment
AlbanSdl Oct 22, 2025
8e6fea0
fix: fix image height, update tests lexical string
AlbanSdl Oct 22, 2025
764f52c
fix(tests): i broke codecov report generation
AlbanSdl Oct 22, 2025
7ade8a5
tests: add unit tests lexical
AlbanSdl Oct 22, 2025
ad07dfe
fix(tests): skip generation tests, remove res.dto.ts from coverage
AlbanSdl Oct 23, 2025
1fa84b0
docs: add some docs, add doc build ci
AlbanSdl Oct 23, 2025
726182c
docs: pimp docs with new theme
AlbanSdl Oct 23, 2025
2bdbe19
docs: update some layout settings
AlbanSdl Oct 23, 2025
875320d
chore: update deps
AlbanSdl Oct 24, 2025
1d5d932
chore: moving from rust connector to prisma mariadb adapter
AlbanSdl Nov 6, 2025
89861d0
fix: add forceExit in all test commands
AlbanSdl Nov 6, 2025
1dd73ab
chore: update deps (once more)
AlbanSdl Nov 6, 2025
89340be
chore: remove cz-emoji dep
AlbanSdl Nov 6, 2025
a1812d6
chore: update deps (except prisma orm)
AlbanSdl Dec 5, 2025
7f3e5d5
fix: update prisma and downgrade ldapts
AlbanSdl Dec 5, 2025
22793f1
Merge remote-tracking branch 'origin/dev' into fix/update-deps
TeddyRoncin Mar 1, 2026
b986c25
Fix tests
TeddyRoncin Mar 5, 2026
7ddad4b
Even newer dependency versions
TeddyRoncin Mar 5, 2026
238b6ec
Lint
TeddyRoncin Mar 5, 2026
8979566
Add
TeddyRoncin Mar 6, 2026
b4a1bea
Change missing
TeddyRoncin Mar 6, 2026
c6c7a84
Remove stupid changes trying of trying to convert CJS to ES
TeddyRoncin Mar 6, 2026
4753a3b
Review
TeddyRoncin Mar 6, 2026
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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@ yarn.lock
docs/_build/
docs/build/

# Prisma generated files
src/prisma/build/**/*.ts

# OLD DATABASE, DO NOT PUSH, IT CONTAINS SENSITIVE DATA
migration/etuutt_old/etuutt_old.sql
# UE Data
Expand Down
5 changes: 3 additions & 2 deletions migration/etuutt_old/make-migration.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { PrismaClient as _PrismaClient } from '@prisma/client';
import { PrismaClient as _PrismaClient } from '../../src/prisma/types';
import { PrismaMariaDb } from '@prisma/adapter-mariadb';
import { createConnection } from 'mysql';
import { cleanDb } from '../../test/utils/test_utils';
import { findLegacyUeofName, migrateUEs } from './modules/ue';
Expand Down Expand Up @@ -34,7 +35,7 @@ export async function getOperationResults<T>(operations: MayBePromise<PrismaOper
}

let ueId = -1;
const _prisma = new _PrismaClient();
const _prisma = new _PrismaClient({ adapter: new PrismaMariaDb(process.env.DATABASE_URL) });
const prisma = _prisma.$extends({
model: {
semester: {
Expand Down
2 changes: 1 addition & 1 deletion migration/etuutt_old/modules/user.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { PrismaClient, UserType } from '@prisma/client';
import { PrismaClient, UserType } from '../../../src/prisma/types';
import { QueryFunction } from '../make-migration';
import { RawSemester, RawUe, RawUser } from '../../../src/prisma/types';

Expand Down
141 changes: 69 additions & 72 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
{
"name": "etu-utt-api-nestjs-prisma",
"name": "etu-utt-api",
"version": "0.0.1",
"description": "",
"author": "",
"private": true,
"license": "UNLICENSED",
"type": "commonjs",
"scripts": {
"build": "npx nest build",
"build:docs": "python3 -m sphinx -W -T -b html -d docs/build/doctrees -D language=fr docs docs/build/html",
Expand All @@ -15,20 +16,21 @@
"dev": "NODE_ENV=development npx nest start --watch",
"dev:debug": "NODE_ENV=development npx nest start --debug --watch",
"db:reset": "pnpm dev:db:reset && pnpm test:db:reset",
"db:editor": "env-cmd -f .env.dev -- pnpm prisma studio",
"db:editor": "prisma studio",
"db:seed": "env-cmd -f .env.dev -- ts-node prisma/seed/seed.ts",
"db:migrate": "env-cmd -f .env.dev -- ts-node migration/etuutt_old/make-migration.ts",
"dev:serve": "http-server ./dev/ -p 3042",
"dev:db:reset": "env-cmd -f .env.dev --use-shell \"pnpm prisma migrate reset --force && pnpm prisma db push\"",
"dev:db:reset": "env-cmd -f .env.dev --use-shell \"pnpm prisma generate && pnpm prisma migrate reset --force && pnpm prisma db push\"",
"dev:smtp-server:certificate": "openssl req -x509 -newkey rsa:4096 -keyout myKey.pem -out cert.pem -days 365 -nodes -subj \"/CN=ung.utt.fr/O=UTT Net Group/C=FR\" && openssl pkcs12 -export -out dummy-cert.p12 -inkey myKey.pem -in cert.pem -passout pass:etuutt && rm myKey.pem cert.pem && chmod 644 dummy-cert.p12",
"dev:smtp-server": "docker run -p 587:587 -p 8080:8080 -p 8081:8081 -e FAKESMTP_PORT=587 -e FAKESMTP_AUTHENTICATION_USERNAME=etuutt -e FAKESMTP_AUTHENTICATION_PASSWORD=etuutt -e FAKESMTP_REQUIRETLS=true -e FAKESMTP_TLSKEYSTORE_LOCATION=file:/data/dummy-cert.p12 -e FAKESMTP_TLSKEYSTORE_PASSWORD=etuutt -e FAKESMTP_TLSKEYSTORE_TYPE=PKCS12 -v ./dummy-cert.p12:/data/dummy-cert.p12 gessnerfl/fake-smtp-server",
"test": "NODE_OPTIONS=\"$NODE_OPTIONS --experimental-vm-modules\" jest --config test/jest.json --runInBand --testNamePattern",
"test:unit": "NODE_OPTIONS=\"$NODE_OPTIONS --experimental-vm-modules\" jest --config test/jest.json \"unit/app.spec.ts\" --runInBand --testNamePattern",
"test:e2e": "NODE_OPTIONS=\"$NODE_OPTIONS --experimental-vm-modules\" jest --config test/jest.json \"e2e/app.e2e-spec.ts\" --runInBand --testNamePattern",
"test:watch": "NODE_OPTIONS=\"$NODE_OPTIONS --experimental-vm-modules\" jest --watch --config ./test/jest.json --runInBand",
"test:cov": "NODE_OPTIONS=\"$NODE_OPTIONS --experimental-vm-modules\" jest --coverage --config ./test/jest.json --runInBand",
"test:instantfail": "NODE_OPTIONS=\"$NODE_OPTIONS --experimental-vm-modules\" jest --config test/jest.json --runInBand --testNamePattern --bail",
"test:db:reset": "env-cmd -f .env.test --use-shell \"pnpm prisma migrate reset --force && pnpm prisma db push\"",
"test": "NODE_OPTIONS=\"$NODE_OPTIONS --experimental-vm-modules\" jest --config test/jest.json --runInBand",
"test:grep": "pnpm test --testNamePattern",
"test:unit": "pnpm test \"unit/app.spec.ts\"",
"test:e2e": "pnpm test \"e2e/app.e2e-spec.ts\"",
"test:watch": "pnpm test --watch",
"test:cov": "pnpm test --coverage",
"test:instantfail": "pnpm test --bail",
"test:db:reset": "env-cmd -f .env.test --use-shell \"pnpm prisma generate && pnpm prisma migrate reset --force && pnpm prisma db push\"",
"test:db:editor": "env-cmd -f .env.test -- pnpm prisma studio",
"seed:base": "env-cmd -f .env.dev -- ts-node scripts/seed/base.ts",
"seed:ue": "env-cmd -f .env.dev -- ts-node scripts/seed/ue.ts",
Expand All @@ -39,87 +41,82 @@
"script:deps:graph": "ts-node scripts/dependency_graph.ts"
},
"dependencies": {
"@fast-csv/parse": "^5.0.2",
"@lexical/code": "^0.37.0",
"@lexical/extension": "^0.37.0",
"@lexical/headless": "^0.37.0",
"@lexical/html": "^0.37.0",
"@lexical/link": "^0.37.0",
"@lexical/list": "^0.37.0",
"@lexical/rich-text": "^0.37.0",
"@lexical/table": "^0.37.0",
"@fast-csv/parse": "^5.0.5",
"@lexical/code": "^0.41.0",
"@lexical/extension": "^0.41.0",
"@lexical/headless": "^0.41.0",
"@lexical/html": "^0.41.0",
"@lexical/link": "^0.41.0",
"@lexical/list": "^0.41.0",
"@lexical/rich-text": "^0.41.0",
"@lexical/table": "^0.41.0",
"@nestjs-modules/mailer": "^2.0.2",
"@nestjs/axios": "^4.0.0",
"@nestjs/common": "^11.0.11",
"@nestjs/config": "^4.0.1",
"@nestjs/core": "^11.0.11",
"@nestjs/jwt": "^11.0.0",
"@nestjs/axios": "^4.0.1",
"@nestjs/common": "^11.1.16",
"@nestjs/config": "^4.0.3",
"@nestjs/core": "^11.1.16",
"@nestjs/jwt": "^11.0.2",
"@nestjs/passport": "^11.0.5",
"@nestjs/platform-express": "^11.0.11",
"@nestjs/swagger": "^11.0.6",
"@prisma/client": "^6.5.0",
"axios": "^1.8.3",
"bcryptjs": "^3.0.2",
"@nestjs/platform-express": "^11.1.16",
"@nestjs/swagger": "^11.2.6",
"@prisma/adapter-mariadb": "^7.4.2",
"@prisma/client": "^7.4.2",
"axios": "^1.13.6",
"bcryptjs": "^3.0.3",
"class-transformer": "^0.5.1",
"class-validator": "^0.14.1",
"fast-xml-parser": "^5.0.9",
"file-type": "^20.4.1",
"ldapts": "^7.3.1",
"lexical": "^0.37.0",
"multer": "1.4.5-lts.1",
"pactum-matchers": "^1.1.7",
"class-validator": "^0.15.1",
"fast-xml-parser": "^5.4.2",
"file-type": "^21.3.0",
"ldapts": "8.1.7",
"lexical": "^0.41.0",
"multer": "2.1.1",
"pactum-matchers": "^1.2.0",
"passport-jwt": "^4.0.1",
"pdfkit": "^0.16.0",
"prisma": "^6.5.0",
"pdfkit": "^0.17.2",
"prisma": "^7.4.2",
"reflect-metadata": "^0.2.2",
"rxjs": "^7.8.2",
"sharp": "^0.33.5"
"sharp": "^0.34.5"
},
"devDependencies": {
"@faker-js/faker": "^9.6.0",
"@nestjs/cli": "^11.0.5",
"@nestjs/schematics": "^11.0.2",
"@nestjs/testing": "^11.0.11",
"@faker-js/faker": "^9.9.0",
"@nestjs/cli": "^11.0.16",
"@nestjs/schematics": "^11.0.9",
"@nestjs/testing": "^11.1.16",
"@types/bcryptjs": "^3.0.0",
"@types/express": "^5.0.0",
"@types/jest": "29.5.14",
"@types/multer": "^1.4.12",
"@types/mysql": "^2.15.26",
"@types/node": "22.13.10",
"@types/nodemailer": "^7.0.9",
"@types/express": "^5.0.6",
"@types/jest": "30.0.0",
"@types/multer": "^2.0.0",
"@types/mysql": "^2.15.27",
"@types/node": "25.3.4",
"@types/nodemailer": "^7.0.11",
"@types/passport-jwt": "^4.0.1",
"@types/pdfkit": "^0.13.9",
"@typescript-eslint/eslint-plugin": "^8.26.1",
"@typescript-eslint/parser": "^8.26.1",
"cz-emoji": "1.3.2-canary.2",
"env-cmd": "^10.1.0",
"eslint": "^9.22.0",
"eslint-config-prettier": "^10.1.1",
"eslint-plugin-prettier": "^5.2.3",
"globals": "^16.0.0",
"http-server": "^14.1.1",
"jest": "29.7.0",
"@types/pdfkit": "^0.17.5",
"@typescript-eslint/eslint-plugin": "^8.56.1",
"@typescript-eslint/parser": "^8.56.1",
"env-cmd": "^11.0.0",
"eslint": "^10.0.2",
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-prettier": "^5.5.5",
"globals": "^17.4.0",
"jest": "30.2.0",
"ldap-server-mock": "^6.0.1",
"mysql": "^2.18.1",
"nestjs-spelunker": "^1.3.2",
"nock": "^14.0.1",
"pactum": "^3.7.6",
"prettier": "^3.5.3",
"nock": "^14.0.11",
"pactum": "^3.9.1",
"prettier": "^3.8.1",
"source-map-support": "^0.5.21",
"ts-jest": "29.2.6",
"ts-loader": "^9.5.2",
"ts-jest": "29.4.6",
"ts-loader": "^9.5.4",
"ts-node": "^10.9.2",
"tsconfig-paths": "4.2.0",
"typescript": "^5.8.2",
"typescript-eslint": "^8.26.1"
},
"config": {
"commitizen": {
"path": "cz-emoji"
}
"typescript": "^5.9.3",
"typescript-eslint": "^8.56.1"
},
"pnpm": {
"onlyBuiltDependencies": [
"@nestjs/core",
"sharp"
]
}
Expand Down
Loading