ghost 5.95.0 → 5.96.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.
Files changed (149) hide show
  1. package/components/tryghost-adapter-cache-memory-ttl-5.96.0.tgz +0 -0
  2. package/components/{tryghost-adapter-cache-redis-5.95.0.tgz → tryghost-adapter-cache-redis-5.96.0.tgz} +0 -0
  3. package/components/tryghost-adapter-manager-5.96.0.tgz +0 -0
  4. package/components/tryghost-announcement-bar-settings-5.96.0.tgz +0 -0
  5. package/components/{tryghost-api-framework-5.95.0.tgz → tryghost-api-framework-5.96.0.tgz} +0 -0
  6. package/components/tryghost-api-version-compatibility-service-5.96.0.tgz +0 -0
  7. package/components/tryghost-audience-feedback-5.96.0.tgz +0 -0
  8. package/components/{tryghost-bookshelf-repository-5.95.0.tgz → tryghost-bookshelf-repository-5.96.0.tgz} +0 -0
  9. package/components/tryghost-bootstrap-socket-5.96.0.tgz +0 -0
  10. package/components/{tryghost-collections-5.95.0.tgz → tryghost-collections-5.96.0.tgz} +0 -0
  11. package/components/{tryghost-constants-5.95.0.tgz → tryghost-constants-5.96.0.tgz} +0 -0
  12. package/components/{tryghost-custom-theme-settings-service-5.95.0.tgz → tryghost-custom-theme-settings-service-5.96.0.tgz} +0 -0
  13. package/components/{tryghost-data-generator-5.95.0.tgz → tryghost-data-generator-5.96.0.tgz} +0 -0
  14. package/components/{tryghost-domain-events-5.95.0.tgz → tryghost-domain-events-5.96.0.tgz} +0 -0
  15. package/components/{tryghost-donations-5.95.0.tgz → tryghost-donations-5.96.0.tgz} +0 -0
  16. package/components/tryghost-dynamic-routing-events-5.96.0.tgz +0 -0
  17. package/components/{tryghost-email-addresses-5.95.0.tgz → tryghost-email-addresses-5.96.0.tgz} +0 -0
  18. package/components/tryghost-email-analytics-provider-mailgun-5.96.0.tgz +0 -0
  19. package/components/{tryghost-email-analytics-service-5.95.0.tgz → tryghost-email-analytics-service-5.96.0.tgz} +0 -0
  20. package/components/tryghost-email-content-generator-5.96.0.tgz +0 -0
  21. package/components/{tryghost-email-events-5.95.0.tgz → tryghost-email-events-5.96.0.tgz} +0 -0
  22. package/components/{tryghost-email-service-5.95.0.tgz → tryghost-email-service-5.96.0.tgz} +0 -0
  23. package/components/{tryghost-email-suppression-list-5.95.0.tgz → tryghost-email-suppression-list-5.96.0.tgz} +0 -0
  24. package/components/tryghost-express-dynamic-redirects-5.96.0.tgz +0 -0
  25. package/components/{tryghost-external-media-inliner-5.95.0.tgz → tryghost-external-media-inliner-5.96.0.tgz} +0 -0
  26. package/components/tryghost-extract-api-key-5.96.0.tgz +0 -0
  27. package/components/tryghost-ghost-5.96.0.tgz +0 -0
  28. package/components/tryghost-html-to-plaintext-5.96.0.tgz +0 -0
  29. package/components/tryghost-i18n-5.96.0.tgz +0 -0
  30. package/components/{tryghost-importer-handler-content-files-5.95.0.tgz → tryghost-importer-handler-content-files-5.96.0.tgz} +0 -0
  31. package/components/{tryghost-importer-revue-5.95.0.tgz → tryghost-importer-revue-5.96.0.tgz} +0 -0
  32. package/components/tryghost-in-memory-repository-5.96.0.tgz +0 -0
  33. package/components/{tryghost-job-manager-5.95.0.tgz → tryghost-job-manager-5.96.0.tgz} +0 -0
  34. package/components/{tryghost-link-redirects-5.95.0.tgz → tryghost-link-redirects-5.96.0.tgz} +0 -0
  35. package/components/{tryghost-link-replacer-5.95.0.tgz → tryghost-link-replacer-5.96.0.tgz} +0 -0
  36. package/components/{tryghost-link-tracking-5.95.0.tgz → tryghost-link-tracking-5.96.0.tgz} +0 -0
  37. package/components/tryghost-magic-link-5.96.0.tgz +0 -0
  38. package/components/tryghost-mail-events-5.96.0.tgz +0 -0
  39. package/components/{tryghost-mailgun-client-5.95.0.tgz → tryghost-mailgun-client-5.96.0.tgz} +0 -0
  40. package/components/{tryghost-member-attribution-5.95.0.tgz → tryghost-member-attribution-5.96.0.tgz} +0 -0
  41. package/components/tryghost-member-events-5.96.0.tgz +0 -0
  42. package/components/{tryghost-members-api-5.95.0.tgz → tryghost-members-api-5.96.0.tgz} +0 -0
  43. package/components/tryghost-members-csv-5.96.0.tgz +0 -0
  44. package/components/{tryghost-members-events-service-5.95.0.tgz → tryghost-members-events-service-5.96.0.tgz} +0 -0
  45. package/components/tryghost-members-importer-5.96.0.tgz +0 -0
  46. package/components/{tryghost-members-offers-5.95.0.tgz → tryghost-members-offers-5.96.0.tgz} +0 -0
  47. package/components/tryghost-members-payments-5.96.0.tgz +0 -0
  48. package/components/{tryghost-members-ssr-5.95.0.tgz → tryghost-members-ssr-5.96.0.tgz} +0 -0
  49. package/components/tryghost-members-stripe-service-5.96.0.tgz +0 -0
  50. package/components/{tryghost-mentions-email-report-5.95.0.tgz → tryghost-mentions-email-report-5.96.0.tgz} +0 -0
  51. package/components/tryghost-metrics-server-5.96.0.tgz +0 -0
  52. package/components/{tryghost-milestones-5.95.0.tgz → tryghost-milestones-5.96.0.tgz} +0 -0
  53. package/components/tryghost-minifier-5.96.0.tgz +0 -0
  54. package/components/tryghost-model-to-domain-event-interceptor-5.96.0.tgz +0 -0
  55. package/components/tryghost-mw-api-version-mismatch-5.96.0.tgz +0 -0
  56. package/components/tryghost-mw-cache-control-5.96.0.tgz +0 -0
  57. package/components/tryghost-mw-error-handler-5.96.0.tgz +0 -0
  58. package/components/{tryghost-mw-session-from-token-5.95.0.tgz → tryghost-mw-session-from-token-5.96.0.tgz} +0 -0
  59. package/components/tryghost-mw-update-user-last-seen-5.96.0.tgz +0 -0
  60. package/components/{tryghost-mw-version-match-5.95.0.tgz → tryghost-mw-version-match-5.96.0.tgz} +0 -0
  61. package/components/{tryghost-mw-vhost-5.95.0.tgz → tryghost-mw-vhost-5.96.0.tgz} +0 -0
  62. package/components/tryghost-nql-filter-expansions-5.96.0.tgz +0 -0
  63. package/components/{tryghost-oembed-service-5.95.0.tgz → tryghost-oembed-service-5.96.0.tgz} +0 -0
  64. package/components/tryghost-package-json-5.96.0.tgz +0 -0
  65. package/components/{tryghost-post-events-5.95.0.tgz → tryghost-post-events-5.96.0.tgz} +0 -0
  66. package/components/{tryghost-post-revisions-5.95.0.tgz → tryghost-post-revisions-5.96.0.tgz} +0 -0
  67. package/components/tryghost-posts-service-5.96.0.tgz +0 -0
  68. package/components/{tryghost-recommendations-5.95.0.tgz → tryghost-recommendations-5.96.0.tgz} +0 -0
  69. package/components/tryghost-referrers-5.96.0.tgz +0 -0
  70. package/components/{tryghost-security-5.95.0.tgz → tryghost-security-5.96.0.tgz} +0 -0
  71. package/components/{tryghost-session-service-5.95.0.tgz → tryghost-session-service-5.96.0.tgz} +0 -0
  72. package/components/tryghost-settings-path-manager-5.96.0.tgz +0 -0
  73. package/components/tryghost-slack-notifications-5.96.0.tgz +0 -0
  74. package/components/{tryghost-staff-service-5.95.0.tgz → tryghost-staff-service-5.96.0.tgz} +0 -0
  75. package/components/{tryghost-stats-service-5.95.0.tgz → tryghost-stats-service-5.96.0.tgz} +0 -0
  76. package/components/{tryghost-tiers-5.95.0.tgz → tryghost-tiers-5.96.0.tgz} +0 -0
  77. package/components/{tryghost-update-check-service-5.95.0.tgz → tryghost-update-check-service-5.96.0.tgz} +0 -0
  78. package/components/tryghost-verification-trigger-5.96.0.tgz +0 -0
  79. package/components/{tryghost-version-notifications-data-service-5.95.0.tgz → tryghost-version-notifications-data-service-5.96.0.tgz} +0 -0
  80. package/components/{tryghost-webmentions-5.95.0.tgz → tryghost-webmentions-5.96.0.tgz} +0 -0
  81. package/core/boot.js +43 -0
  82. package/core/built/admin/assets/admin-x-activitypub/admin-x-activitypub.js +3 -3
  83. package/core/built/admin/assets/admin-x-activitypub/{index-6868a2ce.mjs → index-043cbe5c.mjs} +4330 -3780
  84. package/core/built/admin/assets/admin-x-activitypub/modals-39d50cfc.mjs +250 -0
  85. package/core/built/admin/assets/admin-x-demo/admin-x-demo.js +1 -1
  86. package/core/built/admin/assets/admin-x-demo/{index-2575d977.mjs → index-3d57e7aa.mjs} +766 -762
  87. package/core/built/admin/assets/admin-x-demo/{modals-3cdb55d2.mjs → modals-191eb359.mjs} +2 -2
  88. package/core/built/admin/assets/admin-x-settings/{CodeEditorView-c5fded51.mjs → CodeEditorView-ef508830.mjs} +2 -2
  89. package/core/built/admin/assets/admin-x-settings/admin-x-settings.js +1 -1
  90. package/core/built/admin/assets/admin-x-settings/{index-b78b238b.mjs → index-9a5b6317.mjs} +2 -2
  91. package/core/built/admin/assets/admin-x-settings/{index-baad1fa3.mjs → index-fb425884.mjs} +2915 -2911
  92. package/core/built/admin/assets/admin-x-settings/{modals-d557f15c.mjs → modals-12992e35.mjs} +3 -3
  93. package/core/built/admin/assets/chunk.524.c8d208efb3cca58fb564.js +35 -0
  94. package/core/built/admin/assets/{chunk.582.57a31e68e4e9afe84109.js → chunk.582.e1e1c593838cdd38970d.js} +6 -6
  95. package/core/built/admin/assets/{chunk.602.a3d38ba0a516decd78ce.js → chunk.874.2b603e6adcf3c2e9788c.js} +2667 -2634
  96. package/core/built/admin/assets/ghost-0c7839fc6bdbca9bf08a2c1291159903.css +1 -0
  97. package/core/built/admin/assets/{ghost-9397fa4c9aadec9cff772a6d4db6b1f8.js → ghost-6720b11b60bbdb3abbd6b3b5dd314d5d.js} +67 -63
  98. package/core/built/admin/assets/ghost-dark-40f095a0e0507e24e12b4bd7dd6bb5d5.css +1 -0
  99. package/core/built/admin/assets/{vendor-b83f61eee071be0ef00075df9ff7782d.js → vendor-88cd9f5cf5eba65221e2d2a636531eaa.js} +19 -17
  100. package/core/built/admin/index.html +6 -6
  101. package/core/frontend/helpers/content_api_key.js +19 -0
  102. package/core/server/data/schema/schema.js +2 -2
  103. package/core/shared/config/defaults.json +4 -4
  104. package/core/shared/config/env/config.testing-browser.json +3 -0
  105. package/core/shared/config/env/config.testing-mysql.json +3 -0
  106. package/core/shared/config/env/config.testing.json +3 -0
  107. package/core/shared/prometheus-client.js +36 -0
  108. package/package.json +151 -148
  109. package/yarn.lock +382 -223
  110. package/components/tryghost-adapter-cache-memory-ttl-5.95.0.tgz +0 -0
  111. package/components/tryghost-adapter-manager-5.95.0.tgz +0 -0
  112. package/components/tryghost-announcement-bar-settings-5.95.0.tgz +0 -0
  113. package/components/tryghost-api-version-compatibility-service-5.95.0.tgz +0 -0
  114. package/components/tryghost-audience-feedback-5.95.0.tgz +0 -0
  115. package/components/tryghost-bootstrap-socket-5.95.0.tgz +0 -0
  116. package/components/tryghost-dynamic-routing-events-5.95.0.tgz +0 -0
  117. package/components/tryghost-email-analytics-provider-mailgun-5.95.0.tgz +0 -0
  118. package/components/tryghost-email-content-generator-5.95.0.tgz +0 -0
  119. package/components/tryghost-express-dynamic-redirects-5.95.0.tgz +0 -0
  120. package/components/tryghost-extract-api-key-5.95.0.tgz +0 -0
  121. package/components/tryghost-ghost-5.95.0.tgz +0 -0
  122. package/components/tryghost-html-to-plaintext-5.95.0.tgz +0 -0
  123. package/components/tryghost-i18n-5.95.0.tgz +0 -0
  124. package/components/tryghost-in-memory-repository-5.95.0.tgz +0 -0
  125. package/components/tryghost-magic-link-5.95.0.tgz +0 -0
  126. package/components/tryghost-mail-events-5.95.0.tgz +0 -0
  127. package/components/tryghost-member-events-5.95.0.tgz +0 -0
  128. package/components/tryghost-members-csv-5.95.0.tgz +0 -0
  129. package/components/tryghost-members-importer-5.95.0.tgz +0 -0
  130. package/components/tryghost-members-payments-5.95.0.tgz +0 -0
  131. package/components/tryghost-members-stripe-service-5.95.0.tgz +0 -0
  132. package/components/tryghost-minifier-5.95.0.tgz +0 -0
  133. package/components/tryghost-model-to-domain-event-interceptor-5.95.0.tgz +0 -0
  134. package/components/tryghost-mw-api-version-mismatch-5.95.0.tgz +0 -0
  135. package/components/tryghost-mw-cache-control-5.95.0.tgz +0 -0
  136. package/components/tryghost-mw-error-handler-5.95.0.tgz +0 -0
  137. package/components/tryghost-mw-update-user-last-seen-5.95.0.tgz +0 -0
  138. package/components/tryghost-nql-filter-expansions-5.95.0.tgz +0 -0
  139. package/components/tryghost-package-json-5.95.0.tgz +0 -0
  140. package/components/tryghost-posts-service-5.95.0.tgz +0 -0
  141. package/components/tryghost-referrers-5.95.0.tgz +0 -0
  142. package/components/tryghost-settings-path-manager-5.95.0.tgz +0 -0
  143. package/components/tryghost-slack-notifications-5.95.0.tgz +0 -0
  144. package/components/tryghost-verification-trigger-5.95.0.tgz +0 -0
  145. package/core/built/admin/assets/admin-x-activitypub/modals-d56ac37e.mjs +0 -342
  146. package/core/built/admin/assets/chunk.524.d49d5b3795688b5f880d.js +0 -35
  147. package/core/built/admin/assets/ghost-8f07a67edb1191d1cdddd8a296bbdc4d.css +0 -1
  148. package/core/built/admin/assets/ghost-dark-fe1f347ef1a04509da6bbac199a51d23.css +0 -1
  149. /package/core/built/admin/assets/{chunk.602.a3d38ba0a516decd78ce.js.LICENSE.txt → chunk.874.2b603e6adcf3c2e9788c.js.LICENSE.txt} +0 -0
