ghost 5.94.0 → 5.94.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.
Files changed (153) hide show
  1. package/components/tryghost-adapter-cache-memory-ttl-5.94.1.tgz +0 -0
  2. package/components/tryghost-adapter-cache-redis-5.94.1.tgz +0 -0
  3. package/components/{tryghost-adapter-manager-5.94.0.tgz → tryghost-adapter-manager-5.94.1.tgz} +0 -0
  4. package/components/tryghost-announcement-bar-settings-5.94.1.tgz +0 -0
  5. package/components/{tryghost-api-framework-5.94.0.tgz → tryghost-api-framework-5.94.1.tgz} +0 -0
  6. package/components/{tryghost-api-version-compatibility-service-5.94.0.tgz → tryghost-api-version-compatibility-service-5.94.1.tgz} +0 -0
  7. package/components/tryghost-audience-feedback-5.94.1.tgz +0 -0
  8. package/components/tryghost-bookshelf-repository-5.94.1.tgz +0 -0
  9. package/components/tryghost-bootstrap-socket-5.94.1.tgz +0 -0
  10. package/components/tryghost-collections-5.94.1.tgz +0 -0
  11. package/components/tryghost-constants-5.94.1.tgz +0 -0
  12. package/components/{tryghost-custom-theme-settings-service-5.94.0.tgz → tryghost-custom-theme-settings-service-5.94.1.tgz} +0 -0
  13. package/components/{tryghost-data-generator-5.94.0.tgz → tryghost-data-generator-5.94.1.tgz} +0 -0
  14. package/components/tryghost-domain-events-5.94.1.tgz +0 -0
  15. package/components/tryghost-donations-5.94.1.tgz +0 -0
  16. package/components/{tryghost-dynamic-routing-events-5.94.0.tgz → tryghost-dynamic-routing-events-5.94.1.tgz} +0 -0
  17. package/components/tryghost-email-addresses-5.94.1.tgz +0 -0
  18. package/components/{tryghost-email-analytics-provider-mailgun-5.94.0.tgz → tryghost-email-analytics-provider-mailgun-5.94.1.tgz} +0 -0
  19. package/components/{tryghost-email-analytics-service-5.94.0.tgz → tryghost-email-analytics-service-5.94.1.tgz} +0 -0
  20. package/components/{tryghost-email-content-generator-5.94.0.tgz → tryghost-email-content-generator-5.94.1.tgz} +0 -0
  21. package/components/{tryghost-email-events-5.94.0.tgz → tryghost-email-events-5.94.1.tgz} +0 -0
  22. package/components/{tryghost-email-service-5.94.0.tgz → tryghost-email-service-5.94.1.tgz} +0 -0
  23. package/components/tryghost-email-suppression-list-5.94.1.tgz +0 -0
  24. package/components/{tryghost-express-dynamic-redirects-5.94.0.tgz → tryghost-express-dynamic-redirects-5.94.1.tgz} +0 -0
  25. package/components/{tryghost-external-media-inliner-5.94.0.tgz → tryghost-external-media-inliner-5.94.1.tgz} +0 -0
  26. package/components/tryghost-extract-api-key-5.94.1.tgz +0 -0
  27. package/components/tryghost-ghost-5.94.1.tgz +0 -0
  28. package/components/tryghost-html-to-plaintext-5.94.1.tgz +0 -0
  29. package/components/tryghost-i18n-5.94.1.tgz +0 -0
  30. package/components/{tryghost-importer-handler-content-files-5.94.0.tgz → tryghost-importer-handler-content-files-5.94.1.tgz} +0 -0
  31. package/components/{tryghost-importer-revue-5.94.0.tgz → tryghost-importer-revue-5.94.1.tgz} +0 -0
  32. package/components/tryghost-in-memory-repository-5.94.1.tgz +0 -0
  33. package/components/{tryghost-job-manager-5.94.0.tgz → tryghost-job-manager-5.94.1.tgz} +0 -0
  34. package/components/tryghost-link-redirects-5.94.1.tgz +0 -0
  35. package/components/tryghost-link-replacer-5.94.1.tgz +0 -0
  36. package/components/{tryghost-link-tracking-5.94.0.tgz → tryghost-link-tracking-5.94.1.tgz} +0 -0
  37. package/components/{tryghost-magic-link-5.94.0.tgz → tryghost-magic-link-5.94.1.tgz} +0 -0
  38. package/components/{tryghost-mail-events-5.94.0.tgz → tryghost-mail-events-5.94.1.tgz} +0 -0
  39. package/components/tryghost-mailgun-client-5.94.1.tgz +0 -0
  40. package/components/{tryghost-member-attribution-5.94.0.tgz → tryghost-member-attribution-5.94.1.tgz} +0 -0
  41. package/components/{tryghost-member-events-5.94.0.tgz → tryghost-member-events-5.94.1.tgz} +0 -0
  42. package/components/tryghost-members-api-5.94.1.tgz +0 -0
  43. package/components/tryghost-members-csv-5.94.1.tgz +0 -0
  44. package/components/tryghost-members-events-service-5.94.1.tgz +0 -0
  45. package/components/{tryghost-members-importer-5.94.0.tgz → tryghost-members-importer-5.94.1.tgz} +0 -0
  46. package/components/tryghost-members-offers-5.94.1.tgz +0 -0
  47. package/components/tryghost-members-payments-5.94.1.tgz +0 -0
  48. package/components/tryghost-members-ssr-5.94.1.tgz +0 -0
  49. package/components/tryghost-members-stripe-service-5.94.1.tgz +0 -0
  50. package/components/{tryghost-mentions-email-report-5.94.0.tgz → tryghost-mentions-email-report-5.94.1.tgz} +0 -0
  51. package/components/{tryghost-milestones-5.94.0.tgz → tryghost-milestones-5.94.1.tgz} +0 -0
  52. package/components/{tryghost-minifier-5.94.0.tgz → tryghost-minifier-5.94.1.tgz} +0 -0
  53. package/components/tryghost-model-to-domain-event-interceptor-5.94.1.tgz +0 -0
  54. package/components/{tryghost-mw-api-version-mismatch-5.94.0.tgz → tryghost-mw-api-version-mismatch-5.94.1.tgz} +0 -0
  55. package/components/tryghost-mw-cache-control-5.94.1.tgz +0 -0
  56. package/components/tryghost-mw-error-handler-5.94.1.tgz +0 -0
  57. package/components/tryghost-mw-session-from-token-5.94.1.tgz +0 -0
  58. package/components/{tryghost-mw-update-user-last-seen-5.94.0.tgz → tryghost-mw-update-user-last-seen-5.94.1.tgz} +0 -0
  59. package/components/{tryghost-mw-version-match-5.94.0.tgz → tryghost-mw-version-match-5.94.1.tgz} +0 -0
  60. package/components/{tryghost-mw-vhost-5.94.0.tgz → tryghost-mw-vhost-5.94.1.tgz} +0 -0
  61. package/components/tryghost-nql-filter-expansions-5.94.1.tgz +0 -0
  62. package/components/{tryghost-oembed-service-5.94.0.tgz → tryghost-oembed-service-5.94.1.tgz} +0 -0
  63. package/components/{tryghost-package-json-5.94.0.tgz → tryghost-package-json-5.94.1.tgz} +0 -0
  64. package/components/tryghost-post-events-5.94.1.tgz +0 -0
  65. package/components/{tryghost-post-revisions-5.94.0.tgz → tryghost-post-revisions-5.94.1.tgz} +0 -0
  66. package/components/{tryghost-posts-service-5.94.0.tgz → tryghost-posts-service-5.94.1.tgz} +0 -0
  67. package/components/tryghost-recommendations-5.94.1.tgz +0 -0
  68. package/components/tryghost-referrers-5.94.1.tgz +0 -0
  69. package/components/{tryghost-security-5.94.0.tgz → tryghost-security-5.94.1.tgz} +0 -0
  70. package/components/tryghost-session-service-5.94.1.tgz +0 -0
  71. package/components/{tryghost-settings-path-manager-5.94.0.tgz → tryghost-settings-path-manager-5.94.1.tgz} +0 -0
  72. package/components/tryghost-slack-notifications-5.94.1.tgz +0 -0
  73. package/components/{tryghost-staff-service-5.94.0.tgz → tryghost-staff-service-5.94.1.tgz} +0 -0
  74. package/components/{tryghost-stats-service-5.94.0.tgz → tryghost-stats-service-5.94.1.tgz} +0 -0
  75. package/components/{tryghost-tiers-5.94.0.tgz → tryghost-tiers-5.94.1.tgz} +0 -0
  76. package/components/tryghost-update-check-service-5.94.1.tgz +0 -0
  77. package/components/{tryghost-verification-trigger-5.94.0.tgz → tryghost-verification-trigger-5.94.1.tgz} +0 -0
  78. package/components/tryghost-version-notifications-data-service-5.94.1.tgz +0 -0
  79. package/components/tryghost-webmentions-5.94.1.tgz +0 -0
  80. package/core/built/admin/assets/admin-x-activitypub/admin-x-activitypub.js +2 -2
  81. package/core/built/admin/assets/admin-x-activitypub/{index-51277f76.mjs → index-bf902976.mjs} +3572 -3425
  82. package/core/built/admin/assets/admin-x-activitypub/{modals-c85985ad.mjs → modals-b1995907.mjs} +2 -2
  83. package/core/built/admin/assets/admin-x-demo/admin-x-demo.js +1 -1
  84. package/core/built/admin/assets/admin-x-demo/{index-bfbb9783.mjs → index-b29b8d8c.mjs} +812 -808
  85. package/core/built/admin/assets/admin-x-demo/{modals-334b160e.mjs → modals-7ad4170c.mjs} +2 -2
  86. package/core/built/admin/assets/admin-x-settings/{CodeEditorView-6bb10ebd.mjs → CodeEditorView-6983f018.mjs} +2 -2
  87. package/core/built/admin/assets/admin-x-settings/admin-x-settings.js +2 -2
  88. package/core/built/admin/assets/admin-x-settings/{index-52f09138.mjs → index-4d470f8e.mjs} +2 -2
  89. package/core/built/admin/assets/admin-x-settings/{index-a57eb33d.mjs → index-b62da964.mjs} +1900 -1892
  90. package/core/built/admin/assets/admin-x-settings/{modals-07c66c7d.mjs → modals-3083b8bf.mjs} +115 -114
  91. package/core/built/admin/assets/{chunk.524.b9da8e9c62fc112baf2b.js → chunk.524.846f0087859e8da09f30.js} +5 -5
  92. package/core/built/admin/assets/{chunk.582.27ddbcbd7a6e7a439db8.js → chunk.582.f57480cae0723ba6ce02.js} +6 -6
  93. package/core/built/admin/assets/{chunk.785.78610bd253a9e2419ec9.js → chunk.785.1cf095d594cd27c9036e.js} +53 -45
  94. package/core/built/admin/assets/{ghost-535088daf62c8cbea78a012bb6bbafc6.js → ghost-492e8f36dfc460b4f2228259c27a1711.js} +153 -145
  95. package/core/built/admin/assets/{ghost-d1c51d3a2d840dda5aa7b4ffe6057756.css → ghost-81adcc22c7836b40b08a662812319e01.css} +1 -1
  96. package/core/built/admin/assets/{ghost-dark-98b3a7e593292a7cb410609e17727a3c.css → ghost-dark-88c10b0aa259d4b666d6a98174c6f5bd.css} +1 -1
  97. package/core/built/admin/index.html +5 -5
  98. package/core/server/data/importer/import-manager.js +2 -2
  99. package/core/server/data/importer/importers/data/PostsImporter.js +2 -2
  100. package/core/server/data/migrations/versions/4.46/2022-04-13-12-58-fill-uuid-for-newsletters.js +2 -2
  101. package/core/server/data/migrations/versions/4.46/2022-04-13-13-00-add-default-newsletter.js +2 -2
  102. package/core/server/models/email.js +2 -2
  103. package/core/server/models/member.js +3 -3
  104. package/core/server/models/newsletter.js +2 -2
  105. package/core/server/models/post.js +2 -2
  106. package/core/server/models/settings.js +1 -2
  107. package/core/server/services/members-events/index.js +20 -2
  108. package/core/server/web/parent/middleware/request-id.js +2 -2
  109. package/core/shared/labs.js +2 -1
  110. package/core/shared/settings-cache/public.js +2 -1
  111. package/package.json +151 -152
  112. package/yarn.lock +248 -137
  113. package/components/tryghost-adapter-cache-memory-ttl-5.94.0.tgz +0 -0
  114. package/components/tryghost-adapter-cache-redis-5.94.0.tgz +0 -0
  115. package/components/tryghost-announcement-bar-settings-5.94.0.tgz +0 -0
  116. package/components/tryghost-audience-feedback-5.94.0.tgz +0 -0
  117. package/components/tryghost-bookshelf-repository-5.94.0.tgz +0 -0
  118. package/components/tryghost-bootstrap-socket-5.94.0.tgz +0 -0
  119. package/components/tryghost-collections-5.94.0.tgz +0 -0
  120. package/components/tryghost-constants-5.94.0.tgz +0 -0
  121. package/components/tryghost-domain-events-5.94.0.tgz +0 -0
  122. package/components/tryghost-donations-5.94.0.tgz +0 -0
  123. package/components/tryghost-email-addresses-5.94.0.tgz +0 -0
  124. package/components/tryghost-email-suppression-list-5.94.0.tgz +0 -0
  125. package/components/tryghost-extract-api-key-5.94.0.tgz +0 -0
  126. package/components/tryghost-ghost-5.94.0.tgz +0 -0
  127. package/components/tryghost-html-to-plaintext-5.94.0.tgz +0 -0
  128. package/components/tryghost-i18n-5.94.0.tgz +0 -0
  129. package/components/tryghost-in-memory-repository-5.94.0.tgz +0 -0
  130. package/components/tryghost-link-redirects-5.94.0.tgz +0 -0
  131. package/components/tryghost-link-replacer-5.94.0.tgz +0 -0
  132. package/components/tryghost-mailgun-client-5.94.0.tgz +0 -0
  133. package/components/tryghost-members-api-5.94.0.tgz +0 -0
  134. package/components/tryghost-members-csv-5.94.0.tgz +0 -0
  135. package/components/tryghost-members-events-service-5.94.0.tgz +0 -0
  136. package/components/tryghost-members-offers-5.94.0.tgz +0 -0
  137. package/components/tryghost-members-payments-5.94.0.tgz +0 -0
  138. package/components/tryghost-members-ssr-5.94.0.tgz +0 -0
  139. package/components/tryghost-members-stripe-service-5.94.0.tgz +0 -0
  140. package/components/tryghost-model-to-domain-event-interceptor-5.94.0.tgz +0 -0
  141. package/components/tryghost-mw-cache-control-5.94.0.tgz +0 -0
  142. package/components/tryghost-mw-error-handler-5.94.0.tgz +0 -0
  143. package/components/tryghost-mw-session-from-token-5.94.0.tgz +0 -0
  144. package/components/tryghost-nql-filter-expansions-5.94.0.tgz +0 -0
  145. package/components/tryghost-post-events-5.94.0.tgz +0 -0
  146. package/components/tryghost-recommendations-5.94.0.tgz +0 -0
  147. package/components/tryghost-referrers-5.94.0.tgz +0 -0
  148. package/components/tryghost-session-service-5.94.0.tgz +0 -0
  149. package/components/tryghost-slack-notifications-5.94.0.tgz +0 -0
  150. package/components/tryghost-update-check-service-5.94.0.tgz +0 -0
  151. package/components/tryghost-version-notifications-data-service-5.94.0.tgz +0 -0
  152. package/components/tryghost-webmentions-5.94.0.tgz +0 -0
  153. /package/core/built/admin/assets/{chunk.785.78610bd253a9e2419ec9.js.LICENSE.txt → chunk.785.1cf095d594cd27c9036e.js.LICENSE.txt} +0 -0
