Commit Graph

38409 Commits

Author SHA1 Message Date
Fabien O'Carroll
e346423db2 Added missing JSON-LD context for publicKey definition
ref https://linear.app/tryghost/issue/MOM-25

This _might_ be the reason that Mastodon doesn't recognise our Actor, but
either way it's the correct thing to do so that JSON-LD parsers correctly
understand that publicKey field
2024-04-18 16:48:09 +07:00
Fabien O'Carroll
55d05f0476 Used path instead of query params for ActivityPub API
ref https://linear.app/tryghost/issue/MOM-25

This makes it easier to work with on the frontend, as we don't need to
whitelist query params for Ghost(Pro)
2024-04-18 14:54:57 +07:00
Fabien O'Carroll
d34884fc6d Moved ActivityPub API to frontend URL
ref https://linear.app/tryghost/issue/MOM-48

This required some structural changes to our NestJS setup so that we can mount
it on multiple parts of the Ghost express app.

We've used the RouterModule to allow adding submodules that are mounted on
different paths, and we've had to be explicit about the base path for each
module. We've also had to switch back to using the Module decorator, because
RouterModule doesn't work with DynamicModule definitions.

Now that the NestJS app has knowledge of the full path, we need to "reset" the
url & baseUrl when passing the request into NestJS so that it can correctly
match the path. This is probably needed for the frontend too, for subdirs, but
that causes further issues - as this in prototype stage, we'll look later

Another issue is that NestJS replaces the express app instance with its own,
which isn't an issue for the Admin API (though we've fixed it anyway for
consistency), but did cause problems for the frontend, because the express app
is where view engine and directory information is stored.

The fix for this is to save a reference to the original ghost express
application, and reattach it to the request if it is not handled by Nest

Now that we have the Nest app mounted on the frontend, we're able to have it
handle the /.well-known/webfinger route with a proper controller, which is nice!
2024-04-18 13:26:24 +07:00
Fabien O'Carroll
c51a434f64 Added initial support for Outbox to Actors
ref https://linear.app/tryghost/issue/MOM-32

This adds the basic building blocks for an Outbox for an Actor, currently it's
hardcoded - which'll let us at lest test integration with other platforms.

JSONLDService is an awful name, but it's late and this is a prototype.
2024-04-17 20:30:40 +07:00
Fabien O'Carroll
1d1c33db1e Simplified URL creation for Actor JSON-LD
no-issue

This makes the code easier to understand and maintain, and reduces the overhead
of converting to/from a Map. It also changes the URLs and makes them path based
2024-04-17 20:30:40 +07:00
Fabien O'Carroll
7a2e66708c Added support for Anon role in permissions
no-issue

This lets us have an unauthed endpoint for reading the outbox, long term we'll
probably wanna have this on the frontend URL but we don't have NestJS wired up
there yet.
2024-04-17 20:30:40 +07:00
Fabien O'Carroll
885dc537d5 Added initial support for /.well-known/webfinger
ref https://linear.app/tryghost/issue/MOM-26
ref https://linear.app/tryghost/issue/MOM-27
ref https://webfinger.net/spec/

WebFinger is the protocol which allows different ActivityPub implementers to
find information about Actors, it's kinda like the entrypoint.

Given a username like @user@site.com, we can look up the URL for the Actor at

   https://website.com/.well-known/webfinger?resource=acct:user@site.com

This would then give us the info needed to discover the Actor's Inbox & Outbox
2024-04-17 16:12:57 +07:00
Fabien O'Carroll
842098bd36 Switched to DynamicModule for AdminAPIModule
no-issue

This is consistent with our main NestJS Module and allows the values to be
introspected by other code, rather than be stored internaly in decorator
metadata, which makes it easier to debug.
2024-04-17 16:12:57 +07:00
Fabien O'Carroll
936e8fe8f8 Fixed type of id for base entity
no-issue

This needs to be cast to ObjectID so TS doesn't think it can be undefined
2024-04-17 16:12:57 +07:00
Fabien O'Carroll
ffbf2680ef Enabled Nest when ActivityPub flag is set
ref MOM-31
ref https://linear.app/tryghost/issue/MOM-31

We'll be building a lot of the new code for ActivityPub in Nest, so we'll need
to have it enabled in Ghost to work.
2024-04-17 14:00:07 +07:00
Fabien O'Carroll
0fb290a841 Added Feature Flag for ActivityPub
ref MOM-31
ref https://linear.app/tryghost/issue/MOM-31

