Commit Graph

10599 Commits

Author SHA1 Message Date
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
Daniel Lockyer
58aff29938 Switched to native conditional for labels in PRs
no issue

- removes the need for an external Action by checking natively
2020-03-25 16:31:58 +00:00
Daniel Lockyer
037db39b84
Removed Travis maintenance option from Renovate
no issue

- we no longer use Travis
2020-03-25 15:27:57 +00:00
Daniel Lockyer
2c7c975f91 Specified version for GitHub Action dependency
no issue
2020-03-25 15:11:59 +00:00
Hannah Wolfe
7986cb3171 Removed .only from regression test 2020-03-25 14:51:28 +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
Fabien O'Carroll
299c08b079 Added ghost_{public,private}_key to settings mock
no-issue

This ensures that running individual tests are not relying on other
tests having been run so they suceed, specifically the
regression/site/site_spec.js tests
2020-03-25 14:32:17 +02:00
Hannah Wolfe
b2b278a3ba Removed typo 2020-03-25 12:28:57 +00:00
Daniel Lockyer
f054976d4f Added GitHub Action to notify Sentry of releases
no issue

- automates the notification process upon a release published event
2020-03-25 12:21:29 +00:00
Hannah Wolfe
f12238b11a Cleanup repeated module mocking utils
- mock non existant module util was defined twice
- split it out properly from the rest of the utils, update all references
- this allows us to move this util out of the codebase along with other code, e.g. the image manipulation code
2020-03-25 12:07:32 +00:00
Hannah Wolfe
10ee38683d Update errors across lib/image and lib/request
- swap common.errors for @tryghost/errors
- doing this in batches across small parts of the codebase to reduce disruption
2020-03-25 10:28:14 +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
Hannah Wolfe
7e0c71509b Moved apps service to frontend
- App service is for our internal frontend apps
- This is a very straightforward move as this truly belongs to frontend
2020-03-23 19:43:01 +00:00
Daniel Lockyer
5030be31cf Version bump to 3.12.0 2020-03-23 12:23:44 +00:00
Daniel Lockyer
216c95dc16 Updated Ghost-Admin to 3.12.0 2020-03-23 12:23:44 +00:00
Daniel Lockyer
a2c91181e9 Updated Casper to 3.0.10 2020-03-23 12:23:44 +00:00
Nazar Gargol
d881f6704d Renamed migration in 3.12 to follow numerical sequence
no issue

- Migrations within a minor have to be named with numbered prefixes like 01-, 02-, 03-.
- These two migrations were merged into master in the same time window which lead to having incorrect naming
2020-03-23 10:39:09 +08: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
Hannah Wolfe
ca9d72f317 Used proxy in helper rather than direct require
- we already have access to urlUtils through our helper proxy
2020-03-20 13:01:41 +00:00
Hannah Wolfe
99c192e140 Removed unused test file + dep
- couple of minor bits of cleanup
2020-03-20 12:28:37 +00:00
Hannah Wolfe
e106c6dc1c Added acceptance tests for private blogging
- Test that the basic routes are working
2020-03-20 11:40:11 +00:00
Hannah Wolfe
297c773f2a Added a timer for Start Ghost test utility
- Show us how long it takes to start Ghost in each acceptance/regression test that uses this method
- Useful for debugging slow tests, and also Ghost boot time!
2020-03-20 11:40:11 +00:00
Daniel Lockyer
d229cf83a4 Configured CI to only run MySQL container on MySQL tests
no issue

