Yuki Takei 7 лет назад
Родитель
Сommit
3500ff4345

+ 2 - 0
src/lib/models/cdn-resource.js

@@ -2,11 +2,13 @@
  * Value Object
  */
 class CdnResource {
+
   constructor(name, url, outDir) {
     this.name = name;
     this.url = url;
     this.outDir = outDir;
   }
+
 }
 
 module.exports = CdnResource;

+ 2 - 0
src/lib/service/cdn-resources-downloader.js

@@ -11,6 +11,7 @@ const CdnResource = require('../models/cdn-resource');
 
 
 class CdnResourcesDownloader {
+
   constructor() {
     this.logger = require('@alias/logger')('growi:service:CdnResourcesDownloader');
   }
@@ -144,6 +145,7 @@ class CdnResourcesDownloader {
 
     return streamToPromise(stream);
   }
+
 }
 
 module.exports = CdnResourcesDownloader;

+ 2 - 0
src/lib/service/cdn-resources-service.js

@@ -10,6 +10,7 @@ const cdnLocalStyleWebRoot = '/styles/cdn';
 
 
 class CdnResourcesService {
+
   constructor() {
     this.logger = require('@alias/logger')('growi:service:CdnResourcesService');
 
@@ -161,6 +162,7 @@ class CdnResourcesService {
 
     return this.generateStyleTag(manifest, this.noCdn);
   }
+
 }
 
 module.exports = CdnResourcesService;

+ 7 - 5
src/lib/service/interceptor-manager.js

@@ -4,6 +4,7 @@ const logger = require('@alias/logger')('growi:InterceptorManager');
  * the manager class of Interceptor
  */
 class InterceptorManager {
+
   constructor() {
     this.interceptorAndOrders = []; /* [
                                           {interceptor: instanceA, order: 200 },
@@ -76,11 +77,11 @@ class InterceptorManager {
         return this.doProcess(interceptor, contextName, ...args);
       })
       // sequential
-      .concat([
-        sequentials.reduce((prevPromise, nextInterceptor) => {
-          return prevPromise.then((...results) => { return this.doProcess(nextInterceptor, contextName, ...results) });
-        }, Promise.resolve(...args)/* initial Promise */),
-      ]),
+        .concat([
+          sequentials.reduce((prevPromise, nextInterceptor) => {
+            return prevPromise.then((...results) => { return this.doProcess(nextInterceptor, contextName, ...results) });
+          }, Promise.resolve(...args)/* initial Promise */),
+        ]),
     ).then(() => {
       logger.debug(`end processing the context '${contextName}'`);
     });
@@ -98,6 +99,7 @@ class InterceptorManager {
         return Promise.resolve(...args);
       });
   }
+
 }
 
 module.exports = InterceptorManager;

+ 2 - 0
src/lib/service/xss/index.js

