Commit Graph

12130 Commits

Author SHA1 Message Date
Daniel Lockyer
9b45ea6f7d Added original error to logged error message
- without this, the original error stacktrace is hidden which makes
  issues harder to track down
2020-11-04 14:00:59 +00:00
Renovate Bot
9f93a0895e
Update dependency ghost-ignition to v4.2.4 2020-11-04 11:06:57 +00:00
Kukhyeon Heo
504509bb67
Removed global.Promise override (#12182)
closed #11943 

* Remove global.Promise
* Fix brute-knex bluebird error.
* Fix api-acceptance tests.
* Fix unit tests
2020-11-04 10:55:47 +00:00
Naz
e3e15646eb Updated redirect error message
refs #11085

- The logic which uses this error deals with an input yaml file thus the change.
- Related discussion here - https://github.com/TryGhost/Ghost/pull/12187#discussion_r508144220
2020-11-04 12:26:22 +13:00
Kukhyeon Heo
5715aa2155
Added .yaml format support in redirects configuration (#12187)
closes #11085

- Ghost has been using YAML format for other configurations (e.g. routes). The plan is to move to this format for all user-edited settings files. By default JSON format is still used in Ghost Admin API v2/v3, but will be changed to YAML in API v4. Check referenced issue for more context.
- New format supports all the features available before. The main noticeable change is the structure of config file. It is now grouped by redirect HTTP code instead of specifying `"permanent": true | false` attribute for each config property. Example format for YAML config:
```
302:
  /from-url/: /to-url/

301:
  /category/([a-z0-9\-]+)/i: /tag/$1/
  /v([0-9\.]+)/docs/([a-z0-9\-]+)/i: /docs/$2/
```
- Added 2 new endpoints: `POST redirects/upload` and `GET redirects/download`. These serve as an alias to current GET/POST `/redirects/json. "upload/download" naming pattern is introduced to match the convention with other resources that can be uploaded and downloaded (images, themes etc.). `/redirects/json`  endpoints will be removed in Admin API v4
- The parsing code from `custom-redirects.js` has been moved to `frontend/services/redirects/settings.js`. This location is more appropriate for this logic and eventually `custom-redirects.js` middlewear might be moved into "frontend" as this middlewear plays a role mostly effecting that area.
2020-11-04 12:08:32 +13:00
Renovate Bot
7d78895b4b Update dependency @tryghost/kg-markdown-html-renderer to v2.0.4 2020-11-03 20:08:55 +00:00
Renovate Bot
b166ec816f
Update dependency @tryghost/kg-card-factory to v2.1.4 2020-11-03 16:50:32 +00:00
Kevin Ansfield
bcf409ee8a 🐛 Fixed bookmark card caption formatting showing as visible html
no issue

- updated `@tryghost/kg-default-cards` which fixed the escaping of bookmark card caption output
2020-11-03 16:49:07 +00:00
Daniel Lockyer
1ecaac99b7 Removed grunt-contrib-uglify dependency
- the only bit of code that needed this, the minification of `members.js`, was
  removed in 3.37.0 so we no longer need this plugin
2020-11-03 14:13:00 +00:00
Daniel Lockyer
7904b8eb50 v3.37.1 2020-11-03 14:00:30 +00:00
Daniel Lockyer
300145798e Updated Ghost-Admin to v3.37.1 2020-11-03 14:00:30 +00:00
Daniel Lockyer
a824ba8d70 v3.37.0 2020-11-03 13:11:42 +00:00
Daniel Lockyer
4a270632db Updated Ghost-Admin to v3.37.0 2020-11-03 13:11:42 +00:00
Rishabh Garg
8ad11fe082
Enabled Portal (#12317)
no refs

[Portal](https://github.com/TryGhost/Portal) is a new drop-in script to make the bulk of Ghost membership features work on any theme out of the box, which was under a developer flag so far. This release removes the flag for Portal and makes it included as default for any members-enabled Ghost site. The Portal script is backward compatible with old public members script and existing Members-enabled themes should notice no change.

- Removes Portal config flag as Portal is now enabled by default
- Removes old members script as Portal is backward compatible with it
- Changes `{{content}}` helper to show default CTA in case of restricted content access
- `accent_color` setting is no more behind the dev experiment flag and included by default
- Adds migration to switch off Portal button setting for all existing sites which don't have Portal enabled in beta
2020-11-03 14:36:21 +05:30
Naz
4ebebd12d3 Removed unneeded parameter
no issue

- There is no second parameter in Promise constructor. Didn't serve any purpose as per comment - bbbd011074 (r41413465)
2020-11-03 13:38:08 +13:00
Renovate Bot
fd1e2f924b
Update dependency mocha to v8.2.1 2020-11-02 23:06:05 +00:00
Renovate Bot
be441c204f
Update dependency brute-knex to v4.0.1 2020-11-02 17:07:12 +00:00
Renovate Bot
ebaeb053c1
Update dependency @tryghost/helpers to v1.1.34 2020-11-02 15:54:33 +00:00
Renovate Bot
d86dca244f Update dependency @tryghost/string to v0.1.14 2020-11-02 15:53:37 +00:00
Renovate Bot
00bfb13a4d Update dependency @tryghost/html-to-mobiledoc to v0.7.6 2020-11-02 15:02:45 +00:00
Renovate Bot
614e1f6641 Update dependency knex to v0.21.12 2020-11-02 15:02:32 +00:00
Renovate Bot
dc51d997f8 Update dependency @tryghost/social-urls to v0.1.15 2020-11-02 15:02:08 +00:00
Renovate Bot
80738dcba0 Update dependency @tryghost/url-utils to v0.6.23 2020-11-02 15:01:52 +00:00
Renovate Bot
1c470f3d66
Update dependency @tryghost/admin-api-schema to v1.3.0 2020-11-02 13:19:45 +00:00
Naz
7326241718 🐛 Fixed server error for repeated order query parameter
closes #12263

- Express parses repeated query parameters as an array (req.query properties). Because there is no clear reason on why not to support this behavior extended order parameter parsing logic to handle arrays. This follows the rule of "liberal inputs, conservative outputs"
- Example supported query string for ordering can now look like: `?order=featured&order=published_at asc`, the priority of the order stays the same with the most significant appearing first and least significant last
2020-11-03 00:15:24 +13:00
Renovate Bot
14ac6168ac Update dependency @tryghost/members-api to v0.34.2 2020-11-02 10:34:21 +00:00
Renovate Bot
0958e6af82 Update dependency knex to v0.21.11 2020-11-02 10:10:38 +00:00
Daniel Lockyer
489add6e5e Pinned Node version in CI
- The default Node version on GitHub Actions is moving to Node 14 and we
  want to keep building it on 12 for now, so this commit pins the
  version to 12.18.0
2020-11-02 08:48:05 +00:00
naz
a2bfef53de
🐛 Fixed post resource filtering by posts_meta table fields (#12307)
refs #11572

- Filtering by fields coming from posts_meta table did not work for post resources. This was due to lack of support for these types of operations on NQL layer. The approach taken here is using same way filtering was done for many:many relations and generates a `WHERE IN` filtering clause. In the future we could look into adding preloading of 1:1 relations which should allow getting rid of `WHERE IN` in favor of `JOIN` and filtering directly by field names. 
- Changed structure of `EXPANSIONS` filter configuration. Current approach was based on "bag of all the things". Such structure will become problematic as more fields are added. For example, adding all the fields from 1:1 relation posts:posts_meta might collide with any other relations that would have similar naming like meta_description from tags table (if it were was added).
- Bumped nql version to 0.5.0. This adds filtering support to 1:1 relations
- Added filter expansions which can be unique per model Previous approach with single global expansions lookup wasn't working in case different models would need to declare expansion for same field names. Having a `filterExpansion` method per model works in a similar convention other filter related model methods do (e.g. enforcedFilters, defaultFilters)
2020-11-02 12:53:57 +13:00
Kevin Ansfield
7a74b78940 Included email-id as user variable when sending bulk emails via mailgun
no issue

- adding user variables via the mailgun API when sending emails means that events related to email have those variables attached to them
- adding the `email.id` value to user variables means we can easily associate mailgun events to emails, otherwise we'd have look up the batch via `email_batches.provider_id` then use a join to get back to the associated email
2020-10-29 16:37:42 +00:00
Renovate Bot
aaeba56134
Update dependency ghost-ignition to v4.2.3 2020-10-29 15:18:58 +00:00
Renovate Bot
37f071f860
Update dependency @sentry/node to v5.27.2 2020-10-29 14:12:16 +00:00
Daniel Lockyer
b8c9ef5033 Added temporary second artifact upload
- we're changing the name but need to maintain compatibility until the
  new setup is live
2020-10-29 13:18:45 +00:00
Daniel Lockyer
85da9bdeb2 Updated Ghost versioning lib to include all prerelease IDs
- currently if Ghost has a version of something like
  `3.37.0-pre.abc.def`, Ghost will return `3.37.0-pre.abc` as the full
  version
- this hides parts of the version which are useful for debugging
- this commit updates the logic to join together all prerelease elements
  so we keep the full string
2020-10-29 12:44:55 +00:00
Rish
c4c6bdf353 Updated mail template for member email change
no issue

The email change verification template was using the same as for `subscribe`, which did not have the right messaging that needs to be communicated about the action thats happening in this case. Updates the email template to same as what we use for email verification for support/newsletter address
2020-10-29 17:40:19 +05:30
Daniel Lockyer
52bac88136 Added Ghost & Ghost-Admin commit hashes into version
- this will generate zips with the hashes already included, and avoid
  the crazy bash further in the script
2020-10-29 12:08:16 +00:00
Renovate Bot
44a64da011 Update dependency @tryghost/members-api to v0.34.1 2020-10-29 17:21:56 +05:30
Renovate Bot
dcb4e37790 Update dependency @tryghost/members-csv to v0.3.2 2020-10-29 16:32:06 +05:30
Renovate Bot
8c990d2907 Update dependency @tryghost/magic-link to v0.6.1 2020-10-29 16:31:42 +05:30
Rish
746ccbd7ed Added custom action param for magic links
closes https://github.com/TryGhost/Ghost/issues/12253

- Allows using custom action param for requests from Portal by using a new `requestSrc` option that is passed down when a request for magic link is made via Portal
2020-10-29 13:42:52 +05:30
Renovate Bot
6e82934230
Update dependency supertest to v6 2020-10-28 19:54:01 +00:00
Daniel Lockyer
1cc58c1f95 Added GitHub Actions workflow to build the latest code
- we want to allow people to download and run the latest code in Ghost
  and Ghost-Admin from Ghost-CLI without going through the process of
  cloning the repos
- this GitHub Actions will generate a release zip and upload it as an
  artifact
- we then have a tool to download the latest artifact, which can be used
  in Ghost-CLI
2020-10-28 16:20:42 +00:00
Daniel Lockyer
d28bbc848f Bumped minimum Node 14 version to latest LTS
- 14.15.0 is the latest version of Node 14 LTS
2020-10-28 11:03:02 +00:00
Renovate Bot
ad3b7b798d
Update dependency sinon to v9.2.1 2020-10-28 09:04:45 +00:00
Daniel Lockyer
969b84b355 Extracted code linting test to separate CI job
- this was taking over a minute to run (?!), and was running on each
  matrix job
- we only need to run it once as changing Node versions shouldn't change
  the results
2020-10-28 08:05:50 +00:00
Renovate Bot
67d42a62fe Update dependency @tryghost/members-api to v0.34.0 2020-10-27 15:43:12 +05:30
Renovate Bot
9ac669c34c Update dependency knex to v0.21.8 2020-10-27 09:50:24 +00:00
Rishabh Garg
0ce5f87616
🐛 Added past_due and unpaid subscriptions for members (#12301)
refs https://github.com/TryGhost/Ghost/issues/12256 , https://github.com/TryGhost/Ghost/issues/12255

Currently when listing subscriptions for Members in both the Admin and the Theme, we only show the subscriptions which have a status of trialing or active.

Based on discussion, the `unpaid` and `past_due` states on Stripe also represent owner's intention of considering a subscription as active instead of `cancelled`, so we allow any subscriptions under these 2 states to be also listed for a member and consider them as `paid`.

- Subscriptions will go into a past_due state if the payment is missed, this should be considered a grace period where the member still has access.

- After this the subscriptions will either go to the unpaid or the cancelled state - this can be configured on an account by account basis in the Stripe dashboard. `unpaid` is considered as an intention to keep the subscription to allow for re-activation later.
2020-10-27 15:19:48 +05:30
Renovate Bot
0c62f28a42 Update dependency analytics-node to v3.4.0-beta.3 2020-10-27 08:02:32 +00:00
Renovate Bot
da1f49e2dd
Update dependency eslint to v7.12.1 2020-10-27 05:05:45 +00:00