Commit Graph

12224 Commits

Author SHA1 Message Date
renovate[bot]
f4a31aae7d
Update dependency @tryghost/kg-default-atoms to v3.1.3 (#15115)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-08-04 12:17:58 +01:00
renovate[bot]
4957298e68
Update dependency @tryghost/kg-markdown-html-renderer to v5.1.6 (#15117)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-08-04 12:17:04 +01:00
Daniel Lockyer
8859d6298c
Added guard for activateTheme being called in parallel causing sync bugs (#15053)
refs https://github.com/TryGhost/Team/issues/1666

- it seems like we may have a situation where `.activateTheme()` can be called simultaneously resulting in unexpected behaviour in the sync such as duplicate theme setting records
- adjusted behaviour to keep track of the currently running activation within the service and if `.activateTheme()` is called again whilst it's in progress it will wait for completion of the first sync before exiting early or continuing with a new activation

**Note:** There is a known edge-case if there are _more_ than 2 parallel `.activateTheme()` calls. We don't believe that will be an issue but calling it out in case we do still see duplicated custom setting records being created.

Co-authored-by: Kevin Ansfield <kevin@lookingsideways.co.uk>
2022-08-04 11:29:58 +01:00
renovate[bot]
88436506f4
Update dependency @tryghost/kg-default-cards to v5.16.3 (#15116)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-08-04 11:06:18 +01:00
renovate[bot]
4868989a4a
Update dependency @tryghost/kg-card-factory to v3.1.4 (#15114)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-08-04 11:05:55 +01:00
Daniel Lockyer
b66969501c
Deleted csscomb plugin from Admin
- we're meant to be running our CSS through csscomb in order to apply
  specific code styles, but the reality is that it never gets used
- keeping csscomb around just adds to the package cruft and so this
  commit cleans up references to it in order to
2022-08-04 12:05:37 +02:00
Fabien "egg" O'Carroll
7e630dcb23 Bumped comments-ui version to 0.3.x
refs https://github.com/TryGhost/Team/issues/1695

This version of the comments-ui includes changes to work with the
comments helper design.
2022-08-04 11:04:50 +01:00
Kevin Ansfield
2524916e61 Switched koenig-react experiment URL back to unpkg
no issue

- jsdelivr has heavy CDN and local caching for 7 days which makes it difficult to test the frequent package bumps whilst we're actively working on the experimental package. Switching back to unpkg for now to take advantage of it's 60s cache
2022-08-04 10:32:38 +01:00
Daniel Lockyer
7cf4f595f7 🐛 Fixed missing published Admin assets when running in development
refs https://forum.ghost.org/t/admin-template-issues-default-install/31750

- we recently switched to using different folders within `core/built`, to
  indicate the assets that are applicable for development/production
  environments
- unfortunately, this came with the side effect of the "development" assets
  missing in the published tarball, which meant Admin wouldn't load when
  running in development mode
- this was a regression from how it previously worked because we used to
  just copy the production HTML file to the development HTML name, and
  use the same assets
- after thinking about it, I think we can get rid of the split folders
  for assets, because I don't think the use-case is there for having
  them:
  - if you run Ghost from source, you're 99% only using the
    development-built assets
  - if you want production ones, you can run with a flag, but the
    development ones get wiped anyway
  - those running Ghost from a published package are using the same
    assets and HTML file
- therefore, I think we can make our lives simpler by removing the env
  folders and using a folder under `core/built/admin/...`
- this commit implements that across Ghost and Admin
2022-08-04 10:55:35 +02:00
James Morris
5ff512256f Fixed up some email template problems on mobile for comments
- Swapped out some tables for divs for more reliable sizing
- Changes should help avatars on mobile

refs https://github.com/TryGhost/Team/issues/1742
2022-08-04 09:29:29 +01:00
renovate[bot]
feff2e5d26
Pinned dependencies (#15163)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-08-04 08:21:51 +02:00
Rishabh Garg
c931d80cc0
Added migration to store trial days on tier (#15129)
refs https://github.com/TryGhost/Team/issues/1724

- storing trial period days allows site owners to give free trial for N days to all members signing up on a tier
- by default, all tiers have 0 trial period days(same as no trial)
2022-08-04 11:35:57 +05:30
renovate[bot]
30ccb45fe8
Update dependency ember-template-lint to v4.11.0 2022-08-03 20:40:50 +00:00
Daniel Lockyer
37f910965b
Tidied up Admin README
- removed links that are no longer needed now the Admin code is in the
  main monorepo
2022-08-03 21:16:04 +02:00
Daniel Lockyer
86aceb3a25
Fixed extraneous files appearing in the html-to-plaintext tarball
- this is missing from the package template, which I'll fix
2022-08-03 17:30:11 +02:00
Daniel Lockyer
a398a0e57d
Cleaned up subgrunt usage between Ghost and Admin
refs https://github.com/TryGhost/Toolbox/issues/365

- some of this was barely used anyway, but now Admin is a package in the
  monorepo, we don't need to be installing dependencies twice
2022-08-03 17:05:57 +02:00
Daniel Lockyer
cb7273c7fd
Deleted Admin yarn.lock
refs https://github.com/TryGhost/Toolbox/issues/365

- this is no longer needed because we use the top-level lockfile in the
  monorepo
2022-08-03 16:56:14 +02:00
Daniel Lockyer
464b5ca426 Extracted html-to-plaintext shared lib into package
refs https://github.com/TryGhost/Toolbox/issues/363

- this shared library is standalone, and it used in various places of
  Ghost core, so we can pull it out to keep it easier to reason about
- we also use the `html-to-text` dependency in another package but it's
  outdated and could now switch to this new package
2022-08-03 16:51:56 +02:00
Daniel Lockyer
b3d7347e9e
Deleted reference to core/admin
refs https://github.com/TryGhost/Toolbox/issues/365

- this directory no longer exists because we've brought it into the
  monorepo
2022-08-03 16:28:41 +02:00
Daniel Lockyer
b0a776fd25
Migrated production build test from Admin
refs https://github.com/TryGhost/Toolbox/issues/365

- the .github/workflows/test.yml in Admin needed to be merged with the
  top-level GHA folder so this test needed porting
- there is still the browser matrix testing to port once things are
  stable
2022-08-03 16:14:52 +02:00
Daniel Lockyer
425473ff88
Added yarn lint to Admin
refs https://github.com/TryGhost/Toolbox/issues/365

- without this, `yarn lint` from the monorepo will fail because there is
  no script in this directory
2022-08-03 16:08:21 +02:00
Daniel Lockyer
2854f6151c
Cleaned up extraneous files and references in Admin
refs https://github.com/TryGhost/Toolbox/issues/365

- these files are no longer needed now they're in the main Ghost repo
- re-adds the Renovate rules into the top-level Renovate config
2022-08-03 16:05:04 +02:00
Daniel Lockyer
b1d6b434b5
Fixed yarn dev
refs https://github.com/TryGhost/Toolbox/issues/365

- this fixes the path of the admin assets to the ghost package dir and
  points the subgrunt path to the admin dir
2022-08-03 16:00:40 +02:00
Simon Backx
e1bee3c647
Implemented admin auth origin check (#15135)
refs https://github.com/TryGhost/Team/issues/1694

- Added replacements option to `@tryghost/minifier` + updated documentation and name of 'options' param which was a bit confusing. 
- At compile time, we'll replace `'{{SITE_ORIGIN}}'` with the actual and JS encoded origin string.
- Block requests to the auth frame with the wrong origin, but log a warning for now to make debugging easier.
- Limit who can read the response messages by origin
2022-08-03 15:59:08 +02:00
Daniel Lockyer
c2f2312ad2
Deleted Admin submodule
refs https://github.com/TryGhost/Toolbox/issues/365

- this is no longer needed because we've inline Admin into the monorepo
2022-08-03 15:56:53 +02:00
Daniel Lockyer
b29cd27792
Migrated Admin code into monorepo package
refs https://github.com/TryGhost/Toolbox/issues/365

- this migrates all the Admin code and history into the monorepo 🚀
2022-08-03 15:50:36 +02:00
arsereg
cc276486f0 Updated Tenor API to v2 (#2418)
refs: https://github.com/TryGhost/Ghost/issues/14980
refs: https://github.com/TryGhost/Ghost/pull/15087

- The Tenor v1 API has been decommissioned https://developers.google.com/tenor/guides/migrate-from-v1
- Updated the API to v2, but there are some differences we have to account for 
- Swapped from using the old "trending" API to the new "featured" API, which at present seem to be the same thing
- Added a new client_key, which identifies the integration using the google API key, as google API keys can be used for multiple APIs and projects
-  Fixed up the error handling to support Google's error format, and also caught and replaced the error that everyone with old keys will see to make it clearer. This includes adding an htmlError property so that we can output HTML safely in the frontend.

There is still an active TODO with the naming of the config key, but we will resolve this after merging admin into the monorepo.

Co-authored-by: Hannah Wolfe <github.erisds@gmail.com>
2022-08-03 14:11:55 +01:00
Daniel Lockyer
59c750a369 v5.7.1 2022-08-03 12:56:44 +01:00
Daniel Lockyer
cf64dc89d0 v5.7.1 2022-08-03 12:56:44 +01:00
Daniel Lockyer
068c52de1d 🎨 Updated Casper to v5.2.3 2022-08-03 12:56:44 +01:00
Simon Backx
407760e1cd Fixed clicking on member in dashboard activity feed comment events
refs https://github.com/TryGhost/Team/issues/1731#issuecomment-1203007918

- The memberId property was not parsed correctly for comment events
- Updated code to fallback on member.id instead of member_id
2022-08-03 13:40:51 +02:00
Simon Backx
235ede719c Updated comment activity feed text and styles
refs https://github.com/TryGhost/Team/issues/1731
2022-08-03 13:35:24 +02:00
Fabien "egg" O'Carroll
8dc8ab88ca Added default values for comment_count helper
refs https://github.com/TryGhost/Team/issues/1695

We add english defaults for the singular and plural params leaving the
empty param blank so as to not draw attention to low engagement.
2022-08-03 12:23:37 +01:00
Kevin Ansfield
90a080e0b8 Update dependency eslint-plugin-ghost to v2.14.0 (#2441)
no issue

- bumped dependency
- fixed all new lint failures
- removed deprecated `ember-cli-eslint`
  - it was tying us to an old version of `eslint` resulting in missing rule definition errors when linting was run as part of `yarn dev` and `ember test`
  - we run linting separately in CI so we don't need linting to run _again_ on each of our ember test runs
2022-08-03 12:21:16 +01:00
renovate[bot]
81ce63f584 Pin dependency @types/common-tags to 1.8.1 2022-08-03 13:05:20 +02:00
Daniel Lockyer
02e696bd2f
Pinned dependency
- this should be pinned because Ghost is an application
2022-08-03 12:56:14 +02:00
Fabien "egg" O'Carroll
b8e3eb55cd Updated GScan to support comment_count and comments helpers
refs https://github.com/TryGhost/Team/issues/1695

Since these helpers take params now, we need to explicity add them
to the list of known helpers.
2022-08-03 11:52:08 +01:00
Fabien "egg" O'Carroll
e6317e9da3 Fixed the count endpoint for the Members Comments API
refs https://github.com/TryGhost/Team/issues/1695

When a post does not have any comments we were not returning any data
from the API, which would cause issues with the comment counts helper
frontend script. This updates the endpoint to always include the count
when explicitly requesting the count for specific posts.

We've also pulled the logic out into a stats service so that the endpoint
can just refer to the controller.
2022-08-03 11:52:08 +01:00
Fabien "egg" O'Carroll
023d85d561 Updated comment_count helper and frontend script
refs https://github.com/TryGhost/Team/issues/1695

This updates the comment_count helper from a block to inline, and the
frontend script to replace the entire element with the comment count
text. This means that theme designers will have the most flexibility
as they can choose whether or not to wrap the text in an element, as
well as which element.
2022-08-03 11:52:08 +01:00
Aileen Nowak
c263f48b79 Fixed using the correct token for Explore
no issue

- The `adminKey.secret` property is already in the correct format of `admiKey.Id:adminKey.secret` so we were returning the id twice as query param
- Minor style adjustments for Explore
2022-08-03 11:51:18 +01:00
Daniel Lockyer
73bd9a8e1a
Deleted typescript config files
- these aren't needed any more because the packages are in the same repo
  as Ghost, so jsdocs + types should Just Work ™️
2022-08-03 12:49:32 +02:00
Naz
452132600b Fixed trailing whitespace in test file
no issue

- The linter does not seem to pickup the trailing whitespace problem in test files. This would be good to fix project-wise with the `--fix` options or something similar
- This change is for example purpuses :)
2022-08-03 11:48:02 +01:00
Kevin Ansfield
38a12f4e18 Update dependency ember-template-lint to v4.10.1 2022-08-03 11:40:12 +01:00
Kevin Ansfield
4a15083453 Pinned eslint related dependencies 2022-08-03 11:39:04 +01:00
Kevin Ansfield
ce9d2577ca Update dependency eslint to v8.21.0 2022-08-03 11:37:03 +01:00
renovate[bot]
d612199e46 Update dependency reframe.js to v4 (#2370)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-08-03 11:34:20 +01:00
Sanne de Vries
9729ec11be Removed bottom margin on post preview 2022-08-03 12:23:04 +02:00
Kukhyeon Heo
3780e80b14 🐛 Fixed pasting into the post tags input not working (#1739)
closes https://github.com/tryghost/ghost/issues/12294
refs https://github.com/TryGhost/Admin/pull/1707

- cache registered shortcuts and check KeyboardEvent before dispatching event to the root
2022-08-03 11:14:12 +01:00
Simon Backx
b57ffc0258 Added underline and bold style to post link in comment emails
refs https://github.com/TryGhost/Team/issues/1739
2022-08-03 11:55:05 +02:00
Daniel Lockyer
a17dc84869
Fixed Admin HTML missing from NPM tarball
refs f59b88967b

- the npmignore rules meant that the Admin HTML was missing from the
  tarball produced by NPM
2022-08-03 11:31:58 +02:00
Scott Beinlich
08b31ebadb 🐛 Fixed impersonate modal not closing correctly when navigating away from member page. (#1753)
closes https://github.com/TryGhost/Ghost/issues/12214

- previously, when navigating back from the members page with the impersonate modal open, opening a new member showed the impersonate modal.
2022-08-03 10:13:16 +01:00
renovate[bot]
3c47d61e68 Update dependency analytics-node to v6.2.0 2022-08-03 08:26:33 +02:00
Daniel Lockyer
82e7a0f103
Cleaned up Grunt copy plugin
refs 0a34be4012

- the admin html is no longer stored in core/server, and we don't need to
  copy the production file to default.html
- this commit cleans up the grunt command to do this, and removes the
  plugin whose only use was doing this
- this takes us another step closer to removing grunt
2022-08-02 21:14:04 +02:00
Daniel Lockyer
b9a0cc04b9
Switched out @lodder/grunt-postcss for postcss-cli
- this commit switches out the Grunt postcss plugin with the official
  postcss CLI
- this means we can remove yet another step from Grunt, which helps
  towards our goal of removing Grunt entirely
- I've confirmed the minified output is exactly the same as before
2022-08-02 20:27:44 +02:00
Naz
f65c068442 Fixed failing tests
refs 492960b9a8 (diff-658dc5d7181e4b0fe52a60085b938fa830b22a82a0f58e7fe49a1455984c58ce)

- The `this` context binding was not set on some of the class methods causing all sorts of chaos
2022-08-02 19:21:32 +01:00
James Morris
7af8ef0c10 Tidied up the comments post title style for events
- Following styling from email events
- Includes other tweaks to bring consistency
- Added in text truncating for member activity page

refs https://github.com/TryGhost/Team/issues/1731
2022-08-02 18:11:50 +01:00
Naz
492960b9a8 Refactored settings cache to use class/DI pattern
refs https://github.com/TryGhost/Toolbox/issues/364

- This is a groundwork which moves the "cache" property in settings cache to be injectable parameter, so we can swap it out with different implementations.
- The module will be broken downn into two concepts - an injectable cache  and a cache manager (the update system)
2022-08-02 17:18:07 +01:00
Kevin Ansfield
577a749e12 Updated modifiers to resolve ember-modifier@4.x deprecations
no issue

- followed the migration guide to switch to from lifecycle hooks to single `modify()` method
  - https://togithub.com/ember-modifier/ember-modifier/blob/master/MIGRATIONS.md
- forced resolution of `ember-in-viewport@4.0.2` to avoid older version of `ember-modifier` being pulled in through `ember-infinity`
2022-08-02 16:54:34 +01:00
Renovate Bot
7af2747257 Update dependency ember-modifier to v3.2.7 2022-08-02 16:54:34 +01:00
Simon Backx
e112f1cd40 Added empty line trimming to comment messages
fixes https://github.com/TryGhost/Team/issues/1737

- Empty lines at start
- Empty lines at end
- Duplicate empty lines inside the comment message (max one allowed)
2022-08-02 17:45:42 +02:00
Simon Backx
3f8ddd61f9 Changed subject lines for comment emails
fixes https://github.com/TryGhost/Team/issues/1735
2022-08-02 17:45:42 +02:00
renovate[bot]
9652d5ab32 Update dependency luxon to v3 2022-08-02 17:17:29 +02:00
renovate[bot]
7147495f3a Update dependency @tryghost/html-to-mobiledoc to v1.8.7 2022-08-02 17:13:28 +02:00
Simon Backx
2d5c9ff5d7 Added POC for activity feed comment post name
refs https://github.com/TryGhost/Team/issues/1731

- Includes the post title and url in the activity feed
- For now only implemented on the member page (not yet in remaining 2 activity feeds)
- No styling added
2022-08-02 17:02:42 +02:00
Kevin Ansfield
a5ec6cca06 Fixed "Could not find module 'ember-keyboard'" error thrown by gif card
no issue

- the Koenig in-repo-addon's package.json didn't include `ember-keyboard` and with the recent `ember-auto-import` upgrade it wasn't being picked up correctly
- adding the dependency line fixed things
2022-08-02 15:51:59 +01:00
Rishabh Garg
845718111e
Added free trial feature flag in labs (#15130)
refs https://github.com/TryGhost/Team/issues/1724

- adds new `freeTrials` alpha flag for feature development

Co-authored-by: Djordje Vlaisavljevic <dzvlais@gmail.com>
2022-08-02 20:02:18 +05:30
Kevin Ansfield
d066f68f0b Bumped ember-basic-dropdown to 4.x
no issue

- partial version bump to get past the outdated `ember-modifier` import without breaking changes
2022-08-02 14:25:50 +01:00
renovate[bot]
4c93699f48 Update dependency tracked-built-ins to v3 (#2398)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-08-02 14:24:57 +01:00
renovate[bot]
79458bce88 Update dependency ember-in-viewport to v4 (#2160)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-08-02 14:24:40 +01:00
renovate[bot]
864fe787fd Update dependency ember-moment to v10 (#2217)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-08-02 14:24:14 +01:00
renovate[bot]
28a9909316 Update dependency ember-keyboard to v8 (#2307)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-08-02 14:23:49 +01:00
Daniel Lockyer
f59b88967b
Cleaned up unused npmignore references
refs 0a34be4012

- as of the referenced commit, we no longer store the HTML in the
  core/server folder so we don't need to keep this folder in the
  npmignore
2022-08-02 15:18:05 +02:00
renovate[bot]
93371131fd Update dependency @sentry/ember to v7 (#2411)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-08-02 14:06:48 +01:00
renovate[bot]
df86dbceff Update dependency @tryghost/limit-service to v1.2.2 (#2344)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-08-02 14:04:37 +01:00
renovate[bot]
3f5ca97fff Update dependency ember-css-transitions to v4 (#2306)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-08-02 13:55:31 +01:00
renovate[bot]
36e802904b Update dependency @babel/plugin-proposal-decorators to v7.18.10 (#2437)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-08-02 13:45:13 +01:00
Kevin Ansfield
0a34be4012
Updated admin asset serving for ember-auto-import@2 compatibility (#15128)
refs https://github.com/TryGhost/Admin/pull/2252
closes https://github.com/TryGhost/Team/issues/1182

- Admin now copies it's build output to a single env-specific directory rather than splitting html and assets
  - `core/built/admin/{development|production}/*`
- updated the admin app's `serveStatic` definition for assets and controller's html serving to reflect the new asset paths
2022-08-02 13:43:45 +01:00
Gabriel Csapo
ddfeb90fc6 Updated ember-auto-import@1 -> ember-auto-import@2 (#2252)
requires https://github.com/TryGhost/Ghost/pull/15128
refs https://github.com/TryGhost/Admin/pull/2252

- bumped `ember-auto-import` dependency
  - updated `autoImport` config to match new format
  - added dependencies for node packages that no longer have built-in polyfills in webpack@5
- updated `asset-delivery` to work with `ember-auto-import@2`
  - reverted to standard ember `index.html` to let `ember-auto-import` handle it's insertion of multiple JS chunk files
  - updated the `asset-delivery` addon to copy the the `index.html` and `/assets` to `core/built/admin/{development|production}/` directory rather than splitting the `index.html` file apart from the assets inside Ghost's directory structure
- switched to relative root URL in development/production
  - required because assets are served from the same directory the index file is served from in Ghost rather than from the root
  - Admin uses `/#/` URLs so it can be served from any subdirectory without requiring prior knowledge of that directory at build time

Co-authored-by: Kevin Ansfield <kevin@lookingsideways.co.uk>
2022-08-02 13:43:28 +01:00
Vikas Potluri
bcafb84c44
refactored security.string to be more readable (#15127)
refs #15126

- Logic can be simplified
- Add JSDoc types
2022-08-02 12:49:17 +01:00
tatsuya-ogawa
3feee8b816 Added missing schedule events to webhook dropdown (#2082)
- these webhook events are not available to choose from in Ghost admin, even though they exist and work
2022-08-02 12:34:30 +01:00
Sanne de Vries
22344a28b5 Fixed username being cut off in profile menu 2022-08-02 12:04:14 +02:00
Kevin Ansfield
50aa6f4877 Dropped app.import for react/react-dom in favor of ember-auto-import
refs a4a4136c2f (commitcomment-79676720)

- `ember-auto-import` does the right thing automatically so manual `app.import` is not necessary and avoids potential pitfalls with multiple copies of react being bundled
- added the `window.*` global attachments after importing so that our async loaded UMD components have access to our bundled React and ReactDOM instances
2022-08-02 09:42:25 +01:00
Paul Davis
1c36b93949 Fixed display of warnings after content import (#2192)
- Fixes the horizontal overflow caused my longer warning/error messages. This means the <pre> tag is sized to fit the container and can now be scrolled and read in its entirety.
- Adds some top margin so these errors are not so bunched up to the text & input.
2022-08-02 09:23:46 +01:00
renovate[bot]
f132475ff9
Update dependency @sentry/node to v7.8.1 2022-08-01 20:49:21 +00:00
renovate[bot]
643a684434 Update dependency ember-tooltips to v3.6.0 (#2419)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-08-01 21:41:46 +01:00
Scott Beinlich
80326996f5 🐛 Fixed markdown card lacking superscripts & subscripts. (#1763)
fixes: https://github.com/TryGhost/Ghost/issues/12219

- the WYSIWYG editor supports ^2^ for superscript and ~2~ for subscript
- with this change, the same syntax is supported in the markdown card, which was missing

Co-authored-by: Hannah Wolfe <github.erisds@gmail.com>
2022-08-01 19:51:27 +01:00
renovate[bot]
cb47a2bd28 Update dependency ember-cli-htmlbars to v6.1.0 2022-08-01 20:16:37 +02:00
Daniel Lockyer
9ac23364ab Updated lockfile 2022-08-01 19:01:32 +02:00
Renovate Bot
65c8f298d3 Update dependency @html-next/vertical-collection to v3 2022-08-01 18:49:31 +02:00
Renovate Bot
97b4adfc6e Update dependency markdown-it to v13 2022-08-01 18:46:46 +02:00
Renovate Bot
2bc9cf970b Update dependency ember-cli-deprecation-workflow to v2 2022-08-01 18:40:08 +02:00
renovate[bot]
91945ed24e Update dependency @embroider/macros to v1.8.3 2022-08-01 18:31:48 +02:00
renovate[bot]
a96e35e8b9 Update dependency @tryghost/kg-clean-basic-html to v2.2.11 2022-08-01 18:29:40 +02:00
renovate[bot]
c652b50860 Update babel monorepo 2022-08-01 18:27:48 +02:00
renovate[bot]
0758e22ec7 Update dependency ember-truth-helpers to v3.1.1 2022-08-01 18:25:44 +02:00
renovate[bot]
cd4b7c8363 Update dependency @tryghost/kg-parser-plugins to v2.11.7 2022-08-01 18:20:47 +02:00
Renovate Bot
a2dba308d2 Update dependency @tryghost/color-utils to v0.1.19 2022-08-01 18:11:47 +02:00
Renovate Bot
19590ec475 Update dependency @tryghost/timezone-data to v0.2.70 2022-08-01 18:11:41 +02:00
renovate[bot]
8829f31f15 Update dependency testem to v3.8.0 2022-08-01 18:11:16 +02:00
Renovate Bot
a24d259996 Update dependency @tryghost/helpers to v1.1.71 2022-08-01 18:10:26 +02:00
renovate[bot]
086d31dd6e Lock file maintenance 2022-08-01 18:09:09 +02:00
Naz
24782ead02 Cleaned up job manager test suit
no issue

- Small "boyscout" improvements that were noticed while developing a new feature. This boosts the execution time of the test suit a little bit.
2022-08-01 16:47:45 +01:00
Naz
b0a2555465 Updated job manager documentation
no issue

- Minor cleanup of the outdated and ambiguous documentation. It wasn't loved in years, so got it's tiny facelift.
2022-08-01 16:47:45 +01:00
Naz
929946d744 Added documentation for one-off jobs
refs https://github.com/TryGhost/Toolbox/issues/359
refs 1606a10ff8

- One-off jobs have been released and needed a little bit of documentation for engineers to find their feet quick with a new concept.
- One-off jobs have a quality of executing only ever once within the lifetime of Ghost instance. For example this feature enabled moving members-migrations from the main path of boot process  - boosts the boot time significantly (refed commit)
2022-08-01 16:47:45 +01:00
Vikas Potluri
59f4570ee7
refactored security.password to use native bcrypt promises (#15126)
refs: https://github.com/TryGhost/Ghost/issues/14882

* refactored security.password to use native bcrypt promises
* refactored security.string to use more modern es features
2022-08-01 16:21:19 +01:00
Simon Backx
a5084c7ee6 Renamed #ghost-comments-root to #ghost-comments (fragment to jump to comments section)
fixes https://github.com/TryGhost/Team/issues/1730
refs db8d1120f4
2022-08-01 16:36:03 +02:00
Daniel Lockyer
9ca8e80990 v5.7.0 2022-08-01 15:23:39 +01:00
Daniel Lockyer
946952d0ed v5.7.0 2022-08-01 15:23:38 +01:00
renovate[bot]
4cbb622334 Update dependency @tryghost/image-transform to v1.2.1 2022-08-01 15:28:09 +02:00
Simon Backx
b7f3892be0
Added format option to img-url helper (#14962)
fixes https://github.com/TryGhost/Ghost/issues/14323

- Fixed support for resizing images from Unsplash using the `img-url` helper (previously the size property was ignored for images from Unsplash)
- Added support for `avif` file formats (supported by sharp out of the box)
- Added support for setting the format of images, with a new  `format` option:

E.g. to convert an image to webp (only works in combination with size for now, except for Unsplash where you can use it without size):
```
{{img_url @site.cover_image size="s" format="webp"}}
```

This can help improve the performance of a theme, by serving assets in `<picture>` elements with webp and fallback image formats.

Usage example:
```html
<picture>
    <source 
        srcset="{{img_url feature_image size="s" format="avif"}} 300w,
                {{img_url feature_image size="m" format="avif"}} 600w,
                {{img_url feature_image size="l" format="avif"}} 1000w,
                {{img_url feature_image size="xl" format="avif"}} 2000w"
        sizes="(min-width: 1400px) 1400px, 92vw" 
        type="image/avif"
    >
    <source 
        srcset="{{img_url feature_image size="s" format="webp"}} 300w,
                {{img_url feature_image size="m" format="webp"}} 600w,
                {{img_url feature_image size="l" format="webp"}} 1000w,
                {{img_url feature_image size="xl" format="webp"}} 2000w"
        sizes="(min-width: 1400px) 1400px, 92vw" 
        type="image/webp"
    >
    <img
        srcset="{{img_url feature_image size="s"}} 300w,
                {{img_url feature_image size="m"}} 600w,
                {{img_url feature_image size="l"}} 1000w,
                {{img_url feature_image size="xl"}} 2000w"
        sizes="(min-width: 1400px) 1400px, 92vw"
        src="{{img_url feature_image size="xl"}}"
        alt="{{#if feature_image_alt}}{{feature_image_alt}}{{else}}{{title}}{{/if}}"
    >
</picture>
```
2022-08-01 14:45:54 +02:00
Rishabh
9d43a7a7cf Removed alpha flag for newsletter paywalls
refs https://github.com/TryGhost/Team/issues/1680

- newsletter paywalls is now GA, no need for alpha flag
2022-08-01 18:02:35 +05:30
Rishabh
312e2330a1 Extended paywall card for newsletters
refs https://github.com/TryGhost/Team/issues/1680

- paywall card in Admin now inserts cta and restricts content for newsletters as well
- mimics paywall behavior in posts for newsletters
2022-08-01 18:02:25 +05:30
Djordje Vlaisavljevic
5d65655f51 Updated newsletter CTA design 2022-08-01 18:02:25 +05:30
Aileen Nowak
515bf1cc14 Added Ghost Explore UI
no issue

- Added `/explore` route which requires min. Admin and is behind a feature flag
- Fetches Admin API key and ID to create a token and return back to Ghost Explore with the correct query params
- Fullscreen UI
2022-08-01 11:11:47 +01:00
Daniel Lockyer
a25b5dc2e3 v5.6.0 2022-08-01 09:23:35 +01:00
Daniel Lockyer
fce09a6a1b v5.6.0 2022-08-01 09:23:34 +01:00
Daniel Lockyer
a9b011ad4b Avoided loading newsletter subscription events if threshold is Infinity
- if the threshold is Infinity, we shouldn't be loading the newsletter
  subscription events because we are saying there is no threshold
- the code has a quick path to avoid comparing the values, but it still
  loads the events upfront
- this commit moves the quick path up to return earlier
- this has the nice side-effect of producing 100% coverage on this
  package
2022-08-01 09:23:04 +02:00
Aileen Booker
304b660c9d
Added migrations to change Ghost Explore integration type 2022-08-01 09:08:06 +02:00
Sam Lord
48550c81aa Improved performance of prepareContentFolder function
fixes https://github.com/TryGhost/Toolbox/issues/150

- up until now, the test framework has copied all theme fixtures to the
  test directory when it boots Ghost
- the vast majority of tests don't need all the themes, so this is quite
  a wasteful operation
- this commit disables copying all themes by default, and provides the
  `copyThemes` boot option to enable this
- also adds a `copySettings` option, and defaults `redirectsFile` to
  false to further reduce the number of file copies
2022-08-01 08:58:13 +02:00
renovate[bot]
2c27d45473 Update dependency knex-migrator to v5.0.3 2022-08-01 08:57:57 +02:00
renovate[bot]
9c65aa166f Update dependency @playwright/test to v1.24.2 2022-08-01 08:42:59 +02:00
renovate[bot]
f325241430
Update dependency eslint to v8.21.0 2022-08-01 04:27:05 +00:00
renovate[bot]
b88f989f5f
Update dependency sqlite3 to v5.0.11 2022-08-01 02:02:20 +00:00
renovate[bot]
828587378c Update dependency @sentry/node to v7.8.0 2022-07-28 21:19:39 +00:00
Naz
5adcee1528 Added ability to readd failed one-off job
refs https://github.com/TryGhost/Toolbox/issues/358

- When a one-off job fails it could be restarted during the next call, given it has been cleared from the job queue.
- This readding WILL NOT work for jobs that are restarted within same process (while being kept in the bree's queue). It's specifically targetting one-off jobs like migrations that **might** fail and are only added once per process lifetime.
2022-07-28 19:07:49 +01:00
Naz
195973eae1 Added successful job run check
refs https://github.com/TryGhost/Toolbox/issues/358

- Allows to check for a **successfull** job run and restart/re-add the job in case it was a failed one off job
2022-07-28 19:07:49 +01:00
Naz
3092b62e10 Refactored job manager tests
refs https://github.com/TryGhost/Toolbox/issues/358

- A little cleanup before adding more edge case handling
2022-07-28 19:07:49 +01:00
Naz
ee243f9ea3 Refactored job statuses
refs https://github.com/TryGhost/Toolbox/issues/358

- Without going into the model layer (schema) for a job it's hard to figure out which job statuses are available. Using an object with hard typed properties makes the code less prone to typos.
2022-07-28 19:07:49 +01:00
Naz
c88dcf749b Improved awaitCompletion interface
refs https://github.com/TryGhost/Toolbox/issues/358

- The method is a bit of a dangerous to use in cases when the job takes a long time to execute.
- Returning a boolean value did not make sense and provided no helpful information. Having a job model (or not having one) gives the context in which the "completion" happened.
2022-07-28 19:07:49 +01:00
Naz
8f95759b68 Removed unecessarily long delay in a test
no issue

- The delay is there to allow for the "IPC" (thread <-> process) communication to happen. Does not have to be this long in reality
2022-07-28 19:07:49 +01:00
Rishabh Garg
be3a8db828
Fixed failing preview test email (#15105)
refs https://github.com/TryGhost/Team/issues/1680

- using test emails via email preview in admin were failing due to missing post data attached to them
- adds test to make sure email segment rendering doesn't crash even with missing data
2022-07-28 21:05:47 +05:30
Kevin Ansfield
bbf7e8ed7a Cleaned up react component rendering
no issue

- switched from needing to extend from `ReactComponent` to using a `{{react-render}}` modifier
  - modifiers are modern idiomatic Ember for handing "did-insert" hooks and associated lifecycle
- moved code from `<ReactMobiledocEditor>` into `<KoenigReactEditor>`
  - no need for the extra layering of components and need to remember two places to modify when adding passthrough args/props
2022-07-28 15:52:50 +01:00
Fabien "egg" O'Carroll
467cf51b74 Added comment property to posts in Content API
refs https://github.com/TryGhost/Team/issues/1695

This property can be used by theme developers to determine if comments
are available for the currently logged in member. It follows the same
logic as used internally in the comments helper, so that they can be
used interchangeably
2022-07-28 14:55:53 +01:00
Fabien "egg" O'Carroll
93694d837e Updated {{comments}} helper with new options
refs https://github.com/TryGhost/Team/issues/1695

This updates the comments helper based on the design document

Changes include:
 - `color_scheme` renamed to `mode`
 - `avatar_saturation` renamed to `saturation`
 - `saturation` default changed from 50 to 60
 - `count` option added
 - `title` option added

The count and title options allow theme developers to better customise
the output of comments, so that they can either pass in their own
title, or pass in no title, and instead provide HTML in the them to
handle it. The same is the case for the count option, which is used to
toggle whether or not the comment count is shown.
2022-07-28 14:53:33 +01:00
Kevin Ansfield
bd194f4ccc Fixed loading of react editor in production
no issue

- replaced use of `GhostAdmin` global when it doesn't exist in production by using the `Ember` global and picking the correct namespace
2022-07-28 13:37:20 +01:00
Ronald Langeveld
f2710c906d Added koenig-react cdn url to default config. 2022-07-28 13:46:17 +02:00
Djordje Vlaisavljevic
f0d1cf2d66
Updated newsletter paywall cta design (#15111)
refs https://github.com/TryGhost/Team/issues/1705

- Made `max-width` smaller to avoid super-long lines
- Added `span` elements with `nowrap` to avoid one or two-word orphans

Co-authored-by: Rishabh <zrishabhgarg@gmail.com>
2022-07-28 16:10:09 +05:30
Daniel Lockyer
590bd7bdb8 Updated vhost middleware upstream test
refs 8255bfdfda

- the original project had a commit which fixes a specific test for
  missing host headers
- funnily enough, this was our only missing coverage on this package, so
  we achieve 100% with this
2022-07-27 22:35:38 +02:00
Daniel Lockyer
ac4ff8ada4
Updated import path for minifier tests
- this now tests the exports of the package
- also has the nice side effect of bumping coverage to 100%
2022-07-27 22:04:39 +02:00
Naz
ec0d548031 Fixed CI
no issue

- The test was initialized backwards... causing the job manager to start without "models" being fully initialized
2022-07-27 18:39:28 +01:00
Naz
1606a10ff8 Moved members migrations to one off job
refs https://github.com/TryGhost/Toolbox/issues/358

- The execution of members migration only ever has to be done once in the lifetime of the Ghost instance. It is slightly slow and blocking process, which slows down instance boot time considerably. Putting the execution into one off job allows to execute migrations only once and save boot time on each consequent instance restart - less resource usage, save the planet!
2022-07-27 18:07:24 +01:00
Naz
6d5a5e90b1 Added job status checks to job manager
refs ttps://github.com/TryGhost/Toolbox/issues/358

- One off jobs need a way to check for prior execution and await for their completion (in cases when it is reasonably short).
- Added `hasExecuted` and `awaitCompletion` methods to the job manager allowing to monitor one off job state
2022-07-27 18:04:19 +01:00
Naz
b7853323ae 🐛 Fixed email sending job execution
refs https://github.com/TryGhost/Toolbox/issues/359

- Sending newsletters got broken because underlying "inline job" execution had a bug.
- The real problem was in the job manager trying to verify inline unnamed job status in the database without having a name.
2022-07-27 15:12:56 +01:00
Aileen Nowak
b0144a7f8f Added explore alpha feature flag 2022-07-27 14:53:50 +01:00
Kevin Ansfield
fd0398d5e2 Fixed unsupported .cleanup() calls on react editor
no issue

- `react-editor` controller has much of the same code as the normal editor controller but not all of the editor-instance methods are supported in the react editor yet
- commented out the remaining `.cleanup()` calls that are intended to remove empty cards because the method does not exist and was throwing errors when leaving the react-editor route
2022-07-27 14:14:12 +01:00
Kevin Ansfield
7a9435d524 Hooked up editor registration in react editor experiment
no issue

- use the `didCreateEditor` hook to register the editor instance as we do with our Ember version of Koenig
- allows for initial handling of focus control for moving cursor between title and body inputs
- disabled card cleanup call because the react editor does not yet have cards or the custom `cleanup()` method
2022-07-27 14:14:12 +01:00
Kevin Ansfield
a4a4136c2f Fixed hooks not being usable inside of react components
no issue

- switched to using the `window.ReactDOM` instance that is created when importing the react/react-dom libraries
  - React stores state/component references inside of the ReactDOM instance when rendering so we need to make sure all renders use the same instance otherwise it loses track of which component a hook belongs to
- cleaned up unnecessary vendor shims and `prop-types` import
  - `react` and `react-dom` vendor shims are unused when using the globals instead of imports
  - `prop-types` import+shim is not required as it's part of the `@tryghost/koenig-react` build unlike the earlier direct import of `react-mobiledoc-editor`
2022-07-27 14:14:12 +01:00
Fabien 'egg' O'Carroll
e36e5e16bc
Improved Members Comments API
refs https://github.com/TryGhost/Team/issues/1688


We've moved the BREAD logic out of the endpoint and into a controller which
interfaces with the `frame` object from our API framework. The service handles
the core logic of comments, and has been updated with several fixes. This
separation means we keep the HTTP API logic and the underlying comments logic
decoupled.

We've also updated the naming to make it clear that it is part of the members api.

Permissions have been implemented, ensuring that members cannot create comments
if they do not have the required access, but they are able to edit their existing comments,
regardless of access.

The edited_at field is now correctly updated when a comment is edited.
2022-07-27 13:56:16 +01:00
Aileen Nowak
b1e44dd2f2 Added explore alpha feature flag 2022-07-27 13:14:40 +01:00
Peter Elmers
26e6d459cb Put plus menu button on the screen on mobile (#2417)
Fix the right positioning and size of the icon for mobile display
Addresses https://github.com/TryGhost/Ghost/issues/14948
2022-07-27 11:29:33 +02:00
Peter Zimon
6ae1cce9c8 Fixed browser preview site title word wrap bug 2022-07-27 10:42:36 +02:00
Daniel Lockyer
5417c9edd2
Fixed dependencies for settings-path-manager
- it was incorrectly referencing `tpl` as a dependency, which must have
  been accidentally included when the package was created
- this has been switched out for `@tryghost/tpl`
- also added the missing `@tryghost/errors` dependency
2022-07-27 08:51:44 +02:00
Daniel Lockyer
a9cffd9550
Pinned all dependencies
- we should pin all dependencies so we know what is getting shipped in
  the application
2022-07-27 08:44:50 +02:00
renovate[bot]
0270f7833f
Update dependency date-fns to v2.29.1 2022-07-27 03:32:41 +00:00
renovate[bot]
6d1e8181f8
Update dependency csso to v5.0.4 2022-07-27 01:19:54 +00:00
renovate[bot]
b33c07a5eb
Pin dependency terser to 5.14.2 2022-07-26 22:28:18 +00:00
renovate[bot]
d6bdef8437
Pin dependency csso to v 2022-07-26 17:57:48 +00:00
Naz
7adf3a5410 Added support for one off inline jobs
refs https://github.com/TryGhost/Toolbox/issues/359

- Inline one off jobs are needed in situations when we want to run a certain operation only once in the lifecycle of the Ghost instance. These operations should not be extremely long to execute though (not suited for backups or import types of tasks)
2022-07-26 18:14:25 +01:00
Naz
822549c9ef Added defensive code for non-persistent job manager
refs https://github.com/TryGhost/Toolbox/issues/359

- It's up to a user to decide initializing the job manager without a "jobModel". In these cases the regular recurring job scheduling should work as it did before
2022-07-26 18:14:25 +01:00
renovate[bot]
9973b5419c Update dependency @playwright/test to v1.24.1 2022-07-26 18:18:50 +02:00
Daniel Lockyer
4b5b3de11c
Moved test agents into subfolder
- these agent files are all very similar and should be grouped together
- moving them into a subfolder makes the `test/utils` folder a little
  bit easier to browse
2022-07-26 18:00:37 +02:00
Rishabh Garg
47fa59ea72 Added flag for newsletter paywall feature (#2430)
refs https://github.com/TryGhost/Team/issues/1680
2022-07-26 21:30:21 +05:30
Daniel Lockyer
044b342de3
Fixed random test failure due to asynchronous directory creation
- we keep seeing random failures that complain about a directory already
  existing when trying to create it
- the error arises from the `fs.copySync` in this `prepareContentFolder`
  function, because it tries to create the folder if it doesn't exist
- it turns out we're using the asynchronous `fs.ensureDir` without an
  await just before, so it doesn't block on creating the folder
- there's a veeeery small window where the code within `copySync` thinks
  the folder doesn't exist, `ensureDir` creates the folder, and
  then `copySync` tries to create the folder => 💥
- it looks like we're already `await`-ing `prepareContentFolder`, so we
  can just switch all the calls to the Promise-based ones and await them
- the other `prepareContentFolder` uses the sync versions of the
  functions, but we can fix that in the future: 7b7767d483/ghost/core/test/utils/e2e-utils.js (L73-L79)
2022-07-26 17:28:16 +02:00
Daniel Lockyer
7b7767d483
Deleted .jshintrc file
refs bcf5a1bc34

- we no longer use jshint so this file is not needed
2022-07-26 16:47:31 +02:00
Daniel Lockyer
f61cd0b18e
Deleted .gitkeep file
- this was accidentally pulled in from the Utils package migration
2022-07-26 16:47:31 +02:00
Naz
2fe4f66ae3 Cleanedup job manager one off test structure
refs https://github.com/TryGhost/Toolbox/issues/359

- LIttle housekeeping was needed before introducing "inline" one-off jobs
2022-07-26 15:18:48 +01:00
Naz
013051a6c9 Made name parameter required for one off jobs
refs https://github.com/TryGhost/Toolbox/issues/359

- Without a "name" parameter it's impossible to identify a job in the storage. It was missed during the PoC inmplementation
2022-07-26 15:13:12 +01:00
Naz
8c3473e5e0 Moved exception handling for members migrations
refs https://github.com/TryGhost/Toolbox/issues/358

- Error handling should be done as close to the place that knows how to handle them. It's a catch-all block which doesn't add any logic, so does not really make sense to have that extra code in general "init" method which ideally should be just a whole bunch of calls with no extras.
2022-07-26 15:13:12 +01:00
renovate[bot]
679634342a
Pinned dependencies (#15100)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-07-26 16:06:00 +02:00
Daniel Lockyer
6a2afbd859
Changed import path for mw-session-from-token tests
- this has the nice side effect of increasing code coverage by checking
  the exports of the package
2022-07-26 15:53:29 +02:00
Rishabh Garg
9c616fe067
Added content paywall for newsletters (#15048)
refs TryGhost/Team#1680

- extends the public preview card so that the paywall is shown in newsletters for paid-only posts based on member's access
- adds CTA for paywalled content in newsletters
- the segmentation for paywall only considers free and non-free members, so post with specific `tiers` and `paid-only` access settings are sent to all paid members

Co-authored-by: Djordje Vlaisavljevic <dzvlais@gmail.com>
2022-07-26 19:16:08 +05:30
Kevin Ansfield
b5b88e7c5e Added mobiledoc change handling to react-editor experiment
no issue

- passed through the `onChange` event handler so that changes to the content are updated in Ember and autosave etc is triggered
2022-07-26 14:42:59 +01:00
Daniel Lockyer
a12047b224
Added cobertura reporter to members-events-service
- without this, we don't get coverage reports for the package
2022-07-26 15:37:33 +02:00
Daniel Lockyer
b72c4482dc
Added c8 to update-check-service
- this must have been missed off when the package was first created,
  but is now required so we can track code coverage
2022-07-26 15:36:07 +02:00
Kevin Ansfield
873a2ff8e3 Updated <ReactMobiledocEditor> to work with single-component export from koenig-react
no issue

- top-level export from `@tryghost/koenig-react` is a single component and the UMD module is loaded onto `window.koenigEditor`
2022-07-26 14:34:14 +01:00
Daniel Lockyer
3d1e53e8f9
Updated import for mw-update-user-last-seen tests
- this now requires the library as it would be used, which increases
  coverage
2022-07-26 15:31:14 +02:00
Daniel Lockyer
08abfcafd1
Remove linting as posttest step
- linting is handled separately (in CI and locally, as it's a git
  pre-push hook) so we shouldn't also be running it after tests
2022-07-26 15:26:21 +02:00
Daniel Lockyer
0a5f600dfe
Tidied up package README and LICENSE files
- we shouldn't need individual LICENSE files because these packages
  won't be published, so the top-level one applies
- also cleaned up README files to remove mentions of Lerna monorepos and
  install instructions
2022-07-26 15:22:10 +02:00
Daniel Lockyer
735608ea76
Renamed @tryghost/vhost-middleware to @tryghost/mw-vhost
refs https://github.com/TryGhost/Toolbox/issues/354

- this commit renames the vhost middleware to follow our naming pattern
  of `mw-X`
2022-07-26 15:12:32 +02:00
Daniel Lockyer
255eb0726b
Cleaned up package metadata
refs https://github.com/TryGhost/Toolbox/issues/354

- set packages to `private: true`
- removed repository link - these packages won't be published so this
  link won't be seen anywhere
- removed `publishConfig`
2022-07-26 15:08:05 +02:00
Daniel Lockyer
5fc7ba59d3
Reset package versions back to 0.0.0
refs https://github.com/TryGhost/Toolbox/issues/354

- these packages won't be published from now on, so setting the versions
  back to 0.0.0 keeps them clean
2022-07-26 14:57:43 +02:00
Daniel Lockyer
e0b947b59d
Deleted release-utils package
- this probably doesn't belong here but it was difficult to exclude when
  migrating the packages over
2022-07-26 14:47:43 +02:00
Daniel Lockyer
3526154377
Migrated packages from Utils
refs https://github.com/TryGhost/Toolbox/issues/354

- the Utils repo is being split up and we're bringing these packages
  into Ghost
- this commit merges the history of the relevant packages in the Utils
  directory into Ghost
2022-07-26 14:45:37 +02:00
Daniel Lockyer
7fa997c91d Deleted packages migrated to SDK
refs https://github.com/TryGhost/Toolbox/issues/354

- these packages were migrated to the SDK repository so
  they aren't needed here any more
2022-07-26 14:38:09 +02:00
Daniel Lockyer
48cc229b21 Deleted packages migrated to Framework
refs https://github.com/TryGhost/Toolbox/issues/354

- these packages were migrated to the Framework repository so they
  aren't needed here any more
2022-07-26 14:29:54 +02:00
Daniel Lockyer
1f9d9b1185 Fixed flaky test
- the test wants to assert that the output contains 0-9 a-z characters,
  but it actually asserts the output is a number followed by alphabet
  characters
- this commit updates the regex to allow any combination of letters and
  numbers
2022-07-26 12:51:37 +02:00
Daniel Lockyer
2acdde2535 Deleted moleculer-service-from-class package
refs https://github.com/TryGhost/Toolbox/issues/354

- this is no longer used as the original project it was developed for
  was done in a different way
2022-07-26 12:37:57 +02:00
renovate[bot]
fd41b48f41 Update dependency @tryghost/limit-service to v1.2.2 2022-07-26 11:56:19 +02:00
Daniel Lockyer
5f311946b5 v5.5.0 2022-07-26 08:23:55 +01:00
Daniel Lockyer
2df2106701 v5.5.0 2022-07-26 08:23:55 +01:00
Daniel Lockyer
8936d83cac 🎨 Updated Casper to v5.2.2 2022-07-26 08:23:54 +01:00
Daniel Lockyer
d08144e2bf
Updated @tryghost packages
- this commit bumps all `@tryghost` packages that only contain
  dependency updates
2022-07-25 22:28:24 +02:00
Rishabh
487b61eb81 Updated stylesheet url handling for frontend apps
refs https://github.com/TryGhost/Team/issues/1719

- updates search and comments app to use configurable stylesheet url instead of hardcoded value
2022-07-25 23:00:37 +05:30
Rishabh
eb75888b48 Updated frontend apps to use new config
refs https://github.com/TryGhost/Team/issues/1719

- creates scripts injected for portal/search/comments using new config format
- adds `data-styles` to search/comments script for adding external styles URL
2022-07-25 23:00:37 +05:30
Rishabh
a44460d226 ℹ️ Updated default config and CDN for frontend apps
refs https://github.com/TryGhost/Team/issues/1719

- switches default CDN from unpkg to jsDelivr for better reliability
- current config for frontend apps doesn't allow easy switching of CDN for frontend urls
- allows easy switch of base CDN for frontend apps via config
- fixes double use of version string in the config
- extends config to include url needed for loading styles for frontend app instead of hardcoded urs
2022-07-25 23:00:37 +05:30
Daniel Lockyer
c376587288
Moved yarn main functionality up to root yarn script
- since we've turned the repo into a monorepo, the `yarn main` scripts
  have lived in their original place under `ghost/core` package.json and
  Gruntfile.js
- for one, we want to remove grunt because it's terribly old and our use
  is hacked together
- secondly, `yarn main` applies to the monorepo + submodules as a whole,
  and not just the Ghost core folder
- this commit extracts the functionality into yarn scripts in the
  top-level and removes the dependency that was required
2022-07-25 18:30:21 +02:00
Simon Backx
5235d67fed
Added comment events to activity feed (#15064)
refs https://github.com/TryGhost/Team/issues/1709

- New event type `comment_event` (comments and replies of a member in the activity feed)
- Includes member, post and parent relation by default
- Added new output mapper for ActivityFeed events

**Changes to `Comment` model:**
* **Only limit comment fetched to root comments when not authenticated as a user:** 
`enforcedFilters` is applied to all queries, which is a problem because for the activity feed we also need to fetch comments which have a parent_id that is not null (`Member x replied to a comment`). The current filter in the model is specifically for the members API, not the admin API (so checking the user should fix that, not sure if that is a good pattern but couldn’t find a better alternative).
* **Only set default relations for comments when withRelated is empty or not set:**
`defaultRelations`: Right now, for every fetch it would force all these relations. But we don’t need all those relations for the activity feed; So I updated the pattern to only set the default relations when it is empty (which we also do on a couple of other places and seems like a good pattern). I also updated the comments-ui frontend to not send ?include
2022-07-25 17:48:23 +02:00
Simon Backx
31a4135fec
Added members.last_commented_at and last_seen_at update when commenting (#15088)
refs https://github.com/TryGhost/Team/issues/1717

- Updates last_commented_at and last_seen_at (only once a day)
- Used the LastSeenAtUpdater, so we can combine updating last_commented_at and last_seen_at in one query + used same pattern
- Updated comments service to await emails in order to make E2E tests more stable (as we don't have any method to await emails and test emails otherwise). This removed the email sending logic from the `onCreated` hook of the model.
2022-07-25 17:35:46 +02:00
Simon Backx
57a743e3aa
Fixed TXT content of report emails (#15090)
fixes https://github.com/TryGhost/Team/issues/1718

- Text content of report emails still had some placeholder text
- Converts HTML comments to TXT to include in the TXT version of the email
- Added support for Regexp matchers in the email mocker
- Added tests to check if the email content is in the new comment/report emails
2022-07-25 15:27:38 +01:00
Daniel Lockyer
308a28d31a
Tidied up package READMEs
refs https://github.com/TryGhost/Toolbox/issues/354

- these READMEs were migrated over from when each package was in a
  different repo
- they also assume you're going to be publishing the packages because it
  mentions install instructions
- only a few of them contain custom content
- this commit deletes the majority of these files because they're now
  not useful
- any that contained other instructions have been cut down
2022-07-25 15:17:12 +02:00