mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
update to newest mongoose
This commit is contained in:
parent
91f06cfc28
commit
c5c0364d49
15 changed files with 77 additions and 95 deletions
|
@ -2,7 +2,7 @@ logger = require('logger-sharelatex')
|
|||
async = require("async")
|
||||
metrics = require('metrics-sharelatex')
|
||||
Settings = require('settings-sharelatex')
|
||||
ObjectId = require('mongoose').Types.ObjectId
|
||||
ObjectId = require('../../infrastructure/Mongoose').Types.ObjectId
|
||||
Project = require('../../models/Project').Project
|
||||
Folder = require('../../models/Folder').Folder
|
||||
ProjectEntityHandler = require('./ProjectEntityHandler')
|
||||
|
|
|
@ -531,7 +531,7 @@ module.exports = ProjectEntityHandler =
|
|||
fileSystem: "#{path.fileSystem}/#{element.name}"
|
||||
mongo: path.mongo
|
||||
id = element._id+''
|
||||
element._id = require('mongoose').Types.ObjectId(id)
|
||||
element._id = require('../../infrastructure/Mongoose').Types.ObjectId(id)
|
||||
conditions = _id:project._id
|
||||
mongopath = "#{path.mongo}.#{type}"
|
||||
update = "$push":{}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
Subscription = require('../../models/Subscription').Subscription
|
||||
logger = require("logger-sharelatex")
|
||||
ObjectId = require('mongoose').Types.ObjectId
|
||||
ObjectId = require('../../infrastructure/Mongoose').Types.ObjectId
|
||||
|
||||
module.exports =
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ UserFeaturesUpdater = require("./UserFeaturesUpdater")
|
|||
PlansLocator = require("./PlansLocator")
|
||||
Settings = require("settings-sharelatex")
|
||||
logger = require("logger-sharelatex")
|
||||
ObjectId = require('mongoose').Types.ObjectId
|
||||
ObjectId = require('../../infrastructure/Mongoose').Types.ObjectId
|
||||
ReferalAllocator = require("../Referal/ReferalAllocator")
|
||||
|
||||
oneMonthInSeconds = 60 * 60 * 24 * 30
|
||||
|
|
|
@ -2,6 +2,8 @@ mongoose = require('mongoose')
|
|||
Settings = require 'settings-sharelatex'
|
||||
logger = require('logger-sharelatex')
|
||||
|
||||
mongoose.Promise = global.Promise
|
||||
|
||||
mongoose.connect(Settings.mongo.url, server: poolSize: 10)
|
||||
|
||||
mongoose.connection.on 'connected', () ->
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
mongoose = require 'mongoose'
|
||||
mongoose = require '../infrastructure/Mongoose'
|
||||
Settings = require 'settings-sharelatex'
|
||||
|
||||
Schema = mongoose.Schema
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
mongoose = require 'mongoose'
|
||||
mongoose = require '../infrastructure/Mongoose'
|
||||
Settings = require 'settings-sharelatex'
|
||||
|
||||
Schema = mongoose.Schema
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
mongoose = require('mongoose')
|
||||
mongoose = require('../infrastructure/Mongoose')
|
||||
Settings = require 'settings-sharelatex'
|
||||
DocSchema = require('./Doc').DocSchema
|
||||
FileSchema = require('./File').FileSchema
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
mongoose = require('mongoose')
|
||||
mongoose = require('../infrastructure/Mongoose')
|
||||
Settings = require 'settings-sharelatex'
|
||||
_ = require('underscore')
|
||||
FolderSchema = require('./Folder.js').FolderSchema
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
mongoose = require 'mongoose'
|
||||
mongoose = require '../infrastructure/Mongoose'
|
||||
Settings = require 'settings-sharelatex'
|
||||
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
mongoose = require 'mongoose'
|
||||
mongoose = require '../infrastructure/Mongoose'
|
||||
Settings = require 'settings-sharelatex'
|
||||
|
||||
Schema = mongoose.Schema
|
||||
|
@ -31,4 +31,4 @@ Subscription = conn.model('Subscription', SubscriptionSchema)
|
|||
|
||||
mongoose.model 'Subscription', SubscriptionSchema
|
||||
exports.Subscription = Subscription
|
||||
exports.SubscriptionSchema = SubscriptionSchema
|
||||
exports.SubscriptionSchema = SubscriptionSchema
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
mongoose = require 'mongoose'
|
||||
mongoose = require '../infrastructure/Mongoose'
|
||||
Settings = require 'settings-sharelatex'
|
||||
|
||||
Schema = mongoose.Schema
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
Project = require('./Project').Project
|
||||
Settings = require 'settings-sharelatex'
|
||||
_ = require('underscore')
|
||||
mongoose = require('mongoose')
|
||||
mongoose = require('../infrastructure/Mongoose')
|
||||
uuid = require('uuid')
|
||||
Schema = mongoose.Schema
|
||||
ObjectId = Schema.ObjectId
|
||||
|
|
142
services/web/npm-shrinkwrap.json
generated
142
services/web/npm-shrinkwrap.json
generated
|
@ -292,20 +292,6 @@
|
|||
"from": "bson@>=1.0.4 <1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/bson/-/bson-1.0.4.tgz"
|
||||
},
|
||||
"bson-ext": {
|
||||
"version": "0.1.13",
|
||||
"from": "bson-ext@>=0.1.0 <0.2.0",
|
||||
"resolved": "https://registry.npmjs.org/bson-ext/-/bson-ext-0.1.13.tgz",
|
||||
"optional": true,
|
||||
"dependencies": {
|
||||
"nan": {
|
||||
"version": "2.0.9",
|
||||
"from": "nan@>=2.0.9 <2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/nan/-/nan-2.0.9.tgz",
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"buffer": {
|
||||
"version": "4.9.1",
|
||||
"from": "buffer@4.9.1",
|
||||
|
@ -1250,9 +1236,9 @@
|
|||
"resolved": "https://registry.npmjs.org/hooker/-/hooker-0.2.3.tgz"
|
||||
},
|
||||
"hooks-fixed": {
|
||||
"version": "1.1.0",
|
||||
"from": "hooks-fixed@1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/hooks-fixed/-/hooks-fixed-1.1.0.tgz"
|
||||
"version": "2.0.0",
|
||||
"from": "hooks-fixed@2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/hooks-fixed/-/hooks-fixed-2.0.0.tgz"
|
||||
},
|
||||
"http-errors": {
|
||||
"version": "1.6.1",
|
||||
|
@ -1475,23 +1461,9 @@
|
|||
}
|
||||
},
|
||||
"kareem": {
|
||||
"version": "1.0.1",
|
||||
"from": "kareem@1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/kareem/-/kareem-1.0.1.tgz"
|
||||
},
|
||||
"kerberos": {
|
||||
"version": "0.0.23",
|
||||
"from": "kerberos@>=0.0.0 <0.1.0",
|
||||
"resolved": "https://registry.npmjs.org/kerberos/-/kerberos-0.0.23.tgz",
|
||||
"optional": true,
|
||||
"dependencies": {
|
||||
"nan": {
|
||||
"version": "2.5.1",
|
||||
"from": "nan@>=2.5.1 <2.6.0",
|
||||
"resolved": "https://registry.npmjs.org/nan/-/nan-2.5.1.tgz",
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
"version": "1.4.1",
|
||||
"from": "kareem@1.4.1",
|
||||
"resolved": "https://registry.npmjs.org/kareem/-/kareem-1.4.1.tgz"
|
||||
},
|
||||
"kind-of": {
|
||||
"version": "3.1.0",
|
||||
|
@ -2096,46 +2068,49 @@
|
|||
}
|
||||
},
|
||||
"mongoose": {
|
||||
"version": "4.1.0",
|
||||
"from": "mongoose@4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/mongoose/-/mongoose-4.1.0.tgz",
|
||||
"version": "4.9.8",
|
||||
"from": "mongoose@4.9.8",
|
||||
"resolved": "https://registry.npmjs.org/mongoose/-/mongoose-4.9.8.tgz",
|
||||
"dependencies": {
|
||||
"async": {
|
||||
"version": "0.9.0",
|
||||
"from": "async@0.9.0",
|
||||
"resolved": "https://registry.npmjs.org/async/-/async-0.9.0.tgz"
|
||||
"version": "2.1.4",
|
||||
"from": "async@2.1.4",
|
||||
"resolved": "https://registry.npmjs.org/async/-/async-2.1.4.tgz"
|
||||
},
|
||||
"bson": {
|
||||
"version": "0.3.2",
|
||||
"from": "bson@>=0.3.0 <0.4.0",
|
||||
"resolved": "https://registry.npmjs.org/bson/-/bson-0.3.2.tgz"
|
||||
"es6-promise": {
|
||||
"version": "3.2.1",
|
||||
"from": "es6-promise@3.2.1",
|
||||
"resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-3.2.1.tgz"
|
||||
},
|
||||
"isarray": {
|
||||
"version": "1.0.0",
|
||||
"from": "isarray@>=1.0.0 <1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz"
|
||||
},
|
||||
"mongodb": {
|
||||
"version": "2.0.34",
|
||||
"from": "mongodb@2.0.34",
|
||||
"resolved": "https://registry.npmjs.org/mongodb/-/mongodb-2.0.34.tgz"
|
||||
"version": "2.2.26",
|
||||
"from": "mongodb@2.2.26",
|
||||
"resolved": "https://registry.npmjs.org/mongodb/-/mongodb-2.2.26.tgz"
|
||||
},
|
||||
"mongodb-core": {
|
||||
"version": "1.2.0",
|
||||
"from": "mongodb-core@1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/mongodb-core/-/mongodb-core-1.2.0.tgz",
|
||||
"dependencies": {
|
||||
"bson": {
|
||||
"version": "0.4.23",
|
||||
"from": "bson@>=0.4.0 <0.5.0",
|
||||
"resolved": "https://registry.npmjs.org/bson/-/bson-0.4.23.tgz"
|
||||
}
|
||||
}
|
||||
"version": "2.1.10",
|
||||
"from": "mongodb-core@2.1.10",
|
||||
"resolved": "https://registry.npmjs.org/mongodb-core/-/mongodb-core-2.1.10.tgz"
|
||||
},
|
||||
"ms": {
|
||||
"version": "0.1.0",
|
||||
"from": "ms@0.1.0",
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-0.1.0.tgz"
|
||||
"version": "0.7.2",
|
||||
"from": "ms@0.7.2",
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-0.7.2.tgz"
|
||||
},
|
||||
"readable-stream": {
|
||||
"version": "1.0.31",
|
||||
"from": "readable-stream@1.0.31",
|
||||
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.31.tgz"
|
||||
"version": "2.2.7",
|
||||
"from": "readable-stream@2.2.7",
|
||||
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.2.7.tgz"
|
||||
},
|
||||
"string_decoder": {
|
||||
"version": "1.0.0",
|
||||
"from": "string_decoder@>=1.0.0 <1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.0.tgz"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -2145,24 +2120,24 @@
|
|||
"resolved": "https://registry.npmjs.org/monocle/-/monocle-1.1.51.tgz"
|
||||
},
|
||||
"mpath": {
|
||||
"version": "0.1.1",
|
||||
"from": "mpath@0.1.1",
|
||||
"resolved": "https://registry.npmjs.org/mpath/-/mpath-0.1.1.tgz"
|
||||
"version": "0.2.1",
|
||||
"from": "mpath@0.2.1",
|
||||
"resolved": "https://registry.npmjs.org/mpath/-/mpath-0.2.1.tgz"
|
||||
},
|
||||
"mpromise": {
|
||||
"version": "0.5.4",
|
||||
"from": "mpromise@0.5.4",
|
||||
"resolved": "https://registry.npmjs.org/mpromise/-/mpromise-0.5.4.tgz"
|
||||
"version": "0.5.5",
|
||||
"from": "mpromise@0.5.5",
|
||||
"resolved": "https://registry.npmjs.org/mpromise/-/mpromise-0.5.5.tgz"
|
||||
},
|
||||
"mquery": {
|
||||
"version": "1.6.1",
|
||||
"from": "mquery@1.6.1",
|
||||
"resolved": "https://registry.npmjs.org/mquery/-/mquery-1.6.1.tgz",
|
||||
"version": "2.3.0",
|
||||
"from": "mquery@2.3.0",
|
||||
"resolved": "https://registry.npmjs.org/mquery/-/mquery-2.3.0.tgz",
|
||||
"dependencies": {
|
||||
"bluebird": {
|
||||
"version": "2.9.26",
|
||||
"from": "bluebird@2.9.26",
|
||||
"resolved": "https://registry.npmjs.org/bluebird/-/bluebird-2.9.26.tgz"
|
||||
"version": "2.10.2",
|
||||
"from": "bluebird@2.10.2",
|
||||
"resolved": "https://registry.npmjs.org/bluebird/-/bluebird-2.10.2.tgz"
|
||||
},
|
||||
"debug": {
|
||||
"version": "2.2.0",
|
||||
|
@ -2173,6 +2148,11 @@
|
|||
"version": "0.7.1",
|
||||
"from": "ms@0.7.1",
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz"
|
||||
},
|
||||
"sliced": {
|
||||
"version": "0.0.5",
|
||||
"from": "sliced@0.0.5",
|
||||
"resolved": "https://registry.npmjs.org/sliced/-/sliced-0.0.5.tgz"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -2214,9 +2194,9 @@
|
|||
}
|
||||
},
|
||||
"muri": {
|
||||
"version": "1.0.0",
|
||||
"from": "muri@1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/muri/-/muri-1.0.0.tgz"
|
||||
"version": "1.2.1",
|
||||
"from": "muri@1.2.1",
|
||||
"resolved": "https://registry.npmjs.org/muri/-/muri-1.2.1.tgz"
|
||||
},
|
||||
"mv": {
|
||||
"version": "0.0.5",
|
||||
|
@ -3202,9 +3182,9 @@
|
|||
"resolved": "https://registry.npmjs.org/sixpack-client/-/sixpack-client-1.0.0.tgz"
|
||||
},
|
||||
"sliced": {
|
||||
"version": "0.0.5",
|
||||
"from": "sliced@0.0.5",
|
||||
"resolved": "https://registry.npmjs.org/sliced/-/sliced-0.0.5.tgz"
|
||||
"version": "1.0.1",
|
||||
"from": "sliced@1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/sliced/-/sliced-1.0.1.tgz"
|
||||
},
|
||||
"smtp-connection": {
|
||||
"version": "2.0.1",
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
"mimelib": "0.2.14",
|
||||
"mocha": "1.17.1",
|
||||
"mongojs": "2.4.0",
|
||||
"mongoose": "4.1.0",
|
||||
"mongoose": "4.9.8",
|
||||
"multer": "^0.1.8",
|
||||
"nodemailer": "2.1.0",
|
||||
"nodemailer-sendgrid-transport": "^0.2.0",
|
||||
|
|
Loading…
Reference in a new issue