ghost 6.0.4 → 6.0.6
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-i18n-6.0.6.tgz +0 -0
- package/core/built/admin/assets/admin-x-activitypub/admin-x-activitypub.js +1 -1
- package/core/built/admin/assets/admin-x-activitypub/{index-DzkhcDJy.mjs → index-BRzGrD-C.mjs} +10569 -10480
- package/core/built/admin/assets/admin-x-activitypub/{index-BGpQ-bIj.mjs → index-Co80faUx.mjs} +2 -2
- package/core/built/admin/assets/admin-x-settings/{CodeEditorView-CFP3ZKm2.mjs → CodeEditorView-B4W7CQcA.mjs} +2 -2
- package/core/built/admin/assets/admin-x-settings/admin-x-settings.js +1 -1
- package/core/built/admin/assets/admin-x-settings/{index-qJnVka7B.mjs → index-CuwMM9FM.mjs} +6603 -6565
- package/core/built/admin/assets/admin-x-settings/{index-CNPz6XrY.mjs → index-jv9DN3ZO.mjs} +2 -2
- package/core/built/admin/assets/admin-x-settings/{modals-CZ910p4i.mjs → modals-CUGEPPYA.mjs} +6 -6
- package/core/built/admin/assets/{chunk.397.f965bec6bb556d2750de.js → chunk.397.1904882a4a78e2922f07.js} +2 -2
- package/core/built/admin/assets/{chunk.524.d7ccca2fe46a0364b56a.js → chunk.524.56bb70d3e8660d34aef1.js} +7 -7
- package/core/built/admin/assets/{chunk.582.6bb47c177a8f2bf9503f.js → chunk.582.ae0341229e71a85d0b2d.js} +10 -10
- package/core/built/admin/assets/{ghost-754c74a251b36c8775d3cb9ca6a1a85d.js → ghost-2bcbd118a8ad45fed5401e84a7e87c9a.js} +38 -35
- package/core/built/admin/assets/{ghost-a0676bad4687584c2c1b3b6b8bed5b31.css → ghost-2c537ee89c36199137eafc1768fd7de8.css} +1 -1
- package/core/built/admin/assets/{ghost-dark-65295e8112b12fc9b301111e1c446c51.css → ghost-dark-ad23efc1d702e3643a8ee90d089df5d6.css} +1 -1
- package/core/built/admin/assets/posts/posts.js +25911 -25852
- package/core/built/admin/assets/stats/stats.js +26175 -26121
- package/core/built/admin/index.html +5 -5
- package/core/frontend/helpers/facebook_url.js +3 -0
- package/core/frontend/helpers/ghost_head.js +2 -1
- package/core/frontend/helpers/twitter_url.js +3 -0
- package/core/frontend/public/ghost-stats.min.js +1 -1
- package/core/frontend/public/member-attribution.min.js +1 -1
- package/core/frontend/src/ghost-stats/ghost-stats.js +1 -8
- package/core/frontend/src/member-attribution/member-attribution.js +4 -2
- package/core/server/data/tinybird/README.md +38 -10
- package/core/server/data/tinybird/datasources/analytics_events.datasource +3 -2
- package/core/server/data/tinybird/datasources/analytics_events_test.datasource +3 -2
- package/core/server/data/tinybird/scripts/configure-ghost.sh +4 -2
- package/core/server/services/koenig/node-renderers/header-v2-renderer.js +74 -4
- package/core/server/services/lib/magic-link/MagicLink.js +88 -8
- package/core/server/services/members/SingleUseTokenProvider.js +61 -1
- package/core/server/services/members/api.js +18 -8
- package/core/server/services/members/emails/signin.js +38 -4
- package/core/server/services/members/members-api/controllers/RouterController.js +14 -3
- package/core/server/services/members/members-api/members-api.js +4 -3
- package/core/server/services/stats/PostsStatsService.js +26 -9
- package/core/server/services/stats/StatsService.js +1 -1
- package/core/shared/config/defaults.json +2 -2
- package/core/shared/labs.js +2 -1
- package/ghost.js +0 -1
- package/package.json +11 -11
- package/tsconfig.tsbuildinfo +1 -1
- package/yarn.lock +253 -307
- package/components/tryghost-i18n-6.0.4.tgz +0 -0
- /package/core/built/admin/assets/{chunk.397.f965bec6bb556d2750de.js.LICENSE.txt → chunk.397.1904882a4a78e2922f07.js.LICENSE.txt} +0 -0
|
@@ -74,7 +74,7 @@ const {getDateBoundaries, applyDateFilter} = require('./utils/date-utils');
|
|
|
74
74
|
/**
|
|
75
75
|
* @typedef {Object} NewsletterSubscriberStats
|
|
76
76
|
* @property {number} total - Total current subscriber count
|
|
77
|
-
* @property {Array<{date: string, value: number}>}
|
|
77
|
+
* @property {Array<{date: string, value: number}>} values - Daily subscription cumulative values
|
|
78
78
|
*/
|
|
79
79
|
|
|
80
80
|
class PostsStatsService {
|
|
@@ -932,7 +932,7 @@ class PostsStatsService {
|
|
|
932
932
|
* @param {string} [options.date_from] - Optional start date filter (YYYY-MM-DD)
|
|
933
933
|
* @param {string} [options.date_to] - Optional end date filter (YYYY-MM-DD)
|
|
934
934
|
* @param {string} [options.timezone] - Timezone to use for date interpretation
|
|
935
|
-
* @returns {Promise<{data: Array<{total: number,
|
|
935
|
+
* @returns {Promise<{data: Array<{total: number, values: Array<{date: string, value: number}>}>}>} The newsletter subscriber stats with cumulative values
|
|
936
936
|
*/
|
|
937
937
|
async getNewsletterSubscriberStats(newsletterId, options = {}) {
|
|
938
938
|
try {
|
|
@@ -956,25 +956,42 @@ class PostsStatsService {
|
|
|
956
956
|
const totalValue = totalResult[0] ? totalResult[0].total : 0;
|
|
957
957
|
const total = parseInt(String(totalValue), 10);
|
|
958
958
|
|
|
959
|
-
// Transform raw database results to
|
|
960
|
-
const
|
|
959
|
+
// Transform raw database results (daily changes) to cumulative values
|
|
960
|
+
const values = [];
|
|
961
|
+
let cumulativeTotal = 0;
|
|
962
|
+
|
|
963
|
+
// First pass: collect all daily changes from database
|
|
964
|
+
const dailyChanges = [];
|
|
961
965
|
for (const row of rawDeltas) {
|
|
962
966
|
if (row) {
|
|
963
967
|
// @ts-ignore
|
|
964
968
|
const dateValue = row.date || '';
|
|
965
969
|
// @ts-ignore
|
|
966
|
-
const
|
|
967
|
-
|
|
970
|
+
const changeValue = row.value || 0;
|
|
971
|
+
dailyChanges.push({
|
|
968
972
|
date: String(dateValue),
|
|
969
|
-
|
|
973
|
+
change: parseInt(String(changeValue), 10)
|
|
970
974
|
});
|
|
971
975
|
}
|
|
972
976
|
}
|
|
977
|
+
|
|
978
|
+
// Calculate the starting point by working backwards from the current total
|
|
979
|
+
const totalChange = dailyChanges.reduce((sum, item) => sum + item.change, 0);
|
|
980
|
+
cumulativeTotal = total - totalChange;
|
|
981
|
+
|
|
982
|
+
// Second pass: build cumulative values from daily changes
|
|
983
|
+
for (const dayData of dailyChanges) {
|
|
984
|
+
cumulativeTotal += dayData.change;
|
|
985
|
+
values.push({
|
|
986
|
+
date: dayData.date,
|
|
987
|
+
value: cumulativeTotal
|
|
988
|
+
});
|
|
989
|
+
}
|
|
973
990
|
|
|
974
991
|
return {
|
|
975
992
|
data: [{
|
|
976
993
|
total,
|
|
977
|
-
|
|
994
|
+
values
|
|
978
995
|
}]
|
|
979
996
|
};
|
|
980
997
|
} catch (error) {
|
|
@@ -982,7 +999,7 @@ class PostsStatsService {
|
|
|
982
999
|
return {
|
|
983
1000
|
data: [{
|
|
984
1001
|
total: 0,
|
|
985
|
-
|
|
1002
|
+
values: []
|
|
986
1003
|
}]
|
|
987
1004
|
};
|
|
988
1005
|
}
|
|
@@ -156,7 +156,7 @@ class StatsService {
|
|
|
156
156
|
|
|
157
157
|
// If no newsletterId is provided, we can't get specific stats
|
|
158
158
|
if (!newsletterId) {
|
|
159
|
-
return {data: [{total: 0,
|
|
159
|
+
return {data: [{total: 0, values: []}]};
|
|
160
160
|
}
|
|
161
161
|
|
|
162
162
|
const result = await this.posts.getNewsletterSubscriberStats(newsletterId, otherOptions);
|
|
@@ -212,7 +212,7 @@
|
|
|
212
212
|
},
|
|
213
213
|
"portal": {
|
|
214
214
|
"url": "https://cdn.jsdelivr.net/ghost/portal@~{version}/umd/portal.min.js",
|
|
215
|
-
"version": "2.
|
|
215
|
+
"version": "2.52"
|
|
216
216
|
},
|
|
217
217
|
"sodoSearch": {
|
|
218
218
|
"url": "https://cdn.jsdelivr.net/ghost/sodo-search@~{version}/umd/sodo-search.min.js",
|
|
@@ -229,7 +229,7 @@
|
|
|
229
229
|
},
|
|
230
230
|
"signupForm": {
|
|
231
231
|
"url": "https://cdn.jsdelivr.net/ghost/signup-form@~{version}/umd/signup-form.min.js",
|
|
232
|
-
"version": "0.
|
|
232
|
+
"version": "0.3"
|
|
233
233
|
},
|
|
234
234
|
"tenor": {
|
|
235
235
|
"googleApiKey": null,
|
package/core/shared/labs.js
CHANGED
package/ghost.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ghost",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.6",
|
|
4
4
|
"description": "The professional publishing platform",
|
|
5
5
|
"author": "Ghost Foundation",
|
|
6
6
|
"homepage": "https://ghost.org",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"@faker-js/faker": "7.6.0",
|
|
71
71
|
"@isaacs/ttlcache": "1.4.1",
|
|
72
72
|
"@sentry/node": "7.120.4",
|
|
73
|
-
"@slack/webhook": "7.0.
|
|
73
|
+
"@slack/webhook": "7.0.6",
|
|
74
74
|
"@tryghost/adapter-base-cache": "0.1.17",
|
|
75
75
|
"@tryghost/admin-api-schema": "4.5.10",
|
|
76
76
|
"@tryghost/api-framework": "1.0.2",
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
"@tryghost/helpers": "1.1.97",
|
|
87
87
|
"@tryghost/html-to-plaintext": "1.0.4",
|
|
88
88
|
"@tryghost/http-cache-utils": "0.1.20",
|
|
89
|
-
"@tryghost/i18n": "file:components/tryghost-i18n-6.0.
|
|
89
|
+
"@tryghost/i18n": "file:components/tryghost-i18n-6.0.6.tgz",
|
|
90
90
|
"@tryghost/image-transform": "1.4.6",
|
|
91
91
|
"@tryghost/job-manager": "1.0.3",
|
|
92
92
|
"@tryghost/kg-card-factory": "5.1.2",
|
|
@@ -161,7 +161,7 @@
|
|
|
161
161
|
"ghost-storage-base": "1.0.0",
|
|
162
162
|
"glob": "8.1.0",
|
|
163
163
|
"got": "11.8.6",
|
|
164
|
-
"gscan": "5.
|
|
164
|
+
"gscan": "5.1.0",
|
|
165
165
|
"handlebars": "4.7.8",
|
|
166
166
|
"heic-convert": "2.1.0",
|
|
167
167
|
"html-to-text": "5.1.1",
|
|
@@ -216,7 +216,7 @@
|
|
|
216
216
|
"superagent-throttle": "1.0.1",
|
|
217
217
|
"terser": "5.43.1",
|
|
218
218
|
"tiny-glob": "0.2.9",
|
|
219
|
-
"ua-parser-js": "1.0.
|
|
219
|
+
"ua-parser-js": "1.0.41",
|
|
220
220
|
"xml": "1.0.1"
|
|
221
221
|
},
|
|
222
222
|
"optionalDependencies": {
|
|
@@ -232,14 +232,14 @@
|
|
|
232
232
|
"@types/bookshelf": "1.2.9",
|
|
233
233
|
"@types/common-tags": "1.8.4",
|
|
234
234
|
"@types/jsonwebtoken": "9.0.10",
|
|
235
|
-
"@types/node": "22.
|
|
235
|
+
"@types/node": "22.18.0",
|
|
236
236
|
"@types/node-jose": "1.1.13",
|
|
237
|
-
"@types/nodemailer": "6.4.
|
|
237
|
+
"@types/nodemailer": "6.4.19",
|
|
238
238
|
"@types/sinon": "17.0.4",
|
|
239
239
|
"@types/supertest": "6.0.3",
|
|
240
240
|
"c8": "10.1.3",
|
|
241
241
|
"cli-progress": "3.12.0",
|
|
242
|
-
"cssnano": "7.1.
|
|
242
|
+
"cssnano": "7.1.1",
|
|
243
243
|
"detect-indent": "6.1.0",
|
|
244
244
|
"detect-newline": "3.1.0",
|
|
245
245
|
"expect": "29.7.0",
|
|
@@ -258,13 +258,13 @@
|
|
|
258
258
|
"parse-prometheus-text-format": "1.1.1",
|
|
259
259
|
"postcss": "8.5.6",
|
|
260
260
|
"postcss-cli": "11.0.1",
|
|
261
|
-
"rewire": "
|
|
261
|
+
"rewire": "8.0.0",
|
|
262
262
|
"should": "13.2.3",
|
|
263
263
|
"sinon": "18.0.1",
|
|
264
264
|
"supertest": "6.3.4",
|
|
265
265
|
"tmp": "0.2.3",
|
|
266
266
|
"toml": "3.0.0",
|
|
267
|
-
"tsx": "4.20.
|
|
267
|
+
"tsx": "4.20.5",
|
|
268
268
|
"typescript": "5.8.3"
|
|
269
269
|
},
|
|
270
270
|
"resolutions": {
|
|
@@ -273,7 +273,7 @@
|
|
|
273
273
|
"jackspeak": "2.3.6",
|
|
274
274
|
"moment": "2.24.0",
|
|
275
275
|
"moment-timezone": "0.5.45",
|
|
276
|
-
"@tryghost/i18n": "file:components/tryghost-i18n-6.0.
|
|
276
|
+
"@tryghost/i18n": "file:components/tryghost-i18n-6.0.6.tgz"
|
|
277
277
|
},
|
|
278
278
|
"nx": {
|
|
279
279
|
"targets": {
|