Commit Graph

3968 Commits

Author SHA1 Message Date
Daniel Lockyer
bb10fedacd v4.33.0 2022-01-21 16:00:32 +00:00
renovate[bot]
b6c0f8bddd
Update dependency @tryghost/express-dynamic-redirects to v0.2.4 (#14023)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-01-21 15:56:51 +02:00
Thibaut Patel
bb24177149 Added the option to filter events from the /members/events endpoint
refs https://github.com/TryGhost/Team/issues/1277

- Filter events using the usual `filter` property
- Fixed a bug that was in `members-api@4.3.0`
2022-01-21 14:56:36 +01:00
Fabien "egg" O'Carroll
ca2a8ba464 Restricted updating Subscription to archived Tier
refs https://github.com/TryGhost/Team/issues/1252

Archived tiers should be restricted from _any_ "new" subscriptions,
including existing ones. They are essentially disabled.
2022-01-21 14:11:46 +02:00
renovate[bot]
1b1abe3005
Update dependency @tryghost/members-api to v4.3.0 (#14013)
refs https://github.com/TryGhost/Team/issues/1277
refs https://github.com/TryGhost/Team/issues/1252

- Restrict creating new checkout session with archived Tiers
- Allowed event timeline to have additional filters passed

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Thibaut Patel <thibaut@ghost.org>
2022-01-21 13:43:08 +02:00
Renovate Bot
a43dd4fe60 Update dependency @tryghost/settings-path-manager to v0.1.3 2022-01-21 11:03:28 +00:00
Renovate Bot
d0507467ad Update dependency @tryghost/social-urls to v0.1.28 2022-01-21 10:33:50 +00:00
Renovate Bot
d0b27d45bf Update dependency @tryghost/color-utils to v0.1.6 2022-01-21 10:07:48 +00:00
Renovate Bot
dcc9a57f6a Update dependency @tryghost/helpers to v1.1.55 2022-01-21 10:07:37 +00:00
Renovate Bot
91f2416ef1 Update dependency @tryghost/string to v0.1.22 2022-01-21 10:07:18 +00:00
Renovate Bot
2b9847a91f Update dependency @tryghost/url-utils to v2.0.5 2022-01-21 10:07:07 +00:00
renovate[bot]
7c76c429b1
Update dependency @tryghost/members-importer to v0.4.1 (#14027)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-01-20 20:56:13 +02:00
renovate[bot]
b21e1426de
Update dependency @tryghost/members-stripe-service to v0.6.3 (#14030)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-01-20 20:54:54 +02:00
renovate[bot]
e855c2d342
Update dependency @tryghost/members-ssr to v1.0.18 (#14029)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-01-20 20:53:56 +02:00
renovate[bot]
d4bd7568bc
Update dependency @tryghost/members-offers to v0.10.5 (#14028)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-01-20 20:52:34 +02:00
renovate[bot]
8923726df2
Update dependency @tryghost/members-csv to v1.2.3 (#14026)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-01-20 20:52:10 +02:00
Fabien "egg" O'Carroll
ce0e1b8b0c Added initial support for archiving Tiers
refs https://github.com/TryGhost/Team/issues/1252

This allows us to archive and unarchive tiers, but does not implement
any of the background behaviour like modifying portal settings. Or
disabling archived tiers from being used.

The two packages now allow the `active` flag to be passed, and will
update that in the database.
2022-01-20 17:57:47 +02:00
Renovate Bot
8ad20a8c69
Update dependency eslint-plugin-ghost to v2.12.0 2022-01-20 14:30:08 +00:00
Renovate Bot
cd21cd5fe8 Update dependency @tryghost/security to v0.2.14 2022-01-20 14:28:46 +00:00
Renovate Bot
9a15966ffb Update dependency @tryghost/promise to v0.1.14 2022-01-20 14:01:20 +00:00
Renovate Bot
c857606137 Update dependency @tryghost/config-url-helpers to v0.1.4 2022-01-20 13:59:44 +00:00
Renovate Bot
fa49adda58 Update dependency @tryghost/image-transform to v1.0.27 2022-01-20 13:58:30 +00:00
Renovate Bot
d9a379e453 Update dependency @tryghost/errors to v1.2.1 2022-01-20 13:53:57 +00:00
Renovate Bot
ecb67a5763 Update dependency @tryghost/vhost-middleware to v1.0.20 2022-01-20 13:53:24 +00:00
Renovate Bot
da3d3fd814 Update dependency @tryghost/bootstrap-socket to v0.2.16 2022-01-20 13:32:45 +00:00
Renovate Bot
8be58c2566 Update dependency @tryghost/limit-service to v1.0.9 2022-01-20 13:31:13 +00:00
Renovate Bot
8bcb90300e Update dependency @tryghost/session-service to v0.1.37 2022-01-20 13:30:43 +00:00
Renovate Bot
952a00760b Update dependency @tryghost/package-json to v1.0.15 2022-01-20 13:30:26 +00:00
Renovate Bot
55daa556d4 Update dependency @tryghost/constants to v1.0.1 2022-01-20 13:29:57 +00:00
Renovate Bot
de7bc9ca9c Update dependency @tryghost/job-manager to v0.8.18 2022-01-20 13:28:55 +00:00
Renovate Bot
dd8100ad8b Update dependency @tryghost/adapter-manager to v0.2.27 2022-01-20 13:27:54 +00:00
Renovate Bot
2d4406ab10 Update dependency @tryghost/zip to v1.1.19 2022-01-20 13:27:35 +00:00
Renovate Bot
0202c93726 Update dependency @tryghost/minifier to v0.1.10 2022-01-20 13:26:46 +00:00
Renovate Bot
81b86b8c39 Update dependency @tryghost/mw-session-from-token to v0.1.27 2022-01-20 13:26:24 +00:00
Renovate Bot
2cb12c647a Update dependency supertest to v6.2.2 2022-01-20 12:25:02 +00:00
Renovate Bot
3fd7ce6179 Update dependency @tryghost/mw-error-handler to v0.1.2 2022-01-20 11:58:52 +00:00
Fabien "egg" O'Carroll
54bdef0d20 Fixed stripe webhook creation params
no-issue

We were missing default parameters for webhook creation which cause an
error to throw if we attempted to read from them. This bumps the members
& stripe packages to add default params.
2022-01-20 11:02:54 +02:00
Thibaut Patel
a1af064f79 Added three email delivery events to the member/event endpoint
refs https://github.com/TryGhost/Team/issues/1277

- The new events types are: `email_delivered_event`, `email_opened_event` and `email_failed_event`.
- This makes existing data accessible to the admin dashboard
2022-01-19 14:43:29 +01:00
Fabien 'egg' O'Carroll
a565da06b2
🐛 Fixed Offer Redemptions being over counted (#13988)
refs https://github.com/TryGhost/Team/issues/1257

Offer Redemptions were being overcounted due to the way we were updating
Stripe configuration for the Members service. We would create a new
instance of the members-api, which would have event handlers for
creating Offer Redemptions - by creating a new instance each time Stripe
config changed, we would overcount them.

Here we've pulled out Stripe related logic into the Stripe service, and
updated it internally - rather than creating a new instance. This means
that we've been able to remove all of the logic for re-instantiating the
members-api.

- Bumped members-api & stripe-service
- Removed reinstantiation of members-api
- Used stripe service to execute migrations
- Updated Stripe Service to handle webhooks & migrations
- Used webhook controller from stripe service
- Used disconnect method from stripe service
- Removed unused stripe dependency
- Removed Stripe webhook config from members-api
2022-01-18 17:56:47 +02:00
Daniel Lockyer
eb68e8d339 Added library for extracting database information
refs https://github.com/TryGhost/Toolbox/issues/175

- we're going to be making some changes in v5 wrt supported databases
- we needed a way of detecting the difference between MySQL 5 + 8,
  MariaDB etc
- I've created `@tryghost/database-info`, which is a small wrapper
  around `knex`, which returns this information
- this commit:
  - adds the library to Ghost
  - initializes the DB info library upon boot
  - updates the Admin API /config/ endpoint and UpdateCheck to return
    the new string - `mysql5`, `mysql8` etc
2022-01-18 09:31:08 +00:00
Renovate Bot
7466ab340c
Update dependency bson-objectid to v2.0.2 2022-01-18 00:57:08 +00:00
Rishabh
018c96413d Handled new free product type in importer and member api
refs https://github.com/TryGhost/Team/issues/1037

- updates `members-api` to handle new free product and `type` column
- updates `members-importer` to handle default product usage as we have both free and paid default products now
2022-01-17 23:10:58 +05:30
Renovate Bot
da1d178768
Update dependency mocha to v9.1.4 2022-01-14 21:15:42 +00:00
Daniel Lockyer
8df29f6574 v4.32.3 2022-01-14 16:00:28 +00:00
Renovate Bot
02e4aeccd9 Update dependency @tryghost/validator to v0.1.10 2022-01-14 10:32:46 +00:00
Fabien "egg" O'Carroll
297b1a929f Added "api" source for MembersSubscribeEvents
refs https://github.com/TryGhost/Team/issues/1275

This will allow us to determine members which were added via the Admin
API for use in spam prevention.
2022-01-14 12:28:35 +02:00
renovate[bot]
5037517aad
🐛 Support inline partial execution in children partials
refs https://github.com/TryGhost/Ghost/issues/13844
refs https://github.com/TryGhost/Team/issues/1274

- This enables using inline partials to create layouts in Ghost themes.
- The support for inline partials was dropped when moving away from Handlebars compilation and using AST traversing instead.
2022-01-14 11:17:13 +01:00
Renovate Bot
935fef79d6 Update dependency @tryghost/kg-default-cards to v5.15.12 2022-01-14 10:13:35 +00:00
Renovate Bot
8dcae5f686 Update dependency @tryghost/magic-link to v1.0.15 2022-01-14 10:11:40 +00:00
Renovate Bot
ab51f9b59a Update dependency @tryghost/tpl to v0.1.9 2022-01-14 10:11:19 +00:00
Renovate Bot
04e894eef2 Update dependency @tryghost/request to v0.1.11 2022-01-14 10:01:00 +00:00
Renovate Bot
9e2c81a612 Update dependency @tryghost/nodemailer to v0.3.9 2022-01-14 09:59:50 +00:00
Renovate Bot
2787b0cf32 Update dependency @tryghost/bookshelf-plugins to v0.3.6 2022-01-14 09:59:01 +00:00
Renovate Bot
570bf892fe Update dependency @tryghost/metrics to v1.0.2 2022-01-14 09:57:39 +00:00
Renovate Bot
e0e1316d3d Update dependency @tryghost/version to v0.1.8 2022-01-14 09:57:18 +00:00
Renovate Bot
7614d79284 Update dependency @tryghost/html-to-mobiledoc to v1.8.3 2022-01-14 09:40:50 +00:00
Renovate Bot
a7b4a30a5e Update dependency @tryghost/express-dynamic-redirects to v0.2.3 2022-01-14 09:38:57 +00:00
Renovate Bot
2cae1ec585 Update dependency @tryghost/debug to v0.1.10 2022-01-14 09:36:23 +00:00
Renovate Bot
280642baef Update dependency @tryghost/logging to v2.0.1 2022-01-14 09:36:14 +00:00
Renovate Bot
b779aca831 Update dependency @tryghost/root-utils to v0.3.8 2022-01-14 09:35:59 +00:00
Thibaut Patel
8ef46f2291 🐛 Restored support for inline partials and dynamic partials
refs TryGhost/Team#1242
refs TryGhost/Team#1266

- Both inline and dynamic partials haven't been supported since gscan v4.
- You can now use [inline partials](https://handlebarsjs.com/guide/partials.html#inline-partials) in themes.
- One limitation is that the inline partials aren't available in the execution of other partials.
- You can now use [dynamic partials](https://handlebarsjs.com/guide/partials.html#dynamic-partials) in themes.
- When using dynamic partials, you can only use them as a partial block so that there is a fallback.
- Dynamic partial defined inline like `{{> (dynamicPartial) }}` are considered invalid by gscan to make sure a fallback is present.
2022-01-12 16:41:34 +01:00
Thibaut Patel
222e7a39fc Revert "Restored support for inline partials and dynamic partials"
This reverts commit 25002e99cf.
2022-01-12 16:40:34 +01:00
renovate[bot]
25002e99cf
🐛 Restored support for inline partials and dynamic partials
refs https://github.com/TryGhost/Team/issues/1242
refs https://github.com/TryGhost/Team/issues/1266
2022-01-12 16:31:28 +01:00
Daniel Lockyer
dbd6e31fc0
Merged v4.32.2 into main
v4.32.2
2022-01-12 10:02:33 +00:00
Daniel Lockyer
61d85330a5 v4.32.2 2022-01-12 10:00:20 +00:00
Fabien "egg" O'Carroll
90b95f79b9 🐛 Fixed imports ignoring subscribed_to_emails flag
no-issue

Due to a bug in the members-csv package we were losing information about
the subscribed_to_emails flag and effectively ignoring it, resulting in
all members beign imported with the default value of true.
2022-01-12 11:33:49 +02:00
Fabien 'egg' O'Carroll
0aec18deee Stopped reconfiguring MemberAPI on settings change (#13943)
refs https://github.com/TryGhost/Team/issues/1257
refs https://github.com/TryGhost/Team/issues/1261

Certain event listens are being added twice due to the way we "reload"
the MembersAPI which can cause duplicate counts of Offer Redemptions.

Rather than creating multiple instances of the MembersAPI we're moving
toward being able to reload the config in place or passing getters for
the config which will allows us to use the MembersAPI as a singleton,
and remove any bugs which come from creating multiple instances.

This also fixes a bug with the allowSelfSignup config not refreshing when
the portal_plans setting was changed.
2022-01-12 11:31:59 +02:00
Renovate Bot
0477bd30dd Update dependency supertest to v6.2.1 2022-01-12 08:31:06 +00:00
Fabien "egg" O'Carroll
5c13726e06 🐛 Fixed imports ignoring subscribed_to_emails flag
no-issue

Due to a bug in the members-csv package we were losing information about
the subscribed_to_emails flag and effectively ignoring it, resulting in
all members beign imported with the default value of true.
2022-01-11 16:34:29 +02:00
renovate[bot]
b63d5f02ff
Update dependency @tryghost/members-importer to v0.3.6 (#13947)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-01-11 11:13:49 +02:00
renovate[bot]
ec5be213a4
Update dependency @tryghost/members-ssr to v1.0.17 (#13949)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-01-11 11:13:35 +02:00
Renovate Bot
c1b6614054 Update dependency supertest to v6.2.0 2022-01-11 09:05:41 +00:00
Renovate Bot
2aa908c3fa Update dependency nock to v13.2.2 2022-01-11 09:05:19 +00:00
Renovate Bot
735fbc3725 Update dependency image-size to v1.0.1 2022-01-11 09:04:43 +00:00
renovate[bot]
2a7cb1036d
Update dependency @tryghost/members-offers to v0.10.4 (#13948)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-01-11 10:28:55 +02:00
renovate[bot]
1c13cbe6ca
Update dependency @tryghost/members-csv to v1.2.1 (#13946)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-01-11 10:28:36 +02:00
Fabien 'egg' O'Carroll
68127cf4d4
Stopped reconfiguring MemberAPI on settings change (#13943)
refs https://github.com/TryGhost/Team/issues/1257
refs https://github.com/TryGhost/Team/issues/1261

Certain event listens are being added twice due to the way we "reload"
the MembersAPI which can cause duplicate counts of Offer Redemptions.

Rather than creating multiple instances of the MembersAPI we're moving
toward being able to reload the config in place or passing getters for
the config which will allows us to use the MembersAPI as a singleton,
and remove any bugs which come from creating multiple instances.

This also fixes a bug with the allowSelfSignup config not refreshing when
the portal_plans setting was changed.
2022-01-10 18:21:09 +02:00
Renovate Bot
4a3af368c5 Update dependency cssnano to v5.0.15 2022-01-10 11:16:15 +00:00
renovate[bot]
ddf7bf313e
Update dependency @tryghost/kg-markdown-html-renderer to v5.1.1 (#13936)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-01-10 09:46:58 +00:00
renovate[bot]
ec7b4b8283
Update dependency @tryghost/kg-default-atoms to v3.1.1 (#13934)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-01-10 09:46:19 +00:00
renovate[bot]
22a7ff6db6
Update dependency @tryghost/kg-card-factory to v3.1.1 (#13933)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-01-10 09:44:01 +00:00
renovate[bot]
6a2eae1376
🐛 Fixed missing spacing after blockquote sections in emails viewed on iPads with iOS Mail (#13937)
refs https://github.com/TryGhost/Team/issues/1268

- bumps `@tryghost/kg-mobiledoc-html-renderer` which changes email rendering for rich-text blockquote sections so the contents is wrapped in `<p>`. E.g. `<blockquote>Text</blockquote>` becomes `<blockquote><p>Text</p></blockquote>`
- in iOS Mail which has hardcoded/un-overridable `blockquote` styles that remove all margins it lets the `p` margins take effect to add back the missing vertical spacing. The change had no noticeable effect on other clients when testing

Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-01-10 09:43:06 +00:00
Daniel Lockyer
bae53c8044 v4.32.1 2022-01-07 16:00:35 +00:00
Renovate Bot
9d19472c36 Update dependency expect to v27.4.6 2022-01-06 10:06:32 +00:00
renovate[bot]
139a0713a5
Update dependency gscan to v4.20.2 (#13928)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-01-05 14:32:02 +00:00
Renovate Bot
9427886610
Update metascraper to v5.25.7 2022-01-04 18:01:36 +00:00
Kevin Ansfield
ebae98f538 Removed membersAutoLogin GA labs flag
refs https://github.com/TryGhost/Team/issues/1258

- members auto login after Stripe checkout feature is GA so labs flag is no longer necessary
- bumps `@tryghost/members-api` to version that does not use the labs flag
2022-01-04 14:54:11 +00:00
Renovate Bot
bafc0981a9 Update dependency cssnano to v5.0.14 2022-01-03 08:30:07 +00:00
Renovate Bot
2ee061bb50 Update dependency c8 to v7.11.0 2022-01-03 08:29:36 +00:00
Renovate Bot
cb59fa0d3b
Update dependency luxon to v2.3.0 2022-01-03 00:30:52 +00:00
Renovate Bot
202b38ea98
Update metascraper to v5.25.6 2021-12-28 19:32:58 +00:00
Daniel Lockyer
684a0bcd1b v4.32.0 2021-12-17 11:32:33 +00:00
Daniel Lockyer
a35be11bff
Added condition to main heading in header card
refs https://github.com/TryGhost/Team/issues/1253
refs b3ca368d24

- this commit bumps `@tryghost/kg-default-cards` to add a condition for
  the heading in the header card
2021-12-17 09:20:36 +01:00
Renovate Bot
2a018405b9 Update dependency passport to v0.5.2 2021-12-17 08:00:58 +01:00
Renovate Bot
f09833c6e9
Update dependency express to v4.17.2 2021-12-17 04:04:16 +00:00
Thibaut Patel
9f0e6cc26c Bumped html-to-mobiledoc
refs https://github.com/TryGhost/Koenig/pull/299
2021-12-16 22:14:52 +01:00
Thibaut Patel
1e9a2adf20 Updated the header card
refs https://github.com/TryGhost/Team/issues/1253
2021-12-16 19:16:34 +01:00
Thibaut Patel
4984223bf2 Renamed the header styles
refs https://github.com/TryGhost/Team/issues/1253

- The naming is easier to understand for theme developers
2021-12-16 18:22:16 +01:00
Thibaut Patel
2a97b2ab24 Added the header card parser plugin
refs https://github.com/TryGhost/Team/issues/1253
2021-12-16 17:45:03 +01:00
Thibaut Patel
e5ae8720ae Updated the header card
refs https://github.com/TryGhost/Team/issues/1253

- Applied the design simplification in the frontend rendering
2021-12-16 15:28:34 +01:00
Fabien 'egg' O'Carroll
0d457f231b
🐛Fixed 500 errors when signing up with invalid email (#13901)
refs https://github.com/TryGhost/Team/issues/1259

- We don't correctly handle Nodemailer's EENVELOPE error, which is thrown when Mailgun returns an error due to an invalid email recipient
- We don't want to default to returning a 400 for all mail exceptions because this would mask genuine errors - for example if Mailgun is unavailable
- We should catch `code: EENVELOPE` errors and return a 400 response
2021-12-16 12:32:15 +00:00
Daniel Lockyer
18a58e6cb0 v4.31.0 2021-12-16 09:33:21 +00:00
Renovate Bot
ceb66c1d85 Update dependency @tryghost/session-service to v0.1.36 2021-12-16 10:20:13 +01:00
Daniel Lockyer
0d5090bfcb
Added 'download' property to file link
refs https://github.com/TryGhost/Team/issues/1231
refs a7ef81bf95

- the referenced commit adds the `download` property to File cards
- this commit bumps the `@tryghost/kg-default-cards` package to include
  that change
2021-12-16 10:14:29 +01:00
Renovate Bot
acb3869fb5 Update dependency cssnano to v5.0.13 2021-12-16 08:58:41 +01:00
Renovate Bot
6cb2b25253 Update dependency @tryghost/image-transform to v1.0.26 2021-12-16 08:57:07 +01:00
Renovate Bot
12c528cf89 Update dependency @tryghost/limit-service to v1.0.8 2021-12-16 08:56:53 +01:00
Renovate Bot
af204fca99 Update dependency @tryghost/minifier to v0.1.9 2021-12-16 08:56:46 +01:00
Renovate Bot
66385729ed Update dependency @tryghost/adapter-manager to v0.2.26 2021-12-16 08:56:40 +01:00
Renovate Bot
9dbad381d6 Update dependency @tryghost/package-json to v1.0.14 2021-12-16 08:56:26 +01:00
Renovate Bot
b4a74cee5b Update dependency passport to v0.5.1 2021-12-16 08:55:51 +01:00
Rishabh
c3e2eddc86 Added css rules for file card
refs https://github.com/TryGhost/Team/issues/1231
2021-12-16 00:44:09 +05:30
Rishabh
f64cf70cc9 Refined frontend rendering for file cards
refs https://github.com/TryGhost/Team/issues/1231
2021-12-16 00:32:09 +05:30
Fabien egg O'Carroll
bdfce42413 Updated @tryghost/html-to-mobiledoc
no-issue

This includes updates to the html parsers for creating mobiledoc cards
and now works for the before/after cards, as well as fixes for
classnames of existing cards
2021-12-15 20:16:19 +02:00
Fabien egg O'Carroll
9db1c843c3 Updated Before/After card markup
refs https://github.com/TryGhost/Team/issues/1249

This removes some superfluous markup as well as renaming the slider
handle classname
2021-12-15 20:11:16 +02:00
Thibaut Patel
9198e2b0af Updated the headers card
refs https://github.com/TryGhost/Team/issues/1253

- Added configurable width
- Fixed css class names
2021-12-15 18:35:19 +01:00
Thibaut Patel
3aa60e1e00 Fixed the header card rendering
refs https://github.com/TryGhost/Team/issues/1253

- the card was failing to render without a subheader
- the subheader is optional so it needs to be rendering in that case
2021-12-15 16:19:55 +01:00
Thibaut Patel
49170e7ff2 Added a first version of the header card frontend rendering
refs https://github.com/TryGhost/Team/issues/1253

- Based on the editor card, the css isn't correct yet as it has undefined css variables
2021-12-15 14:46:00 +01:00
Fabien egg O'Carroll
a21a436f98 Added handle for before/after slider
refs https://github.com/TryGhost/Team/issues/1249

Using an input as the slider handle meant setting a width of 100% + px,
which could push width over the size of the screen - not good! This
takes the same approach as the CodePen linked below and uses a separate
element, which has the position of it updated by JS in realtime.

https://codepen.io/josephwong2004/pen/NWRGxdR
2021-12-15 15:16:29 +02:00
Daniel Lockyer
da586b3705 v4.30.1 2021-12-15 13:10:47 +00:00
Daniel Lockyer
1d702ca470 v4.30.0 2021-12-15 12:49:15 +00:00
Peter Zimon
67d0059166 Updated file card markup
- @tryghost/kg-default-cards@5.14.7
2021-12-15 13:00:50 +01:00
Fabien egg O'Carroll
a1df1a8166 Updated gscan to check for before/after card CSS
refs https://github.com/TryGhost/Team/issues/1249

This ensures that themes which choose to omit default styles for
before/after card include their own.
2021-12-15 12:38:36 +02:00
Rishabh
55ec90f5c9 Fixed inline controls for video card player
refs https://github.com/TryGhost/Team/issues/1229
2021-12-15 13:20:34 +05:30
Rishabh
b9b2efa25c Added inline attribute for video card loop behavior
refs https://github.com/TryGhost/Team/issues/1229

Safari/iOS needs `playsinline` attribute on video element to render video player without its own controls
2021-12-15 12:45:45 +05:30
Rishabh
8b381a1259 Updated gscan rules for video card
refs https://github.com/TryGhost/Team/issues/1229
2021-12-15 12:11:44 +05:30
Rishabh
4a31a9e847 Added refinements for video card
refs https://github.com/TryGhost/Team/issues/1229
2021-12-15 00:55:00 +05:30
Sam Lord
97c68dd388
Replace error handler middleware with @tryghost/mw-error-handler (#13879)
refs: https://github.com/TryGhost/Toolbox/issues/137

Extract error handling middleware and replace with a package.
2021-12-14 15:18:46 +00:00
Renovate Bot
d2737d35c4 Update dependency @tryghost/image-transform to v1.0.25 2021-12-14 13:51:28 +01:00
Renovate Bot
2e04e01eaf Update dependency @tryghost/minifier to v0.1.8 2021-12-14 13:51:09 +01:00
Renovate Bot
fd43f4aef2 Update dependency @tryghost/session-service to v0.1.35 2021-12-14 13:50:17 +01:00
Renovate Bot
82c404d20c Update dependency @tryghost/limit-service to v1.0.7 2021-12-14 13:49:56 +01:00
Renovate Bot
39ac5dbc8a Update dependency @tryghost/adapter-manager to v0.2.25 2021-12-14 13:49:37 +01:00
Renovate Bot
9f754a0a6b Update dependency @tryghost/package-json to v1.0.13 2021-12-14 13:49:15 +01:00
Sam Lord
76f06fae3c
Revert "Revert "Extract logging from DI patterns, only use @tryghost/logging package"" (#13884)
This reverts commit fa8c3ebe99.

Reverting the revert, which will allow us to fully switch to @tryghost/logging v2.
2021-12-14 11:22:39 +00:00
Renovate Bot
c67be15fe8 Update dependency postcss to v8.4.5 2021-12-14 08:44:43 +01:00
Daniel Lockyer
bedb73202f v4.29.0 2021-12-14 07:25:03 +00:00
Daniel Lockyer
c4a0b388ae v4.28.0 2021-12-13 16:58:05 +00:00
Thibaut Patel
8b03c97b1e Added gscan rules to validate the product card css
refs https://github.com/TryGhost/Team/issues/1245

- Ensures a warning is displayed when the theme doesn't include the default product card css and also doesn't style style the product card.
2021-12-13 16:29:04 +01:00
Thibaut Patel
2800f538bc Updated the product card classes
refs https://github.com/TryGhost/Team/issues/1245

- Removes dependency from the product card css to other cards' css
2021-12-13 16:13:57 +01:00
Daniel Lockyer
878c9bc944 Added resolution to pin @tryghost/logging to v2
no issue

- we've been battling an issue where we have multiple versions of the
  logging library running, which causes a problem with file rotation
- this package adds a resolution to v2 so we force the use of a single
  version within Ghost
2021-12-13 15:46:32 +01:00
renovate[bot]
f33250888e
Update dependency @tryghost/members-api to v2.8.6 (#13849)
no-issue

Refactor & fixes from @sam-lord 

Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-12-13 15:52:31 +02:00
Fabien 'egg' O'Carroll
75c198349c
Added Before/After card rendering capabilities
refs https://github.com/TryGhost/Team/issues/1249

 - Initial version of rendering for the Before/After card from moi
 - Updates to the audio cards class names from Sanne
 - Fixes to the audio card thumbnail in emails from Sanne
 - Refactor of product card rendering from Thibaut
2021-12-13 15:31:14 +02:00
Rishabh
f237879251 Updated loop behavior for video player on theme
refs https://github.com/TryGhost/Team/issues/1229
2021-12-13 17:31:57 +05:30
renovate[bot]
7487d6e2e7
🐛 Allowed again the use of @partial-block in templates
refs https://github.com/TryGhost/gscan/issues/417

- The `@partial-block` handlebars directive was allowed in previous gscan versions until a regression
- Always allow using `@partial-block` as it never breaks the handlebars rendering

Co-authored-by:
- Thibaut Patel @tpatel 
- Renovate Bot <bot@renovateapp.com>
2021-12-13 12:49:50 +01:00
Rishabh
4205951f7a Added accent background color for default audio thumbnail
refs https://github.com/TryGhost/Team/issues/1230
2021-12-13 16:53:41 +05:30
Rishabh
58cdba41fa Added custom controls html for video player
refs https://github.com/TryGhost/Team/issues/1229
2021-12-13 13:29:56 +05:30
Renovate Bot
1efc403d9c
Update dependency luxon to v2.2.0 2021-12-13 02:19:05 +00:00
Renovate Bot
1c4b151cfc
Update dependency body-parser to v1.19.1 2021-12-10 20:24:28 +00:00
Kevin Ansfield
91393fcf0b Improved video thumbnail rendering and fixed loop behavior
refs https://github.com/TryGhost/Team/issues/1229

- bumped `@tryghost/kg-default-cards` with improved handling of thumbnail aspect ratio and a bugfix for the `loop` attribute on the `<video>` element
2021-12-10 18:37:55 +00:00
Renovate Bot
83a80d969b
Update dependency @sentry/node to v6.16.1 2021-12-10 16:01:48 +00:00
Daniel Lockyer
babc9ae2ee v4.27.2 2021-12-10 16:00:27 +00:00
Rishabh
3f70e3f204 Refined audio card rendering on frontend
refs https://github.com/TryGhost/Team/issues/1230

- updates payload attributes set by audio card in frontend template
- updates use of duration and post url link on audio card in email template
- updates parser plugin for audio card
- updates tests
2021-12-10 01:36:31 +05:30
Naz
5a150cc3b6 Removed duplicate snapshot initialization code
refs https://github.com/TryGhost/Toolbox/issues/158

- Allows for much smaller amount of code to configure a test to work with chai-jest-snapshots. They now work automatically for all regression tests and could be enabled for other suites by adding the "--require=./test/utils/snapshots.js" parameter in respective test:* package script
- Regenerated snapshot for authentication test as the naming structure
changed a little with the snapshot metadata being taken on a higher
level in the test (uses the suite name instead of a specific describe it
used to be called from)
2021-12-10 06:37:31 +13:00
Naz
3dfab7d682 Integrated chai-jest-snapshot
refs https://github.com/TryGhost/Toolbox/issues/129

- Minimal version of chai-jest-snapshot with property matcher support. It runs off the forked version of https://github.com/suchipi/chai-jest-snapshot
2021-12-09 22:20:54 +13:00
Renovate Bot
726ba687cd
Update dependency sanitize-html to v2.6.1 2021-12-08 19:11:06 +00:00
Kevin Ansfield
d4c110a55b Added first pass of video card rendering
refs https://github.com/TryGhost/Team/issues/1229

- bumped @tryghost/kg-default-cards that contains initial video card rendering
- added video card CSS file with basic style that prevents video element rendering larger than the content width (similar to default image styles in most themes)
2021-12-08 18:01:44 +00:00
Daniel Lockyer
b7c17ca439 v4.27.1 2021-12-08 16:02:08 +00:00
Daniel Lockyer
daed6f53fb v4.27.0 2021-12-08 15:38:07 +00:00
Renovate Bot
dd63acf95c Update dependency @sentry/node to v6.16.0 2021-12-08 14:43:05 +00:00
Daniel Lockyer
fa8c3ebe99 Revert "Extract logging from DI patterns, only use @tryghost/logging package"
This reverts commit 97451a93cb.
2021-12-08 14:28:41 +00:00
Peter Zimon
3a877253e6 Updated Twitter email card styles
Fixed media (image or video) spacing for Twitter embeds in emails on mobile sizes.

- bumped `@tryghost/kg-default-cards` to a fixed version
2021-12-08 14:22:53 +01:00
Kevin Ansfield
8e1a0e1f02 Added theme checks for alternative blockquote CSS class
refs https://github.com/TryGhost/Team/issues/1239

- bumped gscan to include a checks for `.kg-blockquote-alt` when the built-in `blockquote` CSS is disabled
2021-12-08 09:02:05 +00:00
Renovate Bot
7924a52cc2
Update metascraper to v5.25.5 2021-12-07 22:00:35 +00:00
renovate[bot]
c4e5e84ce8
Added the product card parser plugin
refs https://github.com/TryGhost/Team/issues/1245
2021-12-07 22:58:41 +01:00
renovate[bot]
78c4422615
Updated the product card rendering
refs https://github.com/TryGhost/Team/issues/1245

- Updated the markup to make it easier to style the card
2021-12-07 22:57:49 +01:00
Renovate Bot
1dd012d9f4
Update dependency multer to v1.4.4 2021-12-07 17:04:32 +00:00
Peter Zimon
990e7640e8 Refined Twitter embed card styles
Twitter cards in emails needed to be updated to look and work closer to an actual tweet.

- bumped `@tryghost/kg-default-cards` to a fixed version
2021-12-07 18:01:23 +01:00
renovate[bot]
16a73f7017
Added a first version of the product card frontend rendering
refs https://github.com/TryGhost/Team/issues/1233

- renders the card in the same way the Koenig editor does
2021-12-07 17:23:05 +01:00
Sanne de Vries
31cadeaad0 Updated audio card frontend rendering
Refs https://github.com/TryGhost/Team/issues/1230
2021-12-07 16:02:06 +00:00
Daniel Lockyer
0d8bc06fb9
Merged v4.26.1 into main
v4.26.1
2021-12-07 09:36:54 +00:00
Daniel Lockyer
dd5c5b7551 v4.26.1 2021-12-07 09:35:14 +00:00
Fabien egg O'Carroll
2a1eb3de88 Improved rendering for twitter newsletter embeds
refs https://github.com/TryGhost/Team/issues/1001

This also adds the missing alpha flag so that we can release this when
it's ready.
2021-12-07 11:23:54 +02:00
Sam Lord
97451a93cb
Extract logging from DI patterns, only use @tryghost/logging package
refs: https://github.com/TryGhost/Toolbox/issues/146

Switched to @tryghost/logging instead of passing around the library. The main sticking points of this change are jobs. When jobs are launched we don't want them to use a separate @tryghost/logging instance because they would start parallel rotation jobs. @tryghost/logging v2.x passes all logs to the parent process if run in a child process, so that we can use the same patterns in jobs and the rest of the codebase.
2021-12-06 18:00:55 +00:00
Daniel Lockyer
5d191e90b9 v4.26.0 2021-12-06 13:29:21 +00:00
Rishabh
75b3ca80a0 Fixed toggle card showing style values in excerpt
refs https://github.com/TryGhost/Team/issues/1209
2021-12-06 17:40:22 +05:30
Kevin Ansfield
1f06cf7d2c Removed kg-width-wide class from alternative blockquote
refs https://github.com/TryGhost/Team/issues/1239

- bumped the mobiledoc-to-html renderer so it doesn't add the `kg-width-wide` class when rendering `aside` sections to `<blockquote>`
2021-12-06 10:22:54 +00:00
Rishabh
2aa353a1a0 Added custom audio player UI for audio card
refs https://github.com/TryGhost/Team/issues/1230

- adds custom css and js for custom audio card player
- bumps `kg-default-cards` to add custom audio player ui for theme
2021-12-06 14:24:41 +05:30
djordje vlaisavljevic
641996e5cd Updated default toggle card styles
refs https://github.com/TryGhost/Team/issues/1209
2021-12-03 18:07:46 +01:00
Daniel Lockyer
eaacdc761e v4.25.1 2021-12-03 16:00:37 +00:00
Renovate Bot
611d4e7155 Update dependency @tryghost/email-analytics-service to v1.0.5 2021-12-03 10:35:36 +00:00
renovate[bot]
917c39254d
Added CSS rules for new toggle card
refs https://github.com/TryGhost/Team/issues/1209
2021-12-03 15:35:52 +05:30
Renovate Bot
c77ce44380 Update dependency @tryghost/logging to v1.0.2 2021-12-03 10:04:55 +00:00
Renovate Bot
649b47d7ab Update dependency @tryghost/package-json to v1.0.12 2021-12-03 10:04:04 +00:00
Renovate Bot
04469b9ab3 Update dependency @tryghost/minifier to v0.1.7 2021-12-03 10:02:40 +00:00
Renovate Bot
4118755b07 Update dependency @tryghost/request to v0.1.10 2021-12-03 10:02:33 +00:00
Renovate Bot
a23476cc09 Update dependency @tryghost/session-service to v0.1.34 2021-12-03 10:02:25 +00:00
Renovate Bot
0f5d2fece2 Update dependency @tryghost/html-to-mobiledoc to v1.4.1 2021-12-03 09:53:32 +00:00
Renovate Bot
2e7cf138fc Update dependency @tryghost/email-analytics-provider-mailgun to v1.0.6 2021-12-03 09:51:26 +00:00
Renovate Bot
cb628c81ce Update dependency @tryghost/job-manager to v0.8.16 2021-12-03 09:50:49 +00:00
Renovate Bot
d19b42049c Update dependency @tryghost/limit-service to v1.0.6 2021-12-03 09:13:19 +00:00
Renovate Bot
c5beace311 Update dependency @tryghost/adapter-manager to v0.2.24 2021-12-03 09:11:03 +00:00
Renovate Bot
976712606e Update dependency @tryghost/bootstrap-socket to v0.2.14 2021-12-03 09:10:57 +00:00
Renovate Bot
85941b2f80 Update dependency @tryghost/image-transform to v1.0.24 2021-12-03 09:10:51 +00:00
Renovate Bot
2910fde12a Update dependency @tryghost/members-ssr to v1.0.16 2021-12-03 10:29:01 +02:00
Renovate Bot
6fed677269 Update dependency @tryghost/members-api to v2.8.4 2021-12-03 10:27:40 +02:00
Rishabh
6fdec9cf54 Updated url transforms for toggle card
refs https://github.com/TryGhost/Team/issues/1209
2021-12-03 01:17:08 +05:30
Rishabh
a1c1a62e50 Added basic theme UI for audio cards
refs https://github.com/TryGhost/Team/issues/1230
2021-12-02 15:23:36 +05:30
Renovate Bot
894e1049fe
Update dependency eslint-plugin-ghost to v2.11.0 2021-12-01 20:17:05 +00:00
Renovate Bot
d7ac48c69c
Update metascraper to v5.25.4 2021-12-01 18:54:11 +00:00
Fabien egg O'Carroll
337f1bacc3 🐛 Fixed 500 errors for Stripe webhooks
refs https://github.com/TryGhost/Team/issues/789

We are still having issues with duplicate subscriptiosn being inserted
and are unable to determine why. We are now catching these DB errors and
responding with a 409 Conflict rather than 500 Internal Server Error.

This buys us some time to solve the underlying problem, whilst not
alerting on-call engineers.
2021-12-01 20:49:49 +02:00
Renovate Bot
a41d6e9a5e Update dependency @tryghost/job-manager to v0.8.15 2021-12-01 17:56:11 +00:00
Renovate Bot
1cfd873163 Update dependency @tryghost/nodemailer to v0.3.8 2021-12-01 17:56:00 +00:00
Renovate Bot
ceb93d00f4 Update dependency @tryghost/validator to v0.1.9 2021-12-01 17:55:46 +00:00
Renovate Bot
1bcec67ca2 Update dependency @tryghost/bookshelf-plugins to v0.3.5 2021-12-01 17:09:03 +00:00
Renovate Bot
af84ecae2d Update dependency @tryghost/minifier to v0.1.6 2021-12-01 17:08:42 +00:00
Renovate Bot
b6bbd607b4 Update dependency @tryghost/limit-service to v1.0.5 2021-12-01 17:08:11 +00:00
Renovate Bot
4505a150c2 Update dependency @tryghost/image-transform to v1.0.23 2021-12-01 17:07:47 +00:00
Renovate Bot
9def771db6 Update dependency @tryghost/adapter-manager to v0.2.23 2021-12-01 17:07:37 +00:00
Renovate Bot
286ccc586d Update dependency @tryghost/package-json to v1.0.11 2021-12-01 17:07:19 +00:00
Renovate Bot
e3ed6ddd07 Update dependency @tryghost/session-service to v0.1.33 2021-12-01 17:07:09 +00:00
Daniel Lockyer
8814f7a638
Merged v4.25.0 into main
v4.25.0
2021-12-01 16:04:36 +00:00
Daniel Lockyer
317382ebc2 v4.25.0 2021-12-01 15:49:29 +00:00
Thibaut Patel
2da2c99e86 Updated callout card css classes
no refs

- Updated the css classes from `kg-card-callout*` to `kg-callout-card*` for the callout card. This improves consistency with the other cards' css.
2021-12-01 16:48:42 +01:00
Fabien egg O'Carroll
3a263b08eb 🐛 Fixed Member imports overriding missing columns
refs https://github.com/TryGhost/Team/issues/1202

We were storing all possible columns for a member, rather than the ones
sent up in the CSV - this was causing updates to existing members to
have their data removed. This fix means that we only store the columns
that were sent up in the CSV - so that missing columns are not affected.
2021-12-01 17:19:18 +02:00
Kevin Ansfield
fd28218a40 Added theme CSS checks for button and nft cards
no issue

- bumps `gscan` with additional checks and a correction to error messages for missing CSS
2021-12-01 15:12:00 +00:00
Renovate Bot
5d9bd6f441 Update dependency @tryghost/express-dynamic-redirects to v0.2.2 2021-12-02 04:05:51 +13:00
Rishabh
b1b0657959 🐛 Fixed 500 webhook errors for subscription with multiple prices
closes TryGhost/Team#1238

- previously returned 500 errors when a subscription had invalid number of prices due to external tampering on Stripe directly
- instead now returns 400 Bad Request error when subscriptions don't have right number of prices
2021-12-01 20:29:25 +05:30
Sam Lord
18b8eddd0d Added linting for use of @tryghost/errors
refs: https://github.com/TryGhost/Toolbox/issues/147
Errors in @tryghost/errors rely on being called with an object (with a `message` member) rather than with a string.
2021-12-01 11:22:21 +00:00
Fabien egg O'Carroll
5e0374cfde Used new paid signup email when auto-login is enabled
refs https://github.com/TryGhost/Team/issues/1067
refs https://github.com/TryGhost/Ghost/commit/579b34434

This is behind the feature flag so that it can be tested & checked by
product before rolling out.
2021-12-01 13:19:18 +02:00
Sam Lord
2887e416da
Switch to @tryghost/errors from ignition errors package (#13807)
refs: TryGhost/Toolbox#147

* Replaces all references to isIgnitionError with isGhostError
* Switches use of GhostError to InternalServerError - as GhostError is no longer public
There are places where InternalServerError is not the valid error, and new errors should be added to the @tryghost/errors package to ensure that we can use semantically correct errors in those cases.
2021-12-01 10:22:01 +00:00
Thibaut Patel
8364ef80fe Updated a gscan custom setting rule description
no refs

- In the custom theme settings, the `color` default error was saying `null` and empty string values were allowed. They weren't. The description is now fixed
2021-12-01 10:03:20 +01:00
Fabien egg O'Carroll
c55a138a58 Removed invalid subscriptions from BREAD API
refs https://github.com/TryGhost/Team/issues/1243

When invalid subscriptions without any price data are included in the
API, we are faced with errors due to the data being in an undefined
state. This updates the API to not respond with these invalid
subscriptions.
2021-12-01 11:00:01 +02:00
Fabien egg O'Carroll
e6856f6ac6 Initial custom embed provider for Twitter
refs https://github.com/TryGhost/Team/issues/1001

We fall back to existing behaviour if no API key is present, or if there
is an error communicating with the Twitter API. We're also currently
requesting all the data, which will be thinned down once we understand
what we need.

This also includes a custom renderer for embeds of type "twitter" which
will be used to output the custom HTML for emails
2021-11-30 12:58:25 +02:00
Renovate Bot
f66800c92e Update CSS preprocessors 2021-11-30 09:41:40 +01:00
Sam Lord
a21b91cc71 Added lint rules for migrations
refs: https://github.com/TryGhost/Toolbox/issues/105

Lint rules prevent:

* Invalid naming conventions for new migrations
* Loop constructs in migrations - these should be used with caution
and are therefore a warning rule, use `// eslint-disable-next-line
no-restricted-syntax` to prevent this rule from firing where a loop is
required
* Returing within a loop - this is usually meant to be a
continue/break
* Multiple joins - these can be badly performing migrations, so should
be treated with caution, disable the rule for the line if the risk is
understood / the migration cannot be written without it
2021-11-29 16:21:43 +00:00
Kevin Ansfield
fedbfb3c67 Added alt-style blockquote support when creating posts using HTML
refs https://github.com/TryGhost/Team/issues/1239

- bumps `@tryghost/html-to-mobiledoc` that uses a new parser plugin for transforming `<blockquote class="kg-blockquote-alt">` to an `aside` section in mobiledoc as that's what we use as a workaround for storing alternative blockquote style
2021-11-29 11:43:53 +00:00
Kevin Ansfield
409fe5dd18 Added rendering of alternative style blockquotes
refs https://github.com/TryGhost/Team/issues/1239

- bumps `@tryghost/kg-mobiledoc-html-renderer` which changes rendering of previously-unused `<aside>` sections as `<blockquote class="kg-blockquote-alt kg-width-wide">`
2021-11-29 10:04:25 +00:00
Daniel Lockyer
561c84b9fa v4.24.0 2021-11-26 16:00:26 +00:00
Renovate Bot
59f6521f19
Update dependency eslint-plugin-ghost to v2.8.0 2021-11-25 17:21:43 +00:00
Thibaut Patel
3a9b70412a Added callout card css warning to gscan
refs https://github.com/TryGhost/Team/issues/1206

- This add a warning when the `card_asset` config is set so that Ghost doesn't include the callout card css AND the callout card css isn't in the theme
- The update also contains a fix to correctly detect partials named `fill`
- The update also improves the error content when gscan finds an unkown partial
2021-11-25 16:57:07 +01:00
Daniel Lockyer
d92eebd74e
Merged v4.23.0 into main
v4.23.0
2021-11-25 12:18:12 +01:00
Daniel Lockyer
0fe59026d0 v4.23.0 2021-11-25 11:16:29 +00:00
Fabien O'Carroll
9730081590 🐛 Restricted Offer name to 40 characters
refs https://github.com/TryGhost/Team/issues/1236

We want to ensure that Offers share a name with the correspondent coupon
in Stripe, which have a max length of 40 characters, so we are applying
the same restriction to Offers.
2021-11-25 12:57:42 +02:00
Daniel Lockyer
15d5905549
🐛 Fixed intermittent failures with embedding
refs https://github.com/TryGhost/Team/issues/1235

- we are seeing `oembed-parser` 1.5.2 have intermittent issues when
  fetching oembed data
- we're not sure of the reason but reverting the dependency to 1.4.9 seems to fix
  the issue
- this commit reverted the bump in Ghost and adds it to Renovate's ignore
  list so it isn't automatically bumped in the future
2021-11-25 11:45:56 +01:00
djordje vlaisavljevic
77cae01687 Refined container div for toggle card refs https://github.com/TryGhost/Team/issues/1209 2021-11-25 11:39:28 +01:00
Renovate Bot
ff89cd74bc Update dependency postcss to v8.4.1 2021-11-25 09:39:56 +01:00
Thibaut Patel
62dcabc236 Revert "Added missing callout card css warning to gscan"
This reverts commit 753b300a85.

- The reason is that migrating Ghost from v3 to the latest version would break due to the warning added by gscan (it would break there: a2a24491f5/packages/ghost-cli/lib/tasks/major-update/ui.js (L45)).
2021-11-24 20:40:21 +01:00
Thibaut Patel
753b300a85 Added missing callout card css warning to gscan
refs https://github.com/TryGhost/Team/issues/1206

- Theme developpers should add the right css classes or configure the `card_asset` property
- Commit a583f7236e fixed the previous attempt of bumping gscan
2021-11-24 20:24:16 +01:00
Thibaut Patel
dc5171f8fa Revert "Added missing callout card css warning to gscan"
This reverts commit 61213da3d1.
2021-11-24 17:47:36 +01:00
Thibaut Patel
61213da3d1 Added missing callout card css warning to gscan
refs https://github.com/TryGhost/Team/issues/1206

- Theme developpers should add the right css classes or configure the `card_asset` property
2021-11-24 16:54:46 +01:00
Renovate Bot
45b0b907e5
Update dependency sanitize-html to v2.6.0 2021-11-23 19:54:04 +00:00
Naz
6d6aa12afe Extracted routes.yaml path calculation into external package
refs https://linear.app/tryghost/issue/CORE-35/refactor-route-and-redirect-settings
refs e457fd5fe0 (diff-b292e8480eee007786cc602f55ed05006a06b8da9fe6934d51fbef8328013278R36)

- The full logic for  file path calculation for routes.yaml has been duplicated in couple modules. It is aslo following similar pattern used in redirects services and should be reused there once those modules are touched
2021-11-24 05:32:20 +13:00
Thibaut Patel
5258e02fd1 Added support for theme card_asset config to GScan
refs https://github.com/TryGhost/Team/issues/1232

- Only require the right css rules depending on the `card_assets` configuration
- 🐛 removed `kg-width-wide` and `kg-width-full` from being considered as card asset, as they should always be defined in themes (it was only a problem in v4.11.x)
2021-11-23 14:29:39 +01:00
Rishabh
df8273f995 Updated default styles for accordion card
refs https://github.com/TryGhost/Team/issues/1209

- bumps kg default cards package to include accordion card changes
2021-11-23 15:29:18 +05:30
Renovate Bot
8d1863e54b Update dependency gscan to v4.11.1 2021-11-22 14:04:18 +01:00
Renovate Bot
ab51ce09dc Update dependency analytics-node to v6 2021-11-22 08:05:05 +01:00
Renovate Bot
fdfd16934b Update dependency @tryghost/job-manager to v0.8.13 2021-11-22 07:46:28 +01:00
Renovate Bot
12b4933c3e
Update metascraper to v5.25.2 2021-11-19 21:15:28 +00:00
Daniel Lockyer
8bf93640a8 v4.22.4 2021-11-19 16:00:32 +00:00
Hannah Wolfe
4ba8752651 Revert "Revert "Ensured that the new content/public dir exists""
This reverts commit 1c36d3941f.
2021-11-19 14:34:48 +00:00
Hannah Wolfe
1c36d3941f
Revert "Ensured that the new content/public dir exists"
This reverts commit abf75cca71.
2021-11-19 13:31:48 +00:00
Hannah Wolfe
abf75cca71
Ensured that the new content/public dir exists
- Upgrading the version of minifier to a patched version that ensures the dir exists before writing a file
- This is needed because although the content/public directory is present in the repo, it is not present in production installs
  made with Ghost-CLI or Pro until changes there are merged. Other production setups will likely miss it too.
- Ensuring the dir means no one is suprised by this not working
2021-11-19 12:57:07 +00:00
Fabien O'Carroll
c784d7068c Added container class to NFT card HTML
refs https://github.com/TryGhost/Team/issues/1211

Added by Zimo https://github.com/TryGhost/Koenig/commit/1eeb264e
2021-11-19 13:10:22 +02:00
Fabien O'Carroll
78ee0509bf Removed duplicate class name from NFT card
refs https://github.com/TryGhost/Team/issues/1211

Duplicate class names make it harder to style elements.
2021-11-19 12:12:19 +02:00
Renovate Bot
503e4c198d Update dependency @tryghost/logging to v1.0.1 2021-11-19 08:44:59 +01:00
Rishabh
36b4c7de78 Refined frontend and email styles for toggle card
refs https://github.com/TryGhost/Team/issues/1209
2021-11-19 09:55:19 +05:30
Thibaut Patel
66f17e18a7 Updated gscan to support the card_assets config
refs https://github.com/TryGhost/Team/issues/1232

- When `config.card_assets` is set to true, disable the card asset checks
2021-11-18 23:29:54 +01:00
Daniel Lockyer
f37a5d3eff
Removed more unnecessary DB queries during init
refs d4b10323b7

- as mentioned in the referenced commit, there was another optimization
  regarding batching the inserts
- this seems good to me in the end, so I've updated knex-migrator to do this
- this commit bumps knex-migrator to the updated version
- after this change, a `knex-migrator init` goes from 5.5s to 5s locally
  and we've removed ~470 DB queries
2021-11-18 18:33:31 +01:00
Daniel Lockyer
d4b10323b7 Reduced unnecessary DB queries during init
refs 8d9a561cab

- see referenced commit for context but we were doing unnecessary SELECT
  queries when initializing the DB and the commit reduces this by half
- this commit updates `knex-migrator` to that containing the commit
2021-11-18 17:59:40 +01:00
Renovate Bot
9b14f1c22f Update dependency @tryghost/metrics to v1.0.1 2021-11-18 16:36:48 +01:00
Renovate Bot
0ff7011b0b Update dependency @tryghost/helpers to v1.1.54 2021-11-18 16:36:04 +01:00
Renovate Bot
1b9ca304ed Update dependency @tryghost/color-utils to v0.1.5 2021-11-18 16:35:12 +01:00
Renovate Bot
6fad408f2c Update dependency @tryghost/request to v0.1.9 2021-11-18 16:35:03 +01:00
Renovate Bot
e54f0a644d Update dependency @tryghost/url-utils to v2.0.4 2021-11-18 14:37:10 +01:00
Renovate Bot
f1ec0c1056 Update dependency cssnano to v5.0.11 2021-11-18 13:41:39 +01:00
Fabien O'Carroll
3d47f2835b Updated NFT card rendering to include payload
refs https://github.com/TryGhost/Team/issues/1211

This adds the payload as a data attribute to the rendered card so that
we can transform the card form HTML back to mobiledoc easily.
2021-11-18 14:30:48 +02:00
Daniel Lockyer
e883d4c4fe
🐛 Fixed credentials provider for SES mail transport
refs https://github.com/TryGhost/framework/pull/41

- see the referenced PR for context but Ghost could not authenticate to
  SES in containers using IAM because of a missing dependency
- this has been updated in the Nodemailer docs and added in the PR
- the `@tryghost/nodemailer` package has been updated so this commit
  bumps it in Ghost
- credits to https://github.com/touzoku for the fix
2021-11-18 11:48:26 +01:00
Fabien O'Carroll
b2172cec5b Updated NFT card rendering for emails
refs https://github.com/TryGhost/Team/issues/1211

This adds custom rendering for nft cards in emails, using tables instead
of flexbox for alignment.

This also updates the button card to add the missing `kg-card` class to
it.
2021-11-17 15:46:11 +02:00
Sam Lord
0692ddf57d Revert "Replace update user last seen middleware with package version"
This reverts commit 07f8c6efbb.

Revert "Remove unused unit test file"

This reverts commit f1798119d3.
2021-11-17 11:00:55 +00:00
Renovate Bot
b70ad5b170 Update dependency @tryghost/mw-update-user-last-seen to v0.1.1 2021-11-17 10:46:06 +00:00
Renovate Bot
f930575387 Update dependency gscan to v4.10.2 2021-11-17 10:41:00 +00:00
Rishabh
fdc7f4219f Added generic class to toggle and callout cards
refs https://github.com/TryGhost/Team/issues/1209
2021-11-17 15:45:56 +05:30
Renovate Bot
89b0b6cf5b
Update dependency @sentry/node to v6.15.0 2021-11-16 20:53:05 +00:00
Fabien O'Carroll
d7621405ed Fixed NFT card rendering
refs https://github.com/TryGhost/Team/issues/1211

The nft card rendering has been updated to correctly handle the switch
from card_type to type, and the removal of the html property from the
NFT embed API
2021-11-16 22:49:42 +02:00
Sam Lord
07f8c6efbb Replace update user last seen middleware with package version
no issue

Part of the goal to move these middleware packages to remove untested code from the codebase
2021-11-16 15:58:45 +00:00
Sam Lord
1234a61b52 Mode c8 configuration from package.json to .c8rc.json
refs: https://github.com/TryGhost/Toolbox/issues/117

Simplifies the commands in package.json by adding defaults to the .c8rc.json file
2021-11-16 10:22:15 +00:00
Renovate Bot
e8535cec6a
Update metascraper to v5.25.1 2021-11-15 20:06:43 +00:00
Daniel Lockyer
6fd5139372
Merged v4.22.3 into main
v4.22.3
2021-11-15 13:44:09 +00:00
Daniel Lockyer
58f7196881 v4.22.3 2021-11-15 13:43:15 +00:00
Rishabh
c3b6e21617 Refined frontend style for toggle cards
refs https://github.com/TryGhost/Team/issues/1209

- adds open/close behavior to toggle cards
- updates styling
2021-11-15 16:43:23 +05:30
Fabien O'Carroll
a51524c47c Added custom Embed card rendering for NFT Embeds
refs https://github.com/TryGhost/Team/issues/1211
2021-11-15 10:44:37 +02:00
Daniel Lockyer
ee1fb0d972 v4.22.2 2021-11-12 16:00:25 +00:00
Renovate Bot
f5d46d0da0 Update dependency nock to v13.2.1 2021-11-12 11:26:40 +00:00
Renovate Bot
ef8852c5b6
Update dependency @sentry/node to v6.14.3 2021-11-11 18:59:47 +00:00
Kevin Ansfield
50b51e222c Added support for parsing Wordpress and Substack button html to button cards
refs https://github.com/TryGhost/Team/issues/1214

- bumps @tryghost/html-to-mobiledoc with support for parsing Wordpress/Substack HTML into our button cards

Example Wordpress html:
```html
<div class="wp-block-buttons">
    <div class="wp-block-button">
        <a href="https://example.com" class="wp-block-button__link">
            Testing  button
        </a>
    </div>
</div>
```

Example Substack html:
```html
<a class="button primary" href="https://ghost.org">
    <span>Custom Button</span>
</a>
```
2021-11-11 14:29:15 +00:00
Thibaut Patel
1139b0fdde Updated the callout card parsing and rendering
refs https://github.com/TryGhost/Team/issues/1205

- Adds support for optional enoji and background color
2021-11-10 18:33:21 +01:00
Renovate Bot
b401bc77a2 Update dependency @tryghost/social-urls to v0.1.27 2021-11-10 15:33:19 +00:00
Rishabh
7dcad6d5b5 Added default card for new toggle card
refs https://github.com/TryGhost/Team/issues/1209

- bumps koenig default cards to include support for toggle card
- bumps html to mobiledoc library to add support for toggle card
2021-11-10 20:13:42 +05:30
Daniel Lockyer
2f57e0ab6b
Merged v4.22.1 into main
v4.22.1
2021-11-10 12:58:49 +00:00
Daniel Lockyer
8fe425e176 v4.22.1 2021-11-10 12:56:23 +00:00
Renovate Bot
edff6e0ef1 Update dependency @tryghost/url-utils to v2.0.3 2021-11-10 10:49:01 +00:00
Renovate Bot
cc650d90cb Update dependency @tryghost/admin-api-schema to v2.6.1 2021-11-10 08:47:47 +00:00
Renovate Bot
f36b8b5af6 Update dependency @tryghost/color-utils to v0.1.4 2021-11-10 08:47:07 +00:00
Renovate Bot
184e20b4de Update dependency @tryghost/helpers to v1.1.53 2021-11-10 08:46:50 +00:00
Renovate Bot
710136926d Update dependency @tryghost/string to v0.1.21 2021-11-10 08:46:40 +00:00
Fabien O'Carroll
4d4e04ea65
🐛 Fixed offers remaining after subscription change
refs https://github.com/TryGhost/Team/issues/1092

This ensures that when a subscription is changed by a Member that the
Offer is removed and will no longer apply.
2021-11-10 08:41:09 +00:00
Thibaut Patel
ea525e20a5 Updated callout card
refs https://github.com/TryGhost/Team/issues/1205

- Updated the rendered callout card to match the callout card from the admin interface
2021-11-09 21:47:03 +01:00
renovate[bot]
ced7b858dd
Update dependency @tryghost/members-offers to v0.10.2 (#13718)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-11-09 14:32:35 +02:00
Naz
ce63b87b2e 🐛 Fixed extention missmatching .mp4 as invalid
refs https://github.com/TryGhost/Toolbox/issues/120

- When a file name with an .mp4 extension was passed in it was mistakenly taken as an invalid extension. It is pretty valid!
- Fixing this bug allows for for duplicate file detection when uploading valid valies with extensions containing numbers
- Extensions that consiste only from numbers are still treated as invalid
2021-11-09 16:07:23 +04:00
Kevin Ansfield
3150142b2f Updated button card frontend+email render output
refs https://github.com/TryGhost/Team/issues/1207

- uses koenig-specific classes to avoid clashes with theme CSS
- fixes email rendering by using table alignment
2021-11-09 10:44:18 +00:00
Thibaut Patel
bfaccadd4e Added initial callout card rendering
refs https://github.com/TryGhost/Team/issues/1205

- bumped rendering library to the version with `callout` card support
2021-11-09 10:36:51 +01:00
Fabien O'Carroll
3017f9d50c 🐛 Fixed offers remaining after subscription change
refs https://github.com/TryGhost/Team/issues/1092

This ensures that when a subscription is changed by a Member that the
Offer is removed and will no longer apply.
2021-11-09 11:22:04 +02:00
Renovate Bot
6b2cbe5c18
Update dependency luxon to v2.1.1 2021-11-08 22:35:35 +00:00
Kevin Ansfield
3a2bf93173 Added initial button card rendering and parsing support
refs https://github.com/TryGhost/Team/issues/1207

- bumped rendering and parsing libraries to versions with `button` card support
2021-11-08 18:33:26 +00:00
renovate[bot]
b7d8d70ccf
Update dependency @tryghost/members-api to v2.7.3 (#13717)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-11-08 12:40:17 +02:00
Renovate Bot
13d282fb94 Update dependency cssnano to v5.0.10 2021-11-08 08:30:43 +00:00
Renovate Bot
6ad0ac4103 Update dependency nock to v13.2.0 2021-11-08 08:30:30 +00:00
Naz
151ab6968c Added local file storage adapter
refs https://github.com/TryGhost/Toolbox/issues/114

- This adapter is meant to power Files API
- The files will be stored under `/files/` in the configured content path and under `/content/files/` URL.
2021-11-08 11:29:33 +04:00
Renovate Bot
9d0af694d0
Update dependency oembed-parser to v1.5.2 2021-11-08 03:57:58 +00:00
Renovate Bot
46762eb624
Update dependency luxon to v2.1.0 2021-11-08 01:53:51 +00:00
Renovate Bot
de6fff90b3
Update dependency @sentry/node to v6.14.1 2021-11-05 16:01:42 +00:00
Daniel Lockyer
40e2c89e3c v4.22.0 2021-11-05 16:00:29 +00:00
Renovate Bot
fa03052187 Update dependency @tryghost/job-manager to v0.8.12 2021-11-05 13:35:34 +00:00
Daniel Lockyer
ed4586c28c
Disabled Sharp image cache to improve memory usage
refs 03d24ea4fe

- see the referenced commit for the full explanation but in short, Sharp
  has an internal cache it uses when optimizing images and it defaults
  to 50MB. This cache is not needed for our use-case because we never
  optimize images twice
- `@tryghost/image-transform` has been updated to disable the cache and
  this commit bumps the package in Ghost
2021-11-05 12:32:13 +00:00
Fabien O'Carroll
72b90151bb Disabled auto-login when a success url is provided
refs https://github.com/TryGhost/Team/issues/1067

The auto-login behaviour obliterates the concept of a success URL,
because the Member is redirected in a logged in state, to the welcome
URL - rather than a logged out state to the success URL.

In order to not disrupt existing flows, we disable auto login if a
success URL is provided.
2021-11-05 10:24:02 +02:00
Hannah Wolfe
fdf38ba8c6
Initial card asset service implementation
- Requires the new @tryghost/minifier package
- Adds a new service that will handle taking config from the theme and optionally including assets for Koenig editor cards
- It supports both css and js as cards may need one or both
- For any given config, the tool can find the matching files to include and concat and minify them into one file per type
- Currently has an override in place so that this is not yet customisable in the theme - will remove this override when we're ready for the feature
2021-11-04 11:34:40 +00:00
Renovate Bot
f421ee79d8 Update dependency @lodder/grunt-postcss to v3.1.1 2021-11-04 07:33:33 +00:00
Fabien 'egg' O'Carroll
da152a0a13
Removed references to Offers labs flag (#13709)
refs https://github.com/TryGhost/Team/issues/1115

This feature is now GA, and the flag has been hardcoded to `true`, here we clean up the
remaining references as they're no longer needed.
2021-11-03 17:11:48 +02:00
Renovate Bot
0acdbde010
Update dependency @sentry/node to v6.14.0 2021-11-03 11:42:22 +00:00
Fabien O'Carroll
a0cad99a72 Added initial support for Members auto-login
refs https://github.com/TryGhost/Team/issues/1067

When the `membersAutoLogin` labs flag is enabled this will override the
successful redirect URL from Stripe Checkout - and instead use a magic
link, which will log the Member in.

Note that this will only work for brand new members. This is to stop
unauthorized access of Member accounts.
2021-11-03 11:17:02 +02:00
Renovate Bot
ada554e6f0
Update dependency sanitize-html to v2.5.3 2021-11-02 15:59:03 +00:00
Thibaut Patel
3f7448ae38 🐛 Fixed gscan crashing on invalid package.json
refs 7c2c9d54d8

- Gscan won't crash on invalid json, and display the list of failed rules instead
2021-11-02 16:57:26 +01:00
Fabien O'Carroll
b45e514cb1 🐛 Prevented unexecuted migrations from being rolled back
refs https://github.com/TryGhost/knex-migrator/issues/241

Previous to this bump if a migration was occuring across multiple
versions and a migration was to error, we would incorrectly rollback
migrations which had not run yet.

For example - assume we are on v1.0.0 and migrating to v1.3.0, and there are
migrations for v1.1.0, v1.2.0 & v1.3.0. In the case that a migration in
v1.2.0 fails, we will still attempt to rollback migrations from v1.3.0.

This is no longer the case, and we will only roll back migrations which
have already been run.
2021-11-02 16:27:15 +01:00
Renovate Bot
52ee74c16a Update dependency cssnano to v5.0.9 2021-11-02 15:22:27 +00:00
Fabien O'Carroll
0cb551d37b 🐛 Fixed handling of non-subscription invoices
refs https://github.com/TryGhost/Team/issues/887

This updates our webhook handling to ignore invoices which are not
associated with a subscriptions. This stops us from throwing 500 errors
when a Stripe account is used for more than just Member subscriptions,
for example - selling products, or taking one-off payments.
2021-11-02 15:40:03 +02:00
Naz
02da62ee48 Added limit service check for uploaded media filesize
refs https://linear.app/tryghost/issue/CORE-121/create-a-video-storage-adapter

- Uploading large files is costly and might cause DDoS. Limits would allow fair use of the site instance.
- The configureation in hostSettings to enable an "uploads" limit would look like following:
```
"hostSettings": {
    "limits": {
            "uploads": {
                "max": 5,
                "error": "Your plan supports uploads of max size up to {{max}}MB. Please upgrade to reenable uploading."
            }
    }
}
```
- Read more at ba37890be4/packages/limit-service (usage)
2021-11-03 00:33:28 +13:00
Fabien O'Carroll
c45afc7f26 🐛 Fixed email type when creating Members via API
refs https://github.com/TryGhost/Team/issues/1197

We were always sending the 'signin' email, rather than respecting the
email_type param passed to the API. This updates our email sending when
creating members to force the requested type if it's present.
2021-11-02 12:56:00 +02:00
Renovate Bot
30bc2f5090 Update dependency @tryghost/metrics to v1 2021-11-01 12:40:49 +00:00
Daniel Lockyer
46277b6718 v4.21.0 2021-10-29 16:00:28 +01:00
Renovate Bot
083b57a924 Update dependency @tryghost/logging to v1 2021-10-28 19:57:49 +01:00
Renovate Bot
858a9897d4 Update dependency @tryghost/update-check-service to v0.2.5 2021-10-28 17:43:41 +01:00
Renovate Bot
ca2c9b92cd Update dependency @tryghost/email-analytics-provider-mailgun to v1.0.5 2021-10-27 13:41:11 +01:00
Renovate Bot
650c88b3dd Update dependency @tryghost/email-analytics-service to v1.0.4 2021-10-27 12:07:52 +01:00
Daniel Lockyer
f4b48c1373 🔥 Added support for Node 16
refs https://github.com/TryGhost/Toolbox/issues/71

- Node 16 is now LTS so we're adding support in Ghost
- we're also bumping the minimum Node 14 version to 14.17.0 so we can merge
  dependencies who have higher Node 14 requirements than current
- this commit adds Node 16 to the `package.json` engines and to CI
- also bumps all dependencies that needed new versions to add Node 16
  support
2021-10-27 11:39:42 +01:00
Thibaut Patel
1b01036458 Removed the theme settings lab flag in gscan
refs https://github.com/TryGhost/Team/issues/1164

- theme settings are GA now
2021-10-26 17:46:29 +02:00
Daniel Lockyer
6802a61307
Merged v4.20.4 into main
v4.20.4
2021-10-26 13:21:41 +01:00
Daniel Lockyer
db4951795b v4.20.4 2021-10-26 13:20:31 +01:00
Thibaut Patel
5d9e237951
🐛 Fixed GScan crash on files starting with package.json
refs https://github.com/TryGhost/Team/issues/1185

- gscan was attempting to json parse all files starting with package.json
2021-10-26 12:03:54 +01:00
Thibaut Patel
82e42bfc8b
🐛 Fixed GScan falsely triggering the "unused theme setting" error
refs https://github.com/TryGhost/Team/issues/1183

- This gscan rule wasn't parsing the partials where the theme setting was used
2021-10-26 12:03:45 +01:00
Kevin Ansfield
b6f9a19b25
🐛 Fixed error from custom settings sync when theme name contains . chars
no issue

- bumped `@tryghost/custom-theme-settings-service`
- contains a fix for invalid filter strings being generated for theme names that contain `.` by wrapping the name in quotes, eg `theme:'4.1.1-my-theme'`
2021-10-26 12:02:52 +01:00
Thibaut Patel
e851e28b16 Fixed gscan crash on files starting with package.json
refs https://github.com/TryGhost/Team/issues/1185

- gscan was attempting to json parse all files starting with package.json
2021-10-26 12:23:11 +02:00
Thibaut Patel
e4ce745ab6 🐛 Fixed gscan falsely triggering the "unused theme setting" error
refs https://github.com/TryGhost/Team/issues/1183

- This gscan rule wasn't parsing the partials where the theme setting was used
2021-10-26 11:20:05 +02:00
Kevin Ansfield
af4c115fb3 🐛 Fixed error from custom settings sync when theme name contains . chars
no issue

- bumped `@tryghost/custom-theme-settings-service`
- contains a fix for invalid filter strings being generated for theme names that contain `.` by wrapping the name in quotes, eg `theme:'4.1.1-my-theme'`
2021-10-26 10:18:47 +01:00
Fabien O'Carroll
960828b646 Removed handling of invoice.payment_failed webhook
refs https://github.com/TryGhost/Team/issues/885

This webhook was not used to populate data, and was causing 404's when
checkout sessions were completed, but payment had failed. Removing it
should fix these 404's.
2021-10-25 14:34:45 +02:00
Fabien O'Carroll
a68b96001c Fixed max-complexity-warnings for members API
no-issue

This removes logic from the Members API controller, and into the Members
BREAD service, this allows our controllers to be simpler and easier to
maintain, as well as keeping the important logic all together.
2021-10-25 14:06:12 +02:00
Daniel Lockyer
cfb5323017
Merged v4.20.3 into main
v4.20.3
2021-10-25 11:32:31 +02:00
Daniel Lockyer
6f0357e670 v4.20.3 2021-10-25 10:28:23 +01:00
Kevin Ansfield
8e2568c776 🐛 Fixed error when a theme does not have a "config" object in it's package.json
no issue

- bumped `gscan` to version with an added guard check where it extracts custom theme settings from `config.custom`
2021-10-25 10:08:35 +01:00
renovate[bot]
d266dfe291
Update dependency @tryghost/members-api to v2.4.4 (#13670)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-10-25 10:05:37 +02:00
Daniel Lockyer
7302fc615c
Merged v4.20.2 into main
v4.20.2
2021-10-25 09:20:57 +02:00
Daniel Lockyer
3067fbe97c v4.20.2 2021-10-25 08:19:06 +01:00
Renovate Bot
54dba233f6
Update metascraper to v5.25.0 2021-10-25 03:52:14 +00:00
Daniel Lockyer
dfe207812d v4.20.1 2021-10-22 20:08:55 +01:00
Renovate Bot
3b773c2ab5
Update dependency oembed-parser to v1.4.9 2021-10-22 16:21:39 +00:00
Daniel Lockyer
9eaada9384 v4.20.0 2021-10-22 17:19:48 +01:00
Fabien O'Carroll
c3694c9903 Improved error messages for Offers API
no-issue

The error messages for duplicate Offer name and code were not
particularly helpful. This includes an update to them based on feedback
from Peter.
2021-10-22 16:50:48 +02:00
Renovate Bot
b2e95ba12a Update dependency @tryghost/metrics to v0.2.6 2021-10-22 15:50:35 +02:00
Renovate Bot
b467d45c5c Update dependency @tryghost/image-transform to v1.0.17 2021-10-22 15:47:28 +02:00
Renovate Bot
0bacf3ef69 Update dependency @tryghost/config-url-helpers to v0.1.3 2021-10-22 15:45:52 +02:00
Renovate Bot
e188c6bd9f Update dependency @tryghost/zip to v1.1.18 2021-10-22 15:45:12 +02:00
Renovate Bot
e7e1568a9c Update dependency @tryghost/mw-session-from-token to v0.1.26 2021-10-22 15:44:28 +02:00
Renovate Bot
9e5de91dc1 Update dependency @tryghost/limit-service to v0.6.5 2021-10-22 15:43:14 +02:00
Renovate Bot
742b5f7dd3 Update dependency @tryghost/package-json to v1.0.6 2021-10-22 15:41:53 +02:00
Renovate Bot
2208ae1655 Update dependency @tryghost/security to v0.2.13 2021-10-22 15:41:43 +02:00
Renovate Bot
0e4be5a390 Update dependency @tryghost/job-manager to v0.8.11 2021-10-22 15:39:15 +02:00
Renovate Bot
cceda95ba0 Update dependency @tryghost/bootstrap-socket to v0.2.13 2021-10-22 15:21:54 +02:00
Renovate Bot
7b43e30d8e Update dependency @tryghost/adapter-manager to v0.2.18 2021-10-22 15:04:47 +02:00
Renovate Bot
d842259f22 Update dependency @tryghost/errors to v0.2.17 2021-10-22 15:04:38 +02:00
Renovate Bot
da6a66c777 Update dependency @tryghost/constants to v0.1.12 2021-10-22 15:04:30 +02:00
Renovate Bot
ff09230382 Update dependency @tryghost/promise to v0.1.13 2021-10-22 15:04:10 +02:00
Renovate Bot
51d6cf3922 Update dependency @tryghost/session-service to v0.1.28 2021-10-22 15:03:59 +02:00
Renovate Bot
b57dcf9a98 Update dependency @tryghost/vhost-middleware to v1.0.19 2021-10-22 15:03:47 +02:00
Fabien O'Carroll
70f7039539 Handled empty Offer titles
no-issue

We want to allow for Offers titles to be blank/empty. This updates the
API to handle both null & empty strings for the Offer title.
2021-10-22 14:18:01 +02:00
Renovate Bot
4d56e9a7af Update dependency @tryghost/version to v0.1.7 2021-10-22 13:22:24 +02:00
Renovate Bot
8a6640d00f Update dependency @tryghost/request to v0.1.8 2021-10-22 13:08:36 +02:00
Renovate Bot
6d2de5b369 Update dependency @tryghost/debug to v0.1.9 2021-10-22 13:08:28 +02:00
Renovate Bot
2deb396291 Update dependency @tryghost/metrics to v0.2.5 2021-10-22 13:00:59 +02:00
Renovate Bot
f82f52a9e7 Update dependency @tryghost/bookshelf-plugins to v0.3.4 2021-10-22 13:00:17 +02:00
Renovate Bot
2ea8c5ee5b Update dependency @tryghost/validator to v0.1.8 2021-10-22 12:59:45 +02:00
Renovate Bot
842c850534 Update dependency @tryghost/nodemailer to v0.3.6 2021-10-22 12:27:45 +02:00
Renovate Bot
fe191a0f96 Update dependency @tryghost/root-utils to v0.3.7 2021-10-22 12:25:56 +02:00
Renovate Bot
113e01c2c4 Update dependency @tryghost/tpl to v0.1.8 2021-10-22 12:25:42 +02:00
renovate[bot]
c95ce4c685
Update dependency @tryghost/members-csv to v1.1.8 (#13642)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-10-22 12:03:56 +02:00
renovate[bot]
967f34f4e0
Update dependency @tryghost/express-dynamic-redirects to v0.2.1 (#13640)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-10-22 11:18:24 +02:00
renovate[bot]
be100d24ce
Update dependency @tryghost/magic-link to v1.0.14 (#13641)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-10-22 11:18:11 +02:00
renovate[bot]
cafbd01611
Update dependency @tryghost/members-importer to v0.3.4 (#13643)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-10-22 11:17:53 +02:00
Renovate Bot
a2b4ccb0ad Update dependency @tryghost/email-analytics-provider-mailgun to v1.0.4 2021-10-22 08:54:28 +02:00
Renovate Bot
1be8d30f44
Update dependency eslint-plugin-ghost to v2.7.0 2021-10-21 21:06:14 +00:00
Fabien O'Carroll
c10e76aa2c Included Offers on Member Subscriptions
refs https://github.com/TryGhost/Team/issues/1135

This adds Offer information to Subscriptions for which the Offer is
valid. This means that if a Subscription has changed its Tier/Cadence
from the what the Offers supports - it will not be attached. The data
however is still stored in the db.

This also fixes a bug with creating Stripe Checkout Sessions without an
Offer.
2021-10-21 18:12:32 +02:00
renovate[bot]
28283b54ac
Update dependency @tryghost/members-ssr to v1.0.15 (#13644)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-10-21 17:00:10 +02:00
Renovate Bot
39706126c0 Update dependency postcss to v8.3.11 2021-10-21 16:50:51 +02:00
Fabien 'egg' O'Carroll
21ec444139
Handled Stripe Disconnect for Offers (#13638)
refs https://github.com/TryGhost/Team/issues/1166

This updates the Members & Offers modules to correctly handle
disconnecting from Stripe, this includes:

 - Deleting Stripe data on disconnect (coupons for Offers)
 - Recreating missing Stripe Coupons after disconnect/reconnect
2021-10-21 16:25:35 +02:00
Renovate Bot
8709da36e9 Update dependency @tryghost/email-analytics-service to v1.0.3 2021-10-21 15:25:51 +02:00
Renovate Bot
8dc31438b3 Update dependency analytics-node to v5.1.2 2021-10-21 12:08:00 +02:00
Renovate Bot
87b0af1de7 Update dependency postcss to v8.3.10 2021-10-21 12:07:45 +02:00
Daniel Lockyer
32b325eb4c Added codecov.io coverage uploader to CI
refs linear.app/tryghost/issue/CORE-74/improve-the-test-situation

- this commit adds the codecov GitHub Action into CI so we can upload
  coverage reports
- the coverage files need to be in XML for them to work with
  codecov, so this commit also adds cobertura (XML) as a reporter
2021-10-20 15:12:07 +02:00
Kevin Ansfield
59a6f040d2 Fixed custom theme settings being clobbered with duplicate-named themes
refs https://github.com/TryGhost/Team/issues/1149

Ghost allows different themes to have the same `name` value in `package.json` but gives them a custom name based on the zip file used to upload it. The custom theme settings service however was always using the package.json name meaning that when syncing a theme with a duplicate name it was overwriting the settings for all other themes.

- bumped `@tryghost/custom-theme-settings-service` which changes the `.activateTheme()` signature to accept a theme name as the first argument
- updated our calls to `.activateTheme()` to pass Ghost's known theme name as the first argument so we're always syncing with the correct `theme` field value in the `custom_theme_settings` table
2021-10-20 13:25:02 +01:00
Thibaut Patel
c273727b5f Added api validation for custom settings
refs https://github.com/TryGhost/Team/issues/1107 https://github.com/TryGhost/Team/issues/1106

- Replicates the gscan custom theme settings validation in the admin api.
2021-10-20 13:36:41 +02:00
Renovate Bot
5524509274 Update dependency nock to v13.1.4 2021-10-20 10:22:32 +02:00
Daniel Lockyer
1fd980ee9b Set global Luxon timezone override to UTC
refs https://linear.app/tryghost/issue/CORE-113/start-off-luxon-refactor

- we're planning on switching to Luxon for our date/timezone library,
  eventually replacing `moment` and `moment-timezone`
- the first step is to set the global timezone override to UTC, which is
  done in `core/server/overrides.js`
- also adds a test to ensure we're setting the timezone correctly
- this was mostly pulled from https://moment.github.io/luxon/#/zones?id=changing-the-default-zone
2021-10-20 09:19:29 +02:00
Fabien O'Carroll
d303c40248 Fixed editing Offer description via API
no-issue

We were only updating the Offer description if it was truthy - rather
than if it existing, this resulting in empty strings or null not working
correctly.
2021-10-19 11:11:02 +02:00
Thibaut Patel
2891898f94 Added a rule to forbid the custom theme setting image type to have a default
refs https://github.com/TryGhost/Team/issues/1108

- The default is something that the theme developpers should be coding in the template rather than using a default value
2021-10-19 09:41:35 +02:00
Fabien O'Carroll
c5856d04e4 Added support for redemption_count to Offers API
refs https://github.com/TryGhost/Team/issues/1132

This adds redemption_count to the Offers API so that we can display how
many times an Offer has been used. This also adds the storage mechanism
for Offer Redemptions - which ensure that everytime a Checkout Session
is completed - we will create the Offer Redemption in the database.

This means that manual usage of the underlying will not count toward the
Offer redemption count, this is considered an edge case.
2021-10-18 17:40:05 +02:00
Daniel Lockyer
f9f0fb34f2
Merged v4.19.1 into main
v4.19.1
2021-10-18 15:10:22 +02:00
Daniel Lockyer
5c5233afc0 v4.19.1 2021-10-18 14:09:17 +01:00
Fabien O'Carroll
67b517e1fb 🐛 Fixed handling of "incomplete" subscriptions
refs https://github.com/TryGhost/Team/issues/1156

When a payment fails but Stripe Checkout succeeds, a subscription is
created in the "incomplete" status. This would result in a Member not
being linked to the Product. When the subscription was later updated to
"active" or trialing - the Product would still not be added!

This updates the members-api to always link the Product to the Member
for active subscriptions - regardless of if they're new or not.
2021-10-18 14:39:28 +02:00
Renovate Bot
5d60b564af
Fixed double logging library initialization
- we have the `@tryghost/logging` library to manage logging across all
  our code
- this package is intended to be a singleton, otherwise we have multiple
  versions of logging loaded
- we sometimes have problems where dependencies also use
  `@tryghost/logging` but Ghost's yarn.lock is not regenerated to update
  this
- this means we have multiple versions of `@tryghost/logging` running
- this commit updates the dependency @tryghost/update-check-service to
  v0.2.4 to clean up the yarn.lock of multiple versions
2021-10-18 14:28:26 +02:00
Renovate Bot
c768133357 Update dependency jwks-rsa to v2.0.5 2021-10-18 08:29:43 +02:00
Daniel Lockyer
f4fb0fcbaa Improved Ghost boot time and memory usage by lazy loading routes
no issue

- right now, we mount all API endpoints (v2, v3 and canary), alongside some
  other routes, when Ghost is booting. This is wasteful because we don't
  necessarily need any of the endpoints to get Ghost up and running
- even when Admin is used, it uses `canary` so `v2` and `v3` sit in memory
- the better approach here is to lazy load these endpoints, so they only
  get mounted when needed
- this commit adds the `lazyUse` function into our Express lib,
  which takes a mount path and a module function to execute down the
  line. This gets passed to the wonderful `express-lazy-router` lib which
  detects when we're calling an unmounted module and will mount it for
  us
- from local testing, this speeds up boot time by about 18% and reduces
  initial memory usage by about 6% 🚀
2021-10-15 17:52:07 +02:00
Daniel Lockyer
cea17cfb31 v4.19.0 2021-10-15 16:23:19 +01:00
Renovate Bot
d44666fe11
Update dependency mocha to v9.1.3 2021-10-15 12:26:03 +00:00
Thibaut Patel
3d57ac4464 Moved the match helper to GA in gscan. Updated the custom theme select gscan rule to work with the updated match behavior.
refs 50134193be
refs c3b346bb1a
2021-10-14 18:45:00 +02:00
Renovate Bot
565ced555c Update dependency @tryghost/custom-theme-settings-service to v0.1.2 2021-10-14 17:11:58 +02:00
Renovate Bot
c8082c9c43 Update dependency @tryghost/metrics to v0.2.4 2021-10-14 17:11:27 +02:00
Thibaut Patel
2748ed6d0a Fixed a gscan check to force custom theme setting of type color to always have a default value
ref e6a477b3b5
2021-10-14 14:51:44 +02:00
Renovate Bot
107f519310 Update dependency @tryghost/request to v0.1.7 2021-10-14 14:41:34 +02:00
Renovate Bot
aa67e2d463 Pin dependency gscan to 4.7.0 2021-10-14 14:17:57 +02:00
Fabien O'Carroll
d3e291eea6 Fixed Offer usage with Stripe Checkout
no-issue

An update in the MembersAPI meant that coupons were not correctly being
passed to Stripe Checkout. This bump contains the fix to ensure they
are.
2021-10-14 12:09:58 +02:00
Thibaut Patel
a9be1d41c3 Added two gscan rules to validate defaults for custom theme settings of type boolean and color
ref f67fbdf2b4
2021-10-14 11:55:32 +02:00
Renovate Bot
78d322b935 Update dependency @tryghost/bookshelf-plugins to v0.3.3 2021-10-14 11:11:13 +02:00
Renovate Bot
edc12ea128 Update dependency @tryghost/version to v0.1.6 2021-10-14 11:11:01 +02:00
Renovate Bot
cfdd379ddd Update dependency @tryghost/metrics to v0.2.3 2021-10-14 10:04:49 +02:00
Renovate Bot
5438b32155 Update dependency @tryghost/debug to v0.1.8 2021-10-14 10:04:38 +02:00
Renovate Bot
7c4963b579 Update dependency @tryghost/tpl to v0.1.7 2021-10-14 10:04:08 +02:00
Renovate Bot
60adebd815 Update dependency @tryghost/validator to v0.1.7 2021-10-14 10:03:57 +02:00
Renovate Bot
3f9278943c Update dependency @tryghost/root-utils to v0.3.6 2021-10-14 10:03:34 +02:00
Renovate Bot
a3d202fee1 Update dependency @tryghost/logging to v0.2.2 2021-10-14 10:03:26 +02:00
Renovate Bot
2a58e72d10 Update dependency @tryghost/nodemailer to v0.3.5 2021-10-14 10:03:12 +02:00
Renovate Bot
7499641843
Update dependency sanitize-html to v2.5.2 2021-10-13 19:23:34 +00:00
Thibaut Patel
dc4694d8d3 Added a gscan check to prevent the declaration of unused custom theme setting
ref 136e02adfd
ref https://github.com/TryGhost/Team/issues/1105

- Custom theme settings are defined in package.json, this rule triggers an error if a defined rule doesn't appear in any handlebars templates.
2021-10-13 18:30:58 +02:00
Daniel Lockyer
64f2aa2af5
Updated @tryghost/metrics dependency
no issue

- this adds in some missing dependencies of `@tryghost/metrics`
2021-10-13 14:48:05 +02:00
Fabien O'Carroll
7722780539 Restricted archived Offers from being used for Checkout
refs https://github.com/TryGhost/Team/issues/1133

This updates the MembersAPI Checkout Session handling to 403 if an
attempt is made to create a Checkout Session using an archived Offer.
2021-10-13 11:23:05 +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
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
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
Thibaut Patel
836b5b4a0e Added a gscan check to make sure the match helper on custom settings of type select is used against specified options
refs 056928f7b9
refs https://github.com/TryGhost/Team/issues/1105
2021-10-12 18:35:02 +02:00
Fabien O'Carroll
dc3dad4524 Added initial support for Offer status
refs https://github.com/TryGhost/Team/issues/1131

This updates the Offers Service to include the `status` of an Offer,
which will be either 'active' or 'archived'. It also allows setting the
`status` of an Offer to one of these two values when adding & editing
Offers.
2021-10-12 17:15:26 +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
Thibaut Patel
f8b19f286a Added gscan checks for custom themes settings
refs https://github.com/TryGhost/Team/issues/1105

- checks package.json for the config.custom object shape
- checks for unknown custom theme settings
2021-10-12 14:52:50 +02:00
Renovate Bot
c5459db52e
Update dependency keypair to v1.0.4 2021-10-11 21:11:01 +00:00
Naz
421c71d4db Added debug output to the email analytics jobs
closes https://linear.app/tryghost/issue/CORE-91/add-email-analytics-job-unstalling-mechanism

- Additional debug stagements should give better visibility into what's going on with the internal services fetching email events.
- To see all email analytics related outputs use following DEBUG value:

DEBUG=@tryghost/email-analytics-provider-mailgun:email-analytics*
2021-10-11 19:11:23 +02:00
Renovate Bot
6dcad04dcc Update dependency @lodder/grunt-postcss to v3.1.0 2021-10-11 14:31:54 +02:00
Renovate Bot
361184fc1c
Update metascraper to v5.24.9 2021-10-11 09:05:09 +00:00
Kevin Ansfield
c33b596e9c
Added API tests for custom theme settings (#13519)
refs https://github.com/TryGhost/Team/issues/1104

- bumped `@tryghost/custom-theme-settings-service` so it throws a more appropriate `ValidationError` when setting keys don't exist or a select value is not known
- changed the custom theme settings service to have a `.init()` method which creates an instance of the service under `.api` so that we're able to create the instance at a particular point in the boot process when we know the models have been initialised
  - there were problems in tests because the service was being initialised through the require chain before models were initialised through the boot process
- fixed incorrect `camelCase` of resource name in API responses
2021-10-08 16:18:49 +01:00
Daniel Lockyer
7ad6dec0e0 v4.18.0 2021-10-08 16:00:26 +01:00
Daniel Lockyer
a6833077a7 Optimized database integrity check
refs 838fe54628

- see referenced commit for majority of context but in short,
  knex-migrator was doing a DB query per migration folder
- in Ghost, we currently have 79 folders, which results in 79
  queries during boot... owch
- the bump to knex-migrator in this commit uses a smarter method of
  grouping together the DB entries in 1 query, resulting in a drop of 79
  queries -> 1 query
2021-10-08 15:06:46 +01:00
Fabien O'Carroll
d9bcd4ec82 Fixed Stripe Checkout for Offers with monthly Cadence
no-issue

We were incorrectly checking the Offer Cadence and sending Members to
the yearly checkout.
2021-10-08 15:22:51 +02:00
Fabien O'Carroll
955621fa21 Removed requirement for Offer description field
refs https://github.com/TryGhost/Team/issues/1083

This field is not required but was previously causing API errors when
missing, the bump to members-offers removes this requirement.
2021-10-08 12:44:14 +02:00
Fabien O'Carroll
999cff35cf Supported repeating Offers for monthly Cadence
refs https://github.com/TryGhost/Team/issues/1083

Offers with a "repeating" duration will repeat for a number of months.
These offers are restricted to the monthly Cadence. This updates the
members-offers module to add support for them.
2021-10-08 12:15:11 +02:00
Fabien O'Carroll
817b2a3b0b Fixed Offers not sending back currency
refs https://github.com/TryGhost/Team/issues/1083

Offers should send back their currency when they are for a fixed amount
- this was missing that.
2021-10-08 11:43:40 +02:00
Renovate Bot
ff62a07142 Update dependency passport to v0.5.0 2021-10-08 10:32:41 +01:00
Renovate Bot
d9e426df0e Update dependency c8 to v7.10.0 2021-10-08 10:29:55 +01:00
renovate[bot]
47ffefe93e
Update dependency @tryghost/custom-theme-settings-service to v0.1.0 (#13512)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-10-07 23:07:20 +01:00
Fabien O'Carroll
15466b33ee Fixed durations for coupons created for Offers
refs https://github.com/TryGhost/Team/issues/1083

Previously we were not forwarding the Offer duration to Stripe.
2021-10-07 19:03:05 +02:00
renovate[bot]
ab9fc8e848
Supported fixed-amount & forever Offers
refs https://github.com/TryGhost/Team/issues/1083

The @tryghost/members-offers package has been updated to add support for 
more Offer durations and types

Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-10-07 18:57:54 +02:00
Renovate Bot
7555020a49 Pin dependency @tryghost/express-dynamic-redirects to 0.1.0 2021-10-07 16:52:23 +01:00
renovate[bot]
f8dd0b3d56
Ensured Offer codes are slugified
refs https://github.com/TryGhost/Team/issues/1083

As Offer codes are used in redirects we must ensure they're URL safe
2021-10-07 16:10:46 +02:00
Naz
10a24393d0 🐛 Fixed alert notifications being sent out to non-active users
refs https://linear.app/tryghost/issue/CORE-63/restrict-update-service-notifications-to-active-admins

- It only makes sense to notify active users about a notification of 'alert' or any other type really.
2021-10-06 22:34:25 +02:00
Renovate Bot
f3efd9834a
Update dependency @sentry/node to v6.13.3 2021-10-06 17:34:22 +00:00
Fabien O'Carroll
6220406716 Added support for Offers with Stripe Checkout
refs https://github.com/TryGhost/Team/issues/1090

This updates the Members & Offers modules to provide support for using
Offers in Stripe Checkout.

Members module now needs a handle to the Offers module repository, and
as such we have had to reorder the services boot order.
2021-10-06 17:24:39 +02:00
Hannah Wolfe
726db1c0ec
Added integration test config & moved db-driven tests
- some tests are necessarily driven from the db
- these are like unit tests, except they only make sense if using the db - else you have to stub too much to make them worthwhile
- for these rare but important cases, we have the clear concept of integration tests
2021-10-06 13:51:24 +01:00
Hannah Wolfe
624414e0c1
Moved server e2e tests to own folder
- We have a bunch of important server-related e2e tests
- Make these clear in their own folder
- "server" is everything that isn't the api or the frontend - kind of a catch-all concept
2021-10-06 12:55:37 +01:00
Hannah Wolfe
1dec3d56b1
Renamed our acceptance tests to "e2e"
- These are end-to-end tests, make it clearer what they are and what they are supposed to do
2021-10-06 12:40:52 +01:00
Fabien O'Carroll
3742a4afb7 Added Offers service
refs https://github.com/TryGhost/Team/issues/1083

This adds the Offers service which will allow us to build out an Admin
API to communicate with it. As well as wiring up the redirects to the
site app.
2021-10-06 12:33:19 +02:00
Renovate Bot
4f406318a9 Update dependency coffeescript to v2.6.1 2021-10-05 09:29:46 +01:00
Renovate Bot
9e7a789575 Update dependency postcss to v8.3.9 2021-10-05 08:35:08 +01:00
Daniel Lockyer
0ec6b425ee
Merged v4.17.1 into main
v4.17.1
2021-10-05 08:33:42 +01:00
Daniel Lockyer
a145c7b1b8 v4.17.1 2021-10-05 08:31:40 +01:00
Fabien O'Carroll
cda041d424 Moved StripeAPIService to its own service
refs https://github.com/TryGhost/Team/issues/1083

The Offers service is going to need access to the StripeAPIService too,
so we need to move it out of the @tryghost/members-api module and make
it accessible to both.
2021-10-04 19:28:19 +02:00
Renovate Bot
2acbf9fb50 Update dependency @tryghost/zip to v1.1.17 2021-10-04 16:40:06 +01:00
Renovate Bot
ada99d3e9d Update dependency @tryghost/package-json to v1.0.5 2021-10-04 16:12:35 +01:00
Renovate Bot
7941bfcafa Update dependency @tryghost/vhost-middleware to v1.0.18 2021-10-04 16:10:38 +01:00
Renovate Bot
d6347d80b3 Update dependency @tryghost/security to v0.2.12 2021-10-04 16:10:26 +01:00
Renovate Bot
18a6f536a1 Update dependency @tryghost/job-manager to v0.8.10 2021-10-04 16:08:02 +01:00
Renovate Bot
e24adb436b Update dependency @tryghost/session-service to v0.1.27 2021-10-04 16:05:54 +01:00
Renovate Bot
da0d97449f Update dependency @tryghost/promise to v0.1.12 2021-10-04 16:05:40 +01:00
Renovate Bot
e657527fa8 Update dependency @tryghost/mw-session-from-token to v0.1.25 2021-10-04 16:03:58 +01:00
Renovate Bot
682bb1cb1e Update dependency @tryghost/limit-service to v0.6.4 2021-10-04 16:03:40 +01:00
Renovate Bot
79f778c469 Update dependency @tryghost/errors to v0.2.16 2021-10-04 16:03:27 +01:00
Renovate Bot
9412515e98 Update dependency @tryghost/image-transform to v1.0.16 2021-10-04 16:00:43 +01:00
Renovate Bot
55f951f58f Update dependency @tryghost/constants to v0.1.11 2021-10-04 16:00:34 +01:00
Renovate Bot
ed069d51d3 Update dependency @tryghost/bootstrap-socket to v0.2.12 2021-10-04 16:00:27 +01:00
Renovate Bot
e53bafb1aa Update dependency @tryghost/adapter-manager to v0.2.17 2021-10-04 16:00:18 +01:00
Kevin Ansfield
28fb6f2939 Fixed errors when syncing theme settings
no issue

- bumped `@tryghost/custom-theme-settings-service`
- fixes errors when a previously seen theme setting has been removed from the theme when syncing
- fixes settings for non-active theme being deleted/updated instead of just settings for the current theme
2021-10-04 12:17:41 +01:00
Renovate Bot
c2ea67b2ff
Update metascraper to v5.24.8 2021-10-04 00:23:21 +00:00
Daniel Lockyer
e0f6d59046 v4.17.0 2021-10-01 16:00:30 +01:00
Fabien O'Carroll
ea42fac527 Charged payment for Subscription upgrades immediately
refs https://github.com/TryGhost/Team/issues/1075

This includes changes to how we handle upgrading subscriptions to ensure
that members are immediately charged for upgrades. This fixes a flaw
where upgrading would not be charged until the end of the current
billing cycle, essentially giving free upgraded access for a period of
time.
2021-10-01 13:22:19 +02:00
Renovate Bot
ef20a564a1 Update dependency @tryghost/email-analytics-provider-mailgun to v1.0.2 2021-10-01 11:25:19 +01:00
Renovate Bot
64124b9cea Update dependency @tryghost/email-analytics-service to v1.0.2 2021-10-01 10:48:19 +01:00
Renovate Bot
dedfebfdca Update dependency @tryghost/constants to v0.1.10 2021-10-01 10:19:16 +01:00
Renovate Bot
12451d413d Update dependency @tryghost/errors to v0.2.15 2021-10-01 09:54:05 +01:00
Renovate Bot
795cf55c11 Update dependency @tryghost/image-transform to v1.0.15 2021-10-01 09:53:58 +01:00
Renovate Bot
e28b87c836 Update dependency @tryghost/package-json to v1.0.4 2021-10-01 09:53:49 +01:00
Renovate Bot
1e749d78d8 Update dependency @tryghost/session-service to v0.1.26 2021-10-01 09:53:43 +01:00
Renovate Bot
47a582b51c Update dependency @tryghost/vhost-middleware to v1.0.17 2021-10-01 09:53:23 +01:00
Renovate Bot
55ee3ea1c6 Update dependency @tryghost/mw-session-from-token to v0.1.24 2021-10-01 08:41:24 +01:00
Renovate Bot
7be5e861c7 Update dependency @tryghost/security to v0.2.11 2021-10-01 08:41:01 +01:00
Renovate Bot
612a202525 Update dependency @tryghost/promise to v0.1.11 2021-10-01 08:40:52 +01:00
Renovate Bot
4ac27cd889 Update dependency @tryghost/bootstrap-socket to v0.2.11 2021-10-01 08:40:14 +01:00
Renovate Bot
a98b1e8541 Update dependency @tryghost/adapter-manager to v0.2.16 2021-10-01 08:40:09 +01:00
Renovate Bot
99fdfe8ec8 Update dependency @tryghost/config-url-helpers to v0.1.2 2021-10-01 08:40:01 +01:00
Renovate Bot
568dfc7d34 Update dependency @tryghost/tpl to v0.1.5 2021-10-01 08:39:16 +01:00
Renovate Bot
656237a7cf Update dependency @tryghost/zip to v1.1.16 2021-10-01 08:39:07 +01:00
Renovate Bot
07a7c0ea4c Update dependency @tryghost/limit-service to v0.6.3 2021-10-01 08:38:51 +01:00
Renovate Bot
9642635ca9 Update dependency @tryghost/job-manager to v0.8.9 2021-10-01 08:38:40 +01:00
renovate[bot]
1b6253e140
Update dependency @tryghost/members-importer to v0.3.3 (#13372)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-09-29 10:58:10 +02:00
Kevin Ansfield
59adb9a9cb Added route for updating custom theme settings
refs https://github.com/TryGhost/Team/issues/1070

- bumped `@tryghost/custom-theme-settings-service` for access to `.updateSettings()`
- added `PUT /custom_theme_settings` route that delegates to `customThemeSettingsService.updateSettings()` to perform the db and cache updates
- invalidates the cache in Ghost because a theme setting change will mean the front-end output will change
2021-09-28 16:09:39 +01:00
Daniel Lockyer
1e5f28727d
🐛 Fixed mail config not respecting disabled secure connections
refs https://forum.ghost.org/t/un-noticed-email-config-change-in-4-15-16/25869/6
refs https://linear.app/tryghost/issue/CORE-66/fixed-secureconnection-alias-for-nodemailer

- `secureConnection` was removed in Nodemailer 1.0.2 in favor of
  `secure` but we're locked into supporting it because a lot of
  our users will have it in their config
- I attempted to alias it to keep compatibility but I did this
  incorrectly and only handled the cases where it was set to `true`
- this meant users who had disabled secure connections were seeing SSL
  warnings because the library was trying to connect via SSL to a
  non-SSL endpoint
- the aliasing is fixed in `@tryghost/nodemailer` 0.3.3 and so this
  commit bumps the package in Ghost
2021-09-28 15:19:36 +01:00
renovate[bot]
9797787c4b
Update dependency @tryghost/magic-link to v1.0.13 (#13370)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-09-28 16:09:07 +02:00
renovate[bot]
135bb6a4a4
Update dependency @tryghost/members-csv to v1.1.7 (#13371)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-09-28 16:08:50 +02:00
renovate[bot]
7044fd459e
Update dependency @tryghost/members-ssr to v1.0.14 (#13373)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-09-28 15:44:06 +02:00
Fabien O'Carroll
b22050c037 Added initial support for Offers 1-day version
refs https://github.com/TryGhost/Team/issues/1090

This updates the members-api to allow passing an Offer ID when creating
a Stripe Checkout Session. This will be used for the 1-day version of
Offers.
2021-09-28 15:10:27 +02:00
Renovate Bot
328a88087b
Update metascraper to v5.24.7 2021-09-27 21:15:26 +00:00
Renovate Bot
85c46b4eda Update dependency postcss to v8.3.8 2021-09-27 13:00:59 +01:00
Kevin Ansfield
2947db0e6b
Added API endpoint for browsing custom theme settings (#13362)
refs https://github.com/TryGhost/Team/issues/1070

- bumped `@tryghost/custom-theme-settings-service` to get access to `.listSettings()` method
- added GET `/api/canary/admin/theme_settings/` route behind `'customThemeSettings'` feature flag that uses the custom theme settings service to return settings resources that are a combination of the theme-provided definition and the saved value
2021-09-27 11:31:47 +01:00
Renovate Bot
91a6917563
Update dependency mocha to v9.1.2 2021-09-27 03:11:58 +00:00
Daniel Lockyer
a3f46708e2
v4.16.0 2021-09-23 16:04:57 +01:00
Kevin Ansfield
04dd409243
Added syncing and theme exposure of custom theme settings (#13354)
refs https://github.com/TryGhost/Team/issues/1070

- added `@tryghost/custom-theme-settings-service` as a dependency
- `core/server/services/custom-theme-settings` creates an instance of the new service passing in the model used for storing the setting keys/values and a cache instance
- requiring `core/shared/services/custom-theme-settings-cache` creates a cache instance, it has no dependencies so can be required anywhere and the first require will initialize the shared instance
- updated the theme activation bridge to trigger the theme settings service to sync the newly activated theme settings and populate the cache
- updated theme validation to pass `labs` through as an option so that we get custom theme settings back as part of the checked theme as that's what is passed to the custom theme settings service
2021-09-23 12:44:39 +01:00
Renovate Bot
cecec3d253 Update dependency @tryghost/email-analytics-service to v1.0.1 2021-09-23 12:39:32 +01:00
Fabien O'Carroll
91907cd900 Bumped @tryghost/members-api for security patch
refs https://github.com/TryGhost/Ghost/commit/944c2cc9af

The original fix for this happened off of `main` on a separate branch for
v4.15.1 - the same was the case for the @tryghost/members-api package.

Because work happened on both packages in `main`, since the versions
that were patched, we needed to rebump the dependency here to include
the changes.
2021-09-23 12:18:08 +02:00
Daniel Lockyer
57664696a4 v4.15.1
-----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQTqYa7kNs8D7Oo9dgLSEYbwtHKVrQUCYUxOIgAKCRDSEYbwtHKV
 reO6AQCL2mFdVLBwRbpVQa2Zs9RlYKk88ivLRMpAZPPiElNblQEAqt710wrVbMwm
 hOOWbWdFpPOWCrop9zhO8GJSPeNpJw0=
 =Ff3M
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQTqYa7kNs8D7Oo9dgLSEYbwtHKVrQUCYUxTawAKCRDSEYbwtHKV
 ra28AQCcambctLCH70Sc7SJmexojA5k6Ti0p3pwOktWY/WygZQEAlMEHSDw89wdY
 3U8R8zY1d1MeXqj51Op95sTYwiDAjg8=
 =HoUL
 -----END PGP SIGNATURE-----

Merged v4.15.1 into main

v4.15.1
2021-09-23 11:13:56 +01:00
Daniel Lockyer
94d3f556e6
v4.15.1 2021-09-23 10:51:30 +01:00
Fabien O'Carroll
944c2cc9af
🔒 Fixed member email change vulnerability
refs https://github.com/TryGhost/Ghost/security/advisories/GHSA-65p7-pjj8-ggmr

This updates the signup/signin flow for members to no longer support the
email address change flow - which had missing authentication. It has
been replaced with a dedicated email change flow, and Portal has been
updated to use it.
2021-09-23 10:49:30 +01:00
Renovate Bot
8560aa6b34 Update dependency @tryghost/email-analytics-provider-mailgun to v1.0.1 2021-09-23 10:09:38 +01:00
Daniel Lockyer
20870aa2fa
🐛 Fixed sending emails via SES or non-standard SMTP config
fixes https://linear.app/tryghost/issue/CORE-45/

- this commit fixes two email related issues:
    - SES transport: the auth mechanism was set up wrong and so none of
      the requests would go through. This now follows the docs on https://nodemailer.com/transports/ses/
    - SMTP transport: the latest versions of Nodemailer don't seem to
      allow overriding of options if a service is present. I've filed
      https://github.com/nodemailer/nodemailer/issues/1327 but in the
      mean time, I assign the options back to the transporter object
      to ensure they always get applied
- I've fixed this in our `@trghost/nodemailer` package and so this commit
  bumps that here
2021-09-23 10:08:43 +01:00
Renovate Bot
592ac2dcb7
Update dependency @tryghost/update-check-service to v0.2.2 2021-09-23 10:08:43 +01:00
Renovate Bot
701d5555a2
Update dependency glob to v7.2.0 2021-09-23 01:03:51 +00:00
Renovate Bot
5da0caf9cc Update dependency @tryghost/package-json to v1.0.3 2021-09-22 19:17:29 +01:00
Renovate Bot
99c776aa10 Update dependency @tryghost/constants to v0.1.9 2021-09-22 19:17:20 +01:00
Renovate Bot
c52d1bbe37 Update dependency @tryghost/job-manager to v0.8.8 2021-09-22 19:17:12 +01:00
Renovate Bot
9c64228e13 Update dependency @tryghost/mw-session-from-token to v0.1.23 2021-09-22 19:17:05 +01:00
Renovate Bot
ee67df704e Update dependency @tryghost/vhost-middleware to v1.0.16 2021-09-22 19:16:58 +01:00
Renovate Bot
cabb7c779b Update dependency @tryghost/security to v0.2.10 2021-09-22 19:16:45 +01:00
Renovate Bot
a8fb066c71 Update dependency @tryghost/limit-service to v0.6.2 2021-09-22 18:02:34 +01:00
Renovate Bot
e6845237e0 Update dependency @tryghost/image-transform to v1.0.14 2021-09-22 18:02:09 +01:00
Renovate Bot
ca798ccb73 Update dependency @tryghost/errors to v0.2.14 2021-09-22 18:02:00 +01:00
Renovate Bot
cd008a6d48 Update dependency @tryghost/config-url-helpers to v0.1.1 2021-09-22 18:01:50 +01:00
Renovate Bot
db907f88f2 Update dependency @tryghost/bootstrap-socket to v0.2.10 2021-09-22 18:01:44 +01:00
Renovate Bot
0c4e119483 Update dependency @tryghost/adapter-manager to v0.2.15 2021-09-22 18:01:38 +01:00
Renovate Bot
be47f78293 Update dependency @tryghost/promise to v0.1.10 2021-09-22 18:01:17 +01:00
Renovate Bot
27ce353222 Update dependency @tryghost/session-service to v0.1.25 2021-09-22 18:01:07 +01:00
Renovate Bot
db2c7b64dd Update dependency @tryghost/tpl to v0.1.4 2021-09-22 18:00:59 +01:00
Renovate Bot
40fd068229 Update dependency @tryghost/zip to v1.1.15 2021-09-22 18:00:40 +01:00
Renovate Bot
23bece59a9 Update dependency @tryghost/update-check-service to v0.2.2 2021-09-22 16:31:51 +01:00
Rishabh
4c4efc3a3a Added member analytics events handling
refs https://github.com/TryGhost/Team/issues/1064
refs https://github.com/TryGhost/Team/issues/1056
refs https://github.com/TryGhost/Team/issues/1054
refs https://github.com/TryGhost/Team/issues/1055

- adds handling for new member analytic events including new ingress endpoint
- introduces member-analytics packages and code
2021-09-22 18:21:10 +05:30
renovate[bot]
e9e9d90ec4
Update dependency @tryghost/members-ssr to v1.0.13 (#13332)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-09-22 11:33:14 +02:00
renovate[bot]
bbe6a0a933
Update dependency @tryghost/magic-link to v1.0.12 (#13331)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-09-22 11:32:59 +02:00
Renovate Bot
c8afdac0c9 Update dependency postcss to v8.3.7 2021-09-22 10:01:09 +01:00
Renovate Bot
ebf13f07a0
Update dependency @sentry/node to v6.13.2 2021-09-21 16:32:20 +00:00
Renovate Bot
7c1192fc20
Update dependency @sentry/node to v6.13.1 2021-09-20 18:46:49 +00:00
Renovate Bot
9615d76ff3
Update dependency @sentry/node to v6.13.0 2021-09-20 15:08:22 +00:00
Daniel Lockyer
8a534c5b14
🐛 Fixed sending emails via SES or non-standard SMTP config
fixes https://linear.app/tryghost/issue/CORE-45/

- this commit fixes two email related issues:
    - SES transport: the auth mechanism was set up wrong and so none of
      the requests would go through. This now follows the docs on https://nodemailer.com/transports/ses/
    - SMTP transport: the latest versions of Nodemailer don't seem to
      allow overriding of options if a service is present. I've filed
      https://github.com/nodemailer/nodemailer/issues/1327 but in the
      mean time, I assign the options back to the transporter object
      to ensure they always get applied
- I've fixed this in our `@trghost/nodemailer` package and so this commit
  bumps that here
2021-09-20 15:53:44 +01:00
Renovate Bot
12f59e7ec0 Update dependency coffeescript to v2.6.0 2021-09-20 08:04:52 +01:00
Daniel Lockyer
7ffa5414b5
v4.15.0 2021-09-17 16:58:45 +01:00
Daniel Lockyer
93e4b2eafd 🔒 Fixed remote command injection when using sendmail email transport
refs https://github.com/TryGhost/Ghost/security/advisories/GHSA-wfrj-qqc2-83cm
refs https://github.com/advisories/GHSA-48ww-j4fc-435p

- a vulnerability in `nodemailer` means that the `sendmail` transport is
  vulnerable to command injection for flags passed to the `sendmail`
  binary
- updating to the latest version of Nodemailer required creating
  `@tryghost/nodemailer`, which is a wrapper around Nodemailer and
  several plugins that used to be in the core
- this commit switches to using that package, and fixes up some small
  code + test changes
2021-09-17 16:46:51 +01:00
Hannah Wolfe
ac82554f3e
Added command for finding slow regression tests
- A tiny tool to help us prioritise killing regression tests
2021-09-17 13:35:41 +01:00
Renovate Bot
3eb41d3e36 Update dependency @tryghost/root-utils to v0.3.4 2021-09-15 08:44:13 +01:00
Renovate Bot
fc66c6621f Update dependency @tryghost/logging to v0.1.7 2021-09-15 08:44:04 +01:00
Renovate Bot
b6c8a8efdf Update dependency @tryghost/validator to v0.1.5 2021-09-15 08:43:53 +01:00
Renovate Bot
3e7f9cd54c Update dependency @tryghost/request to v0.1.5 2021-09-14 18:30:37 +01:00
Renovate Bot
ac7f92b8d5 Update dependency @tryghost/debug to v0.1.5 2021-09-14 18:30:22 +01:00
Renovate Bot
50dfe20369 Update dependency @tryghost/bookshelf-plugins to v0.3.1 2021-09-14 17:51:14 +01:00
Renovate Bot
18945ef805 Update dependency @tryghost/version to v0.1.4 2021-09-14 17:50:46 +01:00
Renovate Bot
fb452d739a
Update dependency sanitize-html to v2.5.1 2021-09-14 14:56:18 +00:00
Daniel Lockyer
d4adae775e v4.14.0
-----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQTqYa7kNs8D7Oo9dgLSEYbwtHKVrQUCYUB7mgAKCRDSEYbwtHKV
 rYTGAP9dggMBUTq6+2yLyYHChVMqLez2WS/XmgTdC4mc2tsZzgD+J2/zhRObGYX0
 d54Y39pAw7rPV8Z8md9nCm9olPpE4AM=
 =w206
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQTqYa7kNs8D7Oo9dgLSEYbwtHKVrQUCYUB8kwAKCRDSEYbwtHKV
 rTGVAP4wqFwWwQUFUXX4tLbvcLKQalvHQI3soLFneAzZT1M3DQEAtWO+crkH2auN
 Agt8ND2ndlIzsyGxYywliajBfbQVZwM=
 =nFhH
 -----END PGP SIGNATURE-----

Merged v4.14.0 into main

v4.14.0
2021-09-14 11:42:21 +01:00
Daniel Lockyer
48a906b879
v4.14.0 2021-09-14 11:38:18 +01:00
Renovate Bot
5251d1e559
Update dependency analytics-node to v5.1.0 2021-09-13 22:22:11 +00:00
Renovate Bot
66a705930c
Update metascraper to v5.24.6 2021-09-13 08:35:39 +00:00
Kevin Ansfield
a277ff5bf4 Bumped @tryghost/kg-* dependencies
no issue

- includes bump to minimum version of `markdown-it` for consistency between Ghost and Admin markdown rendering
2021-09-13 09:34:18 +01:00
Daniel Lockyer
0c7c34ff67 Updated bookshelf-relations dependency to 2.2.0 2021-09-10 16:59:11 +01:00
Daniel Lockyer
7b93efddd0 Updated bookshelf dependency to 1.2.0 2021-09-10 16:59:11 +01:00
Renovate Bot
74c43bcea5 Update dependency c8 to v7.9.0 2021-09-10 11:25:21 +01:00
Daniel Lockyer
10fa1283ca Updated ghost-storage-base to v0.0.6
no issue

- this package has been bumped to support Node 12 + 14
- AFAICT I added it to the Renovate list back when we had some timezone
  issues with moment, but we've since pinned the version of moment so we
  shouldn't experience that now
- therefore this commit also removes it from the Renovate ignore list
2021-09-09 10:15:26 +01:00
Renovate Bot
c05432889a
Update dependency sanitize-html to v2.5.0 2021-09-08 21:18:14 +00:00
Fabien O'Carroll
07e595b9aa Fixed webhook handler when Stripe is not connected
no-issue

The webhook handler did not correctly check for whether or not Stripe
was connected, and would attempt to handle webhooks anyway, resulting in
errors due to missing Stripe config. This fixes the handler to exit
early.
2021-09-08 12:41:20 +02:00
Renovate Bot
0bb14c115b Update dependency @tryghost/members-importer to v0.3.2 2021-09-08 10:34:07 +02:00
Fabien O'Carroll
fd574f527c Removed webhooks when disconnecting stripe
refs https://github.com/TryGhost/Team/issues/1006

The @tryghost/members-api module has been updated to remove webhooks
from Stripe when disconnecting. This will ensure that we do not leave
around old/invalid webhooks that will not be handled and generate
errors.
2021-09-07 18:58:25 +02:00
Fabien 'egg' O'Carroll
cd89c7e427
Used @tryghost/members-api Stripe disconnect logic (#13290)
refs https://github.com/TryGhost/Team/issues/1006

Moving the logic of disconnecting Stripe into the members-api module
decouples the Ghost API from the Members API internals. This method can
now be updated independently of Ghost, to implement the deletion of
webhooks from Stripe.
2021-09-07 18:25:53 +02:00
Fabien 'egg' O'Carroll
ae844db60b
Fixed handling of Complimentary Stripe subscriptions (#13289)
refs https://github.com/TryGhost/Team/issues/995

Since we reintroduced the comped status, we did not update the
subscription handling to correctly set members to a status of comped
when they were on a 'Complimentary' plan. This meant that 'comped' members
had a status of 'paid'. The changes to @tryghost/members-api ensure that
handling subscriptions going forward will not result in this error.

Since we handle the Complimentary plan correctly now, we do not need to
manually check for the existence of one, we can instead rely on the
status to set the `comped` flag.
2021-09-07 11:31:47 +01:00
renovate[bot]
677dc1a59b
Update dependency @tryghost/members-csv to v1.1.6 (#13273)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-09-06 16:16:10 +01:00
renovate[bot]
a8902bd1f8
Update dependency @tryghost/members-ssr to v1.0.12 (#13275)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-09-06 16:16:01 +01:00
renovate[bot]
b8b9707ddb
Update dependency @tryghost/magic-link to v1.0.11 (#13272)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-09-06 16:15:46 +01:00
Renovate Bot
f34a862526 Update dependency @tryghost/helpers to v1.1.52 2021-09-06 12:32:34 +01:00
Renovate Bot
b89967f9fb Update dependency @tryghost/logging to v0.1.6 2021-09-06 12:32:26 +01:00
Daniel Lockyer
5d700c6a79 v4.13.0
-----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQTqYa7kNs8D7Oo9dgLSEYbwtHKVrQUCYTX5vAAKCRDSEYbwtHKV
 rensAP9Oicx5z/VxT+24aUZye7ZAGKtixkcAD5t8mHL2sVOYtAEArmbbWcY7QObf
 e3xUbOTujGOkYdirKrnc4jSqhpPypAM=
 =IYQa
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQTqYa7kNs8D7Oo9dgLSEYbwtHKVrQUCYTX7TgAKCRDSEYbwtHKV
 reiOAQCp6medOlKFGD3uq9v/umvOn7+XQeKLQ0ELxXR80X/YrQD+Nych2u4kdHdC
 d060V9Bj1sNRcuuztwqJZx+iFg+jvwk=
 =wCw4
 -----END PGP SIGNATURE-----

Merged v4.13.0 into main

v4.13.0
2021-09-06 12:28:04 +01:00
Daniel Lockyer
8458e14b05
v4.13.0 2021-09-06 12:21:32 +01:00
Fabien O'Carroll
31fafcb936
Fixed errors when creating complimentary subscriptions
no-issue

The ProductRepository changed to require the options parameter which is
not passed when created complimentary subscriptions. This updates the
code to no longer require the options parameter and instead provide a
default.
2021-09-06 12:04:25 +01:00
Fabien O'Carroll
dd2def277c Fixed errors when creating complimentary subscriptions
no-issue

The ProductRepository changed to require the options parameter which is
not passed when created complimentary subscriptions. This updates the
code to no longer require the options parameter and instead provide a
default.
2021-09-06 12:55:20 +02:00
Renovate Bot
7851e4ce52
Update dependency oembed-parser to v1.4.8 2021-09-03 03:32:36 +00:00
Fabien O'Carroll
a39dd7255d Fixed updating products inside of a transaction
no-issue

When updating products we make many reads and writes to the database,
some of these reads were not happening inside of a transaction which was
causing issues when loading the members setting page. This bumps the
@tryghost/members-api dependency to ensure that all of the database
operations happen inside of the transaction
2021-09-01 19:14:21 +02:00
Naz
4f78bf01a2 Moved default settings population test to regression suite
closes https://github.com/TryGhost/Team/issues/860
refs 5405b6ca7c

- The slow test was running slow because it's not a "unit test" it is testing much more. Moved it to a correct suite - regression which simplified the logic a lot (no need to mock db calls).
- Brought back the 2000ms limit as the bottleneck has been solved
2021-09-01 15:23:57 +04:00
renovate[bot]
f52d0136ef
Update dependency @tryghost/kg-mobiledoc-html-renderer to v5.1.1 (#13251)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-09-01 09:12:09 +01:00
renovate[bot]
2f2939ec1b
Update dependency @tryghost/color-utils to v0.1.2 (#13269)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-09-01 09:11:21 +01:00
Naz
5405b6ca7c Temporarily lifted unit test timeout threshold
refs https://github.com/TryGhost/Team/issues/860

- Lifting it slightly just so the timeout doesn't waste team's time on false-positive failures. A follow up commit should put the threshold back to the original value and solve the slow test
2021-09-01 11:12:17 +04:00
Naz
75744041c1 Allowed for a 'sent' status in canary Admin Post API
refs https://github.com/TryGhost/Team/issues/892

- When a published email-only post is edited on the client it sends through a "sent" status over to the backend over PUT endpoint. It's a valid new status that should be accepted by the validation
2021-09-01 10:55:13 +04:00
Renovate Bot
966f167fd9
Update dependency @sentry/node to v6.12.0 2021-08-31 16:25:51 +00:00
Renovate Bot
ac57c1b364
Update dependency mocha to v9.1.1 2021-08-30 00:13:33 +00:00
Fabien O'Carroll
b895b87add Errored when creating products if any error occurs
refs https://github.com/TryGhost/Team/issues/982

When creating a Product with invalid data for Stripe, e.g. a price of
one gazillion dollars - the Stripe API requests would fail, but we would
end up with a broken product created in the database. This updates
@tryghost/members-api to wrap these calls in a database transaction, and
will roll back any operations if one of them fails.
2021-08-26 20:10:31 +02:00
Fabien 'egg' O'Carroll
9a1417c8b9
Exposed dummy subscriptions to theme layer (#13257)
refs https://github.com/TryGhost/Team/issues/986

This updates the @tryghost/members-api module to return the full member
object from getMemberIdentityData, which is used to populate req.member
used by themes to construct the `@member` template data.

The full object is read from the service which handles all additional
properties and logic for retrieving members, including the dummy
subscriptions for comped members.
2021-08-26 16:03:32 +01:00