@mikro-orm/mongodb 6.3.14-dev.9 → 6.4.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/MongoConnection.d.ts +4 -2
- package/MongoConnection.js +3 -1
- package/index.mjs +1 -0
- package/package.json +4 -4
package/MongoConnection.d.ts
CHANGED
|
@@ -8,8 +8,10 @@ export declare class MongoConnection extends Connection {
|
|
|
8
8
|
close(force?: boolean): Promise<void>;
|
|
9
9
|
isConnected(): Promise<boolean>;
|
|
10
10
|
checkConnection(): Promise<{
|
|
11
|
-
ok:
|
|
12
|
-
|
|
11
|
+
ok: true;
|
|
12
|
+
} | {
|
|
13
|
+
ok: false;
|
|
14
|
+
reason: string;
|
|
13
15
|
error?: Error;
|
|
14
16
|
}>;
|
|
15
17
|
getClient(): MongoClient;
|
package/MongoConnection.js
CHANGED
|
@@ -48,7 +48,9 @@ class MongoConnection extends core_1.Connection {
|
|
|
48
48
|
async checkConnection() {
|
|
49
49
|
try {
|
|
50
50
|
const res = await this.db?.command({ ping: 1 });
|
|
51
|
-
return
|
|
51
|
+
return res.ok
|
|
52
|
+
? { ok: true }
|
|
53
|
+
: { ok: false, reason: 'Ping reply does not feature "ok" property, or it evaluates to "false"' };
|
|
52
54
|
}
|
|
53
55
|
catch (error) {
|
|
54
56
|
return { ok: false, reason: error.message, error };
|
package/index.mjs
CHANGED
|
@@ -169,6 +169,7 @@ export const TimeType = mod.TimeType;
|
|
|
169
169
|
export const TinyIntType = mod.TinyIntType;
|
|
170
170
|
export const TransactionContext = mod.TransactionContext;
|
|
171
171
|
export const TransactionEventBroadcaster = mod.TransactionEventBroadcaster;
|
|
172
|
+
export const Transactional = mod.Transactional;
|
|
172
173
|
export const Type = mod.Type;
|
|
173
174
|
export const Uint8ArrayType = mod.Uint8ArrayType;
|
|
174
175
|
export const UnderscoreNamingStrategy = mod.UnderscoreNamingStrategy;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mikro-orm/mongodb",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.4.0",
|
|
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",
|
|
@@ -59,12 +59,12 @@
|
|
|
59
59
|
},
|
|
60
60
|
"dependencies": {
|
|
61
61
|
"bson": "^6.7.0",
|
|
62
|
-
"mongodb": "6.
|
|
62
|
+
"mongodb": "6.10.0"
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
65
|
-
"@mikro-orm/core": "^6.
|
|
65
|
+
"@mikro-orm/core": "^6.4.0"
|
|
66
66
|
},
|
|
67
67
|
"peerDependencies": {
|
|
68
|
-
"@mikro-orm/core": "6.
|
|
68
|
+
"@mikro-orm/core": "^6.0.0"
|
|
69
69
|
}
|
|
70
70
|
}
|