Commit Graph

9553 Commits

Author SHA1 Message Date
Naz
add30f3d5b Decoupled frontend routing from url service
refs https://linear.app/tryghost/issue/CORE-103/decouple-internal-frontend-code-from-url-module

- By becoming a parameter in the routing bootstrap process URL is Service no longer a "require" inside the frontend controllers but rather becomes a part of the "internal API" of the bootstrapper. This is not the end form of it, rather a step closer to decouplint routing from the URL serivce.
- The bootstrap module needs a facelift to have cleaner distinction between init/start methods. This is left for another time
2021-10-14 05:55:49 +13:00
Naz
0a9837ebcf Made bootstrap module's API slightly more readable
refs https://linear.app/tryghost/issue/CORE-103/decouple-internal-frontend-code-from-url-module

- It was hard to see straight away what methods the module exposes
2021-10-14 05:55:49 +13:00
Kevin Ansfield
7cb93be60b Added boolean as allowed custom theme setting type
refs https://github.com/TryGhost/Team/issues/1106

- updated schema validation to add `'boolean'` as an allowed `type` value
- added `format()` and `parse()` methods to `CustomThemeSetting` model to match `Settings` model behaviour for boolean-type settings
2021-10-13 17:25:32 +01:00
Fabien O'Carroll
f3dcf578a9 Prefixed migration with 01
refs https://github.com/TryGhost/Ghost/commit/b48c16c1

This was missed in the initial commit. We require numbers so that we can
easily see the order in which migrations will run.
2021-10-13 17:37:39 +02:00
Fabien O'Carroll
b93e7d7f7c Added offer_redemptions table to database
refs https://github.com/TryGhost/Team/issues/1132

This will be used to store Offer Redemptions, which will be used to list
the Offers which a Member has redeemed, as well as the number of times
an Offer has been redeemed.
2021-10-13 17:37:39 +02:00
Fabien O'Carroll
a441825c3f Passed MembersAPI the OffersAPI over OfferRepository
no-issue

