ghost 6.4.0 → 6.5.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 (28) hide show
  1. package/components/tryghost-i18n-6.5.1.tgz +0 -0
  2. package/content/themes/source/package.json +1 -1
  3. package/core/built/admin/assets/admin-x-settings/{CodeEditorView-CHa5Y-LX.mjs → CodeEditorView-CXFosdSE.mjs} +2 -2
  4. package/core/built/admin/assets/admin-x-settings/admin-x-settings.js +1 -1
  5. package/core/built/admin/assets/admin-x-settings/{index-Cg4zMcj4.mjs → index-BsX5g84p.mjs} +2 -2
  6. package/core/built/admin/assets/admin-x-settings/{index-CGFCkAXn.mjs → index-J1HU9X8r.mjs} +4 -12
  7. package/core/built/admin/assets/admin-x-settings/{modals-DH5H9Tgk.mjs → modals-42rLms6R.mjs} +8030 -8022
  8. package/core/built/admin/assets/{chunk.524.5fd100e92f0b07a59e66.js → chunk.524.47dadb414f04476ce18e.js} +7 -7
  9. package/core/built/admin/assets/{chunk.582.411877f4da4644562f10.js → chunk.582.c4ff6af8aa4723e7da4f.js} +9 -9
  10. package/core/built/admin/assets/{ghost-e7b2c10bfc27fe1ef28d2697e9e7551b.js → ghost-5913e475046c53790a925867eac6cf71.js} +38 -42
  11. package/core/built/admin/assets/posts/posts.js +6 -6
  12. package/core/built/admin/index.html +3 -3
  13. package/core/frontend/helpers/ghost_head.js +1 -3
  14. package/core/frontend/helpers/split.js +34 -0
  15. package/core/frontend/web/site.js +2 -2
  16. package/core/server/adapters/storage/LocalFilesStorage.js +2 -1
  17. package/core/server/adapters/storage/LocalMediaStorage.js +2 -1
  18. package/core/server/api/endpoints/utils/serializers/output/files.js +2 -1
  19. package/core/server/api/endpoints/utils/serializers/output/media.js +2 -1
  20. package/core/server/services/lib/magic-link/MagicLink.js +2 -2
  21. package/core/server/services/members/members-api/controllers/RouterController.js +2 -2
  22. package/core/shared/config/defaults.json +1 -1
  23. package/core/shared/config/helpers.js +0 -21
  24. package/core/shared/labs.js +0 -2
  25. package/core/shared/url-utils.js +2 -1
  26. package/package.json +3 -3
  27. package/yarn.lock +14 -0
  28. package/components/tryghost-i18n-6.4.0.tgz +0 -0
@@ -22,8 +22,8 @@ const errorHandler = require('@tryghost/mw-error-handler');
22
22
  const mw = require('./middleware');
23
23
 
24
24
  const STATIC_IMAGE_URL_PREFIX = `/${urlUtils.STATIC_IMAGE_URL_PREFIX}`;
25
- const STATIC_MEDIA_URL_PREFIX = `/${config.getStaticUrlPrefix('media')}`;
26
- const STATIC_FILES_URL_PREFIX = `/${config.getStaticUrlPrefix('files')}`;
25
+ const STATIC_MEDIA_URL_PREFIX = `/${urlUtils.STATIC_MEDIA_URL_PREFIX}`;
26
+ const STATIC_FILES_URL_PREFIX = `/${urlUtils.STATIC_FILES_URL_PREFIX}`;
27
27
 
28
28
  let router;
29
29
 
@@ -1,6 +1,7 @@
1
1
  // # Local File System Storage module
2
2
  // The (default) module for storing media, using the local file system
3
3
  const config = require('../../../shared/config');
4
+ const urlUtils = require('../../../shared/url-utils');
4
5
  const LocalStorageBase = require('./LocalStorageBase');
5
6
 
