ghost 6.4.0 → 6.5.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-i18n-6.5.0.tgz +0 -0
- package/core/built/admin/assets/admin-x-settings/{CodeEditorView-CHa5Y-LX.mjs → CodeEditorView-opzyn619.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-Cg4zMcj4.mjs → index-Bl8-oPss.mjs} +2 -2
- package/core/built/admin/assets/admin-x-settings/{index-CGFCkAXn.mjs → index-DEKggYGh.mjs} +4 -12
- package/core/built/admin/assets/admin-x-settings/{modals-DH5H9Tgk.mjs → modals-Dfgf0rk6.mjs} +2 -2
- package/core/built/admin/assets/{chunk.524.5fd100e92f0b07a59e66.js → chunk.524.38d01b4462f2c8fa0f0c.js} +7 -7
- package/core/built/admin/assets/{chunk.582.411877f4da4644562f10.js → chunk.582.a5f6607aa0d9d35698fb.js} +10 -10
- package/core/built/admin/assets/{ghost-e7b2c10bfc27fe1ef28d2697e9e7551b.js → ghost-5913e475046c53790a925867eac6cf71.js} +38 -42
- package/core/built/admin/index.html +3 -3
- package/core/frontend/helpers/ghost_head.js +1 -3
- package/core/frontend/helpers/split.js +34 -0
- package/core/frontend/web/site.js +2 -2
- package/core/server/adapters/storage/LocalFilesStorage.js +2 -1
- package/core/server/adapters/storage/LocalMediaStorage.js +2 -1
- package/core/server/api/endpoints/utils/serializers/output/files.js +2 -1
- package/core/server/api/endpoints/utils/serializers/output/media.js +2 -1
- package/core/server/services/lib/magic-link/MagicLink.js +2 -2
- package/core/server/services/members/members-api/controllers/RouterController.js +2 -2
- package/core/shared/config/defaults.json +1 -1
- package/core/shared/config/helpers.js +0 -21
- package/core/shared/labs.js +0 -2
- package/core/shared/url-utils.js +2 -1
- package/package.json +3 -3
- package/yarn.lock +14 -0
- package/components/tryghost-i18n-6.4.0.tgz +0 -0
|
@@ -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:
|
|
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:
|
|
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() + '/' +
|
|
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() + '/' +
|
|
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 (
|
|
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 (
|
|
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 (
|
|
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 (
|
|
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.
|
|
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
|
};
|
package/core/shared/labs.js
CHANGED
package/core/shared/url-utils.js
CHANGED
|
@@ -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.
|
|
3
|
+
"version": "6.5.0",
|
|
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.
|
|
89
|
+
"@tryghost/i18n": "file:components/tryghost-i18n-6.5.0.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.
|
|
276
|
+
"@tryghost/i18n": "file:components/tryghost-i18n-6.5.0.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
|