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.
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
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
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
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
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.
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.
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.
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.
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.
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>
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
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
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
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
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
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.
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
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
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>
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
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
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)
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)
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.
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>`
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.
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.
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.
closesTryGhost/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
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.
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
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.
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
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
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
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
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.
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
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)
- 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
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
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
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.
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
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.
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
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
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
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.
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
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.
- 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
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.
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.
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.
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.