Commit Graph

2913 Commits

Author SHA1 Message Date
renovate[bot]
ce495969d1
Update dependency terser to v5.15.1 2022-10-05 18:29:24 +00:00
renovate[bot]
fa7a582c78
Update dependency knex-migrator to v5.0.7 2022-10-05 15:06:09 +00:00
Naz
d817e5830d
Added header snapshots to webhook e2e tests
refs https://github.com/TryGhost/Toolbox/issues/320

- Header snapshot matching was missing from webhook e2e tests. With a bumped version of webhook-mock-receiver it's now possible to record and match webhook request headers.
2022-10-05 17:23:02 +08:00
Daniel Lockyer
08cef79674
Updated lockfile 2022-10-05 15:07:12 +07:00
renovate[bot]
2c2ee81adb
Update Test & linting packages 2022-10-05 00:36:08 +00:00
renovate[bot]
8751245fa5 Update sentry-javascript monorepo to v7.14.1 2022-10-04 08:07:37 +07:00
renovate[bot]
5140f8a887 Update dependency sqlite3 to v5.1.2 2022-10-03 14:21:24 +07:00
renovate[bot]
cf5dbb6981 Lock file maintenance 2022-10-03 08:30:32 +07:00
renovate[bot]
828ad5915d Update dependency postcss to v8.4.17 2022-10-03 07:38:42 +07:00
renovate[bot]
839a61bacd Update dependency @babel/plugin-proposal-decorators to v7.19.3 2022-09-29 11:47:34 +07:00
renovate[bot]
5176aa8a7b Update dependency @types/mocha to v10 2022-09-29 11:42:45 +07:00
renovate[bot]
68ad829e1f Update sentry-javascript monorepo to v7.14.0 2022-09-29 07:44:21 +07:00
renovate[bot]
b61c13e228 Update dependency @playwright/test to v1.26.1 2022-09-28 12:38:09 +07:00
renovate[bot]
9eb3c84a23
Updated @tryghost dependencies (#15434)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-09-27 08:31:35 +07:00
renovate[bot]
7d21e192b2
Update metascraper to v5.31.1 2022-09-26 20:28:26 +00:00
renovate[bot]
d02401c1f0
Update dependency eslint to v8.24.0 2022-09-26 06:58:26 +00:00
Naz
7b009bf1fe Enabled shared caching of 404 error responses
refs https://github.com/TryGhost/Toolbox/issues/410

- The 'private' value in 'Cache-Control' response header for all errors made it impossible for shared caches (e.g.: Fastly, Cloudflare) to cache 404 responses efficiently.
- The change substitutes 'max-age=0' which should not effect the browser cache behavior but would allow shared caches to process such requests efficiently.
- A more loose caching logic only applies to 404 responses from GET requests that are not user-specific (non-authenticated, non-cookie containing requests)
2022-09-26 14:54:50 +08:00
renovate[bot]
7045eef930
Update dependency ember-css-transitions to v4.2.0 (#15453)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-09-24 18:20:57 +02:00
renovate[bot]
8aa4308866
Update ember-basic-dropdown addons to v6 (major) (#15159)
Update ember-basic-dropdown addons to v6

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-09-24 15:37:06 +02:00
renovate[bot]
65a74f41c8
Update dependency ember-power-select to v4.1.7 (#15157)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Kevin Ansfield <kevin@lookingsideways.co.uk>
2022-09-24 15:08:42 +02:00
Kevin Ansfield
fa84808048 Dropped ember-cli-moment-shim dependency
no issue

Since `ember-moment@10.0` it's not been necessary to use the `ember-cli-moment-shim` package, with `moment` instead being usable directly via `ember-auto-import`. Getting rid of the shim package is necessary for compatibility with `embroider`, Ember's new build tooling.

- dropped `ember-cli-moment-shim` dependency
- added `moment-timezone` dependency and updated all imports to reflect the different package
- worked around `ember-power-calendar` having `ember-cli-moment-shim` as a sub-dependency
  - added empty in-repo-addon `ember-power-calendar-moment` to avoid `ember-power-calendar` complaining about a missing package
  - added `ember-power-calendar-utils` in-repo-addon that is a copy of `ember-power-calendar-moment` but without the build-time renaming of the tree for better compatibility with embroider
2022-09-24 13:28:23 +02:00
Daniel Lockyer
2bff2a22e0
Extracted dev tooling to separate script
refs https://github.com/TryGhost/Toolbox/issues/426

- we're going to need to support more complex combinations of dev
  commands soon, with other packages optionally running and env
  variables being altered
- this command pulls out a lot of the dev env scripting into a single
  scripts
- also cleans up the use of grunt-shell so we can remove the dependency
2022-09-23 15:02:35 +02:00
Kevin Ansfield
c59ea73a80 🐛 Fixed distorted images in newsletters for product cards
refs https://github.com/TryGhost/Team/issues/1949

- bumps `@tryghost/kg-default-cards` which updates the rendered output for emails
- added `height: auto` style to the img element so clients don't render the image at the fixed image height retrieved from the `height="x"` attribute
2022-09-22 16:02:04 +02:00
Kevin Ansfield
9f0bf7e40c Added aside and blockquote lexical rendering support
no issue

- bumped `@tryghost/kg-lexical-html-renderer` with support for `quote` and `aside` node types
2022-09-21 08:30:30 +01:00
renovate[bot]
5573e111cd Update dependency @playwright/test to v1.26.0 2022-09-21 07:31:56 +01:00
renovate[bot]
19e21a1e78
Update Test & linting packages 2022-09-20 18:01:42 +00:00
renovate[bot]
061f0ab062
Update dependency c8 to v7.12.0 2022-09-20 14:48:51 +00:00
Sam Lord
364f92f021 Added mailgun as transaction email transport
refs: https://github.com/TryGhost/Toolbox/issues/281

As well as SMTP, we can now use Mailgun's API to send transactional email.
2022-09-20 15:44:26 +01:00
Daniel Lockyer
abe9811c6c
Remove typescript files and dependencies
- these are not currently used/needed in this repo
2022-09-20 14:54:23 +01:00
renovate[bot]
017bbd89c3
Pinned dependencies (#15441)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-09-20 14:29:59 +01:00
Daniel Lockyer
cd7aa42f5d
Updated knex dependency
- this needed to be updated to switch back to the official sqlite3
  library
2022-09-20 14:24:14 +01:00
Daniel Lockyer
b596eff418
Switched to official sqlite3 library
- this wasn't switched back when we switched from the vscode fork to our
  own maintained version
2022-09-20 14:21:31 +01:00
Daniel Lockyer
d73200799d
Updated lockfile
- also unversions `@tryghost/stats-service` so it isn't included in the
  lockfile
2022-09-20 14:18:51 +01:00
Kevin Ansfield
e9f3d90147 Fixed "Cannot find module '@lexical/clipboard'" when rendering lexical
no issue

- bumped `@tryghost/kg-lexical-html-renderer` so it no longer has an implicit dependency on `@lexical/clipboard`
2022-09-19 19:06:35 +01:00
Kevin Ansfield
125a98192c Fixed "Cannot find module 'react'" when rendering lexical in production
no issue

- bumped `@tryghost/kg-lexical-html-renderer` so it no longer has an implicit dependency on `react`
2022-09-19 18:03:23 +01:00
Simon Backx
4c5ba4ed7d
Added database storage for link redirects and click events (#15423)
closes https://github.com/TryGhost/Team/issues/1916 
closes https://github.com/TryGhost/Team/issues/1917

- Added database storage for link redirects and click events via repositories (hides away database layer) defined in the wrapper services
    - Added LinkClickRepository to store click events to database
    - Added LinkRedirectRepository to store link redirects to database
    - Added PostLinkRepository to link LinkRedirects with posts
- Renamed link-replacement package to link-replacer, and made it dependency less (it only replaces links now, doesn't do anything else)
- The link-tracking service has a new `addTrackingToUrl` which returns a new URL that includes tracking. The new `addRedirectToUrl` method does the same but without tracking for now.
- MEGA service now uses the link-replacer to replace links in the emails using a combination of different services (member attribution + link-tracking service)
2022-09-19 17:12:54 +02:00
renovate[bot]
225765241c
Updated @tryghost dependencies (#15404)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-09-19 12:09:33 +01:00
Kevin Ansfield
180bb72115 Added link and heading id attribute support when rendering lexical
no issue

- bumped `@tryghost/kg-lexical-html-renderer`
2022-09-19 11:42:15 +01:00
Kevin Ansfield
3bdfb68ff6
Added __GHOST_URL__ transform support to posts.lexical field (#15433)
no issue

- bumped `@tryghost/url-utils` to get access to the new lexical transform utilities
- updated the Post model's `parse()` and `formatOnWrite()` methods to transform the `lexical` field contents when reading/writing to ensure any links in content point at the correct place with `site.url` config changes
2022-09-19 11:30:38 +01:00
Daniel Lockyer
66f11d5e45
Updated lockfile 2022-09-19 08:45:46 +01:00
Naz
1b6a24f0d8
🐛 Fixed incorrect API error response message
closes https://github.com/TryGhost/Ghost/issues/15424
refs b9ab1002b3
refs 9210ac7dc7

- When errors were throw from the model layer the HTTP API responses contained misleading information about the error - e.g.:

"message": "Unknown error - TypeError, cannot save post."

- This was due to the error handling code throwing it's own internal error resulting in compete loss of the original Ghost's error context.
2022-09-19 14:52:28 +08:00
renovate[bot]
40df6c3252 Update dependency html-validate to v7.5.0 2022-09-19 07:52:04 +01:00
renovate[bot]
10f285d22e
Update dependency nodemon to v2.0.20 2022-09-16 18:19:50 +00:00
Fabien 'egg' O'Carroll
bddb0ba754
Wired up link redirects & tracking (#15418)
refs https://github.com/TryGhost/Team/issues/1910
refs https://github.com/TryGhost/Team/issues/1888

- Uses an in-memory repository for now whilst in development
- Updates the LinkReplacementService to choose the slug
- Exposes a `getSlug` method so we can ensure uniqueness
- Emits the RedirectEvent for use by LinkTracking
2022-09-16 10:42:21 +02:00
renovate[bot]
72a08f4901
Update dependency sanitize-html to v2.7.2 2022-09-15 20:21:58 +00:00
Kevin Ansfield
c240f7afa4
Added rendering of posts.lexical to posts.html when saving (#15416)
no issue

- added `@tryghost/kg-lexical-html-renderer` dependency
- added `lexical` lib following the same pattern as our `mobiledoc` lib
- updated the Post model's `onSaving` hook to generate the `html` value from `lexical` when present
2022-09-15 16:49:14 +01:00
Daniel Lockyer
08ba5065f2
Added ARM64 prebuilt binaries for SQLite
refs https://github.com/TryGhost/node-sqlite3/releases/tag/v5.1.1

- this bumps the version of `sqlite3` to one with prebuilt ARM64
  binaries so we need less dev tooling to run Ghost
2022-09-15 15:22:19 +01:00
renovate[bot]
3d328d24e6 Update sentry-javascript monorepo to v7.13.0 2022-09-15 15:13:23 +01:00
renovate[bot]
edb8afe106
Update dependency sqlite3 to v5.1.0 2022-09-14 19:53:21 +00:00
renovate[bot]
5714dec524 Update babel monorepo to v7.19.1 2022-09-14 18:54:53 +01:00
renovate[bot]
8c172d506d Pin dependencies 2022-09-14 18:53:15 +01:00
Fabien "egg" O'Carroll
160a0f881e Added initial link-tracking package
refs https://github.com/TryGhost/Team/issues/1888
2022-09-14 13:24:17 -04:00
Fabien "egg" O'Carroll
8fe200ff45 Added initial link-redirects package
refs https://github.com/TryGhost/Team/issues/1887
2022-09-14 13:24:17 -04:00
renovate[bot]
57f2b64bf2
Update dependency knex-migrator to v5.0.5 2022-09-14 16:49:38 +00:00
renovate[bot]
a435b2c54c Update dependency date-fns to v2.29.3 2022-09-13 18:24:39 +01:00
renovate[bot]
236addf67f Update dependency @babel/plugin-proposal-decorators to v7.19.0 2022-09-13 18:24:27 +01:00
Kevin Ansfield
6fc9cd5f80
Added passthrough + saving of lexical property on posts/pages (#15403)
no issue

- bumped `@tryghost/admin-api-schema` to allow passthrough of the `lexical` property on post and page API endpoints
- prevented saving of blank document in the `mobiledoc` field if `lexical` is provided
- prevented API input containing both `mobiledoc` and `lexical` fields to avoid issues when both are present:
  - not possible to know which content is latest/has precedence
  - not possible to know which editor should be displayed in Admin
2022-09-13 17:29:37 +01:00
renovate[bot]
2a3b4908e1
Update dependency ember-cli-htmlbars to v6.1.1 (#15389)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-09-13 09:20:09 +01:00
renovate[bot]
1b8dbb132f
Update Test & linting packages (#15338)
* Update Test & linting packages
* Fixed new `no-quoteless-attributes` template lint errors

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Kevin Ansfield <kevin@lookingsideways.co.uk>
2022-09-13 09:19:14 +01:00
renovate[bot]
da905b1dff Update dependency @types/nodemailer to v6.4.6 2022-09-13 08:39:26 +01:00
Daniel Lockyer
a766253a78
Merged v5.14.1 into main
v5.14.1
2022-09-12 16:06:43 +01:00
Kevin Ansfield
e230370b33 🐛 Fixed Admin freeze when filtering long tag lists
closes https://github.com/TryGhost/Ghost/issues/15391

- `vertical-collection` component was throwing errors during render when the tags list was filtered down causing slowdowns or full Admin crashes
- similar regression had popped up before and fixed in https://github.com/TryGhost/Ghost/pull/15207 but the dependency had been bumped again without realising it caused an error
- added a test that triggers the error-throwing behaviour in the tags input to help catch this in future dependency updates
2022-09-12 15:49:59 +01:00
renovate[bot]
f53eac3043 Update dependency html-validate to v7.4.1 2022-09-12 09:42:13 +01:00
renovate[bot]
621956a1f3
Update dependency @html-next/vertical-collection to v3.1.0 (#15385)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-09-09 09:11:59 +01:00
Naz
8935f53d63
Fixed yarn command failure
refs ab0661c746

- The command was failing on non-org machines because the @tryghost/adapter-base-cache was published as private by accident.
2022-09-09 13:39:57 +08:00
Naz
ab0661c746
Fixing yarn command failure
no issue

- By bumping the version of adapter-base-cache I'm expecting `yarn` command to pick up this package. I suspect the failures on CI are due to some caching issue.
2022-09-09 13:26:51 +08:00
Naz
ff5919e86c
Extracted cache adapter base class to external package
https://github.com/TryGhost/Toolbox/issues/364

- When the adapter base class lives deep inside Ghost's codebase it is pretty hard for other developers to extend it. With the goal of making Ghost easier to use and deploy by others, this kind of functionality should be as easy to extend as possible.
- The base adapters should live in the TryGhost/SDK repository. Next ones to move are Scheduling, SSO, and Storage base adapters.
2022-09-09 12:36:49 +08:00
renovate[bot]
b377390855 Update dependency ember-concurrency to v2.3.7 2022-09-08 18:32:42 +01:00
renovate[bot]
3d4c97f8c7
Updated @tryghost dependencies (#15349)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-09-08 18:32:13 +01:00
renovate[bot]
be70064716
Pinned dependency html-validate to 7.3.3 (#15384)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-09-08 10:30:07 +01:00
Simon Backx
4534b693e4
Added test that validates output HTML of email template (#15365)
refs https://github.com/TryGhost/Team/issues/1871

This commit adds a test to the serialize method of `post-emaiserializer`. It checks whether the generated email HTML is valid and standard HTML5 and that all properties are escaped.

To do this validation, I depend on the new `html-validate` dev dependency. Just parsing the HTML with a HTML parser is not enough to guarantee that the HTML is okay.

Apart from that this fixes:
- Removed the sanitizeHTML method and replaced it with normal HTML escaping. We don't want to allow any HTML in the escaped fields. Whereas `sanitizeHTML` still allows valid HTML, but we don't want that and want the same behaviour as on the site. E.g., a post with a title `All your need to know about the <br /> tag` should actually render the same title and non-html content, being `All your need to know about the &lt;br /&gt; tag`
- The file, nft and audio card didn't (always) escape the injected HTML fields (new version @tryghost/kg-default-cards) 
- `@tryghost/string` is bumped because it contains the new escapeHtml method
2022-09-08 10:11:01 +02:00
renovate[bot]
290a5f2ceb Update dependency ember-concurrency to v2.3.6 2022-09-07 20:28:46 +01:00
renovate[bot]
4438a72095 Update dependency concurrently to v7.4.0 2022-09-07 13:44:35 +01:00
renovate[bot]
3d76c89660 Update dependency @playwright/test to v1.25.2 2022-09-07 13:10:11 +01:00
renovate[bot]
5812e491d2 Update dependency uuid to v9 2022-09-07 13:06:48 +01:00
renovate[bot]
fa1861aad3 Update dependency ember-concurrency to v2.3.5 2022-09-07 07:39:10 +01:00
Kevin Ansfield
10946a56b2
🐛 Fixed product card images causing very wide emails in Outlook (#15374)
closes https://github.com/TryGhost/Team/issues/1873

- bumps `@tryghost/kg-default-cards` which amends the product card rendering to output adjusted `width` and `height` attributes and a resized `src` attribute on the `<img>` element
2022-09-06 19:36:19 +01:00
renovate[bot]
167f2d577a
Update dependency ember-concurrency to v2.3.4 (#15357)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-09-05 10:56:21 +01:00
renovate[bot]
a967a8f930
Update metascraper to v5.30.4 2022-09-02 19:09:45 +00:00
renovate[bot]
8c91f7b7d4 Update sentry-javascript monorepo to v7.12.1 2022-09-02 16:27:26 +01:00
renovate[bot]
49578f0661
Update dependency reframe.js to v4.0.1 (#15346)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-09-02 12:35:39 +01:00
Kevin Ansfield
c220c1e288
🐛 Fixed image width/height and links not being preserved when pasting or importing html (#15350)
refs https://github.com/TryGhost/Koenig/issues/330
refs https://github.com/TryGhost/Koenig/issues/329

- bumps packages related to pasting content into the editor and importing content via the posts API with `?source=html`
2022-09-01 17:31:21 +01:00
renovate[bot]
b4ba598190
Update dependency ember-concurrency to v2.3.2 (#15300)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-09-01 17:12:31 +01:00
renovate[bot]
abeed13abf
Update dependency ember-fetch to v8.1.2 (#15298)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-09-01 17:11:54 +01:00
renovate[bot]
d0103a6b31 Update sentry-javascript monorepo to v7.12.0 2022-09-01 08:48:54 +01:00
Kevin Ansfield
41313f6993 Replaced emberx-file-input addon with in-app implementation
refs https://github.com/TryGhost/Team/issues/1734

- resolves some deprecations raised by the addon which has fallen out of regular maintenance
- we were largely overriding much of the addon so the additional code was minimal, most of the changes were from updating to modern patterns
2022-08-31 22:21:31 +01:00
renovate[bot]
36ac8ccb41
Update dependency knex to v2.3.0 2022-08-31 20:32:37 +00:00
renovate[bot]
87a97726c6
Update dependency human-number to v2.0.1 2022-08-31 19:21:36 +00:00
renovate[bot]
405d1acec5 Update dependency @tryghost/express-test to v0.11.3 2022-08-31 16:42:28 +01:00
Daniel Lockyer
7a2f766668
Added logging configuration option for timestamps to use the local timezone
fixes https://github.com/TryGhost/Ghost/issues/15190
refs https://github.com/TryGhost/framework/pull/76

- log output always uses UTC timestamps, but it may be desirable to
  configure logs to use the local machine timezone
- a new config option has been added to `@tryghost/logging` so you can
  switch the logs to the local timezone
- this commit bumps the package and sets the default config option to
  `false`, so it doesn't suddenly change the timezone of the logs
- docs will be updated soon but if you'd like to use the
  timezone-altered timestamps, you can set `logging.useLocalTime` to
  `true`
- credits to https://github.com/levee223 for the implementation and PR
2022-08-31 10:29:55 +01:00
renovate[bot]
5a359be582 Update dependency knex-migrator to v5.0.4 2022-08-31 07:36:17 +00:00
Kevin Ansfield
bc185665a4 Removed use of ember-route-action-helper
refs https://github.com/TryGhost/Ghost/issues/14101
refs https://github.com/TryGhost/Team/issues/1734

- use of the helper was generating deprecation warnings when building Admin
- removed the single usage in favor of using `{{perform}}` directly on a controller task property as there was no need to go via the route
- changed naming of task properties to include a `...Task` suffix so it's clear when dealing with a task object
2022-08-30 16:44:50 +01:00
renovate[bot]
9355c6d8fa
Update dependency mailgun.js to v8.0.1 2022-08-30 08:10:52 +00:00
renovate[bot]
619af026d6
Update dependency luxon to v3.0.3 2022-08-29 18:37:24 +00:00
renovate[bot]
ced7f41112
Update Test & linting packages 2022-08-29 15:21:11 +00:00
renovate[bot]
df2a97032d Update dependency testem to v3.9.0 2022-08-29 16:19:01 +01:00
renovate[bot]
ea5942ef3d
Update dependency luxon to v3.0.2 2022-08-29 00:09:28 +00:00
renovate[bot]
0cbaa8f73d
Update dependency tough-cookie to v4.1.2 2022-08-25 23:44:35 +00:00
Simon Backx
232882daa2 Mapped '/' attribution url to homepage
fixes https://github.com/TryGhost/Team/issues/1846

- Shows homepage instead of / for attribution values
2022-08-25 14:51:38 +02:00
renovate[bot]
966d324e7f
Update dependency eslint-plugin-react to v7.31.0 2022-08-25 01:35:14 +00:00