diff --git a/ghost/adapter-cache-memory-ttl/index.js b/ghost/adapter-cache-memory-ttl/index.js index ed5ff430f6..49f7d9f215 100644 --- a/ghost/adapter-cache-memory-ttl/index.js +++ b/ghost/adapter-cache-memory-ttl/index.js @@ -1 +1 @@ -module.exports = require('./lib/adapter-cache-memory-ttl'); +module.exports = require('./lib/AdapterCacheMemoryTTL'); diff --git a/ghost/adapter-cache-memory-ttl/lib/adapter-cache-memory-ttl.js b/ghost/adapter-cache-memory-ttl/lib/AdapterCacheMemoryTTL.js similarity index 93% rename from ghost/adapter-cache-memory-ttl/lib/adapter-cache-memory-ttl.js rename to ghost/adapter-cache-memory-ttl/lib/AdapterCacheMemoryTTL.js index 2727096eba..23c2003e30 100644 --- a/ghost/adapter-cache-memory-ttl/lib/adapter-cache-memory-ttl.js +++ b/ghost/adapter-cache-memory-ttl/lib/AdapterCacheMemoryTTL.js @@ -8,7 +8,7 @@ const Base = require('@tryghost/adapter-base-cache'); * - it supports time-to-live (TTL) * - it supports a max number of items */ -class MemoryTTL extends Base { +class AdapterCacheMemoryTTL extends Base { #cache; /** @@ -51,4 +51,4 @@ class MemoryTTL extends Base { } } -module.exports = MemoryTTL; +module.exports = AdapterCacheMemoryTTL; diff --git a/ghost/adapter-cache-redis/index.js b/ghost/adapter-cache-redis/index.js index d40bd74269..50814b4b52 100644 --- a/ghost/adapter-cache-redis/index.js +++ b/ghost/adapter-cache-redis/index.js @@ -1 +1 @@ -module.exports = require('./lib/adapter-cache-redis'); +module.exports = require('./lib/AdapterCacheRedis'); diff --git a/ghost/adapter-cache-redis/lib/adapter-cache-redis.js b/ghost/adapter-cache-redis/lib/AdapterCacheRedis.js similarity index 98% rename from ghost/adapter-cache-redis/lib/adapter-cache-redis.js rename to ghost/adapter-cache-redis/lib/AdapterCacheRedis.js index f9c0966d6b..981109e65f 100644 --- a/ghost/adapter-cache-redis/lib/adapter-cache-redis.js +++ b/ghost/adapter-cache-redis/lib/AdapterCacheRedis.js @@ -4,7 +4,7 @@ const cacheManager = require('cache-manager'); const redisStore = require('cache-manager-ioredis'); const calculateSlot = require('cluster-key-slot'); -class Redis extends BaseCacheAdapter { +class AdapterCacheRedis extends BaseCacheAdapter { /** * * @param {Object} config @@ -155,4 +155,4 @@ class Redis extends BaseCacheAdapter { } } -module.exports = Redis; +module.exports = AdapterCacheRedis; diff --git a/ghost/admin/.eslintrc.js b/ghost/admin/.eslintrc.js index 1cfc1002c8..131aaa8000 100644 --- a/ghost/admin/.eslintrc.js +++ b/ghost/admin/.eslintrc.js @@ -27,6 +27,8 @@ module.exports = { 'plugin:ghost/ember' ], rules: { + 'ghost/filenames/match-exported-class': ['off'], + 'ghost/filenames/match-regex': ['off'], 'no-shadow': ['error'], // TODO: migrate away from accessing controller in routes diff --git a/ghost/announcement-bar/package.json b/ghost/announcement-bar/package.json index b9bbb94c18..1d1cc74090 100644 --- a/ghost/announcement-bar/package.json +++ b/ghost/announcement-bar/package.json @@ -79,7 +79,7 @@ "chalk": "4.1.2", "chokidar": "3.5.3", "copy-webpack-plugin": "11.0.0", - "eslint-plugin-ghost": "2.16.0", + "eslint-plugin-ghost": "3.0.0", "minimist": "1.2.8", "nock": "13.3.0", "ora": "5.4.1", diff --git a/ghost/api-framework/lib/frame.js b/ghost/api-framework/lib/Frame.js similarity index 100% rename from ghost/api-framework/lib/frame.js rename to ghost/api-framework/lib/Frame.js diff --git a/ghost/api-framework/lib/api-framework.js b/ghost/api-framework/lib/api-framework.js index fdda5f7d74..28fa942163 100644 --- a/ghost/api-framework/lib/api-framework.js +++ b/ghost/api-framework/lib/api-framework.js @@ -8,7 +8,7 @@ module.exports = { }, get Frame() { - return require('./frame'); + return require('./Frame'); }, get pipeline() { diff --git a/ghost/api-framework/lib/http.js b/ghost/api-framework/lib/http.js index 72848e19a1..3ef7dd0023 100644 --- a/ghost/api-framework/lib/http.js +++ b/ghost/api-framework/lib/http.js @@ -1,7 +1,7 @@ const url = require('url'); const debug = require('@tryghost/debug')('http'); -const Frame = require('./frame'); +const Frame = require('./Frame'); const headers = require('./headers'); /** diff --git a/ghost/api-framework/lib/pipeline.js b/ghost/api-framework/lib/pipeline.js index 5d6e1bbb0a..ebbadf384a 100644 --- a/ghost/api-framework/lib/pipeline.js +++ b/ghost/api-framework/lib/pipeline.js @@ -3,7 +3,7 @@ const _ = require('lodash'); const errors = require('@tryghost/errors'); const {sequence} = require('@tryghost/promise'); -const Frame = require('./frame'); +const Frame = require('./Frame'); const serializers = require('./serializers'); const validators = require('./validators'); diff --git a/ghost/api-version-compatibility-service/index.js b/ghost/api-version-compatibility-service/index.js index 2505aa9579..eaa7277102 100644 --- a/ghost/api-version-compatibility-service/index.js +++ b/ghost/api-version-compatibility-service/index.js @@ -1 +1 @@ -module.exports = require('./lib/api-version-compatibility-service'); +module.exports = require('./lib/APIVersionCompatibilityService'); diff --git a/ghost/api-version-compatibility-service/lib/api-version-compatibility-service.js b/ghost/api-version-compatibility-service/lib/APIVersionCompatibilityService.js similarity index 100% rename from ghost/api-version-compatibility-service/lib/api-version-compatibility-service.js rename to ghost/api-version-compatibility-service/lib/APIVersionCompatibilityService.js diff --git a/ghost/core/.c8rc.json b/ghost/core/.c8rc.json index 666652e578..f76eb885f7 100644 --- a/ghost/core/.c8rc.json +++ b/ghost/core/.c8rc.json @@ -6,10 +6,10 @@ "text-summary", "cobertura" ], - "statements": 59, + "statements": 58.8, "branches": 84, "functions": 50, - "lines": 59, + "lines": 58.8, "include": [ "core/{*.js,frontend,server,shared}" ], diff --git a/ghost/core/.eslintrc.js b/ghost/core/.eslintrc.js index 41ef57f898..46d47e8eb7 100644 --- a/ghost/core/.eslintrc.js +++ b/ghost/core/.eslintrc.js @@ -13,7 +13,9 @@ module.exports = { // @TODO: remove this rule once it's turned into "error" in the base plugin 'no-shadow': 'error', 'no-var': 'error', - 'one-var': ['error', 'never'] + 'one-var': ['error', 'never'], + 'ghost/ghost-custom/ghost-error-usage': [1], + 'ghost/ghost-custom/no-native-error': [1] }, overrides: [ { @@ -76,6 +78,12 @@ module.exports = { ]] } }, + { + files: ['core/frontend/helpers/**', 'core/frontend/apps/*/lib/helpers/**'], + rules: { + 'ghost/filenames/match-regex': ['off', '^[a-z0-9-.]$', null, true] + } + }, /** * @TODO: enable these soon */ diff --git a/ghost/core/MigratorConfig.js b/ghost/core/MigratorConfig.js index 738a3bb5a6..e45e0eaa72 100644 --- a/ghost/core/MigratorConfig.js +++ b/ghost/core/MigratorConfig.js @@ -1,3 +1,4 @@ +/* eslint-disable ghost/filenames/match-regex */ const config = require('./core/shared/config'); const ghostVersion = require('@tryghost/version'); diff --git a/ghost/core/core/boot.js b/ghost/core/core/boot.js index ac3bc46f09..d4a443d9f2 100644 --- a/ghost/core/core/boot.js +++ b/ghost/core/core/boot.js @@ -64,7 +64,7 @@ function notifyServerReady(error) { * @param {object} options.config */ async function initDatabase({config}) { - const DatabaseStateManager = require('./server/data/db/state-manager'); + const DatabaseStateManager = require('./server/data/db/DatabaseStateManager'); const dbStateManager = new DatabaseStateManager({knexMigratorFilePath: config.get('paths:appRoot')}); await dbStateManager.makeReady(); @@ -476,7 +476,7 @@ async function bootGhost({backend = true, frontend = true, server = true} = {}) const rootApp = require('./app')(); if (server) { - const GhostServer = require('./server/ghost-server'); + const GhostServer = require('./server/GhostServer'); ghostServer = new GhostServer({url: config.getSiteUrl(), env: config.get('env'), serverConfig: config.get('server')}); await ghostServer.start(rootApp); bootLogger.log('server started'); diff --git a/ghost/core/core/frontend/services/admin-auth-assets/service.js b/ghost/core/core/frontend/services/admin-auth-assets/AdminAuthAssetsService.js similarity index 100% rename from ghost/core/core/frontend/services/admin-auth-assets/service.js rename to ghost/core/core/frontend/services/admin-auth-assets/AdminAuthAssetsService.js diff --git a/ghost/core/core/frontend/services/admin-auth-assets/index.js b/ghost/core/core/frontend/services/admin-auth-assets/index.js index 2ec3bae910..d89d602adf 100644 --- a/ghost/core/core/frontend/services/admin-auth-assets/index.js +++ b/ghost/core/core/frontend/services/admin-auth-assets/index.js @@ -1,4 +1,4 @@ -const AdminAuthAssetsService = require('./service'); +const AdminAuthAssetsService = require('./AdminAuthAssetsService'); let adminAuthAssets = new AdminAuthAssetsService(); module.exports = adminAuthAssets; diff --git a/ghost/core/core/frontend/services/card-assets/service.js b/ghost/core/core/frontend/services/card-assets/CardAssetService.js similarity index 100% rename from ghost/core/core/frontend/services/card-assets/service.js rename to ghost/core/core/frontend/services/card-assets/CardAssetService.js diff --git a/ghost/core/core/frontend/services/card-assets/index.js b/ghost/core/core/frontend/services/card-assets/index.js index 340777cde1..ac6a7ff837 100644 --- a/ghost/core/core/frontend/services/card-assets/index.js +++ b/ghost/core/core/frontend/services/card-assets/index.js @@ -1,4 +1,4 @@ -const CardAssetService = require('./service'); +const CardAssetService = require('./CardAssetService'); let cardAssetService = new CardAssetService(); module.exports = cardAssetService; diff --git a/ghost/core/core/frontend/services/comment-counts-assets/service.js b/ghost/core/core/frontend/services/comment-counts-assets/CommentCountsAssetsService.js similarity index 100% rename from ghost/core/core/frontend/services/comment-counts-assets/service.js rename to ghost/core/core/frontend/services/comment-counts-assets/CommentCountsAssetsService.js diff --git a/ghost/core/core/frontend/services/comment-counts-assets/index.js b/ghost/core/core/frontend/services/comment-counts-assets/index.js index 3c7d1c4e0f..60dfe0e450 100644 --- a/ghost/core/core/frontend/services/comment-counts-assets/index.js +++ b/ghost/core/core/frontend/services/comment-counts-assets/index.js @@ -1,4 +1,4 @@ -const CommentCountsAssetsService = require('./service'); +const CommentCountsAssetsService = require('./CommentCountsAssetsService'); let commentCountsAssets = new CommentCountsAssetsService(); module.exports = commentCountsAssets; diff --git a/ghost/core/core/frontend/services/member-attribution-assets/service.js b/ghost/core/core/frontend/services/member-attribution-assets/MemberAttributionAssetsService.js similarity index 100% rename from ghost/core/core/frontend/services/member-attribution-assets/service.js rename to ghost/core/core/frontend/services/member-attribution-assets/MemberAttributionAssetsService.js diff --git a/ghost/core/core/frontend/services/member-attribution-assets/index.js b/ghost/core/core/frontend/services/member-attribution-assets/index.js index 04c663f300..07357a89f4 100644 --- a/ghost/core/core/frontend/services/member-attribution-assets/index.js +++ b/ghost/core/core/frontend/services/member-attribution-assets/index.js @@ -1,4 +1,4 @@ -const MemberAttributionAssetsService = require('./service'); +const MemberAttributionAssetsService = require('./MemberAttributionAssetsService'); const memberAttributionAssets = new MemberAttributionAssetsService(); module.exports = memberAttributionAssets; diff --git a/ghost/core/core/frontend/services/routing/router-manager.js b/ghost/core/core/frontend/services/routing/RouterManager.js similarity index 100% rename from ghost/core/core/frontend/services/routing/router-manager.js rename to ghost/core/core/frontend/services/routing/RouterManager.js diff --git a/ghost/core/core/frontend/services/routing/index.js b/ghost/core/core/frontend/services/routing/index.js index 6caabf1831..6f183fbee8 100644 --- a/ghost/core/core/frontend/services/routing/index.js +++ b/ghost/core/core/frontend/services/routing/index.js @@ -1,5 +1,5 @@ const registry = require('./registry'); -const RouterManager = require('./router-manager'); +const RouterManager = require('./RouterManager'); const routerManager = new RouterManager({registry}); module.exports = { diff --git a/ghost/core/core/frontend/services/sitemap/base-generator.js b/ghost/core/core/frontend/services/sitemap/BaseSiteMapGenerator.js similarity index 100% rename from ghost/core/core/frontend/services/sitemap/base-generator.js rename to ghost/core/core/frontend/services/sitemap/BaseSiteMapGenerator.js diff --git a/ghost/core/core/frontend/services/sitemap/page-generator.js b/ghost/core/core/frontend/services/sitemap/PageMapGenerator.js similarity index 79% rename from ghost/core/core/frontend/services/sitemap/page-generator.js rename to ghost/core/core/frontend/services/sitemap/PageMapGenerator.js index 3ac496591c..dfada891cd 100644 --- a/ghost/core/core/frontend/services/sitemap/page-generator.js +++ b/ghost/core/core/frontend/services/sitemap/PageMapGenerator.js @@ -1,5 +1,5 @@ const _ = require('lodash'); -const BaseMapGenerator = require('./base-generator'); +const BaseMapGenerator = require('./BaseSiteMapGenerator'); class PageMapGenerator extends BaseMapGenerator { constructor(opts) { diff --git a/ghost/core/core/frontend/services/sitemap/post-generator.js b/ghost/core/core/frontend/services/sitemap/PostMapGenerator.js similarity index 79% rename from ghost/core/core/frontend/services/sitemap/post-generator.js rename to ghost/core/core/frontend/services/sitemap/PostMapGenerator.js index 20d7018495..1bcb009c18 100644 --- a/ghost/core/core/frontend/services/sitemap/post-generator.js +++ b/ghost/core/core/frontend/services/sitemap/PostMapGenerator.js @@ -1,5 +1,5 @@ const _ = require('lodash'); -const BaseMapGenerator = require('./base-generator'); +const BaseMapGenerator = require('./BaseSiteMapGenerator'); class PostMapGenerator extends BaseMapGenerator { constructor(opts) { diff --git a/ghost/core/core/frontend/services/sitemap/index-generator.js b/ghost/core/core/frontend/services/sitemap/SiteMapIndexGenerator.js similarity index 100% rename from ghost/core/core/frontend/services/sitemap/index-generator.js rename to ghost/core/core/frontend/services/sitemap/SiteMapIndexGenerator.js diff --git a/ghost/core/core/frontend/services/sitemap/manager.js b/ghost/core/core/frontend/services/sitemap/SiteMapManager.js similarity index 90% rename from ghost/core/core/frontend/services/sitemap/manager.js rename to ghost/core/core/frontend/services/sitemap/SiteMapManager.js index 947eb84973..201ebb6c87 100644 --- a/ghost/core/core/frontend/services/sitemap/manager.js +++ b/ghost/core/core/frontend/services/sitemap/SiteMapManager.js @@ -1,10 +1,10 @@ const DomainEvents = require('@tryghost/domain-events'); const {URLResourceUpdatedEvent} = require('@tryghost/dynamic-routing-events'); -const IndexMapGenerator = require('./index-generator'); -const PagesMapGenerator = require('./page-generator'); -const PostsMapGenerator = require('./post-generator'); -const UsersMapGenerator = require('./user-generator'); -const TagsMapGenerator = require('./tag-generator'); +const IndexMapGenerator = require('./SiteMapIndexGenerator'); +const PagesMapGenerator = require('./PageMapGenerator'); +const PostsMapGenerator = require('./PostMapGenerator'); +const UsersMapGenerator = require('./UserMapGenerator'); +const TagsMapGenerator = require('./TagsMapGenerator'); // This uses events from the routing service and the URL service const events = require('../../../server/lib/common/events'); diff --git a/ghost/core/core/frontend/services/sitemap/tag-generator.js b/ghost/core/core/frontend/services/sitemap/TagsMapGenerator.js similarity index 78% rename from ghost/core/core/frontend/services/sitemap/tag-generator.js rename to ghost/core/core/frontend/services/sitemap/TagsMapGenerator.js index 9707e77c3a..79a957ebc8 100644 --- a/ghost/core/core/frontend/services/sitemap/tag-generator.js +++ b/ghost/core/core/frontend/services/sitemap/TagsMapGenerator.js @@ -1,5 +1,5 @@ const _ = require('lodash'); -const BaseMapGenerator = require('./base-generator'); +const BaseMapGenerator = require('./BaseSiteMapGenerator'); class TagsMapGenerator extends BaseMapGenerator { constructor(opts) { diff --git a/ghost/core/core/frontend/services/sitemap/user-generator.js b/ghost/core/core/frontend/services/sitemap/UserMapGenerator.js similarity index 87% rename from ghost/core/core/frontend/services/sitemap/user-generator.js rename to ghost/core/core/frontend/services/sitemap/UserMapGenerator.js index ab62f7a034..decbb6952d 100644 --- a/ghost/core/core/frontend/services/sitemap/user-generator.js +++ b/ghost/core/core/frontend/services/sitemap/UserMapGenerator.js @@ -1,6 +1,6 @@ const _ = require('lodash'); const validator = require('@tryghost/validator'); -const BaseMapGenerator = require('./base-generator'); +const BaseMapGenerator = require('./BaseSiteMapGenerator'); class UserMapGenerator extends BaseMapGenerator { constructor(opts) { diff --git a/ghost/core/core/frontend/services/sitemap/handler.js b/ghost/core/core/frontend/services/sitemap/handler.js index 4898b6b39c..055d572a6a 100644 --- a/ghost/core/core/frontend/services/sitemap/handler.js +++ b/ghost/core/core/frontend/services/sitemap/handler.js @@ -1,5 +1,5 @@ const config = require('../../../shared/config'); -const Manager = require('./manager'); +const Manager = require('./SiteMapManager'); const manager = new Manager(); // Responsible for handling requests for sitemap files diff --git a/ghost/core/core/frontend/services/theme-engine/i18n/i18n.js b/ghost/core/core/frontend/services/theme-engine/i18n/I18n.js similarity index 100% rename from ghost/core/core/frontend/services/theme-engine/i18n/i18n.js rename to ghost/core/core/frontend/services/theme-engine/i18n/I18n.js diff --git a/ghost/core/core/frontend/services/theme-engine/i18n/theme-i18n.js b/ghost/core/core/frontend/services/theme-engine/i18n/ThemeI18n.js similarity index 98% rename from ghost/core/core/frontend/services/theme-engine/i18n/theme-i18n.js rename to ghost/core/core/frontend/services/theme-engine/i18n/ThemeI18n.js index 6def464b5b..a8e66d683e 100644 --- a/ghost/core/core/frontend/services/theme-engine/i18n/theme-i18n.js +++ b/ghost/core/core/frontend/services/theme-engine/i18n/ThemeI18n.js @@ -1,6 +1,6 @@ const errors = require('@tryghost/errors'); const logging = require('@tryghost/logging'); -const I18n = require('./i18n'); +const I18n = require('./I18n'); class ThemeI18n extends I18n { /** diff --git a/ghost/core/core/frontend/services/theme-engine/i18n/index.js b/ghost/core/core/frontend/services/theme-engine/i18n/index.js index 9ce72b324b..a1cd3b0704 100644 --- a/ghost/core/core/frontend/services/theme-engine/i18n/index.js +++ b/ghost/core/core/frontend/services/theme-engine/i18n/index.js @@ -1,6 +1,6 @@ const config = require('../../../../shared/config'); -const ThemeI18n = require('./theme-i18n'); +const ThemeI18n = require('./ThemeI18n'); module.exports = new ThemeI18n({basePath: config.getContentPath('themes')}); module.exports.ThemeI18n = ThemeI18n; diff --git a/ghost/core/core/frontend/web/routes.js b/ghost/core/core/frontend/web/routes.js index 46b27ce956..d66e8fb1e7 100644 --- a/ghost/core/core/frontend/web/routes.js +++ b/ghost/core/core/frontend/web/routes.js @@ -3,7 +3,7 @@ const routing = require('../services/routing'); /** * - * @param {import('../services/routing/router-manager').RouterConfig} routerConfig + * @param {import('../services/routing/RouterManager').RouterConfig} routerConfig * @returns {import('express').Router} */ module.exports = function siteRoutes(routerConfig) { diff --git a/ghost/core/core/frontend/web/site.js b/ghost/core/core/frontend/web/site.js index a2c6bc84da..b4e241da21 100644 --- a/ghost/core/core/frontend/web/site.js +++ b/ghost/core/core/frontend/web/site.js @@ -33,7 +33,7 @@ function SiteRouter(req, res, next) { /** * - * @param {import('../services/routing/router-manager').RouterConfig} routerConfig + * @param {import('../services/routing/RouterManager').RouterConfig} routerConfig * @returns {import('express').Application} */ module.exports = function setupSiteApp(routerConfig) { @@ -172,7 +172,7 @@ module.exports = function setupSiteApp(routerConfig) { /** * see https://github.com/expressjs/express/issues/2596 - * @param {import('../services/routing/router-manager').RouterConfig} routerConfig + * @param {import('../services/routing/RouterManager').RouterConfig} routerConfig */ module.exports.reload = (routerConfig) => { debug('reloading'); diff --git a/ghost/core/core/server/ghost-server.js b/ghost/core/core/server/GhostServer.js similarity index 100% rename from ghost/core/core/server/ghost-server.js rename to ghost/core/core/server/GhostServer.js diff --git a/ghost/core/core/server/adapters/cache/Memory.js b/ghost/core/core/server/adapters/cache/MemoryCache.js similarity index 100% rename from ghost/core/core/server/adapters/cache/Memory.js rename to ghost/core/core/server/adapters/cache/MemoryCache.js diff --git a/ghost/core/core/server/adapters/cache/Redis.js b/ghost/core/core/server/adapters/cache/Redis.js index be0d1bc7f4..0235482e5b 100644 --- a/ghost/core/core/server/adapters/cache/Redis.js +++ b/ghost/core/core/server/adapters/cache/Redis.js @@ -1,3 +1,4 @@ +/* eslint-disable ghost/filenames/match-regex */ const RedisCache = require('@tryghost/adapter-cache-redis'); module.exports = RedisCache; diff --git a/ghost/core/core/server/adapters/cache/MemoryTTL.js b/ghost/core/core/server/adapters/cache/memory-ttl.js similarity index 100% rename from ghost/core/core/server/adapters/cache/MemoryTTL.js rename to ghost/core/core/server/adapters/cache/memory-ttl.js diff --git a/ghost/core/core/server/adapters/scheduling/post-scheduling/post-scheduler.js b/ghost/core/core/server/adapters/scheduling/post-scheduling/PostScheduler.js similarity index 100% rename from ghost/core/core/server/adapters/scheduling/post-scheduling/post-scheduler.js rename to ghost/core/core/server/adapters/scheduling/post-scheduling/PostScheduler.js diff --git a/ghost/core/core/server/adapters/scheduling/post-scheduling/index.js b/ghost/core/core/server/adapters/scheduling/post-scheduling/index.js index 6f512ff338..cf5659e5e0 100644 --- a/ghost/core/core/server/adapters/scheduling/post-scheduling/index.js +++ b/ghost/core/core/server/adapters/scheduling/post-scheduling/index.js @@ -1,7 +1,7 @@ const Promise = require('bluebird'); const events = require('../../../lib/common/events'); const localUtils = require('../utils'); -const PostScheduler = require('./post-scheduler'); +const PostScheduler = require('./PostScheduler'); const getSchedulerIntegration = require('./scheduler-intergation'); /** diff --git a/ghost/core/core/server/adapters/scheduling/SchedulingBase.js b/ghost/core/core/server/adapters/scheduling/scheduling-base.js similarity index 100% rename from ghost/core/core/server/adapters/scheduling/SchedulingBase.js rename to ghost/core/core/server/adapters/scheduling/scheduling-base.js diff --git a/ghost/core/core/server/adapters/scheduling/SchedulingDefault.js b/ghost/core/core/server/adapters/scheduling/scheduling-default.js similarity index 99% rename from ghost/core/core/server/adapters/scheduling/SchedulingDefault.js rename to ghost/core/core/server/adapters/scheduling/scheduling-default.js index b54a336c4b..d0ef1bfcd7 100644 --- a/ghost/core/core/server/adapters/scheduling/SchedulingDefault.js +++ b/ghost/core/core/server/adapters/scheduling/scheduling-default.js @@ -1,7 +1,7 @@ const util = require('util'); const moment = require('moment'); const debug = require('@tryghost/debug')('scheduling-default'); -const SchedulingBase = require('./SchedulingBase'); +const SchedulingBase = require('./scheduling-base'); const logging = require('@tryghost/logging'); const errors = require('@tryghost/errors'); const request = require('@tryghost/request'); diff --git a/ghost/core/core/server/adapters/sso/Default.js b/ghost/core/core/server/adapters/sso/DefaultSSOAdapter.js similarity index 89% rename from ghost/core/core/server/adapters/sso/Default.js rename to ghost/core/core/server/adapters/sso/DefaultSSOAdapter.js index 1ea46f5ba0..6cf2837c2e 100644 --- a/ghost/core/core/server/adapters/sso/Default.js +++ b/ghost/core/core/server/adapters/sso/DefaultSSOAdapter.js @@ -1,4 +1,4 @@ -const Base = require('./Base'); +const Base = require('./SSOBase'); module.exports = class DefaultSSOAdapter extends Base { constructor() { diff --git a/ghost/core/core/server/adapters/sso/Base.js b/ghost/core/core/server/adapters/sso/SSOBase.js similarity index 100% rename from ghost/core/core/server/adapters/sso/Base.js rename to ghost/core/core/server/adapters/sso/SSOBase.js diff --git a/ghost/core/core/server/adapters/storage/LocalMediaStorage.js b/ghost/core/core/server/adapters/storage/LocalMediaStorage.js index 9740570ae5..f1de4020c8 100644 --- a/ghost/core/core/server/adapters/storage/LocalMediaStorage.js +++ b/ghost/core/core/server/adapters/storage/LocalMediaStorage.js @@ -10,7 +10,7 @@ const messages = { cannotRead: 'Could not read media file: {file}' }; -class LocalMediaStore extends LocalStorageBase { +class LocalMediaStorage extends LocalStorageBase { constructor() { super({ storagePath: config.getContentPath('media'), @@ -21,4 +21,4 @@ class LocalMediaStore extends LocalStorageBase { } } -module.exports = LocalMediaStore; +module.exports = LocalMediaStorage; diff --git a/ghost/core/core/server/api/endpoints/authentication.js b/ghost/core/core/server/api/endpoints/authentication.js index 9e05a99869..753bd8edad 100644 --- a/ghost/core/core/server/api/endpoints/authentication.js +++ b/ghost/core/core/server/api/endpoints/authentication.js @@ -10,7 +10,7 @@ const invitations = require('../../services/invitations'); const dbBackup = require('../../data/db/backup'); const apiMail = require('./index').mail; const apiSettings = require('./index').settings; -const UsersService = require('../../services/users'); +const UsersService = require('../../services/Users'); const userService = new UsersService({dbBackup, models, auth, apiMail, apiSettings}); const {deleteAllSessions} = require('../../services/auth/session'); diff --git a/ghost/core/core/server/api/endpoints/users.js b/ghost/core/core/server/api/endpoints/users.js index 42ac731230..90465613c6 100644 --- a/ghost/core/core/server/api/endpoints/users.js +++ b/ghost/core/core/server/api/endpoints/users.js @@ -7,7 +7,7 @@ const dbBackup = require('../../data/db/backup'); const auth = require('../../services/auth'); const apiMail = require('./index').mail; const apiSettings = require('./index').settings; -const UsersService = require('../../services/users'); +const UsersService = require('../../services/Users'); const userService = new UsersService({dbBackup, models, auth, apiMail, apiSettings}); const ALLOWED_INCLUDES = ['count.posts', 'permissions', 'roles', 'roles.permissions']; const UNSAFE_ATTRS = ['status', 'roles']; diff --git a/ghost/core/core/server/api/endpoints/utils/validators/input/password_reset.js b/ghost/core/core/server/api/endpoints/utils/validators/input/password_reset.js index f63c1da98d..b759b77c28 100644 --- a/ghost/core/core/server/api/endpoints/utils/validators/input/password_reset.js +++ b/ghost/core/core/server/api/endpoints/utils/validators/input/password_reset.js @@ -1,3 +1,4 @@ +/* eslint-disable ghost/filenames/match-regex */ const Promise = require('bluebird'); const validator = require('@tryghost/validator'); const debug = require('@tryghost/debug')('api:endpoints:utils:validators:input:passwordreset'); diff --git a/ghost/core/core/server/data/db/state-manager.js b/ghost/core/core/server/data/db/DatabaseStateManager.js similarity index 100% rename from ghost/core/core/server/data/db/state-manager.js rename to ghost/core/core/server/data/db/DatabaseStateManager.js diff --git a/ghost/core/core/server/data/importer/importers/data/base.js b/ghost/core/core/server/data/importer/importers/data/Base.js similarity index 100% rename from ghost/core/core/server/data/importer/importers/data/base.js rename to ghost/core/core/server/data/importer/importers/data/Base.js diff --git a/ghost/core/core/server/data/importer/importers/data/custom-theme-settings.js b/ghost/core/core/server/data/importer/importers/data/CustomThemeSettingsImporter.js similarity index 98% rename from ghost/core/core/server/data/importer/importers/data/custom-theme-settings.js rename to ghost/core/core/server/data/importer/importers/data/CustomThemeSettingsImporter.js index 904354dcdc..50fd52c0cc 100644 --- a/ghost/core/core/server/data/importer/importers/data/custom-theme-settings.js +++ b/ghost/core/core/server/data/importer/importers/data/CustomThemeSettingsImporter.js @@ -1,6 +1,6 @@ const _ = require('lodash'); const debug = require('@tryghost/debug')('importer:roles'); -const BaseImporter = require('./base'); +const BaseImporter = require('./Base'); const models = require('../../../../models'); const {activate} = require('../../../../services/themes/activate'); const {sequence} = require('@tryghost/promise'); diff --git a/ghost/core/core/server/data/importer/importers/data/newsletters.js b/ghost/core/core/server/data/importer/importers/data/NewslettersImporter.js similarity index 96% rename from ghost/core/core/server/data/importer/importers/data/newsletters.js rename to ghost/core/core/server/data/importer/importers/data/NewslettersImporter.js index 90d7ce12f6..3f747ebb22 100644 --- a/ghost/core/core/server/data/importer/importers/data/newsletters.js +++ b/ghost/core/core/server/data/importer/importers/data/NewslettersImporter.js @@ -1,6 +1,6 @@ const debug = require('@tryghost/debug')('importer:newsletters'); const _ = require('lodash'); -const BaseImporter = require('./base'); +const BaseImporter = require('./Base'); const models = require('../../../../models'); const ignoredColumns = ['sender_email']; diff --git a/ghost/core/core/server/data/importer/importers/data/posts.js b/ghost/core/core/server/data/importer/importers/data/PostsImporter.js similarity index 99% rename from ghost/core/core/server/data/importer/importers/data/posts.js rename to ghost/core/core/server/data/importer/importers/data/PostsImporter.js index b6cc4c2c19..7ee75a0c92 100644 --- a/ghost/core/core/server/data/importer/importers/data/posts.js +++ b/ghost/core/core/server/data/importer/importers/data/PostsImporter.js @@ -1,7 +1,7 @@ const debug = require('@tryghost/debug')('importer:posts'); const _ = require('lodash'); const uuid = require('uuid'); -const BaseImporter = require('./base'); +const BaseImporter = require('./Base'); const mobiledocLib = require('../../../../lib/mobiledoc'); const validator = require('@tryghost/validator'); const postsMetaSchema = require('../../../schema').tables.posts_meta; diff --git a/ghost/core/core/server/data/importer/importers/data/products.js b/ghost/core/core/server/data/importer/importers/data/ProductsImporter.js similarity index 99% rename from ghost/core/core/server/data/importer/importers/data/products.js rename to ghost/core/core/server/data/importer/importers/data/ProductsImporter.js index f753cb6b65..200be77560 100644 --- a/ghost/core/core/server/data/importer/importers/data/products.js +++ b/ghost/core/core/server/data/importer/importers/data/ProductsImporter.js @@ -1,5 +1,5 @@ const _ = require('lodash'); -const BaseImporter = require('./base'); +const BaseImporter = require('./Base'); const models = require('../../../../models'); const debug = require('@tryghost/debug')('importer:products'); diff --git a/ghost/core/core/server/data/importer/importers/data/revue-subscriber.js b/ghost/core/core/server/data/importer/importers/data/RevueSubscriberImporter.js similarity index 97% rename from ghost/core/core/server/data/importer/importers/data/revue-subscriber.js rename to ghost/core/core/server/data/importer/importers/data/RevueSubscriberImporter.js index f75301be62..89fef58f69 100644 --- a/ghost/core/core/server/data/importer/importers/data/revue-subscriber.js +++ b/ghost/core/core/server/data/importer/importers/data/RevueSubscriberImporter.js @@ -1,5 +1,5 @@ const debug = require('@tryghost/debug')('importer:revue-subscriber'); -const BaseImporter = require('./base'); +const BaseImporter = require('./Base'); const papaparse = require('papaparse'); const path = require('path'); diff --git a/ghost/core/core/server/data/importer/importers/data/roles.js b/ghost/core/core/server/data/importer/importers/data/RolesImporter.js similarity index 93% rename from ghost/core/core/server/data/importer/importers/data/roles.js rename to ghost/core/core/server/data/importer/importers/data/RolesImporter.js index 20e1b0d375..bf94ecf67a 100644 --- a/ghost/core/core/server/data/importer/importers/data/roles.js +++ b/ghost/core/core/server/data/importer/importers/data/RolesImporter.js @@ -1,5 +1,5 @@ const debug = require('@tryghost/debug')('importer:roles'); -const BaseImporter = require('./base'); +const BaseImporter = require('./Base'); class RolesImporter extends BaseImporter { constructor(allDataFromFile) { diff --git a/ghost/core/core/server/data/importer/importers/data/settings.js b/ghost/core/core/server/data/importer/importers/data/SettingsImporter.js similarity index 99% rename from ghost/core/core/server/data/importer/importers/data/settings.js rename to ghost/core/core/server/data/importer/importers/data/SettingsImporter.js index 35c1877808..4c6ed09fb5 100644 --- a/ghost/core/core/server/data/importer/importers/data/settings.js +++ b/ghost/core/core/server/data/importer/importers/data/SettingsImporter.js @@ -1,7 +1,7 @@ const debug = require('@tryghost/debug')('importer:settings'); const ObjectId = require('bson-objectid').default; const _ = require('lodash'); -const BaseImporter = require('./base'); +const BaseImporter = require('./Base'); const models = require('../../../../models'); const defaultSettings = require('../../../schema').defaultSettings; const keyGroupMapper = require('../../../../api/endpoints/utils/serializers/input/utils/settings-key-group-mapper'); diff --git a/ghost/core/core/server/data/importer/importers/data/stripe-prices.js b/ghost/core/core/server/data/importer/importers/data/StripePricesImporter.js similarity index 98% rename from ghost/core/core/server/data/importer/importers/data/stripe-prices.js rename to ghost/core/core/server/data/importer/importers/data/StripePricesImporter.js index b2018f13ba..e84c8a41c2 100644 --- a/ghost/core/core/server/data/importer/importers/data/stripe-prices.js +++ b/ghost/core/core/server/data/importer/importers/data/StripePricesImporter.js @@ -1,6 +1,6 @@ const _ = require('lodash'); const debug = require('@tryghost/debug')('importer:stripeprices'); -const BaseImporter = require('./base'); +const BaseImporter = require('./Base'); const models = require('../../../../models'); class StripePricesImporter extends BaseImporter { diff --git a/ghost/core/core/server/data/importer/importers/data/stripe-products.js b/ghost/core/core/server/data/importer/importers/data/StripeProductsImporter.js similarity index 98% rename from ghost/core/core/server/data/importer/importers/data/stripe-products.js rename to ghost/core/core/server/data/importer/importers/data/StripeProductsImporter.js index 403c5e657b..e450aff1a8 100644 --- a/ghost/core/core/server/data/importer/importers/data/stripe-products.js +++ b/ghost/core/core/server/data/importer/importers/data/StripeProductsImporter.js @@ -1,6 +1,6 @@ const _ = require('lodash'); const debug = require('@tryghost/debug')('importer:stripeproducts'); -const BaseImporter = require('./base'); +const BaseImporter = require('./Base'); const models = require('../../../../models'); class StripeProductsImporter extends BaseImporter { diff --git a/ghost/core/core/server/data/importer/importers/data/tags.js b/ghost/core/core/server/data/importer/importers/data/TagsImporter.js similarity index 98% rename from ghost/core/core/server/data/importer/importers/data/tags.js rename to ghost/core/core/server/data/importer/importers/data/TagsImporter.js index 4a8d1a2333..2a9898e38b 100644 --- a/ghost/core/core/server/data/importer/importers/data/tags.js +++ b/ghost/core/core/server/data/importer/importers/data/TagsImporter.js @@ -1,6 +1,6 @@ const debug = require('@tryghost/debug')('importer:tags'); const _ = require('lodash'); -const BaseImporter = require('./base'); +const BaseImporter = require('./Base'); const models = require('../../../../models'); const {sequence} = require('@tryghost/promise'); diff --git a/ghost/core/core/server/data/importer/importers/data/users.js b/ghost/core/core/server/data/importer/importers/data/UsersImporter.js similarity index 98% rename from ghost/core/core/server/data/importer/importers/data/users.js rename to ghost/core/core/server/data/importer/importers/data/UsersImporter.js index 9087fb4c9e..4a19d48d37 100644 --- a/ghost/core/core/server/data/importer/importers/data/users.js +++ b/ghost/core/core/server/data/importer/importers/data/UsersImporter.js @@ -1,6 +1,6 @@ const debug = require('@tryghost/debug')('importer:users'); const _ = require('lodash'); -const BaseImporter = require('./base'); +const BaseImporter = require('./Base'); const models = require('../../../../models'); const limitService = require('../../../../services/limits'); diff --git a/ghost/core/core/server/data/importer/importers/data/data-importer.js b/ghost/core/core/server/data/importer/importers/data/data-importer.js index 74d110b720..e1778a67d3 100644 --- a/ghost/core/core/server/data/importer/importers/data/data-importer.js +++ b/ghost/core/core/server/data/importer/importers/data/data-importer.js @@ -5,17 +5,17 @@ const {IncorrectUsageError} = require('@tryghost/errors'); const debug = require('@tryghost/debug')('importer:data'); const {sequence} = require('@tryghost/promise'); const models = require('../../../../models'); -const PostsImporter = require('./posts'); -const TagsImporter = require('./tags'); -const SettingsImporter = require('./settings'); -const UsersImporter = require('./users'); -const NewslettersImporter = require('./newsletters'); -const ProductsImporter = require('./products'); -const StripeProductsImporter = require('./stripe-products'); -const StripePricesImporter = require('./stripe-prices'); -const CustomThemeSettingsImporter = require('./custom-theme-settings'); -const RevueSubscriberImporter = require('./revue-subscriber'); -const RolesImporter = require('./roles'); +const PostsImporter = require('./PostsImporter'); +const TagsImporter = require('./TagsImporter'); +const SettingsImporter = require('./SettingsImporter'); +const UsersImporter = require('./UsersImporter'); +const NewslettersImporter = require('./NewslettersImporter'); +const ProductsImporter = require('./ProductsImporter'); +const StripeProductsImporter = require('./StripeProductsImporter'); +const StripePricesImporter = require('./StripePricesImporter'); +const CustomThemeSettingsImporter = require('./CustomThemeSettingsImporter'); +const RevueSubscriberImporter = require('./RevueSubscriberImporter'); +const RolesImporter = require('./RolesImporter'); const {slugify} = require('@tryghost/string/lib'); let importers = {}; diff --git a/ghost/core/core/server/data/migrations/hooks/migrate/afterEach.js b/ghost/core/core/server/data/migrations/hooks/migrate/afterEach.js index 25e03f4eaa..6c856975c1 100644 --- a/ghost/core/core/server/data/migrations/hooks/migrate/afterEach.js +++ b/ghost/core/core/server/data/migrations/hooks/migrate/afterEach.js @@ -1,3 +1,4 @@ +/* eslint-disable ghost/filenames/match-regex */ const Promise = require('bluebird'); module.exports = function afterEach() { diff --git a/ghost/core/core/server/data/migrations/hooks/migrate/beforeEach.js b/ghost/core/core/server/data/migrations/hooks/migrate/beforeEach.js index 19ac899053..914968f611 100644 --- a/ghost/core/core/server/data/migrations/hooks/migrate/beforeEach.js +++ b/ghost/core/core/server/data/migrations/hooks/migrate/beforeEach.js @@ -1,3 +1,4 @@ +/* eslint-disable ghost/filenames/match-regex */ const Promise = require('bluebird'); module.exports = function beforeEach() { diff --git a/ghost/core/core/server/data/migrations/versions/4.4/02-migrate-members-signup-access.js b/ghost/core/core/server/data/migrations/versions/4.4/02-migrate-members-signup-access.js index 7d1ab2f177..6d57209877 100644 --- a/ghost/core/core/server/data/migrations/versions/4.4/02-migrate-members-signup-access.js +++ b/ghost/core/core/server/data/migrations/versions/4.4/02-migrate-members-signup-access.js @@ -1,6 +1,6 @@ const logging = require('@tryghost/logging'); const {createTransactionalMigration} = require('../../utils'); -const MembersConfigProvider = require('../../../../services/members/config'); +const MembersConfigProvider = require('../../../../services/members/MembersConfigProvider'); const settingsCache = require('../../../../../shared/settings-cache'); const config = require('../../../../../shared/config'); diff --git a/ghost/core/core/server/data/schema/fixtures/fixture-manager.js b/ghost/core/core/server/data/schema/fixtures/FixtureManager.js similarity index 100% rename from ghost/core/core/server/data/schema/fixtures/fixture-manager.js rename to ghost/core/core/server/data/schema/fixtures/FixtureManager.js diff --git a/ghost/core/core/server/data/schema/fixtures/index.js b/ghost/core/core/server/data/schema/fixtures/index.js index f6689baad0..7538c34c70 100644 --- a/ghost/core/core/server/data/schema/fixtures/index.js +++ b/ghost/core/core/server/data/schema/fixtures/index.js @@ -1,4 +1,4 @@ -const FixtureManager = require('./fixture-manager'); +const FixtureManager = require('./FixtureManager'); const config = require('../../../../shared/config'); const fixturePath = config.get('paths').fixtures; diff --git a/ghost/core/core/server/lib/image/blog-icon.js b/ghost/core/core/server/lib/image/BlogIcon.js similarity index 100% rename from ghost/core/core/server/lib/image/blog-icon.js rename to ghost/core/core/server/lib/image/BlogIcon.js diff --git a/ghost/core/core/server/lib/image/cached-image-size-from-url.js b/ghost/core/core/server/lib/image/CachedImageSizeFromUrl.js similarity index 100% rename from ghost/core/core/server/lib/image/cached-image-size-from-url.js rename to ghost/core/core/server/lib/image/CachedImageSizeFromUrl.js diff --git a/ghost/core/core/server/lib/image/gravatar.js b/ghost/core/core/server/lib/image/Gravatar.js similarity index 100% rename from ghost/core/core/server/lib/image/gravatar.js rename to ghost/core/core/server/lib/image/Gravatar.js diff --git a/ghost/core/core/server/lib/image/image-size.js b/ghost/core/core/server/lib/image/ImageSize.js similarity index 100% rename from ghost/core/core/server/lib/image/image-size.js rename to ghost/core/core/server/lib/image/ImageSize.js diff --git a/ghost/core/core/server/lib/image/image-utils.js b/ghost/core/core/server/lib/image/ImageUtils.js similarity index 75% rename from ghost/core/core/server/lib/image/image-utils.js rename to ghost/core/core/server/lib/image/ImageUtils.js index 52221ea32f..08bbb46903 100644 --- a/ghost/core/core/server/lib/image/image-utils.js +++ b/ghost/core/core/server/lib/image/ImageUtils.js @@ -1,7 +1,7 @@ -const BlogIcon = require('./blog-icon'); -const CachedImageSizeFromUrl = require('./cached-image-size-from-url'); -const Gravatar = require('./gravatar'); -const ImageSize = require('./image-size'); +const BlogIcon = require('./BlogIcon'); +const CachedImageSizeFromUrl = require('./CachedImageSizeFromUrl'); +const Gravatar = require('./Gravatar'); +const ImageSize = require('./ImageSize'); class ImageUtils { constructor({config, urlUtils, settingsCache, storageUtils, storage, validator, request, cacheStore}) { diff --git a/ghost/core/core/server/lib/image/index.js b/ghost/core/core/server/lib/image/index.js index 8a4cc5d5f3..f5022573e7 100644 --- a/ghost/core/core/server/lib/image/index.js +++ b/ghost/core/core/server/lib/image/index.js @@ -5,7 +5,7 @@ const storageUtils = require('../../adapters/storage/utils'); const validator = require('@tryghost/validator'); const config = require('../../../shared/config'); const settingsCache = require('../../../shared/settings-cache'); -const ImageUtils = require('./image-utils'); +const ImageUtils = require('./ImageUtils'); const adapterManager = require('../../services/adapter-manager'); diff --git a/ghost/core/core/server/services/users.js b/ghost/core/core/server/services/Users.js similarity index 100% rename from ghost/core/core/server/services/users.js rename to ghost/core/core/server/services/Users.js diff --git a/ghost/core/core/server/services/adapter-manager/index.js b/ghost/core/core/server/services/adapter-manager/index.js index f862c3a508..ac535381f4 100644 --- a/ghost/core/core/server/services/adapter-manager/index.js +++ b/ghost/core/core/server/services/adapter-manager/index.js @@ -13,8 +13,8 @@ const adapterManager = new AdapterManager({ }); adapterManager.registerAdapter('storage', require('ghost-storage-base')); -adapterManager.registerAdapter('scheduling', require('../../adapters/scheduling/SchedulingBase')); -adapterManager.registerAdapter('sso', require('../../adapters/sso/Base')); +adapterManager.registerAdapter('scheduling', require('../../adapters/scheduling/scheduling-base')); +adapterManager.registerAdapter('sso', require('../../adapters/sso/SSOBase')); adapterManager.registerAdapter('cache', require('@tryghost/adapter-base-cache')); module.exports = { diff --git a/ghost/core/core/server/services/auth/session/store.js b/ghost/core/core/server/services/auth/session/SessionStore.js similarity index 100% rename from ghost/core/core/server/services/auth/session/store.js rename to ghost/core/core/server/services/auth/session/SessionStore.js diff --git a/ghost/core/core/server/services/auth/session/express-session.js b/ghost/core/core/server/services/auth/session/express-session.js index 060d7c8a8e..095a0a54af 100644 --- a/ghost/core/core/server/services/auth/session/express-session.js +++ b/ghost/core/core/server/services/auth/session/express-session.js @@ -6,7 +6,7 @@ const settingsCache = require('../../../../shared/settings-cache'); const models = require('../../../models'); const urlUtils = require('../../../../shared/url-utils'); -const SessionStore = require('./store'); +const SessionStore = require('./SessionStore'); const sessionStore = new SessionStore(models.Session); let unoExpressSessionMiddleware; diff --git a/ghost/core/core/server/services/comments/controller.js b/ghost/core/core/server/services/comments/CommentsController.js similarity index 97% rename from ghost/core/core/server/services/comments/controller.js rename to ghost/core/core/server/services/comments/CommentsController.js index 613aeb7307..3463a3f9bb 100644 --- a/ghost/core/core/server/services/comments/controller.js +++ b/ghost/core/core/server/services/comments/CommentsController.js @@ -15,8 +15,8 @@ const messages = { module.exports = class CommentsController { /** - * @param {import('./service')} service - * @param {import('./stats')} stats + * @param {import('./CommentsService')} service + * @param {import('./CommentsStatsService')} stats */ constructor(service, stats) { this.service = service; diff --git a/ghost/core/core/server/services/comments/service.js b/ghost/core/core/server/services/comments/CommentsService.js similarity index 99% rename from ghost/core/core/server/services/comments/service.js rename to ghost/core/core/server/services/comments/CommentsService.js index 3bfba50087..b9049fb6d1 100644 --- a/ghost/core/core/server/services/comments/service.js +++ b/ghost/core/core/server/services/comments/CommentsService.js @@ -25,7 +25,7 @@ class CommentsService { /** @private */ this.contentGating = contentGating; - const Emails = require('./emails'); + const Emails = require('./CommentsServiceEmails'); /** @private */ this.emails = new Emails({ config, diff --git a/ghost/core/core/server/services/comments/emails.js b/ghost/core/core/server/services/comments/CommentsServiceEmails.js similarity index 100% rename from ghost/core/core/server/services/comments/emails.js rename to ghost/core/core/server/services/comments/CommentsServiceEmails.js diff --git a/ghost/core/core/server/services/comments/stats.js b/ghost/core/core/server/services/comments/CommentsStatsService.js similarity index 100% rename from ghost/core/core/server/services/comments/stats.js rename to ghost/core/core/server/services/comments/CommentsStatsService.js diff --git a/ghost/core/core/server/services/comments/index.js b/ghost/core/core/server/services/comments/index.js index 19961a5139..e5ac1d6b9b 100644 --- a/ghost/core/core/server/services/comments/index.js +++ b/ghost/core/core/server/services/comments/index.js @@ -1,8 +1,8 @@ class CommentsServiceWrapper { init() { - const CommentsService = require('./service'); - const CommentsController = require('./controller'); - const CommentsStats = require('./stats'); + const CommentsService = require('./CommentsService'); + const CommentsController = require('./CommentsController'); + const CommentsStats = require('./CommentsStatsService'); const config = require('../../../shared/config'); const logging = require('@tryghost/logging'); diff --git a/ghost/core/core/server/services/custom-redirects/api.js b/ghost/core/core/server/services/custom-redirects/CustomRedirectsAPI.js similarity index 100% rename from ghost/core/core/server/services/custom-redirects/api.js rename to ghost/core/core/server/services/custom-redirects/CustomRedirectsAPI.js diff --git a/ghost/core/core/server/services/custom-redirects/index.js b/ghost/core/core/server/services/custom-redirects/index.js index 18cf5c4b6b..e4e0fc3271 100644 --- a/ghost/core/core/server/services/custom-redirects/index.js +++ b/ghost/core/core/server/services/custom-redirects/index.js @@ -2,7 +2,7 @@ const config = require('../../../shared/config'); const urlUtils = require('../../../shared/url-utils'); const DynamicRedirectManager = require('@tryghost/express-dynamic-redirects'); -const CustomRedirectsAPI = require('./api'); +const CustomRedirectsAPI = require('./CustomRedirectsAPI'); const validation = require('./validation'); const {getBackupRedirectsFilePath} = require('./utils'); diff --git a/ghost/core/core/server/services/email-analytics/wrapper.js b/ghost/core/core/server/services/email-analytics/EmailAnalyticsServiceWrapper.js similarity index 100% rename from ghost/core/core/server/services/email-analytics/wrapper.js rename to ghost/core/core/server/services/email-analytics/EmailAnalyticsServiceWrapper.js diff --git a/ghost/core/core/server/services/email-analytics/index.js b/ghost/core/core/server/services/email-analytics/index.js index ceb1e72354..b6ae5ea65f 100644 --- a/ghost/core/core/server/services/email-analytics/index.js +++ b/ghost/core/core/server/services/email-analytics/index.js @@ -1,3 +1,3 @@ -const EmailAnalyticsServiceWrapper = require('./wrapper'); +const EmailAnalyticsServiceWrapper = require('./EmailAnalyticsServiceWrapper'); module.exports = new EmailAnalyticsServiceWrapper(); diff --git a/ghost/core/core/server/services/email-service/wrapper.js b/ghost/core/core/server/services/email-service/EmailServiceWrapper.js similarity index 96% rename from ghost/core/core/server/services/email-service/wrapper.js rename to ghost/core/core/server/services/email-service/EmailServiceWrapper.js index a7a053541f..0038506392 100644 --- a/ghost/core/core/server/services/email-service/wrapper.js +++ b/ghost/core/core/server/services/email-service/EmailServiceWrapper.js @@ -1,5 +1,5 @@ const logging = require('@tryghost/logging'); -const url = require('../../../server/api/endpoints/utils/serializers/output/utils/url'); +const url = require('../../api/endpoints/utils/serializers/output/utils/url'); class EmailServiceWrapper { getPostUrl(post) { @@ -18,7 +18,7 @@ class EmailServiceWrapper { const MailgunClient = require('@tryghost/mailgun-client'); const configService = require('../../../shared/config'); const settingsCache = require('../../../shared/settings-cache'); - const settingsHelpers = require('../../services/settings-helpers'); + const settingsHelpers = require('../settings-helpers'); const jobsService = require('../jobs'); const membersService = require('../members'); const db = require('../../data/db'); diff --git a/ghost/core/core/server/services/email-service/index.js b/ghost/core/core/server/services/email-service/index.js index 1500b291b3..835d2603a0 100644 --- a/ghost/core/core/server/services/email-service/index.js +++ b/ghost/core/core/server/services/email-service/index.js @@ -1,3 +1,3 @@ -const EmailServiceWrapper = require('./wrapper'); +const EmailServiceWrapper = require('./EmailServiceWrapper'); module.exports = new EmailServiceWrapper(); diff --git a/ghost/core/core/server/services/explore/service.js b/ghost/core/core/server/services/explore/ExploreService.js similarity index 100% rename from ghost/core/core/server/services/explore/service.js rename to ghost/core/core/server/services/explore/ExploreService.js diff --git a/ghost/core/core/server/services/explore/index.js b/ghost/core/core/server/services/explore/index.js index 46ce499159..7c79e98ff3 100644 --- a/ghost/core/core/server/services/explore/index.js +++ b/ghost/core/core/server/services/explore/index.js @@ -1,4 +1,4 @@ -const ExploreService = require('./service'); +const ExploreService = require('./ExploreService'); const MembersService = require('../members'); const PostsService = require('../posts/posts-service')(); diff --git a/ghost/core/core/server/services/frontend-data-service/frontend-data-service.js b/ghost/core/core/server/services/frontend-data-service/FrontendDataService.js similarity index 100% rename from ghost/core/core/server/services/frontend-data-service/frontend-data-service.js rename to ghost/core/core/server/services/frontend-data-service/FrontendDataService.js diff --git a/ghost/core/core/server/services/frontend-data-service/index.js b/ghost/core/core/server/services/frontend-data-service/index.js index 5d38c77010..1407ff5ab2 100644 --- a/ghost/core/core/server/services/frontend-data-service/index.js +++ b/ghost/core/core/server/services/frontend-data-service/index.js @@ -1,5 +1,5 @@ const models = require('../../models'); -const FrontendDataService = require('./frontend-data-service'); +const FrontendDataService = require('./FrontendDataService'); module.exports.init = () => { return new FrontendDataService({IntegrationModel: models.Integration}); diff --git a/ghost/core/core/server/services/invites/invites.js b/ghost/core/core/server/services/invites/Invites.js similarity index 100% rename from ghost/core/core/server/services/invites/invites.js rename to ghost/core/core/server/services/invites/Invites.js diff --git a/ghost/core/core/server/services/invites/index.js b/ghost/core/core/server/services/invites/index.js index 1716cde3a7..84aee0491f 100644 --- a/ghost/core/core/server/services/invites/index.js +++ b/ghost/core/core/server/services/invites/index.js @@ -2,7 +2,7 @@ const settingsCache = require('../../../shared/settings-cache'); const settingsHelpers = require('../settings-helpers'); const mailService = require('../../services/mail'); const urlUtils = require('../../../shared/url-utils'); -const Invites = require('./invites'); +const Invites = require('./Invites'); module.exports = new Invites({ settingsCache, diff --git a/ghost/core/core/server/services/members/config.js b/ghost/core/core/server/services/members/MembersConfigProvider.js similarity index 100% rename from ghost/core/core/server/services/members/config.js rename to ghost/core/core/server/services/members/MembersConfigProvider.js diff --git a/ghost/core/core/server/services/members/api.js b/ghost/core/core/server/services/members/api.js index 0e53553594..5f2f73e33b 100644 --- a/ghost/core/core/server/services/members/api.js +++ b/ghost/core/core/server/services/members/api.js @@ -8,7 +8,7 @@ const signinEmail = require('./emails/signin'); const signupEmail = require('./emails/signup'); const signupPaidEmail = require('./emails/signup-paid'); const subscribeEmail = require('./emails/subscribe'); -const updateEmail = require('./emails/updateEmail'); +const updateEmail = require('./emails/update-email'); const SingleUseTokenProvider = require('./SingleUseTokenProvider'); const urlUtils = require('../../../shared/url-utils'); const labsService = require('../../../shared/labs'); diff --git a/ghost/core/core/server/services/members/emails/updateEmail.js b/ghost/core/core/server/services/members/emails/update-email.js similarity index 100% rename from ghost/core/core/server/services/members/emails/updateEmail.js rename to ghost/core/core/server/services/members/emails/update-email.js diff --git a/ghost/core/core/server/services/members/service.js b/ghost/core/core/server/services/members/service.js index ab519c02a9..fdacfc2ce9 100644 --- a/ghost/core/core/server/services/members/service.js +++ b/ghost/core/core/server/services/members/service.js @@ -3,9 +3,9 @@ const errors = require('@tryghost/errors'); const tpl = require('@tryghost/tpl'); const MembersSSR = require('@tryghost/members-ssr'); const db = require('../../data/db'); -const MembersConfigProvider = require('./config'); +const MembersConfigProvider = require('./MembersConfigProvider'); const MembersCSVImporter = require('@tryghost/members-importer'); -const MembersStats = require('./stats/members-stats'); +const MembersStats = require('./stats/MembersStats'); const memberJobs = require('./jobs'); const logging = require('@tryghost/logging'); const urlUtils = require('../../../shared/url-utils'); diff --git a/ghost/core/core/server/services/members/stats/members-stats.js b/ghost/core/core/server/services/members/stats/MembersStats.js similarity index 100% rename from ghost/core/core/server/services/members/stats/members-stats.js rename to ghost/core/core/server/services/members/stats/MembersStats.js diff --git a/ghost/core/core/server/services/newsletters/service.js b/ghost/core/core/server/services/newsletters/NewslettersService.js similarity index 100% rename from ghost/core/core/server/services/newsletters/service.js rename to ghost/core/core/server/services/newsletters/NewslettersService.js diff --git a/ghost/core/core/server/services/newsletters/index.js b/ghost/core/core/server/services/newsletters/index.js index fdd954cdbd..2e3ada979d 100644 --- a/ghost/core/core/server/services/newsletters/index.js +++ b/ghost/core/core/server/services/newsletters/index.js @@ -1,4 +1,4 @@ -const NewslettersService = require('./service.js'); +const NewslettersService = require('./NewslettersService.js'); const SingleUseTokenProvider = require('../members/SingleUseTokenProvider'); const mail = require('../mail'); const models = require('../../models'); diff --git a/ghost/core/core/server/services/notifications/notifications.js b/ghost/core/core/server/services/notifications/Notifications.js similarity index 100% rename from ghost/core/core/server/services/notifications/notifications.js rename to ghost/core/core/server/services/notifications/Notifications.js diff --git a/ghost/core/core/server/services/notifications/index.js b/ghost/core/core/server/services/notifications/index.js index 9fee2240e4..d3230943d4 100644 --- a/ghost/core/core/server/services/notifications/index.js +++ b/ghost/core/core/server/services/notifications/index.js @@ -1,5 +1,5 @@ const settingsCache = require('../../../shared/settings-cache'); -const Notifications = require('./notifications'); +const Notifications = require('./Notifications'); const models = require('../../models'); module.exports.notifications = new Notifications({ diff --git a/ghost/core/core/server/services/oembed/nft-oembed.js b/ghost/core/core/server/services/oembed/NFTOEmbedProvider.js similarity index 100% rename from ghost/core/core/server/services/oembed/nft-oembed.js rename to ghost/core/core/server/services/oembed/NFTOEmbedProvider.js diff --git a/ghost/core/core/server/services/oembed/twitter-embed.js b/ghost/core/core/server/services/oembed/TwitterOEmbedProvider.js similarity index 100% rename from ghost/core/core/server/services/oembed/twitter-embed.js rename to ghost/core/core/server/services/oembed/TwitterOEmbedProvider.js diff --git a/ghost/core/core/server/services/oembed/service.js b/ghost/core/core/server/services/oembed/service.js index 6e44bf9344..77b7cd72d2 100644 --- a/ghost/core/core/server/services/oembed/service.js +++ b/ghost/core/core/server/services/oembed/service.js @@ -4,14 +4,14 @@ const externalRequest = require('../../lib/request-external'); const OEmbed = require('@tryghost/oembed-service'); const oembed = new OEmbed({config, externalRequest}); -const NFT = require('./nft-oembed'); +const NFT = require('./NFTOEmbedProvider'); const nft = new NFT({ config: { apiKey: config.get('opensea').privateReadOnlyApiKey } }); -const Twitter = require('./twitter-embed'); +const Twitter = require('./TwitterOEmbedProvider'); const twitter = new Twitter({ config: { bearerToken: config.get('twitter').privateReadOnlyToken diff --git a/ghost/core/core/server/services/posts/posts-service.js b/ghost/core/core/server/services/posts/posts-service.js index 3fd13141f9..0dc40e4a3f 100644 --- a/ghost/core/core/server/services/posts/posts-service.js +++ b/ghost/core/core/server/services/posts/posts-service.js @@ -8,7 +8,7 @@ const getPostServiceInstance = () => { const urlUtils = require('../../../shared/url-utils'); const labs = require('../../../shared/labs'); const models = require('../../models'); - const PostStats = require('./stats/post-stats'); + const PostStats = require('./stats/PostStats'); const emailService = require('../email-service'); const settingsCache = require('../../../shared/settings-cache'); const settingsHelpers = require('../settings-helpers'); diff --git a/ghost/core/core/server/services/posts/stats/post-stats.js b/ghost/core/core/server/services/posts/stats/PostStats.js similarity index 100% rename from ghost/core/core/server/services/posts/stats/post-stats.js rename to ghost/core/core/server/services/posts/stats/PostStats.js diff --git a/ghost/core/core/server/services/route-settings/default-settings-manager.js b/ghost/core/core/server/services/route-settings/DefaultSettingsManager.js similarity index 100% rename from ghost/core/core/server/services/route-settings/default-settings-manager.js rename to ghost/core/core/server/services/route-settings/DefaultSettingsManager.js diff --git a/ghost/core/core/server/services/route-settings/route-settings.js b/ghost/core/core/server/services/route-settings/RouteSettings.js similarity index 100% rename from ghost/core/core/server/services/route-settings/route-settings.js rename to ghost/core/core/server/services/route-settings/RouteSettings.js diff --git a/ghost/core/core/server/services/route-settings/settings-loader.js b/ghost/core/core/server/services/route-settings/SettingsLoader.js similarity index 100% rename from ghost/core/core/server/services/route-settings/settings-loader.js rename to ghost/core/core/server/services/route-settings/SettingsLoader.js diff --git a/ghost/core/core/server/services/route-settings/index.js b/ghost/core/core/server/services/route-settings/index.js index 72d6b2010b..c6160fbbfb 100644 --- a/ghost/core/core/server/services/route-settings/index.js +++ b/ghost/core/core/server/services/route-settings/index.js @@ -7,9 +7,9 @@ let routeSettings; module.exports = { init: async () => { - const RouteSettings = require('./route-settings'); - const SettingsLoader = require('./settings-loader'); - const DefaultSettingsManager = require('./default-settings-manager'); + const RouteSettings = require('./RouteSettings'); + const SettingsLoader = require('./SettingsLoader'); + const DefaultSettingsManager = require('./DefaultSettingsManager'); const settingsPathManager = new SettingsPathManager({type: 'routes', paths: [config.getContentPath('settings')]}); settingsLoader = new SettingsLoader({parseYaml, settingFilePath: settingsPathManager.getDefaultFilePath()}); diff --git a/ghost/core/core/server/services/settings-helpers/settings-helpers.js b/ghost/core/core/server/services/settings-helpers/SettingsHelpers.js similarity index 100% rename from ghost/core/core/server/services/settings-helpers/settings-helpers.js rename to ghost/core/core/server/services/settings-helpers/SettingsHelpers.js diff --git a/ghost/core/core/server/services/settings-helpers/index.js b/ghost/core/core/server/services/settings-helpers/index.js index dae4891fe1..48d6f01e8b 100644 --- a/ghost/core/core/server/services/settings-helpers/index.js +++ b/ghost/core/core/server/services/settings-helpers/index.js @@ -1,6 +1,6 @@ const settingsCache = require('../../../shared/settings-cache'); const urlUtils = require('../../../shared/url-utils'); const config = require('../../../shared/config'); -const SettingsHelpers = require('./settings-helpers'); +const SettingsHelpers = require('./SettingsHelpers'); module.exports = new SettingsHelpers({settingsCache, urlUtils, config}); diff --git a/ghost/core/core/server/services/settings/settings-bread-service.js b/ghost/core/core/server/services/settings/SettingsBREADService.js similarity index 100% rename from ghost/core/core/server/services/settings/settings-bread-service.js rename to ghost/core/core/server/services/settings/SettingsBREADService.js diff --git a/ghost/core/core/server/services/settings/settings-service.js b/ghost/core/core/server/services/settings/settings-service.js index 1629f1d2b3..596c0f75fe 100644 --- a/ghost/core/core/server/services/settings/settings-service.js +++ b/ghost/core/core/server/services/settings/settings-service.js @@ -7,7 +7,7 @@ const models = require('../../models'); const labs = require('../../../shared/labs'); const adapterManager = require('../adapter-manager'); const SettingsCache = require('../../../shared/settings-cache'); -const SettingsBREADService = require('./settings-bread-service'); +const SettingsBREADService = require('./SettingsBREADService'); const {obfuscatedSetting, isSecretSetting, hideValueIfSecret} = require('./settings-utils'); const mail = require('../mail'); const SingleUseTokenProvider = require('../members/SingleUseTokenProvider'); diff --git a/ghost/core/core/server/services/webhooks/trigger.js b/ghost/core/core/server/services/webhooks/WebhookTrigger.js similarity index 100% rename from ghost/core/core/server/services/webhooks/trigger.js rename to ghost/core/core/server/services/webhooks/WebhookTrigger.js diff --git a/ghost/core/core/server/services/webhooks/listen.js b/ghost/core/core/server/services/webhooks/listen.js index f9b541f708..1300b42dc3 100644 --- a/ghost/core/core/server/services/webhooks/listen.js +++ b/ghost/core/core/server/services/webhooks/listen.js @@ -1,7 +1,7 @@ const _ = require('lodash'); const limitService = require('../../services/limits'); const logging = require('@tryghost/logging'); -const WebhookTrigger = require('./trigger'); +const WebhookTrigger = require('./WebhookTrigger'); const models = require('../../models'); const payload = require('./payload'); diff --git a/ghost/core/core/server/web/parent/frontend.js b/ghost/core/core/server/web/parent/frontend.js index 1041710c5f..4b0a8fc991 100644 --- a/ghost/core/core/server/web/parent/frontend.js +++ b/ghost/core/core/server/web/parent/frontend.js @@ -4,7 +4,7 @@ const shared = require('../shared'); /** * - * @param {import('../../../frontend/services/routing/router-manager').RouterConfig} routerConfig + * @param {import('../../../frontend/services/routing/RouterManager').RouterConfig} routerConfig * @returns {import('express').RequestHandler} */ module.exports = (routerConfig) => { diff --git a/ghost/core/core/shared/config/defaults.json b/ghost/core/core/shared/config/defaults.json index cdfd88402d..a174d3f42b 100644 --- a/ghost/core/core/shared/config/defaults.json +++ b/ghost/core/core/shared/config/defaults.json @@ -22,10 +22,10 @@ }, "adapters": { "sso": { - "active": "Default" + "active": "DefaultSSOAdapter" }, "cache": { - "active": "Memory", + "active": "MemoryCache", "settings": {}, "imageSizes": {}, "gscan": {} @@ -39,7 +39,7 @@ "LocalFilesStorage": {} }, "scheduling": { - "active": "SchedulingDefault" + "active": "scheduling-default" }, "members": { "contentApiAccess": [], diff --git a/ghost/core/core/shared/settings-cache/cache.js b/ghost/core/core/shared/settings-cache/CacheManager.js similarity index 100% rename from ghost/core/core/shared/settings-cache/cache.js rename to ghost/core/core/shared/settings-cache/CacheManager.js diff --git a/ghost/core/core/shared/settings-cache/index.js b/ghost/core/core/shared/settings-cache/index.js index 0d65bba0ec..0e8390ea5e 100644 --- a/ghost/core/core/shared/settings-cache/index.js +++ b/ghost/core/core/shared/settings-cache/index.js @@ -1,4 +1,4 @@ -const CacheManager = require('./cache'); +const CacheManager = require('./CacheManager'); const publicSettings = require('./public'); const cacheManager = new CacheManager({publicSettings}); diff --git a/ghost/core/test/regression/api/admin/schedules.test.js b/ghost/core/test/regression/api/admin/schedules.test.js index 39c83c2e4d..b5591ed26d 100644 --- a/ghost/core/test/regression/api/admin/schedules.test.js +++ b/ghost/core/test/regression/api/admin/schedules.test.js @@ -4,7 +4,7 @@ const supertest = require('supertest'); const Promise = require('bluebird'); const sinon = require('sinon'); const moment = require('moment-timezone'); -const SchedulingDefault = require('../../../../core/server/adapters/scheduling/SchedulingDefault'); +const SchedulingDefault = require('../../../../core/server/adapters/scheduling/scheduling-default'); const models = require('../../../../core/server/models'); const config = require('../../../../core/shared/config'); const testUtils = require('../../../utils'); diff --git a/ghost/core/test/unit/frontend/services/card-assets.test.js b/ghost/core/test/unit/frontend/services/card-assets.test.js index 0b932e4219..333d04c56f 100644 --- a/ghost/core/test/unit/frontend/services/card-assets.test.js +++ b/ghost/core/test/unit/frontend/services/card-assets.test.js @@ -4,7 +4,7 @@ const path = require('path'); const fs = require('fs').promises; const os = require('os'); -const CardAssetService = require('../../../../core/frontend/services/card-assets/service'); +const CardAssetService = require('../../../../core/frontend/services/card-assets/CardAssetService'); const themeDefaults = require('../../../../core/frontend/services/theme-engine/config/defaults.json'); diff --git a/ghost/core/test/unit/frontend/services/routing/bootstrap.test.js b/ghost/core/test/unit/frontend/services/routing/bootstrap.test.js index f99f50b03d..7c16ab2cc2 100644 --- a/ghost/core/test/unit/frontend/services/routing/bootstrap.test.js +++ b/ghost/core/test/unit/frontend/services/routing/bootstrap.test.js @@ -1,7 +1,7 @@ const should = require('should'); const sinon = require('sinon'); const CollectionRouter = require('../../../../../core/frontend/services/routing/CollectionRouter'); -const RouterManager = require('../../../../../core/frontend/services/routing/router-manager'); +const RouterManager = require('../../../../../core/frontend/services/routing/RouterManager'); const registry = require('../../../../../core/frontend/services/routing/registry'); const RESOURCE_CONFIG = {QUERY: {post: {controller: 'posts', resource: 'posts'}}}; diff --git a/ghost/core/test/unit/frontend/services/sitemap/generator.test.js b/ghost/core/test/unit/frontend/services/sitemap/generator.test.js index 4f90659350..30a74a2018 100644 --- a/ghost/core/test/unit/frontend/services/sitemap/generator.test.js +++ b/ghost/core/test/unit/frontend/services/sitemap/generator.test.js @@ -6,11 +6,11 @@ const moment = require('moment'); const assert = require('assert'); const testUtils = require('../../../../utils'); const urlUtils = require('../../../../../core/shared/url-utils'); -const IndexGenerator = require('../../../../../core/frontend/services/sitemap/index-generator'); -const PostGenerator = require('../../../../../core/frontend/services/sitemap/post-generator'); -const PageGenerator = require('../../../../../core/frontend/services/sitemap/page-generator'); -const TagGenerator = require('../../../../../core/frontend/services/sitemap/tag-generator'); -const UserGenerator = require('../../../../../core/frontend/services/sitemap/user-generator'); +const IndexGenerator = require('../../../../../core/frontend/services/sitemap/SiteMapIndexGenerator'); +const PostGenerator = require('../../../../../core/frontend/services/sitemap/PostMapGenerator'); +const PageGenerator = require('../../../../../core/frontend/services/sitemap/PageMapGenerator'); +const TagGenerator = require('../../../../../core/frontend/services/sitemap/TagsMapGenerator'); +const UserGenerator = require('../../../../../core/frontend/services/sitemap/UserMapGenerator'); should.Assertion.add('ValidUrlNode', function (options) { // Check urlNode looks correct diff --git a/ghost/core/test/unit/frontend/services/sitemap/manager.test.js b/ghost/core/test/unit/frontend/services/sitemap/manager.test.js index e74c55f988..21f6519c26 100644 --- a/ghost/core/test/unit/frontend/services/sitemap/manager.test.js +++ b/ghost/core/test/unit/frontend/services/sitemap/manager.test.js @@ -8,12 +8,12 @@ const {URLResourceUpdatedEvent} = require('@tryghost/dynamic-routing-events'); const events = require('../../../../../core/server/lib/common/events'); -const SiteMapManager = require('../../../../../core/frontend/services/sitemap/manager'); -const PostGenerator = require('../../../../../core/frontend/services/sitemap/post-generator'); -const PageGenerator = require('../../../../../core/frontend/services/sitemap/page-generator'); -const TagGenerator = require('../../../../../core/frontend/services/sitemap/tag-generator'); -const UserGenerator = require('../../../../../core/frontend/services/sitemap/user-generator'); -const IndexGenerator = require('../../../../../core/frontend/services/sitemap/index-generator'); +const SiteMapManager = require('../../../../../core/frontend/services/sitemap/SiteMapManager'); +const PostGenerator = require('../../../../../core/frontend/services/sitemap/PostMapGenerator'); +const PageGenerator = require('../../../../../core/frontend/services/sitemap/PageMapGenerator'); +const TagGenerator = require('../../../../../core/frontend/services/sitemap/TagsMapGenerator'); +const UserGenerator = require('../../../../../core/frontend/services/sitemap/UserMapGenerator'); +const IndexGenerator = require('../../../../../core/frontend/services/sitemap/SiteMapIndexGenerator'); describe('Unit: sitemap/manager', function () { let eventsToRemember; diff --git a/ghost/core/test/unit/frontend/services/theme-engine/i18n.test.js b/ghost/core/test/unit/frontend/services/theme-engine/i18n.test.js index 25a3e9c009..c16c4e337f 100644 --- a/ghost/core/test/unit/frontend/services/theme-engine/i18n.test.js +++ b/ghost/core/test/unit/frontend/services/theme-engine/i18n.test.js @@ -1,7 +1,7 @@ const should = require('should'); const sinon = require('sinon'); -const I18n = require('../../../../../core/frontend/services/theme-engine/i18n/i18n'); +const I18n = require('../../../../../core/frontend/services/theme-engine/i18n/I18n'); const logging = require('@tryghost/logging'); diff --git a/ghost/core/test/unit/server/adapters/cache/Cache.test.js b/ghost/core/test/unit/server/adapters/cache/Cache.test.js index 30f72e4209..0f0cb04716 100644 --- a/ghost/core/test/unit/server/adapters/cache/Cache.test.js +++ b/ghost/core/test/unit/server/adapters/cache/Cache.test.js @@ -1,7 +1,7 @@ const assert = require('assert'); const {getCache} = require('../../../../../core/server/adapters/cache'); -const MemoryCache = require('../../../../../core/server/adapters/cache/Memory'); +const MemoryCache = require('../../../../../core/server/adapters/cache/MemoryCache'); describe('Cache Adapter', function () { it('defaults to in-memory cache', function () { diff --git a/ghost/core/test/unit/server/adapters/cache/Memory.test.js b/ghost/core/test/unit/server/adapters/cache/Memory.test.js index 4115d53205..94bb1c048f 100644 --- a/ghost/core/test/unit/server/adapters/cache/Memory.test.js +++ b/ghost/core/test/unit/server/adapters/cache/Memory.test.js @@ -1,6 +1,6 @@ const assert = require('assert'); -const MemoryCache = require('../../../../../core/server/adapters/cache/Memory'); +const MemoryCache = require('../../../../../core/server/adapters/cache/MemoryCache'); describe('In Memory Cache Adapter', function () { let memoryCache; diff --git a/ghost/core/test/unit/server/adapters/scheduling/SchedulingDefault.test.js b/ghost/core/test/unit/server/adapters/scheduling/SchedulingDefault.test.js index 6992040c96..8a759ff482 100644 --- a/ghost/core/test/unit/server/adapters/scheduling/SchedulingDefault.test.js +++ b/ghost/core/test/unit/server/adapters/scheduling/SchedulingDefault.test.js @@ -3,7 +3,7 @@ const sinon = require('sinon'); const moment = require('moment'); const _ = require('lodash'); const nock = require('nock'); -const SchedulingDefault = require('../../../../../core/server/adapters/scheduling/SchedulingDefault'); +const SchedulingDefault = require('../../../../../core/server/adapters/scheduling/scheduling-default'); const logging = require('@tryghost/logging'); describe('Scheduling Default Adapter', function () { diff --git a/ghost/core/test/unit/server/adapters/scheduling/post-scheduling/post-scheduler.test.js b/ghost/core/test/unit/server/adapters/scheduling/post-scheduling/post-scheduler.test.js index d595d6f8cd..77e90f6b06 100644 --- a/ghost/core/test/unit/server/adapters/scheduling/post-scheduling/post-scheduler.test.js +++ b/ghost/core/test/unit/server/adapters/scheduling/post-scheduling/post-scheduler.test.js @@ -7,9 +7,9 @@ const testUtils = require('../../../../../utils'); const models = require('../../../../../../core/server/models'); const events = require('../../../../../../core/server/lib/common/events'); const schedulingUtils = require('../../../../../../core/server/adapters/scheduling/utils'); -const SchedulingDefault = require('../../../../../../core/server/adapters/scheduling/SchedulingDefault'); +const SchedulingDefault = require('../../../../../../core/server/adapters/scheduling/scheduling-default'); const urlUtils = require('../../../../../../core/shared/url-utils'); -const PostScheduler = require('../../../../../../core/server/adapters/scheduling/post-scheduling/post-scheduler'); +const PostScheduler = require('../../../../../../core/server/adapters/scheduling/post-scheduling/PostScheduler'); const nock = require('nock'); describe('Scheduling: Post Scheduler', function () { diff --git a/ghost/core/test/unit/server/adapters/scheduling/utils.test.js b/ghost/core/test/unit/server/adapters/scheduling/utils.test.js index 998eb04f67..8d6b38a3d6 100644 --- a/ghost/core/test/unit/server/adapters/scheduling/utils.test.js +++ b/ghost/core/test/unit/server/adapters/scheduling/utils.test.js @@ -41,7 +41,7 @@ describe('Scheduling: utils', function () { const jsFile = '' + 'var util = require(\'util\');' + - 'var SchedulingBase = require(\'../../../core/server/adapters/scheduling/SchedulingBase\');' + + 'var SchedulingBase = require(\'../../../core/server/adapters/scheduling/scheduling-base\');' + 'var AnotherAdapter = function (){ SchedulingBase.call(this); };' + 'util.inherits(AnotherAdapter, SchedulingBase);' + 'AnotherAdapter.prototype.run = function (){};' + diff --git a/ghost/core/test/unit/server/data/importer/importers/data/newsletters.test.js b/ghost/core/test/unit/server/data/importer/importers/data/newsletters.test.js index dc41f73cb9..61d70e98f7 100644 --- a/ghost/core/test/unit/server/data/importer/importers/data/newsletters.test.js +++ b/ghost/core/test/unit/server/data/importer/importers/data/newsletters.test.js @@ -1,5 +1,5 @@ const should = require('should'); -const NewslettersImporter = require('../../../../../../../core/server/data/importer/importers/data/newsletters'); +const NewslettersImporter = require('../../../../../../../core/server/data/importer/importers/data/NewslettersImporter'); const fakeNewsletters = [{ id: '1', diff --git a/ghost/core/test/unit/server/data/importer/importers/data/posts.test.js b/ghost/core/test/unit/server/data/importer/importers/data/posts.test.js index 5b9dd91348..5537587444 100644 --- a/ghost/core/test/unit/server/data/importer/importers/data/posts.test.js +++ b/ghost/core/test/unit/server/data/importer/importers/data/posts.test.js @@ -1,6 +1,6 @@ const should = require('should'); const find = require('lodash/find'); -const PostsImporter = require('../../../../../../../core/server/data/importer/importers/data/posts'); +const PostsImporter = require('../../../../../../../core/server/data/importer/importers/data/PostsImporter'); describe('PostsImporter', function () { describe('#beforeImport', function () { diff --git a/ghost/core/test/unit/server/data/importer/importers/data/products.test.js b/ghost/core/test/unit/server/data/importer/importers/data/products.test.js index a78ccf95e0..c9949bd2be 100644 --- a/ghost/core/test/unit/server/data/importer/importers/data/products.test.js +++ b/ghost/core/test/unit/server/data/importer/importers/data/products.test.js @@ -1,5 +1,5 @@ const assert = require('assert'); -const ProductsImporter = require('../../../../../../../core/server/data/importer/importers/data/products'); +const ProductsImporter = require('../../../../../../../core/server/data/importer/importers/data/ProductsImporter'); const fakeProducts = [{ id: 'product_1', diff --git a/ghost/core/test/unit/server/data/importer/importers/data/settings.test.js b/ghost/core/test/unit/server/data/importer/importers/data/settings.test.js index 2c098a66db..901d83c917 100644 --- a/ghost/core/test/unit/server/data/importer/importers/data/settings.test.js +++ b/ghost/core/test/unit/server/data/importer/importers/data/settings.test.js @@ -1,6 +1,6 @@ const find = require('lodash/find'); const should = require('should'); -const SettingsImporter = require('../../../../../../../core/server/data/importer/importers/data/settings'); +const SettingsImporter = require('../../../../../../../core/server/data/importer/importers/data/SettingsImporter'); describe('SettingsImporter', function () { describe('#beforeImport', function () { diff --git a/ghost/core/test/unit/server/lib/image/blog-icon.test.js b/ghost/core/test/unit/server/lib/image/blog-icon.test.js index 0522434394..5d3e9de9c1 100644 --- a/ghost/core/test/unit/server/lib/image/blog-icon.test.js +++ b/ghost/core/test/unit/server/lib/image/blog-icon.test.js @@ -1,7 +1,7 @@ const should = require('should'); const sinon = require('sinon'); const path = require('path'); -const BlogIcon = require('../../../../../core/server/lib/image/blog-icon'); +const BlogIcon = require('../../../../../core/server/lib/image/BlogIcon'); describe('lib/image: blog icon', function () { describe('getIconUrl', function () { diff --git a/ghost/core/test/unit/server/lib/image/cached-image-size-from-url.test.js b/ghost/core/test/unit/server/lib/image/cached-image-size-from-url.test.js index c776785b7f..b592169321 100644 --- a/ghost/core/test/unit/server/lib/image/cached-image-size-from-url.test.js +++ b/ghost/core/test/unit/server/lib/image/cached-image-size-from-url.test.js @@ -1,8 +1,8 @@ const errors = require('@tryghost/errors'); const should = require('should'); const sinon = require('sinon'); -const CachedImageSizeFromUrl = require('../../../../../core/server/lib/image/cached-image-size-from-url'); -const InMemoryCache = require('../../../../../core/server/adapters/cache/Memory'); +const CachedImageSizeFromUrl = require('../../../../../core/server/lib/image/CachedImageSizeFromUrl'); +const InMemoryCache = require('../../../../../core/server/adapters/cache/MemoryCache'); const logging = require('@tryghost/logging'); describe('lib/image: image size cache', function () { diff --git a/ghost/core/test/unit/server/lib/image/gravatar.test.js b/ghost/core/test/unit/server/lib/image/gravatar.test.js index 8a91feb6df..811af06b83 100644 --- a/ghost/core/test/unit/server/lib/image/gravatar.test.js +++ b/ghost/core/test/unit/server/lib/image/gravatar.test.js @@ -1,5 +1,5 @@ const should = require('should'); -const Gravatar = require('../../../../../core/server/lib/image/gravatar'); +const Gravatar = require('../../../../../core/server/lib/image/Gravatar'); describe('lib/image: gravatar', function () { const gravatarUrl = 'https://www.gravatar.com/avatar/{hash}?s={size}&r={rating}&d={_default}'; diff --git a/ghost/core/test/unit/server/lib/image/image-size.test.js b/ghost/core/test/unit/server/lib/image/image-size.test.js index a7cbb2a666..96481c28c6 100644 --- a/ghost/core/test/unit/server/lib/image/image-size.test.js +++ b/ghost/core/test/unit/server/lib/image/image-size.test.js @@ -4,7 +4,7 @@ const nock = require('nock'); const path = require('path'); const errors = require('@tryghost/errors'); const fs = require('fs'); -const ImageSize = require('../../../../../core/server/lib/image/image-size'); +const ImageSize = require('../../../../../core/server/lib/image/ImageSize'); describe('lib/image: image size', function () { // use a 1x1 gif in nock responses because it's really small and easy to work with diff --git a/ghost/core/test/unit/server/services/auth/session/store.test.js b/ghost/core/test/unit/server/services/auth/session/store.test.js index 23f44ea934..5391307c10 100644 --- a/ghost/core/test/unit/server/services/auth/session/store.test.js +++ b/ghost/core/test/unit/server/services/auth/session/store.test.js @@ -1,4 +1,4 @@ -const SessionStore = require('../../../../../../core/server/services/auth/session/store'); +const SessionStore = require('../../../../../../core/server/services/auth/session/SessionStore'); const models = require('../../../../../../core/server/models'); const EventEmitter = require('events'); const {Store} = require('express-session'); diff --git a/ghost/core/test/unit/server/services/custom-redirects/api.test.js b/ghost/core/test/unit/server/services/custom-redirects/api.test.js index 6e01bc6c15..00897808ba 100644 --- a/ghost/core/test/unit/server/services/custom-redirects/api.test.js +++ b/ghost/core/test/unit/server/services/custom-redirects/api.test.js @@ -4,7 +4,7 @@ const path = require('path'); const fs = require('fs-extra'); const logging = require('@tryghost/logging'); -const CustomRedirectsAPI = require('../../../../../core/server/services/custom-redirects/api'); +const CustomRedirectsAPI = require('../../../../../core/server/services/custom-redirects/CustomRedirectsAPI'); describe('UNIT: redirects CustomRedirectsAPI class', function () { let customRedirectsAPI; diff --git a/ghost/core/test/unit/server/services/frontend-data-service/frontend-data-service.test.js b/ghost/core/test/unit/server/services/frontend-data-service/frontend-data-service.test.js index 9785160055..53c0886822 100644 --- a/ghost/core/test/unit/server/services/frontend-data-service/frontend-data-service.test.js +++ b/ghost/core/test/unit/server/services/frontend-data-service/frontend-data-service.test.js @@ -3,7 +3,7 @@ const sinon = require('sinon'); const models = require('../../../../../core/server/models'); -const FrontendDataService = require('../../../../../core/server/services/frontend-data-service/frontend-data-service'); +const FrontendDataService = require('../../../../../core/server/services/frontend-data-service/FrontendDataService'); const logging = require('@tryghost/logging'); diff --git a/ghost/core/test/unit/server/services/members/config.test.js b/ghost/core/test/unit/server/services/members/config.test.js index 54c1f46766..1a82ab8adb 100644 --- a/ghost/core/test/unit/server/services/members/config.test.js +++ b/ghost/core/test/unit/server/services/members/config.test.js @@ -1,7 +1,7 @@ const assert = require('assert'); const sinon = require('sinon'); -const MembersConfigProvider = require('../../../../../core/server/services/members/config'); +const MembersConfigProvider = require('../../../../../core/server/services/members/MembersConfigProvider'); const urlUtils = require('../../../../utils/urlUtils'); const configUtils = require('../../../../utils/configUtils'); diff --git a/ghost/core/test/unit/server/services/newsletters/service.test.js b/ghost/core/test/unit/server/services/newsletters/service.test.js index 0b4b09157c..586591ca3c 100644 --- a/ghost/core/test/unit/server/services/newsletters/service.test.js +++ b/ghost/core/test/unit/server/services/newsletters/service.test.js @@ -9,7 +9,7 @@ const mail = require('../../../../../core/server/services/mail'); const urlUtils = require('../../../../utils/urlUtils'); const {mockManager} = require('../../../../utils/e2e-framework'); -const NewslettersService = require('../../../../../core/server/services/newsletters/service'); +const NewslettersService = require('../../../../../core/server/services/newsletters/NewslettersService'); class TestTokenProvider { async create(data) { @@ -263,7 +263,7 @@ describe('NewslettersService', function () { ] }); sinon.assert.calledOnceWithExactly(editStub, {name: 'hello world'}, options); - + sinon.assert.calledTwice(findOneStub); sinon.assert.calledWithExactly(findOneStub.firstCall, {id: 'test'}, {require: true}); sinon.assert.calledWithExactly(findOneStub.secondCall, {id: 'test'}, {...options, require: true}); diff --git a/ghost/core/test/unit/server/services/notifications/notifications.test.js b/ghost/core/test/unit/server/services/notifications/notifications.test.js index 92adc5c24e..4f4757fdd3 100644 --- a/ghost/core/test/unit/server/services/notifications/notifications.test.js +++ b/ghost/core/test/unit/server/services/notifications/notifications.test.js @@ -3,7 +3,7 @@ const sinon = require('sinon'); const ghostVersion = require('@tryghost/version'); const moment = require('moment'); -const Notifications = require('../../../../../core/server/services/notifications/notifications'); +const Notifications = require('../../../../../core/server/services/notifications/Notifications'); const {owner} = require('../../../../utils/fixtures/context'); describe('Notifications Service', function () { diff --git a/ghost/core/test/unit/server/services/oembed/nft-oembed.test.js b/ghost/core/test/unit/server/services/oembed/nft-oembed.test.js index 1ccf6d0088..cb548149e3 100644 --- a/ghost/core/test/unit/server/services/oembed/nft-oembed.test.js +++ b/ghost/core/test/unit/server/services/oembed/nft-oembed.test.js @@ -1,5 +1,5 @@ const assert = require('assert'); -const NFTOembedProvider = require('../../../../../core/server/services/oembed/nft-oembed'); +const NFTOembedProvider = require('../../../../../core/server/services/oembed/NFTOEmbedProvider'); describe('NFTOEmbedProvider', function () { it('Can support requests for OpenSea Ethereum NTFs', async function () { diff --git a/ghost/core/test/unit/server/services/oembed/twitter-embed.test.js b/ghost/core/test/unit/server/services/oembed/twitter-embed.test.js index bb97d0c2c0..ff9ecc81ed 100644 --- a/ghost/core/test/unit/server/services/oembed/twitter-embed.test.js +++ b/ghost/core/test/unit/server/services/oembed/twitter-embed.test.js @@ -1,5 +1,5 @@ const assert = require('assert'); -const TwitterOEmbedProvider = require('../../../../../core/server/services/oembed/twitter-embed'); +const TwitterOEmbedProvider = require('../../../../../core/server/services/oembed/TwitterOEmbedProvider'); const externalRequest = require('../../../../../core/server/lib/request-external'); const nock = require('nock'); const {mockManager} = require('../../../../utils/e2e-framework'); diff --git a/ghost/core/test/unit/server/services/route-settings/route-settings.test.js b/ghost/core/test/unit/server/services/route-settings/route-settings.test.js index 00c3274323..86f5050025 100644 --- a/ghost/core/test/unit/server/services/route-settings/route-settings.test.js +++ b/ghost/core/test/unit/server/services/route-settings/route-settings.test.js @@ -3,7 +3,7 @@ const should = require('should'); const fs = require('fs-extra'); const path = require('path'); const bridge = require('../../../../../core/bridge'); -const RouteSettings = require('../../../../../core/server/services/route-settings/route-settings'); +const RouteSettings = require('../../../../../core/server/services/route-settings/RouteSettings'); describe('UNIT > Settings Service DefaultSettingsManager:', function () { beforeEach(function () { diff --git a/ghost/core/test/unit/server/services/route-settings/settings-loader.test.js b/ghost/core/test/unit/server/services/route-settings/settings-loader.test.js index bec63c5a7b..3ed5a15283 100644 --- a/ghost/core/test/unit/server/services/route-settings/settings-loader.test.js +++ b/ghost/core/test/unit/server/services/route-settings/settings-loader.test.js @@ -4,7 +4,7 @@ const rewire = require('rewire'); const fs = require('fs-extra'); const path = require('path'); const errors = require('@tryghost/errors'); -const SettingsLoader = rewire('../../../../../core/server/services/route-settings/settings-loader'); +const SettingsLoader = rewire('../../../../../core/server/services/route-settings/SettingsLoader'); describe('UNIT > SettingsLoader:', function () { afterEach(function () { diff --git a/ghost/core/test/unit/server/services/settings-helpers/settings-helpers.test.js b/ghost/core/test/unit/server/services/settings-helpers/settings-helpers.test.js index 5d5fa1f580..f489f5511f 100644 --- a/ghost/core/test/unit/server/services/settings-helpers/settings-helpers.test.js +++ b/ghost/core/test/unit/server/services/settings-helpers/settings-helpers.test.js @@ -1,7 +1,7 @@ const should = require('should'); const sinon = require('sinon'); const configUtils = require('../../../../utils/configUtils'); -const SettingsHelpers = require('../../../../../core/server/services/settings-helpers/settings-helpers'); +const SettingsHelpers = require('../../../../../core/server/services/settings-helpers/SettingsHelpers'); function createSettingsMock({setDirect, setConnect}) { const getStub = sinon.stub(); diff --git a/ghost/core/test/unit/server/services/settings/default-settings-manager.test.js b/ghost/core/test/unit/server/services/settings/default-settings-manager.test.js index 279811d55d..92f456e050 100644 --- a/ghost/core/test/unit/server/services/settings/default-settings-manager.test.js +++ b/ghost/core/test/unit/server/services/settings/default-settings-manager.test.js @@ -2,7 +2,7 @@ const sinon = require('sinon'); const should = require('should'); const fs = require('fs-extra'); const path = require('path'); -const DefaultSettingsManager = require('../../../../../core/server/services/route-settings/default-settings-manager'); +const DefaultSettingsManager = require('../../../../../core/server/services/route-settings/DefaultSettingsManager'); describe('UNIT > Settings Service DefaultSettingsManager:', function () { beforeEach(function () { diff --git a/ghost/core/test/unit/server/services/settings/settings-bread-service.test.js b/ghost/core/test/unit/server/services/settings/settings-bread-service.test.js index df74efc04d..007f42afcb 100644 --- a/ghost/core/test/unit/server/services/settings/settings-bread-service.test.js +++ b/ghost/core/test/unit/server/services/settings/settings-bread-service.test.js @@ -1,7 +1,7 @@ const sinon = require('sinon'); const assert = require('assert'); const mail = require('../../../../../core/server/services/mail'); -const SettingsBreadService = require('../../../../../core/server/services/settings/settings-bread-service'); +const SettingsBreadService = require('../../../../../core/server/services/settings/SettingsBREADService'); const urlUtils = require('../../../../../core/shared/url-utils.js'); const {mockManager} = require('../../../../utils/e2e-framework'); const should = require('should'); diff --git a/ghost/core/test/unit/server/services/themes/validate.test.js b/ghost/core/test/unit/server/services/themes/validate.test.js index 3fb36a256d..ed85e818b2 100644 --- a/ghost/core/test/unit/server/services/themes/validate.test.js +++ b/ghost/core/test/unit/server/services/themes/validate.test.js @@ -5,7 +5,7 @@ const list = require('../../../../../core/server/services/themes/list'); const gscan = require('gscan'); const assert = require('assert'); const adapterManager = require('../../../../../core/server/services/adapter-manager'); -const InMemoryCache = require('../../../../../core/server/adapters/cache/Memory'); +const InMemoryCache = require('../../../../../core/server/adapters/cache/MemoryCache'); const logging = require('@tryghost/logging'); describe('Themes', function () { diff --git a/ghost/core/test/unit/server/services/users/users-service.test.js b/ghost/core/test/unit/server/services/users/users-service.test.js index 20dede9d6a..8cf147cf47 100644 --- a/ghost/core/test/unit/server/services/users/users-service.test.js +++ b/ghost/core/test/unit/server/services/users/users-service.test.js @@ -1,7 +1,7 @@ const assert = require('assert'); const sinon = require('sinon'); -const Users = require('../../../../../core/server/services/users'); +const Users = require('../../../../../core/server/services/Users'); describe('Users service', function () { describe('resetAllPasswords', function () { diff --git a/ghost/core/test/unit/server/services/webhooks/trigger.test.js b/ghost/core/test/unit/server/services/webhooks/trigger.test.js index 423629ba84..af5a72ce93 100644 --- a/ghost/core/test/unit/server/services/webhooks/trigger.test.js +++ b/ghost/core/test/unit/server/services/webhooks/trigger.test.js @@ -1,7 +1,7 @@ const assert = require('assert'); const sinon = require('sinon'); -const WebhookTrigger = require('../../../../../core/server/services/webhooks/trigger'); +const WebhookTrigger = require('../../../../../core/server/services/webhooks/WebhookTrigger'); describe('Webhook Service', function () { const models = { diff --git a/ghost/core/test/unit/shared/settings-cache.test.js b/ghost/core/test/unit/shared/settings-cache.test.js index f80fc64700..76f0b1fb41 100644 --- a/ghost/core/test/unit/shared/settings-cache.test.js +++ b/ghost/core/test/unit/shared/settings-cache.test.js @@ -4,9 +4,9 @@ const _ = require('lodash'); const events = require('../../../core/server/lib/common/events'); // Testing the Private API -let CacheManager = require('../../../core/shared/settings-cache/cache'); +let CacheManager = require('../../../core/shared/settings-cache/CacheManager'); const publicSettings = require('../../../core/shared/settings-cache/public'); -const InMemoryCache = require('../../../core/server/adapters/cache/Memory'); +const InMemoryCache = require('../../../core/server/adapters/cache/MemoryCache'); should.equal(true, true); diff --git a/ghost/core/test/utils/e2e-framework-mock-manager.js b/ghost/core/test/utils/e2e-framework-mock-manager.js index f0c7f9b5c7..313aa9d683 100644 --- a/ghost/core/test/utils/e2e-framework-mock-manager.js +++ b/ghost/core/test/utils/e2e-framework-mock-manager.js @@ -2,7 +2,7 @@ const errors = require('@tryghost/errors'); const sinon = require('sinon'); const assert = require('assert'); const nock = require('nock'); -const MailgunClient = require('@tryghost/mailgun-client/lib/mailgun-client'); +const MailgunClient = require('@tryghost/mailgun-client'); // Helper services const configUtils = require('./configUtils'); diff --git a/ghost/custom-theme-settings-service/index.js b/ghost/custom-theme-settings-service/index.js index d2187ffc49..f51420a4da 100644 --- a/ghost/custom-theme-settings-service/index.js +++ b/ghost/custom-theme-settings-service/index.js @@ -1,4 +1,4 @@ module.exports = { - Service: require('./lib/service'), - Cache: require('./lib/cache') + Service: require('./lib/CustomThemeSettingsService'), + Cache: require('./lib/CustomThemeSettingsCache') }; diff --git a/ghost/custom-theme-settings-service/lib/bread.js b/ghost/custom-theme-settings-service/lib/CustomThemeSettingsBREADService.js similarity index 100% rename from ghost/custom-theme-settings-service/lib/bread.js rename to ghost/custom-theme-settings-service/lib/CustomThemeSettingsBREADService.js diff --git a/ghost/custom-theme-settings-service/lib/cache.js b/ghost/custom-theme-settings-service/lib/CustomThemeSettingsCache.js similarity index 100% rename from ghost/custom-theme-settings-service/lib/cache.js rename to ghost/custom-theme-settings-service/lib/CustomThemeSettingsCache.js diff --git a/ghost/custom-theme-settings-service/lib/service.js b/ghost/custom-theme-settings-service/lib/CustomThemeSettingsService.js similarity index 98% rename from ghost/custom-theme-settings-service/lib/service.js rename to ghost/custom-theme-settings-service/lib/CustomThemeSettingsService.js index e02d1e4bb5..1b5e252b8c 100644 --- a/ghost/custom-theme-settings-service/lib/service.js +++ b/ghost/custom-theme-settings-service/lib/CustomThemeSettingsService.js @@ -1,5 +1,5 @@ const _ = require('lodash'); -const BREAD = require('./bread'); +const BREAD = require('./CustomThemeSettingsBREADService'); const tpl = require('@tryghost/tpl'); const {ValidationError} = require('@tryghost/errors'); const debug = require('@tryghost/debug')('custom-theme-settings-service'); @@ -14,7 +14,7 @@ module.exports = class CustomThemeSettingsService { /** * @param {Object} options * @param {any} options.model - Bookshelf-like model instance for storing theme setting key/value pairs - * @param {import('./cache')} options.cache - Instance of a custom key/value pair cache + * @param {import('./CustomThemeSettingsCache')} options.cache - Instance of a custom key/value pair cache */ constructor({model, cache}) { this.activeThemeName = null; diff --git a/ghost/data-generator/.eslintrc.js b/ghost/data-generator/.eslintrc.js index c9c1bcb522..506da54618 100644 --- a/ghost/data-generator/.eslintrc.js +++ b/ghost/data-generator/.eslintrc.js @@ -2,5 +2,8 @@ module.exports = { plugins: ['ghost'], extends: [ 'plugin:ghost/node' - ] + ], + rules: { + 'ghost/filenames/match-exported-class': [1, null, true] + } }; diff --git a/ghost/email-analytics-provider-mailgun/index.js b/ghost/email-analytics-provider-mailgun/index.js index 6214c38ed6..60d3e2e83c 100644 --- a/ghost/email-analytics-provider-mailgun/index.js +++ b/ghost/email-analytics-provider-mailgun/index.js @@ -1 +1 @@ -module.exports = require('./lib/provider-mailgun'); +module.exports = require('./lib/EmailAnalyticsProviderMailgun'); diff --git a/ghost/email-analytics-provider-mailgun/lib/provider-mailgun.js b/ghost/email-analytics-provider-mailgun/lib/EmailAnalyticsProviderMailgun.js similarity index 100% rename from ghost/email-analytics-provider-mailgun/lib/provider-mailgun.js rename to ghost/email-analytics-provider-mailgun/lib/EmailAnalyticsProviderMailgun.js diff --git a/ghost/email-analytics-service/index.js b/ghost/email-analytics-service/index.js index d592a9f520..16295ac3f4 100644 --- a/ghost/email-analytics-service/index.js +++ b/ghost/email-analytics-service/index.js @@ -1,4 +1,4 @@ module.exports = { - EmailAnalyticsService: require('./lib/email-analytics-service'), - EventProcessingResult: require('./lib/event-processing-result') + EmailAnalyticsService: require('./lib/EmailAnalyticsService'), + EventProcessingResult: require('./lib/EventProcessingResult') }; diff --git a/ghost/email-analytics-service/lib/email-analytics-service.js b/ghost/email-analytics-service/lib/EmailAnalyticsService.js similarity index 99% rename from ghost/email-analytics-service/lib/email-analytics-service.js rename to ghost/email-analytics-service/lib/EmailAnalyticsService.js index e59aac2ec9..32262b6e55 100644 --- a/ghost/email-analytics-service/lib/email-analytics-service.js +++ b/ghost/email-analytics-service/lib/EmailAnalyticsService.js @@ -1,4 +1,4 @@ -const EventProcessingResult = require('./event-processing-result'); +const EventProcessingResult = require('./EventProcessingResult'); const logging = require('@tryghost/logging'); const errors = require('@tryghost/errors'); diff --git a/ghost/email-analytics-service/lib/event-processing-result.js b/ghost/email-analytics-service/lib/EventProcessingResult.js similarity index 100% rename from ghost/email-analytics-service/lib/event-processing-result.js rename to ghost/email-analytics-service/lib/EventProcessingResult.js diff --git a/ghost/email-analytics-service/test/email-analytics-service.test.js b/ghost/email-analytics-service/test/email-analytics-service.test.js index 3ff38f2fc7..1e59d9ceb2 100644 --- a/ghost/email-analytics-service/test/email-analytics-service.test.js +++ b/ghost/email-analytics-service/test/email-analytics-service.test.js @@ -7,7 +7,7 @@ const sinon = require('sinon'); const { EmailAnalyticsService } = require('..'); -const EventProcessingResult = require('../lib/event-processing-result'); +const EventProcessingResult = require('../lib/EventProcessingResult'); describe('EmailAnalyticsService', function () { let eventProcessor; diff --git a/ghost/email-content-generator/index.js b/ghost/email-content-generator/index.js index cf4aae3dc8..1773ac8b2c 100644 --- a/ghost/email-content-generator/index.js +++ b/ghost/email-content-generator/index.js @@ -1 +1 @@ -module.exports = require('./lib/email-content-generator'); +module.exports = require('./lib/EmailContentGenerator'); diff --git a/ghost/email-content-generator/lib/email-content-generator.js b/ghost/email-content-generator/lib/EmailContentGenerator.js similarity index 100% rename from ghost/email-content-generator/lib/email-content-generator.js rename to ghost/email-content-generator/lib/EmailContentGenerator.js diff --git a/ghost/email-service/index.js b/ghost/email-service/index.js index 1a999bf777..9308df1383 100644 --- a/ghost/email-service/index.js +++ b/ghost/email-service/index.js @@ -1,11 +1,11 @@ module.exports = { - EmailService: require('./lib/email-service'), - EmailController: require('./lib/email-controller'), - EmailRenderer: require('./lib/email-renderer'), - EmailSegmenter: require('./lib/email-segmenter'), - SendingService: require('./lib/sending-service'), - BatchSendingService: require('./lib/batch-sending-service'), - EmailEventProcessor: require('./lib/email-event-processor'), - EmailEventStorage: require('./lib/email-event-storage'), - MailgunEmailProvider: require('./lib/mailgun-email-provider') + EmailService: require('./lib/EmailService'), + EmailController: require('./lib/EmailController'), + EmailRenderer: require('./lib/EmailRenderer'), + EmailSegmenter: require('./lib/EmailSegmenter'), + SendingService: require('./lib/SendingService'), + BatchSendingService: require('./lib/BatchSendingService'), + EmailEventProcessor: require('./lib/EmailEventProcessor'), + EmailEventStorage: require('./lib/EmailEventStorage'), + MailgunEmailProvider: require('./lib/MailgunEmailProvider') }; diff --git a/ghost/email-service/lib/batch-sending-service.js b/ghost/email-service/lib/BatchSendingService.js similarity index 98% rename from ghost/email-service/lib/batch-sending-service.js rename to ghost/email-service/lib/BatchSendingService.js index 76e5ecc23b..4ec3900fb8 100644 --- a/ghost/email-service/lib/batch-sending-service.js +++ b/ghost/email-service/lib/BatchSendingService.js @@ -2,7 +2,7 @@ const logging = require('@tryghost/logging'); const ObjectID = require('bson-objectid').default; const errors = require('@tryghost/errors'); const tpl = require('@tryghost/tpl'); -const EmailBodyCache = require('./email-body-cache'); +const EmailBodyCache = require('./EmailBodyCache'); const messages = { emailErrorPartialFailure: 'An error occurred, and your newsletter was only partially sent. Please retry sending the remaining emails.', @@ -12,10 +12,10 @@ const messages = { const MAX_SENDING_CONCURRENCY = 2; /** - * @typedef {import('./sending-service')} SendingService - * @typedef {import('./email-segmenter')} EmailSegmenter - * @typedef {import('./email-renderer')} EmailRenderer - * @typedef {import('./email-renderer').MemberLike} MemberLike + * @typedef {import('./SendingService')} SendingService + * @typedef {import('./EmailSegmenter')} EmailSegmenter + * @typedef {import('./EmailRenderer')} EmailRenderer + * @typedef {import('./EmailRenderer').MemberLike} MemberLike * @typedef {object} JobsService * @typedef {object} Email * @typedef {object} Newsletter @@ -283,7 +283,7 @@ class BatchSendingService { /** * @private * @param {Email} email - * @param {import('./email-renderer').Segment} segment + * @param {import('./EmailRenderer').Segment} segment * @param {object[]} members * @returns {Promise} */ diff --git a/ghost/email-service/lib/email-body-cache.js b/ghost/email-service/lib/EmailBodyCache.js similarity index 100% rename from ghost/email-service/lib/email-body-cache.js rename to ghost/email-service/lib/EmailBodyCache.js diff --git a/ghost/email-service/lib/email-controller.js b/ghost/email-service/lib/EmailController.js similarity index 100% rename from ghost/email-service/lib/email-controller.js rename to ghost/email-service/lib/EmailController.js diff --git a/ghost/email-service/lib/email-event-processor.js b/ghost/email-service/lib/EmailEventProcessor.js similarity index 100% rename from ghost/email-service/lib/email-event-processor.js rename to ghost/email-service/lib/EmailEventProcessor.js diff --git a/ghost/email-service/lib/email-event-storage.js b/ghost/email-service/lib/EmailEventStorage.js similarity index 100% rename from ghost/email-service/lib/email-event-storage.js rename to ghost/email-service/lib/EmailEventStorage.js diff --git a/ghost/email-service/lib/email-renderer.js b/ghost/email-service/lib/EmailRenderer.js similarity index 100% rename from ghost/email-service/lib/email-renderer.js rename to ghost/email-service/lib/EmailRenderer.js diff --git a/ghost/email-service/lib/email-segmenter.js b/ghost/email-service/lib/EmailSegmenter.js similarity index 100% rename from ghost/email-service/lib/email-segmenter.js rename to ghost/email-service/lib/EmailSegmenter.js diff --git a/ghost/email-service/lib/email-service.js b/ghost/email-service/lib/EmailService.js similarity index 93% rename from ghost/email-service/lib/email-service.js rename to ghost/email-service/lib/EmailService.js index 0fb1780b5f..475577de37 100644 --- a/ghost/email-service/lib/email-service.js +++ b/ghost/email-service/lib/EmailService.js @@ -7,12 +7,12 @@ * @typedef {{checkVerificationRequired(): Promise}} VerificationTrigger */ -const BatchSendingService = require('./batch-sending-service'); +const BatchSendingService = require('./BatchSendingService'); const errors = require('@tryghost/errors'); const tpl = require('@tryghost/tpl'); -const EmailRenderer = require('./email-renderer'); -const EmailSegmenter = require('./email-segmenter'); -const SendingService = require('./sending-service'); +const EmailRenderer = require('./EmailRenderer'); +const EmailSegmenter = require('./EmailSegmenter'); +const SendingService = require('./SendingService'); const logging = require('@tryghost/logging'); const messages = { @@ -179,11 +179,11 @@ class EmailService { /** * @params {string} [segment] - * @return {import('./email-renderer').MemberLike} + * @return {import('./EmailRenderer').MemberLike} */ getDefaultExampleMember(segment) { /** - * @type {import('./email-renderer').MemberLike} + * @type {import('./EmailRenderer').MemberLike} */ return { id: 'example-id', @@ -208,11 +208,11 @@ class EmailService { * @private * @param {string} [email] (optional) Search for a member with this email address and use it as the example. If not found, defaults to the default but still uses the provided email address. * @param {string} [segment] (optional) The segment to use for the example member - * @return {Promise} + * @return {Promise} */ async getExampleMember(email, segment) { /** - * @type {import('./email-renderer').MemberLike} + * @type {import('./EmailRenderer').MemberLike} */ const exampleMember = this.getDefaultExampleMember(segment); @@ -248,8 +248,8 @@ class EmailService { * Do a manual replacement of tokens with values for a member (normally only used for previews) * * @param {string} htmlOrPlaintext - * @param {import('./email-renderer').ReplacementDefinition[]} replacements - * @param {import('./email-renderer').MemberLike} member + * @param {import('./EmailRenderer').ReplacementDefinition[]} replacements + * @param {import('./EmailRenderer').MemberLike} member * @return {string} */ replaceDefinitions(htmlOrPlaintext, replacements, member) { @@ -264,7 +264,7 @@ class EmailService { * * @param {*} post * @param {*} newsletter - * @param {import('./email-renderer').Segment} segment + * @param {import('./EmailRenderer').Segment} segment * @returns {Promise<{subject: string, html: string, plaintext: string}>} Email preview */ async previewEmail(post, newsletter, segment) { @@ -284,7 +284,7 @@ class EmailService { * * @param {*} post * @param {*} newsletter - * @param {import('./email-renderer').Segment} segment + * @param {import('./EmailRenderer').Segment} segment * @param {string[]} emails */ async sendTestEmail(post, newsletter, segment, emails) { diff --git a/ghost/email-service/lib/mailgun-email-provider.js b/ghost/email-service/lib/MailgunEmailProvider.js similarity index 98% rename from ghost/email-service/lib/mailgun-email-provider.js rename to ghost/email-service/lib/MailgunEmailProvider.js index fb12d51cd7..4bbfb63502 100644 --- a/ghost/email-service/lib/mailgun-email-provider.js +++ b/ghost/email-service/lib/MailgunEmailProvider.js @@ -81,7 +81,7 @@ class MailgunEmailProvider { /** * Send an email using the Mailgun API - * @param {import('./sending-service').EmailData} data + * @param {import('./SendingService').EmailData} data * @param {EmailSendingOptions} options * @returns {Promise} */ diff --git a/ghost/email-service/lib/sending-service.js b/ghost/email-service/lib/SendingService.js similarity index 92% rename from ghost/email-service/lib/sending-service.js rename to ghost/email-service/lib/SendingService.js index 42ffad32dd..24461d01d5 100644 --- a/ghost/email-service/lib/sending-service.js +++ b/ghost/email-service/lib/SendingService.js @@ -10,7 +10,7 @@ const logging = require('@tryghost/logging'); * @prop {string} emailId * @prop {string} [replyTo] * @prop {Recipient[]} recipients - * @prop {import("./email-renderer").ReplacementDefinition[]} replacementDefinitions + * @prop {import("./EmailRenderer").ReplacementDefinition[]} replacementDefinitions * * @typedef {object} IEmailProviderService * @prop {(emailData: EmailData, options: EmailSendingOptions) => Promise} send @@ -21,8 +21,8 @@ const logging = require('@tryghost/logging'); */ /** - * @typedef {import("./email-renderer")} EmailRenderer - * @typedef {import("./email-renderer").EmailBody} EmailBody + * @typedef {import("./EmailRenderer")} EmailRenderer + * @typedef {import("./EmailRenderer").EmailBody} EmailBody */ /** @@ -33,7 +33,7 @@ const logging = require('@tryghost/logging'); */ /** - * @typedef {import("./email-renderer").MemberLike} MemberLike + * @typedef {import("./EmailRenderer").MemberLike} MemberLike */ /** @@ -131,7 +131,7 @@ class SendingService { /** * @private * @param {MemberLike[]} members - * @param {import("./email-renderer").ReplacementDefinition[]} replacementDefinitions + * @param {import("./EmailRenderer").ReplacementDefinition[]} replacementDefinitions * @returns {Recipient[]} */ buildRecipients(members, replacementDefinitions) { diff --git a/ghost/email-service/test/batch-sending-service.test.js b/ghost/email-service/test/batch-sending-service.test.js index c96e59a6c9..754f53a641 100644 --- a/ghost/email-service/test/batch-sending-service.test.js +++ b/ghost/email-service/test/batch-sending-service.test.js @@ -1,5 +1,5 @@ const {createModel, createModelClass, createDb, sleep} = require('./utils'); -const BatchSendingService = require('../lib/batch-sending-service'); +const BatchSendingService = require('../lib/BatchSendingService'); const sinon = require('sinon'); const assert = require('assert'); const logging = require('@tryghost/logging'); diff --git a/ghost/email-service/test/email-controller.test.js b/ghost/email-service/test/email-controller.test.js index 381c5371b4..08f07b29fc 100644 --- a/ghost/email-service/test/email-controller.test.js +++ b/ghost/email-service/test/email-controller.test.js @@ -1,5 +1,5 @@ const assert = require('assert'); -const EmailController = require('../lib/email-controller'); +const EmailController = require('../lib/EmailController'); const {createModel, createModelClass} = require('./utils'); describe('Email Controller', function () { diff --git a/ghost/email-service/test/email-event-processor.test.js b/ghost/email-service/test/email-event-processor.test.js index 7a36073f8b..4794c8d2d1 100644 --- a/ghost/email-service/test/email-event-processor.test.js +++ b/ghost/email-service/test/email-event-processor.test.js @@ -1,5 +1,5 @@ const assert = require('assert'); -const EmailEventProcessor = require('../lib/email-event-processor'); +const EmailEventProcessor = require('../lib/EmailEventProcessor'); const {createDb} = require('./utils'); const sinon = require('sinon'); diff --git a/ghost/email-service/test/email-event-storage.test.js b/ghost/email-service/test/email-event-storage.test.js index a116372fbd..a2eb49eb2f 100644 --- a/ghost/email-service/test/email-event-storage.test.js +++ b/ghost/email-service/test/email-event-storage.test.js @@ -1,4 +1,4 @@ -const EmailEventStorage = require('../lib/email-event-storage'); +const EmailEventStorage = require('../lib/EmailEventStorage'); const {EmailDeliveredEvent, EmailOpenedEvent, EmailBouncedEvent, EmailTemporaryBouncedEvent, EmailUnsubscribedEvent, SpamComplaintEvent} = require('@tryghost/email-events'); const sinon = require('sinon'); const assert = require('assert'); diff --git a/ghost/email-service/test/email-segmenter.test.js b/ghost/email-service/test/email-segmenter.test.js index beda04168a..9c69efd80e 100644 --- a/ghost/email-service/test/email-segmenter.test.js +++ b/ghost/email-service/test/email-segmenter.test.js @@ -1,4 +1,4 @@ -const EmailSegmenter = require('../lib/email-segmenter'); +const EmailSegmenter = require('../lib/EmailSegmenter'); const sinon = require('sinon'); describe('Email segmenter', function () { diff --git a/ghost/email-service/test/email-service.test.js b/ghost/email-service/test/email-service.test.js index 5db9dda2c2..9772c02d33 100644 --- a/ghost/email-service/test/email-service.test.js +++ b/ghost/email-service/test/email-service.test.js @@ -1,4 +1,4 @@ -const EmailService = require('../lib/email-service'); +const EmailService = require('../lib/EmailService'); const assert = require('assert'); const sinon = require('sinon'); const {createModel, createModelClass} = require('./utils'); diff --git a/ghost/email-service/test/mailgun-email-provider.test.js b/ghost/email-service/test/mailgun-email-provider.test.js index 7f21c5d662..0646b9f111 100644 --- a/ghost/email-service/test/mailgun-email-provider.test.js +++ b/ghost/email-service/test/mailgun-email-provider.test.js @@ -1,4 +1,4 @@ -const MailgunEmailProvider = require('../lib/mailgun-email-provider'); +const MailgunEmailProvider = require('../lib/MailgunEmailProvider'); const sinon = require('sinon'); const should = require('should'); const assert = require('assert'); diff --git a/ghost/email-service/test/sending-service.test.js b/ghost/email-service/test/sending-service.test.js index 2a71f3012b..e7ea126ec8 100644 --- a/ghost/email-service/test/sending-service.test.js +++ b/ghost/email-service/test/sending-service.test.js @@ -1,7 +1,7 @@ -const SendingService = require('../lib/sending-service'); +const SendingService = require('../lib/SendingService'); const sinon = require('sinon'); const assert = require('assert'); -const EmailBodyCache = require('../lib/email-body-cache'); +const EmailBodyCache = require('../lib/EmailBodyCache'); describe('Sending service', function () { describe('send', function () { diff --git a/ghost/event-aware-cache-wrapper/index.js b/ghost/event-aware-cache-wrapper/index.js index 790acb474f..9935b2737b 100644 --- a/ghost/event-aware-cache-wrapper/index.js +++ b/ghost/event-aware-cache-wrapper/index.js @@ -1 +1 @@ -module.exports = require('./lib/event-aware-cache-wrapper'); +module.exports = require('./lib/EventAwareCacheWrapper'); diff --git a/ghost/event-aware-cache-wrapper/lib/event-aware-cache-wrapper.js b/ghost/event-aware-cache-wrapper/lib/EventAwareCacheWrapper.js similarity index 100% rename from ghost/event-aware-cache-wrapper/lib/event-aware-cache-wrapper.js rename to ghost/event-aware-cache-wrapper/lib/EventAwareCacheWrapper.js diff --git a/ghost/job-manager/index.js b/ghost/job-manager/index.js index 34f8bdac0c..862a24c9c7 100644 --- a/ghost/job-manager/index.js +++ b/ghost/job-manager/index.js @@ -1 +1 @@ -module.exports = require('./lib/job-manager'); +module.exports = require('./lib/JobManager'); diff --git a/ghost/job-manager/lib/job-manager.js b/ghost/job-manager/lib/JobManager.js similarity index 99% rename from ghost/job-manager/lib/job-manager.js rename to ghost/job-manager/lib/JobManager.js index f5f1118e89..abbeb1d8e0 100644 --- a/ghost/job-manager/lib/job-manager.js +++ b/ghost/job-manager/lib/JobManager.js @@ -9,7 +9,7 @@ const {UnhandledJobError, IncorrectUsageError} = require('@tryghost/errors'); const logging = require('@tryghost/logging'); const isCronExpression = require('./is-cron-expression'); const assembleBreeJob = require('./assemble-bree-job'); -const JobsRepository = require('./jobs-repository'); +const JobsRepository = require('./JobsRepository'); const worker = async (task, callback) => { try { diff --git a/ghost/job-manager/lib/jobs-repository.js b/ghost/job-manager/lib/JobsRepository.js similarity index 100% rename from ghost/job-manager/lib/jobs-repository.js rename to ghost/job-manager/lib/JobsRepository.js diff --git a/ghost/link-replacer/index.js b/ghost/link-replacer/index.js index 022687961d..fea9668ac4 100644 --- a/ghost/link-replacer/index.js +++ b/ghost/link-replacer/index.js @@ -1 +1 @@ -module.exports = require('./lib/LinkReplacer'); +module.exports = require('./lib/link-replacer'); diff --git a/ghost/link-replacer/lib/LinkReplacer.js b/ghost/link-replacer/lib/link-replacer.js similarity index 100% rename from ghost/link-replacer/lib/LinkReplacer.js rename to ghost/link-replacer/lib/link-replacer.js diff --git a/ghost/link-replacer/test/LinkReplacer.test.js b/ghost/link-replacer/test/LinkReplacer.test.js index 0c0f78dbb8..2d55341efd 100644 --- a/ghost/link-replacer/test/LinkReplacer.test.js +++ b/ghost/link-replacer/test/LinkReplacer.test.js @@ -1,5 +1,5 @@ const assert = require('assert'); -const linkReplacer = require('../lib/LinkReplacer'); +const linkReplacer = require('../lib/link-replacer'); const cheerio = require('cheerio'); const sinon = require('sinon'); diff --git a/ghost/link-tracking/lib/LinkClick.js b/ghost/link-tracking/lib/ClickEvent.js similarity index 100% rename from ghost/link-tracking/lib/LinkClick.js rename to ghost/link-tracking/lib/ClickEvent.js diff --git a/ghost/link-tracking/lib/LinkClickTrackingService.js b/ghost/link-tracking/lib/LinkClickTrackingService.js index 50e446595f..bdd776a4a0 100644 --- a/ghost/link-tracking/lib/LinkClickTrackingService.js +++ b/ghost/link-tracking/lib/LinkClickTrackingService.js @@ -1,5 +1,5 @@ const {RedirectEvent} = require('@tryghost/link-redirects'); -const LinkClick = require('./LinkClick'); +const LinkClick = require('./ClickEvent'); const PostLink = require('./PostLink'); const ObjectID = require('bson-objectid').default; const errors = require('@tryghost/errors'); diff --git a/ghost/link-tracking/lib/link-tracking.js b/ghost/link-tracking/lib/link-tracking.js index a66a33017d..4396f793d6 100644 --- a/ghost/link-tracking/lib/link-tracking.js +++ b/ghost/link-tracking/lib/link-tracking.js @@ -1,6 +1,6 @@ module.exports = { LinkClickTrackingService: require('./LinkClickTrackingService'), - LinkClick: require('./LinkClick'), + LinkClick: require('./ClickEvent'), PostLink: require('./PostLink'), FullPostLink: require('./FullPostLink') }; diff --git a/ghost/mailgun-client/index.js b/ghost/mailgun-client/index.js index 5a87aae9ca..9554d27058 100644 --- a/ghost/mailgun-client/index.js +++ b/ghost/mailgun-client/index.js @@ -1 +1 @@ -module.exports = require('./lib/mailgun-client'); +module.exports = require('./lib/MailgunClient'); diff --git a/ghost/mailgun-client/lib/mailgun-client.js b/ghost/mailgun-client/lib/MailgunClient.js similarity index 100% rename from ghost/mailgun-client/lib/mailgun-client.js rename to ghost/mailgun-client/lib/MailgunClient.js diff --git a/ghost/member-attribution/index.js b/ghost/member-attribution/index.js index 5166865500..c23928eb60 100644 --- a/ghost/member-attribution/index.js +++ b/ghost/member-attribution/index.js @@ -1,7 +1,7 @@ module.exports = { - MemberAttributionService: require('./lib/service'), - AttributionBuilder: require('./lib/attribution'), - UrlTranslator: require('./lib/url-translator'), - ReferrerTranslator: require('./lib/referrer-translator'), - OutboundLinkTagger: require('./lib/outbound-link-tagger') + MemberAttributionService: require('./lib/MemberAttributionService'), + AttributionBuilder: require('./lib/AttributionBuilder'), + UrlTranslator: require('./lib/UrlTranslator'), + ReferrerTranslator: require('./lib/ReferrerTranslator'), + OutboundLinkTagger: require('./lib/OutboundLinkTagger') }; diff --git a/ghost/member-attribution/lib/attribution.js b/ghost/member-attribution/lib/AttributionBuilder.js similarity index 96% rename from ghost/member-attribution/lib/attribution.js rename to ghost/member-attribution/lib/AttributionBuilder.js index a33da77af7..dd32cf0e57 100644 --- a/ghost/member-attribution/lib/attribution.js +++ b/ghost/member-attribution/lib/AttributionBuilder.js @@ -10,7 +10,7 @@ */ class Attribution { - /** @type {import('./url-translator')} */ + /** @type {import('./UrlTranslator')} */ #urlTranslator; /** @@ -92,9 +92,9 @@ class Attribution { * Convert a UrlHistory to an attribution object */ class AttributionBuilder { - /** @type {import('./url-translator')} */ + /** @type {import('./UrlTranslator')} */ urlTranslator; - /** @type {import('./referrer-translator')} */ + /** @type {import('./ReferrerTranslator')} */ referrerTranslator; /** @@ -120,7 +120,7 @@ class AttributionBuilder { /** * Last Post Algorithm™️ - * @param {import('./history').UrlHistoryArray} history + * @param {import('./UrlHistory').UrlHistoryArray} history * @returns {Promise} */ async getAttribution(history) { diff --git a/ghost/member-attribution/lib/service.js b/ghost/member-attribution/lib/MemberAttributionService.js similarity index 93% rename from ghost/member-attribution/lib/service.js rename to ghost/member-attribution/lib/MemberAttributionService.js index de0514bdcd..cc5c410528 100644 --- a/ghost/member-attribution/lib/service.js +++ b/ghost/member-attribution/lib/MemberAttributionService.js @@ -1,4 +1,4 @@ -const UrlHistory = require('./history'); +const UrlHistory = require('./UrlHistory'); class MemberAttributionService { /** @@ -23,7 +23,7 @@ class MemberAttributionService { /** * * @param {Object} context instance of ghost framework context object - * @returns {Promise} + * @returns {Promise} */ async getAttributionFromContext(context) { if (!context || !this.isTrackingEnabled) { @@ -70,8 +70,8 @@ class MemberAttributionService { /** * - * @param {import('./history').UrlHistoryArray} historyArray - * @returns {Promise} + * @param {import('./UrlHistory').UrlHistoryArray} historyArray + * @returns {Promise} */ async getAttribution(historyArray) { let history = UrlHistory.create(historyArray); @@ -107,7 +107,7 @@ class MemberAttributionService { * Returns the attribution resource for a given event model (MemberCreatedEvent / SubscriptionCreatedEvent), where the model has the required relations already loaded * You need to already load the 'postAttribution', 'userAttribution', and 'tagAttribution' relations * @param {Object} eventModel MemberCreatedEvent or SubscriptionCreatedEvent - * @returns {import('./attribution').AttributionResource|null} + * @returns {import('./AttributionBuilder').AttributionResource|null} */ getEventAttribution(eventModel) { const _attribution = this.attributionBuilder.build({ @@ -139,7 +139,7 @@ class MemberAttributionService { /** * Returns the parsed attribution for a member creation event * @param {string} memberId - * @returns {Promise} + * @returns {Promise} */ async getMemberCreatedAttribution(memberId) { const memberCreatedEvent = await this.models.MemberCreatedEvent.findOne({member_id: memberId}, {require: false, withRelated: []}); @@ -160,7 +160,7 @@ class MemberAttributionService { /** * Returns the last attribution for a given subscription ID * @param {string} subscriptionId - * @returns {Promise} + * @returns {Promise} */ async getSubscriptionCreatedAttribution(subscriptionId) { const subscriptionCreatedEvent = await this.models.SubscriptionCreatedEvent.findOne({subscription_id: subscriptionId}, {require: false, withRelated: []}); diff --git a/ghost/member-attribution/lib/outbound-link-tagger.js b/ghost/member-attribution/lib/OutboundLinkTagger.js similarity index 100% rename from ghost/member-attribution/lib/outbound-link-tagger.js rename to ghost/member-attribution/lib/OutboundLinkTagger.js diff --git a/ghost/member-attribution/lib/referrer-translator.js b/ghost/member-attribution/lib/ReferrerTranslator.js similarity index 99% rename from ghost/member-attribution/lib/referrer-translator.js rename to ghost/member-attribution/lib/ReferrerTranslator.js index 57650009b8..c5ff27c7d5 100644 --- a/ghost/member-attribution/lib/referrer-translator.js +++ b/ghost/member-attribution/lib/ReferrerTranslator.js @@ -24,7 +24,7 @@ class ReferrerTranslator { /** * Calculate referrer details from history - * @param {import('./history').UrlHistoryArray} history + * @param {import('./UrlHistory').UrlHistoryArray} history * @returns {ReferrerData|null} */ getReferrerDetails(history) { diff --git a/ghost/member-attribution/lib/history.js b/ghost/member-attribution/lib/UrlHistory.js similarity index 100% rename from ghost/member-attribution/lib/history.js rename to ghost/member-attribution/lib/UrlHistory.js diff --git a/ghost/member-attribution/lib/url-translator.js b/ghost/member-attribution/lib/UrlTranslator.js similarity index 97% rename from ghost/member-attribution/lib/url-translator.js rename to ghost/member-attribution/lib/UrlTranslator.js index 08fd8ac48b..406c65fedd 100644 --- a/ghost/member-attribution/lib/url-translator.js +++ b/ghost/member-attribution/lib/UrlTranslator.js @@ -2,7 +2,7 @@ * @typedef {Object} UrlService * @prop {(resourceId: string, options) => Object} getResource * @prop {(resourceId: string, options) => string} getUrlByResourceId - * + * */ /** @@ -10,8 +10,8 @@ */ class UrlTranslator { /** - * - * @param {Object} deps + * + * @param {Object} deps * @param {UrlService} deps.urlService * @param {Object} deps.urlUtils * @param {Object} deps.models @@ -54,7 +54,7 @@ class UrlTranslator { /** * Get the resource type and ID from a URLHistory item that was added by the frontend attribution script - * @param {import('./history').UrlHistoryItem} item + * @param {import('./UrlHistory').UrlHistoryItem} item * @returns {Promise<{type: string, id: string | null, url: string}|null>} Returns null if the item is invalid */ async getResourceDetails(item) { @@ -136,7 +136,7 @@ class UrlTranslator { if (!post) { return null; } - + return post; } case 'author': { @@ -144,7 +144,7 @@ class UrlTranslator { if (!user) { return null; } - + return user; } case 'tag': { @@ -152,7 +152,7 @@ class UrlTranslator { if (!tag) { return null; } - + return tag; } } diff --git a/ghost/member-attribution/test/attribution.test.js b/ghost/member-attribution/test/attribution.test.js index 59301b8389..0cf21de986 100644 --- a/ghost/member-attribution/test/attribution.test.js +++ b/ghost/member-attribution/test/attribution.test.js @@ -1,8 +1,8 @@ // Switch these lines once there are useful utils // const testUtils = require('./utils'); require('./utils'); -const UrlHistory = require('../lib/history'); -const AttributionBuilder = require('../lib/attribution'); +const UrlHistory = require('../lib/UrlHistory'); +const AttributionBuilder = require('../lib/AttributionBuilder'); describe('AttributionBuilder', function () { let attributionBuilder; diff --git a/ghost/member-attribution/test/history.test.js b/ghost/member-attribution/test/history.test.js index 7393ca3148..c80752e189 100644 --- a/ghost/member-attribution/test/history.test.js +++ b/ghost/member-attribution/test/history.test.js @@ -1,7 +1,7 @@ // Switch these lines once there are useful utils // const testUtils = require('./utils'); require('./utils'); -const UrlHistory = require('../lib/history'); +const UrlHistory = require('../lib/UrlHistory'); describe('UrlHistory', function () { it('sets history to empty array if invalid', function () { diff --git a/ghost/member-attribution/test/referrer-translator.test.js b/ghost/member-attribution/test/referrer-translator.test.js index 423fa91981..375380aaa5 100644 --- a/ghost/member-attribution/test/referrer-translator.test.js +++ b/ghost/member-attribution/test/referrer-translator.test.js @@ -1,7 +1,7 @@ // Switch these lines once there are useful utils // const testUtils = require('./utils'); require('./utils'); -const ReferrerTranslator = require('../lib/referrer-translator'); +const ReferrerTranslator = require('../lib/ReferrerTranslator'); describe('ReferrerTranslator', function () { describe('Constructor', function () { diff --git a/ghost/member-attribution/test/service.test.js b/ghost/member-attribution/test/service.test.js index 34ac0d8a83..0439834880 100644 --- a/ghost/member-attribution/test/service.test.js +++ b/ghost/member-attribution/test/service.test.js @@ -1,7 +1,7 @@ // Switch these lines once there are useful utils // const testUtils = require('./utils'); require('./utils'); -const MemberAttributionService = require('../lib/service'); +const MemberAttributionService = require('../lib/MemberAttributionService'); describe('MemberAttributionService', function () { describe('Constructor', function () { diff --git a/ghost/member-attribution/test/url-translator.test.js b/ghost/member-attribution/test/url-translator.test.js index 61d06948fa..5430792a33 100644 --- a/ghost/member-attribution/test/url-translator.test.js +++ b/ghost/member-attribution/test/url-translator.test.js @@ -1,7 +1,7 @@ // Switch these lines once there are useful utils // const testUtils = require('./utils'); require('./utils'); -const UrlTranslator = require('../lib/url-translator'); +const UrlTranslator = require('../lib/UrlTranslator'); const models = { Post: { diff --git a/ghost/member-events/lib/MemberCreatedEvent.js b/ghost/member-events/lib/MemberCreatedEvent.js index 7bd9c05434..22194c22f3 100644 --- a/ghost/member-events/lib/MemberCreatedEvent.js +++ b/ghost/member-events/lib/MemberCreatedEvent.js @@ -3,7 +3,7 @@ * @prop {string} memberId * @prop {string} batchId * @prop {'import' | 'system' | 'api' | 'admin' | 'member'} source - * @prop {import('@tryghost/member-attribution/lib/attribution').Attribution} [attribution] Attribution + * @prop {import('@tryghost/member-attribution/lib/Attribution').Attribution} [attribution] Attribution */ module.exports = class MemberCreatedEvent { diff --git a/ghost/member-events/lib/SubscriptionCreatedEvent.js b/ghost/member-events/lib/SubscriptionCreatedEvent.js index a31d6207b1..15745ed47f 100644 --- a/ghost/member-events/lib/SubscriptionCreatedEvent.js +++ b/ghost/member-events/lib/SubscriptionCreatedEvent.js @@ -8,7 +8,7 @@ * @prop {string} tierId * @prop {string} subscriptionId * @prop {string} offerId - * @prop {import('@tryghost/member-attribution/lib/attribution').Attribution} [attribution] + * @prop {import('@tryghost/member-attribution/lib/Attribution').Attribution} [attribution] */ module.exports = class SubscriptionCreatedEvent { diff --git a/ghost/members-api/index.js b/ghost/members-api/index.js index 375edf3547..ebcfc84e55 100644 --- a/ghost/members-api/index.js +++ b/ghost/members-api/index.js @@ -1 +1 @@ -module.exports = require('./lib/MembersAPI'); +module.exports = require('./lib/members-api'); diff --git a/ghost/members-api/lib/controllers/member.js b/ghost/members-api/lib/controllers/MemberController.js similarity index 100% rename from ghost/members-api/lib/controllers/member.js rename to ghost/members-api/lib/controllers/MemberController.js diff --git a/ghost/members-api/lib/controllers/router.js b/ghost/members-api/lib/controllers/RouterController.js similarity index 100% rename from ghost/members-api/lib/controllers/router.js rename to ghost/members-api/lib/controllers/RouterController.js diff --git a/ghost/members-api/lib/controllers/well-known.js b/ghost/members-api/lib/controllers/WellKnownController.js similarity index 100% rename from ghost/members-api/lib/controllers/well-known.js rename to ghost/members-api/lib/controllers/WellKnownController.js diff --git a/ghost/members-api/lib/MembersAPI.js b/ghost/members-api/lib/members-api.js similarity index 94% rename from ghost/members-api/lib/MembersAPI.js rename to ghost/members-api/lib/members-api.js index 0c9ae0982e..ded91ecde2 100644 --- a/ghost/members-api/lib/MembersAPI.js +++ b/ghost/members-api/lib/members-api.js @@ -6,15 +6,15 @@ const logging = require('@tryghost/logging'); const PaymentsService = require('@tryghost/members-payments'); -const TokenService = require('./services/token'); -const GeolocationService = require('./services/geolocation'); -const MemberBREADService = require('./services/member-bread'); -const MemberRepository = require('./repositories/member'); -const EventRepository = require('./repositories/event'); -const ProductRepository = require('./repositories/product'); -const RouterController = require('./controllers/router'); -const MemberController = require('./controllers/member'); -const WellKnownController = require('./controllers/well-known'); +const TokenService = require('./services/TokenService'); +const GeolocationService = require('./services/GeolocationService'); +const MemberBREADService = require('./services/MemberBREADService'); +const MemberRepository = require('./repositories/MemberRepository'); +const EventRepository = require('./repositories/EventRepository'); +const ProductRepository = require('./repositories/ProductRepository'); +const RouterController = require('./controllers/RouterController'); +const MemberController = require('./controllers/MemberController'); +const WellKnownController = require('./controllers/WellKnownController'); const {EmailSuppressedEvent} = require('@tryghost/email-suppression-list'); const DomainEvents = require('@tryghost/domain-events'); diff --git a/ghost/members-api/lib/repositories/event.js b/ghost/members-api/lib/repositories/EventRepository.js similarity index 100% rename from ghost/members-api/lib/repositories/event.js rename to ghost/members-api/lib/repositories/EventRepository.js diff --git a/ghost/members-api/lib/repositories/member.js b/ghost/members-api/lib/repositories/MemberRepository.js similarity index 99% rename from ghost/members-api/lib/repositories/member.js rename to ghost/members-api/lib/repositories/MemberRepository.js index de844f7027..419fc29017 100644 --- a/ghost/members-api/lib/repositories/member.js +++ b/ghost/members-api/lib/repositories/MemberRepository.js @@ -223,7 +223,7 @@ module.exports = class MemberRepository { * @param {Object[]} [data.newsletters] * @param {Object} [data.stripeCustomer] * @param {string} [data.offerId] - * @param {import('@tryghost/member-attribution/lib/attribution').AttributionResource} [data.attribution] + * @param {import('@tryghost/member-attribution/lib/Attribution').AttributionResource} [data.attribution] * @param {*} options * @returns */ @@ -843,7 +843,7 @@ module.exports = class MemberRepository { * @param {String} data.id - member ID * @param {Object} data.subscription * @param {String} data.offerId - * @param {import('@tryghost/member-attribution/lib/attribution').AttributionResource} [data.attribution] + * @param {import('@tryghost/member-attribution/lib/Attribution').AttributionResource} [data.attribution] * @param {*} options * @returns */ diff --git a/ghost/members-api/lib/repositories/product.js b/ghost/members-api/lib/repositories/ProductRepository.js similarity index 100% rename from ghost/members-api/lib/repositories/product.js rename to ghost/members-api/lib/repositories/ProductRepository.js diff --git a/ghost/members-api/lib/services/geolocation.js b/ghost/members-api/lib/services/GeolocationService.js similarity index 100% rename from ghost/members-api/lib/services/geolocation.js rename to ghost/members-api/lib/services/GeolocationService.js diff --git a/ghost/members-api/lib/services/member-bread.js b/ghost/members-api/lib/services/MemberBREADService.js similarity index 99% rename from ghost/members-api/lib/services/member-bread.js rename to ghost/members-api/lib/services/MemberBREADService.js index 8c73e46e86..08acf5a925 100644 --- a/ghost/members-api/lib/services/member-bread.js +++ b/ghost/members-api/lib/services/MemberBREADService.js @@ -30,7 +30,7 @@ const messages = { module.exports = class MemberBREADService { /** * @param {object} deps - * @param {import('../repositories/member')} deps.memberRepository + * @param {import('../repositories/MemberRepository')} deps.memberRepository * @param {import('@tryghost/members-offers/lib/application/OffersAPI')} deps.offersAPI * @param {ILabsService} deps.labsService * @param {IEmailService} deps.emailService diff --git a/ghost/members-api/lib/services/token.js b/ghost/members-api/lib/services/TokenService.js similarity index 100% rename from ghost/members-api/lib/services/token.js rename to ghost/members-api/lib/services/TokenService.js diff --git a/ghost/members-api/test/unit/lib/controllers/member/index.test.js b/ghost/members-api/test/unit/lib/controllers/member/index.test.js index d3c36ca662..baac9ebd90 100644 --- a/ghost/members-api/test/unit/lib/controllers/member/index.test.js +++ b/ghost/members-api/test/unit/lib/controllers/member/index.test.js @@ -1,5 +1,5 @@ const sinon = require('sinon'); -const MemberController = require('../../../../../lib/controllers/member'); +const MemberController = require('../../../../../lib/controllers/MemberController'); describe('MemberController', function () { describe('updateSubscription', function () { diff --git a/ghost/members-api/test/unit/lib/controllers/router.test.js b/ghost/members-api/test/unit/lib/controllers/router.test.js index c968046b62..21523e8b59 100644 --- a/ghost/members-api/test/unit/lib/controllers/router.test.js +++ b/ghost/members-api/test/unit/lib/controllers/router.test.js @@ -1,5 +1,5 @@ const sinon = require('sinon'); -const RouterController = require('../../../../lib/controllers/router'); +const RouterController = require('../../../../lib/controllers/RouterController'); describe('RouterController', function () { describe('createCheckoutSession', function (){ diff --git a/ghost/members-api/test/unit/lib/geolocation.test.js b/ghost/members-api/test/unit/lib/geolocation.test.js index 759678e064..752df0ef5c 100644 --- a/ghost/members-api/test/unit/lib/geolocation.test.js +++ b/ghost/members-api/test/unit/lib/geolocation.test.js @@ -1,5 +1,5 @@ const nock = require('nock'); -const GeolocationService = require('../../../lib/services/geolocation'); +const GeolocationService = require('../../../lib/services/GeolocationService'); const RESPONSE = { longitude: '-2.2417', diff --git a/ghost/members-api/test/unit/lib/repositories/event.test.js b/ghost/members-api/test/unit/lib/repositories/event.test.js index 2f086096a7..439aa495d3 100644 --- a/ghost/members-api/test/unit/lib/repositories/event.test.js +++ b/ghost/members-api/test/unit/lib/repositories/event.test.js @@ -1,5 +1,5 @@ const should = require('should'); -const EventRepository = require('../../../../lib/repositories/event'); +const EventRepository = require('../../../../lib/repositories/EventRepository'); const sinon = require('sinon'); const errors = require('@tryghost/errors'); diff --git a/ghost/members-api/test/unit/lib/repositories/member.test.js b/ghost/members-api/test/unit/lib/repositories/member.test.js index 2e84b67deb..012889837b 100644 --- a/ghost/members-api/test/unit/lib/repositories/member.test.js +++ b/ghost/members-api/test/unit/lib/repositories/member.test.js @@ -1,7 +1,7 @@ const assert = require('assert'); const sinon = require('sinon'); const DomainEvents = require('@tryghost/domain-events'); -const MemberRepository = require('../../../../lib/repositories/member'); +const MemberRepository = require('../../../../lib/repositories/MemberRepository'); const {SubscriptionCreatedEvent} = require('@tryghost/member-events'); const mockOfferRedemption = { diff --git a/ghost/members-api/test/unit/lib/repositories/product.test.js b/ghost/members-api/test/unit/lib/repositories/product.test.js index b9ee5c3915..ef2b27e601 100644 --- a/ghost/members-api/test/unit/lib/repositories/product.test.js +++ b/ghost/members-api/test/unit/lib/repositories/product.test.js @@ -1,6 +1,6 @@ const assert = require('assert'); const sinon = require('sinon'); -const ProductRepository = require('../../../../lib/repositories/product'); +const ProductRepository = require('../../../../lib/repositories/ProductRepository'); describe('MemberRepository', function () { describe('getDefaultProduct', function () { diff --git a/ghost/members-api/test/unit/lib/services/token.test.js b/ghost/members-api/test/unit/lib/services/token.test.js index 18f5f71e9b..3219fa7b64 100644 --- a/ghost/members-api/test/unit/lib/services/token.test.js +++ b/ghost/members-api/test/unit/lib/services/token.test.js @@ -1,7 +1,7 @@ const assert = require('assert'); const jwt = require('jsonwebtoken'); const jwkToPem = require('jwk-to-pem'); -const TokenService = require('../../../../lib/services/token'); +const TokenService = require('../../../../lib/services/TokenService'); describe('TokenService', function () { let tokenService; diff --git a/ghost/members-events-service/lib/event-storage.js b/ghost/members-events-service/lib/EventStorage.js similarity index 100% rename from ghost/members-events-service/lib/event-storage.js rename to ghost/members-events-service/lib/EventStorage.js diff --git a/ghost/members-events-service/lib/last-seen-at-updater.js b/ghost/members-events-service/lib/LastSeenAtUpdater.js similarity index 100% rename from ghost/members-events-service/lib/last-seen-at-updater.js rename to ghost/members-events-service/lib/LastSeenAtUpdater.js diff --git a/ghost/members-events-service/lib/index.js b/ghost/members-events-service/lib/index.js index 1e4ac2afde..8164bbe4ed 100644 --- a/ghost/members-events-service/lib/index.js +++ b/ghost/members-events-service/lib/index.js @@ -1,4 +1,4 @@ module.exports = { - LastSeenAtUpdater: require('./last-seen-at-updater'), - EventStorage: require('./event-storage') + LastSeenAtUpdater: require('./LastSeenAtUpdater'), + EventStorage: require('./EventStorage') }; diff --git a/ghost/members-events-service/test/event-storage.test.js b/ghost/members-events-service/test/event-storage.test.js index db03d900e3..7a7f93dfd3 100644 --- a/ghost/members-events-service/test/event-storage.test.js +++ b/ghost/members-events-service/test/event-storage.test.js @@ -2,7 +2,7 @@ // const testUtils = require('./utils'); require('./utils'); const {MemberCreatedEvent, SubscriptionCreatedEvent} = require('@tryghost/member-events'); -const EventStorage = require('../lib/event-storage'); +const EventStorage = require('../lib/EventStorage'); describe('EventStorage', function () { describe('Constructor', function () { diff --git a/ghost/members-importer/index.js b/ghost/members-importer/index.js index ab7c80eb2a..7810f809c7 100644 --- a/ghost/members-importer/index.js +++ b/ghost/members-importer/index.js @@ -1 +1 @@ -module.exports = require('./lib/importer'); +module.exports = require('./lib/MembersCSVImporter'); diff --git a/ghost/members-importer/lib/importer.js b/ghost/members-importer/lib/MembersCSVImporter.js similarity index 100% rename from ghost/members-importer/lib/importer.js rename to ghost/members-importer/lib/MembersCSVImporter.js diff --git a/ghost/members-ssr/example.js b/ghost/members-ssr/example.js index 429c0287fa..dd1dccf4e9 100644 --- a/ghost/members-ssr/example.js +++ b/ghost/members-ssr/example.js @@ -56,7 +56,9 @@ const server = require('http').createServer(async (req, res) => { server.listen(0, '127.0.0.1', () => { const addressInfo = server.address(); if (addressInfo === null || typeof addressInfo === 'string') { - throw new TypeError(`Unexpected return value from server.address(): ${addressInfo}`); /* eslint-disable-line no-restricted-syntax */ + throw new TypeError({ + message: `Unexpected return value from server.address(): ${addressInfo}` + }); } const {address, port} = addressInfo; const url = `http://${address}:${port}`; diff --git a/ghost/members-ssr/index.js b/ghost/members-ssr/index.js index a3e7bea6fd..86005f12ed 100644 --- a/ghost/members-ssr/index.js +++ b/ghost/members-ssr/index.js @@ -1 +1 @@ -module.exports = require('./lib/MembersSSR'); +module.exports = require('./lib/members-ssr'); diff --git a/ghost/members-ssr/lib/MembersSSR.js b/ghost/members-ssr/lib/members-ssr.js similarity index 100% rename from ghost/members-ssr/lib/MembersSSR.js rename to ghost/members-ssr/lib/members-ssr.js diff --git a/ghost/minifier/index.js b/ghost/minifier/index.js index 770a69a08b..3f03f9e443 100644 --- a/ghost/minifier/index.js +++ b/ghost/minifier/index.js @@ -1 +1 @@ -module.exports = require('./lib/minifier'); +module.exports = require('./lib/Minifier'); diff --git a/ghost/minifier/lib/minifier.js b/ghost/minifier/lib/Minifier.js similarity index 100% rename from ghost/minifier/lib/minifier.js rename to ghost/minifier/lib/Minifier.js diff --git a/ghost/mw-session-from-token/index.js b/ghost/mw-session-from-token/index.js index 2c2e4f5176..a86c96da5e 100644 --- a/ghost/mw-session-from-token/index.js +++ b/ghost/mw-session-from-token/index.js @@ -1 +1 @@ -module.exports = require('./lib/SessionFromToken'); +module.exports = require('./lib/session-from-token'); diff --git a/ghost/mw-session-from-token/lib/SessionFromToken.js b/ghost/mw-session-from-token/lib/session-from-token.js similarity index 100% rename from ghost/mw-session-from-token/lib/SessionFromToken.js rename to ghost/mw-session-from-token/lib/session-from-token.js diff --git a/ghost/oembed-service/index.js b/ghost/oembed-service/index.js index 6e6e4c3bbd..f8279e7876 100644 --- a/ghost/oembed-service/index.js +++ b/ghost/oembed-service/index.js @@ -1 +1 @@ -module.exports = require('./lib/oembed-service'); +module.exports = require('./lib/OEmbedService'); diff --git a/ghost/oembed-service/lib/oembed-service.js b/ghost/oembed-service/lib/OEmbedService.js similarity index 99% rename from ghost/oembed-service/lib/oembed-service.js rename to ghost/oembed-service/lib/OEmbedService.js index e20b6511c3..ceb1d300a6 100644 --- a/ghost/oembed-service/lib/oembed-service.js +++ b/ghost/oembed-service/lib/OEmbedService.js @@ -57,7 +57,7 @@ const findUrlWithProvider = (url) => { * @prop {(url: URL, externalRequest: IExternalRequest) => Promise} getOEmbedData */ -class OEmbed { +class OEmbedService { /** * * @param {Object} dependencies @@ -399,4 +399,4 @@ class OEmbed { } } -module.exports = OEmbed; +module.exports = OEmbedService; diff --git a/ghost/offers/index.js b/ghost/offers/index.js index c3b1f0f5a6..d6e7e14955 100644 --- a/ghost/offers/index.js +++ b/ghost/offers/index.js @@ -1,80 +1 @@ -/* eslint-disable max-lines */ -// @TODO: Reduce file length and remove the line above - -const DomainEvents = require('@tryghost/domain-events'); -const OfferCodeChangeEvent = require('./lib/domain/events/OfferCodeChange'); -const OfferCreatedEvent = require('./lib/domain/events/OfferCreated'); -const OfferRepository = require('./lib/application/OfferRepository'); -const OffersAPI = require('./lib/application/OffersAPI'); - -class OffersModule { - /** - * @param {OffersAPI} offersAPI - * @param {import('@tryghost/express-dynamic-redirects')} redirectManager - * @param {OfferRepository} repository - */ - constructor(offersAPI, redirectManager, repository) { - this.api = offersAPI; - this.repository = repository; - this.redirectManager = redirectManager; - } - - /** - * @returns {Promise} - */ - async init() { - DomainEvents.subscribe(OfferCodeChangeEvent, (event) => { - if (event.data.previousCode) { - this.redirectManager.removeRedirect(`/${event.data.previousCode.value}`); - } - this.redirectManager.addRedirect( - `/${event.data.currentCode.value}`, - `/#/portal/offers/${event.data.offerId}`, - {permanent: false} - ); - }); - - DomainEvents.subscribe(OfferCreatedEvent, (event) => { - this.redirectManager.addRedirect( - `/${event.data.offer.code.value}`, - `/#/portal/offers/${event.data.offer.id}`, - {permanent: false} - ); - }); - - const offers = await this.repository.getAll(); - - for (const offer of offers) { - this.redirectManager.addRedirect( - `/${offer.code.value}`, - `/#/portal/offers/${offer.id}`, - {permanent: false} - ); - } - } - - /** - * @param {object} deps - * @param {import('@tryghost/express-dynamic-redirects')} deps.redirectManager - * @param {any} deps.OfferModel - * @param {any} deps.OfferRedemptionModel - * - * @returns {OffersModule} - */ - static create(deps) { - const repository = new OfferRepository(deps.OfferModel, deps.OfferRedemptionModel); - const offersAPI = new OffersAPI(repository); - return new OffersModule(offersAPI, deps.redirectManager, repository); - } - - static events = { - OfferCreatedEvent, - OfferCodeChangeEvent - }; - - static OfferRepository = OfferRepository; - - static OffersAPI = OffersAPI; -} - -module.exports = OffersModule; +module.exports = require('./lib/OffersModule'); diff --git a/ghost/offers/lib/OffersModule.js b/ghost/offers/lib/OffersModule.js new file mode 100644 index 0000000000..ccd27e0195 --- /dev/null +++ b/ghost/offers/lib/OffersModule.js @@ -0,0 +1,80 @@ +/* eslint-disable max-lines */ +// @TODO: Reduce file length and remove the line above + +const DomainEvents = require('@tryghost/domain-events'); +const OfferCodeChangeEvent = require('./domain/events/OfferCodeChangeEvent'); +const OfferCreatedEvent = require('./domain/events/OfferCreatedEvent'); +const OfferRepository = require('./application/OfferRepository'); +const OffersAPI = require('./application/OffersAPI'); + +class OffersModule { + /** + * @param {OffersAPI} offersAPI + * @param {import('@tryghost/express-dynamic-redirects')} redirectManager + * @param {OfferRepository} repository + */ + constructor(offersAPI, redirectManager, repository) { + this.api = offersAPI; + this.repository = repository; + this.redirectManager = redirectManager; + } + + /** + * @returns {Promise} + */ + async init() { + DomainEvents.subscribe(OfferCodeChangeEvent, (event) => { + if (event.data.previousCode) { + this.redirectManager.removeRedirect(`/${event.data.previousCode.value}`); + } + this.redirectManager.addRedirect( + `/${event.data.currentCode.value}`, + `/#/portal/offers/${event.data.offerId}`, + {permanent: false} + ); + }); + + DomainEvents.subscribe(OfferCreatedEvent, (event) => { + this.redirectManager.addRedirect( + `/${event.data.offer.code.value}`, + `/#/portal/offers/${event.data.offer.id}`, + {permanent: false} + ); + }); + + const offers = await this.repository.getAll(); + + for (const offer of offers) { + this.redirectManager.addRedirect( + `/${offer.code.value}`, + `/#/portal/offers/${offer.id}`, + {permanent: false} + ); + } + } + + /** + * @param {object} deps + * @param {import('@tryghost/express-dynamic-redirects')} deps.redirectManager + * @param {any} deps.OfferModel + * @param {any} deps.OfferRedemptionModel + * + * @returns {OffersModule} + */ + static create(deps) { + const repository = new OfferRepository(deps.OfferModel, deps.OfferRedemptionModel); + const offersAPI = new OffersAPI(repository); + return new OffersModule(offersAPI, deps.redirectManager, repository); + } + + static events = { + OfferCreatedEvent, + OfferCodeChangeEvent + }; + + static OfferRepository = OfferRepository; + + static OffersAPI = OffersAPI; +} + +module.exports = OffersModule; diff --git a/ghost/offers/lib/application/OfferRepository.js b/ghost/offers/lib/application/OfferRepository.js index 41a483b7e9..f27f4e5e68 100644 --- a/ghost/offers/lib/application/OfferRepository.js +++ b/ghost/offers/lib/application/OfferRepository.js @@ -1,8 +1,8 @@ const {flowRight} = require('lodash'); const {mapKeyValues, mapQuery} = require('@tryghost/mongo-utils'); const DomainEvents = require('@tryghost/domain-events'); -const OfferCodeChangeEvent = require('../domain/events/OfferCodeChange'); -const OfferCreatedEvent = require('../domain/events/OfferCreated'); +const OfferCodeChangeEvent = require('../domain/events/OfferCodeChangeEvent'); +const OfferCreatedEvent = require('../domain/events/OfferCreatedEvent'); const Offer = require('../domain/models/Offer'); const OfferStatus = require('../domain/models/OfferStatus'); diff --git a/ghost/offers/lib/domain/events/OfferCodeChange.js b/ghost/offers/lib/domain/events/OfferCodeChangeEvent.js similarity index 89% rename from ghost/offers/lib/domain/events/OfferCodeChange.js rename to ghost/offers/lib/domain/events/OfferCodeChangeEvent.js index f9428dfbc0..6397e59e62 100644 --- a/ghost/offers/lib/domain/events/OfferCodeChange.js +++ b/ghost/offers/lib/domain/events/OfferCodeChangeEvent.js @@ -7,7 +7,7 @@ * @prop {OfferCode} currentCode */ -class OfferCodeChangeEvent { +module.exports = class OfferCodeChangeEvent { /** * @param {OfferCodeChangeEventData} data * @param {Date} timestamp @@ -24,6 +24,4 @@ class OfferCodeChangeEvent { static create(data, timestamp) { return new OfferCodeChangeEvent(data, timestamp || new Date); } -} - -module.exports = OfferCodeChangeEvent; +}; diff --git a/ghost/offers/lib/domain/events/OfferCreated.js b/ghost/offers/lib/domain/events/OfferCreatedEvent.js similarity index 88% rename from ghost/offers/lib/domain/events/OfferCreated.js rename to ghost/offers/lib/domain/events/OfferCreatedEvent.js index c07437f24d..b76e74ca28 100644 --- a/ghost/offers/lib/domain/events/OfferCreated.js +++ b/ghost/offers/lib/domain/events/OfferCreatedEvent.js @@ -5,7 +5,7 @@ * @prop {Offer} offer */ -class OfferCreatedEvent { +module.exports = class OfferCreatedEvent { /** * @param {OfferCreatedEventData} data * @param {Date} timestamp @@ -22,6 +22,4 @@ class OfferCreatedEvent { static create(data, timestamp) { return new OfferCreatedEvent(data, timestamp || new Date); } -} - -module.exports = OfferCreatedEvent; +}; diff --git a/ghost/payments/index.js b/ghost/payments/index.js index f3c7d8bc8c..3d502b3038 100644 --- a/ghost/payments/index.js +++ b/ghost/payments/index.js @@ -1 +1 @@ -module.exports = require('./lib/payments'); +module.exports = require('./lib/PaymentsService'); diff --git a/ghost/payments/lib/payments.js b/ghost/payments/lib/PaymentsService.js similarity index 100% rename from ghost/payments/lib/payments.js rename to ghost/payments/lib/PaymentsService.js diff --git a/ghost/payments/test/lib/payments.test.js b/ghost/payments/test/lib/payments.test.js index 2f4d82da9e..f744c30ff3 100644 --- a/ghost/payments/test/lib/payments.test.js +++ b/ghost/payments/test/lib/payments.test.js @@ -2,7 +2,7 @@ const assert = require('assert'); const sinon = require('sinon'); const knex = require('knex'); const {Tier} = require('@tryghost/tiers'); -const PaymentsService = require('../../lib/payments'); +const PaymentsService = require('../../lib/PaymentsService'); describe('PaymentsService', function () { let Bookshelf; diff --git a/ghost/session-service/index.js b/ghost/session-service/index.js index d54ee47ba2..82b4d9a720 100644 --- a/ghost/session-service/index.js +++ b/ghost/session-service/index.js @@ -1 +1 @@ -module.exports = require('./lib/SessionService'); +module.exports = require('./lib/session-service'); diff --git a/ghost/session-service/lib/SessionService.js b/ghost/session-service/lib/session-service.js similarity index 100% rename from ghost/session-service/lib/SessionService.js rename to ghost/session-service/lib/session-service.js diff --git a/ghost/settings-path-manager/index.js b/ghost/settings-path-manager/index.js index a2b42f55db..7f8f5234cb 100644 --- a/ghost/settings-path-manager/index.js +++ b/ghost/settings-path-manager/index.js @@ -1 +1 @@ -module.exports = require('./lib/settings-path-manager'); +module.exports = require('./lib/SettingsPathManager'); diff --git a/ghost/settings-path-manager/lib/settings-path-manager.js b/ghost/settings-path-manager/lib/SettingsPathManager.js similarity index 100% rename from ghost/settings-path-manager/lib/settings-path-manager.js rename to ghost/settings-path-manager/lib/SettingsPathManager.js diff --git a/ghost/sodo-search/package.json b/ghost/sodo-search/package.json index 3536873aca..e668774856 100644 --- a/ghost/sodo-search/package.json +++ b/ghost/sodo-search/package.json @@ -80,7 +80,7 @@ "chalk": "4.1.2", "chokidar": "3.5.3", "copy-webpack-plugin": "11.0.0", - "eslint-plugin-ghost": "2.16.0", + "eslint-plugin-ghost": "3.0.0", "minimist": "1.2.8", "nock": "13.3.0", "ora": "5.4.1", diff --git a/ghost/staff-service/index.js b/ghost/staff-service/index.js index b2cf7946f0..6541924738 100644 --- a/ghost/staff-service/index.js +++ b/ghost/staff-service/index.js @@ -1 +1 @@ -module.exports = require('./lib/staff-service'); +module.exports = require('./lib/StaffService'); diff --git a/ghost/staff-service/lib/staff-service.js b/ghost/staff-service/lib/StaffService.js similarity index 99% rename from ghost/staff-service/lib/staff-service.js rename to ghost/staff-service/lib/StaffService.js index 8f06bd4005..6c90f58f79 100644 --- a/ghost/staff-service/lib/staff-service.js +++ b/ghost/staff-service/lib/StaffService.js @@ -13,7 +13,7 @@ class StaffService { this.DomainEvents = DomainEvents; this.memberAttributionService = memberAttributionService; - const Emails = require('./emails'); + const Emails = require('./StaffServiceEmails'); /** @private */ this.emails = new Emails({ diff --git a/ghost/staff-service/lib/emails.js b/ghost/staff-service/lib/StaffServiceEmails.js similarity index 100% rename from ghost/staff-service/lib/emails.js rename to ghost/staff-service/lib/StaffServiceEmails.js diff --git a/ghost/stats-service/index.js b/ghost/stats-service/index.js index 61a8b27222..b4fcae8ad6 100644 --- a/ghost/stats-service/index.js +++ b/ghost/stats-service/index.js @@ -1 +1 @@ -module.exports = require('./lib/stats'); +module.exports = require('./lib/StatsService'); diff --git a/ghost/stats-service/lib/members.js b/ghost/stats-service/lib/MembersStatsService.js similarity index 100% rename from ghost/stats-service/lib/members.js rename to ghost/stats-service/lib/MembersStatsService.js diff --git a/ghost/stats-service/lib/mrr.js b/ghost/stats-service/lib/MrrStatsService.js similarity index 100% rename from ghost/stats-service/lib/mrr.js rename to ghost/stats-service/lib/MrrStatsService.js diff --git a/ghost/stats-service/lib/referrers.js b/ghost/stats-service/lib/ReferrersStatsService.js similarity index 100% rename from ghost/stats-service/lib/referrers.js rename to ghost/stats-service/lib/ReferrersStatsService.js diff --git a/ghost/stats-service/lib/stats.js b/ghost/stats-service/lib/StatsService.js similarity index 85% rename from ghost/stats-service/lib/stats.js rename to ghost/stats-service/lib/StatsService.js index 6a5eb9fa66..12054feca3 100644 --- a/ghost/stats-service/lib/stats.js +++ b/ghost/stats-service/lib/StatsService.js @@ -1,7 +1,7 @@ -const MRRService = require('./mrr'); -const MembersService = require('./members'); -const SubscriptionStatsService = require('./subscriptions'); -const ReferrersStatsService = require('./referrers'); +const MRRService = require('./MrrStatsService'); +const MembersService = require('./MembersStatsService'); +const SubscriptionStatsService = require('./SubscriptionStatsService'); +const ReferrersStatsService = require('./ReferrersStatsService'); class StatsService { /** diff --git a/ghost/stats-service/lib/subscriptions.js b/ghost/stats-service/lib/SubscriptionStatsService.js similarity index 100% rename from ghost/stats-service/lib/subscriptions.js rename to ghost/stats-service/lib/SubscriptionStatsService.js diff --git a/ghost/stats-service/test/lib/members.test.js b/ghost/stats-service/test/lib/members.test.js index 9167dee32a..01fe615882 100644 --- a/ghost/stats-service/test/lib/members.test.js +++ b/ghost/stats-service/test/lib/members.test.js @@ -1,4 +1,4 @@ -const MembersStatsService = require('../../lib/members'); +const MembersStatsService = require('../../lib/MembersStatsService'); const knex = require('knex').default; const assert = require('assert'); const moment = require('moment'); diff --git a/ghost/stats-service/test/lib/mrr.test.js b/ghost/stats-service/test/lib/mrr.test.js index 3b32b7861c..7273bbadad 100644 --- a/ghost/stats-service/test/lib/mrr.test.js +++ b/ghost/stats-service/test/lib/mrr.test.js @@ -1,4 +1,4 @@ -const MrrStatsService = require('../../lib/mrr'); +const MrrStatsService = require('../../lib/MrrStatsService'); const moment = require('moment'); const sinon = require('sinon'); const knex = require('knex').default; diff --git a/ghost/stats-service/test/lib/referrers.test.js b/ghost/stats-service/test/lib/referrers.test.js index 6994dcc8bc..bf77366084 100644 --- a/ghost/stats-service/test/lib/referrers.test.js +++ b/ghost/stats-service/test/lib/referrers.test.js @@ -1,6 +1,6 @@ const knex = require('knex').default; const assert = require('assert'); -const ReferrersStatsService = require('../../lib/referrers'); +const ReferrersStatsService = require('../../lib/ReferrersStatsService'); describe('ReferrersStatsService', function () { describe('getReferrerHistory', function () { diff --git a/ghost/stats-service/test/lib/stats.test.js b/ghost/stats-service/test/lib/stats.test.js index 9a5acc063b..ef1b31b48d 100644 --- a/ghost/stats-service/test/lib/stats.test.js +++ b/ghost/stats-service/test/lib/stats.test.js @@ -1,4 +1,4 @@ -const StatsService = require('../../lib/stats'); +const StatsService = require('../../lib/StatsService'); const knex = require('knex').default; const assert = require('assert'); diff --git a/ghost/stats-service/test/lib/subscriptions.test.js b/ghost/stats-service/test/lib/subscriptions.test.js index e5999cf946..f8a94ef3e4 100644 --- a/ghost/stats-service/test/lib/subscriptions.test.js +++ b/ghost/stats-service/test/lib/subscriptions.test.js @@ -1,6 +1,6 @@ const knex = require('knex').default; const assert = require('assert'); -const SubscriptionStatsService = require('../../lib/subscriptions'); +const SubscriptionStatsService = require('../../lib/SubscriptionStatsService'); describe('SubscriptionStatsService', function () { describe('getSubscriptionHistory', function () { diff --git a/ghost/stripe/lib/Migrations.js b/ghost/stripe/lib/StripeMigrations.js similarity index 100% rename from ghost/stripe/lib/Migrations.js rename to ghost/stripe/lib/StripeMigrations.js diff --git a/ghost/stripe/lib/StripeService.js b/ghost/stripe/lib/StripeService.js index 7781ae5a75..0e81a54998 100644 --- a/ghost/stripe/lib/StripeService.js +++ b/ghost/stripe/lib/StripeService.js @@ -1,6 +1,6 @@ const WebhookManager = require('./WebhookManager'); const StripeAPI = require('./StripeAPI'); -const StripeMigrations = require('./Migrations'); +const StripeMigrations = require('./StripeMigrations'); const WebhookController = require('./WebhookController'); module.exports = class StripeService { diff --git a/ghost/stripe/test/unit/lib/Migrations.test.js b/ghost/stripe/test/unit/lib/Migrations.test.js index b72568cde5..290e2a731d 100644 --- a/ghost/stripe/test/unit/lib/Migrations.test.js +++ b/ghost/stripe/test/unit/lib/Migrations.test.js @@ -1,6 +1,6 @@ const assert = require('assert'); const sinon = require('sinon'); -const Migrations = require('../../../lib/Migrations'); +const Migrations = require('../../../lib/StripeMigrations'); describe('Migrations', function () { describe('updateStripeProductNamesFromDefaultProduct', function () { diff --git a/ghost/update-check-service/lib/update-check-service.js b/ghost/update-check-service/lib/UpdateCheckService.js similarity index 100% rename from ghost/update-check-service/lib/update-check-service.js rename to ghost/update-check-service/lib/UpdateCheckService.js diff --git a/ghost/update-check-service/package.json b/ghost/update-check-service/package.json index 6099774538..8f132d4c1a 100644 --- a/ghost/update-check-service/package.json +++ b/ghost/update-check-service/package.json @@ -4,8 +4,8 @@ "version": "0.0.0", "author": "Ghost Foundation", "license": "MIT", - "main": "./lib/update-check-service.js", - "exports": "./lib/update-check-service.js", + "main": "./lib/UpdateCheckService.js", + "exports": "./lib/UpdateCheckService.js", "scripts": { "dev": "echo \"Implement me!\"", "test:unit": "NODE_ENV=testing c8 --all --check-coverage --reporter text --reporter cobertura mocha './test/**/*.test.js'", diff --git a/ghost/update-check-service/test/update-check-service.test.js b/ghost/update-check-service/test/update-check-service.test.js index 2f8c5277cd..b92bba31b5 100644 --- a/ghost/update-check-service/test/update-check-service.test.js +++ b/ghost/update-check-service/test/update-check-service.test.js @@ -6,7 +6,7 @@ const uuid = require('uuid'); const assert = require('assert'); const logging = require('@tryghost/logging'); -const UpdateCheckService = require('../lib/update-check-service'); +const UpdateCheckService = require('../lib/UpdateCheckService'); describe('Update Check', function () { const internal = {context: {internal: true}}; diff --git a/ghost/verification-trigger/index.js b/ghost/verification-trigger/index.js index 5f50ce30ce..6ff95c8d49 100644 --- a/ghost/verification-trigger/index.js +++ b/ghost/verification-trigger/index.js @@ -1 +1 @@ -module.exports = require('./lib/verification-trigger'); +module.exports = require('./lib/VerificationTrigger'); diff --git a/ghost/verification-trigger/lib/verification-trigger.js b/ghost/verification-trigger/lib/VerificationTrigger.js similarity index 100% rename from ghost/verification-trigger/lib/verification-trigger.js rename to ghost/verification-trigger/lib/VerificationTrigger.js diff --git a/ghost/version-notifications-data-service/index.js b/ghost/version-notifications-data-service/index.js index ad6f948f3f..cc246f61de 100644 --- a/ghost/version-notifications-data-service/index.js +++ b/ghost/version-notifications-data-service/index.js @@ -1 +1 @@ -module.exports = require('./lib/version-notifications-data-service'); +module.exports = require('./lib/VersionNotificationsDataService'); diff --git a/ghost/version-notifications-data-service/lib/version-notifications-data-service.js b/ghost/version-notifications-data-service/lib/VersionNotificationsDataService.js similarity index 100% rename from ghost/version-notifications-data-service/lib/version-notifications-data-service.js rename to ghost/version-notifications-data-service/lib/VersionNotificationsDataService.js diff --git a/package.json b/package.json index 9ed45e2cd4..4c9244587c 100644 --- a/package.json +++ b/package.json @@ -123,7 +123,7 @@ }, "devDependencies": { "concurrently": "8.0.1", - "eslint-plugin-ghost": "2.16.0", + "eslint-plugin-ghost": "3.0.0", "husky": "8.0.3", "lerna": "6.6.2", "lint-staged": "13.1.2", diff --git a/yarn.lock b/yarn.lock index fbd3a1b512..01ec7ed26d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1967,15 +1967,15 @@ ee-log "^3.0.0" section-tests "^1.3.0" -"@elastic/elasticsearch@8.5.0", "@elastic/elasticsearch@8.6.0": - version "8.5.0" - resolved "https://registry.yarnpkg.com/@elastic/elasticsearch/-/elasticsearch-8.5.0.tgz#407aee0950a082ee76735a567f2571cf4301d4ea" - integrity sha512-iOgr/3zQi84WmPhAplnK2W13R89VXD2oc6WhlQmH3bARQwmI+De23ZJKBEn7bvuG/AHMAqasPXX7uJIiJa2MqQ== +"@elastic/elasticsearch@8.6.0": + version "8.6.0" + resolved "https://registry.yarnpkg.com/@elastic/elasticsearch/-/elasticsearch-8.6.0.tgz#c474f49808deee64b5bc5b8f938bf78f4468cb94" + integrity sha512-mN5EbbgSp1rfRmQ/5Hv7jqAK8xhGJxCg7G84xje8hSefE59P+HPPCv/+DgesCUSJdZpwXIo0DwOWHfHvktxxLw== dependencies: - "@elastic/transport" "^8.2.0" + "@elastic/transport" "^8.3.1" tslib "^2.4.0" -"@elastic/transport@^8.2.0": +"@elastic/transport@^8.3.1": version "8.3.1" resolved "https://registry.yarnpkg.com/@elastic/transport/-/transport-8.3.1.tgz#e7569d7df35b03108ea7aa886113800245faa17f" integrity sha512-jv/Yp2VLvv5tSMEOF8iGrtL2YsYHbpf4s+nDsItxUTLFTzuJGpnsB/xBlfsoT2kAYEnWHiSJuqrbRcpXEI/SEQ== @@ -2749,7 +2749,7 @@ handlebars "^4.0.13" simple-html-tokenizer "^0.5.8" -"@glimmer/syntax@^0.84.3": +"@glimmer/syntax@^0.84.2", "@glimmer/syntax@^0.84.3": version "0.84.3" resolved "https://registry.yarnpkg.com/@glimmer/syntax/-/syntax-0.84.3.tgz#4045a1708cef7fd810cff42fe6deeba40c7286d0" integrity sha512-ioVbTic6ZisLxqTgRBL2PCjYZTFIwobifCustrozRU2xGDiYvVIL0vt25h2c1ioDsX59UgVlDkIK4YTAQQSd2A== @@ -4433,6 +4433,20 @@ dependencies: "@stdlib/assert-has-uint8clampedarray-support" "^0.0.x" +"@stdlib/array@^0.0.x": + version "0.0.12" + resolved "https://registry.yarnpkg.com/@stdlib/array/-/array-0.0.12.tgz#12f40ab95bb36d424cdad991f29fc3cb491ee29e" + integrity sha512-nDksiuvRC1dSTHrf5yOGQmlRwAzSKV8MdFQwFSvLbZGGhi5Y4hExqea5HloLgNVouVs8lnAFi2oubSM4Mc7YAg== + dependencies: + "@stdlib/assert" "^0.0.x" + "@stdlib/blas" "^0.0.x" + "@stdlib/complex" "^0.0.x" + "@stdlib/constants" "^0.0.x" + "@stdlib/math" "^0.0.x" + "@stdlib/symbol" "^0.0.x" + "@stdlib/types" "^0.0.x" + "@stdlib/utils" "^0.0.x" + "@stdlib/assert-has-float32array-support@^0.0.x": version "0.0.8" resolved "https://registry.yarnpkg.com/@stdlib/assert-has-float32array-support/-/assert-has-float32array-support-0.0.8.tgz#77371183726e26ca9e6f9db41d34543607074067" @@ -4786,6 +4800,47 @@ dependencies: "@stdlib/assert-is-array" "^0.0.x" +"@stdlib/assert@^0.0.x": + version "0.0.12" + resolved "https://registry.yarnpkg.com/@stdlib/assert/-/assert-0.0.12.tgz#1648c9016e5041291f55a6464abcc4069c5103ce" + integrity sha512-38FxFf+ZoQZbdc+m09UsWtaCmzd/2e7im0JOaaFYE7icmRfm+4KiE9BRvBT4tIn7ioLB2f9PsBicKjIsf+tY1w== + dependencies: + "@stdlib/array" "^0.0.x" + "@stdlib/cli" "^0.0.x" + "@stdlib/complex" "^0.0.x" + "@stdlib/constants" "^0.0.x" + "@stdlib/fs" "^0.0.x" + "@stdlib/math" "^0.0.x" + "@stdlib/ndarray" "^0.0.x" + "@stdlib/number" "^0.0.x" + "@stdlib/os" "^0.0.x" + "@stdlib/process" "^0.0.x" + "@stdlib/regexp" "^0.0.x" + "@stdlib/streams" "^0.0.x" + "@stdlib/string" "^0.0.x" + "@stdlib/symbol" "^0.0.x" + "@stdlib/types" "^0.0.x" + "@stdlib/utils" "^0.0.x" + +"@stdlib/bigint@^0.0.x": + version "0.0.11" + resolved "https://registry.yarnpkg.com/@stdlib/bigint/-/bigint-0.0.11.tgz#c416a1d727001c55f4897e6424124199d638f2fd" + integrity sha512-uz0aYDLABAYyqxaCSHYbUt0yPkXYUCR7TrVvHN+UUD3i8FZ02ZKcLO+faKisDyxKEoSFTNtn3Ro8Ir5ebOlVXQ== + dependencies: + "@stdlib/utils" "^0.0.x" + +"@stdlib/blas@^0.0.x": + version "0.0.12" + resolved "https://registry.yarnpkg.com/@stdlib/blas/-/blas-0.0.12.tgz#7e93e42b4621fc6903bf63264f045047333536c2" + integrity sha512-nWY749bWceuoWQ7gz977blCwR7lyQ/rsIXVO4b600h+NFpeA2i/ea7MYC680utIbeu2cnDWHdglBPoK535VAzA== + dependencies: + "@stdlib/array" "^0.0.x" + "@stdlib/assert" "^0.0.x" + "@stdlib/math" "^0.0.x" + "@stdlib/number" "^0.0.x" + "@stdlib/types" "^0.0.x" + "@stdlib/utils" "^0.0.x" + "@stdlib/buffer-ctor@^0.0.x": version "0.0.7" resolved "https://registry.yarnpkg.com/@stdlib/buffer-ctor/-/buffer-ctor-0.0.7.tgz#d05b7f4a6ef26defe6cdd41ca244a927b96c55ec" @@ -4812,6 +4867,17 @@ "@stdlib/buffer-ctor" "^0.0.x" "@stdlib/string-format" "^0.0.x" +"@stdlib/buffer@^0.0.x": + version "0.0.11" + resolved "https://registry.yarnpkg.com/@stdlib/buffer/-/buffer-0.0.11.tgz#6137b00845e6c905181cc7ebfae9f7e47c01b0ce" + integrity sha512-Jeie5eDDa1tVuRcuU+cBXI/oOXSmMxUUccZpqXzgYe0IO8QSNtNxv9mUTzJk/m5wH+lmLoDvNxzPpOH9TODjJg== + dependencies: + "@stdlib/array" "^0.0.x" + "@stdlib/assert" "^0.0.x" + "@stdlib/process" "^0.0.x" + "@stdlib/types" "^0.0.x" + "@stdlib/utils" "^0.0.x" + "@stdlib/cli-ctor@^0.0.x": version "0.0.3" resolved "https://registry.yarnpkg.com/@stdlib/cli-ctor/-/cli-ctor-0.0.3.tgz#5b0a6d253217556c778015eee6c14be903f82c2b" @@ -4821,6 +4887,14 @@ "@stdlib/utils-noop" "^0.0.x" minimist "^1.2.0" +"@stdlib/cli@^0.0.x": + version "0.0.10" + resolved "https://registry.yarnpkg.com/@stdlib/cli/-/cli-0.0.10.tgz#28e2fbe6865d7f5cd15b7dc5846c99bd3b91674f" + integrity sha512-OITGaxG46kwK799+NuOd/+ccosJ9koVuQBC610DDJv0ZJf8mD7sbjGXrmue9C4EOh8MP7Vm/6HN14BojX8oTCg== + dependencies: + "@stdlib/utils" "^0.0.x" + minimist "^1.2.0" + "@stdlib/complex-float32@^0.0.7", "@stdlib/complex-float32@^0.0.x": version "0.0.7" resolved "https://registry.yarnpkg.com/@stdlib/complex-float32/-/complex-float32-0.0.7.tgz#fb9a0c34254eaf3ed91c39983e19ef131fc18bc1" @@ -4863,6 +4937,16 @@ "@stdlib/types" "^0.0.x" "@stdlib/utils-library-manifest" "^0.0.x" +"@stdlib/complex@^0.0.x": + version "0.0.12" + resolved "https://registry.yarnpkg.com/@stdlib/complex/-/complex-0.0.12.tgz#3afbc190cd0a9b37fc7c6e508c3aa9fda9106944" + integrity sha512-UbZBdaUxT2G+lsTIrVlRZwx2IRY6GXnVILggeejsIVxHSuK+oTyapfetcAv0FJFLP+Rrr+ZzrN4b9G3hBw6NHA== + dependencies: + "@stdlib/array" "^0.0.x" + "@stdlib/assert" "^0.0.x" + "@stdlib/types" "^0.0.x" + "@stdlib/utils" "^0.0.x" + "@stdlib/constants-array-max-typed-array-length@^0.0.x": version "0.0.7" resolved "https://registry.yarnpkg.com/@stdlib/constants-array-max-typed-array-length/-/constants-array-max-typed-array-length-0.0.7.tgz#b6e4cd8e46f4a1ae2b655646d46393ba3d8d5c2b" @@ -4928,6 +5012,16 @@ resolved "https://registry.yarnpkg.com/@stdlib/constants-uint8-max/-/constants-uint8-max-0.0.7.tgz#d50affeaeb6e67a0f39059a8f5122f3fd5ff4447" integrity sha512-fqV+xds4jgwFxwWu08b8xDuIoW6/D4/1dtEjZ1sXVeWR7nf0pjj1cHERq4kdkYxsvOGu+rjoR3MbjzpFc4fvSw== +"@stdlib/constants@^0.0.x": + version "0.0.11" + resolved "https://registry.yarnpkg.com/@stdlib/constants/-/constants-0.0.11.tgz#78cd56d6c2982b30264843c3d75bde7125e90cd2" + integrity sha512-cWKy0L9hXHUQTvFzdPkTvZnn/5Pjv7H4UwY0WC1rLt+A5CxFDJKjvnIi9ypSzJS3CAiGl1ZaHCdadoqXhNdkUg== + dependencies: + "@stdlib/array" "^0.0.x" + "@stdlib/assert" "^0.0.x" + "@stdlib/number" "^0.0.x" + "@stdlib/utils" "^0.0.x" + "@stdlib/fs-exists@^0.0.x": version "0.0.8" resolved "https://registry.yarnpkg.com/@stdlib/fs-exists/-/fs-exists-0.0.8.tgz#391b2cee3e014a3b20266e5d047847f68ef82331" @@ -4961,6 +5055,20 @@ "@stdlib/process-cwd" "^0.0.x" "@stdlib/utils-define-nonenumerable-read-only-property" "^0.0.x" +"@stdlib/fs@^0.0.x": + version "0.0.12" + resolved "https://registry.yarnpkg.com/@stdlib/fs/-/fs-0.0.12.tgz#662365fd5846a51f075724b4f2888ae88441b70d" + integrity sha512-zcDLbt39EEM3M3wJW6luChS53B8T+TMJkjs2526UpKJ71O0/0adR57cI7PfCpkMd33d05uM7GM+leEj4eks4Cw== + dependencies: + "@stdlib/array" "^0.0.x" + "@stdlib/assert" "^0.0.x" + "@stdlib/cli" "^0.0.x" + "@stdlib/math" "^0.0.x" + "@stdlib/process" "^0.0.x" + "@stdlib/string" "^0.0.x" + "@stdlib/utils" "^0.0.x" + debug "^2.6.9" + "@stdlib/math-base-assert-is-integer@^0.0.x": version "0.0.7" resolved "https://registry.yarnpkg.com/@stdlib/math-base-assert-is-integer/-/math-base-assert-is-integer-0.0.7.tgz#d70faf41bed1bd737333877eb21660bf0ee779df" @@ -4994,6 +5102,50 @@ "@stdlib/math-base-napi-unary" "^0.0.x" "@stdlib/utils-library-manifest" "^0.0.x" +"@stdlib/math@^0.0.x": + version "0.0.11" + resolved "https://registry.yarnpkg.com/@stdlib/math/-/math-0.0.11.tgz#eb6638bc03a20fbd6727dd5b977ee0170bda4649" + integrity sha512-qI78sR1QqGjHj8k/aAqkZ51Su2fyBvaR/jMKQqcB/ML8bpYpf+QGlGvTty5Qdru/wpqds4kVFOVbWGcNFIV2+Q== + dependencies: + "@stdlib/assert" "^0.0.x" + "@stdlib/constants" "^0.0.x" + "@stdlib/ndarray" "^0.0.x" + "@stdlib/number" "^0.0.x" + "@stdlib/strided" "^0.0.x" + "@stdlib/symbol" "^0.0.x" + "@stdlib/types" "^0.0.x" + "@stdlib/utils" "^0.0.x" + debug "^2.6.9" + +"@stdlib/ndarray@^0.0.x": + version "0.0.13" + resolved "https://registry.yarnpkg.com/@stdlib/ndarray/-/ndarray-0.0.13.tgz#2e8fc645e10f56a645a0ab81598808c0e8f43b82" + integrity sha512-Z+U9KJP4U2HWrLtuAXSPvhNetAdqaNLMcliR6S/fz+VPlFDeymRK7omRFMgVQ+1zcAvIgKZGJxpLC3vjiPUYEw== + dependencies: + "@stdlib/array" "^0.0.x" + "@stdlib/assert" "^0.0.x" + "@stdlib/bigint" "^0.0.x" + "@stdlib/buffer" "^0.0.x" + "@stdlib/complex" "^0.0.x" + "@stdlib/constants" "^0.0.x" + "@stdlib/math" "^0.0.x" + "@stdlib/number" "^0.0.x" + "@stdlib/string" "^0.0.x" + "@stdlib/types" "^0.0.x" + "@stdlib/utils" "^0.0.x" + +"@stdlib/nlp@^0.0.x": + version "0.0.11" + resolved "https://registry.yarnpkg.com/@stdlib/nlp/-/nlp-0.0.11.tgz#532ec0f7267b8d639e4c20c6de864e8de8a09054" + integrity sha512-D9avYWANm0Db2W7RpzdSdi5GxRYALGAqUrNnRnnKIO6sMEfr/DvONoAbWruda4QyvSC+0MJNwcEn7+PHhRwYhw== + dependencies: + "@stdlib/array" "^0.0.x" + "@stdlib/assert" "^0.0.x" + "@stdlib/math" "^0.0.x" + "@stdlib/random" "^0.0.x" + "@stdlib/string" "^0.0.x" + "@stdlib/utils" "^0.0.x" + "@stdlib/number-ctor@^0.0.x": version "0.0.7" resolved "https://registry.yarnpkg.com/@stdlib/number-ctor/-/number-ctor-0.0.7.tgz#e97a66664639c9853b6c80bc7a15f7d67a2fc991" @@ -5006,6 +5158,31 @@ dependencies: "@stdlib/array-float32" "^0.0.x" +"@stdlib/number@^0.0.x": + version "0.0.10" + resolved "https://registry.yarnpkg.com/@stdlib/number/-/number-0.0.10.tgz#4030ad8fc3fac19a9afb415c443cee6deea0e65c" + integrity sha512-RyfoP9MlnX4kccvg8qv7vYQPbLdzfS1Mnp/prGOoWhvMG3pyBwFAan34kwFb5IS/zHC3W5EmrgXCV2QWyLg/Kg== + dependencies: + "@stdlib/array" "^0.0.x" + "@stdlib/assert" "^0.0.x" + "@stdlib/constants" "^0.0.x" + "@stdlib/math" "^0.0.x" + "@stdlib/os" "^0.0.x" + "@stdlib/string" "^0.0.x" + "@stdlib/types" "^0.0.x" + "@stdlib/utils" "^0.0.x" + +"@stdlib/os@^0.0.x": + version "0.0.12" + resolved "https://registry.yarnpkg.com/@stdlib/os/-/os-0.0.12.tgz#08bbf013c62a7153099fa9cbac086ca1349a4677" + integrity sha512-O7lklZ/9XEzoCmYvzjPh7jrFWkbpOSHGI71ve3dkSvBy5tyiSL3TtivfKsIC+9ZxuEJZ3d3lIjc9e+yz4HVbqQ== + dependencies: + "@stdlib/assert" "^0.0.x" + "@stdlib/cli" "^0.0.x" + "@stdlib/fs" "^0.0.x" + "@stdlib/process" "^0.0.x" + "@stdlib/utils" "^0.0.x" + "@stdlib/process-cwd@^0.0.x": version "0.0.8" resolved "https://registry.yarnpkg.com/@stdlib/process-cwd/-/process-cwd-0.0.8.tgz#5eef63fb75ffb5fc819659d2f450fa3ee2aa10bf" @@ -5026,6 +5203,41 @@ "@stdlib/streams-node-stdin" "^0.0.x" "@stdlib/utils-next-tick" "^0.0.x" +"@stdlib/process@^0.0.x": + version "0.0.12" + resolved "https://registry.yarnpkg.com/@stdlib/process/-/process-0.0.12.tgz#123325079d89a32f4212f72fb694f8fe3614cf18" + integrity sha512-P0X0TMvkissBE1Wr877Avi2/AxmP7X5Toa6GatHbpJdDg6jQmN4SgPd+NZNp98YtZUyk478c8XSIzMr1krQ20g== + dependencies: + "@stdlib/assert" "^0.0.x" + "@stdlib/buffer" "^0.0.x" + "@stdlib/cli" "^0.0.x" + "@stdlib/fs" "^0.0.x" + "@stdlib/streams" "^0.0.x" + "@stdlib/string" "^0.0.x" + "@stdlib/utils" "^0.0.x" + +"@stdlib/random@^0.0.x": + version "0.0.12" + resolved "https://registry.yarnpkg.com/@stdlib/random/-/random-0.0.12.tgz#e819c3abd602ed5559ba800dba751e49c633ff85" + integrity sha512-c5yND4Ahnm9Jx0I+jsKhn4Yrz10D53ALSrIe3PG1qIz3kNFcIPnmvCuNGd+3V4ch4Mbrez55Y8z/ZC5RJh4vJQ== + dependencies: + "@stdlib/array" "^0.0.x" + "@stdlib/assert" "^0.0.x" + "@stdlib/blas" "^0.0.x" + "@stdlib/buffer" "^0.0.x" + "@stdlib/cli" "^0.0.x" + "@stdlib/constants" "^0.0.x" + "@stdlib/fs" "^0.0.x" + "@stdlib/math" "^0.0.x" + "@stdlib/process" "^0.0.x" + "@stdlib/stats" "^0.0.x" + "@stdlib/streams" "^0.0.x" + "@stdlib/symbol" "^0.0.x" + "@stdlib/types" "^0.0.x" + "@stdlib/utils" "^0.0.x" + debug "^2.6.9" + readable-stream "^2.1.4" + "@stdlib/regexp-eol@^0.0.x": version "0.0.7" resolved "https://registry.yarnpkg.com/@stdlib/regexp-eol/-/regexp-eol-0.0.7.tgz#cf1667fdb5da1049c2c2f8d5c47dcbaede8650a4" @@ -5058,11 +5270,61 @@ dependencies: "@stdlib/utils-define-nonenumerable-read-only-property" "^0.0.x" +"@stdlib/regexp@^0.0.x": + version "0.0.13" + resolved "https://registry.yarnpkg.com/@stdlib/regexp/-/regexp-0.0.13.tgz#80b98361dc7a441b47bc3fa964bb0c826759e971" + integrity sha512-3JT5ZIoq/1nXY+dY+QtkU8/m7oWDeekyItEEXMx9c/AOf0ph8fmvTUGMDNfUq0RetcznFe3b66kFz6Zt4XHviA== + dependencies: + "@stdlib/assert" "^0.0.x" + "@stdlib/utils" "^0.0.x" + +"@stdlib/stats@^0.0.x": + version "0.0.13" + resolved "https://registry.yarnpkg.com/@stdlib/stats/-/stats-0.0.13.tgz#87c973f385379d794707c7b5196a173dba8b07e1" + integrity sha512-hm+t32dKbx/L7+7WlQ1o4NDEzV0J4QSnwFBCsIMIAO8+VPxTZ4FxyNERl4oKlS3hZZe4AVKjoOVhBDtgEWrS4g== + dependencies: + "@stdlib/array" "^0.0.x" + "@stdlib/assert" "^0.0.x" + "@stdlib/blas" "^0.0.x" + "@stdlib/constants" "^0.0.x" + "@stdlib/math" "^0.0.x" + "@stdlib/ndarray" "^0.0.x" + "@stdlib/random" "^0.0.x" + "@stdlib/string" "^0.0.x" + "@stdlib/symbol" "^0.0.x" + "@stdlib/types" "^0.0.x" + "@stdlib/utils" "^0.0.x" + "@stdlib/streams-node-stdin@^0.0.x": version "0.0.7" resolved "https://registry.yarnpkg.com/@stdlib/streams-node-stdin/-/streams-node-stdin-0.0.7.tgz#65ff09a2140999702a1ad885e6505334d947428f" integrity sha512-gg4lgrjuoG3V/L29wNs32uADMCqepIcmoOFHJCTAhVe0GtHDLybUVnLljaPfdvmpPZmTvmusPQtIcscbyWvAyg== +"@stdlib/streams@^0.0.x": + version "0.0.12" + resolved "https://registry.yarnpkg.com/@stdlib/streams/-/streams-0.0.12.tgz#07f5ceae5852590afad8e1cb7ce94174becc8739" + integrity sha512-YLUlXwjJNknHp92IkJUdvn5jEQjDckpawKhDLLCoxyh3h5V+w/8+61SH7TMTfKx5lBxKJ8vvtchZh90mIJOAjQ== + dependencies: + "@stdlib/assert" "^0.0.x" + "@stdlib/buffer" "^0.0.x" + "@stdlib/cli" "^0.0.x" + "@stdlib/fs" "^0.0.x" + "@stdlib/types" "^0.0.x" + "@stdlib/utils" "^0.0.x" + debug "^2.6.9" + readable-stream "^2.1.4" + +"@stdlib/strided@^0.0.x": + version "0.0.12" + resolved "https://registry.yarnpkg.com/@stdlib/strided/-/strided-0.0.12.tgz#86ac48e660cb7f64a45cf07e80cbbfe58be21ae1" + integrity sha512-1NINP+Y7IJht34iri/bYLY7TVxrip51f6Z3qWxGHUCH33kvk5H5QqV+RsmFEGbbyoGtdeHrT2O+xA+7R2e3SNg== + dependencies: + "@stdlib/assert" "^0.0.x" + "@stdlib/math" "^0.0.x" + "@stdlib/ndarray" "^0.0.x" + "@stdlib/types" "^0.0.x" + "@stdlib/utils" "^0.0.x" + "@stdlib/string-base-format-interpolate@^0.0.x": version "0.0.4" resolved "https://registry.yarnpkg.com/@stdlib/string-base-format-interpolate/-/string-base-format-interpolate-0.0.4.tgz#297eeb23c76f745dcbb3d9dbd24e316773944538" @@ -5111,6 +5373,44 @@ "@stdlib/utils-escape-regexp-string" "^0.0.x" "@stdlib/utils-regexp-from-string" "^0.0.x" +"@stdlib/string@^0.0.x": + version "0.0.14" + resolved "https://registry.yarnpkg.com/@stdlib/string/-/string-0.0.14.tgz#4feea4f9089ab72428eebb65fe7b93d90a7f34f4" + integrity sha512-1ClvUTPysens7GZz3WsrkFYIFs8qDmnXkyAd3zMvTXgRpy7hqrv6nNzLMQj8BHv5cBWaWPOXYd/cZ+JyMnZNQQ== + dependencies: + "@stdlib/assert" "^0.0.x" + "@stdlib/cli" "^0.0.x" + "@stdlib/constants" "^0.0.x" + "@stdlib/fs" "^0.0.x" + "@stdlib/math" "^0.0.x" + "@stdlib/nlp" "^0.0.x" + "@stdlib/process" "^0.0.x" + "@stdlib/regexp" "^0.0.x" + "@stdlib/streams" "^0.0.x" + "@stdlib/types" "^0.0.x" + "@stdlib/utils" "^0.0.x" + +"@stdlib/symbol@^0.0.x": + version "0.0.12" + resolved "https://registry.yarnpkg.com/@stdlib/symbol/-/symbol-0.0.12.tgz#b9f396b0bf269c2985bb7fe99810a8e26d7288c3" + integrity sha512-2IDhpzWVGeLHgsvIsX12RXvf78r7xBkc4QLoRUv3k7Cp61BisR1Ym1p0Tq9PbxT8fknlvLToh9n5RpmESi2d4w== + dependencies: + "@stdlib/assert" "^0.0.x" + "@stdlib/utils" "^0.0.x" + +"@stdlib/time@^0.0.x": + version "0.0.14" + resolved "https://registry.yarnpkg.com/@stdlib/time/-/time-0.0.14.tgz#ea6daa438b1d3b019b99f5091117ee4bcef55d60" + integrity sha512-1gMFCQTabMVIgww+k4g8HHHIhyy1tIlvwT8mC0BHW7Q7TzDAgobwL0bvor+lwvCb5LlDAvNQEpaRgVT99QWGeQ== + dependencies: + "@stdlib/assert" "^0.0.x" + "@stdlib/cli" "^0.0.x" + "@stdlib/constants" "^0.0.x" + "@stdlib/fs" "^0.0.x" + "@stdlib/math" "^0.0.x" + "@stdlib/string" "^0.0.x" + "@stdlib/utils" "^0.0.x" + "@stdlib/types@^0.0.x": version "0.0.14" resolved "https://registry.yarnpkg.com/@stdlib/types/-/types-0.0.14.tgz#02d3aab7a9bfaeb86e34ab749772ea22f7b2f7e0" @@ -5292,6 +5592,30 @@ "@stdlib/utils-constructor-name" "^0.0.x" "@stdlib/utils-global" "^0.0.x" +"@stdlib/utils@^0.0.12", "@stdlib/utils@^0.0.x": + version "0.0.12" + resolved "https://registry.yarnpkg.com/@stdlib/utils/-/utils-0.0.12.tgz#670de5a7b253f04f11a4cba38f790e82393bcb46" + integrity sha512-+JhFpl6l7RSq/xGnbWRQ5dAL90h9ONj8MViqlb7teBZFtePZLMwoRA1wssypFcJ8SFMRWQn7lPmpYVUkGwRSOg== + dependencies: + "@stdlib/array" "^0.0.x" + "@stdlib/assert" "^0.0.x" + "@stdlib/blas" "^0.0.x" + "@stdlib/buffer" "^0.0.x" + "@stdlib/cli" "^0.0.x" + "@stdlib/constants" "^0.0.x" + "@stdlib/fs" "^0.0.x" + "@stdlib/math" "^0.0.x" + "@stdlib/os" "^0.0.x" + "@stdlib/process" "^0.0.x" + "@stdlib/random" "^0.0.x" + "@stdlib/regexp" "^0.0.x" + "@stdlib/streams" "^0.0.x" + "@stdlib/string" "^0.0.x" + "@stdlib/symbol" "^0.0.x" + "@stdlib/time" "^0.0.x" + "@stdlib/types" "^0.0.x" + debug "^2.6.9" + "@surma/rollup-plugin-off-main-thread@^2.2.3": version "2.2.3" resolved "https://registry.yarnpkg.com/@surma/rollup-plugin-off-main-thread/-/rollup-plugin-off-main-thread-2.2.3.tgz#ee34985952ca21558ab0d952f00298ad2190c053" @@ -5749,7 +6073,25 @@ focus-trap "^6.7.2" postcss-preset-env "^7.3.1" -"@tryghost/errors@1.2.21", "@tryghost/errors@1.2.23", "@tryghost/errors@1.2.24", "@tryghost/errors@^1.0.0", "@tryghost/errors@^1.2.1", "@tryghost/errors@^1.2.24", "@tryghost/errors@^1.2.3": +"@tryghost/errors@1.2.21": + version "1.2.21" + resolved "https://registry.yarnpkg.com/@tryghost/errors/-/errors-1.2.21.tgz#27c57ccd27324dfc4ab1dc34f8618939fc494324" + integrity sha512-TzV8wxDDFw2ZTI+zsFi0xggpKpc2ABqSzDp+t6dngcLuDs9erBdK5JJTV3wYBOBrJbbK6LzQlAsmH66vgO5HLQ== + dependencies: + "@stdlib/utils" "^0.0.12" + lodash "^4.17.21" + uuid "^9.0.0" + +"@tryghost/errors@1.2.23": + version "1.2.23" + resolved "https://registry.yarnpkg.com/@tryghost/errors/-/errors-1.2.23.tgz#d39232c237377f6ea235d20616de91d32e4d3f65" + integrity sha512-qst9/++FDK+CZOC1EYbFo0rsvuZ25tkO2lFdjlIsCemIOPEo9SL4XLMpmDbBxslJoPF+Yp0gTpdjlbShYnyauA== + dependencies: + "@stdlib/utils" "^0.0.12" + lodash "^4.17.21" + uuid "^9.0.0" + +"@tryghost/errors@1.2.24", "@tryghost/errors@^1.0.0", "@tryghost/errors@^1.2.1", "@tryghost/errors@^1.2.24", "@tryghost/errors@^1.2.3": version "1.2.24" resolved "https://registry.yarnpkg.com/@tryghost/errors/-/errors-1.2.24.tgz#5daceff6cdee9421297849474fd885857c4bfe3f" integrity sha512-5iRF8dl2wirb/1gQA2dv8MtxK204vnjbWvmb3fULNZoVlmuHY1ZUgwRJRquClfUEFyl2qGmNDuoxGoTvur8JKA== @@ -5758,6 +6100,15 @@ lodash "^4.17.21" uuid "^9.0.0" +"@tryghost/errors@^1.2.25": + version "1.2.25" + resolved "https://registry.yarnpkg.com/@tryghost/errors/-/errors-1.2.25.tgz#9e1b715624dfd7dbde59a9fc196ebcb00d9c7553" + integrity sha512-fVZgnFu3QsEUVPyl+uFLK6X6JSN3m7l1pMl713SmhNrkFNFM3nG1sVeNiTg/Ru4N5qIJBBIefwrfRH80Ccy3oQ== + dependencies: + "@stdlib/utils-copy" "^0.0.7" + lodash "^4.17.21" + uuid "^9.0.0" + "@tryghost/express-test@0.13.4": version "0.13.4" resolved "https://registry.yarnpkg.com/@tryghost/express-test/-/express-test-0.13.4.tgz#e31344a0c7678b7cfaff4d22e74e564d26f41ccc" @@ -5788,6 +6139,14 @@ resolved "https://registry.yarnpkg.com/@tryghost/http-cache-utils/-/http-cache-utils-0.1.9.tgz#882ea71e93bd5342515232bfc46562db348c93c7" integrity sha512-wtW+G23cUF6QR+9EoZlesUSscirg1+NuFTF1cCBotaDxVL5un4dY2aU64ZIEMXTCvy8fnBsre2UE4+XRzTubag== +"@tryghost/http-stream@^0.1.20": + version "0.1.22" + resolved "https://registry.yarnpkg.com/@tryghost/http-stream/-/http-stream-0.1.22.tgz#b4542d9e8b1edcfc5fe1c090b17ca1cecc4d13f1" + integrity sha512-uBD6YyW4ZVPaDOfsztPZ0F7kVWUEuqjyRIOwn2+Iq/wL8VStwHek223dEVkUp3cq/KtPCgOQ5KioA2g8QSkQ8Q== + dependencies: + "@tryghost/errors" "^1.2.25" + "@tryghost/request" "^0.1.40" + "@tryghost/http-stream@^0.1.21": version "0.1.21" resolved "https://registry.yarnpkg.com/@tryghost/http-stream/-/http-stream-0.1.21.tgz#a6cf15a4feeeb54b197231dc550d9981fca4091a" @@ -5938,7 +6297,24 @@ lodash "^4.17.21" luxon "^1.26.0" -"@tryghost/logging@2.4.3", "@tryghost/logging@2.4.4", "@tryghost/logging@^2.4.3": +"@tryghost/logging@2.4.3": + version "2.4.3" + resolved "https://registry.yarnpkg.com/@tryghost/logging/-/logging-2.4.3.tgz#47b4329404cfbc5d2dbfd007a51fab561e7a0d30" + integrity sha512-nZQaZzbhLD/pxdHQn+FH/eGajjIvOLLhMmqXyZKzYwv51mHH3OQHN0xOGokEXxrkcVvfJSh5VfggmzxGqL85MA== + dependencies: + "@tryghost/bunyan-rotating-filestream" "^0.0.7" + "@tryghost/elasticsearch" "^3.0.12" + "@tryghost/http-stream" "^0.1.20" + "@tryghost/pretty-stream" "^0.1.18" + "@tryghost/root-utils" "^0.3.22" + bunyan "^1.8.15" + bunyan-loggly "^1.4.2" + fs-extra "^10.0.0" + gelf-stream "^1.1.1" + json-stringify-safe "^5.0.1" + lodash "^4.17.21" + +"@tryghost/logging@2.4.4", "@tryghost/logging@^2.4.3": version "2.4.4" resolved "https://registry.yarnpkg.com/@tryghost/logging/-/logging-2.4.4.tgz#4101d87c82bc6996a3ddd99755069b94d584e3e6" integrity sha512-nRsc5EOqYuHLWYXe/K1AjrRU82xOtQN52GL7r9WY0NCKNZ5/tCFTDdOASKMbFPvpyT5pZlt2vE5+Fu8TdbN8Aw== @@ -6060,6 +6436,17 @@ got "9.6.0" lodash "^4.17.21" +"@tryghost/request@^0.1.40": + version "0.1.40" + resolved "https://registry.yarnpkg.com/@tryghost/request/-/request-0.1.40.tgz#daac10c1fe34e4397e5f76d75ae0de85bbc58c9b" + integrity sha512-EX1iy6k2xvL7u5pgfpBhgmpWVUhc4X8UupCmNfhxiPS4JYbNDHEvh2e8Ha/20kOJs8ZEvbu/qosQoUhZYXKmHg== + dependencies: + "@tryghost/errors" "^1.2.25" + "@tryghost/validator" "^0.2.5" + "@tryghost/version" "^0.1.23" + got "9.6.0" + lodash "^4.17.21" + "@tryghost/root-utils@0.3.22", "@tryghost/root-utils@^0.3.19", "@tryghost/root-utils@^0.3.20", "@tryghost/root-utils@^0.3.22": version "0.3.22" resolved "https://registry.yarnpkg.com/@tryghost/root-utils/-/root-utils-0.3.22.tgz#23793e467afb41b27f4e289a3618d71bd90bc575" @@ -6068,6 +6455,14 @@ caller "^1.0.1" find-root "^1.1.0" +"@tryghost/root-utils@^0.3.23": + version "0.3.23" + resolved "https://registry.yarnpkg.com/@tryghost/root-utils/-/root-utils-0.3.23.tgz#4b25fa2a906b3cd00f323b1c087828a299cdd161" + integrity sha512-Z29qgTOiDlgHkgVQNIQG3VufrpAREB736p0xbMruJPjYFhsO9WNmid9dpKHAJlgLb0pW3SumGEIsZi6yWEQ7EQ== + dependencies: + caller "^1.0.1" + find-root "^1.1.0" + "@tryghost/server@0.1.33": version "0.1.33" resolved "https://registry.yarnpkg.com/@tryghost/server/-/server-0.1.33.tgz#b7662677e52c4d7afe2db643e884e329386e312f" @@ -6100,6 +6495,13 @@ dependencies: lodash.template "^4.5.0" +"@tryghost/tpl@^0.1.25": + version "0.1.25" + resolved "https://registry.yarnpkg.com/@tryghost/tpl/-/tpl-0.1.25.tgz#500a05a2fce936ee785347259c4a8952223dea90" + integrity sha512-E4lLVhTNZn67TbOg94HHhW8lndgwP+G9yTDzTKXFabEB5zgfjaX4qBkJJvS0DO8RWMsO8O4c10/cQQpKXQrFBg== + dependencies: + lodash.template "^4.5.0" + "@tryghost/url-utils@4.4.0", "@tryghost/url-utils@^4.0.0": version "4.4.0" resolved "https://registry.yarnpkg.com/@tryghost/url-utils/-/url-utils-4.4.0.tgz#3f2e0c50ddec49f9c90f6d611eddce51185e6cad" @@ -6123,6 +6525,17 @@ moment-timezone "^0.5.23" validator "7.2.0" +"@tryghost/validator@^0.2.5": + version "0.2.5" + resolved "https://registry.yarnpkg.com/@tryghost/validator/-/validator-0.2.5.tgz#dfe709db0e88d37117bed23909b33c96d349d059" + integrity sha512-/7L53955PpahkwDOVxL6ak/o4fBPv/eQq8+hvGIlTHlJghb2OW5RYO5Pv4Xc/DcTc5vH3ZwyeT4tltvV+Hsrvw== + dependencies: + "@tryghost/errors" "^1.2.25" + "@tryghost/tpl" "^0.1.25" + lodash "^4.17.21" + moment-timezone "^0.5.23" + validator "7.2.0" + "@tryghost/version@0.1.22", "@tryghost/version@^0.1.22": version "0.1.22" resolved "https://registry.yarnpkg.com/@tryghost/version/-/version-0.1.22.tgz#e2a9f6eec4f9f8945094d3bd7c0757438f4e0622" @@ -6131,6 +6544,14 @@ "@tryghost/root-utils" "^0.3.22" semver "^7.3.5" +"@tryghost/version@^0.1.23": + version "0.1.23" + resolved "https://registry.yarnpkg.com/@tryghost/version/-/version-0.1.23.tgz#2cd717af54658880a29a6f0aa3f9edbb01ba47ee" + integrity sha512-JH1VodsYyuzK0ANAy7nZFFe3nwAXoE+UuCAuCBXFzWCA/Id3LBJiGn97P7RrNcFvmuJ1JHtYTlHVhaoYwjYL1w== + dependencies: + "@tryghost/root-utils" "^0.3.23" + semver "^7.3.5" + "@tryghost/webhook-mock-receiver@0.2.6": version "0.2.6" resolved "https://registry.yarnpkg.com/@tryghost/webhook-mock-receiver/-/webhook-mock-receiver-0.2.6.tgz#20a4141f5813287988770f5f1e394ad2af5c1063" @@ -10079,7 +10500,7 @@ builtins@^1.0.3: resolved "https://registry.yarnpkg.com/builtins/-/builtins-1.0.3.tgz#cb94faeb61c8696451db36534e1422f94f0aee88" integrity sha512-uYBjakWipfaO/bXI7E8rq6kpwHRZK5cNYrUv2OzZSI/FvmdMyXJ2tG9dKcjEC5YHmHpUAwsargWIZNWdxb/bnQ== -builtins@^5.0.0: +builtins@^5.0.0, builtins@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/builtins/-/builtins-5.0.1.tgz#87f6db9ab0458be728564fa81d876d8d74552fa9" integrity sha512-qwVpFEHNfhYJIzNRBvd2C1kyo6jz3ZSMPyyuR47OPdiKWlbYnZNyDWuyR175qDnAJLiCo5fBBqPb3RiXgWlkOQ== @@ -14353,6 +14774,21 @@ ember-template-imports@^3.4.1: string.prototype.matchall "^4.0.6" validate-peer-dependencies "^1.1.0" +ember-template-imports@^3.4.2: + version "3.4.2" + resolved "https://registry.yarnpkg.com/ember-template-imports/-/ember-template-imports-3.4.2.tgz#6cf7de7d4b8348a0fddf3aaec4947aa1211289e6" + integrity sha512-OS8TUVG2kQYYwP3netunLVfeijPoOKIs1SvPQRTNOQX4Pu8xGGBEZmrv0U1YTnQn12Eg+p6w/0UdGbUnITjyzw== + dependencies: + babel-import-util "^0.2.0" + broccoli-stew "^3.0.0" + ember-cli-babel-plugin-helpers "^1.1.1" + ember-cli-version-checker "^5.1.2" + line-column "^1.0.2" + magic-string "^0.25.7" + parse-static-imports "^1.1.0" + string.prototype.matchall "^4.0.6" + validate-peer-dependencies "^1.1.0" + ember-template-lint@5.7.2: version "5.7.2" resolved "https://registry.yarnpkg.com/ember-template-lint/-/ember-template-lint-5.7.2.tgz#a2d8d3f1f2df06068aa318fd36e9224db2491445" @@ -14898,32 +15334,35 @@ eslint-plugin-babel@5.3.1: dependencies: eslint-rule-composer "^0.3.0" -eslint-plugin-ember@11.0.6: - version "11.0.6" - resolved "https://registry.yarnpkg.com/eslint-plugin-ember/-/eslint-plugin-ember-11.0.6.tgz#95fc44639b9f8f3d5a0f7a20bd06903a32194798" - integrity sha512-iQzqn8/GdBbNv2T3YetpjEBemoH0v9e9ea8Bu6JLOX2TN+HMK2l52/QBRFgrnaxLXBjPO3iy2c3sCieYV27EvQ== +eslint-plugin-ember@11.5.2: + version "11.5.2" + resolved "https://registry.yarnpkg.com/eslint-plugin-ember/-/eslint-plugin-ember-11.5.2.tgz#0e30ce343c94f67c6366ff99f3dc4e2f717bb351" + integrity sha512-OFlBkV0VSemGtq3cZDWOm/kwOipiswvPIVL6VDJjpEv85BDtbGdqoyvaF9d6/MY7u5aDCh62oOgKQFw9JQGadA== dependencies: "@ember-data/rfc395-data" "^0.0.4" + "@glimmer/syntax" "^0.84.2" css-tree "^2.0.4" ember-rfc176-data "^0.3.15" + ember-template-imports "^3.4.2" eslint-utils "^3.0.0" estraverse "^5.2.0" + lodash.camelcase "^4.1.1" lodash.kebabcase "^4.1.1" + magic-string "^0.30.0" requireindex "^1.2.0" snake-case "^3.0.3" -eslint-plugin-es@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-es/-/eslint-plugin-es-3.0.1.tgz#75a7cdfdccddc0589934aeeb384175f221c57893" - integrity sha512-GUmAsJaN4Fc7Gbtl8uOBlayo2DqhwWvEzykMHSCZHU3XdJ+NSzzZcVhXh3VxX5icqQ+oQdIEawXX8xkR3mIFmQ== +eslint-plugin-es@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-es/-/eslint-plugin-es-4.1.0.tgz#f0822f0c18a535a97c3e714e89f88586a7641ec9" + integrity sha512-GILhQTnjYE2WorX5Jyi5i4dz5ALWxBIdQECVQavL6s7cI76IZTDWleTHkxz/QT3kvcs2QlGHvKLYsSlPOlPXnQ== dependencies: eslint-utils "^2.0.0" regexpp "^3.0.0" -eslint-plugin-filenames@1.3.2: +eslint-plugin-filenames@allouis/eslint-plugin-filenames#36e270b52e2a23c70365c066976fdfc6843afcb3: version "1.3.2" - resolved "https://registry.yarnpkg.com/eslint-plugin-filenames/-/eslint-plugin-filenames-1.3.2.tgz#7094f00d7aefdd6999e3ac19f72cea058e590cf7" - integrity sha512-tqxJTiEM5a0JmRCUYQmxw23vtTxrb2+a3Q2mMOPhFxvt7ZQQJmdiuMby9B/vUAuVMghyP7oET+nIf6EO6CBd/w== + resolved "https://codeload.github.com/allouis/eslint-plugin-filenames/tar.gz/36e270b52e2a23c70365c066976fdfc6843afcb3" dependencies: lodash.camelcase "4.3.0" lodash.kebabcase "4.1.1" @@ -14938,16 +15377,16 @@ eslint-plugin-flowtype@^8.0.3: lodash "^4.17.21" string-natural-compare "^3.0.1" -eslint-plugin-ghost@2.16.0: - version "2.16.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-ghost/-/eslint-plugin-ghost-2.16.0.tgz#ec85aa6e5e690c9808c04a30f102a8728d66d12a" - integrity sha512-yEMAH9ZY/4w5zqZwe+ZdFlg9Uyumi1OuAjqoq4FApA2POehgaT3e1ZwR/P1hmjFx9yqLibaL5J6dTocFsj0yew== +eslint-plugin-ghost@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-ghost/-/eslint-plugin-ghost-3.0.0.tgz#6d9f55f086b15b81257769cbddb44ac05e1fca00" + integrity sha512-Ouu6/MVNalP9HuRHZ94MudVpLR9JViZZnfWIOrnsRxHLoyDRRggewdfKtGD3hhMGtFXJHYdIjatT5naF8B0JbQ== dependencies: "@kapouer/eslint-plugin-no-return-in-loop" "1.0.0" - eslint-plugin-ember "11.0.6" - eslint-plugin-filenames "1.3.2" + eslint-plugin-ember "11.5.2" + eslint-plugin-filenames allouis/eslint-plugin-filenames#36e270b52e2a23c70365c066976fdfc6843afcb3 eslint-plugin-mocha "7.0.1" - eslint-plugin-node "11.1.0" + eslint-plugin-n "^15.6.0" eslint-plugin-sort-imports-es6-autofix "0.6.0" eslint-plugin-unicorn "42.0.0" @@ -15009,17 +15448,19 @@ eslint-plugin-mocha@7.0.1: eslint-utils "^2.0.0" ramda "^0.27.0" -eslint-plugin-node@11.1.0: - version "11.1.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-node/-/eslint-plugin-node-11.1.0.tgz#c95544416ee4ada26740a30474eefc5402dc671d" - integrity sha512-oUwtPJ1W0SKD0Tr+wqu92c5xuCeQqB3hSCHasn/ZgjFdA9iDGNkNf2Zi9ztY7X+hNuMib23LNGRm6+uN+KLE3g== +eslint-plugin-n@^15.6.0: + version "15.7.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-n/-/eslint-plugin-n-15.7.0.tgz#e29221d8f5174f84d18f2eb94765f2eeea033b90" + integrity sha512-jDex9s7D/Qial8AGVIHq4W7NswpUD5DPDL2RH8Lzd9EloWUuvUkHfv4FRLMipH5q2UtyurorBkPeNi1wVWNh3Q== dependencies: - eslint-plugin-es "^3.0.0" - eslint-utils "^2.0.0" + builtins "^5.0.1" + eslint-plugin-es "^4.1.0" + eslint-utils "^3.0.0" ignore "^5.1.1" - minimatch "^3.0.4" - resolve "^1.10.1" - semver "^6.1.0" + is-core-module "^2.11.0" + minimatch "^3.1.2" + resolve "^1.22.1" + semver "^7.3.8" eslint-plugin-react-hooks@^4.3.0: version "4.6.0" @@ -20817,7 +21258,7 @@ lodash.bind@^4.1.4: resolved "https://registry.yarnpkg.com/lodash.bind/-/lodash.bind-4.2.1.tgz#7ae3017e939622ac31b7d7d7dcb1b34db1690d35" integrity sha512-lxdsn7xxlCymgLYo1gGvVrfHmkjDiyqVv62FAeF2i5ta72BipE1SLxw8hPEPLhD4/247Ijw07UQH7Hq/chT5LA== -lodash.camelcase@4.3.0, lodash.camelcase@^4.3.0: +lodash.camelcase@4.3.0, lodash.camelcase@^4.1.1, lodash.camelcase@^4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6" integrity sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA== @@ -22317,18 +22758,52 @@ modify-values@^1.0.0: resolved "https://registry.yarnpkg.com/modify-values/-/modify-values-1.0.1.tgz#b3939fa605546474e3e3e3c63d64bd43b4ee6022" integrity sha512-xV2bxeN6F7oYjZWTe/YPAy6MN2M+sL4u/Rlm2AHCIVGfo2p1yGmBHQ6vHehl4bRTZBdHu3TSkWdYgkwpYzAGSw== -moment-timezone@0.5.23, moment-timezone@0.5.34, moment-timezone@^0.5.23, moment-timezone@^0.5.31, moment-timezone@^0.5.33: +moment-timezone@0.5.23, moment-timezone@^0.5.23: version "0.5.23" resolved "https://registry.yarnpkg.com/moment-timezone/-/moment-timezone-0.5.23.tgz#7cbb00db2c14c71b19303cb47b0fb0a6d8651463" integrity sha512-WHFH85DkCfiNMDX5D3X7hpNH3/PUhjTGcD0U1SgfBGZxJ3qUmJh5FdvaFjcClxOvB3rzdfj4oRffbI38jEnC1w== dependencies: moment ">= 2.9.0" -moment@2.24.0, moment@2.27.0, moment@2.29.1, moment@2.29.3, moment@2.29.4, "moment@>= 2.9.0", moment@^2.10.2, moment@^2.18.1, moment@^2.19.3, moment@^2.27.0, moment@^2.29.1: +moment-timezone@0.5.34: + version "0.5.34" + resolved "https://registry.yarnpkg.com/moment-timezone/-/moment-timezone-0.5.34.tgz#a75938f7476b88f155d3504a9343f7519d9a405c" + integrity sha512-3zAEHh2hKUs3EXLESx/wsgw6IQdusOT8Bxm3D9UrHPQR7zlMmzwybC8zHEM1tQ4LJwP7fcxrWr8tuBg05fFCbg== + dependencies: + moment ">= 2.9.0" + +moment-timezone@^0.5.31, moment-timezone@^0.5.33: + version "0.5.43" + resolved "https://registry.yarnpkg.com/moment-timezone/-/moment-timezone-0.5.43.tgz#3dd7f3d0c67f78c23cd1906b9b2137a09b3c4790" + integrity sha512-72j3aNyuIsDxdF1i7CEgV2FfxM1r6aaqJyLB2vwb33mXYyoyLly+F1zbWqhA3/bVIoJ4szlUoMbUnVdid32NUQ== + dependencies: + moment "^2.29.4" + +moment@2.24.0, "moment@>= 2.9.0", moment@^2.10.2, moment@^2.18.1, moment@^2.19.3: version "2.24.0" resolved "https://registry.yarnpkg.com/moment/-/moment-2.24.0.tgz#0d055d53f5052aa653c9f6eb68bb5d12bf5c2b5b" integrity sha512-bV7f+6l2QigeBBZSM/6yTNq4P2fNpSWj/0e7jQcy87A8e7o2nAfP/34/2ky5Vw4B9S446EtIhodAzkFCcR4dQg== +moment@2.27.0: + version "2.27.0" + resolved "https://registry.yarnpkg.com/moment/-/moment-2.27.0.tgz#8bff4e3e26a236220dfe3e36de756b6ebaa0105d" + integrity sha512-al0MUK7cpIcglMv3YF13qSgdAIqxHTO7brRtaz3DlSULbqfazqkc5kEjNrLDOM7fsjshoFIihnU8snrP7zUvhQ== + +moment@2.29.1: + version "2.29.1" + resolved "https://registry.yarnpkg.com/moment/-/moment-2.29.1.tgz#b2be769fa31940be9eeea6469c075e35006fa3d3" + integrity sha512-kHmoybcPV8Sqy59DwNDY3Jefr64lK/by/da0ViFcuA4DH0vQg5Q6Ze5VimxkfQNSC+Mls/Kx53s7TjP1RhFEDQ== + +moment@2.29.3: + version "2.29.3" + resolved "https://registry.yarnpkg.com/moment/-/moment-2.29.3.tgz#edd47411c322413999f7a5940d526de183c031f3" + integrity sha512-c6YRvhEo//6T2Jz/vVtYzqBzwvPT95JBQ+smCytzf7c50oMZRsR/a4w88aD34I+/QVSfnoAnSBFPJHItlOMJVw== + +moment@2.29.4, moment@^2.27.0, moment@^2.29.1, moment@^2.29.4: + version "2.29.4" + resolved "https://registry.yarnpkg.com/moment/-/moment-2.29.4.tgz#3dbe052889fe7c1b2ed966fcb3a77328964ef108" + integrity sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w== + monobundle@TryGhost/monobundle#2aca618f8880250fb99ad48d61f0ca7251f1e648: version "0.1.0" resolved "https://codeload.github.com/TryGhost/monobundle/tar.gz/2aca618f8880250fb99ad48d61f0ca7251f1e648" @@ -25951,7 +26426,7 @@ react-dom@18.2.0: loose-envify "^1.1.0" scheduler "^0.23.0" -react-error-overlay@^6.0.11: +react-error-overlay@6.0.11, react-error-overlay@^6.0.11: version "6.0.11" resolved "https://registry.yarnpkg.com/react-error-overlay/-/react-error-overlay-6.0.11.tgz#92835de5841c5cf08ba00ddd2d677b6d17ff9adb" integrity sha512-/6UZ2qgEyH2aqzYZgQPxEnz33NJ2gNsnHA2o5+o4wW9bLM/JYQitNP9xPhsXwC08hMMovfGe/8retsdDsczPRg== @@ -26189,6 +26664,19 @@ readable-stream@1.1.x: string_decoder "^1.1.1" util-deprecate "^1.0.1" +readable-stream@^2.1.4: + version "2.3.8" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.8.tgz#91125e8042bba1b9887f49345f6277027ce8be9b" + integrity sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA== + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.3" + isarray "~1.0.0" + process-nextick-args "~2.0.0" + safe-buffer "~5.1.1" + string_decoder "~1.1.1" + util-deprecate "~1.0.1" + readable-stream@^4.1.0: version "4.3.0" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-4.3.0.tgz#0914d0c72db03b316c9733bb3461d64a3cc50cba" @@ -27270,7 +27758,7 @@ semver@7.5.0, semver@^7.0.0, semver@^7.1.1, semver@^7.1.3, semver@^7.2.1, semver dependencies: lru-cache "^6.0.0" -semver@^6.0.0, semver@^6.1.0, semver@^6.1.1, semver@^6.1.2, semver@^6.3.0: +semver@^6.0.0, semver@^6.1.1, semver@^6.1.2, semver@^6.3.0: version "6.3.0" resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==