mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-04-15 03:01:37 -05:00
Moved apps service to frontend
- App service is for our internal frontend apps - This is a very straightforward move as this truly belongs to frontend
This commit is contained in:
parent
5030be31cf
commit
7e0c71509b
7 changed files with 19 additions and 19 deletions
|
@ -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 = {
|
|
@ -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
|
|
@ -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');
|
|
@ -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.
|
||||
|
@ -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'),
|
||||
|
@ -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,
|
||||
|
|
|
@ -7,12 +7,12 @@ const common = require('../../lib/common');
|
|||
|
||||
// App requires
|
||||
const config = require('../../config');
|
||||
const apps = require('../../services/apps');
|
||||
const constants = require('../../lib/constants');
|
||||
const storage = require('../../adapters/storage');
|
||||
const urlService = require('../../../frontend/services/url');
|
||||
const urlUtils = require('../../lib/url-utils');
|
||||
const sitemapHandler = require('../../../frontend/services/sitemap/handler');
|
||||
const appService = require('../../../frontend/services/apps');
|
||||
const themeService = require('../../../frontend/services/themes');
|
||||
const themeMiddleware = themeService.middleware;
|
||||
const membersService = require('../../services/members');
|
||||
|
@ -212,7 +212,7 @@ module.exports.reload = () => {
|
|||
Object.setPrototypeOf(SiteRouter, router);
|
||||
|
||||
// re-initialse apps (register app routers, because we have re-initialised the site routers)
|
||||
apps.init();
|
||||
appService.init();
|
||||
|
||||
// connect routers and resources again
|
||||
urlService.queue.start({
|
||||
|
|
|
@ -5,7 +5,7 @@ const should = require('should'),
|
|||
testUtils = require('../../utils'),
|
||||
configUtils = require('../../utils/configUtils'),
|
||||
urlUtils = require('../../utils/urlUtils'),
|
||||
appsService = require('../../../server/services/apps'),
|
||||
appService = require('../../../frontend/services/apps'),
|
||||
frontendSettingsService = require('../../../frontend/services/settings'),
|
||||
themeService = require('../../../frontend/services/themes'),
|
||||
siteApp = require('../../../server/web/parent-app');
|
||||
|
@ -35,7 +35,7 @@ describe('Integration - Web - Site', function () {
|
|||
return testUtils.integrationTesting.urlService.waitTillFinished();
|
||||
})
|
||||
.then(() => {
|
||||
return appsService.init();
|
||||
return appService.init();
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -1733,7 +1733,7 @@ describe('Integration - Web - Site', function () {
|
|||
return testUtils.integrationTesting.urlService.waitTillFinished();
|
||||
})
|
||||
.then(() => {
|
||||
return appsService.init();
|
||||
return appService.init();
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -3433,7 +3433,7 @@ describe('Integration - Web - Site', function () {
|
|||
return testUtils.integrationTesting.urlService.waitTillFinished();
|
||||
})
|
||||
.then(() => {
|
||||
return appsService.init();
|
||||
return appService.init();
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -5135,7 +5135,7 @@ describe('Integration - Web - Site', function () {
|
|||
return testUtils.integrationTesting.urlService.waitTillFinished();
|
||||
})
|
||||
.then(() => {
|
||||
return appsService.init();
|
||||
return appService.init();
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -5254,7 +5254,7 @@ describe('Integration - Web - Site', function () {
|
|||
return testUtils.integrationTesting.urlService.waitTillFinished();
|
||||
})
|
||||
.then(() => {
|
||||
return appsService.init();
|
||||
return appService.init();
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -5416,7 +5416,7 @@ describe('Integration - Web - Site', function () {
|
|||
return testUtils.integrationTesting.urlService.waitTillFinished();
|
||||
})
|
||||
.then(() => {
|
||||
return appsService.init();
|
||||
return appService.init();
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -5463,7 +5463,7 @@ describe('Integration - Web - Site', function () {
|
|||
return testUtils.integrationTesting.urlService.waitTillFinished();
|
||||
})
|
||||
.then(() => {
|
||||
return appsService.init();
|
||||
return appService.init();
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
const should = require('should'),
|
||||
sinon = require('sinon'),
|
||||
helpers = require('../../../../frontend/helpers/register'),
|
||||
AppProxy = require('../../../../server/services/apps/proxy'),
|
||||
AppProxy = require('../../../../frontend/services/apps/proxy'),
|
||||
routing = require('../../../../frontend/services/routing');
|
||||
|
||||
describe('Apps', function () {
|
||||
|
|
Loading…
Add table
Reference in a new issue