@@ -1,4 +1,5 @@
 class Xss {
+
   constructor(xssOption) {
     const xss = require('xss');
 
@@ -29,6 +30,7 @@ class Xss {
   process(document) {
     return this.myxss.process(document);
   }
+
 }
 
 module.exports = Xss;

+ 2 - 0
src/lib/service/xss/xssOption.js

@@ -1,4 +1,5 @@
 class XssOption {
+
   constructor(config) {
     const recommendedXssWhiteList = require('./recommendedXssWhiteList');
     const initializedConfig = (config != null) ? config : {};
@@ -7,5 +8,6 @@ class XssOption {
     this.tagWhiteList = initializedConfig.tagWhiteList || recommendedXssWhiteList.tags;
     this.attrWhiteList = initializedConfig.attrWhiteList || recommendedXssWhiteList.attrs;
   }
+
 }
 module.exports = XssOption;

+ 2 - 0
src/server/crowi/dev.js

@@ -7,6 +7,7 @@ const onHeaders = require('on-headers');
 
 
 class CrowiDev {
+
   /**
    * Creates an instance of CrowiDev.
    * @param {Crowi} crowi
@@ -137,6 +138,7 @@ class CrowiDev {
       }
     }
   }
+
 }
 
 module.exports = CrowiDev;

+ 2 - 0
src/server/models/GlobalNotificationSetting/index.js

@@ -39,6 +39,7 @@ const generatePathsToMatch = (originalPath) => {
  * @class GlobalNotificationSetting
  */
 class GlobalNotificationSetting {
+
   constructor(crowi) {
     this.crowi = crowi;
   }
@@ -95,6 +96,7 @@ class GlobalNotificationSetting {
 
     return settings;
   }
+
 }
 
 

+ 4 - 0
src/server/models/external-account.js

@@ -29,11 +29,13 @@ schema.plugin(uniqueValidator);
  * @class DuplicatedUsernameException
  */
 class DuplicatedUsernameException {
+
   constructor(message, user) {
     this.name = this.constructor.name;
     this.message = message;
     this.user = user;
   }
+
 }
 
 /**
@@ -42,6 +44,7 @@ class DuplicatedUsernameException {
  * @class ExternalAccount
  */
 class ExternalAccount {
+
   /**
    * limit items num for pagination
    *
@@ -171,6 +174,7 @@ class ExternalAccount {
         debug('Error on pagination:', err);
       });
   }
+
 }
 
 module.exports = function(crowi) {

+ 2 - 0
src/server/models/page-group-relation.js

@@ -28,6 +28,7 @@ schema.plugin(mongoosePaginate);
  * @class PageGroupRelation
  */
 class PageGroupRelation {
+
   /**
    * limit items num for pagination
    *
@@ -249,6 +250,7 @@ class PageGroupRelation {
         }
       });
   }
+
 }
 
 module.exports = function(crowi) {

+ 2 - 0
src/server/models/page.js

@@ -117,6 +117,7 @@ const populateDataToShowRevision = (page, userPublicFields, imagePopulation) =>
 
 
 class PageQueryBuilder {
+
   constructor(query) {
     this.query = query;
   }
@@ -261,6 +262,7 @@ class PageQueryBuilder {
     this.query = populateDataToShowRevision(this.query, userPublicFields, imagePopulation);
     return this;
   }
+
 }
 
 module.exports = function(crowi) {

+ 2 - 0
src/server/models/user-group-relation.js

@@ -21,6 +21,7 @@ schema.plugin(mongoosePaginate);
  * @class UserGroupRelation
  */
 class UserGroupRelation {
+
   /**
    * limit items num for pagination
    *
@@ -280,6 +281,7 @@ class UserGroupRelation {
         }
       });
   }
+
 }
 
 module.exports = function(crowi) {

+ 2 - 0
src/server/models/user-group.js

@@ -14,6 +14,7 @@ const schema = new mongoose.Schema({
 schema.plugin(mongoosePaginate);
 
 class UserGroup {
+
   /**
    * public fields for UserGroup model
    *
@@ -127,6 +128,7 @@ class UserGroup {
     this.name = name;
     return this.save();
   }
+
 }
 
 

+ 2 - 0
src/server/models/user.js

@@ -822,9 +822,11 @@ module.exports = function(crowi) {
   };
 
   class UserUpperLimitException {
+
     constructor() {
       this.name = this.constructor.name;
     }
+
   }
 
   userSchema.statics.STATUS_REGISTERED = STATUS_REGISTERED;

+ 2 - 0
src/server/plugins/plugin-utils-v2.js

@@ -1,6 +1,7 @@
 const path = require('path');
 
 class PluginUtilsV2 {
+
   /**
    * return a definition objects that has following structure:
    *
@@ -33,6 +34,7 @@ class PluginUtilsV2 {
       entries,
     };
   }
+
 }
 
 module.exports = PluginUtilsV2;

+ 2 - 0
src/server/plugins/plugin-utils.js

@@ -7,6 +7,7 @@ const PluginUtilsV2 = require('./plugin-utils-v2');
 const pluginUtilsV2 = new PluginUtilsV2();
 
 class PluginUtils {
+
   /**
    * return a definition objects that has following structure:
    *
@@ -88,6 +89,7 @@ class PluginUtils {
     const plugins = this.listPlugins(rootDir);
     return Object.keys(plugins);
   }
+
 }
 
 module.exports = PluginUtils;

+ 2 - 0
src/server/plugins/plugin.service.js

@@ -2,6 +2,7 @@ const logger = require('@alias/logger')('growi:plugins:PluginService');
 const PluginUtils = require('./plugin-utils');
 
 class PluginService {
+
   constructor(crowi, app) {
     this.crowi = crowi;
     this.app = app;
@@ -44,6 +45,7 @@ class PluginService {
         });
     }
   }
+
 }
 
 module.exports = PluginService;

+ 2 - 0
src/server/service/config-loader.js

@@ -185,6 +185,7 @@ const ENV_VAR_NAME_TO_CONFIG_INFO = {
 };
 
 class ConfigLoader {
+
   constructor(configModel) {
     this.configModel = configModel;
   }
@@ -256,6 +257,7 @@ class ConfigLoader {
 
     return config;
   }
+
 }
 
 module.exports = ConfigLoader;

+ 2 - 0
src/server/service/config-manager.js

@@ -15,6 +15,7 @@ const KEYS_FOR_SAML_USE_ONLY_ENV_OPTION = [
 ];
 
 class ConfigManager {
+
   constructor(configModel) {
     this.configModel = configModel;
     this.configLoader = new ConfigLoader(this.configModel);
@@ -219,6 +220,7 @@ class ConfigManager {
   convertInsertValue(value) {
     return JSON.stringify(value === '' ? null : value);
   }
+
 }
 
 module.exports = ConfigManager;

+ 2 - 0
src/server/service/file-uploader/index.js

@@ -8,6 +8,7 @@ const envToModuleMappings = {
 };
 
 class FileUploaderFactory {
+
   getUploader(crowi) {
     if (this.uploader == null) {
       const method = envToModuleMappings[process.env.FILE_UPLOAD] || 'aws';
@@ -17,6 +18,7 @@ class FileUploaderFactory {
 
     return this.uploader;
   }
+
 }
 
 const factory = new FileUploaderFactory();

+ 2 - 0
src/server/service/global-notification.js

@@ -4,6 +4,7 @@ const path = require('path');
  * the service class of GlobalNotificationSetting
  */
 class GlobalNotificationService {
+
   constructor(crowi) {
     this.crowi = crowi;
     this.config = crowi.getConfig();
@@ -184,6 +185,7 @@ class GlobalNotificationService {
 
     this.sendNotification(notifications, option);
   }
+
 }
 
 module.exports = GlobalNotificationService;

+ 2 - 0
src/server/service/passport.js

@@ -12,6 +12,7 @@ const SamlStrategy = require('passport-saml').Strategy;
  * the service class of Passport
  */
 class PassportService {
+
   // see '/lib/form/login.js'
   static get USERNAME_FIELD() { return 'loginForm[username]' }
 
@@ -539,6 +540,7 @@ class PassportService {
     const key = `security:passport-${providerType}:isSameEmailTreatedAsIdenticalUser`;
     return this.crowi.configManager.getConfig('crowi', key);
   }
+
 }
 
 module.exports = PassportService;

+ 2 - 0
src/server/service/rest-qiita-API.js

@@ -16,6 +16,7 @@ function getAxios(team, token) {
  */
 
 class RestQiitaAPIService {
+
   constructor(crowi) {
     this.crowi = crowi;
     this.config = crowi.getConfig();
@@ -79,6 +80,7 @@ class RestQiitaAPIService {
       return { pages, total };
     }
   }
+
 }
 
 module.exports = RestQiitaAPIService;