Commit Graph

42 Commits

Author SHA1 Message Date
Alice Gaudon a3ebf46b54 Add ApplicationComponent init lifecycle step and unstatic globals
This renames ApplicationComponent (previous) init to initRoutes and handle to handleRoutes
2021-05-13 16:03:59 +02:00
Alice Gaudon cdf95c0c0b Add has and require methods to Extendable 2021-05-13 15:58:41 +02:00
Alice Gaudon 76fa44c245 Convert errors pages to svelte
Fallback non-existing error views to generic Error svelte component
2021-05-13 15:55:56 +02:00
Alice Gaudon 66a696f40e Application: fix isInNodeModules is inverted 2021-05-13 14:13:45 +02:00
Alice Gaudon d423d78f2a esm: fix jest not running
following 82ab0b963c
2021-05-12 14:33:18 +02:00
Alice Gaudon 50e1b287a9 Catch command line errors and force exit with error code 2021-05-04 17:28:02 +02:00
Alice Gaudon 82ab0b963c Switch to esm and add import auto format 2021-05-03 20:52:52 +02:00
Alice Gaudon 05069b15d8 Properly use promises in ViewEngine.render(), use ViewEngine for mail and add NunjucksViewEngine 2021-04-28 17:02:49 +02:00
Alice Gaudon 053313002c Move svelte compilation to external rollup and add pre-compile-views cli 2021-04-23 15:56:39 +02:00
Alice Gaudon 12ec9b55f9 Handle SIGTERM exit signals (allows clean exit with systemd) 2021-04-21 13:52:52 +02:00
Alice Gaudon 714e747d6e Application: make start/stop sturdier, catch more stop signals 2021-03-30 12:03:26 +02:00
Alice Gaudon 4cbc73a25f Fix ServeStaticDirectoryComponent while developping swaf
Also move core version detection to Application
2021-03-30 12:03:26 +02:00
Alice Gaudon e4768141bc Simplify RedirectBackComponent into PreviousUrlComponent
Closes #12
2021-01-24 22:42:20 +01:00
Alice Gaudon 8fab93e709 Use AsyncLocalStorage to provide requestId context 2021-01-22 15:54:26 +01:00
Alice Gaudon 3e0a25874e Auth: fix middleware applied globally and explicitly log them 2021-01-21 15:45:20 +01:00
Alice Gaudon 87b4facea0 Upgrade dependencies and update to express session new typings 2020-12-04 15:24:22 +01:00
Alice Gaudon 42da8a68bb Validation: respond with http 400 instead of 401 2020-11-15 14:12:45 +01:00
Alice Gaudon acc5233185 Error handling: transform single validation errors into a validation bag 2020-11-14 16:25:18 +01:00
Alice Gaudon 7c2572cddc Fix validation errors not being flashed correctly 2020-11-03 11:14:13 +01:00
Alice Gaudon 88e5e19730 Replace custom logging system with tslog 2020-11-02 17:50:12 +01:00
Alice Gaudon 79d704083a Add many eslint rules and fix all linting issues 2020-09-28 14:15:22 +02:00
Alice Gaudon b736f5f6cb Improve middleware definition and cleanup code 2020-09-25 22:15:57 +02:00
Alice Gaudon 75c2b72f57 Add Application.getComponent() 2020-09-23 08:46:21 +02:00
Alice Gaudon 197b963e4c Add cache interface 2020-07-19 12:01:22 +02:00
Alice Gaudon e9a20c82ed Fix chmod check and relax mail 2020-07-15 15:39:08 +02:00
Alice Gaudon 583a5a92de Fix config file security check access path 2020-07-15 15:22:16 +02:00
Alice Gaudon 249098a587 Enforce config file permissions 2020-07-15 15:13:52 +02:00
Alice Gaudon 9ce345d99d Don't start in production if important security fields are misconfigured 2020-07-15 15:06:29 +02:00
Alice Gaudon 0e96a285ac Properly split routing in 2 steps: init, handle 2020-07-11 11:46:16 +02:00
Alice Gaudon 4b8a3b307d Integrate file upload form middleware into controllers 2020-07-11 11:08:57 +02:00
Alice Gaudon 001e24488b Add option to disable command line arguments when instanciating an app 2020-07-08 09:52:16 +02:00
Alice Gaudon b043513fe8 Bug fixes and app settings 2020-06-27 17:12:50 +02:00
Alice Gaudon 9363873898 Format response for validation errors 2020-06-15 12:58:15 +02:00
Alice Gaudon 9d63564719 Promote ValidationBag error handling to Application wide level 2020-06-14 21:48:50 +02:00
Alice Gaudon a15d496c53 Use formidable instead of multer 2020-06-14 21:47:18 +02:00
Alice Gaudon adf380c19d Add request parsing middlewares to controllers 2020-06-14 17:33:37 +02:00
Alice Gaudon e965303777 Add logging full http requests cli arg 2020-06-14 11:43:00 +02:00
Alice Gaudon 499c66240b Add command line interface and allow rolling back migrations 2020-06-05 14:32:39 +02:00
Alice Gaudon b85fbe6c21 Log accept header for every request 2020-06-04 10:15:24 +02:00
Alice Gaudon 9b7ec1e516 Nunjucks: distinguish application version from core version 2020-04-25 09:35:25 +02:00
Alice Gaudon 3bf4f93b74 Force an application to register migrations 2020-04-23 16:03:54 +02:00
Alice Gaudon 662d12df68 Add sources 2020-04-22 17:49:58 +02:00