ghost 5.34.1 → 5.35.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/tryghost-adapter-cache-redis-5.35.1.tgz +0 -0
- package/components/{tryghost-adapter-manager-5.34.1.tgz → tryghost-adapter-manager-5.35.1.tgz} +0 -0
- package/components/{tryghost-api-framework-5.34.1.tgz → tryghost-api-framework-5.35.1.tgz} +0 -0
- package/components/tryghost-api-version-compatibility-service-5.35.1.tgz +0 -0
- package/components/tryghost-audience-feedback-5.35.1.tgz +0 -0
- package/components/{tryghost-bootstrap-socket-5.34.1.tgz → tryghost-bootstrap-socket-5.35.1.tgz} +0 -0
- package/components/tryghost-constants-5.35.1.tgz +0 -0
- package/components/tryghost-custom-theme-settings-service-5.35.1.tgz +0 -0
- package/components/tryghost-data-generator-5.35.1.tgz +0 -0
- package/components/{tryghost-domain-events-5.34.1.tgz → tryghost-domain-events-5.35.1.tgz} +0 -0
- package/components/tryghost-dynamic-routing-events-5.35.1.tgz +0 -0
- package/components/tryghost-email-analytics-provider-mailgun-5.35.1.tgz +0 -0
- package/components/tryghost-email-analytics-service-5.35.1.tgz +0 -0
- package/components/tryghost-email-content-generator-5.35.1.tgz +0 -0
- package/components/tryghost-email-events-5.35.1.tgz +0 -0
- package/components/tryghost-email-service-5.35.1.tgz +0 -0
- package/components/{tryghost-email-suppression-list-5.34.1.tgz → tryghost-email-suppression-list-5.35.1.tgz} +0 -0
- package/components/{tryghost-express-dynamic-redirects-5.34.1.tgz → tryghost-express-dynamic-redirects-5.35.1.tgz} +0 -0
- package/components/tryghost-extract-api-key-5.35.1.tgz +0 -0
- package/components/tryghost-html-to-plaintext-5.35.1.tgz +0 -0
- package/components/{tryghost-i18n-5.34.1.tgz → tryghost-i18n-5.35.1.tgz} +0 -0
- package/components/{tryghost-importer-revue-5.34.1.tgz → tryghost-importer-revue-5.35.1.tgz} +0 -0
- package/components/tryghost-job-manager-5.35.1.tgz +0 -0
- package/components/tryghost-link-redirects-5.35.1.tgz +0 -0
- package/components/tryghost-link-replacer-5.35.1.tgz +0 -0
- package/components/tryghost-link-tracking-5.35.1.tgz +0 -0
- package/components/{tryghost-magic-link-5.34.1.tgz → tryghost-magic-link-5.35.1.tgz} +0 -0
- package/components/tryghost-mailgun-client-5.35.1.tgz +0 -0
- package/components/tryghost-member-attribution-5.35.1.tgz +0 -0
- package/components/{tryghost-member-events-5.34.1.tgz → tryghost-member-events-5.35.1.tgz} +0 -0
- package/components/{tryghost-members-api-5.34.1.tgz → tryghost-members-api-5.35.1.tgz} +0 -0
- package/components/tryghost-members-csv-5.35.1.tgz +0 -0
- package/components/{tryghost-members-events-service-5.34.1.tgz → tryghost-members-events-service-5.35.1.tgz} +0 -0
- package/components/{tryghost-members-importer-5.34.1.tgz → tryghost-members-importer-5.35.1.tgz} +0 -0
- package/components/tryghost-members-offers-5.35.1.tgz +0 -0
- package/components/tryghost-members-payments-5.35.1.tgz +0 -0
- package/components/tryghost-members-ssr-5.35.1.tgz +0 -0
- package/components/tryghost-members-stripe-service-5.35.1.tgz +0 -0
- package/components/tryghost-milestones-5.35.1.tgz +0 -0
- package/components/tryghost-minifier-5.35.1.tgz +0 -0
- package/components/tryghost-mw-api-version-mismatch-5.35.1.tgz +0 -0
- package/components/{tryghost-mw-cache-control-5.34.1.tgz → tryghost-mw-cache-control-5.35.1.tgz} +0 -0
- package/components/{tryghost-mw-error-handler-5.34.1.tgz → tryghost-mw-error-handler-5.35.1.tgz} +0 -0
- package/components/tryghost-mw-session-from-token-5.35.1.tgz +0 -0
- package/components/tryghost-mw-update-user-last-seen-5.35.1.tgz +0 -0
- package/components/tryghost-mw-vhost-5.35.1.tgz +0 -0
- package/components/{tryghost-oembed-service-5.34.1.tgz → tryghost-oembed-service-5.35.1.tgz} +0 -0
- package/components/tryghost-package-json-5.35.1.tgz +0 -0
- package/components/tryghost-public-resource-repository-5.35.1.tgz +0 -0
- package/components/tryghost-referrers-5.35.1.tgz +0 -0
- package/components/tryghost-security-5.35.1.tgz +0 -0
- package/components/tryghost-session-service-5.35.1.tgz +0 -0
- package/components/tryghost-settings-path-manager-5.35.1.tgz +0 -0
- package/components/tryghost-slack-notifications-5.35.1.tgz +0 -0
- package/components/{tryghost-staff-service-5.34.1.tgz → tryghost-staff-service-5.35.1.tgz} +0 -0
- package/components/tryghost-stats-service-5.35.1.tgz +0 -0
- package/components/tryghost-tiers-5.35.1.tgz +0 -0
- package/components/tryghost-update-check-service-5.35.1.tgz +0 -0
- package/components/tryghost-verification-trigger-5.35.1.tgz +0 -0
- package/components/tryghost-version-notifications-data-service-5.35.1.tgz +0 -0
- package/components/tryghost-webmentions-5.35.1.tgz +0 -0
- package/core/boot.js +27 -3
- package/core/built/admin/assets/{chunk.143.07f5af56ff872bb0e9e4.js → chunk.143.3e5760df9072a9463476.js} +5 -5
- package/core/built/admin/assets/{chunk.178.2e831ef9072743e38dd1.js → chunk.178.773722be9deba376bacb.js} +4 -4
- package/core/built/admin/assets/{chunk.616.181e1ad6c33f0bec7a65.js → chunk.502.c4afca88c98edad8b268.js} +1621 -1338
- package/core/built/admin/assets/{chunk.616.181e1ad6c33f0bec7a65.js.LICENSE.txt → chunk.502.c4afca88c98edad8b268.js.LICENSE.txt} +43 -0
- package/core/built/admin/assets/{ghost-558c1e319d6e025bfab2054bc0f7fe83.css → ghost-1d4b69d04b8a97e8a1bd83ed5bb20777.css} +1 -1
- package/core/built/admin/assets/{ghost-ad40d109653288e74a7cd922341fb33d.js → ghost-5f530fdaca961aa2ec5c339d5bb13443.js} +4353 -4323
- package/core/built/admin/assets/{ghost-dark-a15754df1f9070dc2525482ce22e2251.css → ghost-dark-633bf4628beead68e8a0d1fa668735ff.css} +1 -1
- package/core/built/admin/assets/{vendor-253d6527ca6353855164ef65f896f762.js → vendor-c4684647d4f5213e5dbb6763de430e7e.js} +2741 -2309
- package/core/built/admin/index.html +6 -6
- package/core/cli/generate-data.js +3 -1
- package/core/server/api/endpoints/emails.js +35 -0
- package/core/server/api/endpoints/images.js +13 -6
- package/core/server/api/endpoints/pages-public.js +3 -1
- package/core/server/api/endpoints/posts-public.js +3 -1
- package/core/server/api/endpoints/utils/serializers/output/emails.js +4 -0
- package/core/server/api/endpoints/utils/serializers/output/mappers/mentions.js +2 -1
- package/core/server/api/endpoints/utils/serializers/output/mappers/posts.js +11 -0
- package/core/server/data/migrations/versions/5.35/2023-02-13-06-24-add-mentions-verified-column.js +7 -0
- package/core/server/data/schema/schema.js +2 -1
- package/core/server/lib/request-external.js +1 -0
- package/core/server/models/mention.js +2 -1
- package/core/server/services/email-analytics/lib/queries.js +18 -3
- package/core/server/services/email-analytics/wrapper.js +34 -15
- package/core/server/services/email-service/wrapper.js +2 -1
- package/core/server/services/mega/post-email-serializer.js +2 -2
- package/core/server/services/mega/template.js +1 -1
- package/core/server/services/member-attribution/index.js +8 -4
- package/core/server/services/mentions/BookshelfMentionRepository.js +4 -2
- package/core/server/services/mentions/WebmentionRequest.js +20 -0
- package/core/server/services/mentions/service.js +4 -1
- package/core/server/services/mentions-jobs/index.js +1 -0
- package/core/server/services/mentions-jobs/job-service.js +48 -0
- package/core/server/services/{milestone-emails → milestones}/MilestoneQueries.js +0 -0
- package/core/server/services/{milestone-emails → milestones}/index.js +0 -0
- package/core/server/services/milestones/service.js +78 -0
- package/core/server/services/posts-public/index.js +1 -0
- package/core/server/services/posts-public/service.js +31 -0
- package/core/server/services/slack-notifications/index.js +1 -0
- package/core/server/services/slack-notifications/service.js +60 -0
- package/core/server/services/tags-public/service.js +5 -5
- package/core/server/services/websockets/index.js +1 -0
- package/core/server/services/websockets/service.js +37 -0
- package/core/server/web/api/endpoints/admin/routes.js +3 -0
- package/core/shared/config/defaults.json +2 -2
- package/core/shared/labs.js +4 -3
- package/package.json +121 -118
- package/yarn.lock +307 -102
- package/components/tryghost-adapter-cache-redis-5.34.1.tgz +0 -0
- package/components/tryghost-api-version-compatibility-service-5.34.1.tgz +0 -0
- package/components/tryghost-audience-feedback-5.34.1.tgz +0 -0
- package/components/tryghost-constants-5.34.1.tgz +0 -0
- package/components/tryghost-custom-theme-settings-service-5.34.1.tgz +0 -0
- package/components/tryghost-data-generator-5.34.1.tgz +0 -0
- package/components/tryghost-dynamic-routing-events-5.34.1.tgz +0 -0
- package/components/tryghost-email-analytics-provider-mailgun-5.34.1.tgz +0 -0
- package/components/tryghost-email-analytics-service-5.34.1.tgz +0 -0
- package/components/tryghost-email-content-generator-5.34.1.tgz +0 -0
- package/components/tryghost-email-events-5.34.1.tgz +0 -0
- package/components/tryghost-email-service-5.34.1.tgz +0 -0
- package/components/tryghost-extract-api-key-5.34.1.tgz +0 -0
- package/components/tryghost-html-to-plaintext-5.34.1.tgz +0 -0
- package/components/tryghost-job-manager-5.34.1.tgz +0 -0
- package/components/tryghost-link-redirects-5.34.1.tgz +0 -0
- package/components/tryghost-link-replacer-5.34.1.tgz +0 -0
- package/components/tryghost-link-tracking-5.34.1.tgz +0 -0
- package/components/tryghost-mailgun-client-5.34.1.tgz +0 -0
- package/components/tryghost-member-attribution-5.34.1.tgz +0 -0
- package/components/tryghost-members-csv-5.34.1.tgz +0 -0
- package/components/tryghost-members-offers-5.34.1.tgz +0 -0
- package/components/tryghost-members-payments-5.34.1.tgz +0 -0
- package/components/tryghost-members-ssr-5.34.1.tgz +0 -0
- package/components/tryghost-members-stripe-service-5.34.1.tgz +0 -0
- package/components/tryghost-milestone-emails-5.34.1.tgz +0 -0
- package/components/tryghost-minifier-5.34.1.tgz +0 -0
- package/components/tryghost-mw-api-version-mismatch-5.34.1.tgz +0 -0
- package/components/tryghost-mw-session-from-token-5.34.1.tgz +0 -0
- package/components/tryghost-mw-update-user-last-seen-5.34.1.tgz +0 -0
- package/components/tryghost-mw-vhost-5.34.1.tgz +0 -0
- package/components/tryghost-package-json-5.34.1.tgz +0 -0
- package/components/tryghost-referrers-5.34.1.tgz +0 -0
- package/components/tryghost-security-5.34.1.tgz +0 -0
- package/components/tryghost-session-service-5.34.1.tgz +0 -0
- package/components/tryghost-settings-path-manager-5.34.1.tgz +0 -0
- package/components/tryghost-stats-service-5.34.1.tgz +0 -0
- package/components/tryghost-tags-public-5.34.1.tgz +0 -0
- package/components/tryghost-tiers-5.34.1.tgz +0 -0
- package/components/tryghost-update-check-service-5.34.1.tgz +0 -0
- package/components/tryghost-verification-trigger-5.34.1.tgz +0 -0
- package/components/tryghost-version-notifications-data-service-5.34.1.tgz +0 -0
- package/components/tryghost-webmentions-5.34.1.tgz +0 -0
- package/core/server/services/milestone-emails/service.js +0 -58
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
// Stubbing stripe in test was causing issues. Moved it
|
|
2
|
-
// into this function to be able to rewire and stub the
|
|
3
|
-
// expected return value.
|
|
4
|
-
const getStripeLiveEnabled = () => {
|
|
5
|
-
const stripeService = require('../stripe');
|
|
6
|
-
// This seems to be the only true way to check if Stripe is configured in live mode
|
|
7
|
-
// settingsCache only cares if Stripe is enabled
|
|
8
|
-
return stripeService.api.configured && stripeService.api.mode === 'live';
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
*
|
|
13
|
-
* @returns {Promise<any>}
|
|
14
|
-
*/
|
|
15
|
-
module.exports = {
|
|
16
|
-
async initAndRun() {
|
|
17
|
-
const labs = require('../../../shared/labs');
|
|
18
|
-
|
|
19
|
-
if (labs.isSet('milestoneEmails')) {
|
|
20
|
-
const db = require('../../data/db');
|
|
21
|
-
const MilestoneQueries = require('./MilestoneQueries');
|
|
22
|
-
|
|
23
|
-
const {
|
|
24
|
-
MilestonesEmailService,
|
|
25
|
-
InMemoryMilestoneRepository
|
|
26
|
-
} = require('@tryghost/milestone-emails');
|
|
27
|
-
const config = require('../../../shared/config');
|
|
28
|
-
const milestonesConfig = config.get('milestones');
|
|
29
|
-
const {GhostMailer} = require('../mail');
|
|
30
|
-
|
|
31
|
-
const mailer = new GhostMailer();
|
|
32
|
-
const repository = new InMemoryMilestoneRepository();
|
|
33
|
-
const queries = new MilestoneQueries({db});
|
|
34
|
-
|
|
35
|
-
const milestonesEmailService = new MilestonesEmailService({
|
|
36
|
-
mailer,
|
|
37
|
-
repository,
|
|
38
|
-
milestonesConfig, // avoid using getters and pass as JSON
|
|
39
|
-
queries
|
|
40
|
-
});
|
|
41
|
-
|
|
42
|
-
let arrResult;
|
|
43
|
-
|
|
44
|
-
// @TODO: schedule recurring jobs instead
|
|
45
|
-
const membersResult = await milestonesEmailService.checkMilestones('members');
|
|
46
|
-
const stripeLiveEnabled = getStripeLiveEnabled();
|
|
47
|
-
|
|
48
|
-
if (stripeLiveEnabled) {
|
|
49
|
-
arrResult = await milestonesEmailService.checkMilestones('arr');
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
return {
|
|
53
|
-
members: membersResult,
|
|
54
|
-
arr: arrResult
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
};
|