ghost 5.33.7 → 5.34.0
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.34.0.tgz +0 -0
- package/components/tryghost-adapter-manager-5.34.0.tgz +0 -0
- package/components/{tryghost-api-framework-5.33.7.tgz → tryghost-api-framework-5.34.0.tgz} +0 -0
- package/components/tryghost-api-version-compatibility-service-5.34.0.tgz +0 -0
- package/components/tryghost-audience-feedback-5.34.0.tgz +0 -0
- package/components/tryghost-bootstrap-socket-5.34.0.tgz +0 -0
- package/components/tryghost-constants-5.34.0.tgz +0 -0
- package/components/tryghost-custom-theme-settings-service-5.34.0.tgz +0 -0
- package/components/tryghost-data-generator-5.34.0.tgz +0 -0
- package/components/tryghost-domain-events-5.34.0.tgz +0 -0
- package/components/tryghost-dynamic-routing-events-5.34.0.tgz +0 -0
- package/components/tryghost-email-analytics-provider-mailgun-5.34.0.tgz +0 -0
- package/components/tryghost-email-analytics-service-5.34.0.tgz +0 -0
- package/components/tryghost-email-content-generator-5.34.0.tgz +0 -0
- package/components/tryghost-email-events-5.34.0.tgz +0 -0
- package/components/tryghost-email-service-5.34.0.tgz +0 -0
- package/components/tryghost-email-suppression-list-5.34.0.tgz +0 -0
- package/components/{tryghost-express-dynamic-redirects-5.33.7.tgz → tryghost-express-dynamic-redirects-5.34.0.tgz} +0 -0
- package/components/tryghost-extract-api-key-5.34.0.tgz +0 -0
- package/components/tryghost-html-to-plaintext-5.34.0.tgz +0 -0
- package/components/tryghost-i18n-5.34.0.tgz +0 -0
- package/components/tryghost-importer-revue-5.34.0.tgz +0 -0
- package/components/{tryghost-job-manager-5.33.7.tgz → tryghost-job-manager-5.34.0.tgz} +0 -0
- package/components/tryghost-link-redirects-5.34.0.tgz +0 -0
- package/components/tryghost-link-replacer-5.34.0.tgz +0 -0
- package/components/{tryghost-link-tracking-5.33.7.tgz → tryghost-link-tracking-5.34.0.tgz} +0 -0
- package/components/tryghost-magic-link-5.34.0.tgz +0 -0
- package/components/tryghost-mailgun-client-5.34.0.tgz +0 -0
- package/components/tryghost-member-attribution-5.34.0.tgz +0 -0
- package/components/tryghost-member-events-5.34.0.tgz +0 -0
- package/components/tryghost-members-api-5.34.0.tgz +0 -0
- package/components/tryghost-members-csv-5.34.0.tgz +0 -0
- package/components/{tryghost-members-events-service-5.33.7.tgz → tryghost-members-events-service-5.34.0.tgz} +0 -0
- package/components/{tryghost-members-importer-5.33.7.tgz → tryghost-members-importer-5.34.0.tgz} +0 -0
- package/components/tryghost-members-offers-5.34.0.tgz +0 -0
- package/components/tryghost-members-payments-5.34.0.tgz +0 -0
- package/components/{tryghost-members-ssr-5.33.7.tgz → tryghost-members-ssr-5.34.0.tgz} +0 -0
- package/components/tryghost-members-stripe-service-5.34.0.tgz +0 -0
- package/components/tryghost-milestone-emails-5.34.0.tgz +0 -0
- package/components/tryghost-minifier-5.34.0.tgz +0 -0
- package/components/tryghost-mw-api-version-mismatch-5.34.0.tgz +0 -0
- package/components/tryghost-mw-cache-control-5.34.0.tgz +0 -0
- package/components/{tryghost-mw-error-handler-5.33.7.tgz → tryghost-mw-error-handler-5.34.0.tgz} +0 -0
- package/components/tryghost-mw-session-from-token-5.34.0.tgz +0 -0
- package/components/tryghost-mw-update-user-last-seen-5.34.0.tgz +0 -0
- package/components/tryghost-mw-vhost-5.34.0.tgz +0 -0
- package/components/tryghost-oembed-service-5.34.0.tgz +0 -0
- package/components/{tryghost-package-json-5.33.7.tgz → tryghost-package-json-5.34.0.tgz} +0 -0
- package/components/tryghost-referrers-5.34.0.tgz +0 -0
- package/components/{tryghost-security-5.33.7.tgz → tryghost-security-5.34.0.tgz} +0 -0
- package/components/tryghost-session-service-5.34.0.tgz +0 -0
- package/components/{tryghost-settings-path-manager-5.33.7.tgz → tryghost-settings-path-manager-5.34.0.tgz} +0 -0
- package/components/tryghost-staff-service-5.34.0.tgz +0 -0
- package/components/tryghost-stats-service-5.34.0.tgz +0 -0
- package/components/tryghost-tags-public-5.34.0.tgz +0 -0
- package/components/tryghost-tiers-5.34.0.tgz +0 -0
- package/components/tryghost-update-check-service-5.34.0.tgz +0 -0
- package/components/tryghost-verification-trigger-5.34.0.tgz +0 -0
- package/components/tryghost-version-notifications-data-service-5.34.0.tgz +0 -0
- package/components/tryghost-webmentions-5.34.0.tgz +0 -0
- package/core/boot.js +8 -1
- package/core/built/admin/assets/{chunk.143.9057a1659075c0ee7336.js → chunk.143.a07da1be864f2e500e18.js} +14 -14
- package/core/built/admin/assets/{chunk.178.1d2c848ebe2c7baa38dd.js → chunk.178.9ed5500c900a9032f6c2.js} +4 -4
- package/core/built/admin/assets/{chunk.963.e47ead5abeca4cf69fed.js → chunk.616.181e1ad6c33f0bec7a65.js} +3519 -3512
- package/core/built/admin/assets/{chunk.963.e47ead5abeca4cf69fed.js.LICENSE.txt → chunk.616.181e1ad6c33f0bec7a65.js.LICENSE.txt} +0 -0
- package/core/built/admin/assets/{chunk.79.c3c2c05ea7ff7707fcad.js → chunk.79.ec143a398298020c87e6.js} +112 -112
- package/core/built/admin/assets/codemirror/{codemirror-a81c0653d8e57286b75c5a1792f80779.js → codemirror-6c43f4894cbd8db73d7f35cde836c58e.js} +810 -809
- package/core/built/admin/assets/{ghost-fb9fb8adbcaf1603ad4006dd2d49e401.css → ghost-558c1e319d6e025bfab2054bc0f7fe83.css} +1 -1
- package/core/built/admin/assets/{ghost-904f203ff1f5f6bff4e55a03f39a4fbf.js → ghost-ad40d109653288e74a7cd922341fb33d.js} +115 -90
- package/core/built/admin/assets/{ghost-dark-ac0cb221eddc8652a0e7c263ed6513dc.css → ghost-dark-a15754df1f9070dc2525482ce22e2251.css} +1 -1
- package/core/built/admin/assets/simplemde/{simplemde-2885e4a40ed66fcae974595584efe50b.js → simplemde-28049a9bd7f432b0648747eb26958a33.js} +836 -836
- package/core/built/admin/assets/{vendor-0441964c34d58f2aacd5a04bbe240243.js → vendor-253d6527ca6353855164ef65f896f762.js} +1208 -1233
- package/core/built/admin/index.html +6 -6
- package/core/cli/generate-data.js +21 -3
- package/core/frontend/services/routing/router-manager.js +1 -1
- package/core/frontend/web/middleware/handle-image-sizes.js +6 -21
- package/core/server/adapters/cache/Redis.js +3 -0
- package/core/server/adapters/storage/LocalStorageBase.js +11 -1
- package/core/server/api/endpoints/images.js +47 -6
- package/core/server/api/endpoints/mentions.js +1 -1
- package/core/server/api/endpoints/tags-public.js +2 -1
- package/core/server/api/endpoints/utils/serializers/output/email-posts.js +1 -1
- package/core/server/api/endpoints/utils/serializers/output/mappers/mentions.js +1 -1
- package/core/server/api/endpoints/utils/serializers/output/pages.js +1 -1
- package/core/server/api/endpoints/utils/serializers/output/posts.js +1 -1
- package/core/server/api/endpoints/utils/serializers/output/previews.js +1 -1
- package/core/server/api/endpoints/utils/serializers/output/utils/clean.js +1 -0
- package/core/server/data/migrations/versions/5.34/2023-01-30-07-27-add-mentions-permission.js +10 -0
- package/core/server/data/migrations/versions/5.34/2023-02-08-03-08-add-mentions-notifications-column.js +7 -0
- package/core/server/data/migrations/versions/5.34/2023-02-08-22-32-add-mentions-delete-column.js +7 -0
- package/core/server/data/schema/fixtures/fixtures.json +9 -2
- package/core/server/data/schema/schema.js +3 -1
- package/core/server/lib/image/image-size.js +23 -5
- package/core/server/lib/lexical.js +36 -3
- package/core/server/models/member.js +3 -0
- package/core/server/models/mention.js +7 -1
- package/core/server/models/post.js +1 -1
- package/core/server/models/user.js +4 -1
- package/core/server/services/adapter-manager/index.js +7 -0
- package/core/server/services/email-analytics/events/StartEmailAnalyticsJobEvent.js +22 -0
- package/core/server/services/email-analytics/index.js +2 -22
- package/core/server/services/email-analytics/jobs/fetch-latest/index.js +6 -12
- package/core/server/services/email-analytics/wrapper.js +99 -0
- package/core/server/services/email-service/wrapper.js +3 -14
- package/core/server/services/mega/post-email-serializer.js +1 -1
- package/core/server/services/members/jobs/index.js +4 -2
- package/core/server/services/mentions/BookshelfMentionRepository.js +3 -2
- package/core/server/services/mentions/MentionController.js +78 -12
- package/core/server/services/mentions/service.js +43 -3
- package/core/server/services/milestone-emails/MilestoneQueries.js +58 -0
- package/core/server/services/milestone-emails/index.js +1 -0
- package/core/server/services/milestone-emails/service.js +58 -0
- package/core/server/services/tags-public/index.js +1 -0
- package/core/server/services/tags-public/service.js +31 -0
- package/core/server/web/api/endpoints/admin/routes.js +0 -1
- package/core/server/web/api/middleware/index.js +0 -1
- package/core/server/web/shared/middleware/api/spam-prevention.js +31 -1
- package/core/server/web/shared/middleware/brute.js +13 -0
- package/core/server/web/webmentions/routes.js +3 -0
- package/core/shared/config/defaults.json +17 -1
- package/core/shared/config/env/config.development.json +0 -3
- package/core/shared/config/env/config.testing-browser.json +6 -0
- package/core/shared/config/env/config.testing-mysql.json +7 -0
- package/core/shared/config/env/config.testing.json +6 -0
- package/core/shared/labs.js +3 -3
- package/package.json +121 -114
- package/yarn.lock +327 -242
- package/components/tryghost-adapter-manager-5.33.7.tgz +0 -0
- package/components/tryghost-api-version-compatibility-service-5.33.7.tgz +0 -0
- package/components/tryghost-audience-feedback-5.33.7.tgz +0 -0
- package/components/tryghost-bootstrap-socket-5.33.7.tgz +0 -0
- package/components/tryghost-constants-5.33.7.tgz +0 -0
- package/components/tryghost-custom-theme-settings-service-5.33.7.tgz +0 -0
- package/components/tryghost-data-generator-5.33.7.tgz +0 -0
- package/components/tryghost-domain-events-5.33.7.tgz +0 -0
- package/components/tryghost-dynamic-routing-events-5.33.7.tgz +0 -0
- package/components/tryghost-email-analytics-provider-mailgun-5.33.7.tgz +0 -0
- package/components/tryghost-email-analytics-service-5.33.7.tgz +0 -0
- package/components/tryghost-email-content-generator-5.33.7.tgz +0 -0
- package/components/tryghost-email-events-5.33.7.tgz +0 -0
- package/components/tryghost-email-service-5.33.7.tgz +0 -0
- package/components/tryghost-email-suppression-list-5.33.7.tgz +0 -0
- package/components/tryghost-extract-api-key-5.33.7.tgz +0 -0
- package/components/tryghost-html-to-plaintext-5.33.7.tgz +0 -0
- package/components/tryghost-i18n-5.33.7.tgz +0 -0
- package/components/tryghost-importer-revue-5.33.7.tgz +0 -0
- package/components/tryghost-link-redirects-5.33.7.tgz +0 -0
- package/components/tryghost-link-replacer-5.33.7.tgz +0 -0
- package/components/tryghost-magic-link-5.33.7.tgz +0 -0
- package/components/tryghost-mailgun-client-5.33.7.tgz +0 -0
- package/components/tryghost-member-attribution-5.33.7.tgz +0 -0
- package/components/tryghost-member-events-5.33.7.tgz +0 -0
- package/components/tryghost-members-api-5.33.7.tgz +0 -0
- package/components/tryghost-members-csv-5.33.7.tgz +0 -0
- package/components/tryghost-members-offers-5.33.7.tgz +0 -0
- package/components/tryghost-members-payments-5.33.7.tgz +0 -0
- package/components/tryghost-members-stripe-service-5.33.7.tgz +0 -0
- package/components/tryghost-minifier-5.33.7.tgz +0 -0
- package/components/tryghost-mw-api-version-mismatch-5.33.7.tgz +0 -0
- package/components/tryghost-mw-cache-control-5.33.7.tgz +0 -0
- package/components/tryghost-mw-session-from-token-5.33.7.tgz +0 -0
- package/components/tryghost-mw-update-user-last-seen-5.33.7.tgz +0 -0
- package/components/tryghost-mw-vhost-5.33.7.tgz +0 -0
- package/components/tryghost-oembed-service-5.33.7.tgz +0 -0
- package/components/tryghost-referrers-5.33.7.tgz +0 -0
- package/components/tryghost-session-service-5.33.7.tgz +0 -0
- package/components/tryghost-staff-service-5.33.7.tgz +0 -0
- package/components/tryghost-stats-service-5.33.7.tgz +0 -0
- package/components/tryghost-tiers-5.33.7.tgz +0 -0
- package/components/tryghost-update-check-service-5.33.7.tgz +0 -0
- package/components/tryghost-verification-trigger-5.33.7.tgz +0 -0
- package/components/tryghost-version-notifications-data-service-5.33.7.tgz +0 -0
- package/components/tryghost-webmentions-5.33.7.tgz +0 -0
- package/core/server/services/email-analytics/jobs/fetch-latest/run.js +0 -57
- package/core/server/web/api/middleware/normalize-image.js +0 -42
|
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
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
const debug = require('@tryghost/debug')('jobs:email-analytics:fetch-latest');
|
|
2
|
-
|
|
3
|
-
async function run({domainEvents}) {
|
|
4
|
-
const config = require('../../../../../shared/config');
|
|
5
|
-
const db = require('../../../../data/db');
|
|
6
|
-
|
|
7
|
-
const settingsRows = await db.knex('settings')
|
|
8
|
-
.whereIn('key', ['mailgun_api_key', 'mailgun_domain', 'mailgun_base_url']);
|
|
9
|
-
|
|
10
|
-
const settingsCache = {};
|
|
11
|
-
|
|
12
|
-
settingsRows.forEach((row) => {
|
|
13
|
-
settingsCache[row.key] = row.value;
|
|
14
|
-
});
|
|
15
|
-
|
|
16
|
-
const settings = {
|
|
17
|
-
get(key) {
|
|
18
|
-
return settingsCache[key];
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
const {EmailAnalyticsService} = require('@tryghost/email-analytics-service');
|
|
23
|
-
const MailgunProvider = require('@tryghost/email-analytics-provider-mailgun');
|
|
24
|
-
const queries = require('../../lib/queries');
|
|
25
|
-
const {EmailEventProcessor} = require('@tryghost/email-service');
|
|
26
|
-
|
|
27
|
-
// Since this is running in a worker thread, we cant dispatch directly
|
|
28
|
-
// So we post the events as a message to the job manager
|
|
29
|
-
const eventProcessor = new EmailEventProcessor({
|
|
30
|
-
domainEvents,
|
|
31
|
-
db
|
|
32
|
-
});
|
|
33
|
-
|
|
34
|
-
const emailAnalyticsService = new EmailAnalyticsService({
|
|
35
|
-
config,
|
|
36
|
-
settings,
|
|
37
|
-
eventProcessor,
|
|
38
|
-
providers: [
|
|
39
|
-
new MailgunProvider({config, settings})
|
|
40
|
-
],
|
|
41
|
-
queries
|
|
42
|
-
});
|
|
43
|
-
|
|
44
|
-
const fetchStartDate = new Date();
|
|
45
|
-
debug('Starting email analytics fetch of latest events');
|
|
46
|
-
const eventStats = await emailAnalyticsService.fetchLatest();
|
|
47
|
-
const fetchEndDate = new Date();
|
|
48
|
-
debug(`Finished fetching ${eventStats.totalEvents} analytics events in ${fetchEndDate - fetchStartDate}ms`);
|
|
49
|
-
|
|
50
|
-
const aggregateStartDate = new Date();
|
|
51
|
-
debug(`Starting email analytics aggregation for ${eventStats.emailIds.length} emails`);
|
|
52
|
-
await emailAnalyticsService.aggregateStats(eventStats);
|
|
53
|
-
const aggregateEndDate = new Date();
|
|
54
|
-
debug(`Finished aggregating email analytics in ${aggregateEndDate - aggregateStartDate}ms`);
|
|
55
|
-
return {eventStats, fetchStartDate, fetchEndDate, aggregateStartDate, aggregateEndDate};
|
|
56
|
-
}
|
|
57
|
-
module.exports.run = run;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
const cloneDeep = require('lodash/cloneDeep');
|
|
2
|
-
const config = require('../../../../shared/config');
|
|
3
|
-
const logging = require('@tryghost/logging');
|
|
4
|
-
const imageTransform = require('@tryghost/image-transform');
|
|
5
|
-
|
|
6
|
-
module.exports = function normalize(req, res, next) {
|
|
7
|
-
const imageOptimizationOptions = config.get('imageOptimization');
|
|
8
|
-
|
|
9
|
-
// CASE: image transform is not capable of transforming file (e.g. .gif)
|
|
10
|
-
if (!imageTransform.shouldResizeFileExtension(req.file.ext) || !imageOptimizationOptions.resize) {
|
|
11
|
-
return next();
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
const out = `${req.file.path}_processed`;
|
|
15
|
-
const originalPath = req.file.path;
|
|
16
|
-
|
|
17
|
-
const options = Object.assign({
|
|
18
|
-
in: originalPath,
|
|
19
|
-
out,
|
|
20
|
-
ext: req.file.ext,
|
|
21
|
-
width: config.get('imageOptimization:defaultMaxWidth')
|
|
22
|
-
}, imageOptimizationOptions);
|
|
23
|
-
|
|
24
|
-
imageTransform.resizeFromPath(options)
|
|
25
|
-
.then(() => {
|
|
26
|
-
req.files = [];
|
|
27
|
-
|
|
28
|
-
// CASE: push the processed/optimized image
|
|
29
|
-
req.files.push(Object.assign(req.file, {path: out}));
|
|
30
|
-
|
|
31
|
-
// CASE: push original image, we keep a copy of it
|
|
32
|
-
const newName = imageTransform.generateOriginalImageName(req.file.name);
|
|
33
|
-
req.files.push(Object.assign(cloneDeep(req.file), {path: originalPath, name: newName}));
|
|
34
|
-
|
|
35
|
-
next();
|
|
36
|
-
})
|
|
37
|
-
.catch((err) => {
|
|
38
|
-
err.context = `${req.file.name} / ${req.file.type}`;
|
|
39
|
-
logging.error(err);
|
|
40
|
-
next();
|
|
41
|
-
});
|
|
42
|
-
};
|