Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
Add v3.12.1
Browse files Browse the repository at this point in the history
  • Loading branch information
YannickRe committed Mar 26, 2020
1 parent 48bc2ff commit 604857f
Show file tree
Hide file tree
Showing 40 changed files with 10,893 additions and 11,728 deletions.
2 changes: 1 addition & 1 deletion content/themes/casper/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "casper",
"description": "A clean, minimal default theme for the Ghost publishing platform",
"demo": "https://demo.ghost.io",
"version": "3.0.10",
"version": "3.0.11",
"engines": {
"ghost": ">=3.0.0",
"ghost-api": "v3"
Expand Down
5 changes: 1 addition & 4 deletions content/themes/casper/renovate.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
{
"extends": [
"@tryghost:theme"
],
"node": {
"supportPolicy": ["lts_latest"]
}
]
}
2,227 changes: 0 additions & 2,227 deletions core/built/assets/ghost.min-c66c738df4f9e55cf56765c969aef2d3.js

This file was deleted.

2,227 changes: 2,227 additions & 0 deletions core/built/assets/ghost.min-eb4fa7c7c91a87afe3c1e78e7f76ed98.js

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const debug = require('ghost-ignition').debug('services:apps');
const Promise = require('bluebird');
const common = require('../../lib/common');
const config = require('../../config');
const common = require('../../../server/lib/common');
const config = require('../../../server/config');
const loader = require('./loader');

module.exports = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
const path = require('path');
const _ = require('lodash');
const Promise = require('bluebird');
const common = require('../../lib/common');
const config = require('../../config');
const common = require('../../../server/lib/common');
const config = require('../../../server/config');
const Proxy = require('./proxy');

// Get the full path to an app by name
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const helpers = require('../../../frontend/helpers/register');
const routingService = require('../../../frontend/services/routing');
const helpers = require('../../helpers/register');
const routingService = require('../../services/routing');