@@ -8,7 +8,7 @@
8
8
  <title>Ghost Admin</title>
9
9
 
10
10
 
11
- <meta name="ghost-admin/config/environment" content="%7B%22modulePrefix%22%3A%22ghost-admin%22%2C%22environment%22%3A%22production%22%2C%22cdnUrl%22%3A%22%22%2C%22editorUrl%22%3A%22%22%2C%22rootURL%22%3A%22%22%2C%22locationType%22%3A%22trailing-hash%22%2C%22EmberENV%22%3A%7B%22FEATURES%22%3A%7B%7D%2C%22EXTEND_PROTOTYPES%22%3A%7B%22Date%22%3Afalse%2C%22Array%22%3Atrue%2C%22String%22%3Atrue%2C%22Function%22%3Afalse%7D%2C%22_APPLICATION_TEMPLATE_WRAPPER%22%3Afalse%2C%22_JQUERY_INTEGRATION%22%3Atrue%2C%22_TEMPLATE_ONLY_GLIMMER_COMPONENTS%22%3Atrue%7D%2C%22APP%22%3A%7B%22version%22%3A%225.94%22%2C%22name%22%3A%22ghost-admin%22%7D%2C%22ember-simple-auth%22%3A%7B%7D%2C%22%40sentry%2Fember%22%3A%7B%22disablePerformance%22%3Atrue%2C%22sentry%22%3A%7B%7D%7D%2C%22ember-cli-mirage%22%3A%7B%22usingProxy%22%3Afalse%2C%22useDefaultPassthroughs%22%3Atrue%7D%2C%22exportApplicationGlobal%22%3Afalse%2C%22ember-load%22%3A%7B%22loadingIndicatorClass%22%3A%22ember-load-indicator%22%7D%2C%22editorFilename%22%3A%22koenig-lexical.umd.js%22%2C%22editorHash%22%3A%226239fc6ccd%22%2C%22adminXDemoFilename%22%3A%22admin-x-demo.js%22%2C%22adminXDemoHash%22%3A%220f930972a7%22%2C%22adminXSettingsFilename%22%3A%22admin-x-settings.js%22%2C%22adminXSettingsHash%22%3A%221264c822b3%22%2C%22adminXActivitypubFilename%22%3A%22admin-x-activitypub.js%22%2C%22adminXActivitypubHash%22%3A%229aa7d7e927%22%7D" />
11
+ <meta name="ghost-admin/config/environment" content="%7B%22modulePrefix%22%3A%22ghost-admin%22%2C%22environment%22%3A%22production%22%2C%22cdnUrl%22%3A%22%22%2C%22editorUrl%22%3A%22%22%2C%22rootURL%22%3A%22%22%2C%22locationType%22%3A%22trailing-hash%22%2C%22EmberENV%22%3A%7B%22FEATURES%22%3A%7B%7D%2C%22EXTEND_PROTOTYPES%22%3A%7B%22Date%22%3Afalse%2C%22Array%22%3Atrue%2C%22String%22%3Atrue%2C%22Function%22%3Afalse%7D%2C%22_APPLICATION_TEMPLATE_WRAPPER%22%3Afalse%2C%22_JQUERY_INTEGRATION%22%3Atrue%2C%22_TEMPLATE_ONLY_GLIMMER_COMPONENTS%22%3Atrue%7D%2C%22APP%22%3A%7B%22version%22%3A%225.94%22%2C%22name%22%3A%22ghost-admin%22%7D%2C%22ember-simple-auth%22%3A%7B%7D%2C%22%40sentry%2Fember%22%3A%7B%22disablePerformance%22%3Atrue%2C%22sentry%22%3A%7B%7D%7D%2C%22ember-cli-mirage%22%3A%7B%22usingProxy%22%3Afalse%2C%22useDefaultPassthroughs%22%3Atrue%7D%2C%22exportApplicationGlobal%22%3Afalse%2C%22ember-load%22%3A%7B%22loadingIndicatorClass%22%3A%22ember-load-indicator%22%7D%2C%22editorFilename%22%3A%22koenig-lexical.umd.js%22%2C%22editorHash%22%3A%226239fc6ccd%22%2C%22adminXDemoFilename%22%3A%22admin-x-demo.js%22%2C%22adminXDemoHash%22%3A%228b99c7b505%22%2C%22adminXSettingsFilename%22%3A%22admin-x-settings.js%22%2C%22adminXSettingsHash%22%3A%22a6659cb218%22%2C%22adminXActivitypubFilename%22%3A%22admin-x-activitypub.js%22%2C%22adminXActivitypubHash%22%3A%2205afab033a%22%7D" />
12
12
 
