ghost 5.76.2 → 5.78.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-memory-ttl-5.78.0.tgz +0 -0
- package/components/tryghost-adapter-cache-redis-5.78.0.tgz +0 -0
- package/components/{tryghost-adapter-manager-5.76.2.tgz → tryghost-adapter-manager-5.78.0.tgz} +0 -0
- package/components/tryghost-announcement-bar-settings-5.78.0.tgz +0 -0
- package/components/tryghost-api-framework-5.78.0.tgz +0 -0
- package/components/tryghost-api-version-compatibility-service-5.78.0.tgz +0 -0
- package/components/tryghost-audience-feedback-5.78.0.tgz +0 -0
- package/components/{tryghost-bookshelf-repository-5.76.2.tgz → tryghost-bookshelf-repository-5.78.0.tgz} +0 -0
- package/components/{tryghost-bootstrap-socket-5.76.2.tgz → tryghost-bootstrap-socket-5.78.0.tgz} +0 -0
- package/components/tryghost-collections-5.78.0.tgz +0 -0
- package/components/tryghost-constants-5.78.0.tgz +0 -0
- package/components/tryghost-custom-theme-settings-service-5.78.0.tgz +0 -0
- package/components/{tryghost-data-generator-5.76.2.tgz → tryghost-data-generator-5.78.0.tgz} +0 -0
- package/components/tryghost-domain-events-5.78.0.tgz +0 -0
- package/components/tryghost-donations-5.78.0.tgz +0 -0
- package/components/tryghost-dynamic-routing-events-5.78.0.tgz +0 -0
- package/components/tryghost-email-addresses-5.78.0.tgz +0 -0
- package/components/tryghost-email-analytics-provider-mailgun-5.78.0.tgz +0 -0
- package/components/tryghost-email-analytics-service-5.78.0.tgz +0 -0
- package/components/tryghost-email-content-generator-5.78.0.tgz +0 -0
- package/components/{tryghost-email-events-5.76.2.tgz → tryghost-email-events-5.78.0.tgz} +0 -0
- package/components/tryghost-email-service-5.78.0.tgz +0 -0
- package/components/tryghost-email-suppression-list-5.78.0.tgz +0 -0
- package/components/tryghost-express-dynamic-redirects-5.78.0.tgz +0 -0
- package/components/tryghost-external-media-inliner-5.78.0.tgz +0 -0
- package/components/tryghost-extract-api-key-5.78.0.tgz +0 -0
- package/components/tryghost-html-to-plaintext-5.78.0.tgz +0 -0
- package/components/tryghost-i18n-5.78.0.tgz +0 -0
- package/components/tryghost-importer-handler-content-files-5.78.0.tgz +0 -0
- package/components/tryghost-importer-revue-5.78.0.tgz +0 -0
- package/components/tryghost-in-memory-repository-5.78.0.tgz +0 -0
- package/components/{tryghost-job-manager-5.76.2.tgz → tryghost-job-manager-5.78.0.tgz} +0 -0
- package/components/tryghost-link-redirects-5.78.0.tgz +0 -0
- package/components/tryghost-link-replacer-5.78.0.tgz +0 -0
- package/components/tryghost-link-tracking-5.78.0.tgz +0 -0
- package/components/{tryghost-magic-link-5.76.2.tgz → tryghost-magic-link-5.78.0.tgz} +0 -0
- package/components/tryghost-mail-events-5.78.0.tgz +0 -0
- package/components/{tryghost-mailgun-client-5.76.2.tgz → tryghost-mailgun-client-5.78.0.tgz} +0 -0
- package/components/{tryghost-member-attribution-5.76.2.tgz → tryghost-member-attribution-5.78.0.tgz} +0 -0
- package/components/{tryghost-member-events-5.76.2.tgz → tryghost-member-events-5.78.0.tgz} +0 -0
- package/components/tryghost-members-api-5.78.0.tgz +0 -0
- package/components/tryghost-members-csv-5.78.0.tgz +0 -0
- package/components/{tryghost-members-events-service-5.76.2.tgz → tryghost-members-events-service-5.78.0.tgz} +0 -0
- package/components/tryghost-members-importer-5.78.0.tgz +0 -0
- package/components/{tryghost-members-offers-5.76.2.tgz → tryghost-members-offers-5.78.0.tgz} +0 -0
- package/components/tryghost-members-payments-5.78.0.tgz +0 -0
- package/components/{tryghost-members-ssr-5.76.2.tgz → tryghost-members-ssr-5.78.0.tgz} +0 -0
- package/components/{tryghost-members-stripe-service-5.76.2.tgz → tryghost-members-stripe-service-5.78.0.tgz} +0 -0
- package/components/tryghost-mentions-email-report-5.78.0.tgz +0 -0
- package/components/tryghost-milestones-5.78.0.tgz +0 -0
- package/components/tryghost-minifier-5.78.0.tgz +0 -0
- package/components/tryghost-model-to-domain-event-interceptor-5.78.0.tgz +0 -0
- package/components/tryghost-mw-api-version-mismatch-5.78.0.tgz +0 -0
- package/components/tryghost-mw-cache-control-5.78.0.tgz +0 -0
- package/components/{tryghost-mw-error-handler-5.76.2.tgz → tryghost-mw-error-handler-5.78.0.tgz} +0 -0
- package/components/tryghost-mw-session-from-token-5.78.0.tgz +0 -0
- package/components/tryghost-mw-update-user-last-seen-5.78.0.tgz +0 -0
- package/components/tryghost-mw-version-match-5.78.0.tgz +0 -0
- package/components/tryghost-mw-vhost-5.78.0.tgz +0 -0
- package/components/{tryghost-nql-filter-expansions-5.76.2.tgz → tryghost-nql-filter-expansions-5.78.0.tgz} +0 -0
- package/components/tryghost-oembed-service-5.78.0.tgz +0 -0
- package/components/{tryghost-package-json-5.76.2.tgz → tryghost-package-json-5.78.0.tgz} +0 -0
- package/components/tryghost-post-events-5.78.0.tgz +0 -0
- package/components/tryghost-post-revisions-5.78.0.tgz +0 -0
- package/components/tryghost-posts-service-5.78.0.tgz +0 -0
- package/components/{tryghost-recommendations-5.76.2.tgz → tryghost-recommendations-5.78.0.tgz} +0 -0
- package/components/{tryghost-referrers-5.76.2.tgz → tryghost-referrers-5.78.0.tgz} +0 -0
- package/components/{tryghost-security-5.76.2.tgz → tryghost-security-5.78.0.tgz} +0 -0
- package/components/{tryghost-session-service-5.76.2.tgz → tryghost-session-service-5.78.0.tgz} +0 -0
- package/components/tryghost-settings-path-manager-5.78.0.tgz +0 -0
- package/components/tryghost-slack-notifications-5.78.0.tgz +0 -0
- package/components/{tryghost-staff-service-5.76.2.tgz → tryghost-staff-service-5.78.0.tgz} +0 -0
- package/components/tryghost-stats-service-5.78.0.tgz +0 -0
- package/components/tryghost-tiers-5.78.0.tgz +0 -0
- package/components/tryghost-update-check-service-5.78.0.tgz +0 -0
- package/components/{tryghost-verification-trigger-5.76.2.tgz → tryghost-verification-trigger-5.78.0.tgz} +0 -0
- package/components/tryghost-version-notifications-data-service-5.78.0.tgz +0 -0
- package/components/{tryghost-webmentions-5.76.2.tgz → tryghost-webmentions-5.78.0.tgz} +0 -0
- package/core/boot.js +3 -1
- package/core/built/admin/assets/admin-x-demo/admin-x-demo.js +1 -1
- package/core/built/admin/assets/admin-x-demo/{index-3d0e9e6b.mjs → index-eee22c84.mjs} +348 -346
- package/core/built/admin/assets/admin-x-demo/{modals-f20fa267.mjs → modals-e4b12fba.mjs} +38 -38
- package/core/built/admin/assets/admin-x-settings/{CodeEditorView-84bd3824.mjs → CodeEditorView-c3b34635.mjs} +2 -2
- package/core/built/admin/assets/admin-x-settings/admin-x-settings.js +2 -2
- package/core/built/admin/assets/admin-x-settings/{index-6cc60dce.mjs → index-28680861.mjs} +2 -2
- package/core/built/admin/assets/admin-x-settings/{index-c54bcc5d.mjs → index-8808e054.mjs} +2 -2
- package/core/built/admin/assets/admin-x-settings/{index-d65cac5f.mjs → index-99bd65a2.mjs} +2579 -2583
- package/core/built/admin/assets/admin-x-settings/{modals-2805e75e.mjs → modals-f491bd44.mjs} +4809 -4814
- package/core/built/admin/assets/{chunk.143.d41a3a112d0cf7035db0.js → chunk.143.6e73a50be0209a7256b6.js} +5 -5
- package/core/built/admin/assets/{chunk.178.28c881b3559706a13f57.js → chunk.178.75b9357c8d68006957a4.js} +4 -4
- package/core/built/admin/assets/{chunk.664.0bd9e83a6b03130112ae.js → chunk.664.99d0951b803d7ec00d8b.js} +2 -2
- package/core/built/admin/assets/{ghost-971615b195b524bf97f678a350865195.js → ghost-e4af0146175c424ff8b5bfbee8f04258.js} +74 -91
- package/core/built/admin/index.html +4 -4
- package/core/frontend/helpers/get.js +38 -22
- package/core/frontend/services/routing/controllers/previews.js +3 -2
- package/core/server/api/endpoints/newsletters.js +1 -2
- package/core/server/api/endpoints/stats.js +40 -5
- package/core/server/api/endpoints/utils/serializers/output/mappers/newsletters.js +12 -0
- package/core/server/data/db/ConnectionPoolInstrumentation.js +142 -0
- package/core/server/data/db/connection.js +6 -0
- package/core/server/data/db/index.js +9 -0
- package/core/server/services/explore/ExploreService.js +1 -1
- package/core/server/services/newsletters/NewslettersService.js +22 -3
- package/core/server/services/posts-public/service.js +4 -20
- package/core/server/services/segment/index.js +0 -14
- package/core/server/services/stats/service.js +26 -3
- package/core/server/services/tags-public/service.js +4 -19
- package/core/shared/labs.js +3 -3
- package/core/shared/sentry.js +28 -1
- package/package.json +150 -152
- package/yarn.lock +569 -1504
- package/components/tryghost-adapter-cache-memory-ttl-5.76.2.tgz +0 -0
- package/components/tryghost-adapter-cache-redis-5.76.2.tgz +0 -0
- package/components/tryghost-announcement-bar-settings-5.76.2.tgz +0 -0
- package/components/tryghost-api-framework-5.76.2.tgz +0 -0
- package/components/tryghost-api-version-compatibility-service-5.76.2.tgz +0 -0
- package/components/tryghost-audience-feedback-5.76.2.tgz +0 -0
- package/components/tryghost-collections-5.76.2.tgz +0 -0
- package/components/tryghost-constants-5.76.2.tgz +0 -0
- package/components/tryghost-custom-theme-settings-service-5.76.2.tgz +0 -0
- package/components/tryghost-domain-events-5.76.2.tgz +0 -0
- package/components/tryghost-donations-5.76.2.tgz +0 -0
- package/components/tryghost-dynamic-routing-events-5.76.2.tgz +0 -0
- package/components/tryghost-email-addresses-5.76.2.tgz +0 -0
- package/components/tryghost-email-analytics-provider-mailgun-5.76.2.tgz +0 -0
- package/components/tryghost-email-analytics-service-5.76.2.tgz +0 -0
- package/components/tryghost-email-content-generator-5.76.2.tgz +0 -0
- package/components/tryghost-email-service-5.76.2.tgz +0 -0
- package/components/tryghost-email-suppression-list-5.76.2.tgz +0 -0
- package/components/tryghost-event-aware-cache-wrapper-5.76.2.tgz +0 -0
- package/components/tryghost-express-dynamic-redirects-5.76.2.tgz +0 -0
- package/components/tryghost-external-media-inliner-5.76.2.tgz +0 -0
- package/components/tryghost-extract-api-key-5.76.2.tgz +0 -0
- package/components/tryghost-html-to-plaintext-5.76.2.tgz +0 -0
- package/components/tryghost-i18n-5.76.2.tgz +0 -0
- package/components/tryghost-importer-handler-content-files-5.76.2.tgz +0 -0
- package/components/tryghost-importer-revue-5.76.2.tgz +0 -0
- package/components/tryghost-in-memory-repository-5.76.2.tgz +0 -0
- package/components/tryghost-link-redirects-5.76.2.tgz +0 -0
- package/components/tryghost-link-replacer-5.76.2.tgz +0 -0
- package/components/tryghost-link-tracking-5.76.2.tgz +0 -0
- package/components/tryghost-mail-events-5.76.2.tgz +0 -0
- package/components/tryghost-members-api-5.76.2.tgz +0 -0
- package/components/tryghost-members-csv-5.76.2.tgz +0 -0
- package/components/tryghost-members-importer-5.76.2.tgz +0 -0
- package/components/tryghost-members-payments-5.76.2.tgz +0 -0
- package/components/tryghost-mentions-email-report-5.76.2.tgz +0 -0
- package/components/tryghost-milestones-5.76.2.tgz +0 -0
- package/components/tryghost-minifier-5.76.2.tgz +0 -0
- package/components/tryghost-model-to-domain-event-interceptor-5.76.2.tgz +0 -0
- package/components/tryghost-mw-api-version-mismatch-5.76.2.tgz +0 -0
- package/components/tryghost-mw-cache-control-5.76.2.tgz +0 -0
- package/components/tryghost-mw-session-from-token-5.76.2.tgz +0 -0
- package/components/tryghost-mw-update-user-last-seen-5.76.2.tgz +0 -0
- package/components/tryghost-mw-version-match-5.76.2.tgz +0 -0
- package/components/tryghost-mw-vhost-5.76.2.tgz +0 -0
- package/components/tryghost-oembed-service-5.76.2.tgz +0 -0
- package/components/tryghost-post-events-5.76.2.tgz +0 -0
- package/components/tryghost-post-revisions-5.76.2.tgz +0 -0
- package/components/tryghost-posts-service-5.76.2.tgz +0 -0
- package/components/tryghost-settings-path-manager-5.76.2.tgz +0 -0
- package/components/tryghost-slack-notifications-5.76.2.tgz +0 -0
- package/components/tryghost-stats-service-5.76.2.tgz +0 -0
- package/components/tryghost-tiers-5.76.2.tgz +0 -0
- package/components/tryghost-update-check-service-5.76.2.tgz +0 -0
- package/components/tryghost-version-notifications-data-service-5.76.2.tgz +0 -0
- package/core/server/services/segment/ModelEventsAnalytics.js +0 -108
- /package/core/built/admin/assets/{chunk.664.0bd9e83a6b03130112ae.js.LICENSE.txt → chunk.664.99d0951b803d7ec00d8b.js.LICENSE.txt} +0 -0
|
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
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
const _ = require('lodash');
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @typedef {import('@tryghost/logging')} logging
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* @typedef {import('analytics-node')} analytics
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* @typedef {object} IExceptionHandler
|
|
13
|
-
* @prop {(err: Error) => void} captureException
|
|
14
|
-
*/
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* @typedef {import('../../lib/common/events')} events
|
|
18
|
-
*/
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* @typedef {object} IModelEventsAnalytics
|
|
22
|
-
* @param {analytics} analytics
|
|
23
|
-
* @param {logging} logging
|
|
24
|
-
* @param {object} trackDefaults
|
|
25
|
-
* @param {string} prefix
|
|
26
|
-
* @param {IExceptionHandler} exceptionHandler
|
|
27
|
-
* @param {events} events
|
|
28
|
-
* @prop {} subscribeToEvents
|
|
29
|
-
*/
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* Listens to model events to layer on analytics - also uses the "fake" theme.uploaded
|
|
33
|
-
* event from the theme API
|
|
34
|
-
*/
|
|
35
|
-
module.exports = class ModelEventsAnalytics {
|
|
36
|
-
/** @type {analytics} */
|
|
37
|
-
#analytics;
|
|
38
|
-
/** @type {object} */
|
|
39
|
-
#trackDefaults;
|
|
40
|
-
/** @type {string} */
|
|
41
|
-
#prefix;
|
|
42
|
-
/** @type {IExceptionHandler} */
|
|
43
|
-
#exceptionHandler;
|
|
44
|
-
/** @type {events} */
|
|
45
|
-
#events;
|
|
46
|
-
/** @type {logging} */
|
|
47
|
-
#logging;
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* @type {Array<{event: string, name: string, data?: object}>}
|
|
51
|
-
*/
|
|
52
|
-
#toTrack = [
|
|
53
|
-
{
|
|
54
|
-
event: 'post.published',
|
|
55
|
-
name: 'Post Published'
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
event: 'page.published',
|
|
59
|
-
name: 'Page Published'
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
event: 'theme.uploaded',
|
|
63
|
-
name: 'Theme Uploaded',
|
|
64
|
-
// {keyOnSuppliedEventData: keyOnTrackedEventData}
|
|
65
|
-
// - used to extract specific properties from event data and give them meaningful names
|
|
66
|
-
data: {name: 'name'}
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
event: 'integration.added',
|
|
70
|
-
name: 'Custom Integration Added'
|
|
71
|
-
}
|
|
72
|
-
];
|
|
73
|
-
|
|
74
|
-
constructor(deps) {
|
|
75
|
-
this.#analytics = deps.analytics;
|
|
76
|
-
this.#trackDefaults = deps.trackDefaults;
|
|
77
|
-
this.#prefix = deps.prefix;
|
|
78
|
-
this.#exceptionHandler = deps.exceptionHandler;
|
|
79
|
-
this.#events = deps.events;
|
|
80
|
-
this.#logging = deps.logging;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
async #handleEvent(event) {
|
|
84
|
-
try {
|
|
85
|
-
this.#analytics.track(event);
|
|
86
|
-
} catch (err) {
|
|
87
|
-
this.#logging.error(err);
|
|
88
|
-
this.#exceptionHandler.captureException(err);
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
subscribeToEvents() {
|
|
93
|
-
this.#toTrack.forEach(({event, name, data = {}}) => {
|
|
94
|
-
this.#events.on(event, async (eventData = {}) => {
|
|
95
|
-
// extract desired properties from eventData and rename keys if necessary
|
|
96
|
-
const mappedData = _.mapValues(data || {}, v => eventData[v]);
|
|
97
|
-
|
|
98
|
-
const eventToTrack = {
|
|
99
|
-
...this.#trackDefaults,
|
|
100
|
-
event: this.#prefix + name,
|
|
101
|
-
...mappedData
|
|
102
|
-
};
|
|
103
|
-
|
|
104
|
-
await this.#handleEvent(eventToTrack);
|
|
105
|
-
});
|
|
106
|
-
});
|
|
107
|
-
}
|
|
108
|
-
};
|