2
1
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2023-12-13 21:00:40 +01:00
Ghost/core/server/middleware
kirrg001 8680099765 🎨 gscan 1.1.0 & optimisations
refs #8222

- differentiate between errors and fatal errors
- use gscan errors in theme middleware
- Adds a new `error()` method to `currentActiveTheme` constructor which will return the errors we receive from gscan
- In middleware, if a theme couldn't be activated because it's invalid, we'll fetch the erros and send them to our error handler. We also use a new property `hideStack` to control, if the stack (in dev mode and if available) should be shown or the gscan errors (in prod mode, or in dev if no stack error)
- In our error handler we use this conditional to send a new property `gscan` to our error theme
- In `error.hbs` we'll iterate through possible `gscan` error objects and render them.
- remove stack printing
- stack for theme developers in development mode doesn't make sense
- stack in production doesn't make sense
- the stack is usually hard to read
- if you are developer you can read the error stack on the server log
- utils.packages: transform native error into Ghost error
- use `onlyFatalErrors` for gscan format and differeniate fatal errors vo.2
- optimise bootstrap error handling
- transform theme is missing into an error
- add new translation key
- show html tags for error.hbs template: rule
2017-06-06 13:07:50 +07:00
..
api 🎨 Ghost bootstrap: optimise requires (#8121) 2017-03-13 20:07:12 +00:00
validation 🙇 Blog icon utils and publisher.logo for JSON-LD (#8297) 2017-04-11 18:32:06 +02:00
brute.js 🎨 Ghost bootstrap: optimise requires (#8121) 2017-03-13 20:07:12 +00:00
cache-control.js 🎨 add cache control configurations into the default config 2017-05-31 16:12:11 +01:00
custom-redirects.js 🎨 add cache control configurations into the default config 2017-05-31 16:12:11 +01:00
error-handler.js 🎨 gscan 1.1.0 & optimisations 2017-06-06 13:07:50 +07:00
ghost-locals.js Misc Middleware cleanup (#7526) 2016-10-10 21:14:32 +02:00
labs.js 🎨 configurable logging with bunyan (#7431) 2016-10-04 16:33:43 +01:00
log-request.js chore(package): update uuid to version 3.0.0 (#7742) 2017-01-04 17:10:29 +01:00
maintenance.js Error creation (#7477) 2016-10-06 13:27:35 +01:00
pretty-urls.js Misc Middleware cleanup (#7526) 2016-10-10 21:14:32 +02:00
serve-favicon.js 🎨 add cache control configurations into the default config 2017-05-31 16:12:11 +01:00
serve-public-file.js 💁🏻 Moveshared/ to server/public (#8273) 2017-04-07 13:21:41 +01:00
static-theme.js New fully-loaded & validated activeTheme concept (#8146) 2017-03-13 21:13:17 +01:00
uncapitalise.js Misc Middleware cleanup (#7526) 2016-10-10 21:14:32 +02:00
url-redirects.js 🔥 revert: force admin url redirect (#8493) 2017-05-30 10:19:14 +01:00