13
13
  <meta name="HandheldFriendly" content="True" />
14
14
  <meta name="MobileOptimized" content="320" />
@@ -37,7 +37,7 @@
37
37
  </style>
38
38
 
39
39
  <link integrity="" rel="stylesheet" href="assets/vendor-0ede59da8efb5e28fa929557f7ff7154.css">
40
- <link integrity="" rel="stylesheet" href="assets/ghost-d1c51d3a2d840dda5aa7b4ffe6057756.css" title="light">
40
+ <link integrity="" rel="stylesheet" href="assets/ghost-81adcc22c7836b40b08a662812319e01.css" title="light">
41
41
 
42
42
 
43
43
  </head>
@@ -57,8 +57,8 @@
57
57
  <div id="ember-basic-dropdown-wormhole"></div>
58
58
 
59
59
  <script src="assets/vendor-649dc64bfd9ecc1bd7361b53680dfdc2.js"></script>
60
- <script src="assets/chunk.785.78610bd253a9e2419ec9.js"></script>
61
- <script src="assets/chunk.524.b9da8e9c62fc112baf2b.js"></script>
62
- <script src="assets/ghost-535088daf62c8cbea78a012bb6bbafc6.js"></script>
60
+ <script src="assets/chunk.785.1cf095d594cd27c9036e.js"></script>
61
+ <script src="assets/chunk.524.846f0087859e8da09f30.js"></script>
62
+ <script src="assets/ghost-492e8f36dfc460b4f2228259c27a1711.js"></script>
63
63
  </body>
