Commit Graph

1422 Commits

Author SHA1 Message Date
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
Daniel Lockyer
470f2a8728
Updated dependency grunt-contrib-compress to v2
- this reverts commit 4be4af9c18 because
  we have now dropped Node 10
2021-05-05 15:46:02 +01:00
Renovate Bot
ee9ef5498d Update metascraper to v5.21.7 2021-05-05 15:43:46 +01:00
Renovate Bot
a9cc729c54 Update dependency oembed-parser to v1.4.7 2021-05-05 15:24:05 +01:00
Renovate Bot
7b6df51d08 Update dependency cssnano to v5.0.2 2021-05-04 08:57:43 +01:00
Naz
a83cccd84b Enabled "emails" limit configuration
refs https://github.com/TryGhost/Team/issues/588

- This bump allows to pass configuration for "emails" limit (flag type for now) and allows to do checks against this limit as a consequence
- Useful to be able to do basic checks for newsletter-related functionality
2021-05-03 14:06:45 +04:00
Renovate Bot
026b85baca
Update dependency @sentry/node to v6.3.5 2021-04-30 13:33:27 +00:00
Renovate Bot
62d257f7a0
Update dependency @sentry/node to v6.3.4 2021-04-29 11:16:46 +00:00
Renovate Bot
ad48c16cb5
Update dependency @sentry/node to v6.3.3 2021-04-28 11:45:04 +00:00
Fabien O'Carroll
740d1b052f Added support for creating subscriptions
refs https://github.com/TryGhost/Team/issues/616
refs https://github.com/TryGhost/Ghost/commit/33f26fbf

This adds the createSubscription method to the MemberRepository, which
is used by the Member controller in the references commit.

We also fix updating products to correctly handle stripe_prices and the
product name.
2021-04-26 17:20:36 +01:00
Hannah Wolfe
7bce05ab86 Added custom no-cross-requires eslint rule [soft]
refs: 7e787ef807

- bumps eslint-plugin-ghost to 2.1.0 which adds the code for a new custom rule
- adds configuration to our eslint file to enable the rule in a very soft mode for now
- this rule is intended to enforce not tightly coupling the server and frontend
- the intention is to make it stricter over time as the number of cross requires reduces
- enabling this rule temporarily and running lint is a nice way to grok just how tightly coupled things are at the moment
2021-04-26 15:06:57 +01:00
Renovate Bot
5212187fd0
Update dependency eslint to v7.25.0 2021-04-26 01:20:09 +00:00
Renovate Bot
f21e689d1b
Update dependency @sentry/node to v6.3.1 2021-04-23 15:23:14 +00:00
Renovate Bot
8980c3051a Update dependency grunt to v1.4.0 2021-04-23 13:09:05 +01:00
Renovate Bot
d73e9c0567 Update dependency jwks-rsa to v2.0.3 2021-04-23 13:08:49 +01:00
Renovate Bot
4185bdb33e
Update dependency express-hbs to v2.4.0 2021-04-22 16:36:14 +00:00
Daniel Lockyer
cb0b10d05e
Merged v4.3.2 into main
v4.3.2
2021-04-22 17:34:45 +01:00
Rish
b23b6a8afd 🐛 Fixed unable to import paid members
refs https://github.com/TryGhost/Team/issues/628

After a recent bump to Stripe API version used by Members service - 2020-08-27 - importing paid members via CSV in ghost was not working correctly due to missing subscriptions object in customer data fetched from Stripe. Stripe had updated the customer resource to not include the subscriptions data by default which is now patched to always include in Ghost.
2021-04-22 21:58:13 +05:30
Renovate Bot
ee82affe1f Pin dependencies 2021-04-22 16:09:30 +01:00
Daniel Lockyer
0df8aac0cc
Merged v4.3.1 into main
v4.3.1
2021-04-22 09:52:00 +01:00
Rish
b6c79c30d4 🐛 Updated stripe prices/products table population
refs https://github.com/TryGhost/Team/issues/591
refs ffe24a728c

It's possible to have sites which still have customer subscriptions in their DB from old Stripe accounts, most likely added when we allowed Stripe Direct, as those subscriptions were not cleaned up. While populating stripe prices and products for existing subscriptions, we want to ignore these old subscriptions which are not part of current Stripe account instead of throwing error and halting the one off migration which we currently do.