- this saves about 50s on the SQLite tests
2020-03-20 11:15:49 +00:00
Hannah Wolfe
11682bb8a7 Added frontend acceptance tests
- Basic set of tests checks that our default behaviour works as expected
- Moved current acceptance tests to api-acceptance, and added this in frontend-acceptance
- This reduces nesting, and will help when we eventually separate the frontend out entirely
2020-03-20 10:40:22 +00:00
Hannah Wolfe
8c1a0b8d0c Remove External Apps
- Apps are marked as removed in 3.0, never officially launched and have been deprecated for at least 2 years.
- We've slowly removed bits that got in our way or were insecure over time meaning they mostly didn't work
- This cleans up the remainder of the logic
- The tables should be cleaned up in a future major
2020-03-20 10:40:22 +00:00
Daniel Lockyer
453bcc5030 Added all-tests label to run full test suite on a PR
no issue
2020-03-20 10:05:37 +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
Hannah Wolfe
bc7906a7b2 Revert "Remove Apps"
This reverts commit cbb59a57db.
2020-03-20 08:58:26 +00:00
Hannah Wolfe
cbb59a57db Remove Apps
- Apps are marked as removed in 3.0, never officially launched and have been deprecated for at least 2 years.
- We've slowly removed bits that got in our way or were insecure over time meaning they mostly didn't work
- This cleans up the remainder of the logic
- The tables should be cleaned up in a future major
2020-03-19 19:06:17 +00:00
Hannah Wolfe
5e2c62e328
Moved theme i18n into theme service + refactor (#11674)
- The existing common.i18n library contained code for core and theme translations
- There is some shared logic and some theme-specific logic, and the theme-specific logic has dependencies we don't want in lib/common
- This refactor introduces an I18n base class that does all the main shared logic, with no dependencies on other parts of the codebase
- ThemeI18n then extends this logic, and replaces the functions it needs to handle differently and adds it's dependencies on config and settingsCache
- The class has several methods broken down into smaller pieces to make it easier to extend only the necessary parts
- The class also encapsulates all of its logic, without external functions or variables
- The function loadThemeTranslations becomes the 'init()' function overridden in themeI18n.
2020-03-19 14:07:20 +00:00
Kevin Ansfield
7e4de9b0c1 Fixed typo
no issue

- typo in require introduced in a120d02231
2020-03-19 13:58:13 +00:00
Kevin Ansfield
a120d02231 Moved create-card.js
no issue

- prep for easier move to external repo
2020-03-19 13:54:55 +00:00
Kevin Ansfield
0741114d11 Moved htmlToMobiledocConverter() out of renderers
no issue

- prep for extraction of various Koenig repos
- html->mobiledoc doesn't really fit into the "renderer" naming as it's more of a converter than a renderer and doesn't follow the same pattern
2020-03-19 12:18:54 +00:00
Kevin Ansfield
4949ad9214 Renamed mobiledoc converters to renderers
no issue

- matches naming with `mobiledoc-kit` nomenclature
- better matches intent for future additions of mobiledoc rendering to email/plaintext/etc
2020-03-18 18:13:25 +00:00
Vikas Potluri
dec24ad883
🐛 improve error handling for invalid JSON Theme Translations (#11655)
refs #11464

- Combine reading + parsing of translation file into same step
- DRY reading / parsing logic
- Log an error when parsing fails and fall back as if the locale doesn't exist
2020-03-18 15:51:57 +00:00
Daniel Lockyer
2d42e7eaea Tidied up GitHub Actions workflows
no issue
2020-03-17 12:46:03 +00:00
Daniel Lockyer
64f34273a7 Renamed GitHub Actions workflow file
no issue
2020-03-17 12:43:54 +00:00
Renovate Bot
0507841c9e Update dependency grunt to v1.1.0 2020-03-17 06:46:44 +00:00
Edward Kerstein
129610526d
🐛 Fixed youtube video embeds not displaying in AMP pages (#11058)
closes https://github.com/TryGhost/Ghost/issues/10972

- adds `amp-youtube` to the allowed AMP components list
- adjusts `{{amp_components}}` output to include the `amp-youtube` script if any iframes with youtube urls are detected in the AMP content

Co-authored-by: Joseph Coffland <joseph@cauldrondevelopment.com>
2020-03-16 14:39:10 +00:00
Fabien O'Carroll
b529a7ab86 Fixed regression test for database migrations
no-issue

We added a new permission and this test was not updated
2020-03-16 14:46:12 +02:00
Fabien O'Carroll
6f6e5e2a3a Added migration for read:identity permission
no-issue

This ensures that the permission always exists in version 3.12
2020-03-16 13:22:04 +01: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
Rish
318484d737 Read billing url from config and add to API
no issue
2020-03-16 13:22:04 +01:00
Renovate Bot
ccd586ea6e Update dependency rewire to v5 2020-03-16 09:28:32 +00:00
Daniel Lockyer
204efe0158 Fixed MySQL port mapping in CI
no issue

- turns out the exposed port is randomly assigned, but this worked for
  us so far
- this commit enforces the use of 3306 for the MySQL port
2020-03-16 08:59:07 +00:00