@rpcbase/server 0.336.0 → 0.337.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/mongoose.js +0 -14
- package/package.json +1 -2
package/mongoose.js
CHANGED
|
@@ -5,19 +5,5 @@ const mongoose = require("mongoose")
|
|
|
5
5
|
// https://mongoosejs.com/docs/migrating_to_7.html#strictquery
|
|
6
6
|
mongoose.set("strictQuery", false)
|
|
7
7
|
|
|
8
|
-
const originalModelFunction = mongoose.model
|
|
9
|
-
|
|
10
|
-
mongoose.model = function(name, schema, collection, skipInit) {
|
|
11
|
-
// Check if the model is already defined
|
|
12
|
-
if (mongoose.connection.models[name]) {
|
|
13
|
-
// If the model exists, delete it to avoid duplication errors
|
|
14
|
-
delete mongoose.connection.models[name]
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
// Call the original mongoose model function with the provided arguments
|
|
18
|
-
return originalModelFunction.call(this, name, schema, collection, skipInit)
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
|
|
22
8
|
|
|
23
9
|
module.exports = mongoose
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rpcbase/server",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.337.0",
|
|
4
4
|
"license": "SSPL-1.0",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"bin": {
|
|
@@ -63,7 +63,6 @@
|
|
|
63
63
|
}
|
|
64
64
|
},
|
|
65
65
|
"dependencies": {
|
|
66
|
-
"@rpcbase/agent": "0.36.0",
|
|
67
66
|
"@rpcbase/std": "0.13.0",
|
|
68
67
|
"@sentry/node": "7.94.1",
|
|
69
68
|
"bluebird": "3.7.2",
|