Ghost/core
Hannah Wolfe af09d55c7a Moved activate from themes to the bridge
refs: bf0823c9a2

- continuing the work of splitting up the theme service into logical components

Theme activations are a trickier piece of the theme split puzzle because they are called from the API and theme service on boot in different ways.

Activations require a theme to have been validated at different levels. Validations are also tricky - do they belong to the theme engine, or the theme service?

There are then several different flows for activations:
- On Boot
- API "activate" call
- API override on upload or install via setFromZip, which is a method in the storage layer

These calls all have quite different logical flows at the moment, and need to be unified

For now, I've moved the existing "activate" function onto the bridge. This allows the theme service to be split from the frontend, and refactoring can start from there.
I hope to move this so there is less code in the actual bridge very soon, but my goal is not to require any server packages in the frontend part of this

I think ideally:
- all activation code, including validation, should probably be part of the theme engine
- the theme engine should offer 3 methods: getActive() canActivate() and activate()
- the theme service is then only responsible for loading themes in and out of storage, JSON responses for the API, and handing themes to the frontend via the bridge at the appropriate moment
2021-04-27 13:52:19 +01:00
..
client@87e700fe35 Updated Ghost-Admin to v4.3.2 2021-04-22 17:32:41 +01:00
frontend Moved activate from themes to the bridge 2021-04-27 13:52:19 +01:00
server Updated subscriptions for Members Admin API 2021-04-26 17:14:34 +01:00
shared Moved bridge into its proper location 2021-04-26 14:38:57 +01:00
app.js Added Sentry to new boot process 2021-02-19 09:20:41 +00:00
boot.js Moved bridge into its proper location 2021-04-26 14:38:57 +01:00
bridge.js Moved activate from themes to the bridge 2021-04-27 13:52:19 +01:00