6
7
  const messages = {
@@ -14,7 +15,7 @@ class LocalFilesStorage extends LocalStorageBase {
14
15
  super({
15
16
  storagePath: config.getContentPath('files'),
16
17
  siteUrl: config.getSiteUrl(),
17
- staticFileURLPrefix: config.getStaticUrlPrefix('files'),
18
+ staticFileURLPrefix: urlUtils.STATIC_FILES_URL_PREFIX,
18
19
  errorMessages: messages
19
20
  });
20
21
  }
@@ -1,6 +1,7 @@
1
1
  // # Local File System Media Storage module
2
2
  // The (default) module for storing media, using the local file system
3
3
  const config = require('../../../shared/config');
4
+ const urlUtils = require('../../../shared/url-utils');
4
5
  const LocalStorageBase = require('./LocalStorageBase');
5
6
 
6
7
  const messages = {
@@ -13,7 +14,7 @@ class LocalMediaStorage extends LocalStorageBase {
13
14
  constructor() {
14
15
  super({
15
16
  storagePath: config.getContentPath('media'),
16
- staticFileURLPrefix: config.getStaticUrlPrefix('media'),
17
+ staticFileURLPrefix: urlUtils.STATIC_MEDIA_URL_PREFIX,
17
18
  siteUrl: config.getSiteUrl(),
18
19
  errorMessages: messages
19
20
  });
@@ -1,7 +1,8 @@
1
1
  const config = require('../../../../../../shared/config');
2
+ const urlUtils = require('../../../../../../shared/url-utils');
2
3
 
3
4
  function getURL(urlPath) {
4
- const media = new RegExp('^' + config.getSubdir() + '/' + config.getStaticUrlPrefix('files'));
5
+ const media = new RegExp('^' + config.getSubdir() + '/' + urlUtils.STATIC_FILES_URL_PREFIX);
5
6
  const absolute = media.test(urlPath) ? true : false;
6
7
 
7
8
  if (absolute) {
@@ -1,7 +1,8 @@
1
1
  const config = require('../../../../../../shared/config');
2
+ const urlUtils = require('../../../../../../shared/url-utils');
2
3
 
3
4
  function getURL(urlPath) {
4
- const media = new RegExp('^' + config.getSubdir() + '/' + config.getStaticUrlPrefix('media'));
5
+ const media = new RegExp('^' + config.getSubdir() + '/' + urlUtils.STATIC_MEDIA_URL_PREFIX);
5
6
  const absolute = media.test(urlPath) ? true : false;
6
7
 
7
8
  if (absolute) {
@@ -85,7 +85,7 @@ class MagicLink {
85
85
  const url = this.getSigninURL(token, type, options.referrer);
86
86
 
87
87
  let otc = null;
88
- if (this.labsService?.isSet('membersSigninOTC') && options.includeOTC) {
88
+ if (options.includeOTC) {
89
89
  try {
90
90
  otc = await this.getOTCFromToken(token);
91
91
  } catch (err) {
@@ -106,7 +106,7 @@ class MagicLink {
106
106
  // this if we've successfully generated an OTC to avoid clients showing
107
107
  // a token input field when the email doesn't contain an OTC
108
108
  let otcRef = null;
109
- if (this.labsService?.isSet('membersSigninOTC') && otc) {
109
+ if (otc) {
110
110
  try {
111
111
  otcRef = await this.getRefFromToken(token);
112
112
  } catch (err) {
@@ -665,7 +665,7 @@ module.exports = class RouterController {
665
665
  } else {
666
666
  const signIn = await this._handleSignin(req, normalizedEmail, referrer);
667
667
 
668
- if (this.labsService.isSet('membersSigninOTC') && signIn.otcRef) {
668
+ if (signIn.otcRef) {
669
669
  res.writeHead(201, {'Content-Type': 'application/json'});
670
670
  return res.end(JSON.stringify({otc_ref: signIn.otcRef}));
671
671
  }
@@ -790,7 +790,7 @@ module.exports = class RouterController {
790
790
 
791
791
  let includeOTC = false;
792
792
 
793
- if (this.labsService.isSet('membersSigninOTC') && (reqIncludeOTC === true || reqIncludeOTC === 'true')) {
793
+ if (reqIncludeOTC === true || reqIncludeOTC === 'true') {
794
794
  includeOTC = true;
795
795
  }
796
796
 
@@ -224,7 +224,7 @@
224
224
  },
225
225
  "portal": {
226
226
  "url": "https://cdn.jsdelivr.net/ghost/portal@~{version}/umd/portal.min.js",
227
- "version": "2.55"
227
+ "version": "2.56"
228
228
  },
229
229
  "sodoSearch": {
230
230
  "url": "https://cdn.jsdelivr.net/ghost/sodo-search@~{version}/umd/sodo-search.min.js",
@@ -64,25 +64,6 @@ const isPrivacyDisabled = function isPrivacyDisabled(privacyFlag) {
64
64
  return this.get('privacy')[privacyFlag] === false;
65
65
  };
66
66
 
67
- /**
68
- * @callback getStaticUrlPrefixFn
69
- * @param {'images'|'media'|'files'} type
70
- * @returns {string}
71
- */
72
- function getStaticUrlPrefix(type) {
73
- switch (type) {
74
- case 'images':
75
- return 'content/images';
76
- case 'media':
77
- return 'content/media';
78
- case 'files':
79
- return 'content/files';
80
- default:
81
- // eslint-disable-next-line ghost/ghost-custom/no-native-error
82
- throw new Error('getStaticUrlPrefix was called with: ' + type);
83
- }
84
- }
85
-
86
67
  /**
87
68
  * @callback getContentPathFn
88
69
  * @param {string} type - the type of context you want the path for
@@ -120,12 +101,10 @@ const getContentPath = function getContentPath(type) {
120
101
  * @typedef ConfigHelpers
121
102
  * @property {isPrivacyDisabledFn} isPrivacyDisabled
122
103
  * @property {getContentPathFn} getContentPath
123
- * @property {getStaticUrlPrefixFn} getStaticUrlPrefix
124
104
  */
125
105
  module.exports.bindAll = (nconf) => {
126
106
  nconf.isPrivacyDisabled = isPrivacyDisabled.bind(nconf);
127
107
  nconf.getContentPath = getContentPath.bind(nconf);
128
108
  nconf.getBackendMountPath = getBackendMountPath.bind(nconf);
129
109
  nconf.getFrontendMountPath = getFrontendMountPath.bind(nconf);
130
- nconf.getStaticUrlPrefix = getStaticUrlPrefix.bind(nconf);
131
110
  };
@@ -47,8 +47,6 @@ const PRIVATE_FEATURES = [
47
47
  'lexicalIndicators',
48
48
  'contentVisibilityAlpha',
49
49
  'emailCustomization',
50
- 'membersSigninOTC',
51
- 'membersSigninOTCAlpha',
52
50
  'tagsX',
53
51
  'utmTracking',
54
52
  'emailUniqueid'
@@ -2,7 +2,6 @@ const UrlUtils = require('@tryghost/url-utils');
2
2
  const config = require('./config');
3
3
 
4
4
  const BASE_API_PATH = '/ghost/api';
5
-
6
5
  const urlUtils = new UrlUtils({
7
6
  getSubdir: config.getSubdir,
8
7
  getSiteUrl: config.getSiteUrl,
@@ -14,3 +13,5 @@ const urlUtils = new UrlUtils({
14
13
 
15
14
  module.exports = urlUtils;
16
15
  module.exports.BASE_API_PATH = BASE_API_PATH;
16
+ module.exports.STATIC_MEDIA_URL_PREFIX = 'content/media';
17
+ module.exports.STATIC_FILES_URL_PREFIX = 'content/files';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ghost",
3
- "version": "6.4.0",
3
+ "version": "6.5.1",
4
4
  "description": "The professional publishing platform",
5
5
  "author": "Ghost Foundation",
6
6
  "homepage": "https://ghost.org",
@@ -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.4.0.tgz",
89
+ "@tryghost/i18n": "file:components/tryghost-i18n-6.5.1.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",
@@ -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.4.0.tgz"
276
+ "@tryghost/i18n": "file:components/tryghost-i18n-6.5.1.tgz"
277
277
  },
278
278
  "nx": {
279
279
  "targets": {
package/yarn.lock CHANGED
@@ -32417,6 +32417,11 @@ ts-node@10.9.2:
32417
32417
  v8-compile-cache-lib "^3.0.1"
32418
32418
  yn "3.1.1"
32419
32419
 
32420
+ tsconfck@^3.0.3:
32421
+ version "3.1.6"
32422
+ resolved "https://registry.yarnpkg.com/tsconfck/-/tsconfck-3.1.6.tgz#da1f0b10d82237ac23422374b3fce1edb23c3ead"
32423
+ integrity sha512-ks6Vjr/jEw0P1gmOVwutM3B7fWxoWBL2KRDb1JfqGVawBmO5UsvmWOQFGHBPl5yxYz4eERr19E6L7NMv+Fej4w==
32424
+
32420
32425
  tsconfig-paths@^4.1.2, tsconfig-paths@^4.2.0:
32421
32426
  version "4.2.0"
32422
32427
  resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-4.2.0.tgz#ef78e19039133446d244beac0fd6a1632e2d107c"
@@ -33369,6 +33374,15 @@ vite-plugin-svgr@4.5.0:
33369
33374
  "@svgr/core" "^8.1.0"
33370
33375
  "@svgr/plugin-jsx" "^8.1.0"
33371
33376
 
33377
+ vite-tsconfig-paths@5.1.4:
33378
+ version "5.1.4"
33379
+ resolved "https://registry.yarnpkg.com/vite-tsconfig-paths/-/vite-tsconfig-paths-5.1.4.tgz#d9a71106a7ff2c1c840c6f1708042f76a9212ed4"
33380
+ integrity sha512-cYj0LRuLV2c2sMqhqhGpaO3LretdtMn/BVX4cPLanIZuwwrkVl+lK84E/miEXkCHWXuq65rhNN4rXsBcOB3S4w==
33381
+ dependencies:
33382
+ debug "^4.1.1"
33383
+ globrex "^0.1.2"
33384
+ tsconfck "^3.0.3"
33385
+
33372
33386
  vite@5.4.20, vite@^5.0.0:
33373
33387
  version "5.4.20"
33374
33388
  resolved "https://registry.yarnpkg.com/vite/-/vite-5.4.20.tgz#3267a5e03f21212f44edfd72758138e8fcecd76a"
Binary file