The population script will re-run again as long as no new subscriptions are created between the last release and this, and there were no old invalid plans in DB, which is a very unlikely edge case so the data will eventually re-populate correctly.
2021-04-22 14:11:03 +05:30
Thibaut Patel
c471ae11d4 Added oauth login and invitation acceptance
issue https://github.com/TryGhost/Team/issues/614

- Users who have a password can directly sign-in via oauth
- User who are logged-in get their password disabled
- Users accepting an invitation get their password disabled
- The way we disable password is by setting it to a long random password
2021-04-21 19:36:27 +02:00
Renovate Bot
6745546538 Update dependency bson-objectid to v2 2021-04-21 16:23:52 +01:00
Renovate Bot
dd09a4500d
Update dependency knex-migrator to v4.0.4 2021-04-21 11:47:41 +00:00
Renovate Bot
87e747ebb0 Update dependency @tryghost/image-transform to v1.0.11 2021-04-21 12:11:15 +01:00
Renovate Bot
87b702f5d2
Update dependency @sentry/node to v6.3.0 2021-04-20 15:59:09 +00:00
Rish
ffe24a728c Bumped @tryghost/members-api to 1.3.0
refs https://github.com/TryGhost/Team/issues/619

- Bumps `@tryghost/members-api` to `1.3.0` which adds a one-off migration to populate missing stripe prices and products
- Bumps patch versions on `@trghost/members-ssr` and `@tryghost/magic-link` to 1.02
2021-04-20 17:32:07 +05:30
renovate[bot]
63e42199be
Updated JSON schema for Products & Members Admin API
refs https://github.com/TryGhost/Team/issues/616

This adds the schema for the Products Admin API to be used as the input
validation, and adds support for the `products` property on the Members
Admin API

Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-04-20 12:22:55 +01:00
Renovate Bot
5fedb44e0b Update dependency @nexes/nql to v0.5.2 2021-04-19 15:32:22 +01:00
Daniel Lockyer
3421269ee7 Updated tmp dependency to v0.2.1
no issue

- `tmp` 0.1.0 was broken and I added `tmp` to the Renovate ignore list
  to stop it creating PRs - 082160106a
- 0.2.1 is fixed again so we can merge the update and remove it from the
  list
2021-04-19 15:13:55 +01:00
Daniel Lockyer
2fbbf9999d Bumped selected dependencies to unpin sub-dependencies
no issue

- we've been unpinning dependencies in our libraries to remove
  duplicates
- this commit bumps packages from the Utils repo and NQL, all of which
  contain changes to unpin their own dependencies
2021-04-19 11:07:11 +01:00
Renovate Bot
a789e05af4
Update dependency gscan to v4.0.2 2021-04-16 16:49:09 +00:00
Renovate Bot
a7db331f57
Update dependency ghost-ignition to v4.6.2 2021-04-16 13:05:00 +00:00
Daniel Lockyer
41000f4653
Updated selected Utils packages to unpin dependencies
no issue

- I recently unpinned dependencies in the Utils monorepo so we can avoid
  multiple versions of the same package
- this commit bumps all the packages that I published, that do not have
  other changes. Other team members should merge these
2021-04-16 13:59:15 +01:00
Renovate Bot
54644e2840 Update dependency @tryghost/html-to-mobiledoc to v0.7.14 2021-04-16 10:49:57 +01:00
Renovate Bot
f4a129b7a9
Update dependency express-hbs to v2.3.5 2021-04-16 09:01:28 +00:00
Renovate Bot
7c7f46cbf1 Update dependency jwks-rsa to v2 2021-04-16 09:58:47 +01:00
Renovate Bot
8fbcf26d08 Update dependency @tryghost/helpers to v1.1.42 2021-04-15 16:59:26 +01:00
Renovate Bot
43afc8020d Update dependency @tryghost/session-service to v0.1.19 2021-04-15 16:39:44 +01:00
Renovate Bot
44e7df59f3
Update dependency knex-migrator to v4.0.3 2021-04-15 15:06:28 +00:00