diff --git a/lib/models/App.js b/lib/models/App.js index 8ac4c04e..e8ccc1a5 100644 --- a/lib/models/App.js +++ b/lib/models/App.js @@ -5,7 +5,6 @@ */ let deepExtend = require('deep-extend'); -let Promise = require('bluebird') let path = require('path') let PluginService = require('../services/PluginService.js') const AppHelper = require('./AppHelper.js') @@ -420,8 +419,6 @@ class App { async prepare() { this.loadConfig() - this.context.Promise = Promise - this.loadFramework() this.loadPlugins() diff --git a/lib/plugins/mongoose/lib/MongoosePlugin.js b/lib/plugins/mongoose/lib/MongoosePlugin.js index 6d408a80..3817161e 100644 --- a/lib/plugins/mongoose/lib/MongoosePlugin.js +++ b/lib/plugins/mongoose/lib/MongoosePlugin.js @@ -1,9 +1,6 @@ -const Promise = require('bluebird') - class MongoosePlugin { didLoadFramework(app) { const mongoose = require('mongoose') - mongoose.Promise = Promise const { config: { mongoose: config } diff --git a/lib/plugins/mongooseAtlas/lib/MongooseAtlasPlugin.js b/lib/plugins/mongooseAtlas/lib/MongooseAtlasPlugin.js index 47ede105..fad24dd4 100644 --- a/lib/plugins/mongooseAtlas/lib/MongooseAtlasPlugin.js +++ b/lib/plugins/mongooseAtlas/lib/MongooseAtlasPlugin.js @@ -1,9 +1,6 @@ -const Promise = require('bluebird') - class MongooseAtlasPlugin { didLoadFramework(app) { const mongoose = require('mongoose') - mongoose.Promise = Promise const { config: { mongooseAltas: config }, diff --git a/lib/plugins/redis/lib/Redis.js b/lib/plugins/redis/lib/Redis.js index 05e2dd11..c5024599 100644 --- a/lib/plugins/redis/lib/Redis.js +++ b/lib/plugins/redis/lib/Redis.js @@ -1,3 +1,5 @@ +const Promise = require('bluebird'); + let _sharedRedis = null let _redisLib diff --git a/lib/services/PluginService.js b/lib/services/PluginService.js index 2c17c04e..c15d7c23 100644 --- a/lib/services/PluginService.js +++ b/lib/services/PluginService.js @@ -1,3 +1,4 @@ +const Promise = require('bluebird'); class PluginService { constructor({ dirs = [], diff --git a/lib/services/QueueTask.js b/lib/services/QueueTask.js index fd0d47d6..72a781c7 100644 --- a/lib/services/QueueTask.js +++ b/lib/services/QueueTask.js @@ -1,3 +1,4 @@ +const Promise = require('bluebird'); const AppError = require('./AppError.js') class QueueTaskNotFoundError extends AppError {} class QueueTaskTriggerError extends AppError {}