Ronseal - let's goooooooo
2024-04-17 14:00:07 +07:00
Sodbileg Gansukh
7d42d1473e
Improved long label handling (#20029)
ref DES-205

- label name is now used as the title on label pills instead of static
text
- label names will now be truncated when it takes more than 2 lines
instead of 1
2024-04-17 05:02:21 +00:00
Kevin Ansfield
9213274a6b
🎨 Changed TK reminders to be case-insensitive (#20024)
closes https://linear.app/tryghost/issue/MOM-11

- updated Koenig packages to allow `tk`, `Tk`, and `tK` to be recognised as a TK reminder
2024-04-16 12:04:17 +00:00
Shane
d83c833808
Removed job posting (#19765) 2024-04-16 13:25:16 +02:00
renovate[bot]
96d0883928
🐛 Fixed file card button not being linked in emails (#20023)
ref https://linear.app/tryghost/issue/DES-202/

- bumped Koenig packages to include fix for incorrectly wrapped download image link in email rendering of file card
2024-04-16 10:37:28 +00:00
renovate[bot]
2af9c04477 Update CSS preprocessors 2024-04-16 09:44:36 +02:00
renovate[bot]
2d6a361bb5 Update dorny/paths-filter action to v2.12.0 2024-04-16 09:44:01 +02:00
renovate[bot]
0802b9533c Update dependency semver to v7.6.0 2024-04-16 09:41:01 +02:00
Nicholas Mizoguchi
d6b7ebb517
Enforced more Mocha lint rules (#19720)
ref https://github.com/TryGhost/Ghost/issues/11038

1. Enforced lint rule
**[ghost/mocha/no-identical-title](https://github.com/lo1tuma/eslint-plugin-mocha/blob/main/docs/rules/no-identical-title.md)**
- Fixed relevant tests
2. Enforced lint rule
**[ghost/mocha/max-top-level-suites](https://github.com/lo1tuma/eslint-plugin-mocha/blob/main/docs/rules/max-top-level-suites.md)**
- No required fixes, as tests are compliant already

#### Additional details
Specifically for `ghost/mocha/no-identical-title` most fixes were simple
test description updates. Added comments to aid the PR review for the
ones that had relevant changes, and might require more attention. They
are as follows:
*
[e2e-api/admin/invites.test.js](https://github.com/TryGhost/Ghost/pull/19720#discussion_r1496397548):
Removed duplicated test (exact same code on both);
*
[e2e-api/admin/members.test.js](https://github.com/TryGhost/Ghost/pull/19720#discussion_r1496399107):
From the[ PR this was
introduced](73466c1c40 (diff-4dbc7e96e356428561085147e00e9acb5c71b58d4c1bd3d9fc9ac30e77c45be0L236-L237))
seems like author based his test on an existing one but possibly forgot
to rename it;
*
[unit/api/canary/utils/serializers/input/pages.test.js](https://github.com/TryGhost/Ghost/pull/19720#discussion_r1496400143):
The [page filter](https://github.com/TryGhost/Ghost/pull/14829/files)
was removed, so changed the description accordingly;
*
[unit/api/canary/utils/serializers/input/posts.test.js](https://github.com/TryGhost/Ghost/pull/19720#discussion_r1496400329):
The [page filter](https://github.com/TryGhost/Ghost/pull/14829/files)
was removed, so changed the description accordingly;
*
[unit/frontend/services/rendering/templates.test.js](https://github.com/TryGhost/Ghost/pull/19720#discussion_r1496402430):
Removed duplicated test
*
[unit/server/models/post.test.js](https://github.com/TryGhost/Ghost/pull/19720#discussion_r1496403529):
the change in [this
PR](https://github.com/TryGhost/Ghost/pull/14586/files#diff-c351cb589adefbb886570cfadb33b33eb8fdc12bde1024d1188cd18c165fc5e8L1010)
made three tests here mostly the same. Deduplicated them and kept only
one.
2024-04-16 09:37:06 +02:00
renovate[bot]
8e8250a332 Update dependency testem to v3.13.0 2024-04-16 09:24:20 +02:00
renovate[bot]
dd76bf2693 Update dependency terser to v5.30.3 2024-04-16 07:24:10 +00:00
Laurent Goderre
c2485af853
Updated metascraper/author dependency to fix arm32 installation (#19401)
Installing on arm32 (and perhaps arm64) on Alpine Linux architecture
fails due to re2 a dependency of metascraper.

References:
https://github.com/microlinkhq/metascraper/pull/681
https://github.com/docker-library/ghost/issues/400
2024-04-16 09:22:54 +02:00
renovate[bot]
3f960818eb Update dependency vite to v4.5.3 [SECURITY] 2024-04-16 09:21:49 +02:00
renovate[bot]
0170b77d53 Update dependency @codemirror/lang-html to v6.4.9 2024-04-16 09:16:37 +02:00
renovate[bot]
39a9a9bfd8 Update sentry-javascript monorepo to v7.110.1 2024-04-16 09:09:22 +02:00
renovate[bot]
e7bb7a47ed Update dependency typescript to v5.4.5 2024-04-16 09:08:58 +02:00
renovate[bot]
3e4fc467c1 Update dependency @headlessui/react to v1.7.19 2024-04-15 17:47:58 +00:00
renovate[bot]
ddf1caaacb Update dependency @probe.gl/bench to v4.0.9 2024-04-15 10:03:07 +02:00
renovate[bot]
0c119e2464 Update dependency typescript to v5.4.4 2024-04-15 09:47:55 +02:00
renovate[bot]
b008c00feb Update sentry-javascript monorepo to v7.110.0 2024-04-15 09:47:44 +02:00
renovate[bot]
f6f9f8cd79 Update dependency i18next to v23.11.2 2024-04-15 01:16:18 +00:00
Ghost CI
ff03b2eedb v5.82.2 2024-04-15 01:06:07 +00:00
Ghost CI
bc0496e5d3 🎨 Updated Source to v1.2.2 2024-04-15 01:06:06 +00:00
Ghost CI
5e6cc0d746 🎨 Updated Casper to v5.7.2 2024-04-15 01:06:06 +00:00
Sodbileg Gansukh
f088bca883
Fixed esc handler behavior on preview and advanced theme modals (#20014)
ref DES-26, DES-57
2024-04-12 13:22:44 +08:00
Chris Raible
b8ad03b0f3
Added PostHog to admin-x-settings trackEvent function (#20013)
ref https://linear.app/tryghost/issue/PA-53/add-posthog-tracking-to-trackevent-in-admin-x-settings-and-lexical

- There was a pre-existing `trackEvent` function in `admin-x-settings`
that was using Plausible for tracking events.
- This PR adds PostHog to the same function, any calls to `trackEvent`
will send the event name and properties to PostHog as well.
2024-04-11 19:35:30 -07:00
Kevin Ansfield
d6e599dab3
Generalised Admin search for use in editor (#20011)
ref https://linear.app/tryghost/issue/MOM-1

- renamed `searchable` to `groupName` so it better matches usage and avoids leaking internal naming to external clients
- added `url` to the fetched data for each data type as the editor will want to use front-end URLs in content
- added acceptance tests to help avoid regressions as we further generalise/optimise the search behaviour
2024-04-11 14:01:39 +00:00
Hannah Wolfe
145a184967 Added logging to RSS cache
- The RSS cache has lived for a really long time, but I'm not sure it's useful
- Want to be able to determine if it gets used much, and if not, then we can remove it
2024-04-11 10:33:53 +01:00
Michael Barrett
9e78412268
Added queue depth to requests (#19987)
refs
[CFR-14](https://linear.app/tryghost/issue/CFR-14/ensure-queue-depth-is-always-set-on-req)

Added queue depth to any request that passes through the request queue
middleware instead of only adding it to the request if it is queued.
This makes it easier to report on the queue depth within Elastic.
2024-04-11 09:24:04 +01:00
Ronald Langeveld
d12b79e036
🐛 Fixed First Promoter always showing Active (#20010)
ref https://github.com/TryGhost/Ghost/issues/19797

- Fixed FirstPromoter always showing Active in Integration Settings list
- This was due to the position of the variable in the array being in the
wrong positon and indexed incorrectly.
- Added additional testing to avoid it from cropping up again.
2024-04-11 13:09:12 +08:00
Kevin Ansfield
a788a9673c
Extracted Admin's search behaviour from component to service (#20008)
ref https://linear.app/tryghost/issue/MOM-1

- pre-requisite to exposing the search behaviour to the editor for internal linking
2024-04-10 11:44:24 +00:00
Kevin Ansfield
ebd36f2503
Added internalLinking labs flag (#20006)
ref https://linear.app/tryghost/issue/MOM-1
2024-04-10 12:13:37 +01:00
Kevin Ansfield
0cb0e7109a
Refreshed Admin .lint-todo file (#20007)
no issue

- bumped todos for 120 days
2024-04-10 10:45:59 +00:00
renovate[bot]
5eab1e1ed6 Update dependency i18next to v23.11.1 2024-04-09 18:49:21 +00:00
Daniël van der Winden
c692c1b634
Updated paywall CTA text (#20004)
fixes DES-164
2024-04-09 14:53:51 +00:00
renovate[bot]
e0b8f612af Update tiptap monorepo to v2.3.0 2024-04-09 12:33:17 +00:00
renovate[bot]
f4cb488d04 Update dependency i18next to v23.11.0 2024-04-08 17:03:58 +00:00
Kevin Ansfield
85b8b61631
Removed admin-auth error logs for unknown message events (#20000)
closes https://linear.app/tryghost/issue/ENG-780

- the `admin-auth` frame was set up to log when any `message` event was handled but couldn't be parsed as JSON. For our own events that's fine but `message` events are also frequently triggered by browser extensions meaning the DevTools console log could become quite noisy for no reason
- removed the logging as it's noisy and not useful outside of development
2024-04-08 16:50:49 +00:00
Djordje Vlaisavljevic
8ba692f0ff Fixed portal links in dark mode
fixes https://linear.app/tryghost/issue/DES-197/🐛-portal-links-look-broken-in-dark-mode
2024-04-08 16:29:00 +01:00
Ghost CI
f046442bd8 v5.82.1 2024-04-08 14:42:52 +00:00