Commit Graph

3642 Commits

Author SHA1 Message Date
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