package/core/boot.js CHANGED
@@ -253,6 +253,42 @@ async function initExpressApps({frontend, backend, config}) {
253
253
  return parentApp;
254
254
  }
255
255
 
256
+ /**
257
+ * Initialize prometheus client
258
+ */
259
+ function initPrometheusClient({config}) {
260
+ if (config.get('metrics_server:enabled')) {
261
+ debug('Begin: initPrometheusClient');
262
+ const prometheusClient = require('./shared/prometheus-client');
263
+ debug('End: initPrometheusClient');
264
+ return prometheusClient;
265
+ }
266
+ return null;
267
+ }
268
+
269
+ /**
270
+ * Starts the standalone metrics server and registers a cleanup task to stop it when the ghost server shuts down
271
+ * @param {object} ghostServer
272
+ */
273
+ async function initMetricsServer({prometheusClient, ghostServer, config}) {
274
+ debug('Begin: initMetricsServer');
275
+ if (ghostServer && config.get('metrics_server:enabled')) {
276
+ const {MetricsServer} = require('@tryghost/metrics-server');
277
+ const serverConfig = {
278
+ host: config.get('metrics_server:host') || '127.0.0.1',
279
+ port: config.get('metrics_server:port') || 9416
280
+ };
281
+ const handler = prometheusClient.handleMetricsRequest.bind(prometheusClient);
282
+ const metricsServer = new MetricsServer({serverConfig, handler});
283
+ await metricsServer.start();
284
+ // Ensure the metrics server is cleaned up when the ghost server is shut down
285
+ ghostServer.registerCleanupTask(async () => {
286
+ await metricsServer.shutdown();
287
+ });
288
+ }
289
+ debug('End: initMetricsServer');
290
+ }
291
+
256
292
  /**
257
293
  * Dynamic routing is generated from the routes.yaml file
258
294
  * When Ghost's DB and core are loaded, we can access this file and call routing.routingManager.start
@@ -515,6 +551,10 @@ async function bootGhost({backend = true, frontend = true, server = true} = {})
515
551
  const sentry = require('./shared/sentry');
516
552
  debug('End: Load sentry');
517
553
 
554
+ // Initialize prometheus client early to enable metrics collection during boot
555
+ // Note: this does not start the metrics server yet to avoid increasing boot time
556
+ const prometheusClient = initPrometheusClient({config});
557
+
518
558
  // Step 2 - Start server with minimal app in global maintenance mode
519
559
  debug('Begin: load server + minimal app');
520
560
  const rootApp = require('./app')();
@@ -583,6 +623,9 @@ async function bootGhost({backend = true, frontend = true, server = true} = {})
583
623
  // Step 7 - Init our background services, we don't wait for this to finish
584
624
  initBackgroundServices({config});
585
625
 
626
+ // Step 8 - Init our metrics server, we don't wait for this to finish
627
+ initMetricsServer({prometheusClient, ghostServer, config});
628
+
586
629
  // If we pass the env var, kill Ghost
587
630
  if (process.env.GHOST_CI_SHUTDOWN_AFTER_BOOT) {
588
631
  process.exit(0);