Commit Graph

1064 Commits

Author SHA1 Message Date
Renovate Bot
9f27eeab02
Update dependency semver to v7.3.2 2020-04-14 17:47:18 +00:00
Renovate Bot
05c2334898
Update dependency semver to v7.3.1 2020-04-14 16:58:53 +00:00
Renovate Bot
7e910b9c09
Update dependency knex-migrator to v3.4.4 2020-04-14 15:21:50 +00:00
Renovate Bot
531c5a3e6f
Update metascraper to v5.11.9 2020-04-14 10:41:21 +00:00
Renovate Bot
af81cabf07 Update dependency semver to v7.3.0 2020-04-14 06:45:03 +01:00
Renovate Bot
9af9f8bed5
Update dependency knex to v0.20.14 2020-04-14 02:32:48 +00:00
Renovate Bot
6fb11a6ccc
Update dependency semver to v7.2.3 2020-04-13 19:29:58 +00:00
Renovate Bot
2216e0be21 Update dependency @tryghost/html-to-mobiledoc to v0.7.0 2020-04-13 20:28:57 +01:00
Renovate Bot
696879dca7 Update dependency jwks-rsa to v1.8.0 2020-04-13 20:28:24 +01:00
Renovate Bot
67d6f2dadb
Update dependency @tryghost/helpers to v1.1.27 2020-04-13 16:21:25 +00:00
Renovate Bot
7409a4247c
Update dependency @tryghost/url-utils to v0.6.18 2020-04-13 03:17:21 +00:00
Renovate Bot
d00b91aa15
Update dependency @tryghost/string to v0.1.9 2020-04-13 00:18:05 +00:00
Renovate Bot
a34c76d823
Update dependency @tryghost/social-urls to v0.1.9 2020-04-10 22:18:37 +00:00
Renovate Bot
88d36e230a
Update dependency @tryghost/html-to-mobiledoc to v0.6.7 2020-04-10 20:16:30 +00:00
Renovate Bot
6ce5a6c16e
Update dependency @tryghost/helpers to v1.1.26 2020-04-10 18:47:17 +00:00
Renovate Bot
415554c600
Update dependency semver to v7.2.2 2020-04-10 16:03:41 +00:00
Renovate Bot
92cf910b05 Update dependency gscan to v3.5.1 2020-04-10 13:36:58 +01:00
Renovate Bot
f3ed965987 Update dependency @tryghost/kg-default-cards to v1.1.0 2020-04-10 10:28:06 +01:00
Kevin Ansfield
f3627c5fc3 Update dependency @tryghost/kg-markdown-html-renderer to v2.0.0
no issue

- `version` integer parameter in the `render` method has been replaced with an `options` object parameter
2020-04-09 21:10:03 +01:00
Renovate Bot
8f65de87c7 Update dependency sanitize-html to v1.23.0 2020-04-09 21:00:19 +01:00
Renovate Bot
43434e1f7d
Update dependency @tryghost/kg-markdown-html-renderer to v1.0.3 2020-04-08 23:19:18 +00:00
Renovate Bot
a49980e767
Update dependency @tryghost/kg-default-cards to v1.0.2 2020-04-08 21:16:46 +00:00
Renovate Bot
30c79555f0
Update dependency @tryghost/kg-card-factory to v1.0.2 2020-04-08 19:50:29 +00:00
Kevin Ansfield
b37ac8ef1f Switched to extracted @tryghost/mobiledoc-dom-renderer package
no issue

- moved `mobiledoc.renderers.mobiledocHtmlRenderer` to `mobiledoc.mobiledocHtmlRenderer` so that it's easier for the getter to access the parent objects getters
- removed all tests and dependencies that now live in @tryghost/mobiledoc-dom-renderer
  - kept the `mobiledocHtmlRenderer` test because that's testing that we've correctly wired up our cards and atoms and the output is what we expect
2020-04-08 18:27:12 +01:00
Renovate Bot
26dfc02d48 Update dependency @tryghost/zip to v1 2020-04-08 16:09:08 +01:00
Kevin Ansfield
294187c41f Switched to extracted @tryghost/kg-default-atoms package
no issue

- removed code that now lives in the external Koenig monorepo
2020-04-08 14:49:44 +01:00
Renovate Bot
b2fa6b9878
Update dependency sinon to v9.0.2 2020-04-08 11:48:38 +00:00
Renovate Bot
ac746251e7
Update dependency bookshelf-relations to v1.3.2 2020-04-08 08:16:23 +00:00
Renovate Bot
3b637ce259
Update dependency knex-migrator to v3.4.3 2020-04-08 06:43:10 +00:00
Renovate Bot
1daaf075aa
Update dependency express-jwt to v5.3.3 2020-04-07 15:08:49 +00:00
Daniel Lockyer
fb955a2a0a Bumped @tryghost/adapter-manager to 0.1.2
no issue
2020-04-07 15:43:46 +01:00
Fabien O'Carroll
1fcf82cde3 Bumbed @tryghost/adapter-manager to 0.1.1
no-issue