The MembersAPI using the OfferRepository coupled it to the internals of
the Offers Module - instead we pass the "external" API - so that we can
change the internals, and not have to update the MembersAPI's usage.
2021-10-13 11:17:32 +02:00
Hannah Wolfe
00bcaeeb8c
Fixed duplicate message due to bad merge
- sadly git is not always detecting conflicts properly
2021-10-13 09:17:01 +01:00
PJ
4943c97ecb
Replace i18n with tpl in api/v2/utils/validators/input/users.js (#13589)
refs: #13380

- The i18n package is deprecated. It is being replaced with the tpl package.
2021-10-13 09:08:57 +01:00
PJ
d362d8c8bd
Replace i18n with tpl in core/server/api/v3/invites.js (#13587)
refs: #13380

- The i18n package is deprecated. It is being replaced with the tpl package.
2021-10-13 09:07:57 +01:00
PJ
09a9a9844f
Replace i18n with tpl in api/v3/pages-public.js (#13586)
refs: #13380

- The i18n package is deprecated. It is being replaced with the tpl package.
2021-10-13 09:07:42 +01:00
PJ
f8033596c0
Replace i18n with tpl in api/v3/pages.js (#13585)
refs: #13380

- The i18n package is deprecated. It is being replaced with the tpl package.
2021-10-13 09:06:53 +01:00
PJ
6e14047a2a
Replace i18n with tpl in core/server/api/v3/memberSigninUrls.js (#13584)
refs: #13380

- The i18n package is deprecated. It is being replaced with the tpl package.
2021-10-13 09:05:38 +01:00
Naz
dbdf7160bf Simplified DynamicRedirectManager's constructor
refs https://linear.app/tryghost/issue/CORE-84/have-a-look-at-the-eggs-redirects-refactor-branch

- This simplification allows to make the test for dependent services a lot more readable without a need to stub urlUtils
2021-10-13 10:04:55 +02:00
PJ
57ce743d98
Replace i18n with tpl in output/authentication.js (#13581)
refs: #13380

- The i18n package is deprecated. It is being replaced with the tpl package.
2021-10-13 09:00:19 +01:00
Tomás Castillo
2c659ea447
Replaced i18n.t w/ tpl helper in v3/posts.js file (#13580)
refs: #13380

- The i18n package is deprecated. It is being replaced with the tpl package.
2021-10-13 08:58:34 +01:00
IncredibleZuess
dd5a96d37c
Replaced i18n.t w/ tpl in api/v2/utils/validators/input/setup.js (#13579)
refs: TryGhost#13380

- The i18n package is deprecated. It is being replaced with the tpl package.
2021-10-13 08:54:22 +01:00
IncredibleZuess
b2e4145bd9
Replaced i18n.t w/ tpl in api/v2/utils/validators/input/settings.js (#13578)
refs: TryGhost#13380

- The i18n package is deprecated. It is being replaced with the tpl package.
2021-10-13 08:53:57 +01:00
IncredibleZuess
0cbc813f28
Replaced i18n.t w/ tpl in core/server/api/v2/utils/validators/input/passwordreset.js (#13577)
refs: TryGhost#13380

- The i18n package is deprecated. It is being replaced with the tpl package
2021-10-13 08:52:39 +01:00
IncredibleZuess
e0c0022cb7
Replaced i18n.t w/ tpl in core/server/api/v2/utils/validators/input/invites.js (#13576)
refs: TryGhost#13380

- The i18n package is deprecated. It is being replaced with the tpl package.
2021-10-13 08:52:19 +01:00
IncredibleZuess
6d4b682b95
Replaced i18n.t w/ tpl in api/v2/utils/validators/input/images.js (#13575)
refs: TryGhost#13380

- The i18n package is deprecated. It is being replaced with the tpl package.
2021-10-13 08:50:15 +01:00
Levi Richardson
6421f60852
Switch i18n.t to tpl in users.js (#13574)
refs: #13380

- i18n is deprecated and is being replaced with tpl
2021-10-13 08:44:04 +01:00
Fabien O'Carroll
b1914758b8 Added support for filter Offers by status
refs https://github.com/TryGhost/Team/issues/1131

This will allow Ghost Admin to display separate lists of active and
archived Offers! We must pass the options through so that the
OffersService is able to handle the filter passed in the request.
2021-10-12 18:39:25 +02:00
Sam Lord
a535cfdf16 Added metric-shipping to monitor boot-time
no issue
Boot-time metrics are really valuable for understanding how releases affect the performance of Ghost. The new @tryghost/metrics package lets us ship these metrics to different sources using the same configuration framework as @tryghost/logging introduced.
2021-10-12 15:01:50 +01:00
ItsMeSatan
af7fe99127
Replaced i18n.t with tpl in memberSigninUrls.js and oembed.js (#13564)
refs: #13380

- i18n is deprecated and is being replaced with tpl
2021-10-12 14:47:53 +01:00
PakkuDon
0fe62e3aee
Replaced i18n.t with tpl in core/server/services/bulk-email and core/server/services/permissions (#13562)
refs: #13380

- i18n is deprecated and is being replaced with tpl
2021-10-12 14:46:35 +01:00
Fabien 'egg' O'Carroll
b48c16c118
Added active column to offers table (#13592)
refs https://github.com/TryGhost/Team/issues/1131

This will be used as a flag to determine whether or not an Offer is
archived or active.
2021-10-12 15:20:45 +02:00
Fabien O'Carroll
1bb9c3a9ac Invalidated site cache when adding & editing Offers
no-issue

Because adding and editing Offers can update the redirects for Ghost, we
should ensure that any site cache is cleared so as to not conflict with
Offer redirects.
2021-10-12 15:20:31 +02:00
Fabien O'Carroll
37deda3587 Fixed handling of labs flag for Offers
no-issue

Because we only called `init` if the labs flag is enabled, when starting
up a site without the flag enabled - the listener for adding redirects
wasn't active. So new Offers would not have their redirects setup.
2021-10-12 15:20:31 +02:00
Marco F
ed6045d82c
Replaced i18n.t() with tpl() in v2/utils/validators/input/invitations.js (#13560)
refs: #13380

- The i18n package is deprecated. It is being replaced with the tpl package.
2021-10-12 09:12:04 +01:00
PJ
9ccf590ddc
Replaced i18n with tpl in GhostMailer.js (#13555)
refs: #13380

- The i18n package is deprecated. It is being replaced with the tpl package.
2021-10-12 09:10:50 +01:00
Indrakant Dana
e2aeca56e9
Replaced i18n.t w/ tpl in v3/utils/serializers (#13552)
refs: TryGhost#13380

- The i18n package is deprecated. It is being replaced with the tpl package.
2021-10-12 08:39:15 +01:00
Indrakant Dana
8029d1ce6a
Replaced i18n.t w/ tpl in v3/settings.js (#13551)
refs: TryGhost#13380

- The i18n package is deprecated. It is being replaced with the tpl package.
2021-10-12 08:36:11 +01:00
Shadman Ahmed Khan
c1789a3a03
Replaced i18n with tpl in core/server/api/v3 (#13548)
refs: #13380

- The i18n package is deprecated. It is being replaced with the tpl package.

Co-authored-by: Shadman Khan <shadmankhan@ShadmanMac.local>
2021-10-12 08:33:33 +01:00
Jack Wu
65d5b8d671
replaced i18n with tpl in mega of core services (#13546)
refs: #13380

- The i18n package is deprecated. It is being replaced with the tpl package.

Co-authored-by: jack.wu <jack.wu@wemoscooter.com>
2021-10-12 08:29:34 +01:00
Indrakant Dana
4f0999b6db
Replaced i18n.t w/ tpl in core/server/api/v3/utils/validators/input/setup.js (#13534)
refs: TryGhost#13380

- The i18n package is deprecated. It is being replaced with the tpl package.
2021-10-11 21:28:01 +01:00
Indrakant Dana
91dd9eae4e
Replaced i18n.t w/ tpl in core/server/api/v3/utils/validators/input/webhooks.js (#13536)
refs: TryGhost#13380

- The i18n package is deprecated. It is being replaced with the tpl package.
2021-10-11 20:54:06 +01:00
Indrakant Dana
7c14ff903b
Replaced i18n.t w/ tpl in api/v3/utils/validators/input/settings.js (#13533)
refs: TryGhost#13380

- The i18n package is deprecated. It is being replaced with the tpl package.
2021-10-11 19:57:40 +01:00
Indrakant Dana
cef32dd1fe
Replaced i18n.t w/ tpl in core/server/api/v3/utils/validators/input/passwordreset.js (#13532)
refs: TryGhost#13380

- The i18n package is deprecated. It is being replaced with the tpl package.
2021-10-11 19:56:23 +01:00
Indrakant Dana
a73459d904
Replaced i18n.t w/ tpl in core/server/api/v3/utils/validators/input/invitations.js (#13531)
refs: #13380

- The i18n package is deprecated. It is being replaced with the tpl package.
2021-10-11 19:45:29 +01:00
Indrakant Dana
9fe0b3df1a
Replaced i18n.t w/ tpl in core/server/api/v3/utils/validators/input/images.js (#13530)
refs: #13380

- The i18n package is deprecated. It is being replaced with the tpl package.
2021-10-11 19:36:36 +01:00
Hannah Wolfe
0bdaa216e5
Refactored tpl to never be used in DI
- Ghost has a set of core packages that it is safe to require directly in any file - tpl is one of them!
- This keeps the DI signature smaller and easier to reason about
2021-10-11 15:19:54 +01:00
Naz
1530cb28a5 Simplified Notification's service constructor
refs https://linear.app/tryghost/issue/CORE-64/resolve-undissmissable-update-notification-banners

- There's no need to pass a whole "version object" when all we need it a string in a full version format inside the module
2021-10-11 16:04:48 +02:00
Naz
c0d59db5be Added filtering of outdated custom notifications
refs https://linear.app/tryghost/issue/CORE-64/resolve-undissmissable-update-notification-banners
refs https://github.com/TryGhost/Team/issues/754
refs https://github.com/TryGhost/Team/issues/204
refs https://github.com/TryGhost/Ghost/issues/10236

- Custom notifications coming form the update check service should not be shown beyond instance's update. Once the notification is received it's marked with the current version number. With an instance upgrade all notification with older version should be hidden.
- This improvement should also resolve the problem of major version notifications with next major update (the code associated with https://github.com/TryGhost/Ghost/issues/10236 can then be removed after 5.0.1)
2021-10-11 16:04:48 +02:00
Ayoub BERDEDDOUCH
1249254a68
Replaced i18n w/ tpl in /core/server/api/v3/posts-public.js (#13527)
refs: #13380

- The i18n package is deprecated. It is being replaced with the tpl package.
2021-10-11 14:40:01 +01:00
Ayoub BERDEDDOUCH
8102a316d5
Replaced i18n w/ tpl in /core/server/api/v3/preview.js (#13526)
refs: #13380

- The i18n package is deprecated. It is being replaced with the tpl package.
2021-10-11 14:39:36 +01:00
Ayoub BERDEDDOUCH
8961785dfa
Replaced i18n w/ tpl in /core/server/api/v3/session.js (#13525)
refs: #13380

- The i18n package is deprecated. It is being replaced with the tpl package.
2021-10-11 14:39:19 +01:00
Ayoub BERDEDDOUCH
887caa299f
Replaced i18n with tpl in /core/server/api/v3/slugs.js (#13524)
refs: #13380

- The i18n package is deprecated. It is being replaced with the tpl package.
2021-10-11 14:37:44 +01:00
homersimpsons
3bb7813613
Replaced i18n.t w/ tpl helper in core/server/api/canary/* (#13521)
refs: #13380

- The i18n package is deprecated. It is being replaced with the tpl package.
2021-10-11 14:35:43 +01:00
william chandra
311414ad48
Replaced i18n.t w/ tpl in core/server/api/v3/utils/validators/input/users.js (#13517)
refs: #13380

- The i18n package is deprecated. It is being replaced with the tpl package.
2021-10-11 14:30:05 +01:00
william chandra
a62c7acde2
Replaced i18n.t w/ tpl in core/server/api/v3/utils/validators/input/oembed.js (#13516)
refs: #13380

- The i18n package is deprecated. It is being replaced with the tpl package.
2021-10-11 13:59:40 +01:00