64
64
  </html>
@@ -3,7 +3,7 @@ const fs = require('fs-extra');
3
3
  const path = require('path');
4
4
  const os = require('os');
5
5
  const glob = require('glob');
6
- const uuid = require('uuid');
6
+ const crypto = require('crypto');
7
7
  const config = require('../../../shared/config');
8
8
  const {extract} = require('@tryghost/zip');
9
9
  const tpl = require('@tryghost/tpl');
@@ -220,7 +220,7 @@ class ImportManager {
220
220
  * @returns {Promise<string>} full path to the extracted folder
221
221
  */
222
222
  async extractZip(filePath) {
223
- const tmpDir = path.join(os.tmpdir(), uuid.v4());
223
+ const tmpDir = path.join(os.tmpdir(), crypto.randomUUID());
224
224
  this.fileToDelete = tmpDir;
225
225
 
226
226
  try {
@@ -1,6 +1,6 @@
1
1
  const debug = require('@tryghost/debug')('importer:posts');
2
2
  const _ = require('lodash');
3
- const uuid = require('uuid');
3
+ const crypto = require('crypto');
4
4
  const BaseImporter = require('./Base');
5
5
  const mobiledocLib = require('../../../../lib/mobiledoc');
6
6
  const validator = require('@tryghost/validator');
@@ -29,7 +29,7 @@ class PostsImporter extends BaseImporter {
29
29
  sanitizeAttributes() {
30
30
  _.each(this.dataToImport, (obj) => {
31
31
  if (!validator.isUUID(obj.uuid || '')) {
32
- obj.uuid = uuid.v4();
32
+ obj.uuid = crypto.randomUUID();
33
33
  }
34
34
 
35
35
  // we used to have post.page=true/false
@@ -1,5 +1,5 @@
1
1
  const logging = require('@tryghost/logging');
2
- const uuid = require('uuid');
2
+ const crypto = require('crypto');
3
3
  const {createTransactionalMigration} = require('../../utils');
4
4
 
5
5
  module.exports = createTransactionalMigration(
@@ -10,7 +10,7 @@ module.exports = createTransactionalMigration(
10
10
 
11
11
  // eslint-disable-next-line no-restricted-syntax
12
12
  for (const newsletter of newslettersWithoutUUID) {
13
- await knex('newsletters').update('uuid', uuid.v4()).where('id', newsletter.id);
13
+ await knex('newsletters').update('uuid', crypto.randomUUID()).where('id', newsletter.id);
14
14
  }
15
15
  },
16
16
  async function down() {
@@ -1,5 +1,5 @@
1
1
  const ObjectId = require('bson-objectid').default;
2
- const uuid = require('uuid');
2
+ const crypto = require('crypto');
3
3
  const logging = require('@tryghost/logging');
4
4
  const startsWith = require('lodash/startsWith');
5
5
  const {createTransactionalMigration} = require('../../utils');
@@ -9,7 +9,7 @@ module.exports = createTransactionalMigration(
9
9
  // This uses the default settings from core/server/data/schema/default-settings/default-settings.json
10
10
  const newsletter = {
11
11
  id: (new ObjectId()).toHexString(),
12
- uuid: uuid.v4(),
12
+ uuid: crypto.randomUUID(),
13
13
  name: 'Ghost',
14
14
  description: '',
15
15
  slug: 'default-newsletter',
@@ -1,4 +1,4 @@
1
- const uuid = require('uuid');
1
+ const crypto = require('crypto');
2
2
  const ghostBookshelf = require('./base');
3
3
 
4
4
  const Email = ghostBookshelf.Model.extend({
@@ -6,7 +6,7 @@ const Email = ghostBookshelf.Model.extend({
6
6
 
7
7
  defaults: function defaults() {
8
8
  return {
9
- uuid: uuid.v4(),
9
+ uuid: crypto.randomUUID(),
10
10
  status: 'pending',
11
11
  recipient_filter: 'status:-free',
12
12
  track_opens: false,
@@ -1,5 +1,5 @@
1
1
  const ghostBookshelf = require('./base');
2
- const uuid = require('uuid');
2
+ const crypto = require('crypto');
3
3
  const _ = require('lodash');
4
4
  const config = require('../../shared/config');
5
5
  const {gravatar} = require('../lib/image');
@@ -10,8 +10,8 @@ const Member = ghostBookshelf.Model.extend({
10
10
  defaults() {
11
11
  return {
12
12
  status: 'free',
13
- uuid: uuid.v4(),
14
- transient_id: uuid.v4(),
13
+ uuid: crypto.randomUUID(),
14
+ transient_id: crypto.randomUUID(),
15
15
  email_count: 0,
16
16
  email_opened_count: 0,
17
17
  enable_comment_notifications: true
@@ -1,6 +1,6 @@
1
1
  const ghostBookshelf = require('./base');
2
2
  const ObjectID = require('bson-objectid').default;
3
- const uuid = require('uuid');
3
+ const crypto = require('crypto');
4
4
  const urlUtils = require('../../shared/url-utils');
5
5
 
6
6
  const Newsletter = ghostBookshelf.Model.extend({
@@ -8,7 +8,7 @@ const Newsletter = ghostBookshelf.Model.extend({
8
8
 
9
9
  defaults: function defaults() {
10
10
  return {
11
- uuid: uuid.v4(),
11
+ uuid: crypto.randomUUID(),
12
12
  sender_reply_to: 'newsletter',
13
13
  status: 'active',
14
14
  visibility: 'members',
@@ -1,6 +1,6 @@
1
1
  // # Post Model
2
2
  const _ = require('lodash');
3
- const uuid = require('uuid');
3
+ const crypto = require('crypto');
4
4
  const moment = require('moment');
5
5
  const {sequence} = require('@tryghost/promise');
6
6
  const tpl = require('@tryghost/tpl');
@@ -89,7 +89,7 @@ Post = ghostBookshelf.Model.extend({
89
89
  }
90
90
 
91
91
  return {
92
- uuid: uuid.v4(),
92
+ uuid: crypto.randomUUID(),
93
93
  status: 'draft',
94
94
  featured: false,
95
95
  type: 'post',
@@ -1,5 +1,4 @@
1
1
  const _ = require('lodash');
2
- const uuid = require('uuid');
3
2
  const crypto = require('crypto');
4
3
  const keypair = require('keypair');
5
4
  const ObjectID = require('bson-objectid').default;
@@ -50,7 +49,7 @@ function parseDefaultSettings() {
50
49
  const defaultSettingsFlattened = {};
51
50
 
52
51
  const dynamicDefault = {
53
- db_hash: () => uuid.v4(),
52
+ db_hash: () => crypto.randomUUID(),
54
53
  public_hash: () => crypto.randomBytes(15).toString('hex'),
55
54
  admin_session_secret: () => crypto.randomBytes(32).toString('hex'),
56
55
  theme_session_secret: () => crypto.randomBytes(32).toString('hex'),
@@ -12,7 +12,7 @@ class MembersEventsServiceWrapper {
12
12
  }
13
13
 
14
14
  // Wire up all the dependencies
15
- const {EventStorage, LastSeenAtUpdater} = require('@tryghost/members-events-service');
15
+ const {EventStorage, LastSeenAtUpdater, LastSeenAtCache} = require('@tryghost/members-events-service');
16
16
  const models = require('../../models');
17
17
 
18
18
  // Listen for events and store them in the database
@@ -26,6 +26,14 @@ class MembersEventsServiceWrapper {
26
26
 
27
27
  const db = require('../../data/db');
28
28
 
29
+ // Create the last seen at cache and inject it into the last seen at updater
30
+ this.lastSeenAtCache = new LastSeenAtCache({
31
+ services: {
32
+ settingsCache
33
+ }
34
+ });
35
+
36
+ // Create the last seen at updater
29
37
  this.lastSeenAtUpdater = new LastSeenAtUpdater({
30
38
  services: {
31
39
  settingsCache
@@ -34,12 +42,22 @@ class MembersEventsServiceWrapper {
34
42
  return members.api;
35
43
  },
36
44
  db,
37
- events
45
+ events,
46
+ lastSeenAtCache: this.lastSeenAtCache
38
47
  });
39
48
 
49
+ // Subscribe to domain events
40
50
  this.eventStorage.subscribe(DomainEvents);
41
51
  this.lastSeenAtUpdater.subscribe(DomainEvents);
42
52
  }
53
+
54
+ // Clear the last seen at cache
55
+ // Utility used for testing purposes
56
+ clearLastSeenAtCache() {
57
+ if (this.lastSeenAtCache) {
58
+ this.lastSeenAtCache.clear();
59
+ }
60
+ }
43
61
  }
44
62
 
45
63
  module.exports = new MembersEventsServiceWrapper();
@@ -1,4 +1,4 @@
1
- const uuid = require('uuid');
1
+ const crypto = require('crypto');
2
2
 
3
3
  /**
4
4
  * @TODO: move this middleware to Framework monorepo?
@@ -8,7 +8,7 @@ const uuid = require('uuid');
8
8
  * @param {import('express').NextFunction} next
9
9
  */
10
10
  module.exports = function requestIdMw(req, res, next) {
11
- const requestId = req.get('X-Request-ID') || uuid.v4();
11
+ const requestId = req.get('X-Request-ID') || crypto.randomUUID();
12
12
 
13
13
  // Set a value for internal use
14
14
  req.requestId = requestId;
@@ -44,7 +44,8 @@ const ALPHA_FEATURES = [
44
44
  'importMemberTier',
45
45
  'lexicalIndicators',
46
46
  'adminXDemo',
47
- 'contentVisibility'
47
+ 'contentVisibility',
48
+ 'commentImprovements'
48
49
  ];
49
50
 
50
51
  module.exports.GA_KEYS = [...GA_FEATURES];
@@ -46,5 +46,6 @@ module.exports = {
46
46
  outbound_link_tagging: 'outbound_link_tagging',
47
47
  default_email_address: 'default_email_address',
48
48
  support_email_address: 'support_email_address',
49
- editor_default_email_recipients: 'editor_default_email_recipients'
49
+ editor_default_email_recipients: 'editor_default_email_recipients',
50
+ labs: 'labs'
50
51
  };