This fixes an issue with storage adapters inheriting from an older
version of ghost-storage-base
2020-04-07 15:32:13 +02:00
Renovate Bot
3ebae36c0a Update dependency knex to v0.20.13 2020-04-07 10:49:12 +01:00
Daniel Lockyer
29647870f1 Pinned dependencies
no issue
2020-04-07 09:36:05 +01:00
Renovate Bot
ec49a362b8 Update dependency semver to v7.2.1 2020-04-07 08:27:48 +01:00
Renovate Bot
f60b3f5607
Update dependency gscan to v3.4.1 2020-04-06 17:10:36 +00:00
Renovate Bot
4ee0b92eac
Update dependency express-hbs to v2.3.3 2020-04-06 15:42:24 +00:00
Fabien O'Carroll
a701ee7023
Added support for token session to /ghost (#11709)
no-issue

* Added default for getting origin of request

This function is used to attach the origin of the request to the
session, and later check that requests using the session are coming from
the same origin. This protects us against CSRF attacks as requests in
the browser MUST originate from the same origin on which the user
logged in.

Previously, when we could not determine the origin we would return
null, as a "safety" net.

This updates the function to use a secure and sensible default - which
is the origin of the Ghost-Admin application, and if that's not set -
the origin of the Ghost application.

This will make dealing with magic links simpler as you can not always
guaruntee the existence of these headers when visiting via a hyperlink

* Removed init fns and getters from session service

This simplifies the code here, making it easier to read and maintain

* Moved express-session initialisation to own file

This is complex enough that it deserves its own module

* Added createSessionFromToken to session service

* Wired up the createSessionFromToken middleware
2020-04-06 11:49:14 +02:00
Renovate Bot
12d6b05498
Update metascraper to v5.11.8 2020-04-06 00:17:00 +00:00
Fabien O'Carroll
fb942af1db Added adapter-manager service
no-issue

This services handles the registration and retrieval of adapters,
it normalises the config to look like:

{
    [adapterType]: {
        active: adapterName,
        [adapterName]: adapterConfig
    }
}
2020-04-05 21:13:47 +02:00
Daniel Lockyer
2d42af8d72 Removed unused release-utils dependency
no issue

- this is no longer needed because we moved the main release code
  out
2020-04-03 14:25:28 +01:00
Daniel Lockyer
92aebc21f4 Updated Ghost-SDK packages
no issue
2020-04-03 10:43:35 +01:00
Renovate Bot
deb1118714
Update dependency @tryghost/helpers to v1.1.25 2020-04-03 08:17:33 +00:00
Fabien O'Carroll
23154f0739
Refactored session service (#11701)
* Refactored SessionStore to use @tryghost/errors

no-issue

* Updated tests to test exposed API

no-issue

This will make refactoring easier, as we only have the "public" contract to maintain

* Refactored session functionality to SessionService

no-issue

This splits the session logic away from the HTTP responding logic,
which will allows us to decouple session creation/modification from the
API. Eventually this can be used to create sessions based on magiclink
style tokens.

* Instantiated and exported the new SessionService

no-issue

* Refactored session middleware to take session service

no-issue

This removes duplication of code and makes the middleware more explicit
that it's just a wrapper around the session service.

* Updated to use external @tryghost/session-service

no-issue
2020-04-02 16:27:31 +02:00
Daniel Lockyer
5a748ee5a9 Updated eslint-plugin-ghost dependency
no issue
2020-04-02 14:11:33 +01:00
Renovate Bot
f8f8a4b597
Update dependency express-hbs to v2.3.2 2020-04-01 18:04:24 +00:00
Daniel Lockyer
5989400df7 Removed unused chalk dependency
no issue

- left over from removing the stable branch warning from the Gruntfile
- it's not used anywhere else
2020-04-01 19:02:55 +01:00
Hannah Wolfe
e4404f9b9a Removed unnecessary dependency matchdep
- Don't really need a dependency here, can work without it
- matchdep hasn't been updated in 3 years, and has a web of potentially insecure dependencies
- Unlikely to affect us, but safer to go without
2020-04-01 17:50:03 +01:00
Hannah Wolfe
c3e0e82604 Removed unused grunt-cli dependency
- this should be installed globally
2020-04-01 17:50:03 +01:00
Hannah Wolfe
9cf4312ae2 Removed misc unused dependencies 2020-04-01 15:38:26 +01:00
Renovate Bot
36a55eb0a4 Pin dependencies 2020-04-01 15:35:02 +01:00
Daniel Lockyer
02bf8773b9 Automated the release process
no issue
2020-04-01 15:17:52 +01:00
Renovate Bot
634b5e83a2
Update dependency uuid to v7.0.3 2020-04-01 12:49:34 +00:00
Hannah Wolfe
25f51056f5 Remove unused dev dependency should-http 2020-04-01 13:30:38 +01:00
Hannah Wolfe
a4175ff218 Swapped grunt-cssnano for grunt-postcss+cssnano
- The grunt-cssnano plugin is old and no longer maintained
- It uses insecure dependencies that don't really impact us, but we want to get rid of warnings
- Swapping for grunt-postcss+cssnano is a more up-to-date way of sorting this out
2020-04-01 13:17:49 +01:00
Renovate Bot
4c554ae131 Update dependency @tryghost/image-transform to v0.2.0 2020-03-30 10:55:07 +01:00
Daniel Lockyer
d35fd96abb Updated grunt-mocha-cli dependency
no issue
2020-03-30 10:52:48 +01:00
renovate[bot]
f0f22d80b3
Update dependency bookshelf to v0.15.2 (#10982)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-03-30 22:42:25 +13:00
Kevin Ansfield
b984da9839 🐛 Fixed "Incorrectly eaten value" error if markdown footnote has trailing newline whitespace
no issue

- update `url-utils` dependency which contains a fixed version of remark footnote parsing
2020-03-29 20:26:04 +01:00
Renovate Bot
4042a7f952
Update dependency @sentry/node to v5.15.4 2020-03-27 13:49:59 +00:00
Renovate Bot
3a04fd5623
Update dependency @sentry/node to v5.15.3 2020-03-27 10:23:45 +00:00
Renovate Bot
73c8edd03b
Update dependency @tryghost/url-utils to v0.6.15 2020-03-27 04:24:17 +00:00
Renovate Bot
92adad098c
Update dependency @tryghost/string to v0.1.7 2020-03-27 02:16:31 +00:00
Renovate Bot
fb5d6e94a8
Update dependency @tryghost/social-urls to v0.1.7 2020-03-27 00:43:20 +00:00
Renovate Bot
9ad7ad22a7
Update dependency @tryghost/html-to-mobiledoc to v0.6.5 2020-03-26 23:17:01 +00:00
Renovate Bot
50f67cf0dd
Update dependency @tryghost/helpers to v1.1.24 2020-03-26 21:30:56 +00:00
Renovate Bot
06df6e5799
Update dependency node-jose to v1.1.4 2020-03-26 19:17:47 +00:00
Renovate Bot
ad09d2902a
Update dependency @sentry/node to v5.15.2 2020-03-26 17:29:21 +00:00
Renovate Bot
1f013190f1
Update dependency @tryghost/string to v0.1.6 2020-03-26 16:50:43 +00:00
Renovate Bot
ded7bbc819
Update dependency @tryghost/errors to v0.1.1 2020-03-26 13:21:21 +00:00
Daniel Lockyer
3722293392 Pinned dependencies
no issue
2020-03-26 13:20:23 +00:00
Renovate Bot
5e40078591
Update dependency @sentry/node to v5.15.1 2020-03-26 10:37:54 +00:00
Kevin Ansfield
1ee1e68adf Replaced mobiledoc cards with @tryghost/kg-default-cards
no issue

- moved card definitions to a new library `@tryghost/kg-default-cards`
- moved `createCard` factory function to a new library `@tryghost/kg-card-factory`
2020-03-25 19:54:11 +00:00
Renovate Bot
a5b14419af
Update dependency eslint-plugin-ghost to v1.0.1 2020-03-25 18:31:55 +00:00
Hannah Wolfe
d9dfdd775e
Replaced image manipulation w/ @tryghost/image-transform (#11687)
- moved image.manipulation lib to a new package called @tryghost/image-transform
- new package has an updated API signature, so the method calls have changed but the underlying code is identical
- removed the optional sharp dependency from Ghost, as this is now optionally required by the image-transform module
2020-03-25 17:33:03 +00:00
Kevin Ansfield
c65c9c1e5e Extracted markdown-html-renderer to @tryghost/kg-markdown-html-renderer
no issue

- prep for further extraction of mobiledoc cards and renderer
2020-03-25 13:35:32 +00:00
Hannah Wolfe
72db5a67ca Added new @tryghost/errors package
- this will replace common.errors throughout the codebase
- allows us to break more pieces of ghost out into modules as it's a common dependency
2020-03-25 10:26:51 +00:00
Renovate Bot
98e606260b Update Test & linting packages 2020-03-23 01:16:13 +00:00
Renovate Bot
24f001c8d3 Update dependency sharp to v0.25.2 2020-03-20 23:16:43 +00:00
Renovate Bot
e7c9b8b9d8 Update dependency @tryghost/vhost-middleware to v1.0.2 2020-03-20 22:19:18 +00:00
Hannah Wolfe
5ea10b47bd Replaced zip tools with @tryghost/zip
- Moved zipFolder to a new package
- also exposing extract-zip from the new package
- new package has the API pre-promisified
- also uses @tryghost/extract-zip instead of extract-zip, which has bugfixes
2020-03-20 21:08:57 +00:00
Renovate Bot
51e382cd0f Update dependency fs-extra to v9 2020-03-20 18:45:10 +00:00
Renovate Bot
ba430d989a Update dependency @sentry/node to v5.15.0 2020-03-20 09:43:30 +00:00
Renovate Bot
19aadf100d Update dependency gscan to v3.4.0 2020-03-20 09:43:02 +00:00
Renovate Bot
0507841c9e Update dependency grunt to v1.1.0 2020-03-17 06:46:44 +00:00
Fabien O'Carroll
d246a4761e Implemented externally verifiable identity tokens
no-issue

This adds two new endpoints, one at /ghost/.well-known/jwks.json for exposing
a public key, and one on the canary api /identities, which allows the
Owner user to fetch a JWT.

This token can then be used by external services to verify the domain

* Added ghost_{public,private}_key settings

    This key can be used for generating tokens for communicating with
    external services on behalf of Ghost

* Added .well-known directory to /ghost/.well-known

    We add a jwks.json file to the .well-known directory which exposes a
    public JWK which can be used to verify the signatures of JWT's created
    by Ghost

    This is added to the /ghost/ path so that it can live on the admin
    domain, rather than the frontend. This is because most of its
    uses/functions will be in relation to the admin domain.

* Improved settings model tests

    This removes hardcoded positions in favour of testing that a particular
    event wasn't emitted which is less brittle and more precise about what's
    being tested

* Fixed parent app unit tests for well-known

    This updates the parent app unit tests to check that the well-known
    route is mounted. We all change proxyquire to use `noCallThru` which
    ensures that the ubderlying modules are not required. This stops the
    initialisation logic in ./well-known erroring in tests

https://github.com/thlorenz/proxyquire/issues/215

* Moved jwt signature to a separate 'token' propery

    This structure corresponds to other resources and allows to exptend with
    additional properties in future if needed
2020-03-16 13:22:04 +01:00
Renovate Bot
ccd586ea6e Update dependency rewire to v5 2020-03-16 09:28:32 +00:00
Renovate Bot
784ae3ddf1 Update dependency @tryghost/social-urls to v0.1.6 2020-03-16 08:06:39 +00:00
Renovate Bot
1288dce961 Update dependency @tryghost/url-utils to v0.6.14 2020-03-16 08:06:26 +00:00
Renovate Bot
f645e20b92 Update dependency @tryghost/helpers to v1.1.23 2020-03-16 08:06:14 +00:00
Renovate Bot
118c546e8c Update dependency sanitize-html to v1.22.1 2020-03-16 06:54:56 +00:00
Renovate Bot
0372616421 Update dependency @sentry/node to v5.14.2 2020-03-16 06:51:51 +00:00
Kevin Ansfield
531ef01c48 Update dependency @tryghost/html-to-mobiledoc to v0.6.4
no issue

- includes fixes for html->mobiledoc conversion
  - fixes multiple spaces appearing in text content if source content is indented and has newlines
  - fixes crash if source content has `<li>` elements containing headers
  - fixes crash if source content has non-`<li>` top-level elements inside a list
  - fixes `blockquote>p` markup in source content losing blockquote styling
2020-03-12 18:57:06 +00:00
Renovate Bot
4215cee395 Update dependency sharp to v0.25.1 2020-03-09 07:53:07 +00:00
Renovate Bot
7fcb6c8e8f Update dependency uuid to v7.0.2 2020-03-09 07:33:53 +00:00
Renovate Bot
478a0668e4 Update dependency @sentry/node to v5.13.2 2020-03-09 07:33:32 +00:00
Renovate Bot
403f7990e8 Update dependency express-hbs to v2.3.1 2020-03-09 07:33:18 +00:00
Renovate Bot
2d20778bcb Update metascraper to v5.11.6 2020-03-09 07:32:59 +00:00
Nazar Gargol
c0512e30bb Added custom currency support for Memer's plans
no issue

- Multiple currencies for membe plans were supported under the hood but never had a clear interface to manage them. This change allows to reference currently used currency and it's symbol from the theme layer with following syntax: `{{@price.currency}}` and `{{@price.currency_symbol}}
2020-03-04 13:15:21 +08:00
Daniel Lockyer
e31ba0dea3 Updated ghost-storage-base dependency
no issue
2020-03-03 09:56:40 +00:00
Renovate Bot
92c85f1485 Update dependency mocha to v7 2020-03-03 08:35:39 +00:00
Renovate Bot
095ed2a892 Update dependency uuid to v7 2020-03-03 08:32:58 +00:00
Renovate Bot
c9af8844ba Update dependency @sentry/node to v5.13.1 2020-03-02 08:16:11 +00:00
Renovate Bot
394305ad0c Update dependency amperize to v0.6.1 2020-03-02 02:20:01 +00:00
Renovate Bot
35b9511c3e Update dependency @sentry/node to v5.12.5 2020-03-02 01:20:52 +00:00
Kevin Ansfield
8218f490cd Added capture of geolocation during member signup/signin
no issue

- updated `@tryghost/members-api` which now includes geolocation lookup from IP address during member signup and signin when geolocation data doesn't already exist
2020-02-27 10:46:37 +00:00
Naz
3af621ea9a
Added handling allowing members to edit their billing info (#11571)
no issue

- This functionality allows member to update their billing information, like credit card information.
- Adds handler to update Stripe billing when element with `data-members-edit-billing` attribute is present on the page. Additional `data-members-success` and `data-members-cancel` attributes could be used to control the redirects on billing update success or failure. They work in the same fission as for 'members-plan' (https://ghost.org/docs/members/checkout-buttons/#redirects)
2020-02-26 12:42:41 +08:00
Daniel Lockyer
119c5359ec Updated test dependencies
no issue
2020-02-24 19:16:38 +00:00
Daniel Lockyer
474f0a2184 Updated semver dependency
no issue

- required code change for new API
2020-02-24 18:01:53 +00:00
Renovate Bot
c3125dd19f Update dependency sanitize-html to v1.22.0 2020-02-24 12:49:37 +00:00
Renovate Bot
fc0042087d Update dependency ajv to v6.12.0 2020-02-24 12:45:22 +00:00
Daniel Lockyer
38c10e3585 Updated dependencies
no issue

- now Node v8 has been dropped, several dependencies can be updated
2020-02-24 12:25:11 +00:00
Renovate Bot
d144d0015f Update dependency @sentry/node to v5.12.4 2020-02-24 01:19:46 +00:00
Daniel Lockyer
b2940692e2 Removed unused cpy-cli dependency
no issue
2020-02-20 13:36:42 +00:00
Renovate Bot
32e706991c Update dependency mysql to v2.18.1 2020-02-19 14:06:17 +00:00
Daniel Lockyer
e8dd42d040 Revert "Update dependency grunt-mocha-cli to v5"
This reverts commit 7e5490aab4.
2020-02-19 09:46:09 +00:00
Renovate Bot
7e5490aab4 Update dependency grunt-mocha-cli to v5 2020-02-18 21:24:11 +00:00
Renovate Bot
4cfdd33347 Update dependency sanitize-html to v1.21.1 2020-02-18 20:59:52 +00:00
Renovate Bot
9519e4be6b Update dependency uuid to v3.4.0 2020-02-18 20:26:15 +00:00
Renovate Bot
e173d08663 Update dependency chalk to v3 2020-02-18 20:01:21 +00:00
Renovate Bot
f2c050a105 Update dependency ajv to v6.11.0 2020-02-18 19:01:19 +00:00
Nazar Gargol
8def4fb402 Bumped @tryghost/members-api to 0.15.1
no issue

- This bump removed limitation to cancel/renew "Complimentary" plan subscription
2020-02-17 16:31:23 +08:00
Renovate Bot
63b6bb58ad Update dependency @tryghost/vhost-middleware to v1.0.1 2020-02-17 01:18:44 +00:00
Rishabh Garg
001db05075
Added labels for Members (#11538)
no issue

* Updated sendEmailWithMagicLink syntax

* Updated label name selection from theme

* Updated migration version for labels

* Added labels to export/import of members

* Added member labels sanitization for case-insensitive duplicates

* Fixed tests

* Fixed label serialization bug on import

* Bumped @tryghost/members-api to 0.15.0

* Fixed lint

* Cleanup
2020-02-14 15:03:10 +05:30
Nazar Gargol
995788f5a2 Bumped @tryghost/members-api to 0.14.2
d8acfba44a

- The bump is needed to handle plan nickname fallback with an actual value instead of empty string
2020-02-11 14:11:06 +08:00
Renovate Bot
d64efff9db Update dependency @sentry/node to v5.12.3 2020-02-10 18:02:47 +00:00
Daniel Lockyer
67f856c572 Update gscan dependency to 3.3.1
no issue
2020-02-10 12:38:55 +00:00
Nazar Gargol
27d2c2fb3a Bumped @tryghost/members-api to 0.14.1
no issue

- This bump fixes a problem where members_stripe_customers_subscriptions were not able to be created due to plan 'nickname' NOT NULL constraing. This case was possible because in earlier versions of Stripe API  `nickname` property was allowed to be `null`
2020-02-10 19:11:42 +08:00
Renovate Bot
6a6413cec5 Update dependency @sentry/node to v5.11.2 2020-02-10 01:16:53 +00:00
Renovate Bot
c863d215fb Update dependency gscan to v3.3.0 2020-02-04 13:16:06 +00:00
Naz Gargol
c295435b41
Added new fields to members CSV import (#11539)
no issue

- New fields that are accepted through members CSV import endpoint are:
  - `subscribed_to_emails` - corresponds to `subscribed` flag in API
  - `stripe_customer_id` - links existing Stripe customer to created member
  - `complimentary_plan` - flag controlling "Complimentary" plan subscription creation for imported member

- Noteworthy exception in field naming - `subscribed_to_emails` that corresponds to `subscribed` API flag present on members resources. It's a special case of CSV format, where users can be less technical it's more explicit to what the flag does (also the same naming is applied in the Admin UI)

- Failing to either link Stripe customer or assign "Complimentary" subscription to imported member behaves in a transaction-like manner - imported record is not created in the database. This is needed to be able to retry imports when it fails for reasons like connectivity failure with Stripe or Stripe miss-configuration.

- To avoid conflicts with linking same Stripe customer to multiple members there is a special handling for duplicate `stripe_customer_id` fields. Records with duplicates are removed from imported set.
2020-02-04 13:51:24 +08:00
Renovate Bot
2f78e53468 Update dependency @tryghost/html-to-mobiledoc to v0.6.3 2020-02-03 22:17:20 +00:00
Daniel Lockyer
d065c268a7 Reverted tmp to v0.0.33
no issue

- Renovate automerged a bump for tmp, but this version has a bug and
  shouldn't have passed the automated tests
- this commit reverts the package back to the working version
2020-02-03 15:22:26 +00:00
Renovate Bot
34be8e7cef Update Test & linting packages 2020-02-03 14:18:05 +00:00
Daniel Lockyer
7751e78c98 Integrated Sentry error tracking
no issue

- this allows tracking of application errors within Sentry
- only enabled for HTTP 500 errors for now
- it is disabled by default
2020-02-03 13:43:43 +00:00
Renovate Bot
97d6e6b98b Update dependency simple-html-tokenizer to v0.5.9 2020-02-03 01:17:46 +00:00
Renovate Bot
94047d24af Update dependency gscan to v3.2.5 2020-01-29 12:33:27 +00:00
Kevin Ansfield
68e2274d6d Reverted "Integrated Sentry error tracking"
This reverts commit 6e024331eb.

Temporarily reverting whilst we investigate an issue with Sentry and running Ghost via Ghost-CLI.

Ghost-CLI initiated boot was failing when Sentry was installed due to what appears to be `process.cwd()` returning `undefined` here https://github.com/TryGhost/Ignition/blob/master/lib/config/index.js#L26
2020-01-28 17:21:37 +00:00
Naz Gargol
25f11bbf1c
Added complimentary member subscription (#11537)
no issue

- We need a way to simulate "premium" membership without any payment from members' side. For this new "Complimentary" plan is introduced
- Allows `comped` flag as an input only on `PUT /members/:id` endpoint which sets  free subscriptions based on "complimentary" plan on the member
- Added `comped` flag to members endpoint responses
- Bumped members-api to 0.12.0. This version supports new set/cancel complimentary subscription methods
2020-01-28 11:25:00 +07:00
Renovate Bot
56bcd4279f Update dependency @tryghost/helpers to v1.1.22 2020-01-27 01:16:37 +00:00
Daniel Lockyer
6e024331eb Integrated Sentry error tracking
no issue

- this allows tracking of application errors within Sentry
- only enabled for HTTP 500 errors for now
- it is disabled by default
2020-01-22 12:15:10 +07:00
Renovate Bot
13c87c687f Update dependency @tryghost/members-ssr to v0.7.4 2020-01-20 11:18:42 +00:00
Rish
334bdc3f10 Installed @tryghost/members-api@0..11.2
no-issue

Fixes incorrect stripe subscriptions structure in user CRUD
2020-01-20 13:42:55 +05:30
Renovate Bot
a3e0594fa5 Update dependency @tryghost/helpers to v1.1.21 2020-01-20 01:19:22 +00:00
renovate[bot]
af4ecb7b76 Update dependency cookie-session to v1.4.0 (#11510)
Co-authored-by: WhiteSource Renovate <renovatebot@gmail.com>
2020-01-17 13:10:48 +07:00
Nazar Gargol
e9e3f58792 Refactored member controller to use model layer
refs https://github.com/TryGhost/Members/pull/105

- As members module has become a core part it makes sense to follow the same principles as in all other controllers and use the model directly instead of calling external services.
- Bumped @tryghost/members-api to 0.11.1 . New stripe-specific methods used in controllers are available starting with this version
- Exposing these new methods is a little hacky because there are no relationships setup on members_* tables. Left notes for future improvements once relations are introduced.
- We don't allow for chaging member's emails at the moment. For this reason had to modify JSON schema a little. It doesn't support OO inheritence: "This shortcoming is perhaps one of the biggest surprises of the combining operations in JSON schema: it does not behave like inheritance in an object-oriented language. " (ref. https://json-schema.org/understanding-json-schema/reference/combining.html#allof)
2020-01-15 17:52:47 +07:00
Nazar Gargol
72ae194fbc Refactored member metadata logic into @tryghost/members-api package
refs c059e8e32e

- Reason why the refactor was needed can be found in refed commit
- The logic was extracted into members-api through passing models
directly as member-api module constructor parameters
- Bumped @tryghost/members-api to 0.11.0. Needed to work after the
refactor
2020-01-13 16:42:15 +07:00
Renovate Bot
caabdad7ad Update dependency gscan to v3.2.2 2020-01-13 07:18:41 +00:00
Renovate Bot
cd7dcef481 Update dependency metascraper-url to v5.8.13 2020-01-13 05:26:28 +00:00
Renovate Bot
d7f38cbedb Update dependency metascraper-description to v5.8.15 2019-12-30 01:17:13 +00:00
Renovate Bot
5874570d45 Update dependency metascraper-title to v5.8.13 2019-12-23 09:36:35 +00:00
Renovate Bot
17f8a8bfbc Update dependency oembed-parser to v1.3.7 2019-12-23 09:16:43 +00:00
Renovate Bot
52c7628a48 Update dependency metascraper-logo-favicon to v5.8.13 2019-12-23 08:17:42 +00:00
Renovate Bot
3cabd27042 Update dependency metascraper-image to v5.8.13 2019-12-23 07:16:14 +00:00
Renovate Bot
2aec73c2e2 Update dependency metascraper-publisher to v5.8.13 2019-12-23 06:16:42 +00:00
Renovate Bot
f2bba8c633 Update dependency metascraper-logo to v5.8.13 2019-12-23 05:16:43 +00:00
Renovate Bot
f49b1a8313 Update dependency metascraper-author to v5.8.13 2019-12-23 04:17:16 +00:00
Renovate Bot
7f08e0b31e Update dependency metascraper-description to v5.8.13 2019-12-23 03:17:25 +00:00
Renovate Bot
a07818f302 Update dependency metascraper to v5.8.13 2019-12-23 02:17:40 +00:00
Renovate Bot
c047232626 Update dependency @tryghost/helpers to v1.1.20 2019-12-23 01:20:52 +00:00
Renovate Bot
6ecc7d197b Update dependency metascraper-title to v5.8.12 2019-12-17 19:16:06 +00:00
Hannah Wolfe
7bf48e49a1 Update dependency analytics-node to v3.4.0-beta.1 2019-12-16 21:06:35 +00:00
Hannah Wolfe
53fdc1b090 Update dependency @tryghost/social-urls to v0.1.5 2019-12-16 20:27:50 +00:00
Hannah Wolfe
16f44e1677 Update dependency gscan to v2.3.1 2019-12-16 20:15:55 +00:00
renovate[bot]
896d4c31ae Update dependency express-hbs to v2.3.0 (#11417) 2019-12-16 20:13:17 +00:00
Renovate Bot
52e23192c0 Update dependency sqlite3 to v4.1.1 2019-12-16 11:15:42 +00:00
Renovate Bot
10a4ba306f Update dependency sharp to v0.23.4 2019-12-16 09:18:07 +00:00
Renovate Bot
a67b2d5c8a Update dependency metascraper-url to v5.8.10 2019-12-16 08:19:06 +00:00
Renovate Bot
dde5220377 Update dependency metascraper-logo-favicon to v5.8.10 2019-12-16 07:16:39 +00:00
Renovate Bot
ff9c6df418 Update dependency metascraper-image to v5.8.10 2019-12-16 06:13:46 +00:00
Renovate Bot
a54e28b962 Update dependency metascraper-publisher to v5.8.10 2019-12-16 05:15:51 +00:00
renovate[bot]
b9458475bb Update dependency juice to v6 (#11429) 2019-12-16 11:55:32 +07:00
Renovate Bot
2fe25daff4 Update dependency metascraper-logo to v5.8.10 2019-12-16 04:23:41 +00:00
Renovate Bot
a1dee8fbc8 Update dependency metascraper-author to v5.8.10 2019-12-16 03:15:12 +00:00
Renovate Bot
04e4b4d28c Update dependency metascraper-description to v5.8.10 2019-12-16 02:16:53 +00:00
Renovate Bot
c59cc557da Update dependency metascraper to v5.8.10 2019-12-16 01:16:49 +00:00
Naz Gargol
e277c6bad3
Added member's subscription cancellation helper {{cancel_link}} (#11434)
no issue

- The helper allows generating HTML needed to cancel or continue the member's subscription depending on subscription state.
- Added public members endpoint to allow updating subscription's `cancel_at_period_end` attribute available at: `PUT /api/canary/members/subscriptions/:id/`
- Added client-side hook to allow calling subscription cancellation. Allows to create elements with `data-members-cancel-subscription` / `data-members-continue-subscription` attributes which would call subscription update.
- Updated schema and added migration for `current_period_end` column
- As discussed we only add a single column to  subscriptions table to avoid preoptimizing for future cases
- Added {{cancel_link}} helper
- Added error handling for {{cancel_link}} when members are disabled
- Added test coverage for {{cancel_link}} helper
- Bumped @tryghost/members-api version to 0.10.2. Needed to use `updateSubscription` middleware
- Bumped gscan to 3.2.0. Needed to recognize new {{cancel_link}} helper
2019-12-12 19:59:15 +07:00
Fabien O'Carroll
5997343279 Installed @tryghost/members-api@0.10.1
no-issue

Fixes issue with Stripe webhooks when running on localhost url
2019-12-09 14:33:04 +02:00
Naz Gargol
bcddeeadf1
Removed redundant member manipulation proxy methods (#11423)
no issue

- This includes the interface change for members-api constructor - now accepts the member's model instead of proxy methods. These methods have been moved ton @tryghost/members-api in favor of using the model directly (ref: https://github.com/TryGhost/Members/pull/105)
- Moved error handling from the service layer to controller
- Bumped @tryghost/member-api package to 0.10.0
2019-12-06 12:04:10 +07:00
Renovate Bot
3b90ac7095 Update dependency knex-migrator to v3.4.1 2019-12-02 02:23:18 +00:00
Renovate Bot
99721a72cd Update dependency bluebird to v3.7.2 2019-12-02 01:23:34 +00:00
Kevin Ansfield
f9f2d36f53 Merge branch 'mega' 2019-11-27 12:12:27 +00:00
Renovate Bot
f10a76e15a Update dependency metascraper-logo-favicon to v5.8.9 2019-11-25 02:28:43 +00:00
Renovate Bot
2120151559 Update dependency metascraper to v5.8.9 2019-11-25 01:31:44 +00:00
Kevin Ansfield
f14e3fa11b Updated yarn.lock 2019-11-18 11:10:39 +00:00
Kevin Ansfield
1c8b78818f Merge branch 'master' into mega 2019-11-18 11:09:46 +00:00
Renovate Bot
fb7afd1672 Update dependency sharp to v0.23.3 2019-11-18 05:25:57 +00:00
Renovate Bot
f5e1d24113 Update dependency metascraper to v5.8.8 2019-11-18 03:26:47 +00:00
Renovate Bot
ad48fe0057 Update dependency @tryghost/html-to-mobiledoc to v0.6.1 2019-11-18 02:24:40 +00:00
Renovate Bot
8383d5c9c2 Update dependency @tryghost/helpers to v1.1.19 2019-11-18 01:29:39 +00:00
renovate[bot]
986df75f43 Update dependency metascraper-author to v5.8.7 (#11369) 2019-11-13 15:16:59 +07:00
renovate[bot]
da0ad2d717 Update dependency metascraper-logo-favicon to v5.8.7 (#11373) 2019-11-13 15:16:27 +07:00
renovate[bot]
fc3182f9f9 Update dependency metascraper-image to v5.8.7 (#11371) 2019-11-13 15:16:00 +07:00
renovate[bot]
4709d1cc6b Update dependency metascraper-title to v5.8.7 (#11375) 2019-11-13 15:14:51 +07:00
renovate[bot]
c531b12a41 Update dependency metascraper-logo-favicon to v5.7.21 (#11362) 2019-11-13 13:57:29 +07:00
renovate[bot]
be9066bb79 Update dependency metascraper-url to v5.8.7 (#11376) 2019-11-13 13:49:23 +07:00
renovate[bot]
fc9187d2ab Update dependency metascraper-description to v5.8.7 (#11370) 2019-11-13 13:48:47 +07:00
renovate[bot]
b78a467890 Update dependency metascraper-logo to v5.8.7 (#11372) 2019-11-13 13:47:06 +07:00
renovate[bot]
3ae8d3b673 Update dependency metascraper to v5.8.7 (#11368) 2019-11-13 13:46:27 +07:00
renovate[bot]
28a69be7ce Update dependency metascraper-publisher to v5.8.7 (#11374) 2019-11-13 13:45:17 +07:00
Renovate Bot
e00f67f04e Update dependency metascraper-title to v5.7.21 2019-11-11 13:22:54 +00:00
Renovate Bot
5a5943e745 Update dependency metascraper-url to v5.7.21 2019-11-11 11:36:37 +00:00
Renovate Bot
d8ca54fd71 Update dependency metascraper-publisher to v5.7.21 2019-11-11 10:22:16 +00:00
Renovate Bot
d6399f3318 Update dependency metascraper-image to v5.7.21 2019-11-11 09:23:43 +00:00
Renovate Bot
fd4766689d Update dependency metascraper-logo to v5.7.21 2019-11-11 08:22:37 +00:00
Renovate Bot
d1c7e068a8 Update dependency metascraper-author to v5.7.21 2019-11-11 07:19:23 +00:00
Renovate Bot
d273b03169 Update dependency metascraper-description to v5.7.21 2019-11-11 06:21:31 +00:00
Renovate Bot
ccc60a7a50 Update dependency metascraper to v5.7.21 2019-11-11 05:20:07 +00:00
Renovate Bot
e2847ae4cf Update dependency mock-knex to v0.4.7 2019-11-11 04:21:00 +00:00
Renovate Bot
e4a86f0120 Update dependency glob to v7.1.6 2019-11-11 03:25:50 +00:00
Renovate Bot
bd9cb1155b Update dependency csv-parser to v2.3.2 2019-11-11 02:20:33 +00:00
Renovate Bot
3a67245a71 Update dependency @tryghost/members-ssr to v0.7.3 2019-11-11 01:20:49 +00:00
Fabien O'Carroll
427f6f6326 Installed mailgun-js@0.22.0
no-issue
2019-11-08 17:21:20 +07:00
Fabien O'Carroll
b16c460633 Installed @tryghost/members-api@0.9.0
no-issue

This now includes stripe data when listing members, which is needed for
email content gating
2019-11-06 15:30:37 +07:00
Renovate Bot
f78996d063 Update dependency sharp to v0.23.2 2019-11-04 14:29:45 +00:00
Renovate Bot
afc68be5fc Update dependency oembed-parser to v1.3.6 2019-11-04 13:31:14 +00:00
Renovate Bot
783ab24735 Update dependency metascraper-title to v5.7.17 2019-11-04 12:30:53 +00:00
Renovate Bot
ea0833c1fc Update dependency metascraper-logo-favicon to v5.7.17 2019-11-04 11:29:20 +00:00
Naz Gargol
977298b6e1 Added basic HTML template support to MEGA (#11336)
no issue

- Sends formatted email to members
- Added css inlining support for MEGA template
- Migrated MEGA service to use API serializers
- Service needs to be compliant with the API to be able to serve absolute URLs for resources like images
- Fixed send email check for previously sent mails
2019-11-04 17:53:42 +07:00
Renovate Bot
a62f9be0fb Update dependency metascraper-url to v5.7.17 2019-11-04 10:30:46 +00:00
Renovate Bot
fc23b3418e Update dependency metascraper-publisher to v5.7.17 2019-11-04 09:30:15 +00:00
Renovate Bot
07915bcf85 Update dependency metascraper-image to v5.7.17 2019-11-04 08:31:27 +00:00
Renovate Bot
d7bd355159 Update dependency metascraper-logo to v5.7.17 2019-11-04 07:29:53 +00:00
Renovate Bot
3714a66ed1 Update dependency metascraper-author to v5.7.17 2019-11-04 06:28:31 +00:00
Renovate Bot
4817679bc4 Update dependency metascraper-description to v5.7.17 2019-11-04 05:28:47 +00:00
Renovate Bot
033f4ecd76 Update dependency metascraper to v5.7.17 2019-11-04 04:30:21 +00:00
Renovate Bot
f29b734feb Update dependency gscan to v3.1.1 2019-11-04 03:32:02 +00:00
Renovate Bot
708cf6ed02 Update dependency @tryghost/members-ssr to v0.7.2 2019-11-04 02:30:56 +00:00
Renovate Bot
28d3818b97 Update dependency @tryghost/helpers to v1.1.18 2019-11-04 01:28:58 +00:00
renovate[bot]
cfb66ac161 Update dependency oembed-parser to v1.3.5 (#11124) 2019-10-30 17:16:38 +01:00
renovate[bot]
da37e3ec61 Update dependency express-session to v1.17.0 (#11238) 2019-10-30 16:41:39 +01:00
renovate[bot]
4009911da2 Update dependency grunt-contrib-compress to v1.6.0 (#11293) 2019-10-30 16:38:32 +01:00
Kevin Ansfield
314958cbf1 Updated dependency @tryghost/url-utils to v0.6.13
no issue

- includes fix for cloudflare `<stream>` embeds breaking after having their URLs transformed
2019-10-30 10:56:48 +00:00
Fabien O'Carroll
804afca51f Installed @tryghost/members-api@0.8.3
no-issue

This improves logging for webhook signature validation
2019-10-30 17:24:04 +07:00
Kevin Ansfield
37e4fd9521 Revert "Update dependency @tryghost/url-utils to v0.6.11"
This reverts commit 37e8951fe9.

- the sub-dependency bump of `moment-timezone` caused another occurrence of https://github.com/tryghost/Ghost/issues/10870

# Conflicts:
#	package.json
2019-10-29 14:13:24 +00:00
renovate[bot]
640c4a82f1 Update dependency gscan to v3.1.0 (#11294) 2019-10-29 10:00:24 +00:00
renovate[bot]
4023772d12 Update dependency express-hbs to v2.2.0 (#11292) 2019-10-29 10:00:05 +00:00
Renovate Bot
2cf3b4f2f1 Update dependency metascraper-title to v5.7.14 2019-10-28 16:44:50 +00:00
Renovate Bot
661d0d784f Update dependency metascraper-url to v5.7.14 2019-10-28 15:37:39 +00:00
Renovate Bot
ab5662e4b3 Update dependency metascraper-logo-favicon to v5.7.14 2019-10-28 14:37:14 +00:00
Renovate Bot
fbcefeb826 Update dependency metascraper-publisher to v5.7.14 2019-10-28 12:30:54 +00:00
Kevin Ansfield
7284227f1e
🐛 Fixed 404s when using a proxy setup (#11269)
no issue

When using certain proxy setups that result in `host` and `x-forwarded-host` being different, it became impossible to access Ghost because all routes showed generic 404 pages.

- `vhost` module that we are using to separate front-end and admin urls does not use express' `req.hostname` so it does not pick up the `x-forwarded-host` url that express' `'trust proxy'` config gives us
- switched to the forked `@tryghost/vhost-middleware` package which has a one-line change to use `req.hostname || req.host`
- added `'trust proxy'` config to the admin express app and switched to using `req.hostname` in our redirect code to avoid infinite redirect loops
2019-10-28 11:22:05 +00:00
Renovate Bot
953bd2a2fc Update dependency metascraper-image to v5.7.14 2019-10-28 10:33:17 +00:00
Renovate Bot
9a8de5acf7 Update dependency metascraper-logo to v5.7.14 2019-10-28 09:32:14 +00:00
Renovate Bot
034b941897 Update dependency metascraper-author to v5.7.14 2019-10-28 08:30:56 +00:00
Renovate Bot
1c43722f5a Update dependency metascraper-description to v5.7.14 2019-10-28 07:30:37 +00:00
Renovate Bot
b8c80944fd Update dependency metascraper to v5.7.14 2019-10-28 06:31:17 +00:00
Renovate Bot
ab7609e746 Update dependency gscan to v3.0.1 2019-10-28 05:31:12 +00:00
Renovate Bot
c3123e4864 Update dependency glob to v7.1.5 2019-10-28 04:32:59 +00:00
Renovate Bot
37e8951fe9 Update dependency @tryghost/url-utils to v0.6.11 2019-10-28 02:37:22 +00:00
Renovate Bot
a8ecd9ac6e Update dependency @tryghost/social-urls to v0.1.4 2019-10-28 01:35:49 +00:00
Nazar Gargol
63c34b08e4 Bumped @tryghost/helpers to 1.1.17
- Needed a bump to allow displaying reading_time even when html content is empty but the reading time property is present
2019-10-21 18:07:38 +07:00
Hannah Wolfe
2358c65535 Update dependency gscan to v3.0.0 2019-10-16 19:17:24 +01:00
Fabien O'Carroll
c9c37b0da2
Merge master -> v3 (#11242)
Merge master -> v3
2019-10-15 17:44:14 +07:00
Renovate Bot
76f7488986 Update dependency @tryghost/social-urls to v0.1.3 2019-10-14 15:28:19 +00:00
Kevin Ansfield
bc8fc566a7 🐛 Fixed markdown card content appearing corrupted when editing a post
refs https://github.com/TryGhost/Ghost/issues/11235

- updates `@tryghost/url-utils` to a version with a fixed `markdownRelativeToAbsolute` method
2019-10-14 13:40:53 +01:00
Renovate Bot
3e15b18bc6 Update dependency @tryghost/members-ssr to v0.7.1 2019-10-14 01:23:54 +00:00
Kevin Ansfield
e33c46f3d1 Merge branch 'master' into v3 2019-10-12 19:13:30 +01:00
Kevin Ansfield
0ee46ab7a8 Updated @tryghost/url-utils to v0.6.9
no issue

- contains guards to prevent unnecessary processing of markdown and html
2019-10-12 17:48:54 +01:00
Kevin Ansfield
05f348f0fe Merge branch 'master' into v3 2019-10-11 13:28:19 +01:00
Kevin Ansfield
85a03b19b1 🐛 Fixed errors when saving or importing posts with invalid URLs
no issue

- bumped @tryghost/url-utils to a version which catches parsing errors and returns the original url argument
2019-10-11 13:20:24 +01:00
Kevin Ansfield
78e16ddd3f Merge branch 'master' into v3 2019-10-11 11:31:31 +01:00
Fabien O'Carroll
8b0130193c Installed @tryghost/members-api@0.8.2
no-issue

This version uses HS256 signed tokens for magic-links and provides much
smaller links but requires a 256bit (64 byte) secret
2019-10-11 13:47:48 +07:00
Fabien O'Carroll
6070ebaf02 Installed @tryghost/members-api@0.8.1
no-issue

This includes changes to support custom subjects in emails and access to
the email of the recipient in the getHTML and getText functions
2019-10-11 11:45:11 +07:00
Kevin Ansfield
1725f538be Fixed characters being lost at the end of markdown card content
no issue

- bumped @tryghost/url-utils with relevant fix
2019-10-10 16:57:15 +01:00
Kevin Ansfield
7fc10106dc Merge branch 'master' into v3 2019-10-10 10:37:42 +01:00
Nazar Gargol
ec303e5bec Bumped @tryghost/helpers to 1.1.14
- Needed to support `reading_time` propery available on post/page resources
2019-10-10 15:42:04 +07:00
Nazar Gargol
977fb5f650 Added reading_time property to post/page resources in Content API 2019-10-10 15:42:04 +07:00
Kevin Ansfield
9aca599b60 Updated @tryghost/url-utils
no issue

- fixes errors thrown from `urlUtils` method calls where the `itemPath` parameter is not passed
2019-10-09 22:31:04 +01:00
Kevin Ansfield
c6b9193940 Fixed duplicated host in URLs returned from API when saved as relative
no issue

- Ghost passes full urls through to the `url-utils` methods as the `itemPath` argument when performing relative->absolute transforms
- `url-utils` was not handling this correctly for page-relative urls (no leading slash) where it resulted in duplicate hosts such as http://mysite.com/http://mysite.com/item-path/relative-path
- bumps version of @tryghost/url-utils to a fixed version
2019-10-09 20:49:51 +01:00
Kevin Ansfield
b01bae7c3d 🐛 Fixed 500 errors when fetching certain posts via the Admin API
no issue

- it's possible to have `mobiledoc` that has anchor markups with no `href` attribute, in that situation our url-transformation utilities were throwing errors when generating Admin API output
- bumps `@tryghost/url-utils` with fixed utility functions
2019-10-09 17:21:06 +01:00
Kevin Ansfield
587bd8accb Merge branch 'master' into v3 2019-10-09 15:04:09 +01:00
Naz Gargol
b4548b0119
Update dependency gscan to v2.10.0 (#11221)
no issue

- This removes unwanted checks for `{{statusCode}}` which are compatible with v3 and were added by mistake in v2
2019-10-09 12:13:12 +02:00
Fabien O'Carroll
757fe72da1 Installed @tryghost/members-api@0.8.0
no-issue

This adds support for storing and retrieving stripe data from local db
2019-10-09 16:24:51 +07:00
Fabien O'Carroll
312e0cc31e Installed @tryghost/members-ssr@0.7.0
no-issue

This removes the cookie caching functionality from members-ssr
2019-10-09 16:24:51 +07:00
Kevin Ansfield
6028fde666 Merge branch 'master' into v3 2019-10-08 13:58:08 +01:00
Kevin Ansfield
32f3f9d2c3 🐛 Fixed "unsaved changes" modal displaying when post has been saved
refs https://github.com/TryGhost/Ghost/issues/10477

The unsaved changes modal is displaying even when the post has been saved if images have been uploaded because the server is transforming absolute image urls to relative during input of the `mobiledoc` field but not transforming them back to absolute during output. The editor then thinks it's out of sync and shows the warning when trying to leave.

- `@tryghost/url-utils` has been updated with new methods for transforming URLs in mobiledoc content
- moves absolute->relative transformation from the API input serializers into the Post model
- transforms URLs in more fields for a more comprehensive transformation and fewer issues when re-configuring a site's domain
  - previously there could be problems with internal links between posts not being transformed so you could change the url config to newdomain.com but links in post content would still be pointing to olddomain.com
- updates the API post output serializers to transform all modified fields
- drops the `?absolute_urls=true` param switch from the `canary` API post output serializer so that all URLs are output as absolute
  - we're transforming more urls to relative when saving so this is necessary to ensure the unsaved changes modal is not triggered
  - the query param isn't documented and will disappear in v3
2019-10-07 22:59:19 +01:00
Renovate Bot
0f2afafcbb Update dependency knex to v0.19.5 2019-10-07 09:30:22 +00:00
renovate[bot]
4c81a62a9d Lock file maintenance (#11175) 2019-10-07 12:53:34 +05:30
renovate[bot]
cb9eab0248 Update dependency bluebird to v3.7.0 (#11206) 2019-10-07 12:44:07 +05:30
Renovate Bot
fe4dccfaa3
Update dependency nock to v11.3.6 2019-10-07 01:29:57 +00:00
Renovate Bot
cc70fe983e Update dependency @tryghost/helpers to v1.1.12 2019-10-07 01:29:14 +00:00
Fabien O'Carroll
aaaf473154 Installed @tryghost/members-api@0.7.7
no-issue

This ensures that the correct emails are sent regardless of the form and
allows us to pass a flag to disable sending emails to users that are nor
already members.
2019-10-06 21:22:58 +07:00
Fabien O'Carroll
cb431d758b Installed @tryghost/members-api@0.7.6
no-issue

This adds support for dynamic success and cancel urls for stripe checkout
2019-10-03 17:36:33 +07:00
Kevin Ansfield
36674c7584 Updated dependency @tryghost/url-utils to v0.6.0
no issue

- has refactored relativeToAbsolute utility
- has bugfixes for subdirectory handling and deduplication
- includes new utilities for transforming urls in markdown and mobiledoc
2019-10-02 13:06:50 +01:00
Fabien O'Carroll
8bb0f6631f Installed @tryghost/members-ssr@0.6.0
no-issue

This adds extra protection for weird cookies states when trying to get
identity tokens
2019-10-02 18:23:52 +07:00
Fabien O'Carroll
d4ffb0176b Installed @tryghost/members-api@0.7.5
no-issue

This adds extra stripe information to members, including last4 digits of card
2019-10-02 18:22:44 +07:00
Fabien O'Carroll
09daf832d9 Installed @tryghost/members-api@0.7.4
This includes fixes for the destory and update methods of members object
2019-10-02 15:26:40 +07:00
Fabien O'Carroll
7a59489643 Installed @tryghost/members-api@0.7.2
no-issue

This includes fixes to webhook generating and customer handling
Also includes an update to how we set the logger
2019-10-02 14:03:00 +07:00
Fabien O'Carroll
c18cf50654 Installed @tryghost/members-api@0.7.1
no-issue

This includes a bugfix when creating members and sending the email
2019-10-01 17:50:13 +07:00
Fabien O'Carroll
3507df8a7c Installed @tryghost/members-api@0.7.0
no-issue

This includes functionality that allows us to have multiple magic-link
email templates
2019-10-01 15:16:28 +07:00
Fabien O'Carroll
e2ec3e71ac Installed members-api@0.6.2 members-ssr@0.5.2
no-issue
2019-10-01 11:58:50 +07:00
Fabien O'Carroll
020b2f2159 Updated lockfile
no-issue
2019-10-01 11:45:37 +07:00
renovate[bot]
e34cd56152 Update dependency metascraper-image to v5.7.6 (#11118) 2019-09-30 23:20:42 +02:00
renovate[bot]
b9636b64b6 Update dependency image-size to v0.8.3 (#11149) 2019-09-30 23:17:18 +02:00
renovate[bot]
82fb7b5960 Update dependency metascraper-title to v5.7.6 (#11122) 2019-09-30 23:15:30 +02:00
renovate[bot]
9da9ce669d Update dependency metascraper-description to v5.7.6 (#11117) 2019-09-30 23:10:21 +02:00
renovate[bot]
f4c14e570d Update dependency metascraper-logo-favicon to v5.7.6 (#11120) 2019-09-30 23:09:36 +02:00
renovate[bot]
1f2b5b27dc Update dependency metascraper to v5.7.6 (#11115) 2019-09-30 22:59:25 +02:00
renovate[bot]
3f3972c019 Update dependency metascraper-url to v5.7.6 (#11123) 2019-09-30 22:57:25 +02:00
renovate[bot]
7da882499a Update dependency metascraper-logo to v5.7.6 (#11119) 2019-09-30 22:56:24 +02:00
renovate[bot]
80789ab8d0 Update dependency metascraper-publisher to v5.7.6 (#11121) 2019-09-30 22:56:04 +02:00
renovate[bot]
0f098ccc3e Update dependency metascraper-author to v5.7.6 (#11116) 2019-09-30 22:55:44 +02:00
renovate[bot]
42faad9ee7 Update dependency markdown-it-mark to v3 (#11127) 2019-09-30 22:51:31 +02:00
renovate[bot]
8631f4cfd2 Update dependency knex-migrator to v3.4.0 (#11170) 2019-09-30 22:46:43 +02:00
renovate[bot]
9be99df0e1 Update dependency probe-image-size to v5 (#11128) 2019-09-30 22:35:10 +02:00
renovate[bot]
b64b0f3532 Update dependency markdown-it to v10 (#11126) 2019-09-30 21:22:08 +02:00
renovate[bot]
044919356e Update dependency mocha to v6 (#11171) 2019-09-30 10:31:11 +02:00
Renovate Bot
4bba5438f1 Update dependency sharp to v0.23.1 2019-09-30 04:32:55 +00:00
Renovate Bot
8e31417c09 Update dependency csv-parser to v2.3.1 2019-09-30 03:33:21 +00:00
Renovate Bot
719a38358b Update dependency @tryghost/members-ssr to v0.5.1 2019-09-30 02:32:32 +00:00
Renovate Bot
e03a02f3ed Update dependency @tryghost/helpers to v1.1.11 2019-09-30 01:35:46 +00:00
Kevin Ansfield
56493bed1a Update dependency @tryghost/url-utils to 0.5.0
no issue

- fixes failing regression test where `htmlRelativeToAbsolute()` was throwing an error due to some invalid HTML in our test fixtures
2019-09-26 12:24:18 +01:00
Fabien O'Carroll
e53913930d Installed @tryghost/members-api@0.6.1
no-issue

This adds support for sending email when creating member
2019-09-26 17:32:32 +07:00
Fabien O'Carroll
0de68a0919 Installed @tryghost/members-api@0.6.0
no-issue

This contains updates to allow creating of members via a stripe webhook,
and includes the webhook handler. Also updates members-api to expose a
middleware object, rather than a router - so that routes can be mounted
at the endpoint of choice.
2019-09-26 11:35:44 +07:00
Kevin Ansfield
d69440bd4f
Update dependency @tryghost/url-utils to 0.4.0 (#11156)
no issue

- updates usage of `htmlRelativeToAbsolute` to avoid unnecessary duplication of "home" url fetching (the UrlUtils instance already has that information)
2019-09-25 12:35:59 +01:00
Kevin Ansfield
3eb11533bd Marked the client auth table drop migration as irreversible
no issue

- bumps `knex-migrator` so it supports irreversible migrations
- marks the `03-drop-client-auth` migration as irreversible because it destroys data that is not recoverable and is required for earlier versions of Ghost to function
2019-09-23 17:22:46 +01:00
Nazar Gargol
3712e6e01c Bumped gscan to 2.9.0 2019-09-23 16:48:21 +02:00
Renovate Bot
93e04b0a43 Update dependency @tryghost/members-api to v0.5.3 2019-09-23 03:25:09 +00:00
Renovate Bot
b89e3650f1
Update dependency nock to v11.3.5 2019-09-23 01:27:17 +00:00
Renovate Bot
d33fc8c8a6 Update dependency @tryghost/helpers to v1.1.10 2019-09-23 01:26:36 +00:00
Nazar Gargol
62343b09e2 💡Bumped gscan version to 2.9.0 2019-09-19 18:18:33 +02:00
Fabien O'Carroll
01fca3ec2c Installed @tryghost/members-ssr@0.5.0
no-issue

This includes changes that can be used to signin via a GET request
2019-09-17 11:05:06 +08:00
Naz Gargol
0bee38d586
💡Bumped gscan version to 2.8.0 (#11134)
no issue

- This version contains --canary flag and new rules that come with it
- The theme checks will be run against canary rules by default
2019-09-16 18:22:49 +02:00
Kevin Ansfield
378ebe62b1 Merge branch 'master' into v3 2019-09-16 09:32:10 +01:00
Renovate Bot
2f86894dff Update dependency knex to v0.19.4 2019-09-16 04:25:49 +00:00
Renovate Bot
21b9ba893a Update dependency image-size to v0.7.5 2019-09-16 03:26:55 +00:00
Renovate Bot
c82418153d
Update Test & linting packages 2019-09-16 00:28:05 +00:00
Fabien O'Carroll
8d4056a6ec Installed @tryghost/members-api@0.5.2
no-issue

This improves the logging of errors when sending magic link.
2019-09-15 11:53:29 +08:00
Kevin Ansfield
d645afb416 Removed all accesstokens and refreshtokens related code
no issue

- v0.1 is ☠️ so the access/refresh token based auth is no longer used
- removed all code related to the `accesstokens` and `refreshtokens` tables
- removed all `passport` related dependencies as it's no longer used
2019-09-12 15:45:27 +01:00
Kevin Ansfield
b46f9b1dc2 🔒 Fully separated front-end and admin app urls
no issue

- uses `vhost` in parent-app to properly split front-end and admin/api apps when a separate admin url is configured
2019-09-10 15:47:49 +01:00
renovate[bot]
c3eb5c291c Lock file maintenance (#11061) 2019-09-10 09:45:45 +01:00
renovate[bot]
74fab21eb5 Update dependency mobiledoc-dom-renderer to v0.7.0 (#10937) 2019-09-10 09:36:43 +01:00
renovate[bot]
aa22de4db8 Update dependency nock to v11 (#11093) 2019-09-10 09:13:26 +01:00
renovate[bot]
07448ce034 Update dependency sqlite3 to v4.1.0 (#11034) 2019-09-10 08:58:35 +01:00
renovate[bot]
68af109d8e Update dependency bookshelf-relations to v1.3.0 (#11065) 2019-09-10 08:57:56 +01:00
Kevin Ansfield
5be63958b9 Reverted dependency oembed-parser to 1.2.2
no issue

- 1.3.1 is breaking the oembed regression tests
2019-09-09 16:00:04 +01:00
renovate[bot]
5c8efd087e Update dependency @tryghost/html-to-mobiledoc to v0.6.0 (#11092) 2019-09-09 10:45:30 +01:00
renovate[bot]
fa0a399345 Update dependency oembed-parser to v1.3.1 (#10983) 2019-09-09 10:44:13 +01:00
Fabien O'Carroll
b8fc0d2bd1
Cached member data in ghost-members-ssr-cache cookie (#11096)
no-issue

* Installed @tryghost/members-ssr@0.4.0
  This now supports caching of the data returned by the members-api

* Renamed cookies set by members-ssr
  As discussed with @ErisDS I have prefixed these cookies with `ghost`
2019-09-09 17:39:46 +08:00
Renovate Bot
01f2f36547 Update dependency @tryghost/url-utils to v0.3.1 2019-09-09 02:34:18 +00:00
Renovate Bot
af021921e7 Update dependency @tryghost/helpers to v1.1.9 2019-09-09 01:28:16 +00:00
Fabien O'Carroll
f63577fa4f
Implemented stripe checkout handling for members
no-issue

* Installed members-api@0.5.0 members-ssr@0.3.1
* Supported multiple members-forms
* Used members canary api
* Added GET handler to /members/ssr for id token
The identity token will be used to ensure that a payment is linked to the correct member
* Added stripe.js to ghost_head when members enabled
* Added basic support for linking to stripe checkout
* Removed listener to title and icon settings changes
* Added stripe subscription config
2019-09-06 15:14:21 +08:00
Fabien O'Carroll
49672a1e4d Updated members service to use magic-link signin
no-issue
2019-09-05 11:14:50 +08:00
Fabien O'Carroll
ef78fe7bab Updated members-api@0.4.1 members-ssr@0.3.0
no-issue

These versions contain the necessary changes for magic link signin
2019-09-05 11:14:50 +08:00
Renovate Bot
b1c61e4e84 Update dependency knex to v0.19.3 2019-09-02 02:32:19 +00:00
Renovate Bot
9a9be2f55e Update dependency bookshelf-relations to v1.1.2 2019-09-02 01:31:35 +00:00
Rishabh Garg
c2aa62083c Added support for bookmark card (#11024)
requires https://github.com/TryGhost/Ghost-Admin/pull/1293

- updates `oembed` endpoint behaviour
  - if an oembed provider is not found then we use `metascraper` to populate a metadata object
  - when metadata is returned rather than an oembed response the payload will look like this:
    ```json
    {
        "url": "...",
        "type": "bookmark",
        "metadata": {
            "url": "...",
            "title": "...",
            "description": "...",
            "author": "...",
            "publisher": "...",
            "thumbnail": "...",
            "icon": "..."
        }
    }
    ```
- adds a `bookmark` card which generates output for the bookmark card:
  ```html
  <figure class="kg-card kg-bookmark-card">
    <a href="[URL]" class="kg-bookmark-container">
      <div class="kg-bookmark-content">
        <div class="kg-bookmark-title">[TITLE]</div>
        <div class="kg-bookmark-description">[DESCRIPTION]</div>
        <div class="kg-bookmark-metadata">
          <img src="[ICON]" class="kg-bookmark-icon">
          <span class="kg-bookmark-author">[AUTHOR]</span>
          <span class="kg-bookmark-publisher">[PUBLISHER]</span>
        </div>
      </div>
      <div class="kg-bookmark-thumbnail">
        <img src="[THUMBNAIL]">
      </div>
    </a>
  </figure>
  ```
  - if a particular bit of data does not exist then the associated html element will not be present
2019-08-27 15:01:02 +01:00
Renovate Bot
4d7164dce6 Update dependency markdown-it to v9.1.0 2019-08-27 10:45:40 +08:00
Renovate Bot
9ea2f5b445 Update dependency uuid to v3.3.3 2019-08-26 03:26:59 +00:00
Renovate Bot
35a74ecb29
Update dependency proxyquire to v2.1.3 2019-08-26 00:29:39 +00:00
Kevin Ansfield
d0fa149e0e Updated tests eslint config to use eslint-plugin-ghost@0.5.0
no issue
- bump eslint-plugin-ghost to v0.5.0
- update core/test eslint config to use "ghost:test" in place of custom ruleset
- apply automated eslint fixes
2019-08-19 13:38:35 +01:00
Kevin Ansfield
9c46ff154d Revert tmp dependency to v0.0.33
no issue
- renovate auto-upgraded to 0.1.0
- reverts to 0.0.33 to fix the tests
2019-08-19 11:08:27 +01:00
Renovate Bot
dc36012d11 Update dependency knex to v0.19.2 2019-08-19 03:33:02 +00:00
Renovate Bot
59c20ec578 Update dependency @tryghost/social-urls to v0.1.2 2019-08-19 02:48:09 +00:00
Renovate Bot
12fe76cf1d Update dependency @tryghost/html-to-mobiledoc to v0.5.1 2019-08-19 02:30:45 +00:00
Renovate Bot
a250afdfb2 Update dependency @tryghost/helpers to v1.1.8 2019-08-19 01:35:54 +00:00
Renovate Bot
a04ab771e4 Update Test & linting packages 2019-08-16 19:19:54 +00:00
Kevin Ansfield
61420ae67f
Updated @tryghost/url-utils to v0.3.0 (#11027)
refs https://github.com/TryGhost/Ghost/issues/10793

- fixes `urlUtils.htmlRelativeToAbsolute` mangling attribute quote styles and removing indentation
2019-08-16 00:26:24 +01:00
Fabien O'Carroll
24c8da58e4 Fixed local package issue for npm users (#11019)
closes #11018
2019-08-14 13:19:01 +05:30
Fabien O'Carroll
ef4fd4b8ef Added shared nql-map-key-values module
no-issue

This module was being shared between multiple parts of the codebase, the
core/shared directory is a stopgap before we move it out to mongo-utils.
2019-08-12 18:41:43 +08:00
Kevin Ansfield
4f3391cd04
Updated @tryghost/url-utils to v0.2.0 (#11004)
no issue

- updates `@tryghost/url-utils` following an internal refactor of the package
- renames `makeAbsoluteUrls` to `htmlRelativeToAbsolute` to better reflect what the function is doing
- renames `getBlogUrl` to `getSiteUrl`
- updates UrlUtils test stubbing util to work with a class
- fixes use of invalid port numbers in tests (max port number is 65535, any higher is an invalid URL that will error with some parsers)
2019-08-12 09:31:42 +01:00
Renovate Bot
e89a2074b8
Update dependency proxyquire to v2.1.2 2019-08-12 00:29:25 +00:00
Fabien O'Carroll
c713847718 Installed @nexes/nql@0.3.0 2019-08-09 14:39:01 +08:00
renovate[bot]
494e0d14a0 Update dependency archiver to v3.1.1 (#10981) 2019-08-06 16:16:08 +08:00
renovate[bot]
13b1a9e7ef Update dependency sharp to v0.23.0 (#10984) 2019-08-06 16:14:50 +08:00
Renovate Bot
ff4d3f9e61 Update dependency proxyquire to v2.1.1 2019-08-05 04:34:25 +00:00
Renovate Bot
75ba8b5c64 Update dependency knex-migrator to v3.3.3 2019-08-05 01:28:21 +00:00
Hannah Wolfe
75f6e9c0e3 Update dependency gscan to v2.7.0 2019-08-01 11:00:04 +01:00
Renovate Bot
daae3964cc Lock file maintenance 2019-08-01 11:57:31 +05:30
Renovate Bot
5766edd6a3 Update dependency semver to v6.3.0 2019-08-01 10:44:06 +05:30
Renovate Bot
2d7a34fcbd Update dependency amperize to v0.6.0 2019-08-01 10:43:41 +05:30
Renovate Bot
c7a873b80f Update dependency @tryghost/html-to-mobiledoc to v0.5.0 2019-08-01 10:43:15 +05:30
Renovate Bot
40d8cd332b Update dependency intl-messageformat to v5.4.3 2019-08-01 10:40:32 +05:30
Rish
86c670a942 Updated dependency @tryghost/url-utils to v0.1.4
refs #10870

- Reverts moment-timezone version in url-utils to 0.5.23 to fix moment format issue
2019-07-30 20:17:38 +05:30
Rish
ffbd749c8d Added resolution for moment-timezone version
refs #10870

- `moment-timezone` was bumped to `0.5.26` inadvertently as a result of bump to `url-utils` in 6cb0f800c8
- Added resolution makes sure we use `0.5.23` for `moment-timezone` till tests are updated to work with latest version
2019-07-30 18:36:26 +05:30
Renovate Bot
e6a99ec147 Update dependency simple-html-tokenizer to v0.5.8 2019-07-29 12:24:53 +00:00
Renovate Bot
4428822253 Update dependency knex to v0.19.1 2019-07-29 06:25:28 +00:00
Renovate Bot
264a185721 Update dependency intl-messageformat to v5.1.2 2019-07-29 05:25:57 +00:00
Renovate Bot
d663cd2c8a Update dependency gscan to v2.6.6 2019-07-29 04:27:19 +00:00
Renovate Bot
6cb0f800c8 Update dependency @tryghost/url-utils to v0.1.3 2019-07-29 03:26:26 +00:00
Renovate Bot
a4546409c2 Update dependency @tryghost/social-urls to v0.1.1 2019-07-29 02:27:21 +00:00
Renovate Bot
d5d89ce9e4 Update dependency @tryghost/helpers to v1.1.7 2019-07-29 01:27:14 +00:00
Renovate Bot
e774d7bdd3 Update dependency multer to v1.4.2 2019-07-23 10:41:43 +00:00
Renovate Bot
2b20ae8f78 Update dependency lodash to v4.17.15 2019-07-22 03:27:21 +00:00
Renovate Bot
a1ece81c55 Update dependency gscan to v2.6.4 2019-07-22 02:30:43 +00:00
Renovate Bot
876ef128a7 Update dependency archiver to v3.0.3 2019-07-22 01:28:19 +00:00
Fabien O'Carroll
078060abdc
Refactored members service logging and errors (#10919)
* Installed @tryghost/members-ssr@0.2.1

refs https://github.com/TryGhost/Members/issues/38

This updates allows for dynamic access of the membersApi, which will be
used in future when replacing the membersApi instance with a newly
configured one.

* Set the membersApiInstance logger to use common.logging

refs https://github.com/TryGhost/Members/issues/38

Passes the Ghost logger to the members api, so that we can keep an eye
on errors produced by the api.

* Refactored memberService use to always use getter

refs https://github.com/TryGhost/Members/issues/38

This will allow us to switch out the membersApi and the consumers of it
to have the updated reference by going through a getter.

* Installed @tryghost/members-api@0.3.0

refs https://github.com/TryGhost/Members/issues/38

Adds support for setting the logger

* Uninstalled stripe@7.0.0

refs https://github.com/TryGhost/Members/issues/38

The stripe module is now a dep of members-api, as it should be

* Updated members service to reconfigure settings

refs https://github.com/TryGhost/Members/issues/38

Previously we were unable to stop an invalidly configured members api
instance, now that we create a new instance, we can wait for the ready
or error event and only switch it out then.
2019-07-18 15:37:11 +08:00
Renovate Bot
c521b6632d Update dependency markdown-it to v9 2019-07-15 13:32:21 +01:00
Renovate Bot
033e58e4ac Update dependency knex to v0.19.0 2019-07-15 16:37:34 +08:00
Renovate Bot
6eefce3349 Update dependency brute-knex to v4 2019-07-15 16:13:14 +08:00
Renovate Bot
c7e30e9970 Update dependency intl-messageformat to v5 2019-07-15 14:27:05 +08:00
Renovate Bot
a926adfd6c Update dependency probe-image-size to v4.1.1 2019-07-15 14:26:19 +08:00
Renovate Bot
e497486e78 Update dependency intl-messageformat to v4.4.0 2019-07-15 14:17:04 +08:00
Renovate Bot
07215bd040 Update dependency probe-image-size to v4.0.1 2019-07-15 05:24:55 +00:00
Renovate Bot
848640eda2 Update dependency mock-knex to v0.4.6 2019-07-15 04:25:22 +00:00
Renovate Bot
79b2cb7294 Update dependency markdown-it-footnote to v3.0.2 2019-07-15 03:25:21 +00:00
Renovate Bot
0e29b57ab3 Update dependency lodash to v4.17.14 2019-07-15 02:25:23 +00:00
Renovate Bot
6d3cd93107 Update dependency gscan to v2.6.3 2019-07-15 01:54:27 +00:00
Renovate Bot
1b56892e33 Update dependency ajv to v6.10.2 2019-07-15 01:25:12 +00:00