module.exports.getInstance = function getInstance() {
const appRouter = routingService.registry.getRouter('appRouter');
Expand Down
4 changes: 2 additions & 2 deletions core/server/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ let parentApp;

// Frontend Components
const themeService = require('../frontend/services/themes');
const appService = require('../frontend/services/apps');

function initialiseServices() {
// CASE: When Ghost is ready with bootstrapping (db migrations etc.), we can trigger the router creation.
Expand All @@ -30,7 +31,6 @@ function initialiseServices() {
routing.bootstrap.start(themeService.getApiVersion());

const permissions = require('./services/permissions'),
apps = require('./services/apps'),
xmlrpc = require('./services/xmlrpc'),
slack = require('./services/slack'),
{mega} = require('./services/mega'),
Expand All @@ -46,7 +46,7 @@ function initialiseServices() {
slack.listen(),
mega.listen(),
webhooks.listen(),
apps.init(),
appService.init(),
scheduling.init({
schedulerUrl: config.get('scheduling').schedulerUrl,
active: config.get('scheduling').active,
Expand Down
7 changes: 4 additions & 3 deletions core/server/lib/image/blog-icon.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ var sizeOf = require('image-size'),
_ = require('lodash'),
path = require('path'),
config = require('../../config'),
common = require('../common'),
{i18n} = require('../common'),
errors = require('@tryghost/errors'),
urlUtils = require('../../lib/url-utils'),
settingsCache = require('../../services/settings/cache'),
storageUtils = require('../../adapters/storage/utils'),
Expand Down Expand Up @@ -41,8 +42,8 @@ getIconDimensions = function getIconDimensions(path) {
height: dimensions.height
});
} catch (err) {
return reject(new common.errors.ValidationError({
message: common.i18n.t('errors.utils.blogIcon.error', {
return reject(new errors.ValidationError({
message: i18n.t('errors.utils.blogIcon.error', {
file: path,
error: err.message
})
Expand Down
7 changes: 4 additions & 3 deletions core/server/lib/image/cached-image-size-from-url.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
var debug = require('ghost-ignition').debug('utils:image-size-cache'),
imageSize = require('./image-size'),
common = require('../common'),
errors = require('@tryghost/errors'),
{logging} = require('../common'),
cache = {};

/**
Expand All @@ -24,15 +25,15 @@ function getCachedImageSizeFromUrl(url) {
debug('Cached image:', url);

return cache[url];
}).catch(common.errors.NotFoundError, function () {
}).catch(errors.NotFoundError, function () {
debug('Cached image (not found):', url);
// in case of error we just attach the url
cache[url] = url;

return cache[url];
}).catch(function (err) {
debug('Cached image (error):', url);
common.logging.error(err);
logging.error(err);

// in case of error we just attach the url
cache[url] = url;
Expand Down
25 changes: 13 additions & 12 deletions core/server/lib/image/image-size.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ const Promise = require('bluebird');
const _ = require('lodash');
const request = require('../request');
const urlUtils = require('../../lib/url-utils');
const common = require('../common');
const {i18n} = require('../common');
const errors = require('@tryghost/errors');
const config = require('../../config');
const storage = require('../../adapters/storage');
const storageUtils = require('../../adapters/storage/utils');
Expand Down Expand Up @@ -54,7 +55,7 @@ function _probeImageSizeFromUrl(url) {
// probe-image-size uses `request` npm module which doesn't have our `got`
// override with custom URL validation so it needs duplicating here
if (_.isEmpty(url) || !validator.isURL(url)) {
return Promise.reject(new common.errors.InternalServerError({
return Promise.reject(new errors.InternalServerError({
message: 'URL empty or invalid.',
code: 'URL_MISSING_INVALID',
context: url
Expand Down Expand Up @@ -147,32 +148,32 @@ const getImageSizeFromUrl = (imagePath) => {
height: dimensions.height
};
}).catch({code: 'URL_MISSING_INVALID'}, (err) => {
return Promise.reject(new common.errors.InternalServerError({
return Promise.reject(new errors.InternalServerError({
message: err.message,
code: 'IMAGE_SIZE_URL',
statusCode: err.statusCode,
context: err.url || imagePath
}));
}).catch({code: 'ETIMEDOUT'}, {statusCode: 408}, (err) => {
return Promise.reject(new common.errors.InternalServerError({
return Promise.reject(new errors.InternalServerError({
message: 'Request timed out.',
code: 'IMAGE_SIZE_URL',
statusCode: err.statusCode,
context: err.url || imagePath
}));
}).catch({code: 'ENOENT'}, {statusCode: 404}, (err) => {
return Promise.reject(new common.errors.NotFoundError({
return Promise.reject(new errors.NotFoundError({
message: 'Image not found.',
code: 'IMAGE_SIZE_URL',
statusCode: err.statusCode,
context: err.url || imagePath
}));
}).catch(function (err) {
if (common.errors.utils.isIgnitionError(err)) {
if (errors.utils.isIgnitionError(err)) {
return Promise.reject(err);
}

return Promise.reject(new common.errors.InternalServerError({
return Promise.reject(new errors.InternalServerError({
message: 'Unknown Request error.',
code: 'IMAGE_SIZE_URL',
statusCode: err.statusCode,
Expand Down Expand Up @@ -221,7 +222,7 @@ const getImageSizeFromStoragePath = (imagePath) => {
};
})
.catch({code: 'ENOENT'}, (err) => {
return Promise.reject(new common.errors.NotFoundError({
return Promise.reject(new errors.NotFoundError({
message: err.message,
code: 'IMAGE_SIZE_STORAGE',
err: err,
Expand All @@ -232,11 +233,11 @@ const getImageSizeFromStoragePath = (imagePath) => {
}
}));
}).catch((err) => {
if (common.errors.utils.isIgnitionError(err)) {
if (errors.utils.isIgnitionError(err)) {
return Promise.reject(err);
}

return Promise.reject(new common.errors.InternalServerError({
return Promise.reject(new errors.InternalServerError({
message: err.message,
code: 'IMAGE_SIZE_STORAGE',
err: err,
Expand Down Expand Up @@ -279,8 +280,8 @@ const getImageSizeFromPath = (path) => {
height: dimensions.height
});
} catch (err) {
return reject(new common.errors.ValidationError({
message: common.i18n.t('errors.utils.images.invalidDimensions', {
return reject(new errors.ValidationError({
message: i18n.t('errors.utils.images.invalidDimensions', {
file: path,
error: err.message
})
Expand Down
4 changes: 0 additions & 4 deletions core/server/lib/image/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,5 @@ module.exports = {

get imageSizeCache() {
return require('./cached-image-size-from-url');
},

get manipulator() {
return require('./manipulator');
}
};
66 changes: 0 additions & 66 deletions core/server/lib/image/manipulator.js

This file was deleted.

44 changes: 0 additions & 44 deletions core/server/lib/mobiledoc/cards/_markdown.js

This file was deleted.

Loading

0 comments on commit 604857f

Please sign in to comment.