@mikro-orm/mongodb 6.3.1-dev.0 → 6.3.1-dev.10
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/MongoConnection.js +4 -4
- package/package.json +2 -2
package/MongoConnection.js
CHANGED
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.MongoConnection = void 0;
|
|
4
4
|
const mongodb_1 = require("mongodb");
|
|
5
5
|
const bson_1 = require("bson");
|
|
6
|
-
const
|
|
6
|
+
const node_util_1 = require("node:util");
|
|
7
7
|
const core_1 = require("@mikro-orm/core");
|
|
8
8
|
class MongoConnection extends core_1.Connection {
|
|
9
9
|
client;
|
|
@@ -11,11 +11,11 @@ class MongoConnection extends core_1.Connection {
|
|
|
11
11
|
constructor(config, options, type = 'write') {
|
|
12
12
|
super(config, options, type);
|
|
13
13
|
// @ts-ignore
|
|
14
|
-
bson_1.ObjectId.prototype[
|
|
14
|
+
bson_1.ObjectId.prototype[node_util_1.inspect.custom] = function () {
|
|
15
15
|
return `ObjectId('${this.toHexString()}')`;
|
|
16
16
|
};
|
|
17
17
|
// @ts-ignore
|
|
18
|
-
Date.prototype[
|
|
18
|
+
Date.prototype[node_util_1.inspect.custom] = function () {
|
|
19
19
|
return `ISODate('${this.toISOString()}')`;
|
|
20
20
|
};
|
|
21
21
|
}
|
|
@@ -341,7 +341,7 @@ class MongoConnection extends core_1.Connection {
|
|
|
341
341
|
if (o.session) {
|
|
342
342
|
o = { ...o, session: `[ClientSession]` };
|
|
343
343
|
}
|
|
344
|
-
return (0,
|
|
344
|
+
return (0, node_util_1.inspect)(o, { depth: 5, compact: true, breakLength: 300 });
|
|
345
345
|
}
|
|
346
346
|
}
|
|
347
347
|
exports.MongoConnection = MongoConnection;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mikro-orm/mongodb",
|
|
3
|
-
"version": "6.3.1-dev.
|
|
3
|
+
"version": "6.3.1-dev.10",
|
|
4
4
|
"description": "TypeScript ORM for Node.js based on Data Mapper, Unit of Work and Identity Map patterns. Supports MongoDB, MySQL, PostgreSQL and SQLite databases as well as usage with vanilla JavaScript.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "index.mjs",
|
|
@@ -65,6 +65,6 @@
|
|
|
65
65
|
"@mikro-orm/core": "^6.3.0"
|
|
66
66
|
},
|
|
67
67
|
"peerDependencies": {
|
|
68
|
-
"@mikro-orm/core": "6.3.1-dev.
|
|
68
|
+
"@mikro-orm/core": "6.3.1-dev.10"
|
|
69
69
|
}
|
|
70
70
|
}
|