Commit Graph

9 Commits

Author SHA1 Message Date
Kevin Ansfield
d3e8033b1f Published new versions
- @tryghost/custom-theme-settings-service@0.0.4
2021-09-23 23:42:04 +01:00
Kevin Ansfield
6c526bfee2 Fixed missing await in async method
refs https://github.com/TryGhost/Team/issues/1070

- missing await was resulting in setting caches not being populated
2021-09-23 23:41:44 +01:00
Kevin Ansfield
1733041c8f Published new versions
- @tryghost/custom-theme-settings-service@0.0.3
2021-09-23 20:35:36 +01:00
Kevin Ansfield
e28415abf4 Added CustomThemeSettingsService.listSettings()
refs https://github.com/TryGhost/Team/issues/1070

- return re-fetched settings after sync so they can be used in later activation steps
- added internal `activeThemeSettings` cache that stores full setting data along with saved values for use in API output
- added `listSettings()` that converts internal cache object into a settings array that matches API format
2021-09-23 20:34:35 +01:00
Kevin Ansfield
e98b9d764d Published new versions
- @tryghost/custom-theme-settings-service@0.0.2
2021-09-23 09:17:25 +01:00
Kevin Ansfield
c4f364996b Removed model dependency in custom theme settings cache
refs https://github.com/TryGhost/Team/issues/1070

- having a dependency on a model in the cache service meant that Ghost had to know about that and pre-initialize the cache during boot, even though that didn't actually do anything except create a cache instance
- by making the cache a simple key/value store able to be populated from the cache settings service when a theme is activated it means that Ghost doesn't need to perform any extra initialization when the cache is initialized via `require`
2021-09-23 09:16:59 +01:00
Kevin Ansfield
0f5ccb7131 Published new versions
- @tryghost/custom-theme-settings-service@0.0.1
 - @tryghost/email-analytics-provider-mailgun@1.0.1
 - @tryghost/email-analytics-service@1.0.1
2021-09-22 22:00:51 +01:00
Kevin Ansfield
cf9cee0208 First pass at custom-theme-settings-service functionality
refs https://github.com/TryGhost/Team/issues/1070

- added `bread` util that acts as a wrapper for the provided model, if we have any business functionality needed when settings are added/removed then it will go here
- added primary "server" service that handles syncing of custom theme data extracted from a theme with the settings that are in the database and exported as "Service". Syncing rules on theme activation:
    - if a new setting is seen, create it with the default value
    - if a setting has it's type changed, remove it and create a new setting with the default value
    - if a select setting's value is not a valid option, reset it to the default value
- added shared "frontend/server" service that exposes an in-memory cache of key/value pairs for the currently active theme
2021-09-22 21:56:45 +01:00
Kevin Ansfield
56012f5f21 slimer new custom-theme-settings-service 2021-09-21 17:21:52 +01:00