Commit Graph

1461 Commits

Author SHA1 Message Date
renovate[bot]
f3defb98f3
Update dependency @tryghost/members-ssr to v1.0.3 (#12978)
no-issue

This bumps internal dependencies inside @tryghost/members-ssr

Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-05-26 10:46:21 +01:00
renovate[bot]
c641929bdf
Update dependency @tryghost/magic-link to v1.0.3 (#12977)
no-issue

This just bumps dependencies within @tryghost/magic-link

Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-05-26 10:45:35 +01:00
Renovate Bot
ef49e5683f Update dependency juice to v8 2021-05-26 10:15:13 +01:00
Renovate Bot
9ae55eecfb
Update dependency sinon to v11.1.0 2021-05-25 14:14:19 +00:00
Renovate Bot
fbdb0c1bb9 Update dependency grunt to v1.4.1 2021-05-25 09:16:32 +01:00
Renovate Bot
572d4ee15c
Update metascraper to v5.21.10 2021-05-24 23:29:32 +00:00
Renovate Bot
93896acf5d
Update dependency sinon to v11 2021-05-24 21:44:33 +00:00
Fabien O'Carroll
40e1a09083 Fixed error message when Stripe not connected
refs https://github.com/TryGhost/Team/issues/704

Previously a customer message was not passed, and the default message
was used. This made a reference to, "someone else is editing the post"
which is incorrect in this context! The members-api has been updated
with an appropriate error message, with a link to our documentation.
2021-05-24 17:45:33 +01:00
Fabien O'Carroll
2000c3c156 Errored when Stripe is used without a connection
refs https://github.com/TryGhost/Team/issues/704

Currently when attempting to create stripe_prices without a Stripe
connection, it will fail silently. This is an issue when initially
configuring Members as the Stripe connection can take some time to be
established. By erroring we allow the client to be notifed that the
connection does not yet exist, so that it can be retried later.
2021-05-24 11:54:45 +01:00
renovate[bot]
01ac1acfcb
Fixed indescribable error in custom themes limit
refs f51c640fb0

- This should not affect any of the current code but should improve edge case errors related to "allowlist" types of limits
- See referenced commit for details when this edgecase was happening
2021-05-24 22:09:18 +12:00
Renovate Bot
2cd687b7cf Update dependency cssnano to v5.0.4 2021-05-24 08:50:36 +01:00
Renovate Bot
e03f99a8f3
Update dependency eslint to v7.27.0 2021-05-24 00:31:56 +00:00
Fabien O'Carroll
730811fb6e Handled week & day interval in population of mrr events
refs https://github.com/TryGhost/Team/issues/635

This is to ensure we don't break migrations for any sites which have
imported external subscriptions which have an interval of 'week' or
'day'

The bump to members-api includes the handling of these intervals for
ongoing population of mrr events
2021-05-21 17:57:17 +01:00
Renovate Bot
6d2890c1a8
Update metascraper to v5.21.9 2021-05-21 10:16:46 +00:00
Renovate Bot
d08ea611b7 Update dependency cssnano to v5.0.3 2021-05-21 09:14:36 +01:00
Renovate Bot
5aaa910a2e Update dependency @tryghost/job-manager to v0.8.6 2021-05-21 09:08:54 +01:00
Renovate Bot
9010932466
Update dependency sanitize-html to v2.4.0 2021-05-20 16:28:50 +00:00
Fabien O'Carroll
253eee627c Removed boot precondition checks from members-api
refs https://github.com/TryGhost/Team/issues/598
refs https://github.com/TryGhost/Ghost/commit/5cdf910e

Since we have moved the preconditon checks into this codebase, we no
longer need the members-api module to run them. This bump includes the
changes to remove the last of those checks.
2021-05-20 12:14:14 +01:00
Renovate Bot
d98334eb89
Update dependency express-session to v1.17.2 2021-05-19 20:47:30 +00:00
Renovate Bot
fd394f0c3a
Update dependency @sentry/node to v6.4.1 2021-05-19 18:16:24 +00:00
Fabien O'Carroll
0e77b378a6 Migrated members_{monthly,yearly}_price_id settings
refs https://github.com/TryGhost/Team/issues/698

The migrations to populate these settings are handled by the members-api
module, as they depend on the stripe_prices table being populated. This
cannot be guarunteed at boot, so we're unable to do this as a standard
migration.
2021-05-19 15:37:20 +01:00
Renovate Bot
ae98bf5a6d Update dependency mock-knex to v0.4.10 2021-05-18 11:05:31 +01:00
Renovate Bot
2af3d760a2
Update dependency @sentry/node to v6.4.0 2021-05-17 08:09:59 +00:00
renovate[bot]
3b5ce73026
Update dependency @tryghost/session-service to v0.1.22 (#12965)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-05-14 18:35:36 +02:00
Renovate Bot
421d457430 Update dependency @tryghost/helpers to v1.1.45 2021-05-13 10:07:59 +01:00
Naz
eb7e4bb815 🐛 Fixed frontmatter-related validation error
refs https://github.com/TryGhost/Team/issues/687

- The frontmatter field has leaked into the API layer unintentionally when it was introduced into the DB schema during 4.0 release.
- The fix add the field to "trim" list in all API. A proper validation and handling will be add per API as usecase for the field becomes clear
2021-05-13 12:14:05 +04:00
Fabien O'Carroll
ed0f90a82d Fixed errors when importing comped Members
no-issue

The logic for finding the zero-value price to be used was broken, and
this patch to members-api fixes it
2021-05-11 12:13:48 +01:00
Renovate Bot
83d4a19757 Update dependency @tryghost/url-utils to v1.1.4 2021-05-11 12:09:16 +01:00
Renovate Bot
0b94b930b7 Update dependency @tryghost/html-to-mobiledoc to v0.7.16 2021-05-11 12:09:04 +01:00
Renovate Bot
a316ddd528 Update dependency @tryghost/helpers to v1.1.44 2021-05-10 20:37:26 +01:00
Fabien O'Carroll
8add0e04f5 Updated members-api to work with multiple products
refs https://github.com/TryGhost/Team/issues/682
refs https://github.com/TryGhost/Team/issues/650

- Provide backwards compatibility for the `comped` flag in the API and
  the importer.
- Ensures the default stripe product name is kept in sync with the name
  of the Ghost Product
- Updates the webhook handling to work with multiple products
2021-05-10 20:23:35 +01:00
Kevin Ansfield
c36e749820
Added support for gating content by member labels and products (#12946)
refs https://github.com/TryGhost/Team/issues/581
closes https://github.com/TryGhost/Team/issues/582

Emails can now be sent to members with specific associated labels or products by specifying an NQL string. We want to bring the same members segment feature to content by allowing `visibility` to be an NQL filter string on top of the `public/members/paid` special-case strings.

As an example it's possible to set `posts.visibility` to `label:vip` to make a post available only to those members with the `vip` label.

- removed enum validations for `visibility` so it now accepts any string or `null`
    - bumped `@tryghost/admin-api-schema` for API-level validation changes
- added nql validation to API input validators by running the visibility query against the members model
- added transform of NQL to special-case visibility values when saving post model
    - ensures there's a single way of representing "members" and "paid" where NQL gives multiple ways of representing the same segment
    - useful for keeping theme-level checks such as `{{#has visibility="paid"}}` working as expected
- updated content-gating to parse nql from post's visibility and use it to query the currently logged in member to see if there's a match
    - bumped @tryghost/members-api to include label and product data when loading member
2021-05-10 19:32:11 +01:00
Renovate Bot
e73d26d9da Update dependency @tryghost/string to v0.1.19 2021-05-10 17:33:38 +01:00
Renovate Bot
285a722444 Update dependency @tryghost/social-urls to v0.1.24 2021-05-10 17:28:25 +01:00
Renovate Bot
e7f300d4d2
Update dependency @sentry/node to v6.3.6 2021-05-10 09:23:15 +00:00
Renovate Bot
ec0a8c1d2f
Update dependency eslint to v7.26.0 2021-05-10 01:42:57 +00:00
Renovate Bot
8308db8eac
Update dependency mocha to v8.4.0 2021-05-07 20:26:12 +00:00
Renovate Bot
420ab29039 Update dependency @tryghost/package-json to v0.1.1 2021-05-07 16:14:45 +01:00
Daniel Lockyer
0a72bfc82b
Updated lockfile
no issue

- this commit updates the lockfile which was missing from the bump to
  the limit-service - d72ba77aba
2021-05-07 16:09:24 +01:00
Naz
d72ba77aba Added support for max periodic limit check
refs https://github.com/TryGhost/Team/issues/588

- This is a new type of limit allowing to measure resource use (e.g. sent emails) per period (e.g. subscription, billing, cycle, etc)
- To enable periodical limit add  following values under `hostSettings.limits`:
```
"emails": {
    "maxPeriodic": 10,
    "error": "Your plan supports up to {{max}} emails. Please upgrade to reenable sending emails."
}
```
and following under `hostSettings.subscription`:
```
"subscription": {
    "start": "2020-04-02T15:53:55.000Z",
    "interval": "month"
}
```
- Above config would allow checking if 10 emails per month starting on the 2nd of every month has been reached untill now
2021-05-07 18:43:47 +04:00
Hannah Wolfe
781cc6f304
Switched to eslint-plugin-node + fix eslint test perf
refs: https://github.com/TryGhost/Ghost/commit/7bce05ab8

- I wrote a custom plugin for the no-cross-requires logic between our modules after not finding anything that could do it
- Then, when searching for the next rule I wanted, I found eslint-plugin-ghost has no-restricted-requires
- This rule is more flexible, so switching to it
- NOTE: This update to eslint-plugin-ghost also fixes performance of linting our test files by pinning eslint-plugin-mocha to v7 as v8 has performance problems
2021-05-07 13:25:18 +01:00
Renovate Bot
576a1ce5b7 Update dependency @tryghost/mw-session-from-token to v0.1.20 2021-05-07 13:10:55 +01:00
Renovate Bot
93de578939 Update dependency @tryghost/session-service to v0.1.21 2021-05-07 12:46:25 +01:00
Renovate Bot
80033a57b7 Update dependency @tryghost/job-manager to v0.8.5 2021-05-07 12:46:14 +01:00
Renovate Bot
037a443f49 Update dependency @tryghost/zip to v1.1.13 2021-05-07 12:45:30 +01:00
Daniel Lockyer
b1499d4037 Extracted package-json lib to Utils
refs 37ebe723c6

- `package-json` was a standalone library using dependency injection so
  we could pull it out into its own package in Utils
- this was done in the commit referenced above
- this commit removes the implementation and tests in Ghost and replaces
  the require in the initialization wrapper with the new package
2021-05-07 12:35:06 +01:00
Renovate Bot
103b5bff56
Update dependency glob to v7.1.7 2021-05-06 22:37:19 +00:00
Renovate Bot
de1d77b86d Update dependency image-size to v1 2021-05-05 17:14:40 +01:00
Renovate Bot
3af01b350f Lock file maintenance 2021-05-05 17:13:23 +01:00
Renovate Bot
a795e12ffe Update dependency fs-extra to v10 2021-05-05 16:06:45 +01:00