Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions apps/comments-ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tryghost/comments-ui",
"version": "1.4.7",
"version": "1.4.8",
"license": "MIT",
"repository": "https://github.com/TryGhost/Ghost",
"author": "Ghost Foundation",
Expand Down Expand Up @@ -55,7 +55,7 @@
"@tiptap/extension-text": "2.26.3",
"@tiptap/pm": "2.26.3",
"@tiptap/react": "2.26.3",
"@tryghost/debug": "0.1.40",
"@tryghost/debug": "2.1.0",
"react": "17.0.2",
"react-dom": "17.0.2",
"react-string-replace": "1.1.1"
Expand Down
4 changes: 2 additions & 2 deletions apps/portal/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tryghost/portal",
"version": "2.68.12",
"version": "2.68.13",
"license": "MIT",
"repository": "https://github.com/TryGhost/Ghost",
"author": "Ghost Foundation",
Expand Down Expand Up @@ -133,7 +133,7 @@
"vitest": "3.2.4"
},
"dependencies": {
"@tryghost/debug": "0.1.40"
"@tryghost/debug": "2.1.0"
},
"nx": {
"tags": [
Expand Down
4 changes: 2 additions & 2 deletions apps/signup-form/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tryghost/signup-form",
"version": "0.3.15",
"version": "0.3.16",
"license": "MIT",
"repository": "https://github.com/TryGhost/Ghost",
"author": "Ghost Foundation",
Expand Down Expand Up @@ -31,7 +31,7 @@
"prepublishOnly": "pnpm build"
},
"dependencies": {
"@tryghost/debug": "0.1.40",
"@tryghost/debug": "2.1.0",
"react": "18.3.1",
"react-dom": "18.3.1"
},
Expand Down
4 changes: 2 additions & 2 deletions apps/sodo-search/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tryghost/sodo-search",
"version": "1.8.12",
"version": "1.8.13",
"license": "MIT",
"repository": "https://github.com/TryGhost/Ghost",
"author": "Ghost Foundation",
Expand All @@ -14,7 +14,7 @@
"registry": "https://registry.npmjs.org/"
},
"dependencies": {
"@tryghost/debug": "0.1.40",
"@tryghost/debug": "2.1.0",
"@tryghost/i18n": "workspace:*",
"flexsearch": "0.8.153",
"react": "17.0.2",
Expand Down
2 changes: 1 addition & 1 deletion e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"@eslint/js": "catalog:",
"@faker-js/faker": "8.4.1",
"@playwright/test": "1.59.1",
"@tryghost/debug": "0.1.40",
"@tryghost/debug": "2.1.0",
"@tryghost/logging": "2.5.5",
"@types/dockerode": "3.3.47",
"@types/express": "4.17.25",
Expand Down
3 changes: 3 additions & 0 deletions e2e/tests/admin/reset-password.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ test.describe('Ghost Admin - Reset Password', () => {

const analyticsPage = new AnalyticsOverviewPage(page);
await expect(analyticsPage.header).toBeVisible();

const cookies = await page.context().cookies();
expect(cookies.find(({name}) => name === 'ghost-admin-api-session')).toBeDefined();
});

test('resets account owner password when 2FA enabled', async ({page, ghostAccountOwner}) => {
Expand Down
2 changes: 1 addition & 1 deletion ghost/core/core/server/data/schema/schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -1199,7 +1199,7 @@ module.exports = {
ready_at: {type: 'dateTime', nullable: true},
step_started_at: {type: 'dateTime', nullable: true},
step_attempts: {type: 'integer', unsigned: true, nullable: false, defaultTo: 0},
exit_reason: {type: 'string', maxlength: 50, nullable: true, validations: {isIn: [['member not found', 'email send failed', 'member unsubscribed', 'member changed status', 'finished']]}},
exit_reason: {type: 'string', maxlength: 50, nullable: true, validations: {isIn: [['email send failed', 'member unsubscribed', 'member changed status', 'finished']]}},
created_at: {type: 'dateTime', nullable: false},
updated_at: {type: 'dateTime', nullable: true},
'@@INDEXES@@': [
Expand Down
11 changes: 10 additions & 1 deletion ghost/core/core/server/models/post.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ const messages = {
invalidMobiledocStructure: 'Invalid mobiledoc structure.',
invalidMobiledocStructureHelp: 'https://ghost.org/docs/publishing/',
invalidLexicalStructure: 'Invalid lexical structure.',
invalidLexicalStructureHelp: 'https://ghost.org/docs/publishing/'
invalidLexicalStructureHelp: 'https://ghost.org/docs/publishing/',
emailOnlyWithoutNewsletter: 'Scheduling an email requires a newsletter reference.'
};

const MOBILEDOC_REVISIONS_COUNT = 10;
Expand Down Expand Up @@ -817,6 +818,14 @@ Post = ghostBookshelf.Model.extend({
// NOTE: this is a stopgap solution for email-only posts where their status is unchanged after publish
// but the usual publis/send newsletter flow continues
const hasEmailOnlyFlag = _.get(attrs, 'posts_meta.email_only') || model.related('posts_meta').get('email_only');

// Require newsletter reference for scheduled email-only posts
if (hasEmailOnlyFlag && newStatus === 'scheduled' && this.hasChanged('status') && !this.get('newsletter_id') && !options.newsletter) {
return Promise.reject(new errors.ValidationError({
message: tpl(messages.emailOnlyWithoutNewsletter)
}));
}

if (hasEmailOnlyFlag && (newStatus === 'published') && this.hasChanged('status')) {
this.set('status', 'sent');
} else if (!hasEmailOnlyFlag && (newStatus === 'sent') && this.hasChanged('status')) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ async function updateRun(runId, attrs, transacting) {

/**
* @param {string} runId
* @param {'finished' | 'email send failed' | 'member changed status' | 'member not found' | 'member unsubscribed'} exitReason
* @param {'finished' | 'email send failed' | 'member changed status' | 'member unsubscribed'} exitReason
* @param {Knex.Transaction} [transacting]
* @returns {Promise<void>}
*/
Expand Down
18 changes: 9 additions & 9 deletions ghost/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@
"@tryghost/config-url-helpers": "1.0.23",
"@tryghost/custom-fonts": "1.0.8",
"@tryghost/database-info": "0.3.35",
"@tryghost/debug": "0.1.40",
"@tryghost/debug": "2.1.0",
"@tryghost/domain-events": "1.0.8",
"@tryghost/email-mock-receiver": "0.3.16",
"@tryghost/email-mock-receiver": "2.1.0",
"@tryghost/errors": "1.3.13",
"@tryghost/helpers": "1.1.103",
"@tryghost/html-to-plaintext": "1.0.8",
Expand Down Expand Up @@ -129,20 +129,20 @@
"@tryghost/nql": "0.12.10",
"@tryghost/nql-lang": "0.6.4",
"@tryghost/parse-email-address": "workspace:*",
"@tryghost/pretty-cli": "1.2.52",
"@tryghost/pretty-cli": "3.1.0",
"@tryghost/prometheus-metrics": "1.0.8",
"@tryghost/promise": "0.3.20",
"@tryghost/promise": "2.1.0",
"@tryghost/referrer-parser": "0.1.15",
"@tryghost/request": "1.0.12",
"@tryghost/root-utils": "0.3.38",
"@tryghost/root-utils": "2.1.0",
"@tryghost/security": "1.0.6",
"@tryghost/social-urls": "0.1.60",
"@tryghost/string": "0.3.2",
"@tryghost/tpl": "0.1.40",
"@tryghost/url-utils": "5.1.2",
"@tryghost/validator": "0.2.22",
"@tryghost/version": "0.1.38",
"@tryghost/zip": "1.1.54",
"@tryghost/version": "2.1.0",
"@tryghost/zip": "3.1.0",
"body-parser": "1.20.4",
"bookshelf": "1.2.0",
"bookshelf-relations": "2.8.0",
Expand Down Expand Up @@ -252,8 +252,8 @@
"devDependencies": {
"@actions/core": "3.0.0",
"@prettier/sync": "0.6.1",
"@tryghost/express-test": "0.15.5",
"@tryghost/webhook-mock-receiver": "0.2.22",
"@tryghost/express-test": "2.1.0",
"@tryghost/webhook-mock-receiver": "2.1.0",
"@types/bookshelf": "1.2.9",
"@types/common-tags": "1.8.4",
"@types/express": "4.17.25",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing

exports[`Activity Feed API Can do filter based pagination for aggregated clicks for all posts 1: [body] 1`] = `
Object {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing

exports[`Authentication API generateResetToken Cannot generate reset token without required info 1: [body] 1`] = `
Object {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing

exports[`Automated Email Design API Edit Can edit the automated email design 1: [body] 1`] = `
Object {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing

exports[`Automated Emails API Add Can add an automated email 1: [body] 1`] = `
Object {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing

exports[`Backup Integration Backup API Backup Integration Can create a DB backup 1: [body] 1`] = `
Object {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing

exports[`Admin Comments API API Key Permissions API key without comment permissions cannot browse comments 1: [body] 1`] = `
Object {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing

exports[`Config API As Owner Can retrieve config and all expected properties 1: [body] 1`] = `
Object {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing

exports[`Custom Theme Settings API Browse can fetch settings for current theme 1: [body] 1`] = `
Object {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing

exports[`DB API Can delete all content 1: [headers] 1`] = `
Object {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing

exports[`Email Preview API As Admin can send test email 1: [headers] 1`] = `
Object {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing

exports[`Emails API Can browse all email failures 1: [body] 1`] = `
Object {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing

exports[`Explore API Read Can request Explore data 1: [body] 1`] = `
Object {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing

exports[`Images API Can not upload a file without extension 1: [body] 1`] = `
Object {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing

exports[`Integrations API As Administrator Can't see Self-Serve or any other integration 1: [body] 1`] = `
Object {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing

exports[`Labels API Can add 1: [body] 1`] = `
Object {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing

exports[`Links API Can browse all links 1: [body] 1`] = `
Object {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing

exports[`Member Commenting API POST /members/:id/commenting/disable Can disable commenting and hide comments with hide_comments: true 1: [headers] 1`] = `
Object {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing

exports[`Members API: edit subscriptions Can cancel a subscription 1: [body] 1`] = `
Object {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing

exports[`Members API — exportCSV Can export a member without tiers 1: [headers] 1`] = `
Object {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing

exports[`Members API - With Newsletters - compat mode Can fetch members who are NOT subscribed 1: [body] 1`] = `
Object {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing

exports[`Members Stripe Connect API can do auth 1: [headers] 1`] = `
Object {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing

exports[`Members API - member attribution Can read member attributed to a page 1: [body] 1`] = `
Object {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing

exports[`Mentions API Can browse with limits 1: [body] 1`] = `
Object {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing

exports[`Newsletters API Can add a newsletter - and subscribe existing members 1: [body] 1`] = `
Object {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing

exports[`Notifications API As Author Read notifications 1: [body] 1`] = `
Object {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing

exports[`Offers API Can add a fixed offer 1: [body] 1`] = `
Object {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing

exports[`Pages Bulk API Delete Can delete all pages 1: [body] 1`] = `
Object {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing

exports[`Pages API Browse Re-renders html when null 1: [body] 1`] = `
Object {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing

exports[`Post Analytics Export Default settings (all features enabled) Exports CSV with full analytics data 1: [headers] 1`] = `
Object {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing

exports[`Posts Bulk API Delete Can delete all posts 1: [body] 1`] = `
Object {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing

exports[`Posts API Can browse 1: [body] 1`] = `
Object {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing

exports[`Sessions API Is rate limited to protect against brute forcing a users password 1: [headers] 1`] = `
Object {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing

exports[`Recommendations Admin API Can add a full recommendation 1: [body] 1`] = `
Object {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing

exports[`Roles API Can request all roles 1: [body] 1`] = `
Object {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing

exports[`Search Index API fetchPages should return a list of pages 1: [body] 1`] = `
Object {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing

exports[`Sessions API Staff 2FA can verify a session with 2FA code 1: [body] 1`] = `
Object {
Expand Down
Loading